Closed sl01388797 closed 10 months ago
this is a parser's bug, the parser will not report syntax error if we supply a sql that the prefix is grammatical but the suffix is not grammatical. eg.
select * from test asdasdakkfjiaruwerewiru;
the sql above get a syntax error obviously, but this is a sql without any syntax error for parser cause that the prefix of this sql is grammatical.
the root cause of this bug is that we ignore the EOF
of the statement.
the way to fix this issue is much too simple: we should parse the sql from the beginning to the end(EOF
)
before:
after:
further more, the parser will not report any syntax error if the input's any prefix is grammatical:
pass
ODC version
odc422
OB version
*
What happened?
What did you expect to happen?
Before executing SQL, SQL checks for errors and jumps to database changes
How can we reproduce it (as minimally and precisely as possible)?
Anything else we need to know?
No response
Cloud
No response