Bug #82807 "set persist general_log=1" does not resume on restart.
| Submitted: | 31 Aug 2016 5:23 | Modified: | 4 Oct 2016 22:43 |
|---|---|---|---|
| Reporter: | Giuseppe Maxia (OCA) | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server: Options | Severity: | S2 (Serious) |
| Version: | 8.0.0, 8.0.1 | OS: | Ubuntu |
| Assigned to: | CPU Architecture: | Any |
[31 Aug 2016 6:08]
MySQL Verification Team
Hello Giuseppe, Thank you for the report. Verified as described with the 8.0 daily build. Thanks, Umesh
[31 Aug 2016 6:08]
MySQL Verification Team
--
rm -rf 82806
bin/mysqld --initialize-insecure --basedir=/export/umesh/server/binaries/Trunk/mysql-advanced-8.0 --datadir=/export/umesh/server/binaries/Trunk/mysql-advanced-8.0/82806 -v
bin/mysqld --basedir=/export/umesh/server/binaries/Trunk/mysql-advanced-8.0 --datadir=/export/umesh/server/binaries/Trunk/mysql-advanced-8.0/82806 --core-file --socket=/tmp/mysql_ushastry.sock --port=3306 --log-error=/export/umesh/server/binaries/Trunk/mysql-advanced-8.0/82806/log.err 2>&1 &
[umshastr@hod03]/export/umesh/server/binaries/Trunk/mysql-advanced-8.0: bin/mysql -uroot -S /tmp/mysql_ushastry.sock
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 8.0.1-dmr-enterprise-commercial-advanced MySQL Enterprise Server - Advanced Edition (Commercial)
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> set persist general_log=on;
Query OK, 0 rows affected (0.01 sec)
mysql> SYSTEM cat 82806/mysqld-auto.cnf
{ "mysql_server": {"general_log": "ON" } }
mysql>
mysql> show variables like 'general_log';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| general_log | ON |
+---------------+-------+
1 row in set (0.01 sec)
mysql> \q
Bye
[umshastr@hod03]/export/umesh/server/binaries/Trunk/mysql-advanced-8.0: bin/mysqladmin -uroot -S /tmp/mysql_ushastry.sock shutdown
[umshastr@hod03]/export/umesh/server/binaries/Trunk/mysql-advanced-8.0: bin/mysqld --basedir=/export/umesh/server/binaries/Trunk/mysql-advanced-8.0 --datadir=/export/umesh/server/binaries/Trunk/mysql-advanced-8.0/82806 --core-file --socket=/tmp/mysql_ushastry.sock --port=3306 --log-error=/export/umesh/server/binaries/Trunk/mysql-advanced-8.0/82806/log.err 2>&1 &
[umshastr@hod03]/export/umesh/server/binaries/Trunk/mysql-advanced-8.0: bin/mysql -uroot -S /tmp/mysql_ushastry.sock Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 8.0.1-dmr-enterprise-commercial-advanced MySQL Enterprise Server - Advanced Edition (Commercial)
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show variables like 'general_log';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| general_log | OFF |
+---------------+-------+
1 row in set (0.00 sec)
mysql> \q
Bye
[31 Aug 2016 6:19]
MySQL Verification Team
--P_S's variables_info table confirms the settings though mysql> SELECT VARIABLE_NAME FROM variables_info WHERE VARIABLE_SOURCE = 'PERSISTED' ORDER BY VARIABLE_NAME; +---------------+ | VARIABLE_NAME | +---------------+ | general_log | +---------------+ 1 row in set (0.00 sec)
[31 Aug 2016 6:23]
Giuseppe Maxia
True: the P_S table says that it's persisted, but the general log is not enabled.
[4 Oct 2016 22:43]
Paul DuBois
Posted by developer: Noted in 8.0.1 changelog. Using SET PERSIST with the global_log system variable was ineffective.
[5 Oct 2016 1:51]
Tsubasa Tanaka
> Using SET PERSIST with the global_log system variable was > ineffective. What's "global_log" ? A typo of "general_log" ?
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.051 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.
Description: This statement: set persist general_log=on; generates an entry in $DATADIR/mysqld-auto.cnf { "mysql_server": {"general_log": "ON" } } However, when we restart the server, the variable general_log is still 0. mysql [localhost] {msandbox} ((none)) > select @@general_log; +---------------+ | @@general_log | +---------------+ | 0 | +---------------+ 1 row in set (0.00 sec) If we manually change the JSON file contents as follows: { "mysql_server": {"general_log": "1" } } then the variable is enabled after a restart: mysql [localhost] {msandbox} ((none)) > select @@general_log; +---------------+ | @@general_log | +---------------+ | 1 | +---------------+ 1 row in set (0.00 sec) How to repeat: see above