Skip to content

Commit 4b27326

Browse files
committed
tests stuff
1 parent e3aa8d0 commit 4b27326

File tree

2 files changed

+599
-0
lines changed

2 files changed

+599
-0
lines changed

2pc.pgb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
\set aid random(1, 100000 * :scale)
2+
\set bid random(1, 1 * :scale)
3+
\set tid random(1, 10 * :scale)
4+
\set delta random(-5000, 5000)
5+
BEGIN;
6+
UPDATE pgbench_accounts SET abalance = abalance + :delta WHERE aid = :aid;
7+
SELECT abalance FROM pgbench_accounts WHERE aid = :aid;
8+
INSERT INTO pgbench_history (tid, bid, aid, delta, mtime) VALUES (:tid, :bid, :aid, :delta, CURRENT_TIMESTAMP);
9+
PREPARE TRANSACTION 'tx-:client_id';
10+
COMMIT PREPARED 'tx-:client_id';
11+

0 commit comments

Comments
 (0)