Bug #35583 | mysqlbinlog replay fails with ERROR 1146 when temp tables are used | ||
---|---|---|---|
Submitted: | 26 Mar 2008 19:01 | Modified: | 4 Feb 2009 11:40 |
Reporter: | Gerald Cavanaugh | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Replication | Severity: | S2 (Serious) |
Version: | 5.0.51a | OS: | Any (CentOS 5, FreeBSD) |
Assigned to: | Zhenxing He | CPU Architecture: | Any |
Tags: | mysqlbinlog, replay, table, temp, temporary |
[26 Mar 2008 19:01]
Gerald Cavanaugh
[27 Mar 2008 10:35]
Susanne Ebrecht
Verified as described: $ less etc/my.cnf [mysqld] port = 6850 socket = /tmp/mysql50bk.sock log-bin=mysql-bin [client] port = 6850 socket = /tmp/mysql50bk.sock 1st Shell: [mysql50bk]$ ./libexec/mysqld --defaults-file=/home/myhome/mysql50bk/etc/my.cnf & 2nd Shell: [mysql50bk]$ ./bin/mysql -u superuser mysql> create database bug35583; Query OK, 1 row affected (0.00 sec) mysql> \u bug35583 Database changed mysql> create table t(id serial, t varchar(255)) auto_increment=5; Query OK, 0 rows affected (0.01 sec) mysql> flush logs; Query OK, 0 rows affected (0.01 sec) mysql> create temporary table tempt like t;Query OK, 0 rows affected (0.01 sec) mysql> insert into tempt(t) values('abc'); Query OK, 1 row affected (0.00 sec) mysql> insert into t select id,t from tempt; Query OK, 1 row affected (0.00 sec) Records: 1 Duplicates: 0 Warnings: 0 mysql> flush logs; Query OK, 0 rows affected (0.01 sec) mysql> rename table t to t_old; Query OK, 0 rows affected (0.01 sec) mysql> create table t like t_old; Query OK, 0 rows affected (0.00 sec) back to 1st Shell: [mysql50bk]$ ./bin/mysqlbinlog var/mysql-bin.000002 | ./bin/mysql bug35583 ERROR 1146 (42S02) at line 23: Table 'bug35583.tempt' doesn't exist
[14 Dec 2008 18:59]
Oz Solomon
I found this bug after being seriously bitten by it today. Since the bug report is 9 months old I was just wondering if there is any progress wrt fixing it.
[15 Dec 2008 7:20]
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/61640 2636 He Zhenxing 2008-12-15 BUG#35583 mysqlbinlog replay fails with ERROR 1146 when temp tables are used When using CREATE TEMPORARY TABLE LIKE to create a temporary table, or using TRUNCATE to delete all rows of a temporary table, they did not set the tmp_table_used flag, and cause the omission of "SET @@session.pseudo_thread_id" when dumping binlog with mysqlbinlog, and cause error when replay the statements. This patch fixed the problem by setting tmp_table_used in these two cases.
[9 Jan 2009 7:11]
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/62765 2636 He Zhenxing 2009-01-09 BUG#35583 mysqlbinlog replay fails with ERROR 1146 when temp tables are used When using CREATE TEMPORARY TABLE LIKE to create a temporary table, or using TRUNCATE to delete all rows of a temporary table, they did not set the tmp_table_used flag, and cause the omission of "SET @@session.pseudo_thread_id" when dumping binlog with mysqlbinlog, and cause error when replay the statements. This patch fixed the problem by setting tmp_table_used in these two cases.
[9 Jan 2009 8:48]
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/62770 2636 He Zhenxing 2009-01-09 BUG#35583 mysqlbinlog replay fails with ERROR 1146 when temp tables are used When using CREATE TEMPORARY TABLE LIKE to create a temporary table, or using TRUNCATE to delete all rows of a temporary table, they did not set the tmp_table_used flag, and cause the omission of "SET @@session.pseudo_thread_id" when dumping binlog with mysqlbinlog, and cause error when replay the statements. This patch fixed the problem by setting tmp_table_used in these two cases.
[12 Jan 2009 3:58]
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/62952 2636 He Zhenxing 2009-01-12 BUG#35583 mysqlbinlog replay fails with ERROR 1146 when temp tables are used When using CREATE TEMPORARY TABLE LIKE to create a temporary table, or using TRUNCATE to delete all rows of a temporary table, they did not set the tmp_table_used flag, and cause the omission of "SET @@session.pseudo_thread_id" when dumping binlog with mysqlbinlog, and cause error when replay the statements. This patch fixed the problem by setting tmp_table_used in these two cases.
[15 Jan 2009 5:43]
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/63313 2732 He Zhenxing 2009-01-15 [merge] Merge BUG#35583 from 5.0 to 5.1-bugteam
[21 Jan 2009 9:57]
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/63672 2970 He Zhenxing 2009-01-21 [merge] Merge BUG#35583 from 5.1-bugteam to 6.0-bugteam
[21 Jan 2009 12:09]
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/63702 2749 He Zhenxing 2009-01-21 Post fix after merge BUG#35583
[21 Jan 2009 12:12]
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/63703 2971 He Zhenxing 2009-01-21 [merge] Merge post fix for BUG#35583 from 5.1-bugteam to 6.0-bugteam
[28 Jan 2009 14:35]
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/64302 2749 Alfranio Correia 2009-01-28 BUG#35583 mysqlbinlog replay fails with ERROR 1146 when temp tables are used When using CREATE TEMPORARY TABLE LIKE to create a temporary table, or using TRUNCATE to delete all rows of a temporary table, they did not set the tmp_table_used flag, and cause the omission of "SET @@session.pseudo_thread_id" when dumping binlog with mysqlbinlog, and cause error when replay the statements. This patch fixed the problem by setting tmp_table_used in these two cases. (Done by He Zhenxing 2009-01-12)
[28 Jan 2009 17:31]
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/64361 2983 Alfranio Correia 2009-01-28 [merge] Merge BUG#35583 from 5.1-bugteam to 6.0-bugteam (Done by He Zhenxing 2009-01-12)
[31 Jan 2009 19:44]
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/64740 2767 Luis Soares 2009-01-31 BUG#35583: mysqlbinlog replay fails with ERROR 1146 when temp tables are used The test case proposed by the bugfix fails in bugteam trees after merging new mtr from main. The failure is due to the fact that the binlog file location has changed and is no more under $MYSQLTEST_VARDIR/log. This patch fixes the test failure by setting the correct path to the binlog file.
[3 Feb 2009 9:41]
Bugs System
Pushed into 5.1.32 (revid:joro@sun.com-20090203090549-gos3v4320vimrzg6) (version source revid:azundris@mysql.com-20090202131035-zuf2kdg8u8r177fi) (merge vers: 5.1.32) (pib:6)
[3 Feb 2009 14:02]
Jon Stephens
Documented bugfix in the 5.1.32 changelog as follows: mysqlbinlog replay of CREATE TEMPORARY TABLE LIKE statements and of TRUNCATE statements used on temporary tables failed with Error 1146 (Table ... doesn't exist). Set status to NDI pending push to 6.0 tree.
[4 Feb 2009 11:17]
Bugs System
Pushed into 6.0.10-alpha (revid:kostja@sun.com-20090204104420-mw1i2u9lum4bxjo6) (version source revid:luis.soares@sun.com-20090131214944-6iw4khdxmohwdyze) (merge vers: 6.0.10-alpha) (pib:6)
[4 Feb 2009 11:40]
Jon Stephens
Fix also documented in the 6.0.10 changelog. Closed.
[4 Feb 2009 13:53]
Oz Solomon
Is there any plan to fix this for 5.0? I'm sure that most people affected by this bug are still on 5.0.
[4 Feb 2009 14:11]
Lars Thalmann
This is not planned for 5.0, since 5.1 is GA and there are no open support issues on this bug.
[17 Feb 2009 14:59]
Bugs System
Pushed into 5.1.32-ndb-6.3.23 (revid:tomas.ulin@sun.com-20090217131017-6u8qz1edkjfiobef) (version source revid:tomas.ulin@sun.com-20090203133556-9rclp06ol19bmzs4) (merge vers: 5.1.32-ndb-6.3.22) (pib:6)
[17 Feb 2009 16:47]
Bugs System
Pushed into 5.1.32-ndb-6.4.3 (revid:tomas.ulin@sun.com-20090217134419-5ha6xg4dpedrbmau) (version source revid:tomas.ulin@sun.com-20090203133556-9rclp06ol19bmzs4) (merge vers: 5.1.32-ndb-6.3.22) (pib:6)
[17 Feb 2009 18:23]
Bugs System
Pushed into 5.1.32-ndb-6.2.17 (revid:tomas.ulin@sun.com-20090217134216-5699eq74ws4oxa0j) (version source revid:tomas.ulin@sun.com-20090202111723-1zzwax187rtls913) (merge vers: 5.1.32-ndb-6.2.17) (pib:6)