Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3792959

Browse files
committed
Fix transaction.sql tests in higher isolation levels.
It seems like a useful sanity check to be able to run "installcheck"against a cluster running with default_transaction_level set toserializable or repeatable read. Only one thing currently fails inthose configurations, so let's fix that.No back-patch for now, because it fails in many other places in some ofthe stable branches. We'd have to go back and fix those too if weincluded this configuration in automated testing.Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>Discussion:https://postgr.es/m/CA%2BhUKGJUaHeK%3DHLATxF1JOKDjKJVrBKA-zmbPAebOM0Se2FQRg%40mail.gmail.com
1 parent6b67d72 commit3792959

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

‎src/test/regress/expected/transactions.out

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,6 +1026,7 @@ SHOW transaction_isolation; -- transaction is active at this point
10261026
(1 row)
10271027

10281028
ROLLBACK;
1029+
SET default_transaction_isolation = 'read committed';
10291030
-- START TRANSACTION + COMMIT/ROLLBACK + COMMIT/ROLLBACK AND CHAIN
10301031
START TRANSACTION ISOLATION LEVEL REPEATABLE READ\; INSERT INTO abc VALUES (17)\; COMMIT\; INSERT INTO abc VALUES (18)\; COMMIT AND CHAIN; -- 17 commit, 18 error
10311032
ERROR: COMMIT AND CHAIN can only be used in transaction blocks
@@ -1043,6 +1044,7 @@ SHOW transaction_isolation; -- out of transaction block
10431044
read committed
10441045
(1 row)
10451046

1047+
RESET default_transaction_isolation;
10461048
SELECT * FROM abc ORDER BY 1;
10471049
a
10481050
----

‎src/test/regress/sql/transactions.sql

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -578,13 +578,17 @@ START TRANSACTION ISOLATION LEVEL REPEATABLE READ\; INSERT INTO abc VALUES (16)\
578578
SHOW transaction_isolation;-- transaction is active at this point
579579
ROLLBACK;
580580

581+
SET default_transaction_isolation='read committed';
582+
581583
-- START TRANSACTION + COMMIT/ROLLBACK + COMMIT/ROLLBACK AND CHAIN
582584
START TRANSACTION ISOLATION LEVEL REPEATABLE READ\;INSERT INTO abcVALUES (17)\;COMMIT\;INSERT INTO abcVALUES (18)\;COMMITAND CHAIN;-- 17 commit, 18 error
583585
SHOW transaction_isolation;-- out of transaction block
584586

585587
START TRANSACTION ISOLATION LEVEL REPEATABLE READ\;INSERT INTO abcVALUES (19)\;ROLLBACK\;INSERT INTO abcVALUES (20)\;ROLLBACKAND CHAIN;-- 19 rollback, 20 error
586588
SHOW transaction_isolation;-- out of transaction block
587589

590+
RESET default_transaction_isolation;
591+
588592
SELECT*FROM abcORDER BY1;
589593

590594
DROPTABLE abc;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp