Bug #12345 create table t5 select * from temporary table fails to replicate using RBR
Submitted: 3 Aug 2005 14:39 Modified: 1 Dec 2005 20:31
Reporter: Jonathan Miller
Status: Closed
Category:Server: Replication Severity:S2 (Serious)
Version:5.0-wl1012 OS:Linux (Linux)
Assigned to: Mats Kindahl Target Version:

[3 Aug 2005 14:39] Jonathan Miller
Description:
Using a temporary table on the master to create a table will not be replicated to slave
using row based replication.

How to repeat:
setup repilcation using binlog-format=row

master> create table t2(id int auto_increment primary key, created datetime);
Query OK, 0 rows affected (0.01 sec)

slavel> show tables;
+----------------+
| Tables_in_test |
+----------------+
| t2             |
+----------------+
1 row in set (0.00 sec)

master> insert into t2 set created=now();
Query OK, 1 row affected (0.00 sec)

master> select * from t2;
+----+---------------------+
| id | created             |
+----+---------------------+
|  1 | 2005-08-03 14:26:51 |
+----+---------------------+
1 row in set (0.00 sec)

slave> select * from t2;
+----+---------------------+
| id | created             |
+----+---------------------+
|  1 | 2005-08-03 14:26:51 |
+----+---------------------+
1 row in set (0.00 sec)

master> create temporary table t4 like t2;
Query OK, 0 rows affected (0.00 sec)

master>create table t5 select * from t4;
Query OK, 0 rows affected (0.01 sec)
Records: 0  Duplicates: 0  Warnings: 0

master> show tables;
+----------------+
| Tables_in_test |
+----------------+
| t2             |
| t5             |
+----------------+
2 rows in set (0.01 sec)

slave> show tables;
+----------------+
| Tables_in_test |
+----------------+
| t2             |
+----------------+
1 row in set (0.00 sec)

Suggested fix:
table should be replicated.
[1 Dec 2005 20:31] Mats Kindahl
This bug was fixed as part of WL#2867.
[13 Feb 12:30] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/66180

3037 Davi Arnaut	2009-02-13 [merge]
      Merge from 5.1-bugteam branch for Bug#12345
      modified:
        README

=== modified file 'README'
--- a/README	2008-03-26 10:15:03 +0000
+++ b/README	2009-02-13 10:34:51 +0000
@@ -28,8 +28,6 @@ directory in GNU Info format.  You can a
 download it in any of several formats at the URL given earlier in this
 file.
 
-************************************************************
-
 IMPORTANT:
 
 Bug or error reports should be sent to http://bugs.mysql.com.

-- 
MySQL Code Commits Mailing List
For list archives: http://lists.mysql.com/commits
To unsubscribe:    http://lists.mysql.com/commits?unsub=commits@bugs.mysql.com