Loading mysql-test/r/rpl_flush_tables.result +6 −0 Original line number Diff line number Diff line Loading @@ -38,3 +38,9 @@ master-bin.000001 461 Query 1 461 use `test`; rename table t1 to t5, t2 to t1 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 mysql-test/t/rpl_flush_tables.test +10 −0 Original line number Diff line number Diff line Loading @@ -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 sql/sql_parse.cc +1 −1 Original line number Diff line number Diff line Loading @@ -2601,7 +2601,7 @@ mysql_execute_command(THD *thd) 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; Loading Loading
mysql-test/r/rpl_flush_tables.result +6 −0 Original line number Diff line number Diff line Loading @@ -38,3 +38,9 @@ master-bin.000001 461 Query 1 461 use `test`; rename table t1 to t5, t2 to t1 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
mysql-test/t/rpl_flush_tables.test +10 −0 Original line number Diff line number Diff line Loading @@ -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
sql/sql_parse.cc +1 −1 Original line number Diff line number Diff line Loading @@ -2601,7 +2601,7 @@ mysql_execute_command(THD *thd) 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; Loading