Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug 1711781 (Redundant GTID unsafe mark for CREATE/DROP TEMPORARY… #1929

Merged
merged 1 commit into from Sep 28, 2017

Conversation

laurynas-biveinis
Copy link
Contributor

… 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.

http://jenkins.percona.com/job/percona-server-5.6-param/1988/

… 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.
Copy link
Collaborator

@percona-ysorokin percona-ysorokin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@robgolebiowski robgolebiowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@laurynas-biveinis laurynas-biveinis merged commit 2d00183 into percona:5.6 Sep 28, 2017
@laurynas-biveinis laurynas-biveinis deleted the bug1711781-5.6 branch September 28, 2017 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants