Bug #33065 | Mysql not writing general query logs after sending SIGHUP | ||
---|---|---|---|
Submitted: | 7 Dec 2007 15:58 | Modified: | 17 Mar 2008 20:09 |
Reporter: | Laszlo KAROLYI | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 5.1.22-rc-log | OS: | FreeBSD |
Assigned to: | Alexander Nozdrin | CPU Architecture: | Any |
Tags: | general log sighup |
[7 Dec 2007 15:58]
Laszlo KAROLYI
[10 Dec 2007 14:47]
Susanne Ebrecht
Verified as described. my.cnf: ... log-output=FILE log=/var/db/mysql/my.log ... started with mysql_safe ... $ mysql -u myuser test mysql> Do some stuff like creating a table, inserting, updating, deleting some data # tail -f /var/db/mysql/my.log /usr/local/libexec/mysqld, Version: 5.1.22-rc-log (FreeBSD port: mysql-server-5.1.22). started with: Tcp port: 0 Unix socket: (null) Time Id Command Argument 071210 15:15:33 1 Connect miracee@localhost on miracee 1 Query show databases 1 Query show tables 1 Query select @@version_comment limit 1 071210 15:15:38 1 Query show tables 071210 15:16:18 1 Query create table t1(id serial, num integer, primary key(id)) 071210 15:16:53 1 Query insert into t1(num) values (1),(2),(3),(4),(5) 071210 15:17:03 1 Query delete from t1 where id=3 071210 15:17:13 1 Query update t1 set num=7 where id=2 071210 15:17:19 1 Query select * from t1 ... # kill -1PID FROM MYSQLD mysql> Do some stuff like creating a table, inserting, updating, deleting some data # tail -f /var/db/mysql/my.log /usr/local/libexec/mysqld, Version: 5.1.22-rc-log (FreeBSD port: mysql-server-5.1.22). started with: Tcp port: 3306 Unix socket: /tmp/mysql.sock Time Id Command Argument nothing else happens here, it doesn't matter what you do at the cli, nothing will be logged. To be sure, this is not a FreeBSD ports problem: The same occurs with self compiled 5.1.22-rc-debug-log.
[4 Jan 2008 16:30]
Susanne Ebrecht
Bug #33651 is set as duplicate of this bug here.
[14 Feb 2008 19:20]
Omer Barnir
triage: escalated by supprt
[21 Feb 2008 11:48]
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/42743 ChangeSet@1.2567, 2008-02-21 14:49:27+03:00, anozdrin@quad. +2 -0 Fix for Bug#33065: Mysql not writing general query logs after sending SIGHUP. There were two problems: - after some recent fix, the server started to crash after receiving SIGHUP. That happened because LEX of new THD-object was not properly initialized. - user-specified log options were ignored when logs were reopened. The fix is to 1) initialize LEX and 2) take user-specified options into account. There is no test case in this CS, because our test suite does not support sending SIGHUP to the server.
[21 Feb 2008 19:05]
Alexander Nozdrin
Pushed into 5.1-runtime.
[3 Mar 2008 18:18]
Bugs System
Pushed into 5.1.24-rc
[3 Mar 2008 18:18]
Bugs System
Pushed into 6.0.5-alpha
[17 Mar 2008 20:09]
Paul DuBois
Noted in 5.1.24, 6.0.5 changelogs. After receiving a SIGHUP signal, the server could crash, and user-specified log options were ignored when reopening the logs.
[31 Mar 2008 20:01]
Jon Stephens
Also documented in the 5.1.23-ndb-6.3.11 changelog.