mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-15477: SESSION_SYSVARS_TRACKER does not track last_gtid
register changes of last_gtid
This commit is contained in:
@ -1190,7 +1190,7 @@ void THD::init(void)
|
||||
bzero((char *) &org_status_var, sizeof(org_status_var));
|
||||
status_in_global= 0;
|
||||
start_bytes_received= 0;
|
||||
last_commit_gtid.seq_no= 0;
|
||||
m_last_commit_gtid.seq_no= 0;
|
||||
last_stmt= NULL;
|
||||
/* Reset status of last insert id */
|
||||
arg_of_last_insert_id_function= FALSE;
|
||||
@ -6972,6 +6972,21 @@ THD::signal_wakeup_ready()
|
||||
mysql_cond_signal(&COND_wakeup_ready);
|
||||
}
|
||||
|
||||
void THD::set_last_commit_gtid(rpl_gtid >id)
|
||||
{
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
bool changed_gtid= (m_last_commit_gtid.seq_no != gtid.seq_no);
|
||||
#endif
|
||||
m_last_commit_gtid= gtid;
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
if (changed_gtid &&
|
||||
session_tracker.get_tracker(SESSION_SYSVARS_TRACKER)->is_enabled())
|
||||
{
|
||||
session_tracker.get_tracker(SESSION_SYSVARS_TRACKER)->
|
||||
mark_as_changed(this, (LEX_CSTRING*)Sys_last_gtid_ptr);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
wait_for_commit::reinit()
|
||||
|
Reference in New Issue
Block a user