| Bug #45998 | database crashes when running "create as select" (innodb table) | ||
|---|---|---|---|
| Submitted: | 7 Jul 2009 11:45 | Modified: | 19 Dec 2009 1:11 |
| Reporter: | zohar aharoni | ||
| Status: | Closed | ||
| Category: | Server: General | Severity: | S1 (Critical) |
| Version: | 5.1.33, 5.1.37 | OS: | Linux (CentOS release 5.2) |
| Assigned to: | Ramil Kalimullin | Target Version: | 5.1+ |
| Tags: | 5.1.33, crash, create as select | ||
| Triage: | Triaged: D1 (Critical) | ||
[7 Jul 2009 11:45]
zohar aharoni
[7 Jul 2009 12:14]
Shane Bester
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 12:16]
Shane Bester
stack trace from valgrind for 5.1.37.
Attachment: bug45998_5.1.37_stack_trace.txt (text/plain), 1.63 KiB.
[7 Jul 2009 12: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 11: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 9: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 17: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 21: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 22: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 20: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 7: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 9: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 15: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 12: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 18:24]
Paul DuBois
The 5.4 fix has been pushed to 5.4.2.
[13 Oct 2009 20: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)
[14 Oct 2009 1:30]
Paul DuBois
Already fixed in 5.1.38.
[22 Oct 2009 8: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 9: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 21:53]
Paul DuBois
Noted in 5.5.0, 6.0.14 changelogs.
[18 Dec 2009 11: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 11: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 12: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 12: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)
