mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-01-24 07:16:52 -06:00
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:
parent
64159d11ce
commit
354679e69b
@ -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":
|
||||
|
Loading…
Reference in New Issue
Block a user