OPEN connection=1 isolation=2
SQL connection=1 thread=main text=CREATE TABLE contracts(id VARCHAR PRIMARY KEY,amount INT CHECK(amount>0),version INT) binds=[]
ROWS connection=1 affected=0
SQL connection=1 thread=main text=CREATE TABLE changes(seq INT PRIMARY KEY,id VARCHAR,amount INT) binds=[]
ROWS connection=1 affected=0
SQL connection=1 thread=main text=CREATE TABLE delivery_view(id VARCHAR PRIMARY KEY,amount INT) binds=[]
ROWS connection=1 affected=0
SQL connection=1 thread=main text=CREATE TABLE watermark(seq INT) binds=[]
ROWS connection=1 affected=0
SQL connection=1 thread=main text=INSERT INTO watermark VALUES(0) binds=[]
ROWS connection=1 affected=1
COMMIT connection=1 count=1
SQL connection=1 thread=main text=INSERT INTO contracts VALUES('R1',25,1) binds=[]
ROWS connection=1 affected=1
SQL connection=1 thread=main text=INSERT INTO changes VALUES(1,'R1',25) binds=[]
ROWS connection=1 affected=1
COMMIT connection=1 count=2
SQL connection=1 thread=main text=UPDATE contracts SET amount=30,version=2 WHERE id='R1' binds=[]
ROWS connection=1 affected=1
SQL connection=1 thread=main text=INSERT INTO changes VALUES(2,'R1',30) binds=[]
ROWS connection=1 affected=1
COMMIT connection=1 count=3
SQL connection=1 thread=main text=SELECT MAX(seq) FROM changes binds=[]
SQL connection=1 thread=main text=SELECT seq FROM watermark binds=[]
PASS paused projection exposes lag two
SQL connection=1 thread=main text=SELECT amount FROM contracts WHERE id='R1' binds=[]
PASS write truth already current
SQL connection=1 thread=main text=SELECT COUNT(*) FROM delivery_view binds=[]
PASS projection still empty
SQL connection=1 thread=main text=UPDATE contracts SET amount=-1 WHERE id='R1' binds=[]
SQL_FAILURE connection=1 state=23513 code=23513
PASS write model rejects invalid amount
ROLLBACK connection=1 count=1
CLOSE connection=1 openStatements=0
RESULT enterprise12 write checks=4
