Bug #11185 | index on unsigned bigint modifies result | ||
---|---|---|---|
Submitted: | 8 Jun 2005 20:26 | Modified: | 24 Jun 2005 17:19 |
Reporter: | Martin Friebe (Gold Quality Contributor) (OCA) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Optimizer | Severity: | S2 (Serious) |
Version: | 4.1.12 | OS: | *, freebsd |
Assigned to: | Timour Katchaounov | CPU Architecture: | Any |
[8 Jun 2005 20:26]
Martin Friebe
[8 Jun 2005 20:37]
MySQL Verification Team
Verified on Fedora Core 3 with BK source 4.1. Thank you for the bug report.
[8 Jun 2005 22:04]
Patrick Galbraith
Please see bug 9088 http://bugs.mysql.com/bug.php?id=9088. This problem is due to the fact that either quoting a value above 9223372036854775807 or using the "<>" operator forces this to be evaluated as a string, forcing the conversion of a string to a double, which then you cannot reliably compare two doubles. Anything above 9223372036854775807 should use numeric comparison operators, or, use DECIMAL instead of BIGINT (for 5.0.3 and above). Please see: http://dev.mysql.com/doc/mysql/en/numeric-type-overview.html With notes about DECIMAL
[9 Jun 2005 9:18]
Martin Friebe
I think it is different from http://bugs.mysql.com/bug.php?id=9088 It is not quoted, in any example, and even so the quote causes the number to be slightly off, not to become negative (http://bugs.mysql.com/bug.php?id=9840) with regards to the <> operator it fails also on not(a=-1), while a=-1 works fine.
[21 Jun 2005 17:47]
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/26259
[23 Jun 2005 7:57]
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/26353
[23 Jun 2005 9:09]
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/26355
[23 Jun 2005 20:42]
Timour Katchaounov
Pushed into 4.1.13 and 5.0.9.
[24 Jun 2005 6:57]
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/26393
[24 Jun 2005 17:19]
Mike Hillyer
Documented in 5.0.9 and 4.1.13 changelogs: <listitem><para>Optimizer performed range check when comparing unsigned integers to negative constants, could cause errors. (Bug #11185)</para></listitem>
[16 Jul 2005 7:30]
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/27211