• unknown's avatar
    Fix Bug #20139 Infinite loop after "FLUSH" and "LOCK tabX, general_log" · e1ec4de4
    unknown authored
    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
    e1ec4de4
sql_base.cc 198 KB