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

Commit380ab36

Browse files
committed
Fix compile error
1 parent8e48e91 commit380ab36

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

‎contrib/pgbench/pgbench.c

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* $PostgreSQL: pgsql/contrib/pgbench/pgbench.c,v 1.39 2005/10/0413:40:45 ishii Exp $
2+
* $PostgreSQL: pgsql/contrib/pgbench/pgbench.c,v 1.40 2005/10/0417:10:55 teodor Exp $
33
*
44
* pgbench: a simple benchmark program for PostgreSQL
55
* written by Tatsuo Ishii
@@ -137,37 +137,37 @@ int num_files;/* its number */
137137

138138
/* default scenario */
139139
staticchar*tpc_b= {
140-
"\\setrandom aid 1 100000
141-
\\setrandom bid 1 1
142-
\\setrandom tid 1 10
143-
\\setrandom delta 1 10000
144-
BEGIN;
145-
UPDATEaccountsSETabalance=abalance+ :deltaWHEREaid= :aid;
146-
SELECTabalanceFROMaccountsWHEREaid= :aid;
147-
UPDATEtellersSETtbalance=tbalance+ :deltaWHEREtid= :tid;
148-
UPDATEbranchesSETbbalance=bbalance+ :deltaWHEREbid= :bid;
149-
INSERTINTOhistory (tid,bid,aid,delta,mtime)VALUES (:tid, :bid, :aid, :delta,CURRENT_TIMESTAMP);
150-
END;
151-
"};
140+
"\\setrandom aid 1 100000\n"
141+
"\\setrandom bid 1 1\n"
142+
"\\setrandom tid 1 10\n"
143+
"\\setrandom delta 1 10000\n"
144+
"BEGIN;\n"
145+
"UPDATE accounts SET abalance = abalance + :delta WHERE aid = :aid;\n"
146+
"SELECT abalance FROM accounts WHERE aid = :aid;\n"
147+
"UPDATE tellers SET tbalance = tbalance + :delta WHERE tid = :tid;\n"
148+
"UPDATE branches SET bbalance = bbalance + :delta WHERE bid = :bid;\n"
149+
"INSERT INTO history (tid, bid, aid, delta, mtime) VALUES (:tid, :bid, :aid, :delta, CURRENT_TIMESTAMP);\n"
150+
"END;\n"
151+
};
152152

153153
/* -N case */
154154
staticchar*simple_update= {
155-
"\\setrandom aid 1 100000
156-
\\setrandom bid 1 1
157-
\\setrandom tid 1 10
158-
\\setrandom delta 1 10000
159-
BEGIN;
160-
UPDATEaccountsSETabalance=abalance+ :deltaWHEREaid= :aid;
161-
SELECTabalanceFROMaccountsWHEREaid= :aid;
162-
INSERTINTOhistory (tid,bid,aid,delta,mtime)VALUES (:tid, :bid, :aid, :delta,CURRENT_TIMESTAMP);
163-
END;
164-
"};
155+
"\\setrandom aid 1 100000\n"
156+
"\\setrandom bid 1 1\n"
157+
"\\setrandom tid 1 10\n"
158+
"\\setrandom delta 1 10000\n"
159+
"BEGIN;\n"
160+
"UPDATE accounts SET abalance = abalance + :delta WHERE aid = :aid;\n"
161+
"SELECT abalance FROM accounts WHERE aid = :aid;\n"
162+
"INSERT INTO history (tid, bid, aid, delta, mtime) VALUES (:tid, :bid, :aid, :delta, CURRENT_TIMESTAMP);\n"
163+
"END;\n"
164+
};
165165

166166
/* -S case */
167167
staticchar*select_only= {
168-
"\\setrandom aid 1 100000
169-
SELECTabalanceFROMaccountsWHEREaid= :aid;
170-
"};
168+
"\\setrandom aid 1 100000\n"
169+
"SELECT abalance FROM accounts WHERE aid = :aid;\n"
170+
};
171171

172172
staticvoid
173173
usage(void)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp