Commit daf30d12 authored by Jeremy Hylton's avatar Jeremy Hylton

Don't use a tid of 0 for the first transaction.

(Re-applying a lost change.)
Some storages get confused by tid == 0.
parent cdd848ac
......@@ -556,7 +556,7 @@ class TransactionalUndoStorage:
orig = []
for i in range(BATCHES):
t = Transaction()
tid = p64(i)
tid = p64(i + 1)
s.tpc_begin(t, tid)
for j in range(OBJECTS):
oid = s.new_oid()
......@@ -602,7 +602,7 @@ class TransactionalUndoStorage:
txn = iter[offset]
offset += 1
tid = p64(i)
tid = p64(i + 1)
eq(txn.tid, tid)
L1 = [(rec.oid, rec.serial, rec.data_txn) for rec in txn]
......@@ -621,7 +621,7 @@ class TransactionalUndoStorage:
offset += 1
# The undos are performed in reverse order.
otid = p64(BATCHES - 1 - i)
otid = p64(BATCHES - i)
L1 = [(rec.oid, rec.data_txn) for rec in txn]
L2 = [(oid, otid) for _tid, oid, revid in orig
if _tid == otid]
......
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