diff options
author | unknown <petr/cps@mysql.com/owlet.> | 2006-08-03 17:23:37 +0400 |
---|---|---|
committer | unknown <petr/cps@mysql.com/owlet.> | 2006-08-03 17:23:37 +0400 |
commit | e1ec4de43f3fd812acee1f7c197cd73c929f7675 (patch) | |
tree | 65a1eea7379d7090abe7c64d739ce545fdcc4170 /mysql-test/r/log_tables.result | |
parent | ad73be2eb754a348099d51f4315f9a7b1d638e6f (diff) | |
download | mariadb-git-e1ec4de43f3fd812acee1f7c197cd73c929f7675.tar.gz |
Fix Bug #20139 Infinite loop after "FLUSH" and "LOCK tabX, general_log"
Due to incorrect handling of FLUSH TABLES, log tables were marked for flush,
but not reopened. Later we started to wait for the log table to be closed
(disabled) after the flush. And as nobody disabled logs in concurrent treads,
the command lasted forever.
After internal consultations it was decided to skip logs during FLUSH TABLES.
The reasoning is that logging is done in the "log device", whatever it is
which is always active and controlled by FLUSH LOGS. So, to flush logs
one should use FLUSH LOGS, and not FLUSH TABLES.
mysql-test/r/log_tables.result:
update result file
mysql-test/t/log_tables.test:
add a test for the bug
sql/sql_base.cc:
Skip log tables during FLUSH TABLES
Diffstat (limited to 'mysql-test/r/log_tables.result')
-rw-r--r-- | mysql-test/r/log_tables.result | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mysql-test/r/log_tables.result b/mysql-test/r/log_tables.result index c61dd2247ee..c817c2752a0 100644 --- a/mysql-test/r/log_tables.result +++ b/mysql-test/r/log_tables.result @@ -72,3 +72,8 @@ sleep(2) select * from mysql.slow_log; start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text TIMESTAMP USER_HOST QUERY_TIME 00:00:00 1 0 test 0 0 1 select sleep(2) +flush tables with read lock; +unlock tables; +use mysql; +lock tables general_log read local, help_category read local; +unlock tables; |