提交 6690fbc5 编写于 作者: S Serge Rider

#231 SQL query extraction fix


Former-commit-id: b9a0c9f3
上级 cdbbc77c
......@@ -597,7 +597,9 @@ public abstract class SQLEditorBase extends BaseTextEditor {
if (token instanceof SQLBlockBeginToken) {
bracketDepth++;
hasBlocks = true;
} else if (token instanceof SQLBlockEndToken) {
} else if (bracketDepth > 0 && token instanceof SQLBlockEndToken) {
// Sometimes query contains END clause without BEGIN. E.g. CASE, IF, etc.
// This END doesn't mean block
bracketDepth--;
hasBlocks = true;
} else if (isDelimiter && bracketDepth > 0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册