Percona XtraDB Cluster - HA scalable solution for MySQL

CREATE TABLE t LIKE <temporary table>

Reported by Seppo Jaakola on 2013-08-14
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL patches by Codership
Status tracked in 5.6
5.5
Medium
Seppo Jaakola
5.6
Medium
Seppo Jaakola
Percona XtraDB Cluster
Status tracked in Trunk
5.6
Undecided
Unassigned
Trunk
Undecided
Unassigned

Bug Description

CREATE TABLE t LIKE tmp, where tmp is a temporary table, will cause serious problem for replication.

This create statement will be replicated as plain SQL statement, and then the create statement will not be possible to apply in slave nodes, as the temporary table is not present there. If there are later DML for this table, all other nodes will crash, as DML cannot be applied due to missing table.

Changed in codership-mysql:
importance: Undecided → Medium
assignee: nobody → Seppo Jaakola (seppo-jaakola)
Changed in percona-xtradb-cluster:
milestone: none → 5.5.33-23.7.6
Changed in codership-mysql:
status: New → In Progress
milestone: none → 5.5.32-23.7.6
Seppo Jaakola (seppo-jaakola) wrote :

The fix replicates CREATE TABLE LIKE <tmp table> with two query log events:

1. first the CREATE TABLE for the source temporary table
2. then the actual CREATE TABLE LIKE... event

This way, the slave applier will get to see the definition of the temporary table. The temporary table is dropped in the slave applier at the end of processing of the replication bundle.

Fix is pushed in revision: http://bazaar.launchpad.net/~codership/codership-mysql/5.5-23/revision/3900

Changed in codership-mysql:
status: In Progress → Fix Committed
Changed in percona-xtradb-cluster:
status: New → Fix Committed
Changed in codership-mysql:
status: Fix Committed → Fix Released
Changed in percona-xtradb-cluster:
status: Fix Committed → Fix Released

There are still issues with TEMPORARY TABLE as in https://bugs.launchpad.net/percona-xtradb-cluster/+bug/1212955/comments/32

I will need to rerun with TEMPORARY TABLE enabled in grammar with latest fixes.

Also need to evaluate if https://bugs.launchpad.net/percona-xtradb-cluster/+bug/1240098 is related to this.

Tested with latest 5.5 (5.5-23 HEAD in case of codership) build, no issues there.

Tested with 5.6 HEAD and I am seeing node consistency compromise issues but no hangs.

Actually, not able to replicate with 5.6 as well since we are hitting https://bugs.launchpad.net/bugs/1234395 in that case in debug builds and 'node consistency compromise' in release builds which is more due to lp:1234395

Seppo Jaakola (seppo-jaakola) wrote :

Merged the fix into wsrep-5.6 branch in revision: http://bazaar.launchpad.net/~codership/codership-mysql/5.6/revision/3993

Seppo Jaakola (seppo-jaakola) wrote :

Related fix for lp:1216904 merged into wsrep-5.6 branch in revision: http://bazaar.launchpad.net/~codership/codership-mysql/5.6/revision/3994

Seppo Jaakola (seppo-jaakola) wrote :

lp:1234395 was not related to "CREATE TABLE LIKE..." processing, marking this bug as fixed now

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers