Bug #10339 Incorrect error is displayed if try to set value of internal ' warning_count '.
Submitted: 3 May 2005 15:43 Modified: 18 May 2005 17:37
Reporter: Disha Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.0.4-beta OS:Windows (Windows Server 2003)
Assigned to: Ramil Kalimullin CPU Architecture:Any

[3 May 2005 15:43] Disha
Description:
When we try to set the value of internal system variable 'warning_count' to some new value we are presented with an incorrect error about the variable not being GLOBAL or SESSION depending upon the scope of our SET statement.

How to repeat:
1. delimiter //
2. create database test//
3. use test//
4. set @@warning_count = 10//
5. Observe that the above query fails with the following error:
	ERROR 1229 (HY000): Variable 'warning_count' is a GLOBAL variable and  
             should be set with SET GLOBAL
6. set @@global.warning_count = 10//
7. Observe that the query in Step 6 fails with the following error message,
	ERROR 1228 (HY000): Variable 'warning_count' is a SESSION variable and 
             can't be used with SET GLOBAL

Expected Results: As 'warning_count' is an internal system variable that is read-
             only an appropriate error should be displayed when we try to SET its 
             value.

Actual Results  : Incorrect and misleading errors about the variable being 
             SESSION/GLOBAL variable is displayed.
[3 May 2005 16:04] MySQL Verification Team
Verified with 5.0.6 Bk source.
[13 May 2005 11:18] 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/internals/24854
[18 May 2005 11:14] Ramil Kalimullin
Fixed in 5.0.7.
[18 May 2005 17:37] Paul DuBois
Noted in 5.0.7 changelog.

Fix applies to error_count as well.