Bug #16252 | multi table delete does not support table aliases any more in 5.0 | ||
---|---|---|---|
Submitted: | 6 Jan 2006 14:23 | Modified: | 6 Jan 2006 16:10 |
Reporter: | Thomas Mayer | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S2 (Serious) |
Version: | 5.0.15 | OS: | Windows (windows xp) |
Assigned to: | CPU Architecture: | Any |
[6 Jan 2006 14:23]
Thomas Mayer
[6 Jan 2006 14:30]
Thomas Mayer
of course the second execution on windows was done with mysql 5.0.15, not 4.0.25 as accidently written...
[6 Jan 2006 16:10]
Valeriy Kravchuk
Thank you for a problem report. It looks like intended and documented behaviour in 5.0.x. Please, read http://dev.mysql.com/doc/refman/5.0/en/delete.html: "Note: You must use the alias (if one was given) when referring to a table name: DELETE t1 FROM test AS t1, test2 WHERE ... Cross-database deletes are supported for multiple-table deletes, but in this case, you must refer to the tables without using aliases. For example: DELETE test1.tmp1, test2.tmp2 FROM test1.tmp1, test2.tmp2 WHERE ..." And http://dev.mysql.com/doc/refman/4.1/en/delete.html: "Note: In MySQL 4.0, you should refer to the table names to be deleted with the true table name. In MySQL 4.1, you must use the alias (if one was given) when referring to a table name: In MySQL 4.0: DELETE test FROM test AS t1, test2 WHERE ... In MySQL 4.1: DELETE t1 FROM test AS t1, test2 WHERE ... The reason we did not make this change in 4.0 was to avoid breaking any old 4.0 applications that were using the old syntax."