Bug #23044 Warnings on flush of a log table
Submitted: 6 Oct 2006 12:10 Modified: 2 Aug 2007 19:20
Reporter: Petr Chardin
Status: Closed
Category:Server: Logging Severity:S3 (Non-critical)
Version:5.1 OS:Linux (Linux)
Assigned to: Marc Alff Target Version:

[6 Oct 2006 12:10] Petr Chardin
Description:
mysqld issues warning when one attempts to flush a log table
See sample below for details

How to repeat:
mysql> flush table mysql.general_log;
Query OK, 0 rows affected, 1 warning (0.01 sec)

mysql> show warnings;
+-------+------+----------------------------------------------------------------+
| Level | Code | Message                                                        |
+-------+------+----------------------------------------------------------------+
| Error | 1542 | You can't write-lock a log table. Only read access is possible | 
+-------+------+----------------------------------------------------------------+
1 row in set (0.00 sec)
[6 Oct 2006 19:45] Miguel Solorzano
Thank you for the bug report.

mysql> flush table mysql.general_log;
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> show warnings;
+-------+------+----------------------------------------------------------------+
| Level | Code | Message                                                        |
+-------+------+----------------------------------------------------------------+
| Error | 1542 | You can't write-lock a log table. Only read access is possible | 
+-------+------+----------------------------------------------------------------+
1 row in set (0.00 sec)
[7 Dec 2006 13:30] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/16578

ChangeSet@1.2373, 2006-12-07 16:45:45+03:00, petr@outpost.site +3 -0
  Fix Bug #23044 Warnings on flush of a log table
[24 Jul 2007 4:39] Marc Alff
Fixed by bug#25422
[27 Jul 2007 20:40] Marc Alff
Fixed by Bug#25422
[27 Jul 2007 21:09] Marc Alff
Pushed into 5.1-runtime with Bug#25422
[2 Aug 2007 1:30] Konstantin Osipov
Pushed into 5.1.21
[2 Aug 2007 19:20] Paul DuBois
Noted in 5.1.21 changelog.

Log table locking was redesigned, eliminating several
lock-related problems:
  - Truncating mysql.slow_log in a stored procedure
    after use of a cursor caused the thread to lock.
    (Bug #17876) 
  - Flushing a log table resulted in warnings.
    (Bug #23044)
  - The server would hang when performing concurrent
    ALTER TABLE or TRUNCATE TABLE statements against the 
    log tables. (Bug #25422) 
  - Changing the value of the general_log system
    variable while a global read lock was in place
    resulted in deadlock. (Bug #29129)