1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Merge branch '10.0-galera' into bb-10.1-serg

This commit is contained in:
Nirbhay Choubey
2016-08-25 15:39:39 -04:00
113 changed files with 1774 additions and 367 deletions

View File

@@ -1029,6 +1029,7 @@ THD::THD(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);
@@ -1444,6 +1445,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)
@@ -2233,6 +2235,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;
@@ -5196,7 +5200,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;