summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
authorsjaakola <seppo.jaakola@iki.fi>2017-02-20 23:29:25 +0200
committerJan Lindström <jan.lindstrom@mariadb.com>2017-08-11 13:49:01 +0300
commit04c6b03c9b2155500d82ce880f3b8bea88f0c5a5 (patch)
tree8956e8d9902aa1efc4d5d57a35e32f8283173956 /sql/sql_parse.cc
parenta754387a09023c3715170527b8fe396acd6c67c2 (diff)
downloadmariadb-git-04c6b03c9b2155500d82ce880f3b8bea88f0c5a5.tar.gz
Refs: MW-360 * merged relevant parts of DROP TABLE query splitting from mysql-wsrep-features
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc21
1 files changed, 1 insertions, 20 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index a4442653839..d63a61e0ab1 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -4030,26 +4030,6 @@ end_with_restore_list:
/* So that DROP TEMPORARY TABLE gets to binlog at commit/rollback */
thd->variables.option_bits|= OPTION_KEEP_LOG;
}
-#ifdef WITH_WSREP
- bool has_tmp_tables= false;
- for (TABLE_LIST *table= all_tables; table; table= table->next_global)
- {
- if (lex->drop_temporary || find_temporary_table(thd, table))
- {
- has_tmp_tables= true;
- break;
- }
- }
- if (has_tmp_tables)
- {
- wsrep_replicate_drop_query(thd, first_table, lex->check_exists,
- lex->drop_temporary, false);
- }
- else
- {
- WSREP_TO_ISOLATION_BEGIN(NULL, NULL, all_tables);
- }
-#endif /* WITH_WSREP */
/*
If we are a slave, we should add IF EXISTS if the query executed
on the master without an error. This will help a slave to
@@ -4060,6 +4040,7 @@ end_with_restore_list:
slave_ddl_exec_mode_options == SLAVE_EXEC_MODE_IDEMPOTENT)
lex->check_exists= 1;
+ WSREP_TO_ISOLATION_BEGIN(NULL, NULL, all_tables);
/* DDL and binlog write order are protected by metadata locks. */
res= mysql_rm_table(thd, first_table, lex->check_exists,
lex->drop_temporary);