mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge branch '10.1' into 10.2
This commit is contained in:
@ -1018,6 +1018,7 @@ THD::THD(my_thread_id id, bool is_wsrep_applier)
|
||||
wsrep_TOI_pre_query_len = 0;
|
||||
wsrep_info[sizeof(wsrep_info) - 1] = '\0'; /* make sure it is 0-terminated */
|
||||
wsrep_sync_wait_gtid = WSREP_GTID_UNDEFINED;
|
||||
wsrep_affected_rows = 0;
|
||||
#endif
|
||||
/* Call to init() below requires fully initialized Open_tables_state. */
|
||||
reset_open_tables_state(this);
|
||||
@ -1448,6 +1449,7 @@ void THD::init(void)
|
||||
wsrep_TOI_pre_query = NULL;
|
||||
wsrep_TOI_pre_query_len = 0;
|
||||
wsrep_sync_wait_gtid = WSREP_GTID_UNDEFINED;
|
||||
wsrep_affected_rows = 0;
|
||||
#endif /* WITH_WSREP */
|
||||
|
||||
if (variables.sql_log_bin)
|
||||
@ -2311,6 +2313,8 @@ void THD::cleanup_after_query()
|
||||
|
||||
#ifdef WITH_WSREP
|
||||
wsrep_sync_wait_gtid= WSREP_GTID_UNDEFINED;
|
||||
if (!in_active_multi_stmt_transaction())
|
||||
wsrep_affected_rows= 0;
|
||||
#endif /* WITH_WSREP */
|
||||
|
||||
DBUG_VOID_RETURN;
|
||||
@ -5282,7 +5286,11 @@ void THD::get_definer(LEX_USER *definer, bool role)
|
||||
{
|
||||
binlog_invoker(role);
|
||||
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
|
||||
#ifdef WITH_WSREP
|
||||
if ((wsrep_applier || slave_thread) && has_invoker())
|
||||
#else
|
||||
if (slave_thread && has_invoker())
|
||||
#endif
|
||||
{
|
||||
definer->user = invoker_user;
|
||||
definer->host= invoker_host;
|
||||
|
Reference in New Issue
Block a user