List:Internals« Previous MessageNext Message »
From:Sergei Golubchik Date:October 8 2005 12:46pm
Subject:bk commit into 4.1 tree (serg:1.2453) BUG#10942
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of serg. When serg 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.2453 05/10/08 14:46:04 serg@stripped +3 -0
  Bug #10942 "deadlock with FLUSH TABLES WITH READ LOCK + STOP SLAVE"
  don't allow STOP SLAVE if global read lock is in taken

  sql/sql_parse.cc
    1.469 05/10/08 14:45:49 serg@stripped +1 -1
    Bug #10942 "deadlock with FLUSH TABLES WITH READ LOCK + STOP SLAVE"
    don't allow STOP SLAVE if global read lock is in taken

  mysql-test/t/rpl_flush_tables.test
    1.8 05/10/08 14:45:49 serg@stripped +10 -0
    Bug #10942 "deadlock with FLUSH TABLES WITH READ LOCK + STOP SLAVE"
    don't allow STOP SLAVE if global read lock is in taken

  mysql-test/r/rpl_flush_tables.result
    1.6 05/10/08 14:45:49 serg@stripped +6 -0
    Bug #10942 "deadlock with FLUSH TABLES WITH READ LOCK + STOP SLAVE"
    don't allow STOP SLAVE if global read lock is in taken

# 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:	serg
# Host:	serg.mylan
# Root:	/usr/home/serg/Abk/mysql-4.1

--- 1.468/sql/sql_parse.cc	Tue Sep 20 09:50:07 2005
+++ 1.469/sql/sql_parse.cc	Sat Oct  8 14:45:49 2005
@@ -2601,7 +2601,7 @@ unsent_create_error:
     To prevent that, refuse SLAVE STOP if the
     client thread has locked tables
   */
-  if (thd->locked_tables || thd->active_transaction())
+  if (thd->locked_tables || thd->active_transaction() || thd->global_read_lock)
   {
     send_error(thd,ER_LOCK_OR_ACTIVE_TRANSACTION);
     break;

--- 1.5/mysql-test/r/rpl_flush_tables.result	Sat Mar 20 11:31:15 2004
+++ 1.6/mysql-test/r/rpl_flush_tables.result	Sat Oct  8 14:45:49 2005
@@ -38,3 +38,9 @@ master-bin.000001	461	Query	1	461	use `t
 master-bin.000001	527	Query	1	527	use `test`; flush tables
 select * from t3;
 a
+stop slave;
+drop table t1;
+flush tables with read lock;
+start slave;
+stop slave;
+ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction

--- 1.7/mysql-test/t/rpl_flush_tables.test	Thu Aug  4 02:38:52 2005
+++ 1.8/mysql-test/t/rpl_flush_tables.test	Sat Oct  8 14:45:49 2005
@@ -37,4 +37,14 @@ select * from t3;
 # Note that all this confusion may cause warnings 'table xx is open on rename'
 # in the .err files; these are not fatal and are not reported by mysql-test-run.
 
+stop slave;
+connection master;
+drop table t1;
+connection slave;
+flush tables with read lock;
+start slave;
+sleep 1;
+--error 1192
+stop slave;
+
 # End of 4.1 tests
Thread
bk commit into 4.1 tree (serg:1.2453) BUG#10942Sergei Golubchik9 Oct