MDEV-26: Global transaction ID.
Fix 3 small issues reported by Pavel Ivanov.
This commit is contained in:
parent
b6b84d6825
commit
f1f9c4e4e5
@ -840,8 +840,8 @@ static PSI_mutex_info all_server_mutexes[]=
|
||||
{ &key_LOG_INFO_lock, "LOG_INFO::lock", 0},
|
||||
{ &key_LOCK_thread_count, "LOCK_thread_count", PSI_FLAG_GLOBAL},
|
||||
{ &key_PARTITION_LOCK_auto_inc, "HA_DATA_PARTITION::LOCK_auto_inc", 0},
|
||||
{ &key_LOCK_slave_state, "key_LOCK_slave_state", 0},
|
||||
{ &key_LOCK_binlog_state, "key_LOCK_binlog_state", 0}
|
||||
{ &key_LOCK_slave_state, "LOCK_slave_state", 0},
|
||||
{ &key_LOCK_binlog_state, "LOCK_binlog_state", 0}
|
||||
};
|
||||
|
||||
PSI_rwlock_key key_rwlock_LOCK_grant, key_rwlock_LOCK_logger,
|
||||
|
@ -295,6 +295,7 @@ rpl_slave_state::record_gtid(THD *thd, const rpl_gtid *gtid, uint64 sub_id,
|
||||
list_element *elist= 0, *next;
|
||||
element *elem;
|
||||
ulonglong thd_saved_option= thd->variables.option_bits;
|
||||
Query_tables_list lex_backup;
|
||||
|
||||
mysql_reset_thd_for_next_command(thd, 0);
|
||||
|
||||
@ -304,6 +305,7 @@ rpl_slave_state::record_gtid(THD *thd, const rpl_gtid *gtid, uint64 sub_id,
|
||||
return 1;
|
||||
} );
|
||||
|
||||
thd->lex->reset_n_backup_query_tables_list(&lex_backup);
|
||||
tlist.init_one_table(STRING_WITH_LEN("mysql"),
|
||||
rpl_gtid_slave_state_table_name.str,
|
||||
rpl_gtid_slave_state_table_name.length,
|
||||
@ -393,6 +395,7 @@ end:
|
||||
else
|
||||
thd->mdl_context.release_transactional_locks();
|
||||
}
|
||||
thd->lex->restore_backup_query_tables_list(&lex_backup);
|
||||
thd->variables.option_bits= thd_saved_option;
|
||||
return err;
|
||||
}
|
||||
|
@ -3424,7 +3424,8 @@ bool update_multi_source_variable(sys_var *self_var, THD *thd,
|
||||
bool result= true;
|
||||
Master_info *mi;
|
||||
|
||||
mysql_mutex_unlock(&LOCK_global_system_variables);
|
||||
if (type == OPT_GLOBAL)
|
||||
mysql_mutex_unlock(&LOCK_global_system_variables);
|
||||
mysql_mutex_lock(&LOCK_active_mi);
|
||||
mi= master_info_index->
|
||||
get_master_info(&thd->variables.default_master_connection,
|
||||
@ -3438,7 +3439,8 @@ bool update_multi_source_variable(sys_var *self_var, THD *thd,
|
||||
mysql_mutex_unlock(&mi->rli.run_lock);
|
||||
}
|
||||
mysql_mutex_unlock(&LOCK_active_mi);
|
||||
mysql_mutex_lock(&LOCK_global_system_variables);
|
||||
if (type == OPT_GLOBAL)
|
||||
mysql_mutex_lock(&LOCK_global_system_variables);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user