1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

Refs: MW-360 * splitting DROP TABLE query in separate DROP commands for temporary and real tables * not replicating temporary table DROP command * using wsrep_sidno GTID group only for innodb table drop command part all this follows more or less the logic of how mysql wants to split drop table list

This commit is contained in:
sjaakola
2017-02-16 23:19:10 +02:00
committed by Jan Lindström
parent 364b15c090
commit 7ef2d5aa5b
10 changed files with 163 additions and 42 deletions

View File

@ -4031,16 +4031,24 @@ end_with_restore_list:
thd->variables.option_bits|= OPTION_KEEP_LOG;
}
#ifdef WITH_WSREP
for (TABLE_LIST *table= all_tables; table; table= table->next_global)
{
if (!lex->drop_temporary &&
(!thd->is_current_stmt_binlog_format_row() ||
!find_temporary_table(thd, table)))
{
WSREP_TO_ISOLATION_BEGIN(NULL, NULL, all_tables);
break;
}
}
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