1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-36340: Reset Connects_Tried with Master_Retry_Count=X

CHANGE MASTER can set `Master_Retry_Count` to be lower than
`Connects_Tried`, which’ll look strange to those unaware of that CHANGE.

Now, setting `Master_Retry_Count` also resets `Connects_Tried` to 0.

Reviewed-by: Susil Behera <susil.behera@mariadb.com>
Reviewed-by: Brandon Nesterenko <brandon.nesterenko@mariadb.com>
This commit is contained in:
ParadoxV5
2025-04-14 22:14:57 -06:00
parent 8a95409393
commit f8bc40ef5f
3 changed files with 36 additions and 14 deletions

View File

@ -4052,7 +4052,10 @@ bool change_master(THD* thd, Master_info* mi, bool *master_info_added)
if (lex_mi->connect_retry)
mi->connect_retry = lex_mi->connect_retry;
if (lex_mi->retry_count)
{
mi->retry_count= lex_mi->retry_count;
mi->connects_tried= 0;
}
if (lex_mi->heartbeat_opt != LEX_MASTER_INFO::LEX_MI_UNCHANGED)
mi->heartbeat_period = lex_mi->heartbeat_period;
else