Skip to content

Commit f5b5a7f

Browse files
xhh1989bramp
authored andcommitted
support parse sql like : DELETE FROM a1, a2 USING t1 AS a1 INNER JOIN t2 AS a2 WHERE a1.id=a2.id; related issue: vitessio/vitess#3787
Signed-off-by: xhh1989 <[email protected]>
1 parent ceeaf4b commit f5b5a7f

File tree

3 files changed

+1899
-1883
lines changed

3 files changed

+1899
-1883
lines changed

parse_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -665,6 +665,9 @@ var (
665665
input: "delete a from a join b on a.id = b.id where b.name = 'test'",
666666
}, {
667667
input: "delete a, b from a, b where a.id = b.id and b.name = 'test'",
668+
}, {
669+
input: "delete from a1, a2 using t1 as a1 inner join t2 as a2 where a1.id=a2.id",
670+
output: "delete a1, a2 from t1 as a1 join t2 as a2 where a1.id = a2.id",
668671
}, {
669672
input: "set /* simple */ a = 3",
670673
}, {

0 commit comments

Comments
 (0)