diff options
author | Kristian Nielsen <knielsen@knielsen-hq.org> | 2017-05-29 11:35:36 +0300 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2017-07-03 11:16:13 +0300 |
commit | 228479a28ce7e4c91f96962159fccc8dc71b5a36 (patch) | |
tree | 6570d3af4066e7bc7c648c0881344d3ba06a75b6 /sql/sql_base.cc | |
parent | da7604a2943f633df3b193e26ee20110bae9fa7a (diff) | |
download | mariadb-git-228479a28ce7e4c91f96962159fccc8dc71b5a36.tar.gz |
MDEV-8075: DROP TEMPORARY TABLE not marked as ddl, causing optimistic parallel replication to fail
CREATE/DROP TEMPORARY TABLE are not safe to optimistically replicate in
parallel with other transactions, so they need to be marked as "ddl" in the
binlog.
This was already done for stand-alone CREATE/DROP TEMPORARY. But temporary
tables can also be created and dropped inside a BEGIN...END transaction, and
such transactions were not marked as ddl. Nor was the DROP TEMPORARY TABLE
statement emitted implicitly when a client connection is closed.
So this patch adds such ddl mark for the missing cases.
The difference to Kristian's original patch is mainly a fix in
mysql_trans_commit_alter_copy_data() to remember the unsafe_rollback_flags
over the temporary commit.
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r-- | sql/sql_base.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 9c56b7d8f22..ae10c0b771d 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -1245,6 +1245,7 @@ bool close_temporary_tables(THD *thd) thd->variables.character_set_client= cs_save; thd->get_stmt_da()->set_overwrite_status(true); + thd->transaction.stmt.mark_dropped_temp_table(); if ((error= (mysql_bin_log.write(&qinfo) || error))) { /* |