Fix bug 1711781 (Redundant GTID unsafe mark for CREATE/DROP TEMPORARY TABLE in RBR/MBR)
After fixing bug 1668602, bug 1539504, and bug 1313901, CREATE
TEMPORARY TABLE is only logged under statement binary log mode, and
DROP TEMPORARY TABLE is only logged if the corresponding CREATE
TEMPORARY TABLE has been logged. However, a corresponding
enforce_gtid_consistency check in THD::is_ddl_gtid_compatible has not
been relaxed accordingly. This resulted that CREATE/DROP TEMPORARY
TABLE statements were forbidden incorrectly in transactional contexts,
including function and trigger calls, even when they required no
binary logging at all.
Fix by keeping only the CREATE TEMPORARY TABLE check in
THD::is_ddl_gtid_compatible and lifting its restriction for row/mixed
binary log modes. For DROP TEMPORARY TABLE, since its check requires
knowing the binlog format at the corresponding CREATE TEMPORARY TABLE,
move it to mysql_rm_table.
Convert binlog.binlog_enforce_gtid_consistency test to an include file
that is shared between two new binlog format-dependent tests
binlog_stm_enforce_gtid_consistency and
binlog_row_mix_enforce_gtid_consistency.
The test stops failing (at least for --repeat=100) on the following commit:
commit afb6d4b56f8e57b 9a7f72022e912b4 01e570124b
Author: Laurynas Biveinis <email address hidden>
Date: Thu Aug 31 11:48:44 2017 +0300
Fix bug 1711781 (Redundant GTID unsafe mark for CREATE/DROP TEMPORARY TABLE in RBR/MBR)
After fixing bug 1668602, bug 1539504, and bug 1313901, CREATE gtid_consistenc y check in THD::is_ ddl_gtid_ compatible has not
TEMPORARY TABLE is only logged under statement binary log mode, and
DROP TEMPORARY TABLE is only logged if the corresponding CREATE
TEMPORARY TABLE has been logged. However, a corresponding
enforce_
been relaxed accordingly. This resulted that CREATE/DROP TEMPORARY
TABLE statements were forbidden incorrectly in transactional contexts,
including function and trigger calls, even when they required no
binary logging at all.
Fix by keeping only the CREATE TEMPORARY TABLE check in is_ddl_ gtid_compatible and lifting its restriction for row/mixed
THD::
binary log modes. For DROP TEMPORARY TABLE, since its check requires
knowing the binlog format at the corresponding CREATE TEMPORARY TABLE,
move it to mysql_rm_table.
Convert binlog. binlog_ enforce_ gtid_consistenc y test to an include file stm_enforce_ gtid_consistenc y and row_mix_ enforce_ gtid_consistenc y.
that is shared between two new binlog format-dependent tests
binlog_
binlog_