Bug #37256 | SELECT alternately returns correct results and no results | ||
---|---|---|---|
Submitted: | 6 Jun 2008 22:54 | Modified: | 11 Jul 2008 22:41 |
Reporter: | Tim Faust | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Optimizer | Severity: | S2 (Serious) |
Version: | 6.0.3 | OS: | Windows (Vista Ultimate) |
Assigned to: | CPU Architecture: | Any | |
Tags: | inconsistent, results, SELECT |
[6 Jun 2008 22:54]
Tim Faust
[9 Jun 2008 14:42]
MySQL Verification Team
Thank you for the bug report. I can't repeat with server built from source server it returns all the times 22 rows.
[10 Jun 2008 15:43]
Tim Faust
OK, if I discover more info on this or I'll post it
[10 Jun 2008 16:34]
Tim Faust
This may be an optimzer problem? By adding IGNORE INDEX(TBL_COMPANY_IF1) (FK for PARENTCOMPANYID) to the SELECT, it effectively forces a table scan and it works correctly all the time. I am not an authority on the subject, but it seems that for a table with 30 rows in it, using an index (especially when I ask for a non-indexed field like NAME) is not cost effective. I realize my solution may impact performance on large tables, but wrong answers are no good either.
[11 Jun 2008 17:51]
MySQL Verification Team
i could repeat this problem on 6.0.4 on vista. every second resultset returned no result and every other returned 22 rows. it reminds me of bug #37337 if it's not repeatable on latest source, perhaps it's fixed already?
[11 Jun 2008 18:09]
Tim Faust
It may indeed be related. I'll try it again with 6.0.5 or later once it comes out, I'm not set up to build from source at the moment
[11 Jul 2008 22:41]
Tim Faust
I have retested this on my machine with 6.0.5 and the problem does not occur, it must have been fixed somewhere after 6.0.3