List:Commits« Previous MessageNext Message »
From:Jon Olav Hauglid Date:June 1 2011 11:52am
Subject:bzr commit into mysql-5.5 branch (jon.hauglid:3419) Bug#11853126
View as plain text  
#At file:///export/home/x/mysql-5.5-test/ based on revid:bjorn.munch@stripped

 3419 Jon Olav Hauglid	2011-06-01
      Bug#11853126 RE-ENABLE CONCURRENT READS WHILE CREATING
                   SECONDARY INDEX IN INNODB
      
      This is a follow-up patch.
      
      This patch moves part of the new test coverage to a test
      file that is only run on debug builds since it used debug-
      only features and therefore broke the test case on
      release builds.

    modified:
      mysql-test/r/innodb_mysql_lock.result
      mysql-test/r/innodb_mysql_sync.result
      mysql-test/t/innodb_mysql_lock.test
      mysql-test/t/innodb_mysql_sync.test
=== modified file 'mysql-test/r/innodb_mysql_lock.result'
--- a/mysql-test/r/innodb_mysql_lock.result	2011-06-01 08:06:55 +0000
+++ b/mysql-test/r/innodb_mysql_lock.result	2011-06-01 11:52:20 +0000
@@ -153,7 +153,6 @@ DROP VIEW v1;
 #              KEY NO 0 FOR TABLE IN ERROR LOG 
 #
 DROP TABLE IF EXISTS t1;
-# Test 1: Secondary index
 # Connection default
 CREATE TABLE t1 (id INT PRIMARY KEY, value INT) ENGINE = InnoDB;
 INSERT INTO t1 VALUES (1, 12345);
@@ -173,20 +172,3 @@ id	value
 1	12345
 COMMIT;
 DROP TABLE t1;
-# Test 2: Primary index
-CREATE TABLE t1(a INT NOT NULL, b INT NOT NULL) engine=innodb;
-INSERT INTO t1 VALUES (1, 12345), (2, 23456);
-# Connection con1
-SET SESSION debug= "+d,alter_table_rollback_new_index";
-ALTER TABLE t1 ADD PRIMARY KEY(a);
-ERROR HY000: Unknown error
-SELECT * FROM t1;
-a	b
-1	12345
-2	23456
-# Connection default
-SELECT * FROM t1;
-a	b
-1	12345
-2	23456
-DROP TABLE t1;

=== modified file 'mysql-test/r/innodb_mysql_sync.result'
--- a/mysql-test/r/innodb_mysql_sync.result	2011-06-01 08:06:55 +0000
+++ b/mysql-test/r/innodb_mysql_sync.result	2011-06-01 11:52:20 +0000
@@ -165,3 +165,24 @@ SET DEBUG_SYNC= "now SIGNAL query";
 # Reaping: ALTER TABLE t1 ADD UNIQUE (b)
 SET DEBUG_SYNC= "RESET";
 DROP TABLE t1;
+#
+# Bug#11853126 RE-ENABLE CONCURRENT READS WHILE CREATING SECONDARY INDEX
+#              IN INNODB
+#
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1(a INT NOT NULL, b INT NOT NULL) engine=innodb;
+INSERT INTO t1 VALUES (1, 12345), (2, 23456);
+# Connection con1
+SET SESSION debug= "+d,alter_table_rollback_new_index";
+ALTER TABLE t1 ADD PRIMARY KEY(a);
+ERROR HY000: Unknown error
+SELECT * FROM t1;
+a	b
+1	12345
+2	23456
+# Connection default
+SELECT * FROM t1;
+a	b
+1	12345
+2	23456
+DROP TABLE t1;

=== modified file 'mysql-test/t/innodb_mysql_lock.test'
--- a/mysql-test/t/innodb_mysql_lock.test	2011-06-01 08:06:55 +0000
+++ b/mysql-test/t/innodb_mysql_lock.test	2011-06-01 11:52:20 +0000
@@ -290,8 +290,6 @@ DROP TABLE IF EXISTS t1;
 
 --connect (con1,localhost,root)
 
---echo # Test 1: Secondary index
-
 --echo # Connection default
 connection default;
 CREATE TABLE t1 (id INT PRIMARY KEY, value INT) ENGINE = InnoDB;
@@ -314,22 +312,6 @@ ALTER TABLE t1 ADD INDEX idx(value);
 SELECT * FROM t1;
 COMMIT;
 DROP TABLE t1;
-
---echo # Test 2: Primary index
-CREATE TABLE t1(a INT NOT NULL, b INT NOT NULL) engine=innodb;
-INSERT INTO t1 VALUES (1, 12345), (2, 23456);
-
---echo # Connection con1
---connection con1
-SET SESSION debug= "+d,alter_table_rollback_new_index";
---error ER_UNKNOWN_ERROR
-ALTER TABLE t1 ADD PRIMARY KEY(a);
-SELECT * FROM t1;
-
---echo # Connection default
---connection default
-SELECT * FROM t1;
-DROP TABLE t1;
 disconnect con1;
 
 

=== modified file 'mysql-test/t/innodb_mysql_sync.test'
--- a/mysql-test/t/innodb_mysql_sync.test	2011-06-01 08:06:55 +0000
+++ b/mysql-test/t/innodb_mysql_sync.test	2011-06-01 11:52:20 +0000
@@ -2,6 +2,7 @@
 # Test file for InnoDB tests that require the debug sync facility
 #
 --source include/have_innodb.inc
+--source include/have_debug.inc
 --source include/have_debug_sync.inc
 # Save the initial number of concurrent sessions.
 --source include/count_sessions.inc
@@ -277,6 +278,32 @@ SET DEBUG_SYNC= "RESET";
 DROP TABLE t1;
 
 
+--echo #
+--echo # Bug#11853126 RE-ENABLE CONCURRENT READS WHILE CREATING SECONDARY INDEX
+--echo #              IN INNODB
+--echo #
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+CREATE TABLE t1(a INT NOT NULL, b INT NOT NULL) engine=innodb;
+INSERT INTO t1 VALUES (1, 12345), (2, 23456);
+
+--echo # Connection con1
+--connect (con1,localhost,root)
+SET SESSION debug= "+d,alter_table_rollback_new_index";
+--error ER_UNKNOWN_ERROR
+ALTER TABLE t1 ADD PRIMARY KEY(a);
+SELECT * FROM t1;
+
+--echo # Connection default
+--connection default
+SELECT * FROM t1;
+DROP TABLE t1;
+disconnect con1;
+
+
 # Check that all connections opened by test cases in this file are really
 # gone so execution of other tests won't be affected by their presence.
 --source include/wait_until_count_sessions.inc


Attachment: [text/bzr-bundle] bzr/jon.hauglid@oracle.com-20110601115220-wqttj5mtqp8lgw23.bundle
Thread
bzr commit into mysql-5.5 branch (jon.hauglid:3419) Bug#11853126Jon Olav Hauglid1 Jun