1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

A change of behaviour of Seconds_Behind_Master from SHOW SLAVE STATUS. It's going into 4.1

because old behaviour was somewhat nonsensical (kind of bug). Changes are that if repl threads are
down or disconnected the column will be NULL, and if master is idle the column will not grow indefinitely anymore.
This commit is contained in:
guilhem@mysql.com
2004-12-16 18:12:22 +01:00
parent c2ebfaa323
commit ea99ce4e09
3 changed files with 74 additions and 22 deletions

View File

@ -880,10 +880,10 @@ int reset_slave(THD *thd, MASTER_INFO* mi)
*/
init_master_info_with_options(mi);
/*
Reset errors, and master timestamp (the idea is that we forget about the
Reset errors (the idea is that we forget about the
old master).
*/
clear_slave_error_timestamp(&mi->rli);
clear_slave_error(&mi->rli);
clear_until_condition(&mi->rli);
// close master_info_file, relay_log_info_file, set mi->inited=rli->inited=0
@ -1143,8 +1143,8 @@ int change_master(THD* thd, MASTER_INFO* mi)
pthread_mutex_lock(&mi->rli.data_lock);
mi->rli.abort_pos_wait++; /* for MASTER_POS_WAIT() to abort */
/* Clear the errors, for a clean start, and master timestamp */
clear_slave_error_timestamp(&mi->rli);
/* Clear the errors, for a clean start */
clear_slave_error(&mi->rli);
clear_until_condition(&mi->rli);
/*
If we don't write new coordinates to disk now, then old will remain in