2816 Tor Didriksen 2009-09-14
Bug#47107
Add missing line in previous change set.
@ mysql-test/r/create.result
Bug#47107
Add missing line in previous change set.
modified:
mysql-test/r/create.result
2815 Jon Olav Hauglid 2009-09-14
Bug #47107 assert in notify_shared_lock on incorrect CREATE TABLE , HANDLER
Attempts to create a table (using CREATE TABLE, CREATE TABLE LIKE or
CREATE TABLE SELECT statements) which already existed and was opened
by the same connection through HANDLER statement, led to a stalled
connection (for production builds of the server) or to the server being
aborted due to an assertion failure (for debug builds of the server).
This problem was introduced by the new implementation of a metadata
locking subsystem and didn't affect earlier versions of the server.
The cause of the problem was that the HANDLER was not closed by CREATE TABLE
before CREATE tried to open and lock the table. Acquiring an exclusive MDL
lock on the table to be created would therefore fail since HANDLER
already had a shared MDL lock. This triggered an assert as the
HANDLER and CREATE statements came from the same thread (self-deadlock).
This patch resolves the issue by closing any open HANDLERs on tables
to be created by CREATE TABLE, similar to what is already done for
DROP and ALTER TABLE.
Test case added to create.test.
modified:
mysql-test/r/create.result
mysql-test/t/create.test
sql/sql_parse.cc
=== modified file 'mysql-test/r/create.result'
--- a/mysql-test/r/create.result 2009-09-14 07:43:08 +0000
+++ b/mysql-test/r/create.result 2009-09-14 10:38:24 +0000
@@ -1951,6 +1951,7 @@ DROP TABLE B;
#
# Bug #47107 assert in notify_shared_lock on incorrect
# CREATE TABLE , HANDLER
+#
DROP TABLE IF EXISTS t1;
CREATE TABLE t1(f1 integer);
# The following CREATE TABLEs before gave an assert.
Attachment: [text/bzr-bundle] bzr/tor.didriksen@sun.com-20090914103824-1lbcyj64g2w8a6lr.bundle
| Thread |
|---|
| • bzr push into mysql-5.4 branch (tor.didriksen:2815 to 2816) Bug#47107 | Tor Didriksen | 14 Sep |