From: Date: July 16 2008 2:53pm Subject: bzr push into mysql-6.0-falcon branch (john.embretsen:2751 to 2752) Bug#38039 List-Archive: http://lists.mysql.com/commits/49821 X-Bug: 38039 Message-Id: <20080716125303.3E48519C@fimafeng09.norway.sun.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 2752 John H. Embretsen 2008-07-16 Regression test for issue detected in first implementation of online add/drop index for Falcon, Bug#38039 (Assertion lockState == 0 failed in StorageTableShare::deleteTable SyncObject). Testing implicit online/offline behavior, i.e. no ONLINE or OFFLINE keyword is used. If online add/drop index is disabled, offline will be used instead. Hence, the test passes in the current falcon tree, and will pass if online add/drop index is re-enabled with an appropriate bugfix. The test will fail if the bug is not fixed when the feature is re-enabled (ONLINE is implicit when enabled in the Falcon code). added: mysql-test/suite/falcon/r/falcon_bug_38039.result mysql-test/suite/falcon/t/falcon_bug_38039.test 2751 Hakan Kuecuekyilmaz 2008-07-16 After merge fix. modified: .bzr-mysql/default.conf === added file 'mysql-test/suite/falcon/r/falcon_bug_38039.result' --- a/mysql-test/suite/falcon/r/falcon_bug_38039.result 1970-01-01 00:00:00 +0000 +++ b/mysql-test/suite/falcon/r/falcon_bug_38039.result 2008-07-16 12:40:47 +0000 @@ -0,0 +1,18 @@ +*** Bug #38039 *** +SET @@storage_engine = 'Falcon'; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (a_int INT) Engine = Falcon; +ALTER TABLE t1 ADD KEY (a_int); +SHOW INDEXES FROM t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_Comment +t1 1 a_int 1 a_int NULL 1 NULL NULL YES BTREE +ALTER TABLE t1 ADD KEY (a_int); +SHOW INDEXES FROM t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_Comment +t1 1 a_int 1 a_int NULL 1 NULL NULL YES BTREE +t1 1 a_int_2 1 a_int NULL 1 NULL NULL YES BTREE +ALTER TABLE t1 DROP KEY a_int; +SHOW INDEXES FROM t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_Comment +t1 1 a_int_2 1 a_int NULL 1 NULL NULL YES BTREE +DROP TABLE t1; === added file 'mysql-test/suite/falcon/t/falcon_bug_38039.test' --- a/mysql-test/suite/falcon/t/falcon_bug_38039.test 1970-01-01 00:00:00 +0000 +++ b/mysql-test/suite/falcon/t/falcon_bug_38039.test 2008-07-16 12:40:47 +0000 @@ -0,0 +1,43 @@ +--source include/have_falcon.inc + +# +# Bug #38039: Assertion lockState == 0 failed in StorageTableShare::deleteTable SyncObject +# + +--echo *** Bug #38039 *** + +# ----------------------------------------------------- # +# --- Initialisation --- # +# ----------------------------------------------------- # +let $engine = 'Falcon'; +eval SET @@storage_engine = $engine; + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +CREATE TABLE t1 (a_int INT) Engine = Falcon; + +# ----------------------------------------------------- # +# --- Test --- # +# ----------------------------------------------------- # + +## SHOW INDEXES is not required to reproduce the bug, but +## is included here to verify correct behavior. + +ALTER TABLE t1 ADD KEY (a_int); +SHOW INDEXES FROM t1; + +ALTER TABLE t1 ADD KEY (a_int); +SHOW INDEXES FROM t1; + +ALTER TABLE t1 DROP KEY a_int; +SHOW INDEXES FROM t1; + +DROP TABLE t1; + +# ----------------------------------------------------- # +# --- Final cleanup --- # +# ----------------------------------------------------- # + +## None, DROP TABLE is part of the test.