diff options
author | unknown <serg@serg.mylan> | 2005-10-08 16:56:10 +0200 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2005-10-08 16:56:10 +0200 |
commit | 3a97babbc28178038448819a5d6f3da9ef8731c3 (patch) | |
tree | 8a84f442fa411f8fc1df9bc0864085f24bc9c63a | |
parent | 0f60474f290683d2fc468c0081a1058f3f152c16 (diff) | |
parent | 51907576bd358fe8ffcf08ad490cc5ac95a0f385 (diff) | |
download | mariadb-git-3a97babbc28178038448819a5d6f3da9ef8731c3.tar.gz |
Merge serg.mylan:/usr/home/serg/Abk/mysql-4.1
into serg.mylan:/usr/home/serg/Abk/mysql-5.0
mysql-test/r/rpl_flush_tables.result:
Auto merged
mysql-test/t/rpl_flush_tables.test:
Auto merged
sql/sql_parse.cc:
Auto merged
-rw-r--r-- | mysql-test/r/rpl_flush_tables.result | 6 | ||||
-rw-r--r-- | mysql-test/t/rpl_flush_tables.test | 10 | ||||
-rw-r--r-- | sql/sql_parse.cc | 2 |
3 files changed, 17 insertions, 1 deletions
diff --git a/mysql-test/r/rpl_flush_tables.result b/mysql-test/r/rpl_flush_tables.result index ca2e77cac66..667530c4071 100644 --- a/mysql-test/r/rpl_flush_tables.result +++ b/mysql-test/r/rpl_flush_tables.result @@ -38,3 +38,9 @@ master-bin.000001 # Query 1 # use `test`; rename table t1 to t5, t2 to t1 master-bin.000001 # Query 1 # 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 diff --git a/mysql-test/t/rpl_flush_tables.test b/mysql-test/t/rpl_flush_tables.test index 4411d6ea1c9..92aef9c85d0 100644 --- a/mysql-test/t/rpl_flush_tables.test +++ b/mysql-test/t/rpl_flush_tables.test @@ -39,5 +39,15 @@ 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 # Adding comment for force manual merge 5.0 -> wl1012. Delete me if needed. diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 39aad216b40..cc5b931493b 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -2944,7 +2944,7 @@ end_with_restore_list: 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) { my_message(ER_LOCK_OR_ACTIVE_TRANSACTION, ER(ER_LOCK_OR_ACTIVE_TRANSACTION), MYF(0)); |