Bug #17827 cluster: rename of several tables in one statement, gets multiply logged
Submitted: 1 Mar 2006 16:14 Modified: 9 Mar 2006 3:51
Reporter: Tomas Ulin
Status: Closed
Category:Server: Cluster Severity:S2 (Serious)
Version:5.1.7-> OS:
Assigned to: Tomas Ulin Target Version:

[1 Mar 2006 16:14] Tomas Ulin
Description:
see below

How to repeat:
 create table t1 (a int key) engine=ndb;
 create table t1 (a int key) engine=ndb;
 create table t1 (a int key) engine=ndb;
 rename table t3 to t4, t2 to t3, t1 to t2, t4 to t1;

on a second master, show binlog events:

| master-bin1.000001 |  629 | Query       |       102 |         743 | use `test`; rename
table t3 to t4, t2 to t3, t1 to t2, t4 to t1 |
| master-bin1.000001 |  743 | Query       |       102 |         807 | BEGIN              
                                            |
| master-bin1.000001 |  807 | Table_map   |       102 |          53 |
cluster.apply_status                                            |
| master-bin1.000001 |  860 | Write_rows  |       102 |          95 |                    
                                            |
| master-bin1.000001 |  902 | Query       |       102 |         967 | COMMIT             
                                            |
| master-bin1.000001 |  967 | Query       |       102 |        1081 | use `test`; rename
table t3 to t4, t2 to t3, t1 to t2, t4 to t1 |
| master-bin1.000001 | 1081 | Query       |       102 |        1145 | BEGIN              
                                            |
| master-bin1.000001 | 1145 | Table_map   |       102 |          53 |
cluster.apply_status                                            |
| master-bin1.000001 | 1198 | Write_rows  |       102 |          95 |                    
                                            |
| master-bin1.000001 | 1240 | Query       |       102 |        1305 | COMMIT             
                                            |
| master-bin1.000001 | 1305 | Query       |       102 |        1419 | use `test`; rename
table t3 to t4, t2 to t3, t1 to t2, t4 to t1 |
| master-bin1.000001 | 1419 | Query       |       102 |        1533 | use `test`; rename
table t3 to t4, t2 to t3, t1 to t2, t4 to t1 |
[1 Mar 2006 17:29] 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/3341
[8 Mar 2006 16:30] Tomas Ulin
pushed to 5.1.8
[9 Mar 2006 3:51] Jon Stephens
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

Documented bugfix in 5.1.8 changelog; closed.