Commit d7cf5f81 authored by JINMEI Tatuya's avatar JINMEI Tatuya

[1891] (unrelated) regression fix: make sure multiple updates after rollback.

this is a fix to the similar bug as the one fixed in the previous commit,
but for the rollback case.
parent 91cb18e2
......@@ -1104,6 +1104,7 @@ SQLite3Accessor::rollback() {
StatementProcessor(*dbparameters_, ROLLBACK,
"rollback an SQLite3 transaction").exec();
dbparameters_->in_transaction = false;
dbparameters_->updating_zone = false;
dbparameters_->updated_zone_id = -1;
......@@ -1026,7 +1026,11 @@ TEST_F(SQLite3Update, addThenRollback) {
checkRecords(*accessor, zone_id, "", expected_stored);
// Rollback the transaction, and confirm the zone reverts to the previous
// state. We also start another update to check if the accessor can be
// reused for a new update after rollback.
zone_id = accessor->startUpdateZone("", false).second;
checkRecords(*accessor, zone_id, "", empty_stored);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment