Bug #33622 sql_* options cannot be set in options file
Submitted: 2 Jan 2008 12:33 Modified: 9 Jan 2008 16:36
Reporter: Martijn van den Burg Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.0.18 OS:Linux (RHEL 4, x86-64)
Assigned to: Peter Lavin CPU Architecture:Any

[2 Jan 2008 12:33] Martijn van den Burg
Description:
According to http://dev.mysql.com/doc/refman/5.0/en/mysqld-option-tables.html, the options 'sql_notes' and 'sql_warnings' can be set in the configuration file.

When I do so, mysqld refuses to start. 

I tried a number of syntaxes, with similar results, in the my.cnf I use with mysqld_multi. For example:

sql_warnings=0
sql_warnings=off
sql-warnings=0
sql-warnings=off

Each time mysqld refuses to start, complaining that it does not know the variable 'sql_warnings':

080102 13:30:09 [ERROR] /home/cadappl/mysql/5.0.18/mysql/bin/mysqld: unknown variable 'sql_warnings=0'

How to repeat:
- include 'sql_warnings=0' in my.cnf
- start server with this my.cnf
- check the errorlog and confirm the error
- remove 'sql_warnings=0' from my.cnf
- start server with this my.cnf
- confirm server is running normally

Suggested fix:
- enable sql_notes/sql_warnings as global variables (as well as session variables)

or

- update documentation
[2 Jan 2008 13:23] MySQL Verification Team
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://dev.mysql.com/doc/ and the instructions on
how to report a bug at http://bugs.mysql.com/how-to-report.php

c:\dbs>5.0\bin\mysql -uroot
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.0.56-nt Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> set sql_warnings=0;
Query OK, 0 rows affected (0.03 sec)

mysql> set sql_notes=0;
Query OK, 0 rows affected (0.00 sec)

mysql> show variables like "sql_warnings";
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| sql_warnings  | OFF   |
+---------------+-------+
1 row in set (0.05 sec)

mysql> show variables like "sql_notes";
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| sql_notes     | OFF   |
+---------------+-------+
1 row in set (0.00 sec)

mysql> set sql_warnings=1;
Query OK, 0 rows affected (0.00 sec)

mysql> show variables like "sql_warnings";
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| sql_warnings  | ON    |
+---------------+-------+
1 row in set (0.00 sec)

mysql>
[2 Jan 2008 13:27] MySQL Verification Team
Sorry indeed the Manual is wrong saying can be used in the configuration
file.
[9 Jan 2008 16:36] Peter Lavin
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.

The documentation also incorrectly indicated that this variable could be set from the command line. This has also been changed.