Skip to content

Commit 51e0ced

Browse files
author
Aaron Son
committed
Fix DROP VIEW parsing.
1 parent 51d8367 commit 51e0ced

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sql/parse/parse.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,9 @@ func convertDDL(ctx *sql.Context, c *sqlparser.DDL) (sql.Node, error) {
373373
}
374374
return convertCreateTable(c)
375375
case sqlparser.DropStr:
376+
if len(c.FromViews) != 0 {
377+
return convertDropView(ctx, c)
378+
}
376379
return convertDropTable(c)
377380
default:
378381
return nil, ErrUnsupportedSyntax.New(c)

0 commit comments

Comments
 (0)