mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Refs: MW-360 * merged relevant parts of DROP TABLE query splitting from mysql-wsrep-features
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user