Bug #82238 | Various incorrect looking errors for multi-table DELETE statements | ||
---|---|---|---|
Submitted: | 15 Jul 2016 3:22 | Modified: | 24 Dec 2019 14:46 |
Reporter: | Roel Van de Paar | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: DML | Severity: | S1 (Critical) |
Version: | 5.7.13, 5.5.50, 5.6.31 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[15 Jul 2016 3:22]
Roel Van de Paar
[15 Jul 2016 6:05]
MySQL Verification Team
Hello Roel, Thank you for the report and test case. Observed this with 5.5.50, 5.6.31 and 5.7.13 builds. Thanks, Umesh
[24 Dec 2019 14:46]
Roy Lyseng
Posted by developer: This is not a bug. DELETE FROM a1 USING t1 AS a1 OUTER JOIN t2 AS a2; 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 'OUTER JOIN t2 AS a2' at line 1 OUTER JOIN must be prefixed with LEFT or RIGHT, but then OUTER can be omitted. In addition, an OUTER JOIN specification requires a join condition. Thus, this statement succeeds: DELETE FROM a1 USING t1 AS a1 LEFT JOIN t2 AS a2 ON TRUE; This statement DELETE FROM a2 USING t1 AS a1 OUTER JOIN t2 AS a2; can be rewritten as DELETE FROM a2 USING t1 AS a1 LEFT JOIN t2 AS a2 ON TRUE; This statement: DELETE FROM a2 USING t1 AS a1 LEFT OUTER JOIN t2 AS a2; 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 '' at line 1 lacks a join condition. And so does this: DELETE FROM a2 USING t1 AS a1 RIGHT OUTER JOIN t2 AS a2; 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 '' at line 1