Bug #2880 DELETE with subquery when --lower_case_table_names
Submitted: 18 Feb 2004 20:18 Modified: 16 Mar 2004 3:07
Reporter: Manojkumar Kurmi Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Compiling Severity:S1 (Critical)
Version:4.1.2 OS:Any (All)
Assigned to: Oleksandr Byelkin

[18 Feb 2004 20:18] Manojkumar Kurmi
On Jan 5, Sanja fixed the problem (bug # 2117) of DELETE (an UPDATE) with subquery which works fine when it is run in case sensitive mode i.e. when the server is run without --lower_case_table_names.

But when server is started with --lower_case_table_names then it is not giving result as expected.

Many platform like on Windows, server is run with --lower_case_table_names option by default. On such system also, it causes problem.

Please note that the queries that have given in how to repeat section, I should get same message of "Query OK, 0 rows affected (0.00 sec)" in both delete statements.

How to repeat:
run server as
# mysqld -u root --lower_case_table_names

mysql> show tables;
| Tables_in_test |
| t1             |
1 row in set (0.00 sec)

mysql> delete p1.* from t1 as p1;
Query OK, 0 rows affected (0.00 sec)

mysql> delete P1.* from t1 as P1;
ERROR 1066 (42000): Not unique table/alias: 'p1'

Suggested fix:
Don't know
[20 Feb 2004 12:48] Oleksandr Byelkin
  1.1724 04/02/20 22:44:54 bell@sanja.is.com.ua +7 -0 
  fixed comparation of tables/database names with --lower_case_table_names 
[16 Mar 2004 3:07] Oleksandr Byelkin
Thank you for bugreport. Patch for this bug is pushed in our internal 
repository and will be included in next release of server.