CREATE TABLE ... AS SELECT is not supported

Bug #1052002 reported by Seppo Jaakola
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL patches by Codership
Fix Released
Low
Seppo Jaakola
5.5
Fix Released
Low
Seppo Jaakola

Bug Description

CREATE TABLE ... AS SELECT does not replicate under TO isolation. And it will cause a crash at later table population phase:

120909 15:30:42 [ERROR] WSREP: FSM: no such a transition REPLICATING -> REPLICATING

Related branches

Changed in codership-mysql:
status: New → In Progress
importance: Undecided → Low
assignee: nobody → Seppo Jaakola (seppo-jaakola)
milestone: none → 5.5.27-23.7
Revision history for this message
Seppo Jaakola (seppo-jaakola) wrote :
Revision history for this message
Seppo Jaakola (seppo-jaakola) wrote :

This fix caused a problem with binlog files, the create table statement does not enter binlog files. Problem reported in MariaDB project with tracker: https://mariadb.atlassian.net/browse/MDEV-544

Revision history for this message
Seppo Jaakola (seppo-jaakola) wrote :

fix pushed to enable binlog writes for both CREATE TABLE and following inserts: http://bazaar.launchpad.net/~codership/codership-mysql/wsrep-5.5/revision/3804

Revision history for this message
Seppo Jaakola (seppo-jaakola) wrote :

There is one more issue with CREATE...SELECT and concurrent DDL as described in: https://mariadb.atlassian.net/browse/MDEV-542

To reproduce, two concurrent DDL sessions should be run:
1. CREATE TABLE t1 AS SELECT SLEEP(30);
2. drop table t1;

Revision history for this message
Seppo Jaakola (seppo-jaakola) wrote :
Revision history for this message
Seppo Jaakola (seppo-jaakola) wrote :

Current implementation could cause inconsistency between binlog files, and the fix was refactored to replicate full CTAS as one write set. Last piece of this refactoring was committed in revision: http://bazaar.launchpad.net/~codership/codership-mysql/wsrep-5.5/revision/3806

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.