summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2015-11-19 17:48:36 +0100
committerSergei Golubchik <serg@mariadb.org>2015-11-19 17:48:36 +0100
commit7f19330c595e3183d079fe2c18eecc74740e8f83 (patch)
tree8b853976cd14d96d5415757be525133b32be0c93 /sql/sql_parse.cc
parent4046ed12bcddfd831c510b022cb7af224be9457b (diff)
parentf4421c893b50f05078f14d33c47d21f52f59f8a7 (diff)
downloadmariadb-git-7f19330c595e3183d079fe2c18eecc74740e8f83.tar.gz
Merge branch 'github/10.0-galera' into 10.1
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc20
1 files changed, 20 insertions, 0 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 1388ec01459..ba9dc7eb854 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -4829,6 +4829,25 @@ end_with_restore_list:
*/
if (!reload_acl_and_cache(thd, lex->type, first_table, &write_to_binlog))
{
+#ifdef WITH_WSREP
+ if ((lex->type & REFRESH_TABLES) && !(lex->type & (REFRESH_FOR_EXPORT|REFRESH_READ_LOCK)))
+ {
+ /*
+ This is done after reload_acl_and_cache is because
+ LOCK TABLES is not replicated in galera, the upgrade of which
+ is checked in reload_acl_and_cache.
+ Hence, done after/if we are able to upgrade locks.
+ */
+ if (first_table)
+ {
+ WSREP_TO_ISOLATION_BEGIN(NULL, NULL, first_table);
+ }
+ else
+ {
+ WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL);
+ }
+ }
+#endif /* WITH_WSREP */
/*
We WANT to write and we CAN write.
! we write after unlocking the table.
@@ -7134,6 +7153,7 @@ static void wsrep_mysql_parse(THD *thd, char *rawbuf, uint length,
/* Performance Schema Interface instrumentation, end */
MYSQL_END_STATEMENT(thd->m_statement_psi, thd->get_stmt_da());
thd->m_statement_psi= NULL;
+ thd->m_digest= NULL;
close_thread_tables(thd);
thd->wsrep_conflict_state= RETRY_AUTOCOMMIT;