Fix an issue where we were executing SELECT statements in transactions in query tool which probably is not required because SELECT statements are already protected from dirty reads. Fixes #2683

This commit is contained in:
Dave Page 2017-09-20 11:59:37 +01:00
parent 64159d11ce
commit 354679e69b

View File

@ -1319,8 +1319,10 @@ def is_begin_required(query):
return False
if word_len == 5 and keyword.lower() == "start":
return False
if word_len == 6 and keyword.lower() == "commit":
return False
if word_len == 6:
# SELECT is protected from dirty reads hence don't require transaction
if keyword.lower() in ["select", "commit"]:
return False
if word_len == 3 and keyword.lower() == "end":
return False
if word_len == 8 and keyword.lower() == "rollback":