Bug #5135 cannot turn on log_warnings with SET in 4.1 (and 4.0)
Submitted: 21 Aug 2004 2:11 Modified: 23 Aug 2004 16:32
Reporter: Matthew Lord Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.0 OS:Any (all)
Assigned to: Bugs System CPU Architecture:Any

[21 Aug 2004 2:11] Matthew Lord
Description:
You cannot turn log_warnings on using the SET command like you can in 4.0.

I also didn't see it documented that it changed from ON/OFF in 4.0 to 1/0 or true/false in 4.1.

I tested this using mysql4.1.3 and 4.1.4-bk on x86 linux (2.4.21 #12 SMP) and 4.1.3 on windows 
2000.

How to repeat:
set global log_warnings = 0;
show global variables like "log_warnings";
set global log_warnings = 1;
show global variables like "log_warnings";

Suggested fix:
allow set log_warnings = true; to turn on log_warnings as it does in 4.0.
[23 Aug 2004 14:54] Per-Erik Martin
It's correct that the variable can't be set as described. However,  apparently it's
supposed to be an integer now.

The bug is also in 4.0:
- Upon first start, the value is 1.
- It can be set to 0.
- But after that, it remains 0, and can be set to anything else.

(Same as in 4.1)
[23 Aug 2004 15:44] Per-Erik Martin
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

Fixed in 4.0.
[23 Aug 2004 16:32] Matthew Lord
OK,

I will build from bk later this week and test it.  

I had *no* problems with 4.0.20.  I was able to set it to ON and OFF and back again without any
problems.

root@localhost:(none)~> select version();
+----------------+
| version()      |
+----------------+
| 4.0.20-max-log |
+----------------+
1 row in set (0.03 sec)

root@localhost:(none)~> show global variables like "log_war%";
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| log_warnings  | ON    |
+---------------+-------+
1 row in set (0.00 sec)

root@localhost:(none)~> set global log_warnings=OFF;
Query OK, 0 rows affected (0.02 sec)

root@localhost:(none)~> show global variables like "log_war%";
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| log_warnings  | OFF   |
+---------------+-------+
1 row in set (0.00 sec)

root@localhost:(none)~> set global log_warnings=ON;
Query OK, 0 rows affected (0.00 sec)

root@localhost:(none)~> show global variables like "log_war%";
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| log_warnings  | ON    |
+---------------+-------+
1 row in set (0.00 sec)

Best Regards
[24 Aug 2004 10:57] Per-Erik Martin
log_warning was changed into an integer value in 4.0 on June 1st.