Skip to content

Commit

Permalink
Fix SqlParser state machine, to allow statements ending with a litera…
Browse files Browse the repository at this point in the history
…l and no explicit statement terminator, like this one: select 'foo'

Signed-off-by: Laurents Meyer <[email protected]>
  • Loading branch information
lauxjpn committed Sep 21, 2019
1 parent 0259c09 commit a0b8eca
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/MySqlConnector/Core/SqlParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,10 @@ public void Parse(string sql)
states |= FinalParseStates.NeedsNewline;
state = beforeCommentState;
}
else if (state == State.SingleQuotedStringSingleQuote)
{
state = State.Statement;
}

if (state == State.Statement)
{
Expand Down

0 comments on commit a0b8eca

Please sign in to comment.