Bug #6958 Negative arguments to integer options wrap around
Submitted: 2 Dec 2004 18:07 Modified: 22 Feb 2005 13:49
Reporter: Marko Mäkelä Email Updates:
Status: Closed Impact on me:
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.1, maybe all OS:Any (all)
Assigned to: Sergey Vojtovich CPU Architecture:Any

[2 Dec 2004 18:07] Marko Mäkelä
Negative integer arguments to SET VARIABLES are treated as positive ones, modulo 2^32,
e.g., -1 seems to be (2^32 - 1).

How to repeat:
set global innodb_autoextend_increment=-1;
show variables like 'innodb_autoextend_increment';
Notice that the variable has been set to its maximum limit.

Suggested fix:
Clip negative values to the minimum limit, and not the maximum.
[8 Feb 2005 19:26] Paul DuBois
This looks like a server bug to me.  I'm surprised at Marko's
comment that it's correct behavior.  I don't see how users would
view this wraparound behavior as correct or expected.

I am unassigning this from myself - not a doc bug.
[9 Feb 2005 8:27] Marko Mäkelä
Paul, I don't think that it is correct behavior. If I did, I would not have reported this bug in the first place. I did not assign this bug to you. Maybe the person who did should comment on this.
[18 Feb 2005 11:17] Sergey Vojtovich
Fixed in 4.1.11, ChangeSet 1.2180
Fixed in 5.0.3
[22 Feb 2005 13:49] Paul DuBois
Noted in 4.1.11, 5.0.3 changelogs.