summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2011-02-07 23:46:51 +0200
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2011-02-08 00:09:08 +0200
commitdafaa3efb75ce1aae2e6dbefaf6f3a889dea0d21 (patch)
tree93271101a38832fce7a6864e96fc9de65b0acff4 /src/test
parentc18f51da17d8cf01d62218e0404e18ba246bde54 (diff)
downloadpostgresql-dafaa3efb75ce1aae2e6dbefaf6f3a889dea0d21.tar.gz
Implement genuine serializable isolation level.
Until now, our Serializable mode has in fact been what's called Snapshot Isolation, which allows some anomalies that could not occur in any serialized ordering of the transactions. This patch fixes that using a method called Serializable Snapshot Isolation, based on research papers by Michael J. Cahill (see README-SSI for full references). In Serializable Snapshot Isolation, transactions run like they do in Snapshot Isolation, but a predicate lock manager observes the reads and writes performed and aborts transactions if it detects that an anomaly might occur. This method produces some false positives, ie. it sometimes aborts transactions even though there is no anomaly. To track reads we implement predicate locking, see storage/lmgr/predicate.c. Whenever a tuple is read, a predicate lock is acquired on the tuple. Shared memory is finite, so when a transaction takes many tuple-level locks on a page, the locks are promoted to a single page-level lock, and further to a single relation level lock if necessary. To lock key values with no matching tuple, a sequential scan always takes a relation-level lock, and an index scan acquires a page-level lock that covers the search key, whether or not there are any matching keys at the moment. A predicate lock doesn't conflict with any regular locks or with another predicate locks in the normal sense. They're only used by the predicate lock manager to detect the danger of anomalies. Only serializable transactions participate in predicate locking, so there should be no extra overhead for for other transactions. Predicate locks can't be released at commit, but must be remembered until all the transactions that overlapped with it have completed. That means that we need to remember an unbounded amount of predicate locks, so we apply a lossy but conservative method of tracking locks for committed transactions. If we run short of shared memory, we overflow to a new "pg_serial" SLRU pool. We don't currently allow Serializable transactions in Hot Standby mode. That would be hard, because even read-only transactions can cause anomalies that wouldn't otherwise occur. Serializable isolation mode now means the new fully serializable level. Repeatable Read gives you the old Snapshot Isolation level that we have always had. Kevin Grittner and Dan Ports, reviewed by Jeff Davis, Heikki Linnakangas and Anssi Kääriäinen
Diffstat (limited to 'src/test')
-rw-r--r--src/test/isolation/.gitignore12
-rw-r--r--src/test/isolation/Makefile74
-rw-r--r--src/test/isolation/README65
-rw-r--r--src/test/isolation/expected/classroom-scheduling.out299
-rw-r--r--src/test/isolation/expected/multiple-row-versions.out24
-rw-r--r--src/test/isolation/expected/partial-index.out641
-rw-r--r--src/test/isolation/expected/project-manager.out299
-rw-r--r--src/test/isolation/expected/receipt-report.out3379
-rw-r--r--src/test/isolation/expected/referential-integrity.out629
-rw-r--r--src/test/isolation/expected/ri-trigger.out111
-rw-r--r--src/test/isolation/expected/simple-write-skew.out41
-rw-r--r--src/test/isolation/expected/temporal-range-integrity.out299
-rw-r--r--src/test/isolation/expected/total-cash.out281
-rw-r--r--src/test/isolation/expected/two-ids.out1007
-rw-r--r--src/test/isolation/isolation_main.c89
-rw-r--r--src/test/isolation/isolation_schedule11
-rw-r--r--src/test/isolation/isolationtester.c372
-rw-r--r--src/test/isolation/isolationtester.h59
-rw-r--r--src/test/isolation/specparse.y188
-rw-r--r--src/test/isolation/specs/classroom-scheduling.spec29
-rw-r--r--src/test/isolation/specs/multiple-row-versions.spec48
-rw-r--r--src/test/isolation/specs/partial-index.spec32
-rw-r--r--src/test/isolation/specs/project-manager.spec30
-rw-r--r--src/test/isolation/specs/receipt-report.spec47
-rw-r--r--src/test/isolation/specs/referential-integrity.spec32
-rw-r--r--src/test/isolation/specs/ri-trigger.spec53
-rw-r--r--src/test/isolation/specs/simple-write-skew.spec30
-rw-r--r--src/test/isolation/specs/temporal-range-integrity.spec38
-rw-r--r--src/test/isolation/specs/total-cash.spec28
-rw-r--r--src/test/isolation/specs/two-ids.spec40
-rw-r--r--src/test/isolation/specscanner.l103
-rw-r--r--src/test/regress/expected/prepared_xacts.out12
-rw-r--r--src/test/regress/expected/prepared_xacts_1.out12
-rw-r--r--src/test/regress/expected/transactions.out2
-rw-r--r--src/test/regress/sql/prepared_xacts.sql12
-rw-r--r--src/test/regress/sql/transactions.sql2
36 files changed, 8410 insertions, 20 deletions
diff --git a/src/test/isolation/.gitignore b/src/test/isolation/.gitignore
new file mode 100644
index 0000000000..42ee945744
--- /dev/null
+++ b/src/test/isolation/.gitignore
@@ -0,0 +1,12 @@
+# Local binaries
+/isolationtester
+/pg_isolation_regress
+
+# Local generated source files
+/specparse.c
+/specscanner.c
+
+# Generated subdirectories
+/results/
+/log/
+/tmp_check/
diff --git a/src/test/isolation/Makefile b/src/test/isolation/Makefile
new file mode 100644
index 0000000000..1d4c7db8bc
--- /dev/null
+++ b/src/test/isolation/Makefile
@@ -0,0 +1,74 @@
+#
+# Makefile for isolation tests
+#
+
+subdir = src/test/isolation
+top_builddir = ../../..
+include $(top_builddir)/src/Makefile.global
+
+ifeq ($(PORTNAME), win32)
+LDLIBS += -lws2_32
+endif
+
+override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS)
+override LDLIBS := $(libpq_pgport) $(LDLIBS)
+
+OBJS = specparse.o isolationtester.o
+
+submake-regress:
+ $(MAKE) -C $(top_builddir)/src/test/regress pg_regress.o
+
+pg_regress.o: | submake-regress
+ rm -f $@ && $(LN_S) $(top_builddir)/src/test/regress/pg_regress.o .
+
+pg_isolation_regress: isolation_main.o pg_regress.o
+ $(CC) $(CFLAGS) $^ $(libpq_pgport) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
+
+all: isolationtester pg_isolation_regress
+
+isolationtester: $(OBJS) | submake-libpq submake-libpgport
+ $(CC) $(CFLAGS) $(OBJS) $(libpq_pgport) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
+
+distprep: specparse.c
+
+# There is no correct way to write a rule that generates two files.
+# Rules with two targets don't have that meaning, they are merely
+# shorthand for two otherwise separate rules. To be safe for parallel
+# make, we must chain the dependencies like this. The semicolon is
+# important, otherwise make will choose the built-in rule for
+# gram.y=>gram.c.
+
+all: isolationtester$(X) pg_isolation_regress$(X)
+
+specparse.h: specparse.c ;
+
+# specscanner is compiled as part of specparse
+specparse.o: specscanner.c
+
+specparse.c: specparse.y
+ifdef BISON
+ $(BISON) $(BISONFLAGS) -o $@ $<
+else
+ @$(missing) bison $< $@
+endif
+
+specscanner.c: specscanner.l
+ifdef FLEX
+ $(FLEX) $(FLEXFLAGS) -o'$@' $<
+else
+ @$(missing) flex $< $@
+endif
+# specparse.c is in the distribution tarball, so is not cleaned here
+clean distclean:
+ rm -f isolationtester$(X) pg_isolation_regress$(X) $(OBJS) isolation_main.o
+ rm -f pg_regress.o
+ rm -rf results
+
+maintainer-clean: distclean
+ rm -f specparse.c specscanner.c
+
+installcheck: all
+ ./pg_isolation_regress --schedule=$(srcdir)/isolation_schedule
+
+check: all
+ ./pg_isolation_regress --temp-install=./tmp_check --top-builddir=$(top_builddir) --schedule=$(srcdir)/isolation_schedule
diff --git a/src/test/isolation/README b/src/test/isolation/README
new file mode 100644
index 0000000000..f6984b0bee
--- /dev/null
+++ b/src/test/isolation/README
@@ -0,0 +1,65 @@
+src/test/isolation/README
+
+Isolation tests
+===============
+
+This directory contains a set of tests for the serializable isolation level.
+Testing isolation requires running multiple overlapping transactions, so
+which requires multiple concurrent connections, and can't therefore be
+tested using the normal pg_regress program.
+
+To represent a test with overlapping transactions, we use a test specification
+file with a custom syntax, described in the next section.
+
+isolationtester is program that uses libpq to open multiple connections,
+and executes a test specified by a spec file. A libpq connection string
+to specify the server and database to connect to, the defaults derived from
+environment variables are used otherwise.
+
+pg_isolation_regress is a tool identical to pg_regress, but instead of using
+psql to execute a test, it uses isolationtester.
+
+To run the tests, you need to have a server up and running. Run
+ gmake installcheck
+
+Test specification
+==================
+
+Each isolation test is defined by a specification file, stored in the specs
+subdirectory. A test specification consists of five parts, in this order:
+
+setup { <SQL> }
+
+ The given SQL block is executed once, in one session only, before running
+ the test. Create any test tables or such objects here. This part is
+ optional.
+
+teardown { <SQL> }
+
+ The teardown SQL block is executed once after the test is finished. Use
+ this to clean up, e.g dropping any test tables. This part is optional.
+
+session "<name>"
+
+ Each session is executed in a separate connection. A session consists
+ of four parts: setup, teardown and one or more steps. The per-session
+ setup and teardown parts have the same syntax as the per-test setup and
+ teardown described above, but they are executed in every session,
+ before and after each permutation. The setup part typically contains a
+ "BEGIN" command to begin a transaction.
+
+ Each step has a syntax of
+
+ step "<name>" { <SQL> }
+
+ where <name> is a unique name identifying this step, and SQL is a SQL
+ statement (or statements, separated by semicolons) that is executed in the
+ step.
+
+permutation "<step name>" ...
+
+ A permutation line specifies a list of steps that are ran in that order.
+ If no permutation lines are given, the test program automatically generates
+ all possible overlapping orderings of the given sessions.
+
+Lines beginning with a # are considered comments.
diff --git a/src/test/isolation/expected/classroom-scheduling.out b/src/test/isolation/expected/classroom-scheduling.out
new file mode 100644
index 0000000000..faae14f45a
--- /dev/null
+++ b/src/test/isolation/expected/classroom-scheduling.out
@@ -0,0 +1,299 @@
+Parsed test spec with 2 sessions
+
+starting permutation: rx1 wy1 c1 ry2 wx2 c2
+step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00';
+count
+
+0
+step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol');
+step c1: COMMIT;
+step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30';
+count
+
+1
+step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00';
+step c2: COMMIT;
+
+starting permutation: rx1 wy1 ry2 c1 wx2 c2
+step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00';
+count
+
+0
+step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol');
+step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30';
+count
+
+0
+step c1: COMMIT;
+step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00';
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c2: COMMIT;
+
+starting permutation: rx1 wy1 ry2 wx2 c1 c2
+step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00';
+count
+
+0
+step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol');
+step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30';
+count
+
+0
+step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00';
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rx1 wy1 ry2 wx2 c2 c1
+step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00';
+count
+
+0
+step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol');
+step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30';
+count
+
+0
+step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00';
+step c2: COMMIT;
+step c1: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rx1 ry2 wy1 c1 wx2 c2
+step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00';
+count
+
+0
+step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30';
+count
+
+0
+step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol');
+step c1: COMMIT;
+step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00';
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c2: COMMIT;
+
+starting permutation: rx1 ry2 wy1 wx2 c1 c2
+step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00';
+count
+
+0
+step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30';
+count
+
+0
+step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol');
+step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00';
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rx1 ry2 wy1 wx2 c2 c1
+step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00';
+count
+
+0
+step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30';
+count
+
+0
+step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol');
+step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00';
+step c2: COMMIT;
+step c1: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rx1 ry2 wx2 wy1 c1 c2
+step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00';
+count
+
+0
+step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30';
+count
+
+0
+step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00';
+step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol');
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rx1 ry2 wx2 wy1 c2 c1
+step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00';
+count
+
+0
+step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30';
+count
+
+0
+step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00';
+step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol');
+step c2: COMMIT;
+step c1: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rx1 ry2 wx2 c2 wy1 c1
+step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00';
+count
+
+0
+step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30';
+count
+
+0
+step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00';
+step c2: COMMIT;
+step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol');
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c1: COMMIT;
+
+starting permutation: ry2 rx1 wy1 c1 wx2 c2
+step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30';
+count
+
+0
+step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00';
+count
+
+0
+step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol');
+step c1: COMMIT;
+step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00';
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c2: COMMIT;
+
+starting permutation: ry2 rx1 wy1 wx2 c1 c2
+step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30';
+count
+
+0
+step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00';
+count
+
+0
+step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol');
+step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00';
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: ry2 rx1 wy1 wx2 c2 c1
+step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30';
+count
+
+0
+step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00';
+count
+
+0
+step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol');
+step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00';
+step c2: COMMIT;
+step c1: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: ry2 rx1 wx2 wy1 c1 c2
+step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30';
+count
+
+0
+step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00';
+count
+
+0
+step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00';
+step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol');
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: ry2 rx1 wx2 wy1 c2 c1
+step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30';
+count
+
+0
+step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00';
+count
+
+0
+step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00';
+step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol');
+step c2: COMMIT;
+step c1: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: ry2 rx1 wx2 c2 wy1 c1
+step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30';
+count
+
+0
+step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00';
+count
+
+0
+step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00';
+step c2: COMMIT;
+step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol');
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c1: COMMIT;
+
+starting permutation: ry2 wx2 rx1 wy1 c1 c2
+step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30';
+count
+
+0
+step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00';
+step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00';
+count
+
+0
+step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol');
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: ry2 wx2 rx1 wy1 c2 c1
+step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30';
+count
+
+0
+step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00';
+step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00';
+count
+
+0
+step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol');
+step c2: COMMIT;
+step c1: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: ry2 wx2 rx1 c2 wy1 c1
+step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30';
+count
+
+0
+step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00';
+step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00';
+count
+
+0
+step c2: COMMIT;
+step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol');
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c1: COMMIT;
+
+starting permutation: ry2 wx2 c2 rx1 wy1 c1
+step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30';
+count
+
+0
+step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00';
+step c2: COMMIT;
+step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00';
+count
+
+1
+step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol');
+step c1: COMMIT;
diff --git a/src/test/isolation/expected/multiple-row-versions.out b/src/test/isolation/expected/multiple-row-versions.out
new file mode 100644
index 0000000000..cd31029d17
--- /dev/null
+++ b/src/test/isolation/expected/multiple-row-versions.out
@@ -0,0 +1,24 @@
+Parsed test spec with 4 sessions
+
+starting permutation: rx1 wx2 c2 wx3 ry3 wy4 rz4 c4 c3 wz1 c1
+step rx1: SELECT * FROM t WHERE id = 1000000;
+id txt
+
+1000000
+step wx2: UPDATE t SET txt = 'b' WHERE id = 1000000;
+step c2: COMMIT;
+step wx3: UPDATE t SET txt = 'c' WHERE id = 1000000;
+step ry3: SELECT * FROM t WHERE id = 500000;
+id txt
+
+500000
+step wy4: UPDATE t SET txt = 'd' WHERE id = 500000;
+step rz4: SELECT * FROM t WHERE id = 1;
+id txt
+
+1
+step c4: COMMIT;
+step c3: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+step wz1: UPDATE t SET txt = 'a' WHERE id = 1;
+step c1: COMMIT;
diff --git a/src/test/isolation/expected/partial-index.out b/src/test/isolation/expected/partial-index.out
new file mode 100644
index 0000000000..1230513675
--- /dev/null
+++ b/src/test/isolation/expected/partial-index.out
@@ -0,0 +1,641 @@
+Parsed test spec with 2 sessions
+
+starting permutation: rxy1 wx1 c1 wy2 rxy2 c2
+step rxy1: select * from test_t where val2 = 1;
+id val1 val2
+
+0 a 1
+1 a 1
+2 a 1
+3 a 1
+4 a 1
+5 a 1
+6 a 1
+7 a 1
+8 a 1
+9 a 1
+10 a 1
+step wx1: update test_t set val2 = 2 where val2 = 1 and id = 10;
+step c1: COMMIT;
+step wy2: update test_t set val2 = 2 where val2 = 1 and id = 9;
+step rxy2: select * from test_t where val2 = 1;
+id val1 val2
+
+0 a 1
+1 a 1
+2 a 1
+3 a 1
+4 a 1
+5 a 1
+6 a 1
+7 a 1
+8 a 1
+step c2: COMMIT;
+
+starting permutation: rxy1 wx1 wy2 c1 rxy2 c2
+step rxy1: select * from test_t where val2 = 1;
+id val1 val2
+
+0 a 1
+1 a 1
+2 a 1
+3 a 1
+4 a 1
+5 a 1
+6 a 1
+7 a 1
+8 a 1
+9 a 1
+10 a 1
+step wx1: update test_t set val2 = 2 where val2 = 1 and id = 10;
+step wy2: update test_t set val2 = 2 where val2 = 1 and id = 9;
+step c1: COMMIT;
+step rxy2: select * from test_t where val2 = 1;
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c2: COMMIT;
+
+starting permutation: rxy1 wx1 wy2 rxy2 c1 c2
+step rxy1: select * from test_t where val2 = 1;
+id val1 val2
+
+0 a 1
+1 a 1
+2 a 1
+3 a 1
+4 a 1
+5 a 1
+6 a 1
+7 a 1
+8 a 1
+9 a 1
+10 a 1
+step wx1: update test_t set val2 = 2 where val2 = 1 and id = 10;
+step wy2: update test_t set val2 = 2 where val2 = 1 and id = 9;
+step rxy2: select * from test_t where val2 = 1;
+id val1 val2
+
+0 a 1
+1 a 1
+2 a 1
+3 a 1
+4 a 1
+5 a 1
+6 a 1
+7 a 1
+8 a 1
+10 a 1
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rxy1 wx1 wy2 rxy2 c2 c1
+step rxy1: select * from test_t where val2 = 1;
+id val1 val2
+
+0 a 1
+1 a 1
+2 a 1
+3 a 1
+4 a 1
+5 a 1
+6 a 1
+7 a 1
+8 a 1
+9 a 1
+10 a 1
+step wx1: update test_t set val2 = 2 where val2 = 1 and id = 10;
+step wy2: update test_t set val2 = 2 where val2 = 1 and id = 9;
+step rxy2: select * from test_t where val2 = 1;
+id val1 val2
+
+0 a 1
+1 a 1
+2 a 1
+3 a 1
+4 a 1
+5 a 1
+6 a 1
+7 a 1
+8 a 1
+10 a 1
+step c2: COMMIT;
+step c1: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rxy1 wy2 wx1 c1 rxy2 c2
+step rxy1: select * from test_t where val2 = 1;
+id val1 val2
+
+0 a 1
+1 a 1
+2 a 1
+3 a 1
+4 a 1
+5 a 1
+6 a 1
+7 a 1
+8 a 1
+9 a 1
+10 a 1
+step wy2: update test_t set val2 = 2 where val2 = 1 and id = 9;
+step wx1: update test_t set val2 = 2 where val2 = 1 and id = 10;
+step c1: COMMIT;
+step rxy2: select * from test_t where val2 = 1;
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c2: COMMIT;
+
+starting permutation: rxy1 wy2 wx1 rxy2 c1 c2
+step rxy1: select * from test_t where val2 = 1;
+id val1 val2
+
+0 a 1
+1 a 1
+2 a 1
+3 a 1
+4 a 1
+5 a 1
+6 a 1
+7 a 1
+8 a 1
+9 a 1
+10 a 1
+step wy2: update test_t set val2 = 2 where val2 = 1 and id = 9;
+step wx1: update test_t set val2 = 2 where val2 = 1 and id = 10;
+step rxy2: select * from test_t where val2 = 1;
+id val1 val2
+
+0 a 1
+1 a 1
+2 a 1
+3 a 1
+4 a 1
+5 a 1
+6 a 1
+7 a 1
+8 a 1
+10 a 1
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rxy1 wy2 wx1 rxy2 c2 c1
+step rxy1: select * from test_t where val2 = 1;
+id val1 val2
+
+0 a 1
+1 a 1
+2 a 1
+3 a 1
+4 a 1
+5 a 1
+6 a 1
+7 a 1
+8 a 1
+9 a 1
+10 a 1
+step wy2: update test_t set val2 = 2 where val2 = 1 and id = 9;
+step wx1: update test_t set val2 = 2 where val2 = 1 and id = 10;
+step rxy2: select * from test_t where val2 = 1;
+id val1 val2
+
+0 a 1
+1 a 1
+2 a 1
+3 a 1
+4 a 1
+5 a 1
+6 a 1
+7 a 1
+8 a 1
+10 a 1
+step c2: COMMIT;
+step c1: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rxy1 wy2 rxy2 wx1 c1 c2
+step rxy1: select * from test_t where val2 = 1;
+id val1 val2
+
+0 a 1
+1 a 1
+2 a 1
+3 a 1
+4 a 1
+5 a 1
+6 a 1
+7 a 1
+8 a 1
+9 a 1
+10 a 1
+step wy2: update test_t set val2 = 2 where val2 = 1 and id = 9;
+step rxy2: select * from test_t where val2 = 1;
+id val1 val2
+
+0 a 1
+1 a 1
+2 a 1
+3 a 1
+4 a 1
+5 a 1
+6 a 1
+7 a 1
+8 a 1
+10 a 1
+step wx1: update test_t set val2 = 2 where val2 = 1 and id = 10;
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rxy1 wy2 rxy2 wx1 c2 c1
+step rxy1: select * from test_t where val2 = 1;
+id val1 val2
+
+0 a 1
+1 a 1
+2 a 1
+3 a 1
+4 a 1
+5 a 1
+6 a 1
+7 a 1
+8 a 1
+9 a 1
+10 a 1
+step wy2: update test_t set val2 = 2 where val2 = 1 and id = 9;
+step rxy2: select * from test_t where val2 = 1;
+id val1 val2
+
+0 a 1
+1 a 1
+2 a 1
+3 a 1
+4 a 1
+5 a 1
+6 a 1
+7 a 1
+8 a 1
+10 a 1
+step wx1: update test_t set val2 = 2 where val2 = 1 and id = 10;
+step c2: COMMIT;
+step c1: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rxy1 wy2 rxy2 c2 wx1 c1
+step rxy1: select * from test_t where val2 = 1;
+id val1 val2
+
+0 a 1
+1 a 1
+2 a 1
+3 a 1
+4 a 1
+5 a 1
+6 a 1
+7 a 1
+8 a 1
+9 a 1
+10 a 1
+step wy2: update test_t set val2 = 2 where val2 = 1 and id = 9;
+step rxy2: select * from test_t where val2 = 1;
+id val1 val2
+
+0 a 1
+1 a 1
+2 a 1
+3 a 1
+4 a 1
+5 a 1
+6 a 1
+7 a 1
+8 a 1
+10 a 1
+step c2: COMMIT;
+step wx1: update test_t set val2 = 2 where val2 = 1 and id = 10;
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c1: COMMIT;
+
+starting permutation: wy2 rxy1 wx1 c1 rxy2 c2
+step wy2: update test_t set val2 = 2 where val2 = 1 and id = 9;
+step rxy1: select * from test_t where val2 = 1;
+id val1 val2
+
+0 a 1
+1 a 1
+2 a 1
+3 a 1
+4 a 1
+5 a 1
+6 a 1
+7 a 1
+8 a 1
+9 a 1
+10 a 1
+step wx1: update test_t set val2 = 2 where val2 = 1 and id = 10;
+step c1: COMMIT;
+step rxy2: select * from test_t where val2 = 1;
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c2: COMMIT;
+
+starting permutation: wy2 rxy1 wx1 rxy2 c1 c2
+step wy2: update test_t set val2 = 2 where val2 = 1 and id = 9;
+step rxy1: select * from test_t where val2 = 1;
+id val1 val2
+
+0 a 1
+1 a 1
+2 a 1
+3 a 1
+4 a 1
+5 a 1
+6 a 1
+7 a 1
+8 a 1
+9 a 1
+10 a 1
+step wx1: update test_t set val2 = 2 where val2 = 1 and id = 10;
+step rxy2: select * from test_t where val2 = 1;
+id val1 val2
+
+0 a 1
+1 a 1
+2 a 1
+3 a 1
+4 a 1
+5 a 1
+6 a 1
+7 a 1
+8 a 1
+10 a 1
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: wy2 rxy1 wx1 rxy2 c2 c1
+step wy2: update test_t set val2 = 2 where val2 = 1 and id = 9;
+step rxy1: select * from test_t where val2 = 1;
+id val1 val2
+
+0 a 1
+1 a 1
+2 a 1
+3 a 1
+4 a 1
+5 a 1
+6 a 1
+7 a 1
+8 a 1
+9 a 1
+10 a 1
+step wx1: update test_t set val2 = 2 where val2 = 1 and id = 10;
+step rxy2: select * from test_t where val2 = 1;
+id val1 val2
+
+0 a 1
+1 a 1
+2 a 1
+3 a 1
+4 a 1
+5 a 1
+6 a 1
+7 a 1
+8 a 1
+10 a 1
+step c2: COMMIT;
+step c1: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: wy2 rxy1 rxy2 wx1 c1 c2
+step wy2: update test_t set val2 = 2 where val2 = 1 and id = 9;
+step rxy1: select * from test_t where val2 = 1;
+id val1 val2
+
+0 a 1
+1 a 1
+2 a 1
+3 a 1
+4 a 1
+5 a 1
+6 a 1
+7 a 1
+8 a 1
+9 a 1
+10 a 1
+step rxy2: select * from test_t where val2 = 1;
+id val1 val2
+
+0 a 1
+1 a 1
+2 a 1
+3 a 1
+4 a 1
+5 a 1
+6 a 1
+7 a 1
+8 a 1
+10 a 1
+step wx1: update test_t set val2 = 2 where val2 = 1 and id = 10;
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: wy2 rxy1 rxy2 wx1 c2 c1
+step wy2: update test_t set val2 = 2 where val2 = 1 and id = 9;
+step rxy1: select * from test_t where val2 = 1;
+id val1 val2
+
+0 a 1
+1 a 1
+2 a 1
+3 a 1
+4 a 1
+5 a 1
+6 a 1
+7 a 1
+8 a 1
+9 a 1
+10 a 1
+step rxy2: select * from test_t where val2 = 1;
+id val1 val2
+
+0 a 1
+1 a 1
+2 a 1
+3 a 1
+4 a 1
+5 a 1
+6 a 1
+7 a 1
+8 a 1
+10 a 1
+step wx1: update test_t set val2 = 2 where val2 = 1 and id = 10;
+step c2: COMMIT;
+step c1: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: wy2 rxy1 rxy2 c2 wx1 c1
+step wy2: update test_t set val2 = 2 where val2 = 1 and id = 9;
+step rxy1: select * from test_t where val2 = 1;
+id val1 val2
+
+0 a 1
+1 a 1
+2 a 1
+3 a 1
+4 a 1
+5 a 1
+6 a 1
+7 a 1
+8 a 1
+9 a 1
+10 a 1
+step rxy2: select * from test_t where val2 = 1;
+id val1 val2
+
+0 a 1
+1 a 1
+2 a 1
+3 a 1
+4 a 1
+5 a 1
+6 a 1
+7 a 1
+8 a 1
+10 a 1
+step c2: COMMIT;
+step wx1: update test_t set val2 = 2 where val2 = 1 and id = 10;
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c1: COMMIT;
+
+starting permutation: wy2 rxy2 rxy1 wx1 c1 c2
+step wy2: update test_t set val2 = 2 where val2 = 1 and id = 9;
+step rxy2: select * from test_t where val2 = 1;
+id val1 val2
+
+0 a 1
+1 a 1
+2 a 1
+3 a 1
+4 a 1
+5 a 1
+6 a 1
+7 a 1
+8 a 1
+10 a 1
+step rxy1: select * from test_t where val2 = 1;
+id val1 val2
+
+0 a 1
+1 a 1
+2 a 1
+3 a 1
+4 a 1
+5 a 1
+6 a 1
+7 a 1
+8 a 1
+9 a 1
+10 a 1
+step wx1: update test_t set val2 = 2 where val2 = 1 and id = 10;
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: wy2 rxy2 rxy1 wx1 c2 c1
+step wy2: update test_t set val2 = 2 where val2 = 1 and id = 9;
+step rxy2: select * from test_t where val2 = 1;
+id val1 val2
+
+0 a 1
+1 a 1
+2 a 1
+3 a 1
+4 a 1
+5 a 1
+6 a 1
+7 a 1
+8 a 1
+10 a 1
+step rxy1: select * from test_t where val2 = 1;
+id val1 val2
+
+0 a 1
+1 a 1
+2 a 1
+3 a 1
+4 a 1
+5 a 1
+6 a 1
+7 a 1
+8 a 1
+9 a 1
+10 a 1
+step wx1: update test_t set val2 = 2 where val2 = 1 and id = 10;
+step c2: COMMIT;
+step c1: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: wy2 rxy2 rxy1 c2 wx1 c1
+step wy2: update test_t set val2 = 2 where val2 = 1 and id = 9;
+step rxy2: select * from test_t where val2 = 1;
+id val1 val2
+
+0 a 1
+1 a 1
+2 a 1
+3 a 1
+4 a 1
+5 a 1
+6 a 1
+7 a 1
+8 a 1
+10 a 1
+step rxy1: select * from test_t where val2 = 1;
+id val1 val2
+
+0 a 1
+1 a 1
+2 a 1
+3 a 1
+4 a 1
+5 a 1
+6 a 1
+7 a 1
+8 a 1
+9 a 1
+10 a 1
+step c2: COMMIT;
+step wx1: update test_t set val2 = 2 where val2 = 1 and id = 10;
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c1: COMMIT;
+
+starting permutation: wy2 rxy2 c2 rxy1 wx1 c1
+step wy2: update test_t set val2 = 2 where val2 = 1 and id = 9;
+step rxy2: select * from test_t where val2 = 1;
+id val1 val2
+
+0 a 1
+1 a 1
+2 a 1
+3 a 1
+4 a 1
+5 a 1
+6 a 1
+7 a 1
+8 a 1
+10 a 1
+step c2: COMMIT;
+step rxy1: select * from test_t where val2 = 1;
+id val1 val2
+
+0 a 1
+1 a 1
+2 a 1
+3 a 1
+4 a 1
+5 a 1
+6 a 1
+7 a 1
+8 a 1
+10 a 1
+step wx1: update test_t set val2 = 2 where val2 = 1 and id = 10;
+step c1: COMMIT;
diff --git a/src/test/isolation/expected/project-manager.out b/src/test/isolation/expected/project-manager.out
new file mode 100644
index 0000000000..0050a744a8
--- /dev/null
+++ b/src/test/isolation/expected/project-manager.out
@@ -0,0 +1,299 @@
+Parsed test spec with 2 sessions
+
+starting permutation: rx1 wy1 c1 ry2 wx2 c2
+step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager;
+count
+
+1
+step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1);
+step c1: COMMIT;
+step ry2: SELECT count(*) FROM project WHERE project_manager = 1;
+count
+
+1
+step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1;
+step c2: COMMIT;
+
+starting permutation: rx1 wy1 ry2 c1 wx2 c2
+step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager;
+count
+
+1
+step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1);
+step ry2: SELECT count(*) FROM project WHERE project_manager = 1;
+count
+
+0
+step c1: COMMIT;
+step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1;
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c2: COMMIT;
+
+starting permutation: rx1 wy1 ry2 wx2 c1 c2
+step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager;
+count
+
+1
+step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1);
+step ry2: SELECT count(*) FROM project WHERE project_manager = 1;
+count
+
+0
+step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1;
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rx1 wy1 ry2 wx2 c2 c1
+step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager;
+count
+
+1
+step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1);
+step ry2: SELECT count(*) FROM project WHERE project_manager = 1;
+count
+
+0
+step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1;
+step c2: COMMIT;
+step c1: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rx1 ry2 wy1 c1 wx2 c2
+step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager;
+count
+
+1
+step ry2: SELECT count(*) FROM project WHERE project_manager = 1;
+count
+
+0
+step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1);
+step c1: COMMIT;
+step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1;
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c2: COMMIT;
+
+starting permutation: rx1 ry2 wy1 wx2 c1 c2
+step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager;
+count
+
+1
+step ry2: SELECT count(*) FROM project WHERE project_manager = 1;
+count
+
+0
+step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1);
+step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1;
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rx1 ry2 wy1 wx2 c2 c1
+step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager;
+count
+
+1
+step ry2: SELECT count(*) FROM project WHERE project_manager = 1;
+count
+
+0
+step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1);
+step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1;
+step c2: COMMIT;
+step c1: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rx1 ry2 wx2 wy1 c1 c2
+step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager;
+count
+
+1
+step ry2: SELECT count(*) FROM project WHERE project_manager = 1;
+count
+
+0
+step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1;
+step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1);
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rx1 ry2 wx2 wy1 c2 c1
+step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager;
+count
+
+1
+step ry2: SELECT count(*) FROM project WHERE project_manager = 1;
+count
+
+0
+step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1;
+step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1);
+step c2: COMMIT;
+step c1: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rx1 ry2 wx2 c2 wy1 c1
+step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager;
+count
+
+1
+step ry2: SELECT count(*) FROM project WHERE project_manager = 1;
+count
+
+0
+step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1;
+step c2: COMMIT;
+step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1);
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c1: COMMIT;
+
+starting permutation: ry2 rx1 wy1 c1 wx2 c2
+step ry2: SELECT count(*) FROM project WHERE project_manager = 1;
+count
+
+0
+step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager;
+count
+
+1
+step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1);
+step c1: COMMIT;
+step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1;
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c2: COMMIT;
+
+starting permutation: ry2 rx1 wy1 wx2 c1 c2
+step ry2: SELECT count(*) FROM project WHERE project_manager = 1;
+count
+
+0
+step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager;
+count
+
+1
+step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1);
+step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1;
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: ry2 rx1 wy1 wx2 c2 c1
+step ry2: SELECT count(*) FROM project WHERE project_manager = 1;
+count
+
+0
+step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager;
+count
+
+1
+step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1);
+step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1;
+step c2: COMMIT;
+step c1: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: ry2 rx1 wx2 wy1 c1 c2
+step ry2: SELECT count(*) FROM project WHERE project_manager = 1;
+count
+
+0
+step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager;
+count
+
+1
+step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1;
+step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1);
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: ry2 rx1 wx2 wy1 c2 c1
+step ry2: SELECT count(*) FROM project WHERE project_manager = 1;
+count
+
+0
+step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager;
+count
+
+1
+step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1;
+step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1);
+step c2: COMMIT;
+step c1: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: ry2 rx1 wx2 c2 wy1 c1
+step ry2: SELECT count(*) FROM project WHERE project_manager = 1;
+count
+
+0
+step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager;
+count
+
+1
+step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1;
+step c2: COMMIT;
+step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1);
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c1: COMMIT;
+
+starting permutation: ry2 wx2 rx1 wy1 c1 c2
+step ry2: SELECT count(*) FROM project WHERE project_manager = 1;
+count
+
+0
+step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1;
+step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager;
+count
+
+1
+step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1);
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: ry2 wx2 rx1 wy1 c2 c1
+step ry2: SELECT count(*) FROM project WHERE project_manager = 1;
+count
+
+0
+step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1;
+step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager;
+count
+
+1
+step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1);
+step c2: COMMIT;
+step c1: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: ry2 wx2 rx1 c2 wy1 c1
+step ry2: SELECT count(*) FROM project WHERE project_manager = 1;
+count
+
+0
+step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1;
+step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager;
+count
+
+1
+step c2: COMMIT;
+step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1);
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c1: COMMIT;
+
+starting permutation: ry2 wx2 c2 rx1 wy1 c1
+step ry2: SELECT count(*) FROM project WHERE project_manager = 1;
+count
+
+0
+step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1;
+step c2: COMMIT;
+step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager;
+count
+
+0
+step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1);
+step c1: COMMIT;
diff --git a/src/test/isolation/expected/receipt-report.out b/src/test/isolation/expected/receipt-report.out
new file mode 100644
index 0000000000..bcab10ea95
--- /dev/null
+++ b/src/test/isolation/expected/receipt-report.out
@@ -0,0 +1,3379 @@
+Parsed test spec with 3 sessions
+
+starting permutation: rxwy1 c1 wx2 c2 rx3 ry3 c3
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-23-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+3 12-22-2008 4.00
+step c3: COMMIT;
+
+starting permutation: rxwy1 c1 wx2 rx3 c2 ry3 c3
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step c2: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+3 12-22-2008 4.00
+step c3: COMMIT;
+
+starting permutation: rxwy1 c1 wx2 rx3 ry3 c2 c3
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+3 12-22-2008 4.00
+step c2: COMMIT;
+step c3: COMMIT;
+
+starting permutation: rxwy1 c1 wx2 rx3 ry3 c3 c2
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+3 12-22-2008 4.00
+step c3: COMMIT;
+step c2: COMMIT;
+
+starting permutation: rxwy1 c1 rx3 wx2 c2 ry3 c3
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+3 12-22-2008 4.00
+step c3: COMMIT;
+
+starting permutation: rxwy1 c1 rx3 wx2 ry3 c2 c3
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+3 12-22-2008 4.00
+step c2: COMMIT;
+step c3: COMMIT;
+
+starting permutation: rxwy1 c1 rx3 wx2 ry3 c3 c2
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+3 12-22-2008 4.00
+step c3: COMMIT;
+step c2: COMMIT;
+
+starting permutation: rxwy1 c1 rx3 ry3 wx2 c2 c3
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+3 12-22-2008 4.00
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step c3: COMMIT;
+
+starting permutation: rxwy1 c1 rx3 ry3 wx2 c3 c2
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+3 12-22-2008 4.00
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c3: COMMIT;
+step c2: COMMIT;
+
+starting permutation: rxwy1 c1 rx3 ry3 c3 wx2 c2
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+3 12-22-2008 4.00
+step c3: COMMIT;
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+
+starting permutation: rxwy1 wx2 c1 c2 rx3 ry3 c3
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c1: COMMIT;
+step c2: COMMIT;
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-23-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+3 12-22-2008 4.00
+step c3: COMMIT;
+
+starting permutation: rxwy1 wx2 c1 rx3 c2 ry3 c3
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c1: COMMIT;
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step c2: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+3 12-22-2008 4.00
+step c3: COMMIT;
+
+starting permutation: rxwy1 wx2 c1 rx3 ry3 c2 c3
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c1: COMMIT;
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+3 12-22-2008 4.00
+step c2: COMMIT;
+step c3: COMMIT;
+
+starting permutation: rxwy1 wx2 c1 rx3 ry3 c3 c2
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c1: COMMIT;
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+3 12-22-2008 4.00
+step c3: COMMIT;
+step c2: COMMIT;
+
+starting permutation: rxwy1 wx2 c2 c1 rx3 ry3 c3
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step c1: COMMIT;
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-23-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+3 12-22-2008 4.00
+step c3: COMMIT;
+
+starting permutation: rxwy1 wx2 c2 rx3 c1 ry3 c3
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-23-2008
+step c1: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c3: COMMIT;
+
+starting permutation: rxwy1 wx2 c2 rx3 ry3 c1 c3
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-23-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c1: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c3: COMMIT;
+
+starting permutation: rxwy1 wx2 c2 rx3 ry3 c3 c1
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-23-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step c1: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rxwy1 wx2 rx3 c1 c2 ry3 c3
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step c1: COMMIT;
+step c2: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+
+starting permutation: rxwy1 wx2 rx3 c1 ry3 c2 c3
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step c1: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c2: COMMIT;
+step c3: COMMIT;
+
+starting permutation: rxwy1 wx2 rx3 c1 ry3 c3 c2
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step c1: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step c2: COMMIT;
+
+starting permutation: rxwy1 wx2 rx3 c2 c1 ry3 c3
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step c2: COMMIT;
+step c1: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+
+starting permutation: rxwy1 wx2 rx3 c2 ry3 c1 c3
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step c2: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c1: COMMIT;
+step c3: COMMIT;
+
+starting permutation: rxwy1 wx2 rx3 c2 ry3 c3 c1
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step c2: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step c1: COMMIT;
+
+starting permutation: rxwy1 wx2 rx3 ry3 c1 c2 c3
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c1: COMMIT;
+step c2: COMMIT;
+step c3: COMMIT;
+
+starting permutation: rxwy1 wx2 rx3 ry3 c1 c3 c2
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c1: COMMIT;
+step c3: COMMIT;
+step c2: COMMIT;
+
+starting permutation: rxwy1 wx2 rx3 ry3 c2 c1 c3
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c2: COMMIT;
+step c1: COMMIT;
+step c3: COMMIT;
+
+starting permutation: rxwy1 wx2 rx3 ry3 c2 c3 c1
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c2: COMMIT;
+step c3: COMMIT;
+step c1: COMMIT;
+
+starting permutation: rxwy1 wx2 rx3 ry3 c3 c1 c2
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step c1: COMMIT;
+step c2: COMMIT;
+
+starting permutation: rxwy1 wx2 rx3 ry3 c3 c2 c1
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step c2: COMMIT;
+step c1: COMMIT;
+
+starting permutation: rxwy1 rx3 c1 wx2 c2 ry3 c3
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step c1: COMMIT;
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+
+starting permutation: rxwy1 rx3 c1 wx2 ry3 c2 c3
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step c1: COMMIT;
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c2: COMMIT;
+step c3: COMMIT;
+
+starting permutation: rxwy1 rx3 c1 wx2 ry3 c3 c2
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step c1: COMMIT;
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step c2: COMMIT;
+
+starting permutation: rxwy1 rx3 c1 ry3 wx2 c2 c3
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step c1: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step c3: COMMIT;
+
+starting permutation: rxwy1 rx3 c1 ry3 wx2 c3 c2
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step c1: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c3: COMMIT;
+step c2: COMMIT;
+
+starting permutation: rxwy1 rx3 c1 ry3 c3 wx2 c2
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step c1: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+
+starting permutation: rxwy1 rx3 wx2 c1 c2 ry3 c3
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c1: COMMIT;
+step c2: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+
+starting permutation: rxwy1 rx3 wx2 c1 ry3 c2 c3
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c1: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c2: COMMIT;
+step c3: COMMIT;
+
+starting permutation: rxwy1 rx3 wx2 c1 ry3 c3 c2
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c1: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step c2: COMMIT;
+
+starting permutation: rxwy1 rx3 wx2 c2 c1 ry3 c3
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step c1: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+
+starting permutation: rxwy1 rx3 wx2 c2 ry3 c1 c3
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c1: COMMIT;
+step c3: COMMIT;
+
+starting permutation: rxwy1 rx3 wx2 c2 ry3 c3 c1
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step c1: COMMIT;
+
+starting permutation: rxwy1 rx3 wx2 ry3 c1 c2 c3
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c1: COMMIT;
+step c2: COMMIT;
+step c3: COMMIT;
+
+starting permutation: rxwy1 rx3 wx2 ry3 c1 c3 c2
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c1: COMMIT;
+step c3: COMMIT;
+step c2: COMMIT;
+
+starting permutation: rxwy1 rx3 wx2 ry3 c2 c1 c3
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c2: COMMIT;
+step c1: COMMIT;
+step c3: COMMIT;
+
+starting permutation: rxwy1 rx3 wx2 ry3 c2 c3 c1
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c2: COMMIT;
+step c3: COMMIT;
+step c1: COMMIT;
+
+starting permutation: rxwy1 rx3 wx2 ry3 c3 c1 c2
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step c1: COMMIT;
+step c2: COMMIT;
+
+starting permutation: rxwy1 rx3 wx2 ry3 c3 c2 c1
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step c2: COMMIT;
+step c1: COMMIT;
+
+starting permutation: rxwy1 rx3 ry3 c1 wx2 c2 c3
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c1: COMMIT;
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step c3: COMMIT;
+
+starting permutation: rxwy1 rx3 ry3 c1 wx2 c3 c2
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c1: COMMIT;
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c3: COMMIT;
+step c2: COMMIT;
+
+starting permutation: rxwy1 rx3 ry3 c1 c3 wx2 c2
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c1: COMMIT;
+step c3: COMMIT;
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+
+starting permutation: rxwy1 rx3 ry3 wx2 c1 c2 c3
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c1: COMMIT;
+step c2: COMMIT;
+step c3: COMMIT;
+
+starting permutation: rxwy1 rx3 ry3 wx2 c1 c3 c2
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c1: COMMIT;
+step c3: COMMIT;
+step c2: COMMIT;
+
+starting permutation: rxwy1 rx3 ry3 wx2 c2 c1 c3
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step c1: COMMIT;
+step c3: COMMIT;
+
+starting permutation: rxwy1 rx3 ry3 wx2 c2 c3 c1
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step c3: COMMIT;
+step c1: COMMIT;
+
+starting permutation: rxwy1 rx3 ry3 wx2 c3 c1 c2
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c3: COMMIT;
+step c1: COMMIT;
+step c2: COMMIT;
+
+starting permutation: rxwy1 rx3 ry3 wx2 c3 c2 c1
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c3: COMMIT;
+step c2: COMMIT;
+step c1: COMMIT;
+
+starting permutation: rxwy1 rx3 ry3 c3 c1 wx2 c2
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step c1: COMMIT;
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+
+starting permutation: rxwy1 rx3 ry3 c3 wx2 c1 c2
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c1: COMMIT;
+step c2: COMMIT;
+
+starting permutation: rxwy1 rx3 ry3 c3 wx2 c2 c1
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step c1: COMMIT;
+
+starting permutation: wx2 rxwy1 c1 c2 rx3 ry3 c3
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step c2: COMMIT;
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-23-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+3 12-22-2008 4.00
+step c3: COMMIT;
+
+starting permutation: wx2 rxwy1 c1 rx3 c2 ry3 c3
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step c2: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+3 12-22-2008 4.00
+step c3: COMMIT;
+
+starting permutation: wx2 rxwy1 c1 rx3 ry3 c2 c3
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+3 12-22-2008 4.00
+step c2: COMMIT;
+step c3: COMMIT;
+
+starting permutation: wx2 rxwy1 c1 rx3 ry3 c3 c2
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+3 12-22-2008 4.00
+step c3: COMMIT;
+step c2: COMMIT;
+
+starting permutation: wx2 rxwy1 c2 c1 rx3 ry3 c3
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c2: COMMIT;
+step c1: COMMIT;
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-23-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+3 12-22-2008 4.00
+step c3: COMMIT;
+
+starting permutation: wx2 rxwy1 c2 rx3 c1 ry3 c3
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c2: COMMIT;
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-23-2008
+step c1: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c3: COMMIT;
+
+starting permutation: wx2 rxwy1 c2 rx3 ry3 c1 c3
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c2: COMMIT;
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-23-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c1: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c3: COMMIT;
+
+starting permutation: wx2 rxwy1 c2 rx3 ry3 c3 c1
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c2: COMMIT;
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-23-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step c1: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: wx2 rxwy1 rx3 c1 c2 ry3 c3
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step c1: COMMIT;
+step c2: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+
+starting permutation: wx2 rxwy1 rx3 c1 ry3 c2 c3
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step c1: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c2: COMMIT;
+step c3: COMMIT;
+
+starting permutation: wx2 rxwy1 rx3 c1 ry3 c3 c2
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step c1: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step c2: COMMIT;
+
+starting permutation: wx2 rxwy1 rx3 c2 c1 ry3 c3
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step c2: COMMIT;
+step c1: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+
+starting permutation: wx2 rxwy1 rx3 c2 ry3 c1 c3
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step c2: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c1: COMMIT;
+step c3: COMMIT;
+
+starting permutation: wx2 rxwy1 rx3 c2 ry3 c3 c1
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step c2: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step c1: COMMIT;
+
+starting permutation: wx2 rxwy1 rx3 ry3 c1 c2 c3
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c1: COMMIT;
+step c2: COMMIT;
+step c3: COMMIT;
+
+starting permutation: wx2 rxwy1 rx3 ry3 c1 c3 c2
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c1: COMMIT;
+step c3: COMMIT;
+step c2: COMMIT;
+
+starting permutation: wx2 rxwy1 rx3 ry3 c2 c1 c3
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c2: COMMIT;
+step c1: COMMIT;
+step c3: COMMIT;
+
+starting permutation: wx2 rxwy1 rx3 ry3 c2 c3 c1
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c2: COMMIT;
+step c3: COMMIT;
+step c1: COMMIT;
+
+starting permutation: wx2 rxwy1 rx3 ry3 c3 c1 c2
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step c1: COMMIT;
+step c2: COMMIT;
+
+starting permutation: wx2 rxwy1 rx3 ry3 c3 c2 c1
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step c2: COMMIT;
+step c1: COMMIT;
+
+starting permutation: wx2 c2 rxwy1 c1 rx3 ry3 c3
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-23-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+
+starting permutation: wx2 c2 rxwy1 rx3 c1 ry3 c3
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-23-2008
+step c1: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+
+starting permutation: wx2 c2 rxwy1 rx3 ry3 c1 c3
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-23-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c1: COMMIT;
+step c3: COMMIT;
+
+starting permutation: wx2 c2 rxwy1 rx3 ry3 c3 c1
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-23-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step c1: COMMIT;
+
+starting permutation: wx2 c2 rx3 rxwy1 c1 ry3 c3
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-23-2008
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+
+starting permutation: wx2 c2 rx3 rxwy1 ry3 c1 c3
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-23-2008
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c1: COMMIT;
+step c3: COMMIT;
+
+starting permutation: wx2 c2 rx3 rxwy1 ry3 c3 c1
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-23-2008
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step c1: COMMIT;
+
+starting permutation: wx2 c2 rx3 ry3 rxwy1 c1 c3
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-23-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step c3: COMMIT;
+
+starting permutation: wx2 c2 rx3 ry3 rxwy1 c3 c1
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-23-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c3: COMMIT;
+step c1: COMMIT;
+
+starting permutation: wx2 c2 rx3 ry3 c3 rxwy1 c1
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-23-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+
+starting permutation: wx2 rx3 rxwy1 c1 c2 ry3 c3
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step c2: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+
+starting permutation: wx2 rx3 rxwy1 c1 ry3 c2 c3
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c2: COMMIT;
+step c3: COMMIT;
+
+starting permutation: wx2 rx3 rxwy1 c1 ry3 c3 c2
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step c2: COMMIT;
+
+starting permutation: wx2 rx3 rxwy1 c2 c1 ry3 c3
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c2: COMMIT;
+step c1: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+
+starting permutation: wx2 rx3 rxwy1 c2 ry3 c1 c3
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c2: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c1: COMMIT;
+step c3: COMMIT;
+
+starting permutation: wx2 rx3 rxwy1 c2 ry3 c3 c1
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c2: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step c1: COMMIT;
+
+starting permutation: wx2 rx3 rxwy1 ry3 c1 c2 c3
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c1: COMMIT;
+step c2: COMMIT;
+step c3: COMMIT;
+
+starting permutation: wx2 rx3 rxwy1 ry3 c1 c3 c2
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c1: COMMIT;
+step c3: COMMIT;
+step c2: COMMIT;
+
+starting permutation: wx2 rx3 rxwy1 ry3 c2 c1 c3
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c2: COMMIT;
+step c1: COMMIT;
+step c3: COMMIT;
+
+starting permutation: wx2 rx3 rxwy1 ry3 c2 c3 c1
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c2: COMMIT;
+step c3: COMMIT;
+step c1: COMMIT;
+
+starting permutation: wx2 rx3 rxwy1 ry3 c3 c1 c2
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step c1: COMMIT;
+step c2: COMMIT;
+
+starting permutation: wx2 rx3 rxwy1 ry3 c3 c2 c1
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step c2: COMMIT;
+step c1: COMMIT;
+
+starting permutation: wx2 rx3 c2 rxwy1 c1 ry3 c3
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step c2: COMMIT;
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+
+starting permutation: wx2 rx3 c2 rxwy1 ry3 c1 c3
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step c2: COMMIT;
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c1: COMMIT;
+step c3: COMMIT;
+
+starting permutation: wx2 rx3 c2 rxwy1 ry3 c3 c1
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step c2: COMMIT;
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step c1: COMMIT;
+
+starting permutation: wx2 rx3 c2 ry3 rxwy1 c1 c3
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step c2: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step c3: COMMIT;
+
+starting permutation: wx2 rx3 c2 ry3 rxwy1 c3 c1
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step c2: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c3: COMMIT;
+step c1: COMMIT;
+
+starting permutation: wx2 rx3 c2 ry3 c3 rxwy1 c1
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step c2: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+
+starting permutation: wx2 rx3 ry3 rxwy1 c1 c2 c3
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step c2: COMMIT;
+step c3: COMMIT;
+
+starting permutation: wx2 rx3 ry3 rxwy1 c1 c3 c2
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step c3: COMMIT;
+step c2: COMMIT;
+
+starting permutation: wx2 rx3 ry3 rxwy1 c2 c1 c3
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c2: COMMIT;
+step c1: COMMIT;
+step c3: COMMIT;
+
+starting permutation: wx2 rx3 ry3 rxwy1 c2 c3 c1
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c2: COMMIT;
+step c3: COMMIT;
+step c1: COMMIT;
+
+starting permutation: wx2 rx3 ry3 rxwy1 c3 c1 c2
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c3: COMMIT;
+step c1: COMMIT;
+step c2: COMMIT;
+
+starting permutation: wx2 rx3 ry3 rxwy1 c3 c2 c1
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c3: COMMIT;
+step c2: COMMIT;
+step c1: COMMIT;
+
+starting permutation: wx2 rx3 ry3 c2 rxwy1 c1 c3
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c2: COMMIT;
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step c3: COMMIT;
+
+starting permutation: wx2 rx3 ry3 c2 rxwy1 c3 c1
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c2: COMMIT;
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c3: COMMIT;
+step c1: COMMIT;
+
+starting permutation: wx2 rx3 ry3 c2 c3 rxwy1 c1
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c2: COMMIT;
+step c3: COMMIT;
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+
+starting permutation: wx2 rx3 ry3 c3 rxwy1 c1 c2
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step c2: COMMIT;
+
+starting permutation: wx2 rx3 ry3 c3 rxwy1 c2 c1
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c2: COMMIT;
+step c1: COMMIT;
+
+starting permutation: wx2 rx3 ry3 c3 c2 rxwy1 c1
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step c2: COMMIT;
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+
+starting permutation: rx3 rxwy1 c1 wx2 c2 ry3 c3
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+
+starting permutation: rx3 rxwy1 c1 wx2 ry3 c2 c3
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c2: COMMIT;
+step c3: COMMIT;
+
+starting permutation: rx3 rxwy1 c1 wx2 ry3 c3 c2
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step c2: COMMIT;
+
+starting permutation: rx3 rxwy1 c1 ry3 wx2 c2 c3
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step c3: COMMIT;
+
+starting permutation: rx3 rxwy1 c1 ry3 wx2 c3 c2
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c3: COMMIT;
+step c2: COMMIT;
+
+starting permutation: rx3 rxwy1 c1 ry3 c3 wx2 c2
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+
+starting permutation: rx3 rxwy1 wx2 c1 c2 ry3 c3
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c1: COMMIT;
+step c2: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+
+starting permutation: rx3 rxwy1 wx2 c1 ry3 c2 c3
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c1: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c2: COMMIT;
+step c3: COMMIT;
+
+starting permutation: rx3 rxwy1 wx2 c1 ry3 c3 c2
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c1: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step c2: COMMIT;
+
+starting permutation: rx3 rxwy1 wx2 c2 c1 ry3 c3
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step c1: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+
+starting permutation: rx3 rxwy1 wx2 c2 ry3 c1 c3
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c1: COMMIT;
+step c3: COMMIT;
+
+starting permutation: rx3 rxwy1 wx2 c2 ry3 c3 c1
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step c1: COMMIT;
+
+starting permutation: rx3 rxwy1 wx2 ry3 c1 c2 c3
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c1: COMMIT;
+step c2: COMMIT;
+step c3: COMMIT;
+
+starting permutation: rx3 rxwy1 wx2 ry3 c1 c3 c2
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c1: COMMIT;
+step c3: COMMIT;
+step c2: COMMIT;
+
+starting permutation: rx3 rxwy1 wx2 ry3 c2 c1 c3
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c2: COMMIT;
+step c1: COMMIT;
+step c3: COMMIT;
+
+starting permutation: rx3 rxwy1 wx2 ry3 c2 c3 c1
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c2: COMMIT;
+step c3: COMMIT;
+step c1: COMMIT;
+
+starting permutation: rx3 rxwy1 wx2 ry3 c3 c1 c2
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step c1: COMMIT;
+step c2: COMMIT;
+
+starting permutation: rx3 rxwy1 wx2 ry3 c3 c2 c1
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step c2: COMMIT;
+step c1: COMMIT;
+
+starting permutation: rx3 rxwy1 ry3 c1 wx2 c2 c3
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c1: COMMIT;
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step c3: COMMIT;
+
+starting permutation: rx3 rxwy1 ry3 c1 wx2 c3 c2
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c1: COMMIT;
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c3: COMMIT;
+step c2: COMMIT;
+
+starting permutation: rx3 rxwy1 ry3 c1 c3 wx2 c2
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c1: COMMIT;
+step c3: COMMIT;
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+
+starting permutation: rx3 rxwy1 ry3 wx2 c1 c2 c3
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c1: COMMIT;
+step c2: COMMIT;
+step c3: COMMIT;
+
+starting permutation: rx3 rxwy1 ry3 wx2 c1 c3 c2
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c1: COMMIT;
+step c3: COMMIT;
+step c2: COMMIT;
+
+starting permutation: rx3 rxwy1 ry3 wx2 c2 c1 c3
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step c1: COMMIT;
+step c3: COMMIT;
+
+starting permutation: rx3 rxwy1 ry3 wx2 c2 c3 c1
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step c3: COMMIT;
+step c1: COMMIT;
+
+starting permutation: rx3 rxwy1 ry3 wx2 c3 c1 c2
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c3: COMMIT;
+step c1: COMMIT;
+step c2: COMMIT;
+
+starting permutation: rx3 rxwy1 ry3 wx2 c3 c2 c1
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c3: COMMIT;
+step c2: COMMIT;
+step c1: COMMIT;
+
+starting permutation: rx3 rxwy1 ry3 c3 c1 wx2 c2
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step c1: COMMIT;
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+
+starting permutation: rx3 rxwy1 ry3 c3 wx2 c1 c2
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c1: COMMIT;
+step c2: COMMIT;
+
+starting permutation: rx3 rxwy1 ry3 c3 wx2 c2 c1
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step c1: COMMIT;
+
+starting permutation: rx3 wx2 rxwy1 c1 c2 ry3 c3
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step c2: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+
+starting permutation: rx3 wx2 rxwy1 c1 ry3 c2 c3
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c2: COMMIT;
+step c3: COMMIT;
+
+starting permutation: rx3 wx2 rxwy1 c1 ry3 c3 c2
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step c2: COMMIT;
+
+starting permutation: rx3 wx2 rxwy1 c2 c1 ry3 c3
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c2: COMMIT;
+step c1: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+
+starting permutation: rx3 wx2 rxwy1 c2 ry3 c1 c3
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c2: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c1: COMMIT;
+step c3: COMMIT;
+
+starting permutation: rx3 wx2 rxwy1 c2 ry3 c3 c1
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c2: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step c1: COMMIT;
+
+starting permutation: rx3 wx2 rxwy1 ry3 c1 c2 c3
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c1: COMMIT;
+step c2: COMMIT;
+step c3: COMMIT;
+
+starting permutation: rx3 wx2 rxwy1 ry3 c1 c3 c2
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c1: COMMIT;
+step c3: COMMIT;
+step c2: COMMIT;
+
+starting permutation: rx3 wx2 rxwy1 ry3 c2 c1 c3
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c2: COMMIT;
+step c1: COMMIT;
+step c3: COMMIT;
+
+starting permutation: rx3 wx2 rxwy1 ry3 c2 c3 c1
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c2: COMMIT;
+step c3: COMMIT;
+step c1: COMMIT;
+
+starting permutation: rx3 wx2 rxwy1 ry3 c3 c1 c2
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step c1: COMMIT;
+step c2: COMMIT;
+
+starting permutation: rx3 wx2 rxwy1 ry3 c3 c2 c1
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step c2: COMMIT;
+step c1: COMMIT;
+
+starting permutation: rx3 wx2 c2 rxwy1 c1 ry3 c3
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+
+starting permutation: rx3 wx2 c2 rxwy1 ry3 c1 c3
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c1: COMMIT;
+step c3: COMMIT;
+
+starting permutation: rx3 wx2 c2 rxwy1 ry3 c3 c1
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step c1: COMMIT;
+
+starting permutation: rx3 wx2 c2 ry3 rxwy1 c1 c3
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step c3: COMMIT;
+
+starting permutation: rx3 wx2 c2 ry3 rxwy1 c3 c1
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c3: COMMIT;
+step c1: COMMIT;
+
+starting permutation: rx3 wx2 c2 ry3 c3 rxwy1 c1
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+
+starting permutation: rx3 wx2 ry3 rxwy1 c1 c2 c3
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step c2: COMMIT;
+step c3: COMMIT;
+
+starting permutation: rx3 wx2 ry3 rxwy1 c1 c3 c2
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step c3: COMMIT;
+step c2: COMMIT;
+
+starting permutation: rx3 wx2 ry3 rxwy1 c2 c1 c3
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c2: COMMIT;
+step c1: COMMIT;
+step c3: COMMIT;
+
+starting permutation: rx3 wx2 ry3 rxwy1 c2 c3 c1
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c2: COMMIT;
+step c3: COMMIT;
+step c1: COMMIT;
+
+starting permutation: rx3 wx2 ry3 rxwy1 c3 c1 c2
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c3: COMMIT;
+step c1: COMMIT;
+step c2: COMMIT;
+
+starting permutation: rx3 wx2 ry3 rxwy1 c3 c2 c1
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c3: COMMIT;
+step c2: COMMIT;
+step c1: COMMIT;
+
+starting permutation: rx3 wx2 ry3 c2 rxwy1 c1 c3
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c2: COMMIT;
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step c3: COMMIT;
+
+starting permutation: rx3 wx2 ry3 c2 rxwy1 c3 c1
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c2: COMMIT;
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c3: COMMIT;
+step c1: COMMIT;
+
+starting permutation: rx3 wx2 ry3 c2 c3 rxwy1 c1
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c2: COMMIT;
+step c3: COMMIT;
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+
+starting permutation: rx3 wx2 ry3 c3 rxwy1 c1 c2
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step c2: COMMIT;
+
+starting permutation: rx3 wx2 ry3 c3 rxwy1 c2 c1
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c2: COMMIT;
+step c1: COMMIT;
+
+starting permutation: rx3 wx2 ry3 c3 c2 rxwy1 c1
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step c2: COMMIT;
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+
+starting permutation: rx3 ry3 rxwy1 c1 wx2 c2 c3
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step c3: COMMIT;
+
+starting permutation: rx3 ry3 rxwy1 c1 wx2 c3 c2
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c3: COMMIT;
+step c2: COMMIT;
+
+starting permutation: rx3 ry3 rxwy1 c1 c3 wx2 c2
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step c3: COMMIT;
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+
+starting permutation: rx3 ry3 rxwy1 wx2 c1 c2 c3
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c1: COMMIT;
+step c2: COMMIT;
+step c3: COMMIT;
+
+starting permutation: rx3 ry3 rxwy1 wx2 c1 c3 c2
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c1: COMMIT;
+step c3: COMMIT;
+step c2: COMMIT;
+
+starting permutation: rx3 ry3 rxwy1 wx2 c2 c1 c3
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step c1: COMMIT;
+step c3: COMMIT;
+
+starting permutation: rx3 ry3 rxwy1 wx2 c2 c3 c1
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step c3: COMMIT;
+step c1: COMMIT;
+
+starting permutation: rx3 ry3 rxwy1 wx2 c3 c1 c2
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c3: COMMIT;
+step c1: COMMIT;
+step c2: COMMIT;
+
+starting permutation: rx3 ry3 rxwy1 wx2 c3 c2 c1
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c3: COMMIT;
+step c2: COMMIT;
+step c1: COMMIT;
+
+starting permutation: rx3 ry3 rxwy1 c3 c1 wx2 c2
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c3: COMMIT;
+step c1: COMMIT;
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+
+starting permutation: rx3 ry3 rxwy1 c3 wx2 c1 c2
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c3: COMMIT;
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c1: COMMIT;
+step c2: COMMIT;
+
+starting permutation: rx3 ry3 rxwy1 c3 wx2 c2 c1
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c3: COMMIT;
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step c1: COMMIT;
+
+starting permutation: rx3 ry3 wx2 rxwy1 c1 c2 c3
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step c2: COMMIT;
+step c3: COMMIT;
+
+starting permutation: rx3 ry3 wx2 rxwy1 c1 c3 c2
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step c3: COMMIT;
+step c2: COMMIT;
+
+starting permutation: rx3 ry3 wx2 rxwy1 c2 c1 c3
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c2: COMMIT;
+step c1: COMMIT;
+step c3: COMMIT;
+
+starting permutation: rx3 ry3 wx2 rxwy1 c2 c3 c1
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c2: COMMIT;
+step c3: COMMIT;
+step c1: COMMIT;
+
+starting permutation: rx3 ry3 wx2 rxwy1 c3 c1 c2
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c3: COMMIT;
+step c1: COMMIT;
+step c2: COMMIT;
+
+starting permutation: rx3 ry3 wx2 rxwy1 c3 c2 c1
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c3: COMMIT;
+step c2: COMMIT;
+step c1: COMMIT;
+
+starting permutation: rx3 ry3 wx2 c2 rxwy1 c1 c3
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step c3: COMMIT;
+
+starting permutation: rx3 ry3 wx2 c2 rxwy1 c3 c1
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c3: COMMIT;
+step c1: COMMIT;
+
+starting permutation: rx3 ry3 wx2 c2 c3 rxwy1 c1
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step c3: COMMIT;
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+
+starting permutation: rx3 ry3 wx2 c3 rxwy1 c1 c2
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c3: COMMIT;
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step c2: COMMIT;
+
+starting permutation: rx3 ry3 wx2 c3 rxwy1 c2 c1
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c3: COMMIT;
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c2: COMMIT;
+step c1: COMMIT;
+
+starting permutation: rx3 ry3 wx2 c3 c2 rxwy1 c1
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c3: COMMIT;
+step c2: COMMIT;
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+
+starting permutation: rx3 ry3 c3 rxwy1 c1 wx2 c2
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+
+starting permutation: rx3 ry3 c3 rxwy1 wx2 c1 c2
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c1: COMMIT;
+step c2: COMMIT;
+
+starting permutation: rx3 ry3 c3 rxwy1 wx2 c2 c1
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step c1: COMMIT;
+
+starting permutation: rx3 ry3 c3 wx2 rxwy1 c1 c2
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
+step c2: COMMIT;
+
+starting permutation: rx3 ry3 c3 wx2 rxwy1 c2 c1
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c2: COMMIT;
+step c1: COMMIT;
+
+starting permutation: rx3 ry3 c3 wx2 c2 rxwy1 c1
+step rx3: SELECT * FROM ctl WHERE k = 'receipt';
+k deposit_date
+
+receipt 12-22-2008
+step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22';
+receipt_no deposit_date amount
+
+1 12-22-2008 1.00
+2 12-22-2008 2.00
+step c3: COMMIT;
+step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt';
+step c2: COMMIT;
+step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00);
+step c1: COMMIT;
diff --git a/src/test/isolation/expected/referential-integrity.out b/src/test/isolation/expected/referential-integrity.out
new file mode 100644
index 0000000000..569d0347cc
--- /dev/null
+++ b/src/test/isolation/expected/referential-integrity.out
@@ -0,0 +1,629 @@
+Parsed test spec with 2 sessions
+
+starting permutation: rx1 wy1 c1 rx2 ry2 wx2 c2
+step rx1: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step wy1: INSERT INTO b VALUES (1);
+step c1: COMMIT;
+step rx2: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step ry2: SELECT a_id FROM b WHERE a_id = 1;
+a_id
+
+1
+step wx2: DELETE FROM a WHERE i = 1;
+step c2: COMMIT;
+
+starting permutation: rx1 wy1 rx2 c1 ry2 wx2 c2
+step rx1: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step wy1: INSERT INTO b VALUES (1);
+step rx2: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step c1: COMMIT;
+step ry2: SELECT a_id FROM b WHERE a_id = 1;
+a_id
+
+step wx2: DELETE FROM a WHERE i = 1;
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c2: COMMIT;
+
+starting permutation: rx1 wy1 rx2 ry2 c1 wx2 c2
+step rx1: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step wy1: INSERT INTO b VALUES (1);
+step rx2: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step ry2: SELECT a_id FROM b WHERE a_id = 1;
+a_id
+
+step c1: COMMIT;
+step wx2: DELETE FROM a WHERE i = 1;
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c2: COMMIT;
+
+starting permutation: rx1 wy1 rx2 ry2 wx2 c1 c2
+step rx1: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step wy1: INSERT INTO b VALUES (1);
+step rx2: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step ry2: SELECT a_id FROM b WHERE a_id = 1;
+a_id
+
+step wx2: DELETE FROM a WHERE i = 1;
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rx1 wy1 rx2 ry2 wx2 c2 c1
+step rx1: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step wy1: INSERT INTO b VALUES (1);
+step rx2: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step ry2: SELECT a_id FROM b WHERE a_id = 1;
+a_id
+
+step wx2: DELETE FROM a WHERE i = 1;
+step c2: COMMIT;
+step c1: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rx1 rx2 wy1 c1 ry2 wx2 c2
+step rx1: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step rx2: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step wy1: INSERT INTO b VALUES (1);
+step c1: COMMIT;
+step ry2: SELECT a_id FROM b WHERE a_id = 1;
+a_id
+
+step wx2: DELETE FROM a WHERE i = 1;
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c2: COMMIT;
+
+starting permutation: rx1 rx2 wy1 ry2 c1 wx2 c2
+step rx1: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step rx2: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step wy1: INSERT INTO b VALUES (1);
+step ry2: SELECT a_id FROM b WHERE a_id = 1;
+a_id
+
+step c1: COMMIT;
+step wx2: DELETE FROM a WHERE i = 1;
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c2: COMMIT;
+
+starting permutation: rx1 rx2 wy1 ry2 wx2 c1 c2
+step rx1: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step rx2: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step wy1: INSERT INTO b VALUES (1);
+step ry2: SELECT a_id FROM b WHERE a_id = 1;
+a_id
+
+step wx2: DELETE FROM a WHERE i = 1;
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rx1 rx2 wy1 ry2 wx2 c2 c1
+step rx1: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step rx2: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step wy1: INSERT INTO b VALUES (1);
+step ry2: SELECT a_id FROM b WHERE a_id = 1;
+a_id
+
+step wx2: DELETE FROM a WHERE i = 1;
+step c2: COMMIT;
+step c1: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rx1 rx2 ry2 wy1 c1 wx2 c2
+step rx1: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step rx2: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step ry2: SELECT a_id FROM b WHERE a_id = 1;
+a_id
+
+step wy1: INSERT INTO b VALUES (1);
+step c1: COMMIT;
+step wx2: DELETE FROM a WHERE i = 1;
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c2: COMMIT;
+
+starting permutation: rx1 rx2 ry2 wy1 wx2 c1 c2
+step rx1: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step rx2: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step ry2: SELECT a_id FROM b WHERE a_id = 1;
+a_id
+
+step wy1: INSERT INTO b VALUES (1);
+step wx2: DELETE FROM a WHERE i = 1;
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rx1 rx2 ry2 wy1 wx2 c2 c1
+step rx1: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step rx2: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step ry2: SELECT a_id FROM b WHERE a_id = 1;
+a_id
+
+step wy1: INSERT INTO b VALUES (1);
+step wx2: DELETE FROM a WHERE i = 1;
+step c2: COMMIT;
+step c1: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rx1 rx2 ry2 wx2 wy1 c1 c2
+step rx1: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step rx2: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step ry2: SELECT a_id FROM b WHERE a_id = 1;
+a_id
+
+step wx2: DELETE FROM a WHERE i = 1;
+step wy1: INSERT INTO b VALUES (1);
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rx1 rx2 ry2 wx2 wy1 c2 c1
+step rx1: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step rx2: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step ry2: SELECT a_id FROM b WHERE a_id = 1;
+a_id
+
+step wx2: DELETE FROM a WHERE i = 1;
+step wy1: INSERT INTO b VALUES (1);
+step c2: COMMIT;
+step c1: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rx1 rx2 ry2 wx2 c2 wy1 c1
+step rx1: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step rx2: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step ry2: SELECT a_id FROM b WHERE a_id = 1;
+a_id
+
+step wx2: DELETE FROM a WHERE i = 1;
+step c2: COMMIT;
+step wy1: INSERT INTO b VALUES (1);
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c1: COMMIT;
+
+starting permutation: rx2 rx1 wy1 c1 ry2 wx2 c2
+step rx2: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step rx1: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step wy1: INSERT INTO b VALUES (1);
+step c1: COMMIT;
+step ry2: SELECT a_id FROM b WHERE a_id = 1;
+a_id
+
+step wx2: DELETE FROM a WHERE i = 1;
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c2: COMMIT;
+
+starting permutation: rx2 rx1 wy1 ry2 c1 wx2 c2
+step rx2: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step rx1: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step wy1: INSERT INTO b VALUES (1);
+step ry2: SELECT a_id FROM b WHERE a_id = 1;
+a_id
+
+step c1: COMMIT;
+step wx2: DELETE FROM a WHERE i = 1;
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c2: COMMIT;
+
+starting permutation: rx2 rx1 wy1 ry2 wx2 c1 c2
+step rx2: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step rx1: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step wy1: INSERT INTO b VALUES (1);
+step ry2: SELECT a_id FROM b WHERE a_id = 1;
+a_id
+
+step wx2: DELETE FROM a WHERE i = 1;
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rx2 rx1 wy1 ry2 wx2 c2 c1
+step rx2: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step rx1: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step wy1: INSERT INTO b VALUES (1);
+step ry2: SELECT a_id FROM b WHERE a_id = 1;
+a_id
+
+step wx2: DELETE FROM a WHERE i = 1;
+step c2: COMMIT;
+step c1: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rx2 rx1 ry2 wy1 c1 wx2 c2
+step rx2: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step rx1: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step ry2: SELECT a_id FROM b WHERE a_id = 1;
+a_id
+
+step wy1: INSERT INTO b VALUES (1);
+step c1: COMMIT;
+step wx2: DELETE FROM a WHERE i = 1;
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c2: COMMIT;
+
+starting permutation: rx2 rx1 ry2 wy1 wx2 c1 c2
+step rx2: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step rx1: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step ry2: SELECT a_id FROM b WHERE a_id = 1;
+a_id
+
+step wy1: INSERT INTO b VALUES (1);
+step wx2: DELETE FROM a WHERE i = 1;
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rx2 rx1 ry2 wy1 wx2 c2 c1
+step rx2: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step rx1: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step ry2: SELECT a_id FROM b WHERE a_id = 1;
+a_id
+
+step wy1: INSERT INTO b VALUES (1);
+step wx2: DELETE FROM a WHERE i = 1;
+step c2: COMMIT;
+step c1: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rx2 rx1 ry2 wx2 wy1 c1 c2
+step rx2: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step rx1: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step ry2: SELECT a_id FROM b WHERE a_id = 1;
+a_id
+
+step wx2: DELETE FROM a WHERE i = 1;
+step wy1: INSERT INTO b VALUES (1);
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rx2 rx1 ry2 wx2 wy1 c2 c1
+step rx2: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step rx1: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step ry2: SELECT a_id FROM b WHERE a_id = 1;
+a_id
+
+step wx2: DELETE FROM a WHERE i = 1;
+step wy1: INSERT INTO b VALUES (1);
+step c2: COMMIT;
+step c1: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rx2 rx1 ry2 wx2 c2 wy1 c1
+step rx2: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step rx1: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step ry2: SELECT a_id FROM b WHERE a_id = 1;
+a_id
+
+step wx2: DELETE FROM a WHERE i = 1;
+step c2: COMMIT;
+step wy1: INSERT INTO b VALUES (1);
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c1: COMMIT;
+
+starting permutation: rx2 ry2 rx1 wy1 c1 wx2 c2
+step rx2: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step ry2: SELECT a_id FROM b WHERE a_id = 1;
+a_id
+
+step rx1: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step wy1: INSERT INTO b VALUES (1);
+step c1: COMMIT;
+step wx2: DELETE FROM a WHERE i = 1;
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c2: COMMIT;
+
+starting permutation: rx2 ry2 rx1 wy1 wx2 c1 c2
+step rx2: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step ry2: SELECT a_id FROM b WHERE a_id = 1;
+a_id
+
+step rx1: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step wy1: INSERT INTO b VALUES (1);
+step wx2: DELETE FROM a WHERE i = 1;
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rx2 ry2 rx1 wy1 wx2 c2 c1
+step rx2: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step ry2: SELECT a_id FROM b WHERE a_id = 1;
+a_id
+
+step rx1: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step wy1: INSERT INTO b VALUES (1);
+step wx2: DELETE FROM a WHERE i = 1;
+step c2: COMMIT;
+step c1: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rx2 ry2 rx1 wx2 wy1 c1 c2
+step rx2: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step ry2: SELECT a_id FROM b WHERE a_id = 1;
+a_id
+
+step rx1: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step wx2: DELETE FROM a WHERE i = 1;
+step wy1: INSERT INTO b VALUES (1);
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rx2 ry2 rx1 wx2 wy1 c2 c1
+step rx2: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step ry2: SELECT a_id FROM b WHERE a_id = 1;
+a_id
+
+step rx1: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step wx2: DELETE FROM a WHERE i = 1;
+step wy1: INSERT INTO b VALUES (1);
+step c2: COMMIT;
+step c1: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rx2 ry2 rx1 wx2 c2 wy1 c1
+step rx2: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step ry2: SELECT a_id FROM b WHERE a_id = 1;
+a_id
+
+step rx1: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step wx2: DELETE FROM a WHERE i = 1;
+step c2: COMMIT;
+step wy1: INSERT INTO b VALUES (1);
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c1: COMMIT;
+
+starting permutation: rx2 ry2 wx2 rx1 wy1 c1 c2
+step rx2: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step ry2: SELECT a_id FROM b WHERE a_id = 1;
+a_id
+
+step wx2: DELETE FROM a WHERE i = 1;
+step rx1: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step wy1: INSERT INTO b VALUES (1);
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rx2 ry2 wx2 rx1 wy1 c2 c1
+step rx2: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step ry2: SELECT a_id FROM b WHERE a_id = 1;
+a_id
+
+step wx2: DELETE FROM a WHERE i = 1;
+step rx1: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step wy1: INSERT INTO b VALUES (1);
+step c2: COMMIT;
+step c1: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rx2 ry2 wx2 rx1 c2 wy1 c1
+step rx2: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step ry2: SELECT a_id FROM b WHERE a_id = 1;
+a_id
+
+step wx2: DELETE FROM a WHERE i = 1;
+step rx1: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step c2: COMMIT;
+step wy1: INSERT INTO b VALUES (1);
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c1: COMMIT;
+
+starting permutation: rx2 ry2 wx2 c2 rx1 wy1 c1
+step rx2: SELECT i FROM a WHERE i = 1;
+i
+
+1
+step ry2: SELECT a_id FROM b WHERE a_id = 1;
+a_id
+
+step wx2: DELETE FROM a WHERE i = 1;
+step c2: COMMIT;
+step rx1: SELECT i FROM a WHERE i = 1;
+i
+
+step wy1: INSERT INTO b VALUES (1);
+step c1: COMMIT;
diff --git a/src/test/isolation/expected/ri-trigger.out b/src/test/isolation/expected/ri-trigger.out
new file mode 100644
index 0000000000..9709e77195
--- /dev/null
+++ b/src/test/isolation/expected/ri-trigger.out
@@ -0,0 +1,111 @@
+Parsed test spec with 2 sessions
+
+starting permutation: wxry1 c1 r2 wyrx2 c2
+step wxry1: INSERT INTO child (parent_id) VALUES (0);
+step c1: COMMIT;
+step r2: SELECT TRUE;
+bool
+
+t
+step wyrx2: DELETE FROM parent WHERE parent_id = 0;
+ERROR: child row exists
+step c2: COMMIT;
+
+starting permutation: wxry1 r2 c1 wyrx2 c2
+step wxry1: INSERT INTO child (parent_id) VALUES (0);
+step r2: SELECT TRUE;
+bool
+
+t
+step c1: COMMIT;
+step wyrx2: DELETE FROM parent WHERE parent_id = 0;
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c2: COMMIT;
+
+starting permutation: wxry1 r2 wyrx2 c1 c2
+step wxry1: INSERT INTO child (parent_id) VALUES (0);
+step r2: SELECT TRUE;
+bool
+
+t
+step wyrx2: DELETE FROM parent WHERE parent_id = 0;
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: wxry1 r2 wyrx2 c2 c1
+step wxry1: INSERT INTO child (parent_id) VALUES (0);
+step r2: SELECT TRUE;
+bool
+
+t
+step wyrx2: DELETE FROM parent WHERE parent_id = 0;
+step c2: COMMIT;
+step c1: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: r2 wxry1 c1 wyrx2 c2
+step r2: SELECT TRUE;
+bool
+
+t
+step wxry1: INSERT INTO child (parent_id) VALUES (0);
+step c1: COMMIT;
+step wyrx2: DELETE FROM parent WHERE parent_id = 0;
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c2: COMMIT;
+
+starting permutation: r2 wxry1 wyrx2 c1 c2
+step r2: SELECT TRUE;
+bool
+
+t
+step wxry1: INSERT INTO child (parent_id) VALUES (0);
+step wyrx2: DELETE FROM parent WHERE parent_id = 0;
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: r2 wxry1 wyrx2 c2 c1
+step r2: SELECT TRUE;
+bool
+
+t
+step wxry1: INSERT INTO child (parent_id) VALUES (0);
+step wyrx2: DELETE FROM parent WHERE parent_id = 0;
+step c2: COMMIT;
+step c1: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: r2 wyrx2 wxry1 c1 c2
+step r2: SELECT TRUE;
+bool
+
+t
+step wyrx2: DELETE FROM parent WHERE parent_id = 0;
+step wxry1: INSERT INTO child (parent_id) VALUES (0);
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: r2 wyrx2 wxry1 c2 c1
+step r2: SELECT TRUE;
+bool
+
+t
+step wyrx2: DELETE FROM parent WHERE parent_id = 0;
+step wxry1: INSERT INTO child (parent_id) VALUES (0);
+step c2: COMMIT;
+step c1: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: r2 wyrx2 c2 wxry1 c1
+step r2: SELECT TRUE;
+bool
+
+t
+step wyrx2: DELETE FROM parent WHERE parent_id = 0;
+step c2: COMMIT;
+step wxry1: INSERT INTO child (parent_id) VALUES (0);
+ERROR: parent row missing
+step c1: COMMIT;
diff --git a/src/test/isolation/expected/simple-write-skew.out b/src/test/isolation/expected/simple-write-skew.out
new file mode 100644
index 0000000000..5896beec33
--- /dev/null
+++ b/src/test/isolation/expected/simple-write-skew.out
@@ -0,0 +1,41 @@
+Parsed test spec with 2 sessions
+
+starting permutation: rwx1 c1 rwx2 c2
+step rwx1: UPDATE test SET t = 'apple' WHERE t = 'pear';
+step c1: COMMIT;
+step rwx2: UPDATE test SET t = 'pear' WHERE t = 'apple'
+step c2: COMMIT;
+
+starting permutation: rwx1 rwx2 c1 c2
+step rwx1: UPDATE test SET t = 'apple' WHERE t = 'pear';
+step rwx2: UPDATE test SET t = 'pear' WHERE t = 'apple'
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rwx1 rwx2 c2 c1
+step rwx1: UPDATE test SET t = 'apple' WHERE t = 'pear';
+step rwx2: UPDATE test SET t = 'pear' WHERE t = 'apple'
+step c2: COMMIT;
+step c1: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rwx2 rwx1 c1 c2
+step rwx2: UPDATE test SET t = 'pear' WHERE t = 'apple'
+step rwx1: UPDATE test SET t = 'apple' WHERE t = 'pear';
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rwx2 rwx1 c2 c1
+step rwx2: UPDATE test SET t = 'pear' WHERE t = 'apple'
+step rwx1: UPDATE test SET t = 'apple' WHERE t = 'pear';
+step c2: COMMIT;
+step c1: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rwx2 c2 rwx1 c1
+step rwx2: UPDATE test SET t = 'pear' WHERE t = 'apple'
+step c2: COMMIT;
+step rwx1: UPDATE test SET t = 'apple' WHERE t = 'pear';
+step c1: COMMIT;
diff --git a/src/test/isolation/expected/temporal-range-integrity.out b/src/test/isolation/expected/temporal-range-integrity.out
new file mode 100644
index 0000000000..3e7fb98690
--- /dev/null
+++ b/src/test/isolation/expected/temporal-range-integrity.out
@@ -0,0 +1,299 @@
+Parsed test spec with 2 sessions
+
+starting permutation: rx1 wy1 c1 ry2 wx2 c2
+step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15');
+count
+
+1
+step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15');
+step c1: COMMIT;
+step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01';
+count
+
+1
+step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01';
+step c2: COMMIT;
+
+starting permutation: rx1 wy1 ry2 c1 wx2 c2
+step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15');
+count
+
+1
+step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15');
+step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01';
+count
+
+0
+step c1: COMMIT;
+step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01';
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c2: COMMIT;
+
+starting permutation: rx1 wy1 ry2 wx2 c1 c2
+step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15');
+count
+
+1
+step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15');
+step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01';
+count
+
+0
+step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01';
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rx1 wy1 ry2 wx2 c2 c1
+step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15');
+count
+
+1
+step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15');
+step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01';
+count
+
+0
+step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01';
+step c2: COMMIT;
+step c1: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rx1 ry2 wy1 c1 wx2 c2
+step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15');
+count
+
+1
+step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01';
+count
+
+0
+step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15');
+step c1: COMMIT;
+step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01';
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c2: COMMIT;
+
+starting permutation: rx1 ry2 wy1 wx2 c1 c2
+step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15');
+count
+
+1
+step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01';
+count
+
+0
+step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15');
+step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01';
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rx1 ry2 wy1 wx2 c2 c1
+step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15');
+count
+
+1
+step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01';
+count
+
+0
+step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15');
+step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01';
+step c2: COMMIT;
+step c1: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rx1 ry2 wx2 wy1 c1 c2
+step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15');
+count
+
+1
+step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01';
+count
+
+0
+step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01';
+step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15');
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rx1 ry2 wx2 wy1 c2 c1
+step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15');
+count
+
+1
+step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01';
+count
+
+0
+step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01';
+step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15');
+step c2: COMMIT;
+step c1: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rx1 ry2 wx2 c2 wy1 c1
+step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15');
+count
+
+1
+step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01';
+count
+
+0
+step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01';
+step c2: COMMIT;
+step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15');
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c1: COMMIT;
+
+starting permutation: ry2 rx1 wy1 c1 wx2 c2
+step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01';
+count
+
+0
+step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15');
+count
+
+1
+step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15');
+step c1: COMMIT;
+step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01';
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c2: COMMIT;
+
+starting permutation: ry2 rx1 wy1 wx2 c1 c2
+step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01';
+count
+
+0
+step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15');
+count
+
+1
+step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15');
+step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01';
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: ry2 rx1 wy1 wx2 c2 c1
+step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01';
+count
+
+0
+step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15');
+count
+
+1
+step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15');
+step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01';
+step c2: COMMIT;
+step c1: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: ry2 rx1 wx2 wy1 c1 c2
+step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01';
+count
+
+0
+step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15');
+count
+
+1
+step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01';
+step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15');
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: ry2 rx1 wx2 wy1 c2 c1
+step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01';
+count
+
+0
+step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15');
+count
+
+1
+step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01';
+step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15');
+step c2: COMMIT;
+step c1: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: ry2 rx1 wx2 c2 wy1 c1
+step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01';
+count
+
+0
+step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15');
+count
+
+1
+step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01';
+step c2: COMMIT;
+step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15');
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c1: COMMIT;
+
+starting permutation: ry2 wx2 rx1 wy1 c1 c2
+step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01';
+count
+
+0
+step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01';
+step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15');
+count
+
+1
+step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15');
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: ry2 wx2 rx1 wy1 c2 c1
+step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01';
+count
+
+0
+step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01';
+step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15');
+count
+
+1
+step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15');
+step c2: COMMIT;
+step c1: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: ry2 wx2 rx1 c2 wy1 c1
+step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01';
+count
+
+0
+step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01';
+step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15');
+count
+
+1
+step c2: COMMIT;
+step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15');
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c1: COMMIT;
+
+starting permutation: ry2 wx2 c2 rx1 wy1 c1
+step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01';
+count
+
+0
+step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01';
+step c2: COMMIT;
+step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15');
+count
+
+0
+step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15');
+step c1: COMMIT;
diff --git a/src/test/isolation/expected/total-cash.out b/src/test/isolation/expected/total-cash.out
new file mode 100644
index 0000000000..df1950843b
--- /dev/null
+++ b/src/test/isolation/expected/total-cash.out
@@ -0,0 +1,281 @@
+Parsed test spec with 2 sessions
+
+starting permutation: wx1 rxy1 c1 wy2 rxy2 c2
+step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking';
+step rxy1: SELECT SUM(balance) FROM accounts;
+sum
+
+1000
+step c1: COMMIT;
+step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings';
+step rxy2: SELECT SUM(balance) FROM accounts;
+sum
+
+800
+step c2: COMMIT;
+
+starting permutation: wx1 rxy1 wy2 c1 rxy2 c2
+step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking';
+step rxy1: SELECT SUM(balance) FROM accounts;
+sum
+
+1000
+step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings';
+step c1: COMMIT;
+step rxy2: SELECT SUM(balance) FROM accounts;
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c2: COMMIT;
+
+starting permutation: wx1 rxy1 wy2 rxy2 c1 c2
+step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking';
+step rxy1: SELECT SUM(balance) FROM accounts;
+sum
+
+1000
+step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings';
+step rxy2: SELECT SUM(balance) FROM accounts;
+sum
+
+1000
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: wx1 rxy1 wy2 rxy2 c2 c1
+step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking';
+step rxy1: SELECT SUM(balance) FROM accounts;
+sum
+
+1000
+step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings';
+step rxy2: SELECT SUM(balance) FROM accounts;
+sum
+
+1000
+step c2: COMMIT;
+step c1: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: wx1 wy2 rxy1 c1 rxy2 c2
+step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking';
+step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings';
+step rxy1: SELECT SUM(balance) FROM accounts;
+sum
+
+1000
+step c1: COMMIT;
+step rxy2: SELECT SUM(balance) FROM accounts;
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c2: COMMIT;
+
+starting permutation: wx1 wy2 rxy1 rxy2 c1 c2
+step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking';
+step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings';
+step rxy1: SELECT SUM(balance) FROM accounts;
+sum
+
+1000
+step rxy2: SELECT SUM(balance) FROM accounts;
+sum
+
+1000
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: wx1 wy2 rxy1 rxy2 c2 c1
+step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking';
+step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings';
+step rxy1: SELECT SUM(balance) FROM accounts;
+sum
+
+1000
+step rxy2: SELECT SUM(balance) FROM accounts;
+sum
+
+1000
+step c2: COMMIT;
+step c1: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: wx1 wy2 rxy2 rxy1 c1 c2
+step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking';
+step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings';
+step rxy2: SELECT SUM(balance) FROM accounts;
+sum
+
+1000
+step rxy1: SELECT SUM(balance) FROM accounts;
+sum
+
+1000
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: wx1 wy2 rxy2 rxy1 c2 c1
+step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking';
+step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings';
+step rxy2: SELECT SUM(balance) FROM accounts;
+sum
+
+1000
+step rxy1: SELECT SUM(balance) FROM accounts;
+sum
+
+1000
+step c2: COMMIT;
+step c1: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: wx1 wy2 rxy2 c2 rxy1 c1
+step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking';
+step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings';
+step rxy2: SELECT SUM(balance) FROM accounts;
+sum
+
+1000
+step c2: COMMIT;
+step rxy1: SELECT SUM(balance) FROM accounts;
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c1: COMMIT;
+
+starting permutation: wy2 wx1 rxy1 c1 rxy2 c2
+step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings';
+step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking';
+step rxy1: SELECT SUM(balance) FROM accounts;
+sum
+
+1000
+step c1: COMMIT;
+step rxy2: SELECT SUM(balance) FROM accounts;
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c2: COMMIT;
+
+starting permutation: wy2 wx1 rxy1 rxy2 c1 c2
+step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings';
+step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking';
+step rxy1: SELECT SUM(balance) FROM accounts;
+sum
+
+1000
+step rxy2: SELECT SUM(balance) FROM accounts;
+sum
+
+1000
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: wy2 wx1 rxy1 rxy2 c2 c1
+step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings';
+step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking';
+step rxy1: SELECT SUM(balance) FROM accounts;
+sum
+
+1000
+step rxy2: SELECT SUM(balance) FROM accounts;
+sum
+
+1000
+step c2: COMMIT;
+step c1: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: wy2 wx1 rxy2 rxy1 c1 c2
+step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings';
+step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking';
+step rxy2: SELECT SUM(balance) FROM accounts;
+sum
+
+1000
+step rxy1: SELECT SUM(balance) FROM accounts;
+sum
+
+1000
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: wy2 wx1 rxy2 rxy1 c2 c1
+step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings';
+step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking';
+step rxy2: SELECT SUM(balance) FROM accounts;
+sum
+
+1000
+step rxy1: SELECT SUM(balance) FROM accounts;
+sum
+
+1000
+step c2: COMMIT;
+step c1: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: wy2 wx1 rxy2 c2 rxy1 c1
+step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings';
+step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking';
+step rxy2: SELECT SUM(balance) FROM accounts;
+sum
+
+1000
+step c2: COMMIT;
+step rxy1: SELECT SUM(balance) FROM accounts;
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c1: COMMIT;
+
+starting permutation: wy2 rxy2 wx1 rxy1 c1 c2
+step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings';
+step rxy2: SELECT SUM(balance) FROM accounts;
+sum
+
+1000
+step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking';
+step rxy1: SELECT SUM(balance) FROM accounts;
+sum
+
+1000
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: wy2 rxy2 wx1 rxy1 c2 c1
+step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings';
+step rxy2: SELECT SUM(balance) FROM accounts;
+sum
+
+1000
+step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking';
+step rxy1: SELECT SUM(balance) FROM accounts;
+sum
+
+1000
+step c2: COMMIT;
+step c1: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: wy2 rxy2 wx1 c2 rxy1 c1
+step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings';
+step rxy2: SELECT SUM(balance) FROM accounts;
+sum
+
+1000
+step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking';
+step c2: COMMIT;
+step rxy1: SELECT SUM(balance) FROM accounts;
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c1: COMMIT;
+
+starting permutation: wy2 rxy2 c2 wx1 rxy1 c1
+step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings';
+step rxy2: SELECT SUM(balance) FROM accounts;
+sum
+
+1000
+step c2: COMMIT;
+step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking';
+step rxy1: SELECT SUM(balance) FROM accounts;
+sum
+
+800
+step c1: COMMIT;
diff --git a/src/test/isolation/expected/two-ids.out b/src/test/isolation/expected/two-ids.out
new file mode 100644
index 0000000000..81e6139680
--- /dev/null
+++ b/src/test/isolation/expected/two-ids.out
@@ -0,0 +1,1007 @@
+Parsed test spec with 3 sessions
+
+starting permutation: wx1 c1 rxwy2 c2 ry3 c3
+step wx1: update D1 set id = id + 1;
+step c1: COMMIT;
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c2: COMMIT;
+step ry3: select id from D2;
+id
+
+3
+step c3: COMMIT;
+
+starting permutation: wx1 c1 rxwy2 ry3 c2 c3
+step wx1: update D1 set id = id + 1;
+step c1: COMMIT;
+step rxwy2: update D2 set id = (select id+1 from D1);
+step ry3: select id from D2;
+id
+
+1
+step c2: COMMIT;
+step c3: COMMIT;
+
+starting permutation: wx1 c1 rxwy2 ry3 c3 c2
+step wx1: update D1 set id = id + 1;
+step c1: COMMIT;
+step rxwy2: update D2 set id = (select id+1 from D1);
+step ry3: select id from D2;
+id
+
+1
+step c3: COMMIT;
+step c2: COMMIT;
+
+starting permutation: wx1 c1 ry3 rxwy2 c2 c3
+step wx1: update D1 set id = id + 1;
+step c1: COMMIT;
+step ry3: select id from D2;
+id
+
+1
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c2: COMMIT;
+step c3: COMMIT;
+
+starting permutation: wx1 c1 ry3 rxwy2 c3 c2
+step wx1: update D1 set id = id + 1;
+step c1: COMMIT;
+step ry3: select id from D2;
+id
+
+1
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c3: COMMIT;
+step c2: COMMIT;
+
+starting permutation: wx1 c1 ry3 c3 rxwy2 c2
+step wx1: update D1 set id = id + 1;
+step c1: COMMIT;
+step ry3: select id from D2;
+id
+
+1
+step c3: COMMIT;
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c2: COMMIT;
+
+starting permutation: wx1 rxwy2 c1 c2 ry3 c3
+step wx1: update D1 set id = id + 1;
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c1: COMMIT;
+step c2: COMMIT;
+step ry3: select id from D2;
+id
+
+2
+step c3: COMMIT;
+
+starting permutation: wx1 rxwy2 c1 ry3 c2 c3
+step wx1: update D1 set id = id + 1;
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c1: COMMIT;
+step ry3: select id from D2;
+id
+
+1
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c3: COMMIT;
+
+starting permutation: wx1 rxwy2 c1 ry3 c3 c2
+step wx1: update D1 set id = id + 1;
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c1: COMMIT;
+step ry3: select id from D2;
+id
+
+1
+step c3: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: wx1 rxwy2 c2 c1 ry3 c3
+step wx1: update D1 set id = id + 1;
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c2: COMMIT;
+step c1: COMMIT;
+step ry3: select id from D2;
+id
+
+2
+step c3: COMMIT;
+
+starting permutation: wx1 rxwy2 c2 ry3 c1 c3
+step wx1: update D1 set id = id + 1;
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c2: COMMIT;
+step ry3: select id from D2;
+id
+
+2
+step c1: COMMIT;
+step c3: COMMIT;
+
+starting permutation: wx1 rxwy2 c2 ry3 c3 c1
+step wx1: update D1 set id = id + 1;
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c2: COMMIT;
+step ry3: select id from D2;
+id
+
+2
+step c3: COMMIT;
+step c1: COMMIT;
+
+starting permutation: wx1 rxwy2 ry3 c1 c2 c3
+step wx1: update D1 set id = id + 1;
+step rxwy2: update D2 set id = (select id+1 from D1);
+step ry3: select id from D2;
+id
+
+1
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c3: COMMIT;
+
+starting permutation: wx1 rxwy2 ry3 c1 c3 c2
+step wx1: update D1 set id = id + 1;
+step rxwy2: update D2 set id = (select id+1 from D1);
+step ry3: select id from D2;
+id
+
+1
+step c1: COMMIT;
+step c3: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: wx1 rxwy2 ry3 c2 c1 c3
+step wx1: update D1 set id = id + 1;
+step rxwy2: update D2 set id = (select id+1 from D1);
+step ry3: select id from D2;
+id
+
+1
+step c2: COMMIT;
+step c1: COMMIT;
+step c3: COMMIT;
+
+starting permutation: wx1 rxwy2 ry3 c2 c3 c1
+step wx1: update D1 set id = id + 1;
+step rxwy2: update D2 set id = (select id+1 from D1);
+step ry3: select id from D2;
+id
+
+1
+step c2: COMMIT;
+step c3: COMMIT;
+step c1: COMMIT;
+
+starting permutation: wx1 rxwy2 ry3 c3 c1 c2
+step wx1: update D1 set id = id + 1;
+step rxwy2: update D2 set id = (select id+1 from D1);
+step ry3: select id from D2;
+id
+
+1
+step c3: COMMIT;
+step c1: COMMIT;
+step c2: COMMIT;
+
+starting permutation: wx1 rxwy2 ry3 c3 c2 c1
+step wx1: update D1 set id = id + 1;
+step rxwy2: update D2 set id = (select id+1 from D1);
+step ry3: select id from D2;
+id
+
+1
+step c3: COMMIT;
+step c2: COMMIT;
+step c1: COMMIT;
+
+starting permutation: wx1 ry3 c1 rxwy2 c2 c3
+step wx1: update D1 set id = id + 1;
+step ry3: select id from D2;
+id
+
+1
+step c1: COMMIT;
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c2: COMMIT;
+step c3: COMMIT;
+
+starting permutation: wx1 ry3 c1 rxwy2 c3 c2
+step wx1: update D1 set id = id + 1;
+step ry3: select id from D2;
+id
+
+1
+step c1: COMMIT;
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c3: COMMIT;
+step c2: COMMIT;
+
+starting permutation: wx1 ry3 c1 c3 rxwy2 c2
+step wx1: update D1 set id = id + 1;
+step ry3: select id from D2;
+id
+
+1
+step c1: COMMIT;
+step c3: COMMIT;
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c2: COMMIT;
+
+starting permutation: wx1 ry3 rxwy2 c1 c2 c3
+step wx1: update D1 set id = id + 1;
+step ry3: select id from D2;
+id
+
+1
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c3: COMMIT;
+
+starting permutation: wx1 ry3 rxwy2 c1 c3 c2
+step wx1: update D1 set id = id + 1;
+step ry3: select id from D2;
+id
+
+1
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c1: COMMIT;
+step c3: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: wx1 ry3 rxwy2 c2 c1 c3
+step wx1: update D1 set id = id + 1;
+step ry3: select id from D2;
+id
+
+1
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c2: COMMIT;
+step c1: COMMIT;
+step c3: COMMIT;
+
+starting permutation: wx1 ry3 rxwy2 c2 c3 c1
+step wx1: update D1 set id = id + 1;
+step ry3: select id from D2;
+id
+
+1
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c2: COMMIT;
+step c3: COMMIT;
+step c1: COMMIT;
+
+starting permutation: wx1 ry3 rxwy2 c3 c1 c2
+step wx1: update D1 set id = id + 1;
+step ry3: select id from D2;
+id
+
+1
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c3: COMMIT;
+step c1: COMMIT;
+step c2: COMMIT;
+
+starting permutation: wx1 ry3 rxwy2 c3 c2 c1
+step wx1: update D1 set id = id + 1;
+step ry3: select id from D2;
+id
+
+1
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c3: COMMIT;
+step c2: COMMIT;
+step c1: COMMIT;
+
+starting permutation: wx1 ry3 c3 c1 rxwy2 c2
+step wx1: update D1 set id = id + 1;
+step ry3: select id from D2;
+id
+
+1
+step c3: COMMIT;
+step c1: COMMIT;
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c2: COMMIT;
+
+starting permutation: wx1 ry3 c3 rxwy2 c1 c2
+step wx1: update D1 set id = id + 1;
+step ry3: select id from D2;
+id
+
+1
+step c3: COMMIT;
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c1: COMMIT;
+step c2: COMMIT;
+
+starting permutation: wx1 ry3 c3 rxwy2 c2 c1
+step wx1: update D1 set id = id + 1;
+step ry3: select id from D2;
+id
+
+1
+step c3: COMMIT;
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c2: COMMIT;
+step c1: COMMIT;
+
+starting permutation: rxwy2 wx1 c1 c2 ry3 c3
+step rxwy2: update D2 set id = (select id+1 from D1);
+step wx1: update D1 set id = id + 1;
+step c1: COMMIT;
+step c2: COMMIT;
+step ry3: select id from D2;
+id
+
+2
+step c3: COMMIT;
+
+starting permutation: rxwy2 wx1 c1 ry3 c2 c3
+step rxwy2: update D2 set id = (select id+1 from D1);
+step wx1: update D1 set id = id + 1;
+step c1: COMMIT;
+step ry3: select id from D2;
+id
+
+1
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c3: COMMIT;
+
+starting permutation: rxwy2 wx1 c1 ry3 c3 c2
+step rxwy2: update D2 set id = (select id+1 from D1);
+step wx1: update D1 set id = id + 1;
+step c1: COMMIT;
+step ry3: select id from D2;
+id
+
+1
+step c3: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rxwy2 wx1 c2 c1 ry3 c3
+step rxwy2: update D2 set id = (select id+1 from D1);
+step wx1: update D1 set id = id + 1;
+step c2: COMMIT;
+step c1: COMMIT;
+step ry3: select id from D2;
+id
+
+2
+step c3: COMMIT;
+
+starting permutation: rxwy2 wx1 c2 ry3 c1 c3
+step rxwy2: update D2 set id = (select id+1 from D1);
+step wx1: update D1 set id = id + 1;
+step c2: COMMIT;
+step ry3: select id from D2;
+id
+
+2
+step c1: COMMIT;
+step c3: COMMIT;
+
+starting permutation: rxwy2 wx1 c2 ry3 c3 c1
+step rxwy2: update D2 set id = (select id+1 from D1);
+step wx1: update D1 set id = id + 1;
+step c2: COMMIT;
+step ry3: select id from D2;
+id
+
+2
+step c3: COMMIT;
+step c1: COMMIT;
+
+starting permutation: rxwy2 wx1 ry3 c1 c2 c3
+step rxwy2: update D2 set id = (select id+1 from D1);
+step wx1: update D1 set id = id + 1;
+step ry3: select id from D2;
+id
+
+1
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c3: COMMIT;
+
+starting permutation: rxwy2 wx1 ry3 c1 c3 c2
+step rxwy2: update D2 set id = (select id+1 from D1);
+step wx1: update D1 set id = id + 1;
+step ry3: select id from D2;
+id
+
+1
+step c1: COMMIT;
+step c3: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rxwy2 wx1 ry3 c2 c1 c3
+step rxwy2: update D2 set id = (select id+1 from D1);
+step wx1: update D1 set id = id + 1;
+step ry3: select id from D2;
+id
+
+1
+step c2: COMMIT;
+step c1: COMMIT;
+step c3: COMMIT;
+
+starting permutation: rxwy2 wx1 ry3 c2 c3 c1
+step rxwy2: update D2 set id = (select id+1 from D1);
+step wx1: update D1 set id = id + 1;
+step ry3: select id from D2;
+id
+
+1
+step c2: COMMIT;
+step c3: COMMIT;
+step c1: COMMIT;
+
+starting permutation: rxwy2 wx1 ry3 c3 c1 c2
+step rxwy2: update D2 set id = (select id+1 from D1);
+step wx1: update D1 set id = id + 1;
+step ry3: select id from D2;
+id
+
+1
+step c3: COMMIT;
+step c1: COMMIT;
+step c2: COMMIT;
+
+starting permutation: rxwy2 wx1 ry3 c3 c2 c1
+step rxwy2: update D2 set id = (select id+1 from D1);
+step wx1: update D1 set id = id + 1;
+step ry3: select id from D2;
+id
+
+1
+step c3: COMMIT;
+step c2: COMMIT;
+step c1: COMMIT;
+
+starting permutation: rxwy2 c2 wx1 c1 ry3 c3
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c2: COMMIT;
+step wx1: update D1 set id = id + 1;
+step c1: COMMIT;
+step ry3: select id from D2;
+id
+
+2
+step c3: COMMIT;
+
+starting permutation: rxwy2 c2 wx1 ry3 c1 c3
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c2: COMMIT;
+step wx1: update D1 set id = id + 1;
+step ry3: select id from D2;
+id
+
+2
+step c1: COMMIT;
+step c3: COMMIT;
+
+starting permutation: rxwy2 c2 wx1 ry3 c3 c1
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c2: COMMIT;
+step wx1: update D1 set id = id + 1;
+step ry3: select id from D2;
+id
+
+2
+step c3: COMMIT;
+step c1: COMMIT;
+
+starting permutation: rxwy2 c2 ry3 wx1 c1 c3
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c2: COMMIT;
+step ry3: select id from D2;
+id
+
+2
+step wx1: update D1 set id = id + 1;
+step c1: COMMIT;
+step c3: COMMIT;
+
+starting permutation: rxwy2 c2 ry3 wx1 c3 c1
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c2: COMMIT;
+step ry3: select id from D2;
+id
+
+2
+step wx1: update D1 set id = id + 1;
+step c3: COMMIT;
+step c1: COMMIT;
+
+starting permutation: rxwy2 c2 ry3 c3 wx1 c1
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c2: COMMIT;
+step ry3: select id from D2;
+id
+
+2
+step c3: COMMIT;
+step wx1: update D1 set id = id + 1;
+step c1: COMMIT;
+
+starting permutation: rxwy2 ry3 wx1 c1 c2 c3
+step rxwy2: update D2 set id = (select id+1 from D1);
+step ry3: select id from D2;
+id
+
+1
+step wx1: update D1 set id = id + 1;
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c3: COMMIT;
+
+starting permutation: rxwy2 ry3 wx1 c1 c3 c2
+step rxwy2: update D2 set id = (select id+1 from D1);
+step ry3: select id from D2;
+id
+
+1
+step wx1: update D1 set id = id + 1;
+step c1: COMMIT;
+step c3: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: rxwy2 ry3 wx1 c2 c1 c3
+step rxwy2: update D2 set id = (select id+1 from D1);
+step ry3: select id from D2;
+id
+
+1
+step wx1: update D1 set id = id + 1;
+step c2: COMMIT;
+step c1: COMMIT;
+step c3: COMMIT;
+
+starting permutation: rxwy2 ry3 wx1 c2 c3 c1
+step rxwy2: update D2 set id = (select id+1 from D1);
+step ry3: select id from D2;
+id
+
+1
+step wx1: update D1 set id = id + 1;
+step c2: COMMIT;
+step c3: COMMIT;
+step c1: COMMIT;
+
+starting permutation: rxwy2 ry3 wx1 c3 c1 c2
+step rxwy2: update D2 set id = (select id+1 from D1);
+step ry3: select id from D2;
+id
+
+1
+step wx1: update D1 set id = id + 1;
+step c3: COMMIT;
+step c1: COMMIT;
+step c2: COMMIT;
+
+starting permutation: rxwy2 ry3 wx1 c3 c2 c1
+step rxwy2: update D2 set id = (select id+1 from D1);
+step ry3: select id from D2;
+id
+
+1
+step wx1: update D1 set id = id + 1;
+step c3: COMMIT;
+step c2: COMMIT;
+step c1: COMMIT;
+
+starting permutation: rxwy2 ry3 c2 wx1 c1 c3
+step rxwy2: update D2 set id = (select id+1 from D1);
+step ry3: select id from D2;
+id
+
+1
+step c2: COMMIT;
+step wx1: update D1 set id = id + 1;
+step c1: COMMIT;
+step c3: COMMIT;
+
+starting permutation: rxwy2 ry3 c2 wx1 c3 c1
+step rxwy2: update D2 set id = (select id+1 from D1);
+step ry3: select id from D2;
+id
+
+1
+step c2: COMMIT;
+step wx1: update D1 set id = id + 1;
+step c3: COMMIT;
+step c1: COMMIT;
+
+starting permutation: rxwy2 ry3 c2 c3 wx1 c1
+step rxwy2: update D2 set id = (select id+1 from D1);
+step ry3: select id from D2;
+id
+
+1
+step c2: COMMIT;
+step c3: COMMIT;
+step wx1: update D1 set id = id + 1;
+step c1: COMMIT;
+
+starting permutation: rxwy2 ry3 c3 wx1 c1 c2
+step rxwy2: update D2 set id = (select id+1 from D1);
+step ry3: select id from D2;
+id
+
+1
+step c3: COMMIT;
+step wx1: update D1 set id = id + 1;
+step c1: COMMIT;
+step c2: COMMIT;
+
+starting permutation: rxwy2 ry3 c3 wx1 c2 c1
+step rxwy2: update D2 set id = (select id+1 from D1);
+step ry3: select id from D2;
+id
+
+1
+step c3: COMMIT;
+step wx1: update D1 set id = id + 1;
+step c2: COMMIT;
+step c1: COMMIT;
+
+starting permutation: rxwy2 ry3 c3 c2 wx1 c1
+step rxwy2: update D2 set id = (select id+1 from D1);
+step ry3: select id from D2;
+id
+
+1
+step c3: COMMIT;
+step c2: COMMIT;
+step wx1: update D1 set id = id + 1;
+step c1: COMMIT;
+
+starting permutation: ry3 wx1 c1 rxwy2 c2 c3
+step ry3: select id from D2;
+id
+
+1
+step wx1: update D1 set id = id + 1;
+step c1: COMMIT;
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c2: COMMIT;
+step c3: COMMIT;
+
+starting permutation: ry3 wx1 c1 rxwy2 c3 c2
+step ry3: select id from D2;
+id
+
+1
+step wx1: update D1 set id = id + 1;
+step c1: COMMIT;
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c3: COMMIT;
+step c2: COMMIT;
+
+starting permutation: ry3 wx1 c1 c3 rxwy2 c2
+step ry3: select id from D2;
+id
+
+1
+step wx1: update D1 set id = id + 1;
+step c1: COMMIT;
+step c3: COMMIT;
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c2: COMMIT;
+
+starting permutation: ry3 wx1 rxwy2 c1 c2 c3
+step ry3: select id from D2;
+id
+
+1
+step wx1: update D1 set id = id + 1;
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c3: COMMIT;
+
+starting permutation: ry3 wx1 rxwy2 c1 c3 c2
+step ry3: select id from D2;
+id
+
+1
+step wx1: update D1 set id = id + 1;
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c1: COMMIT;
+step c3: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: ry3 wx1 rxwy2 c2 c1 c3
+step ry3: select id from D2;
+id
+
+1
+step wx1: update D1 set id = id + 1;
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c2: COMMIT;
+step c1: COMMIT;
+step c3: COMMIT;
+
+starting permutation: ry3 wx1 rxwy2 c2 c3 c1
+step ry3: select id from D2;
+id
+
+1
+step wx1: update D1 set id = id + 1;
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c2: COMMIT;
+step c3: COMMIT;
+step c1: COMMIT;
+
+starting permutation: ry3 wx1 rxwy2 c3 c1 c2
+step ry3: select id from D2;
+id
+
+1
+step wx1: update D1 set id = id + 1;
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c3: COMMIT;
+step c1: COMMIT;
+step c2: COMMIT;
+
+starting permutation: ry3 wx1 rxwy2 c3 c2 c1
+step ry3: select id from D2;
+id
+
+1
+step wx1: update D1 set id = id + 1;
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c3: COMMIT;
+step c2: COMMIT;
+step c1: COMMIT;
+
+starting permutation: ry3 wx1 c3 c1 rxwy2 c2
+step ry3: select id from D2;
+id
+
+1
+step wx1: update D1 set id = id + 1;
+step c3: COMMIT;
+step c1: COMMIT;
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c2: COMMIT;
+
+starting permutation: ry3 wx1 c3 rxwy2 c1 c2
+step ry3: select id from D2;
+id
+
+1
+step wx1: update D1 set id = id + 1;
+step c3: COMMIT;
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c1: COMMIT;
+step c2: COMMIT;
+
+starting permutation: ry3 wx1 c3 rxwy2 c2 c1
+step ry3: select id from D2;
+id
+
+1
+step wx1: update D1 set id = id + 1;
+step c3: COMMIT;
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c2: COMMIT;
+step c1: COMMIT;
+
+starting permutation: ry3 rxwy2 wx1 c1 c2 c3
+step ry3: select id from D2;
+id
+
+1
+step rxwy2: update D2 set id = (select id+1 from D1);
+step wx1: update D1 set id = id + 1;
+step c1: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+step c3: COMMIT;
+
+starting permutation: ry3 rxwy2 wx1 c1 c3 c2
+step ry3: select id from D2;
+id
+
+1
+step rxwy2: update D2 set id = (select id+1 from D1);
+step wx1: update D1 set id = id + 1;
+step c1: COMMIT;
+step c3: COMMIT;
+step c2: COMMIT;
+ERROR: could not serialize access due to read/write dependencies among transactions
+
+starting permutation: ry3 rxwy2 wx1 c2 c1 c3
+step ry3: select id from D2;
+id
+
+1
+step rxwy2: update D2 set id = (select id+1 from D1);
+step wx1: update D1 set id = id + 1;
+step c2: COMMIT;
+step c1: COMMIT;
+step c3: COMMIT;
+
+starting permutation: ry3 rxwy2 wx1 c2 c3 c1
+step ry3: select id from D2;
+id
+
+1
+step rxwy2: update D2 set id = (select id+1 from D1);
+step wx1: update D1 set id = id + 1;
+step c2: COMMIT;
+step c3: COMMIT;
+step c1: COMMIT;
+
+starting permutation: ry3 rxwy2 wx1 c3 c1 c2
+step ry3: select id from D2;
+id
+
+1
+step rxwy2: update D2 set id = (select id+1 from D1);
+step wx1: update D1 set id = id + 1;
+step c3: COMMIT;
+step c1: COMMIT;
+step c2: COMMIT;
+
+starting permutation: ry3 rxwy2 wx1 c3 c2 c1
+step ry3: select id from D2;
+id
+
+1
+step rxwy2: update D2 set id = (select id+1 from D1);
+step wx1: update D1 set id = id + 1;
+step c3: COMMIT;
+step c2: COMMIT;
+step c1: COMMIT;
+
+starting permutation: ry3 rxwy2 c2 wx1 c1 c3
+step ry3: select id from D2;
+id
+
+1
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c2: COMMIT;
+step wx1: update D1 set id = id + 1;
+step c1: COMMIT;
+step c3: COMMIT;
+
+starting permutation: ry3 rxwy2 c2 wx1 c3 c1
+step ry3: select id from D2;
+id
+
+1
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c2: COMMIT;
+step wx1: update D1 set id = id + 1;
+step c3: COMMIT;
+step c1: COMMIT;
+
+starting permutation: ry3 rxwy2 c2 c3 wx1 c1
+step ry3: select id from D2;
+id
+
+1
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c2: COMMIT;
+step c3: COMMIT;
+step wx1: update D1 set id = id + 1;
+step c1: COMMIT;
+
+starting permutation: ry3 rxwy2 c3 wx1 c1 c2
+step ry3: select id from D2;
+id
+
+1
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c3: COMMIT;
+step wx1: update D1 set id = id + 1;
+step c1: COMMIT;
+step c2: COMMIT;
+
+starting permutation: ry3 rxwy2 c3 wx1 c2 c1
+step ry3: select id from D2;
+id
+
+1
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c3: COMMIT;
+step wx1: update D1 set id = id + 1;
+step c2: COMMIT;
+step c1: COMMIT;
+
+starting permutation: ry3 rxwy2 c3 c2 wx1 c1
+step ry3: select id from D2;
+id
+
+1
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c3: COMMIT;
+step c2: COMMIT;
+step wx1: update D1 set id = id + 1;
+step c1: COMMIT;
+
+starting permutation: ry3 c3 wx1 c1 rxwy2 c2
+step ry3: select id from D2;
+id
+
+1
+step c3: COMMIT;
+step wx1: update D1 set id = id + 1;
+step c1: COMMIT;
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c2: COMMIT;
+
+starting permutation: ry3 c3 wx1 rxwy2 c1 c2
+step ry3: select id from D2;
+id
+
+1
+step c3: COMMIT;
+step wx1: update D1 set id = id + 1;
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c1: COMMIT;
+step c2: COMMIT;
+
+starting permutation: ry3 c3 wx1 rxwy2 c2 c1
+step ry3: select id from D2;
+id
+
+1
+step c3: COMMIT;
+step wx1: update D1 set id = id + 1;
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c2: COMMIT;
+step c1: COMMIT;
+
+starting permutation: ry3 c3 rxwy2 wx1 c1 c2
+step ry3: select id from D2;
+id
+
+1
+step c3: COMMIT;
+step rxwy2: update D2 set id = (select id+1 from D1);
+step wx1: update D1 set id = id + 1;
+step c1: COMMIT;
+step c2: COMMIT;
+
+starting permutation: ry3 c3 rxwy2 wx1 c2 c1
+step ry3: select id from D2;
+id
+
+1
+step c3: COMMIT;
+step rxwy2: update D2 set id = (select id+1 from D1);
+step wx1: update D1 set id = id + 1;
+step c2: COMMIT;
+step c1: COMMIT;
+
+starting permutation: ry3 c3 rxwy2 c2 wx1 c1
+step ry3: select id from D2;
+id
+
+1
+step c3: COMMIT;
+step rxwy2: update D2 set id = (select id+1 from D1);
+step c2: COMMIT;
+step wx1: update D1 set id = id + 1;
+step c1: COMMIT;
diff --git a/src/test/isolation/isolation_main.c b/src/test/isolation/isolation_main.c
new file mode 100644
index 0000000000..7d2cfa2ea8
--- /dev/null
+++ b/src/test/isolation/isolation_main.c
@@ -0,0 +1,89 @@
+/*-------------------------------------------------------------------------
+ *
+ * isolation_main --- pg_regress test launcher for isolation tests
+ *
+ * Portions Copyright (c) 1996-2011, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ * src/test/isolation/isolation_main.c
+ *
+ *-------------------------------------------------------------------------
+ */
+
+#include "../regress/pg_regress.h"
+
+/*
+ * start an isolation tester process for specified file (including
+ * redirection), and return process ID
+ */
+static PID_TYPE
+isolation_start_test(const char *testname,
+ _stringlist ** resultfiles,
+ _stringlist ** expectfiles,
+ _stringlist ** tags)
+{
+ PID_TYPE pid;
+ char infile[MAXPGPATH];
+ char outfile[MAXPGPATH];
+ char expectfile[MAXPGPATH];
+ char psql_cmd[MAXPGPATH * 3];
+ size_t offset = 0;
+
+ /*
+ * Look for files in the output dir first, consistent with a vpath search.
+ * This is mainly to create more reasonable error messages if the file is
+ * not found. It also allows local test overrides when running pg_regress
+ * outside of the source tree.
+ */
+ snprintf(infile, sizeof(infile), "%s/specs/%s.spec",
+ outputdir, testname);
+ if (!file_exists(infile))
+ snprintf(infile, sizeof(infile), "%s/specs/%s.spec",
+ inputdir, testname);
+
+ snprintf(outfile, sizeof(outfile), "%s/results/%s.out",
+ outputdir, testname);
+
+ snprintf(expectfile, sizeof(expectfile), "%s/expected/%s.out",
+ outputdir, testname);
+ if (!file_exists(expectfile))
+ snprintf(expectfile, sizeof(expectfile), "%s/expected/%s.out",
+ inputdir, testname);
+
+ add_stringlist_item(resultfiles, outfile);
+ add_stringlist_item(expectfiles, expectfile);
+
+ if (launcher)
+ offset += snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset,
+ "%s ", launcher);
+
+ snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset,
+ SYSTEMQUOTE "./isolationtester \"dbname=%s\" < \"%s\" > \"%s\" 2>&1" SYSTEMQUOTE,
+ dblist->str,
+ infile,
+ outfile);
+
+ pid = spawn_process(psql_cmd);
+
+ if (pid == INVALID_PID)
+ {
+ fprintf(stderr, _("could not start process for test %s\n"),
+ testname);
+ exit_nicely(2);
+ }
+
+ return pid;
+}
+
+static void
+isolation_init(void)
+{
+ /* set default regression database name */
+ add_stringlist_item(&dblist, "isolationtest");
+}
+
+int
+main(int argc, char *argv[])
+{
+ return regression_main(argc, argv, isolation_init, isolation_start_test);
+}
diff --git a/src/test/isolation/isolation_schedule b/src/test/isolation/isolation_schedule
new file mode 100644
index 0000000000..6ea8a29f49
--- /dev/null
+++ b/src/test/isolation/isolation_schedule
@@ -0,0 +1,11 @@
+test: simple-write-skew
+test: receipt-report
+test: temporal-range-integrity
+test: project-manager
+test: classroom-scheduling
+test: total-cash
+test: referential-integrity
+test: ri-trigger
+test: partial-index
+test: two-ids
+test: multiple-row-versions
diff --git a/src/test/isolation/isolationtester.c b/src/test/isolation/isolationtester.c
new file mode 100644
index 0000000000..9946051945
--- /dev/null
+++ b/src/test/isolation/isolationtester.c
@@ -0,0 +1,372 @@
+/*
+ * src/test/isolation/isolationtester.c
+ *
+ * isolationtester.c
+ * Runs an isolation test specified by a spec file.
+ */
+
+#ifdef WIN32
+#include <windows.h>
+#endif
+
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "libpq-fe.h"
+
+#include "isolationtester.h"
+
+static PGconn **conns = NULL;
+static int nconns = 0;
+
+static void run_all_permutations(TestSpec *testspec);
+static void run_all_permutations_recurse(TestSpec *testspec, int nsteps, Step **steps);
+static void run_named_permutations(TestSpec *testspec);
+static void run_permutation(TestSpec *testspec, int nsteps, Step **steps);
+
+static int step_qsort_cmp(const void *a, const void *b);
+static int step_bsearch_cmp(const void *a, const void *b);
+
+static void printResultSet(PGresult *res);
+
+/* close all connections and exit */
+static void
+exit_nicely(void)
+{
+ int i;
+ for (i = 0; i < nconns; i++)
+ PQfinish(conns[i]);
+ exit(1);
+}
+
+int
+main(int argc, char **argv)
+{
+ const char *conninfo;
+ TestSpec *testspec;
+ int i;
+
+ /*
+ * If the user supplies a parameter on the command line, use it as the
+ * conninfo string; otherwise default to setting dbname=postgres and
+ * using environment variables or defaults for all other connection
+ * parameters.
+ */
+ if (argc > 1)
+ conninfo = argv[1];
+ else
+ conninfo = "dbname = postgres";
+
+ /* Read the test spec from stdin */
+ spec_yyparse();
+ testspec = &parseresult;
+ printf("Parsed test spec with %d sessions\n", testspec->nsessions);
+
+ /* Establish connections to the database, one for each session */
+ nconns = testspec->nsessions;
+ conns = calloc(nconns, sizeof(PGconn *));
+ for (i = 0; i < testspec->nsessions; i++)
+ {
+ PGresult *res;
+
+ conns[i] = PQconnectdb(conninfo);
+ if (PQstatus(conns[i]) != CONNECTION_OK)
+ {
+ fprintf(stderr, "Connection %d to database failed: %s",
+ i, PQerrorMessage(conns[i]));
+ exit_nicely();
+ }
+
+ /*
+ * Suppress NOTIFY messages, which otherwise pop into results at odd
+ * places.
+ */
+ res = PQexec(conns[i], "SET client_min_messages = warning;");
+ if (PQresultStatus(res) != PGRES_COMMAND_OK)
+ {
+ fprintf(stderr, "message level setup failed: %s", PQerrorMessage(conns[i]));
+ exit_nicely();
+ }
+ PQclear(res);
+ }
+
+ /* Set the session index fields in steps. */
+ for (i = 0; i < testspec->nsessions; i++)
+ {
+ Session *session = testspec->sessions[i];
+ int stepindex;
+ for (stepindex = 0; stepindex < session->nsteps; stepindex++)
+ session->steps[stepindex]->session = i;
+ }
+
+ /*
+ * Run the permutations specified in the spec, or all if none were
+ * explicitly specified.
+ */
+ if (testspec->permutations)
+ run_named_permutations(testspec);
+ else
+ run_all_permutations(testspec);
+
+ /* Clean up and exit */
+ for (i = 0; i < nconns; i++)
+ PQfinish(conns[i]);
+ return 0;
+}
+
+static int *piles;
+
+/*
+ * Run all permutations of the steps and sessions.
+ */
+static void
+run_all_permutations(TestSpec *testspec)
+{
+ int nsteps;
+ int i;
+ Step **steps;
+
+ /* Count the total number of steps in all sessions */
+ nsteps = 0;
+ for (i = 0; i < testspec->nsessions; i++)
+ nsteps += testspec->sessions[i]->nsteps;
+
+ steps = malloc(sizeof(Step *) * nsteps);
+
+ /*
+ * To generate the permutations, we conceptually put the steps of
+ * each session on a pile. To generate a permuation, we pick steps
+ * from the piles until all piles are empty. By picking steps from
+ * piles in different order, we get different permutations.
+ *
+ * A pile is actually just an integer which tells how many steps
+ * we've already picked from this pile.
+ */
+ piles = malloc(sizeof(int) * testspec->nsessions);
+ for (i = 0; i < testspec->nsessions; i++)
+ piles[i] = 0;
+
+ run_all_permutations_recurse(testspec, 0, steps);
+}
+
+static void
+run_all_permutations_recurse(TestSpec *testspec, int nsteps, Step **steps)
+{
+ int i;
+ int found = 0;
+
+ for (i = 0; i < testspec->nsessions; i++)
+ {
+ /* If there's any more steps in this pile, pick it and recurse */
+ if (piles[i] < testspec->sessions[i]->nsteps)
+ {
+ steps[nsteps] = testspec->sessions[i]->steps[piles[i]];
+ piles[i]++;
+
+ run_all_permutations_recurse(testspec, nsteps + 1, steps);
+
+ piles[i]--;
+
+ found = 1;
+ }
+ }
+
+ /* If all the piles were empty, this permutation is completed. Run it */
+ if (!found)
+ run_permutation(testspec, nsteps, steps);
+}
+
+/*
+ * Run permutations given in the test spec
+ */
+static void
+run_named_permutations(TestSpec *testspec)
+{
+ int i, j;
+ int n;
+ int nallsteps;
+ Step **allsteps;
+
+ /* First create a lookup table of all steps */
+ nallsteps = 0;
+ for (i = 0; i < testspec->nsessions; i++)
+ nallsteps += testspec->sessions[i]->nsteps;
+
+ allsteps = malloc(nallsteps * sizeof(Step *));
+
+ n = 0;
+ for (i = 0; i < testspec->nsessions; i++)
+ {
+ for (j = 0; j < testspec->sessions[i]->nsteps; j++)
+ allsteps[n++] = testspec->sessions[i]->steps[j];
+ }
+
+ qsort(allsteps, nallsteps, sizeof(Step *), &step_qsort_cmp);
+
+ for (i = 0; i < testspec->npermutations; i++)
+ {
+ Permutation *p = testspec->permutations[i];
+ Step **steps;
+
+ steps = malloc(p->nsteps * sizeof(Step *));
+
+ /* Find all the named steps from the lookup table */
+ for (j = 0; j < p->nsteps; j++)
+ {
+ steps[j] = *((Step **) bsearch(p->stepnames[j], allsteps, nallsteps,
+ sizeof(Step *), &step_bsearch_cmp));
+ if (steps[j] == NULL)
+ {
+ fprintf(stderr, "undefined step \"%s\" specified in permutation\n", p->stepnames[j]);
+ exit_nicely();
+ }
+ }
+
+ run_permutation(testspec, p->nsteps, steps);
+ free(steps);
+ }
+}
+
+static int
+step_qsort_cmp(const void *a, const void *b)
+{
+ Step *stepa = *((Step **) a);
+ Step *stepb = *((Step **) b);
+
+ return strcmp(stepa->name, stepb->name);
+}
+
+static int
+step_bsearch_cmp(const void *a, const void *b)
+{
+ char *stepname = (char *) a;
+ Step *step = *((Step **) b);
+
+ return strcmp(stepname, step->name);
+}
+
+/*
+ * Run one permutation
+ */
+static void
+run_permutation(TestSpec *testspec, int nsteps, Step **steps)
+{
+ PGresult *res;
+ int i;
+
+ printf("\nstarting permutation:");
+ for (i = 0; i < nsteps; i++)
+ printf(" %s", steps[i]->name);
+ printf("\n");
+
+ /* Perform setup */
+ if (testspec->setupsql)
+ {
+ res = PQexec(conns[0], testspec->setupsql);
+ if (PQresultStatus(res) != PGRES_COMMAND_OK)
+ {
+ fprintf(stderr, "setup failed: %s", PQerrorMessage(conns[0]));
+ exit_nicely();
+ }
+ PQclear(res);
+ }
+
+ /* Perform per-session setup */
+ for (i = 0; i < testspec->nsessions; i++)
+ {
+ if (testspec->sessions[i]->setupsql)
+ {
+ res = PQexec(conns[i], testspec->sessions[i]->setupsql);
+ if (PQresultStatus(res) != PGRES_COMMAND_OK)
+ {
+ fprintf(stderr, "setup of session %s failed: %s",
+ testspec->sessions[i]->name,
+ PQerrorMessage(conns[0]));
+ exit_nicely();
+ }
+ PQclear(res);
+ }
+ }
+
+ /* Perform steps */
+ for (i = 0; i < nsteps; i++)
+ {
+ Step *step = steps[i];
+ printf("step %s: %s\n", step->name, step->sql);
+ res = PQexec(conns[step->session], step->sql);
+
+ switch(PQresultStatus(res))
+ {
+ case PGRES_COMMAND_OK:
+ break;
+
+ case PGRES_TUPLES_OK:
+ printResultSet(res);
+ break;
+
+ case PGRES_FATAL_ERROR:
+ /* Detail may contain xid values, so just show primary. */
+ printf("%s: %s\n", PQresultErrorField(res, PG_DIAG_SEVERITY),
+ PQresultErrorField(res, PG_DIAG_MESSAGE_PRIMARY));
+ break;
+
+ default:
+ printf("unexpected result status: %s\n",
+ PQresStatus(PQresultStatus(res)));
+ }
+ PQclear(res);
+ }
+
+ /* Perform per-session teardown */
+ for (i = 0; i < testspec->nsessions; i++)
+ {
+ if (testspec->sessions[i]->teardownsql)
+ {
+ res = PQexec(conns[i], testspec->sessions[i]->teardownsql);
+ if (PQresultStatus(res) != PGRES_COMMAND_OK)
+ {
+ fprintf(stderr, "teardown of session %s failed: %s",
+ testspec->sessions[i]->name,
+ PQerrorMessage(conns[0]));
+ /* don't exit on teardown failure */
+ }
+ PQclear(res);
+ }
+ }
+
+ /* Perform teardown */
+ if (testspec->teardownsql)
+ {
+ res = PQexec(conns[0], testspec->teardownsql);
+ if (PQresultStatus(res) != PGRES_COMMAND_OK)
+ {
+ fprintf(stderr, "teardown failed: %s",
+ PQerrorMessage(conns[0]));
+ /* don't exit on teardown failure */
+
+ }
+ PQclear(res);
+ }
+}
+
+static void
+printResultSet(PGresult *res)
+{
+ int nFields;
+ int i, j;
+
+ /* first, print out the attribute names */
+ nFields = PQnfields(res);
+ for (i = 0; i < nFields; i++)
+ printf("%-15s", PQfname(res, i));
+ printf("\n\n");
+
+ /* next, print out the rows */
+ for (i = 0; i < PQntuples(res); i++)
+ {
+ for (j = 0; j < nFields; j++)
+ printf("%-15s", PQgetvalue(res, i, j));
+ printf("\n");
+ }
+}
diff --git a/src/test/isolation/isolationtester.h b/src/test/isolation/isolationtester.h
new file mode 100644
index 0000000000..b092ed16a0
--- /dev/null
+++ b/src/test/isolation/isolationtester.h
@@ -0,0 +1,59 @@
+/*-------------------------------------------------------------------------
+ *
+ * bootstrap.h
+ * include file for the bootstrapping code
+ *
+ *
+ * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ * $PostgreSQL: pgsql/src/include/bootstrap/bootstrap.h,v 1.44 2006/10/04 00:30:07 momjian Exp $
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifndef ISOLATIONTESTER_H
+#define ISOLATIONTESTER_H
+
+typedef struct Session Session;
+typedef struct Step Step;
+
+struct Session
+{
+ char *name;
+ char *setupsql;
+ char *teardownsql;
+ Step **steps;
+ int nsteps;
+};
+
+struct Step
+{
+ int session;
+ char *name;
+ char *sql;
+};
+
+typedef struct
+{
+ int nsteps;
+ char **stepnames;
+} Permutation;
+
+typedef struct
+{
+ char *setupsql;
+ char *teardownsql;
+ Session **sessions;
+ int nsessions;
+ Permutation **permutations;
+ int npermutations;
+} TestSpec;
+
+extern TestSpec parseresult;
+
+extern int spec_yyparse(void);
+
+extern int spec_yylex(void);
+extern void spec_yyerror(const char *str);
+
+#endif /* ISOLATIONTESTER_H */
diff --git a/src/test/isolation/specparse.y b/src/test/isolation/specparse.y
new file mode 100644
index 0000000000..c684780216
--- /dev/null
+++ b/src/test/isolation/specparse.y
@@ -0,0 +1,188 @@
+%{
+/*-------------------------------------------------------------------------
+ *
+ * specparse.y
+ * bison grammar for the isolation test file format
+ *
+ * Portions Copyright (c) 1996-2011, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ *-------------------------------------------------------------------------
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <string.h>
+
+#include "isolationtester.h"
+
+
+TestSpec parseresult; /* result of parsing is left here */
+
+%}
+
+%expect 0
+%name-prefix="spec_yy"
+
+%union
+{
+ char *str;
+ Session *session;
+ Step *step;
+ Permutation *permutation;
+ struct
+ {
+ void **elements;
+ int nelements;
+ } ptr_list;
+}
+
+%type <str> opt_setup opt_teardown
+%type <ptr_list> step_list session_list permutation_list opt_permutation_list
+%type <ptr_list> string_list
+%type <session> session
+%type <step> step
+%type <permutation> permutation
+
+%token <str> sqlblock string
+%token PERMUTATION SESSION SETUP STEP TEARDOWN TEST
+
+%%
+
+TestSpec:
+ opt_setup
+ opt_teardown
+ session_list
+ opt_permutation_list
+ {
+ parseresult.setupsql = $1;
+ parseresult.teardownsql = $2;
+ parseresult.sessions = (Session **) $3.elements;
+ parseresult.nsessions = $3.nelements;
+ parseresult.permutations = (Permutation **) $4.elements;
+ parseresult.npermutations = $4.nelements;
+ }
+ ;
+
+opt_setup:
+ /* EMPTY */ { $$ = NULL; }
+ | SETUP sqlblock { $$ = $2; }
+ ;
+
+opt_teardown:
+ /* EMPTY */ { $$ = NULL; }
+ | TEARDOWN sqlblock { $$ = $2; }
+ ;
+
+session_list:
+ session_list session
+ {
+ $$.elements = realloc($1.elements,
+ ($1.nelements + 1) * sizeof(void *));
+ $$.elements[$1.nelements] = $2;
+ $$.nelements = $1.nelements + 1;
+ }
+ | session
+ {
+ $$.nelements = 1;
+ $$.elements = malloc(sizeof(void *));
+ $$.elements[0] = $1;
+ }
+ ;
+
+session:
+ SESSION string opt_setup step_list opt_teardown
+ {
+ $$ = malloc(sizeof(Session));
+ $$->name = $2;
+ $$->setupsql = $3;
+ $$->steps = (Step **) $4.elements;
+ $$->nsteps = $4.nelements;
+ $$->teardownsql = $5;
+ }
+ ;
+
+step_list:
+ step_list step
+ {
+ $$.elements = realloc($1.elements,
+ ($1.nelements + 1) * sizeof(void *));
+ $$.elements[$1.nelements] = $2;
+ $$.nelements = $1.nelements + 1;
+ }
+ | step
+ {
+ $$.nelements = 1;
+ $$.elements = malloc(sizeof(void *));
+ $$.elements[0] = $1;
+ }
+ ;
+
+
+step:
+ STEP string sqlblock
+ {
+ $$ = malloc(sizeof(Step));
+ $$->name = $2;
+ $$->sql = $3;
+ }
+ ;
+
+
+opt_permutation_list:
+ permutation_list
+ {
+ $$ = $1;
+ }
+ | /* EMPTY */
+ {
+ $$.elements = NULL;
+ $$.nelements = 0;
+ }
+
+permutation_list:
+ permutation_list permutation
+ {
+ $$.elements = realloc($1.elements,
+ ($1.nelements + 1) * sizeof(void *));
+ $$.elements[$1.nelements] = $2;
+ $$.nelements = $1.nelements + 1;
+ }
+ | permutation
+ {
+ $$.nelements = 1;
+ $$.elements = malloc(sizeof(void *));
+ $$.elements[0] = $1;
+ }
+ ;
+
+
+permutation:
+ PERMUTATION string_list
+ {
+ $$ = malloc(sizeof(Permutation));
+ $$->stepnames = (char **) $2.elements;
+ $$->nsteps = $2.nelements;
+ }
+ ;
+
+string_list:
+ string_list string
+ {
+ $$.elements = realloc($1.elements,
+ ($1.nelements + 1) * sizeof(void *));
+ $$.elements[$1.nelements] = $2;
+ $$.nelements = $1.nelements + 1;
+ }
+ | string
+ {
+ $$.nelements = 1;
+ $$.elements = malloc(sizeof(void *));
+ $$.elements[0] = $1;
+ }
+ ;
+
+%%
+
+#include "specscanner.c"
diff --git a/src/test/isolation/specs/classroom-scheduling.spec b/src/test/isolation/specs/classroom-scheduling.spec
new file mode 100644
index 0000000000..a31565b9cd
--- /dev/null
+++ b/src/test/isolation/specs/classroom-scheduling.spec
@@ -0,0 +1,29 @@
+# Classroom Scheduling test
+#
+# Ensure that the classroom is not scheduled more than once
+# for any moment in time.
+#
+# Any overlap between the transactions must cause a serialization failure.
+
+setup
+{
+ CREATE TABLE room_reservation (room_id text NOT NULL, start_time timestamp with time zone NOT NULL, end_time timestamp with time zone NOT NULL, description text NOT NULL, CONSTRAINT room_reservation_pkey PRIMARY KEY (room_id, start_time));
+ INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 10:00', TIMESTAMP WITH TIME ZONE '2010-04-01 11:00', 'Bob');
+}
+
+teardown
+{
+ DROP TABLE room_reservation;
+}
+
+session "s1"
+setup { BEGIN ISOLATION LEVEL SERIALIZABLE; }
+step "rx1" { SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00'; }
+step "wy1" { INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol'); }
+step "c1" { COMMIT; }
+
+session "s2"
+setup { BEGIN ISOLATION LEVEL SERIALIZABLE; }
+step "ry2" { SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30'; }
+step "wx2" { UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00'; }
+step "c2" { COMMIT; }
diff --git a/src/test/isolation/specs/multiple-row-versions.spec b/src/test/isolation/specs/multiple-row-versions.spec
new file mode 100644
index 0000000000..8cfe3a44dc
--- /dev/null
+++ b/src/test/isolation/specs/multiple-row-versions.spec
@@ -0,0 +1,48 @@
+# Multiple Row Versions test
+#
+# This test is designed to ensure that predicate locks taken on one version
+# of a row are detected as conflicts when a later version of the row is
+# updated or deleted by a transaction concurrent to the reader.
+#
+# Due to long permutation setup time, we are only testing one specific
+# permutation, which should get a serialization error.
+
+setup
+{
+ CREATE TABLE t (id int NOT NULL, txt text) WITH (fillfactor=50);
+ INSERT INTO t (id)
+ SELECT x FROM (SELECT * FROM generate_series(1, 1000000)) a(x);
+ ALTER TABLE t ADD PRIMARY KEY (id);
+}
+
+teardown
+{
+ DROP TABLE t;
+}
+
+session "s1"
+setup { BEGIN ISOLATION LEVEL SERIALIZABLE; }
+step "rx1" { SELECT * FROM t WHERE id = 1000000; }
+# delay until after T3 commits
+step "wz1" { UPDATE t SET txt = 'a' WHERE id = 1; }
+step "c1" { COMMIT; }
+
+session "s2"
+setup { BEGIN ISOLATION LEVEL SERIALIZABLE; }
+step "wx2" { UPDATE t SET txt = 'b' WHERE id = 1000000; }
+step "c2" { COMMIT; }
+
+session "s3"
+setup { BEGIN ISOLATION LEVEL SERIALIZABLE; }
+step "wx3" { UPDATE t SET txt = 'c' WHERE id = 1000000; }
+step "ry3" { SELECT * FROM t WHERE id = 500000; }
+# delay until after T4 commits
+step "c3" { COMMIT; }
+
+session "s4"
+setup { BEGIN ISOLATION LEVEL SERIALIZABLE; }
+step "wy4" { UPDATE t SET txt = 'd' WHERE id = 500000; }
+step "rz4" { SELECT * FROM t WHERE id = 1; }
+step "c4" { COMMIT; }
+
+permutation "rx1" "wx2" "c2" "wx3" "ry3" "wy4" "rz4" "c4" "c3" "wz1" "c1"
diff --git a/src/test/isolation/specs/partial-index.spec b/src/test/isolation/specs/partial-index.spec
new file mode 100644
index 0000000000..74e72645d9
--- /dev/null
+++ b/src/test/isolation/specs/partial-index.spec
@@ -0,0 +1,32 @@
+# Partial Index test
+#
+# Make sure that an update which moves a row out of a partial index
+# is handled correctly. In early versions, an attempt at optimization
+# broke this behavior, allowing anomalies.
+#
+# Any overlap between the transactions must cause a serialization failure.
+
+setup
+{
+ create table test_t (id integer, val1 text, val2 integer);
+ create index test_idx on test_t(id) where val2 = 1;
+ insert into test_t (select generate_series(0, 10000), 'a', 2);
+ insert into test_t (select generate_series(0, 10), 'a', 1);
+}
+
+teardown
+{
+ DROP TABLE test_t;
+}
+
+session "s1"
+setup { BEGIN ISOLATION LEVEL SERIALIZABLE; }
+step "rxy1" { select * from test_t where val2 = 1; }
+step "wx1" { update test_t set val2 = 2 where val2 = 1 and id = 10; }
+step "c1" { COMMIT; }
+
+session "s2"
+setup { BEGIN ISOLATION LEVEL SERIALIZABLE; }
+step "wy2" { update test_t set val2 = 2 where val2 = 1 and id = 9; }
+step "rxy2" { select * from test_t where val2 = 1; }
+step "c2" { COMMIT; }
diff --git a/src/test/isolation/specs/project-manager.spec b/src/test/isolation/specs/project-manager.spec
new file mode 100644
index 0000000000..884012dd89
--- /dev/null
+++ b/src/test/isolation/specs/project-manager.spec
@@ -0,0 +1,30 @@
+# Project Manager test
+#
+# Ensure that the person who is on the project as a manager
+# is flagged as a project manager in the person table.
+#
+# Any overlap between the transactions must cause a serialization failure.
+
+setup
+{
+ CREATE TABLE person (person_id int NOT NULL PRIMARY KEY, name text NOT NULL, is_project_manager bool NOT NULL);
+ INSERT INTO person VALUES (1, 'Robert Haas', true);
+ CREATE TABLE project (project_no int NOT NULL PRIMARY KEY, description text NOT NULL, project_manager int NOT NULL);
+}
+
+teardown
+{
+ DROP TABLE person, project;
+}
+
+session "s1"
+setup { BEGIN ISOLATION LEVEL SERIALIZABLE; }
+step "rx1" { SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager; }
+step "wy1" { INSERT INTO project VALUES (101, 'Build Great Wall', 1); }
+step "c1" { COMMIT; }
+
+session "s2"
+setup { BEGIN ISOLATION LEVEL SERIALIZABLE; }
+step "ry2" { SELECT count(*) FROM project WHERE project_manager = 1; }
+step "wx2" { UPDATE person SET is_project_manager = false WHERE person_id = 1; }
+step "c2" { COMMIT; }
diff --git a/src/test/isolation/specs/receipt-report.spec b/src/test/isolation/specs/receipt-report.spec
new file mode 100644
index 0000000000..1e214960d1
--- /dev/null
+++ b/src/test/isolation/specs/receipt-report.spec
@@ -0,0 +1,47 @@
+# Daily Report of Receipts test.
+#
+# This test doesn't persist a bad state in the database; rather, it
+# provides a view of the data which is not consistent with any
+# order of execution of the serializable transactions. It
+# demonstrates a situation where the deposit date for receipts could
+# be changed and a report of the closed day's receipts subsequently
+# run which will miss a receipt from the date which has been closed.
+#
+# There are only six permuations which must cause a serialization failure.
+# Failure cases are where s1 overlaps both s2 and s3, but s2 commits before
+# s3 executes its first SELECT.
+#
+# As long as s3 is declared READ ONLY there should be no false positives.
+# If s3 were changed to READ WRITE, we would currently expect 42 false
+# positives. Further work dealing with de facto READ ONLY transactions
+# may be able to reduce or eliminate those false positives.
+
+setup
+{
+ CREATE TABLE ctl (k text NOT NULL PRIMARY KEY, deposit_date date NOT NULL);
+ INSERT INTO ctl VALUES ('receipt', DATE '2008-12-22');
+ CREATE TABLE receipt (receipt_no int NOT NULL PRIMARY KEY, deposit_date date NOT NULL, amount numeric(13,2));
+ INSERT INTO receipt VALUES (1, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 1.00);
+ INSERT INTO receipt VALUES (2, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 2.00);
+}
+
+teardown
+{
+ DROP TABLE ctl, receipt;
+}
+
+session "s1"
+setup { BEGIN ISOLATION LEVEL SERIALIZABLE; }
+step "rxwy1" { INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); }
+step "c1" { COMMIT; }
+
+session "s2"
+setup { BEGIN ISOLATION LEVEL SERIALIZABLE; }
+step "wx2" { UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; }
+step "c2" { COMMIT; }
+
+session "s3"
+setup { BEGIN ISOLATION LEVEL SERIALIZABLE, READ ONLY; }
+step "rx3" { SELECT * FROM ctl WHERE k = 'receipt'; }
+step "ry3" { SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; }
+step "c3" { COMMIT; }
diff --git a/src/test/isolation/specs/referential-integrity.spec b/src/test/isolation/specs/referential-integrity.spec
new file mode 100644
index 0000000000..0bea3eab97
--- /dev/null
+++ b/src/test/isolation/specs/referential-integrity.spec
@@ -0,0 +1,32 @@
+# Referential Integrity test
+#
+# The assumption here is that the application code issuing the SELECT
+# to test for the presence or absence of a related record would do the
+# right thing -- this script doesn't include that logic.
+#
+# Any overlap between the transactions must cause a serialization failure.
+
+setup
+{
+ CREATE TABLE a (i int PRIMARY KEY);
+ CREATE TABLE b (a_id int);
+ INSERT INTO a VALUES (1);
+}
+
+teardown
+{
+ DROP TABLE a, b;
+}
+
+session "s1"
+setup { BEGIN ISOLATION LEVEL SERIALIZABLE; }
+step "rx1" { SELECT i FROM a WHERE i = 1; }
+step "wy1" { INSERT INTO b VALUES (1); }
+step "c1" { COMMIT; }
+
+session "s2"
+setup { BEGIN ISOLATION LEVEL SERIALIZABLE; }
+step "rx2" { SELECT i FROM a WHERE i = 1; }
+step "ry2" { SELECT a_id FROM b WHERE a_id = 1; }
+step "wx2" { DELETE FROM a WHERE i = 1; }
+step "c2" { COMMIT; }
diff --git a/src/test/isolation/specs/ri-trigger.spec b/src/test/isolation/specs/ri-trigger.spec
new file mode 100644
index 0000000000..78d1f2f226
--- /dev/null
+++ b/src/test/isolation/specs/ri-trigger.spec
@@ -0,0 +1,53 @@
+# RI Trigger test
+#
+# Test trigger-based referential integrity enforcement.
+#
+# Any overlap between the transactions must cause a serialization failure.
+
+setup
+{
+ CREATE TABLE parent (parent_id SERIAL NOT NULL PRIMARY KEY);
+ CREATE TABLE child (child_id SERIAL NOT NULL PRIMARY KEY, parent_id INTEGER NOT NULL);
+ CREATE FUNCTION ri_parent() RETURNS TRIGGER LANGUAGE PLPGSQL AS $body$
+ BEGIN
+ PERFORM TRUE FROM child WHERE parent_id = OLD.parent_id;
+ IF FOUND THEN
+ RAISE SQLSTATE '23503' USING MESSAGE = 'child row exists';
+ END IF;
+ IF TG_OP = 'DELETE' THEN
+ RETURN OLD;
+ END IF;
+ RETURN NEW;
+ END;
+ $body$;
+ CREATE TRIGGER ri_parent BEFORE UPDATE OR DELETE ON parent FOR EACH ROW EXECUTE PROCEDURE ri_parent();
+ CREATE FUNCTION ri_child() RETURNS TRIGGER LANGUAGE PLPGSQL AS $body$
+ BEGIN
+ PERFORM TRUE FROM parent WHERE parent_id = NEW.parent_id;
+ IF NOT FOUND THEN
+ RAISE SQLSTATE '23503' USING MESSAGE = 'parent row missing';
+ END IF;
+ RETURN NEW;
+ END;
+ $body$;
+ CREATE TRIGGER ri_child BEFORE INSERT OR UPDATE ON child FOR EACH ROW EXECUTE PROCEDURE ri_child();
+ INSERT INTO parent VALUES(0);
+}
+
+teardown
+{
+ DROP TABLE parent, child;
+ DROP FUNCTION ri_parent();
+ DROP FUNCTION ri_child();
+}
+
+session "s1"
+setup { BEGIN ISOLATION LEVEL SERIALIZABLE; }
+step "wxry1" { INSERT INTO child (parent_id) VALUES (0); }
+step "c1" { COMMIT; }
+
+session "s2"
+setup { BEGIN ISOLATION LEVEL SERIALIZABLE; }
+step "r2" { SELECT TRUE; }
+step "wyrx2" { DELETE FROM parent WHERE parent_id = 0; }
+step "c2" { COMMIT; }
diff --git a/src/test/isolation/specs/simple-write-skew.spec b/src/test/isolation/specs/simple-write-skew.spec
new file mode 100644
index 0000000000..0aee43f38e
--- /dev/null
+++ b/src/test/isolation/specs/simple-write-skew.spec
@@ -0,0 +1,30 @@
+# Write skew test.
+#
+# This test has two serializable transactions: one which updates all
+# 'apple' rows to 'pear' and one which updates all 'pear' rows to
+# 'apple'. If these were serialized (run one at a time) either
+# value could be present, but not both. One must be rolled back to
+# prevent the write skew anomaly.
+#
+# Any overlap between the transactions must cause a serialization failure.
+
+setup
+{
+ CREATE TABLE test (i int PRIMARY KEY, t text);
+ INSERT INTO test VALUES (5, 'apple'), (7, 'pear'), (11, 'banana');
+}
+
+teardown
+{
+ DROP TABLE test;
+}
+
+session "s1"
+setup { BEGIN ISOLATION LEVEL SERIALIZABLE; }
+step "rwx1" { UPDATE test SET t = 'apple' WHERE t = 'pear'; }
+step "c1" { COMMIT; }
+
+session "s2"
+setup { BEGIN ISOLATION LEVEL SERIALIZABLE; }
+step "rwx2" { UPDATE test SET t = 'pear' WHERE t = 'apple'}
+step "c2" { COMMIT; }
diff --git a/src/test/isolation/specs/temporal-range-integrity.spec b/src/test/isolation/specs/temporal-range-integrity.spec
new file mode 100644
index 0000000000..63784ce0a7
--- /dev/null
+++ b/src/test/isolation/specs/temporal-range-integrity.spec
@@ -0,0 +1,38 @@
+# Temporal Range Integrity test
+#
+# Snapshot integrity fails with simple referential integrity tests,
+# but those don't make for good demonstrations because people just
+# say that foreign key definitions should be used instead. There
+# are many integrity tests which are conceptually very similar but
+# don't have built-in support which will fail when used in triggers.
+# This is intended to illustrate such cases. It is obviously very
+# hard to exercise all these permutations when the code is actually
+# in a trigger; this test pulls what would normally be inside of
+# triggers out to the top level to control the permutations.
+#
+# Any overlap between the transactions must cause a serialization failure.
+
+
+setup
+{
+ CREATE TABLE statute (statute_cite text NOT NULL, eff_date date NOT NULL, exp_date date, CONSTRAINT statute_pkey PRIMARY KEY (statute_cite, eff_date));
+ INSERT INTO statute VALUES ('123.45(1)a', DATE '2008-01-01', NULL);
+ CREATE TABLE offense (offense_no int NOT NULL, statute_cite text NOT NULL, offense_date date NOT NULL, CONSTRAINT offense_pkey PRIMARY KEY (offense_no));
+}
+
+teardown
+{
+ DROP TABLE statute, offense;
+}
+
+session "s1"
+setup { BEGIN ISOLATION LEVEL SERIALIZABLE; }
+step "rx1" { SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15'); }
+step "wy1" { INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15'); }
+step "c1" { COMMIT; }
+
+session "s2"
+setup { BEGIN ISOLATION LEVEL SERIALIZABLE; }
+step "ry2" { SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01'; }
+step "wx2" { DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01'; }
+step "c2" { COMMIT; }
diff --git a/src/test/isolation/specs/total-cash.spec b/src/test/isolation/specs/total-cash.spec
new file mode 100644
index 0000000000..843f41c77f
--- /dev/null
+++ b/src/test/isolation/specs/total-cash.spec
@@ -0,0 +1,28 @@
+# Total Cash test
+#
+# Another famous test of snapshot isolation anomaly.
+#
+# Any overlap between the transactions must cause a serialization failure.
+
+setup
+{
+ CREATE TABLE accounts (accountid text NOT NULL PRIMARY KEY, balance numeric not null);
+ INSERT INTO accounts VALUES ('checking', 600),('savings',600);
+}
+
+teardown
+{
+ DROP TABLE accounts;
+}
+
+session "s1"
+setup { BEGIN ISOLATION LEVEL SERIALIZABLE; }
+step "wx1" { UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking'; }
+step "rxy1" { SELECT SUM(balance) FROM accounts; }
+step "c1" { COMMIT; }
+
+session "s2"
+setup { BEGIN ISOLATION LEVEL SERIALIZABLE; }
+step "wy2" { UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings'; }
+step "rxy2" { SELECT SUM(balance) FROM accounts; }
+step "c2" { COMMIT; }
diff --git a/src/test/isolation/specs/two-ids.spec b/src/test/isolation/specs/two-ids.spec
new file mode 100644
index 0000000000..d67064068e
--- /dev/null
+++ b/src/test/isolation/specs/two-ids.spec
@@ -0,0 +1,40 @@
+# Two IDs test
+#
+# Small, simple test showing read-only anomalies.
+#
+# There are only four permuations which must cause a serialization failure.
+# Required failure cases are where s2 overlaps both s1 and s3, but s1
+# commits before s3 executes its first SELECT.
+#
+# If s3 were declared READ ONLY there would be no false positives.
+# With s3 defaulting to READ WRITE, we currently expect 12 false
+# positives. Further work dealing with de facto READ ONLY transactions
+# may be able to reduce or eliminate those false positives.
+
+setup
+{
+ create table D1 (id int not null);
+ create table D2 (id int not null);
+ insert into D1 values (1);
+ insert into D2 values (1);
+}
+
+teardown
+{
+ DROP TABLE D1, D2;
+}
+
+session "s1"
+setup { BEGIN ISOLATION LEVEL SERIALIZABLE; }
+step "wx1" { update D1 set id = id + 1; }
+step "c1" { COMMIT; }
+
+session "s2"
+setup { BEGIN ISOLATION LEVEL SERIALIZABLE; }
+step "rxwy2" { update D2 set id = (select id+1 from D1); }
+step "c2" { COMMIT; }
+
+session "s3"
+setup { BEGIN ISOLATION LEVEL SERIALIZABLE; }
+step "ry3" { select id from D2; }
+step "c3" { COMMIT; }
diff --git a/src/test/isolation/specscanner.l b/src/test/isolation/specscanner.l
new file mode 100644
index 0000000000..6752aca82d
--- /dev/null
+++ b/src/test/isolation/specscanner.l
@@ -0,0 +1,103 @@
+%{
+/*-------------------------------------------------------------------------
+ *
+ * specscanner.l
+ * a lexical scanner for an isolation test specification
+ *
+ * Portions Copyright (c) 1996-2011, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ *-------------------------------------------------------------------------
+ */
+
+static int yyline = 1; /* line number for error reporting */
+
+static char litbuf[1024];
+static int litbufpos = 0;
+
+static void addlitchar(const char c);
+
+%}
+
+%option 8bit
+%option never-interactive
+%option nodefault
+%option noinput
+%option nounput
+%option noyywrap
+%option prefix="spec_yy"
+
+
+%x sql
+%x qstr
+
+non_newline [^\n\r]
+space [ \t\n\r\f]
+
+comment ("#"{non_newline}*)
+whitespace ({space}+|{comment})
+
+%%
+
+permutation { return(PERMUTATION); }
+session { return(SESSION); }
+setup { return(SETUP); }
+step { return(STEP); }
+teardown { return(TEARDOWN); }
+
+[\n] { yyline++; }
+{whitespace} {
+ /* ignore */
+ }
+
+\" {
+ litbufpos = 0;
+ BEGIN(qstr);
+ }
+<qstr>\" {
+ litbuf[litbufpos] = '\0';
+ yylval.str = strdup(litbuf);
+ BEGIN(INITIAL);
+ return(string);
+ }
+<qstr>. { addlitchar(yytext[0]); }
+
+"{" {
+
+ litbufpos = 0;
+ BEGIN(sql);
+ }
+
+<sql>"}" {
+ litbuf[litbufpos] = '\0';
+ yylval.str = strdup(litbuf);
+ BEGIN(INITIAL);
+ return(sqlblock);
+ }
+<sql>[^}] { addlitchar(yytext[0]);}
+
+
+. {
+ fprintf(stderr, "syntax error at line %d: unexpected character \"%s\"\n", yyline, yytext);
+ exit(1);
+ }
+
+%%
+
+static void
+addlitchar(const char c)
+{
+ if (litbufpos >= sizeof(litbuf) - 1)
+ {
+ fprintf(stderr, "SQL step too long\n");
+ exit(1);
+ }
+ litbuf[litbufpos++] = c;
+}
+
+void
+yyerror(const char *message)
+{
+ fprintf(stderr, "%s at line %d\n", message, yyline);
+ exit(1);
+}
diff --git a/src/test/regress/expected/prepared_xacts.out b/src/test/regress/expected/prepared_xacts.out
index 292962ab7b..1a6b4ce1d9 100644
--- a/src/test/regress/expected/prepared_xacts.out
+++ b/src/test/regress/expected/prepared_xacts.out
@@ -9,7 +9,7 @@
CREATE TABLE pxtest1 (foobar VARCHAR(10));
INSERT INTO pxtest1 VALUES ('aaa');
-- Test PREPARE TRANSACTION
-BEGIN;
+BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;
UPDATE pxtest1 SET foobar = 'bbb' WHERE foobar = 'aaa';
SELECT * FROM pxtest1;
foobar
@@ -45,7 +45,7 @@ SELECT gid FROM pg_prepared_xacts;
(0 rows)
-- Test COMMIT PREPARED
-BEGIN;
+BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;
INSERT INTO pxtest1 VALUES ('ddd');
SELECT * FROM pxtest1;
foobar
@@ -70,7 +70,7 @@ SELECT * FROM pxtest1;
(2 rows)
-- Test duplicate gids
-BEGIN;
+BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;
UPDATE pxtest1 SET foobar = 'eee' WHERE foobar = 'ddd';
SELECT * FROM pxtest1;
foobar
@@ -86,7 +86,7 @@ SELECT gid FROM pg_prepared_xacts;
foo3
(1 row)
-BEGIN;
+BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;
INSERT INTO pxtest1 VALUES ('fff');
SELECT * FROM pxtest1;
foobar
@@ -117,7 +117,7 @@ SELECT * FROM pxtest1;
-- Clean up
DROP TABLE pxtest1;
-- Test subtransactions
-BEGIN;
+BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;
CREATE TABLE pxtest2 (a int);
INSERT INTO pxtest2 VALUES (1);
SAVEPOINT a;
@@ -128,7 +128,7 @@ BEGIN;
PREPARE TRANSACTION 'regress-one';
CREATE TABLE pxtest3(fff int);
-- Test shared invalidation
-BEGIN;
+BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;
DROP TABLE pxtest3;
CREATE TABLE pxtest4 (a int);
INSERT INTO pxtest4 VALUES (1);
diff --git a/src/test/regress/expected/prepared_xacts_1.out b/src/test/regress/expected/prepared_xacts_1.out
index 991a11bdfa..5051eaabd7 100644
--- a/src/test/regress/expected/prepared_xacts_1.out
+++ b/src/test/regress/expected/prepared_xacts_1.out
@@ -9,7 +9,7 @@
CREATE TABLE pxtest1 (foobar VARCHAR(10));
INSERT INTO pxtest1 VALUES ('aaa');
-- Test PREPARE TRANSACTION
-BEGIN;
+BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;
UPDATE pxtest1 SET foobar = 'bbb' WHERE foobar = 'aaa';
SELECT * FROM pxtest1;
foobar
@@ -47,7 +47,7 @@ SELECT gid FROM pg_prepared_xacts;
(0 rows)
-- Test COMMIT PREPARED
-BEGIN;
+BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;
INSERT INTO pxtest1 VALUES ('ddd');
SELECT * FROM pxtest1;
foobar
@@ -74,7 +74,7 @@ SELECT * FROM pxtest1;
(1 row)
-- Test duplicate gids
-BEGIN;
+BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;
UPDATE pxtest1 SET foobar = 'eee' WHERE foobar = 'ddd';
SELECT * FROM pxtest1;
foobar
@@ -90,7 +90,7 @@ SELECT gid FROM pg_prepared_xacts;
-----
(0 rows)
-BEGIN;
+BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;
INSERT INTO pxtest1 VALUES ('fff');
SELECT * FROM pxtest1;
foobar
@@ -120,7 +120,7 @@ SELECT * FROM pxtest1;
-- Clean up
DROP TABLE pxtest1;
-- Test subtransactions
-BEGIN;
+BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;
CREATE TABLE pxtest2 (a int);
INSERT INTO pxtest2 VALUES (1);
SAVEPOINT a;
@@ -133,7 +133,7 @@ ERROR: prepared transactions are disabled
HINT: Set max_prepared_transactions to a nonzero value.
CREATE TABLE pxtest3(fff int);
-- Test shared invalidation
-BEGIN;
+BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;
DROP TABLE pxtest3;
CREATE TABLE pxtest4 (a int);
INSERT INTO pxtest4 VALUES (1);
diff --git a/src/test/regress/expected/transactions.out b/src/test/regress/expected/transactions.out
index b91c9d8e23..f49ec0effe 100644
--- a/src/test/regress/expected/transactions.out
+++ b/src/test/regress/expected/transactions.out
@@ -44,7 +44,7 @@ SELECT * FROM aggtest;
CREATE TABLE writetest (a int);
CREATE TEMPORARY TABLE temptest (a int);
BEGIN;
-SET TRANSACTION READ ONLY; -- ok
+SET TRANSACTION ISOLATION LEVEL SERIALIZABLE, READ ONLY, DEFERRABLE; -- ok
SELECT * FROM writetest; -- ok
a
---
diff --git a/src/test/regress/sql/prepared_xacts.sql b/src/test/regress/sql/prepared_xacts.sql
index 39d323a15b..2bdbb0d189 100644
--- a/src/test/regress/sql/prepared_xacts.sql
+++ b/src/test/regress/sql/prepared_xacts.sql
@@ -14,7 +14,7 @@ INSERT INTO pxtest1 VALUES ('aaa');
-- Test PREPARE TRANSACTION
-BEGIN;
+BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;
UPDATE pxtest1 SET foobar = 'bbb' WHERE foobar = 'aaa';
SELECT * FROM pxtest1;
PREPARE TRANSACTION 'foo1';
@@ -33,7 +33,7 @@ SELECT gid FROM pg_prepared_xacts;
-- Test COMMIT PREPARED
-BEGIN;
+BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;
INSERT INTO pxtest1 VALUES ('ddd');
SELECT * FROM pxtest1;
PREPARE TRANSACTION 'foo2';
@@ -45,14 +45,14 @@ COMMIT PREPARED 'foo2';
SELECT * FROM pxtest1;
-- Test duplicate gids
-BEGIN;
+BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;
UPDATE pxtest1 SET foobar = 'eee' WHERE foobar = 'ddd';
SELECT * FROM pxtest1;
PREPARE TRANSACTION 'foo3';
SELECT gid FROM pg_prepared_xacts;
-BEGIN;
+BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;
INSERT INTO pxtest1 VALUES ('fff');
SELECT * FROM pxtest1;
@@ -69,7 +69,7 @@ SELECT * FROM pxtest1;
DROP TABLE pxtest1;
-- Test subtransactions
-BEGIN;
+BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;
CREATE TABLE pxtest2 (a int);
INSERT INTO pxtest2 VALUES (1);
SAVEPOINT a;
@@ -82,7 +82,7 @@ PREPARE TRANSACTION 'regress-one';
CREATE TABLE pxtest3(fff int);
-- Test shared invalidation
-BEGIN;
+BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;
DROP TABLE pxtest3;
CREATE TABLE pxtest4 (a int);
INSERT INTO pxtest4 VALUES (1);
diff --git a/src/test/regress/sql/transactions.sql b/src/test/regress/sql/transactions.sql
index 7c9638f05e..23271c8eab 100644
--- a/src/test/regress/sql/transactions.sql
+++ b/src/test/regress/sql/transactions.sql
@@ -40,7 +40,7 @@ CREATE TABLE writetest (a int);
CREATE TEMPORARY TABLE temptest (a int);
BEGIN;
-SET TRANSACTION READ ONLY; -- ok
+SET TRANSACTION ISOLATION LEVEL SERIALIZABLE, READ ONLY, DEFERRABLE; -- ok
SELECT * FROM writetest; -- ok
SET TRANSACTION READ WRITE; --fail
COMMIT;