Bug #45666 DELETE FROM a.* USING a; syntax invalid in 5.1
Submitted: 23 Jun 2009 0:03 Modified: 12 Feb 2018 9:18
Reporter: Chris Tucker Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: DML Severity:S3 (Non-critical)
Version:5.1.36-bzr OS:Any
Assigned to: CPU Architecture:Any
Tags: regression

[23 Jun 2009 0:03] Chris Tucker
Description:
Multi table delete in 5.1 does not behave as in 5.0 with respect to Access-style .* token after tbl_name.  Documentation does not reflect this change

How to repeat:
create table a (a int);
delete from a.* using a;

Suggested fix:
Update the docs to reflect the change (or change the parser if people still rely on this feature)
[23 Jun 2009 4:02] Valeriy Kravchuk
Indeed, manual (http://dev.mysql.com/doc/refman/5.1/en/delete.html) still says:

"The syntax allows .* after each tbl_name for compatibility with Access."

But this is not the case in 5.1:

mysql> delete from test using test;
Query OK, 0 rows affected (0.00 sec)

mysql> delete from test.* using test;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '* using test' at line 1
mysql> select version();
+--------------+
| version()    |
+--------------+
| 5.1.36-debug | 
+--------------+
1 row in set (0.00 sec)

mysql> exit
Bye

While in 5.0 it works as expected:

valeriy-kravchuks-macbook-pro:5.0 openxs$ bin/mysql -uroot test
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.0.84-debug Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> delete from test.* using test;
Query OK, 12 rows affected (0.02 sec)

If this change in behavior is intended, 5.1 manual should be updated.
[12 Feb 2018 9:16] Gleb Shchepa
Posted by developer:
 
Duplicate of bug#53034, fixed in 5.1.51.