1
0
mirror of https://github.com/MariaDB/server.git synced 2025-09-03 20:43:11 +03:00

Fixing portability problem by using my_time_t instead of time_t.

This commit is contained in:
mats@romeo.(none)
2007-04-13 14:56:24 +02:00
parent 84ec7be2c7
commit b27e486a07

View File

@@ -1334,8 +1334,7 @@ bool show_master_info(THD* thd, MASTER_INFO* mi)
if ((mi->slave_running == MYSQL_SLAVE_RUN_CONNECT) && if ((mi->slave_running == MYSQL_SLAVE_RUN_CONNECT) &&
mi->rli.slave_running) mi->rli.slave_running)
{ {
long time_diff= ((long)((time_t)time((time_t*) 0) long time_diff= ((long)(time(0) - mi->rli.last_master_timestamp)
- mi->rli.last_master_timestamp)
- mi->clock_diff_with_master); - mi->clock_diff_with_master);
/* /*
Apparently on some systems time_diff can be <0. Here are possible Apparently on some systems time_diff can be <0. Here are possible
@@ -3461,7 +3460,7 @@ static Log_event* next_event(RELAY_LOG_INFO* rli)
the events have old timestamps (then you get "many", 0, "many"). the events have old timestamps (then you get "many", 0, "many").
Transient phases like this can't really be fixed. Transient phases like this can't really be fixed.
*/ */
time_t save_timestamp= rli->last_master_timestamp; my_time_t save_timestamp= rli->last_master_timestamp;
rli->last_master_timestamp= 0; rli->last_master_timestamp= 0;
DBUG_ASSERT(rli->relay_log.get_open_count() == DBUG_ASSERT(rli->relay_log.get_open_count() ==