Don't exclude SELECT statements from transaction management in the Query Tool in case they call data-modifying functions. Fixes #3958

This commit is contained in:
Akshay Joshi 2019-02-21 14:05:10 +00:00 committed by Dave Page
parent bacb57086c
commit 5be0d17df5
2 changed files with 3 additions and 4 deletions

View File

@ -28,6 +28,7 @@ Bug fixes
| `Bug #3912 <https://redmine.postgresql.org/issues/3912>`_ - Fix editing of table data with a JSON primary key.
| `Bug #3942 <https://redmine.postgresql.org/issues/3942>`_ - Close connections gracefully when the user logs out of pgAdmin.
| `Bug #3946 <https://redmine.postgresql.org/issues/3946>`_ - Fix alignment of checkbox to drop multiple schedules of pgAgent job.
| `Bug #3958 <https://redmine.postgresql.org/issues/3958>`_ - Don't exclude SELECT statements from transaction management in the Query Tool in case they call data-modifying functions.
| `Bug #3959 <https://redmine.postgresql.org/issues/3959>`_ - Optimise display of Dependencies and Dependents, and use on-demand loading of rows in batches of 100.
| `Bug #3963 <https://redmine.postgresql.org/issues/3963>`_ - Fix alignment of import/export toggle switch.
| `Bug #3970 <https://redmine.postgresql.org/issues/3970>`_ - Prevent an error when closing the Sort/Filter dialogue with an empty filter string.

View File

@ -34,10 +34,8 @@ def is_begin_required(query):
return False
if word_len == 5 and keyword.lower() == "start":
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 == 6 and keyword.lower() == "commit":
return False
if word_len == 3 and keyword.lower() == "end":
return False
if word_len == 8 and keyword.lower() == "rollback":