List:Commits« Previous MessageNext Message »
From:Jon Olav Hauglid Date:February 13 2012 11:24am
Subject:bzr push into mysql-trunk branch (jon.hauglid:3887 to 3888) Bug#13417754
View as plain text  
 3888 Jon Olav Hauglid	2012-02-13
      Bug#13417754 ASSERT IN ROW_DROP_DATABASE_FOR_MYSQL DURING DROP SCHEMA
      
      Follow-up patch to fix test failure in create-big.test.
      
      The original patch changed the behavior for ALTER TABLE ... RENAME
      so that it now blocks if it can't acquire metadata lock on the
      target table (matching behavior of RENAME TABLE). Create-big.test
      tested for the old behavior where ALTER TABLE ... RENAME in such
      cases did not block but reported an error immediately instead.
      
      This patch fixes updates the create-big.test to match the new
      behavior.

    modified:
      mysql-test/r/create-big.result
      mysql-test/t/create-big.test
 3887 Rohit Kalhans	2012-02-13 [merge]
      merge from mysql-5.5->mysql-trunk

    modified:
      mysql-test/r/multi_update.result
      mysql-test/t/multi_update.test
=== modified file 'mysql-test/r/create-big.result'
--- a/mysql-test/r/create-big.result	2011-11-22 10:57:11 +0000
+++ b/mysql-test/r/create-big.result	2012-02-13 10:45:46 +0000
@@ -53,8 +53,8 @@ set debug_sync='create_table_select_befo
 create table t1 select 1 as i;;
 set debug_sync='now WAIT_FOR parked';
 alter table t3 rename to t1;
-ERROR 42S01: Table 't1' already exists
 set debug_sync='now SIGNAL go';
+ERROR 42S01: Table 't1' already exists
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
@@ -65,8 +65,8 @@ set debug_sync='create_table_select_befo
 create table t1 select 1 as i;;
 set debug_sync='now WAIT_FOR parked';
 alter table t3 rename to t1, add k int;
-ERROR 42S01: Table 't1' already exists
 set debug_sync='now SIGNAL go';
+ERROR 42S01: Table 't1' already exists
 show create table t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (

=== modified file 'mysql-test/t/create-big.test'
--- a/mysql-test/t/create-big.test	2011-11-22 10:57:11 +0000
+++ b/mysql-test/t/create-big.test	2012-02-13 10:45:46 +0000
@@ -132,11 +132,20 @@ set debug_sync='create_table_select_befo
 --send create table t1 select 1 as i;
 connection addconroot1;
 set debug_sync='now WAIT_FOR parked';
---error ER_TABLE_EXISTS_ERROR
-alter table t3 rename to t1;
+--send alter table t3 rename to t1
+connection addconroot2;
+# Wait until the above ALTER TABLE RENAME is blocked due to CREATE
+let $wait_condition=
+    select count(*) = 1 from information_schema.processlist
+    where state = "Waiting for table metadata lock" and
+          info = "alter table t3 rename to t1";
+--source include/wait_condition.inc
 set debug_sync='now SIGNAL go';
 connection default;
 --reap
+connection addconroot1;
+--error ER_TABLE_EXISTS_ERROR
+--reap
 connection default;
 show create table t1;
 drop table t1;
@@ -146,11 +155,21 @@ set debug_sync='create_table_select_befo
 --send create table t1 select 1 as i;
 connection addconroot1;
 set debug_sync='now WAIT_FOR parked';
---error ER_TABLE_EXISTS_ERROR
-alter table t3 rename to t1, add k int;
+--send alter table t3 rename to t1, add k int
+connection addconroot2;
+# Wait until the above ALTER TABLE RENAME is blocked due to CREATE
+let $wait_condition=
+    select count(*) = 1 from information_schema.processlist
+    where state = "Waiting for table metadata lock" and
+          info = "alter table t3 rename to t1, add k int";
+--source include/wait_condition.inc
 set debug_sync='now SIGNAL go';
 connection default;
 --reap
+connection addconroot1;
+--error ER_TABLE_EXISTS_ERROR
+--reap
+connection default;
 show create table t1;
 drop table t1,t3;
 

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (jon.hauglid:3887 to 3888) Bug#13417754Jon Olav Hauglid13 Feb