9441: DB-API with sqlite doesn't unlock the table when txn.batch = True

This commit is contained in:
Doug Blank 2016-05-07 13:46:29 -04:00
parent ac0fbecc4b
commit af487de69a
2 changed files with 4 additions and 5 deletions

View File

@ -860,11 +860,6 @@ class DbGeneric(DbWriteBase, DbReadBase, UpdateCallback, Callback):
"""
if transaction.batch:
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
if transaction.batch or not len(transaction):
return

View File

@ -341,6 +341,10 @@ class DBAPI(DbGeneric):
"""
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.transaction = None
msg = txn.get_description()