List:Commits« Previous MessageNext Message »
From:ingo Date:May 31 2006 9:19pm
Subject:bk commit into 5.0 tree (ingo:1.2157)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of istruewing. When istruewing does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2157 06/05/31 23:19:21 ingo@stripped +2 -0
  Merge bk-internal.mysql.com:/home/bk/mysql-5.0-engines
  into  mysql.com:/nfstmp1/ingo/mysql-5.0-bug17332

  mysql-test/t/lock_multi.test
    1.15 06/05/31 23:19:15 ingo@stripped +0 -2
    Manual merge not to be pushed

  mysql-test/r/lock_multi.result
    1.17 06/05/31 23:19:15 ingo@stripped +0 -0
    Manual merge not to be pushed

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	ingo
# Host:	sles9-x86.mysql.com
# Root:	/nfstmp1/ingo/mysql-5.0-bug17332/RESYNC

--- 1.16/mysql-test/r/lock_multi.result	2006-05-24 16:21:32 +02:00
+++ 1.17/mysql-test/r/lock_multi.result	2006-05-31 23:19:15 +02:00
@@ -43,6 +43,14 @@
 a	int(11)	YES		NULL	
 unlock tables;
 drop table t1;
+CREATE DATABASE mysqltest_1;
+FLUSH TABLES WITH READ LOCK;
+ DROP DATABASE mysqltest_1;
+DROP DATABASE mysqltest_1;
+ERROR HY000: Can't execute the query because you have a conflicting read lock
+UNLOCK TABLES;
+DROP DATABASE mysqltest_1;
+ERROR HY000: Can't drop database 'mysqltest_1'; database doesn't exist
 use mysql;
 LOCK TABLES columns_priv WRITE, db WRITE, host WRITE, user WRITE;
 FLUSH TABLES;

--- 1.14/mysql-test/t/lock_multi.test	2006-05-24 16:21:32 +02:00
+++ 1.15/mysql-test/t/lock_multi.test	2006-05-31 23:19:15 +02:00
@@ -109,6 +109,39 @@
 drop table t1;
 
 #
+# Bug#19815 - CREATE/RENAME/DROP DATABASE can deadlock on a global read lock
+#
+connect (con1,localhost,root,,);
+connect (con2,localhost,root,,);
+#
+connection con1;
+CREATE DATABASE mysqltest_1;
+FLUSH TABLES WITH READ LOCK;
+#
+# With bug in place: acquire LOCK_mysql_create_table and
+# wait in wait_if_global_read_lock().
+connection con2;
+send DROP DATABASE mysqltest_1;
+--sleep 1
+#
+# With bug in place: try to acquire LOCK_mysql_create_table...
+# When fixed: Reject dropping db because of the read lock.
+connection con1;
+--error ER_CANT_UPDATE_WITH_READLOCK
+DROP DATABASE mysqltest_1;
+UNLOCK TABLES;
+#
+connection con2;
+reap;
+#
+connection default;
+disconnect con1;
+disconnect con2;
+# This must have been dropped by connection 2 already,
+# which waited until the global read lock was released.
+--error ER_DB_DROP_EXISTS
+DROP DATABASE mysqltest_1;
+
 # Bug#16986 - Deadlock condition with MyISAM tables
 #
 connection locker;
Thread
bk commit into 5.0 tree (ingo:1.2157)ingo31 May