From a0b8eca176757dddf854f2bd81afc70593aad3bc Mon Sep 17 00:00:00 2001 From: Laurents Meyer Date: Sat, 21 Sep 2019 16:05:41 +0200 Subject: [PATCH] Fix SqlParser state machine, to allow statements ending with a literal and no explicit statement terminator, like this one: select 'foo' Signed-off-by: Laurents Meyer --- src/MySqlConnector/Core/SqlParser.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/MySqlConnector/Core/SqlParser.cs b/src/MySqlConnector/Core/SqlParser.cs index bbf337c8a..03554cd52 100644 --- a/src/MySqlConnector/Core/SqlParser.cs +++ b/src/MySqlConnector/Core/SqlParser.cs @@ -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) {