9441: DB-API with sqlite doesn't unlock the table when txn.batch = True
This commit is contained in:
parent
ac0fbecc4b
commit
af487de69a
@ -860,11 +860,6 @@ class DbGeneric(DbWriteBase, DbReadBase, UpdateCallback, Callback):
|
|||||||
"""
|
"""
|
||||||
if transaction.batch:
|
if transaction.batch:
|
||||||
self.env.txn_checkpoint()
|
self.env.txn_checkpoint()
|
||||||
# Only build surname list after surname index is surely back
|
|
||||||
self.build_surname_list()
|
|
||||||
# FIXME: need a User GUI update callback here:
|
|
||||||
self.reindex_reference_map(lambda percent: percent)
|
|
||||||
|
|
||||||
# Reset callbacks if necessary
|
# Reset callbacks if necessary
|
||||||
if transaction.batch or not len(transaction):
|
if transaction.batch or not len(transaction):
|
||||||
return
|
return
|
||||||
|
@ -341,6 +341,10 @@ class DBAPI(DbGeneric):
|
|||||||
"""
|
"""
|
||||||
Executed after a batch operation.
|
Executed after a batch operation.
|
||||||
"""
|
"""
|
||||||
|
if txn.batch:
|
||||||
|
self.build_surname_list()
|
||||||
|
# FIXME: need a User GUI update callback here:
|
||||||
|
self.reindex_reference_map(lambda percent: percent)
|
||||||
self.dbapi.commit()
|
self.dbapi.commit()
|
||||||
self.transaction = None
|
self.transaction = None
|
||||||
msg = txn.get_description()
|
msg = txn.get_description()
|
||||||
|
Loading…
Reference in New Issue
Block a user