Bug #3272 problem with INNER JOIN and ORDER BY on more that one column
Submitted: 23 Mar 2004 12:21 Modified: 24 Mar 2004 8:25
Reporter: [ name withheld ] Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: MyISAM storage engine Severity:S2 (Serious)
Version:4.0.18 OS:Windows (Windows 2003)
Assigned to: Assigned Account CPU Architecture:Any

[23 Mar 2004 12:21] [ name withheld ]
Description:
Executing the following query on the attached tables results in the incosistent and wierd results

SELECT *
FROM order_items oi INNER JOIN tenants t ON oi.TenantID = t.TenantID 
WHERE oi.OrderID=2
ORDER BY oi.ProductCode, t.ViewOrder

Please note that sometimes the first execution gives the correct results (I do not use query cache), on the second time and so forth it duplicates the rows in the result set and/or returns non-existing data that looks like a memory dumps. Probably pointer(s) problem.

This problem does not appear on versions 4.0.13 and 4.0.15

How to repeat:
As described above.

Suggested fix:
I do not know.
[23 Mar 2004 12:23] [ name withheld ]
sample database

Attachment: db.zip (application/x-zip-compressed, text), 3.14 KiB.

[23 Mar 2004 14:50] Dean Ellis
Are you using lower_case_table_names=2?  If so, this is likely the issue corrected in 4.0.19 for bugs #2858 and #2944.
[23 Mar 2004 20:52] [ name withheld ]
Yes. Thank you for your quick response.
[24 Mar 2004 8:25] Dean Ellis
Ok, thank you for the update.  This is a duplicate of #2858 and has already been fixed in the development branch; the fix will appear in the next release.