Bug #2944 lower_case_table_names=2 produces bad results
Submitted: 24 Feb 2004 14:00 Modified: 6 Mar 2004 22:09
Reporter: Dean Ellis Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:4.0.18 OS:Windows (Windows)
Assigned to: Assigned Account CPU Architecture:Any

[24 Feb 2004 14:00] Dean Ellis
Description:
Using lower_case_table_names=2 produces wrong results for simple queries.

SELECTs below demonstrate the problem.  Requires lower_case_table_names=2 and requires an ORDER BY clause.

How to repeat:
CREATE TABLE a (
  id int NOT NULL default '0'
) TYPE=MyISAM;
CREATE TABLE b (
  id int(11) NOT NULL,
  fk int NOT NULL default '0'
) TYPE=MyISAM;
INSERT INTO a VALUES (104100050),(300124884);
INSERT INTO b VALUES (126,104100050),(131,300124884);

SELECT b.id FROM a INNER JOIN b ON a.id = b.fk ORDER BY b.id;
SELECT b.id FROM a INNER JOIN b ON a.id = b.fk ORDER BY b.id;
SELECT b.id FROM a INNER JOIN b ON a.id = b.fk ORDER BY b.id;

Suggested fix:
n/a
[24 Feb 2004 14:02] Dean Ellis
Noting that this is probably related to or a duplicate of #2858.
[6 Mar 2004 22:09] MySQL Verification Team
Duplicate of Bug #2858 accumulating query.