This commit is contained in:
@@ -345,7 +345,10 @@ def execute_returning(sql, params=None):
|
||||
sql = sql[:sql.upper().rfind(" RETURNING ")]
|
||||
|
||||
cur = conn.execute(sql, params or [])
|
||||
conn.commit()
|
||||
# The outer transaction owns commit and rollback; committing here would make
|
||||
# its rollback ineffective and could expose only part of a multi-write update.
|
||||
if not getattr(_local, "in_transaction", False):
|
||||
conn.commit()
|
||||
rowid = cur.lastrowid
|
||||
|
||||
if table and rowid:
|
||||
|
||||
Reference in New Issue
Block a user