OSDN Git Service

Fix bug in PreCommit_CheckForSerializationFailure. A transaction that has
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Tue, 21 Jun 2011 11:32:11 +0000 (14:32 +0300)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Tue, 21 Jun 2011 11:49:50 +0000 (14:49 +0300)
commit1eea8e8a06bc718836c34b8f7da9420b38fc4851
tree90d68b04494e2aec0330ca731062cdd15cbfe4a4
parent7cb2ff9621a6129cc251f9d06bf23d3f9d426173
Fix bug in PreCommit_CheckForSerializationFailure. A transaction that has
already been marked as PREPARED cannot be killed. Kill the current
transaction instead.

One of the prepared_xacts regression tests actually hits this bug. I
removed the anomaly from the duplicate-gids test so that it fails in the
intended way, and added a new test to check serialization failures with
a prepared transaction.

Dan Ports
src/backend/storage/lmgr/predicate.c
src/test/regress/expected/prepared_xacts.out
src/test/regress/sql/prepared_xacts.sql