Bug #45998 | database crashes when running "create as select" (innodb table) | ||
---|---|---|---|
Submitted: | 7 Jul 2009 9:45 | Modified: | 19 Dec 2009 0:11 |
Reporter: | zohar aharoni | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: General | Severity: | S1 (Critical) |
Version: | 5.1.33, 5.1.37 | OS: | Linux (CentOS release 5.2) |
Assigned to: | Ramil Kalimullin | CPU Architecture: | Any |
Tags: | 5.1.33, crash, create as select |
[7 Jul 2009 9:45]
zohar aharoni
[7 Jul 2009 10:14]
MySQL Verification Team
testcase: start server with --log-bin --binlog-format=row login without selecting a database: mysql -uroot drop table if exists test.t1,test.t2; create table test.t1(id int)engine=innodb; insert into test.t1 values (1),(2); create table test.t2 select * from test.t1;
[7 Jul 2009 10:16]
MySQL Verification Team
stack trace from valgrind for 5.1.37.
Attachment: bug45998_5.1.37_stack_trace.txt (text/plain), 1.62 KiB.
[7 Jul 2009 10:32]
Valeriy Kravchuk
Verified just as described by Shane with recent 5.1.37 from bzr on Linux. No crash without row-based logging.
[8 Jul 2009 9:09]
zohar aharoni
We are working in mixed mode. when transaction isolation level is repeatable read it is working fine, no crash (I guess it's because the statement it is logged as statement and not raw) when it is read committed than we get the crash...
[14 Jul 2009 7: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/78612 3022 Ramil Kalimullin 2009-07-14 Fix for bug#45998: database crashes when running "create as select" (innodb table) Problem: code constructing "CREATE TABLE..." statement doesn't take into account that current database is not set in some cases. That may lead to a server crash. Fix: check if current database is set. @ mysql-test/extra/binlog_tests/binlog.test Fix for bug#45998: database crashes when running "create as select" (innodb table) - test case. @ mysql-test/suite/binlog/r/binlog_row_binlog.result Fix for bug#45998: database crashes when running "create as select" (innodb table) - test result. @ sql/sql_show.cc Fix for bug#45998: database crashes when running "create as select" (innodb table) - added check if there's current database set.
[14 Jul 2009 15:17]
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/78653 3022 Ramil Kalimullin 2009-07-14 Fix for bug#45998: database crashes when running "create as select" (innodb table) Problem: code constructing "CREATE TABLE..." statement doesn't take into account that current database is not set in some cases. That may lead to a server crash. Fix: check if current database is set. @ mysql-test/extra/binlog_tests/binlog.test Fix for bug#45998: database crashes when running "create as select" (innodb table) - test case. @ mysql-test/suite/binlog/r/binlog_row_binlog.result Fix for bug#45998: database crashes when running "create as select" (innodb table) - test result. @ sql/sql_show.cc Fix for bug#45998: database crashes when running "create as select" (innodb table) - added check if there's current database set.
[4 Aug 2009 19:49]
Bugs System
Pushed into 5.4.4-alpha (revid:alik@sun.com-20090804194615-h40sa098mx4z49qg) (version source revid:ramil@mysql.com-20090715034451-rrv902ejf0keyzyk) (merge vers: 5.4.4-alpha) (pib:11)
[4 Aug 2009 20:45]
Bugs System
Pushed into 5.1.38 (revid:davi.arnaut@sun.com-20090804204317-ggodqkik7de6nfpz) (version source revid:davi.arnaut@sun.com-20090804204317-ggodqkik7de6nfpz) (merge vers: 5.1.38) (pib:11)
[1 Sep 2009 18:10]
Paul DuBois
Noted in 5.1.38, 5.4.4 changelogs. CREATE TABLE ... SELECT could cause a server crash if no default database was selected.
[1 Oct 2009 5:58]
Bugs System
Pushed into 5.1.39-ndb-6.3.28 (revid:jonas@mysql.com-20091001055605-ap2kiaarr7p40mmv) (version source revid:jonas@mysql.com-20091001055605-ap2kiaarr7p40mmv) (merge vers: 5.1.39-ndb-6.3.28) (pib:11)
[1 Oct 2009 7:25]
Bugs System
Pushed into 5.1.39-ndb-7.0.9 (revid:jonas@mysql.com-20091001072547-kv17uu06hfjhgjay) (version source revid:jonas@mysql.com-20091001071652-irejtnumzbpsbgk2) (merge vers: 5.1.39-ndb-7.0.9) (pib:11)
[1 Oct 2009 13:25]
Bugs System
Pushed into 5.1.39-ndb-7.1.0 (revid:jonas@mysql.com-20091001123013-g9ob2tsyctpw6zs0) (version source revid:jonas@mysql.com-20091001123013-g9ob2tsyctpw6zs0) (merge vers: 5.1.39-ndb-7.1.0) (pib:11)
[5 Oct 2009 10:50]
Bugs System
Pushed into 5.1.39-ndb-6.2.19 (revid:jonas@mysql.com-20091005103850-dwij2dojwpvf5hi6) (version source revid:jonas@mysql.com-20090930185117-bhud4ek1y0hsj1nv) (merge vers: 5.1.39-ndb-6.2.19) (pib:11)
[7 Oct 2009 16:24]
Paul DuBois
The 5.4 fix has been pushed to 5.4.2.
[13 Oct 2009 18:30]
Bugs System
Pushed into 5.1.41 (revid:build@mysql.com-20091013182142-vgsjky3t1v4btufv) (version source revid:build@mysql.com-20091013182142-vgsjky3t1v4btufv) (merge vers: 5.1.41) (pib:13)
[13 Oct 2009 23:30]
Paul DuBois
Already fixed in 5.1.38.
[22 Oct 2009 6:34]
Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20091022063126-l0qzirh9xyhp0bpc) (version source revid:alik@sun.com-20091019135554-s1pvptt6i750lfhv) (merge vers: 6.0.14-alpha) (pib:13)
[22 Oct 2009 7:07]
Bugs System
Pushed into 5.5.0-beta (revid:alik@sun.com-20091022060553-znkmxm0g0gm6ckvw) (version source revid:alik@sun.com-20091019131937-nchb8tjk88jpfjav) (merge vers: 5.5.0-beta) (pib:13)
[22 Oct 2009 19:53]
Paul DuBois
Noted in 5.5.0, 6.0.14 changelogs.
[18 Dec 2009 10:29]
Bugs System
Pushed into 5.1.41-ndb-7.1.0 (revid:jonas@mysql.com-20091218102229-64tk47xonu3dv6r6) (version source revid:jonas@mysql.com-20091218095730-26gwjidfsdw45dto) (merge vers: 5.1.41-ndb-7.1.0) (pib:15)
[18 Dec 2009 10:44]
Bugs System
Pushed into 5.1.41-ndb-6.2.19 (revid:jonas@mysql.com-20091218100224-vtzr0fahhsuhjsmt) (version source revid:jonas@mysql.com-20091217101452-qwzyaig50w74xmye) (merge vers: 5.1.41-ndb-6.2.19) (pib:15)
[18 Dec 2009 11:00]
Bugs System
Pushed into 5.1.41-ndb-6.3.31 (revid:jonas@mysql.com-20091218100616-75d9tek96o6ob6k0) (version source revid:jonas@mysql.com-20091217154335-290no45qdins5bwo) (merge vers: 5.1.41-ndb-6.3.31) (pib:15)
[18 Dec 2009 11:14]
Bugs System
Pushed into 5.1.41-ndb-7.0.11 (revid:jonas@mysql.com-20091218101303-ga32mrnr15jsa606) (version source revid:jonas@mysql.com-20091218064304-ezreonykd9f4kelk) (merge vers: 5.1.41-ndb-7.0.11) (pib:15)