Skip to content

Commit 048cf1a

Browse files
committed
Fix Rollback issue;
1 parent 6115527 commit 048cf1a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

web/pgadmin/tools/sqleditor/utils/start_running_query.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,9 @@ def asyn_exec_query(conn, sql, trans_obj, is_rollback_req,
156156
# and formatted_error is True.
157157
with app.app_context():
158158
try:
159-
if trans_obj.server_cursor and sql == 'COMMIT;':
160-
conn.execute_void("COMMIT;")
159+
if trans_obj.server_cursor and (sql == 'COMMIT;' or
160+
sql == 'ROLLBACK;'):
161+
conn.execute_void(sql)
161162
else:
162163
_, _ = conn.execute_async(
163164
sql, server_cursor=trans_obj.server_cursor)

0 commit comments

Comments
 (0)