Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DBZ-6243: Fix MySql parser to permit alias in single delete statements #4390

Merged
merged 1 commit into from Mar 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -982,7 +982,7 @@ lockClause

singleDeleteStatement
: DELETE priority=LOW_PRIORITY? QUICK? IGNORE?
FROM tableName
FROM tableName (AS? uid)?
(PARTITION '(' uidList ')' )?
(WHERE expression)?
orderByClause? (LIMIT limitClauseAtom)?
Expand Down
Expand Up @@ -15,3 +15,8 @@ DELETE t1 FROM t1 LEFT JOIN t2 ON t1.id=t2.id WHERE t2.id IS NULL;
DELETE a1, a2 FROM t1 AS a1 INNER JOIN t2 AS a2 WHERE a1.id=a2.id;
DELETE FROM a1, a2 USING t1 AS a1 INNER JOIN t2 AS a2 WHERE a1.id=a2.id;
#end
#begin
-- delete with table alias
DELETE FROM t1 alias_t1 WHERE alias_t1.col1 > 0;
DELETE FROM t1 as alias_t1 WHERE alias_t1.col1 > 0;
#end