Bug #30639 | limit offset,rowcount wraps when rowcount >= 2^32 in windows | ||
---|---|---|---|
Submitted: | 26 Aug 2007 10:56 | Modified: | 22 Oct 2007 17:20 |
Reporter: | Shane Bester (Platinum Quality Contributor) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: General | Severity: | S1 (Critical) |
Version: | 5.0.46 | OS: | Windows |
Assigned to: | Georgi Kodinov | CPU Architecture: | Any |
[26 Aug 2007 10:56]
Shane Bester
[31 Aug 2007 8:01]
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/commits/33513 ChangeSet@1.2583, 2007-08-31 10:59:21+03:00, gkodinov@magare.gmz +4 -0 Bug #30639: limit offset,rowcount wraps when rowcount >= 2^32 in windows The parser uses ulonglong to store the LIMIT number. This number then is stored into a variable of type ha_rows. ha_rows is either 4 or 8 byte depending on the BIG_TABLES define from config.h So an overflow may occur (and LIMIT becomes zero) while storing an ulonglong value in ha_rows. Fixed by : 1. Using the maximum possible value for ha_rows on overflow 2. Defining BIG_TABLES for the windows builds (to match the others)
[19 Sep 2007 14:48]
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/commits/34405 ChangeSet@1.2583, 2007-09-19 17:47:52+03:00, gkodinov@magare.gmz +4 -0 Bug #30639: limit offset,rowcount wraps when rowcount >= 2^32 in windows The parser uses ulonglong to store the LIMIT number. This number then is stored into a variable of type ha_rows. ha_rows is either 4 or 8 byte depending on the BIG_TABLES define from config.h So an overflow may occur (and LIMIT becomes zero) while storing an ulonglong value in ha_rows. Fixed by : 1. Using the maximum possible value for ha_rows on overflow 2. Defining BIG_TABLES for the windows builds (to match the others)
[24 Sep 2007 8:35]
Bugs System
Pushed into 5.1.23-beta
[22 Oct 2007 17:20]
Paul DuBois
Noted in 5.1.23 changelog. On Windows, LIMIT arguments greater than 2^32 did not work correctly.