Bug #6952 Traditional: doesn't reject invalid system variable values
Submitted: 2 Dec 2004 16:59 Modified: 22 Jan 2007 23:46
Reporter: Trudy Pelzer Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.3-alpha-debug/5.0.21-BK OS:Linux (SuSE 9.1)
Assigned to: CPU Architecture:Any

[2 Dec 2004 16:59] Trudy Pelzer
Description:
Under sql_mode='traditional', all out of range values should be 
rejected. But if I set a system variable to an out of range value, 
there is no error or even warning returned. 

How to repeat:
mysql> set sql_mode='traditional'; 
 
mysql> set max_error_count=100000; 
Query OK, 0 rows affected (0.00 sec) 
-- This should fail with SQLSTATE 22003 Out of range value ... 
 
mysql> select @@max_error_count; 
+-------------------+ 
| @@max_error_count | 
+-------------------+ 
|             65535 | 
+-------------------+ 
-- Silent change made, which shouldn't happen under 'traditional' mode. 
 
mysql> set sql_mode=''; 
 
mysql> set max_error_count=200000; 
Query OK, 0 rows affected (0.00 sec) 
-- We should at least return an "out of range" warning here.
[2 Dec 2004 17:11] MySQL Verification Team
Thank you for the bug report.
[24 Aug 2005 11:19] Georg Richter
related bugs:
 #10516, #11780
[4 Oct 2005 13:25] Mark Matthews
Reverify please.
[4 Oct 2005 13:50] MySQL Verification Team
Still happens:

miguel@hegel:~/dbs/5.0> bin/mysql -uroot test
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.0.15-rc-debug

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

mysql> set sql_mode='traditional'; 
Query OK, 0 rows affected (0.01 sec)

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

mysql> select @@max_error_count; 
+-------------------+
| @@max_error_count |
+-------------------+
|             65535 |
+-------------------+
1 row in set (0.00 sec)

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

mysql>
[10 Apr 2006 15:59] Valeriy Kravchuk
The bug is still present in the latest 5.0.21-BK:

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3 to server version: 5.0.21

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

mysql> set sql_mode='traditional';
Query OK, 0 rows affected (0.00 sec)

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

mysql> select @@max_error_count;
+-------------------+
| @@max_error_count |
+-------------------+
| 65535             |
+-------------------+
1 row in set (0.00 sec)