From: Tomas Vondra Date: Fri, 9 Jun 2017 15:31:22 +0000 (+0200) Subject: Fix minor issues in the tpcb-like pgbench script X-Git-Tag: XL_10_R1BETA1~265^2~11 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=12d2aa66055138da4f4cc67f7f032fc4dda776d9;p=postgres-xl.git Fix minor issues in the tpcb-like pgbench script The tpcb-like built-in script in pgbench contained two simple bugs. It was still using the old \setrandom command to generate the delta value, instead of the new \set delta random(-5000, 5000) This is mostly an omission in 32d57848458595a487d251b37c2872d86de439ef. There was also a missing semicolon at the end of one of the commands, causing cryptic syntax errors. --- diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c index 364b91ce31..0b7cd4eaa8 100644 --- a/src/bin/pgbench/pgbench.c +++ b/src/bin/pgbench/pgbench.c @@ -347,10 +347,10 @@ static const BuiltinScript builtin_script[] = "\\set aid random(1, " CppAsString2(naccounts) " * :scale)\n" "\\set bid random(1, " CppAsString2(nbranches) " * :scale)\n" "\\set tid random(1, " CppAsString2(ntellers) " * :scale)\n" - "\\setrandom delta -5000 5000\n" + "\\set delta random(-5000, 5000)\n" "BEGIN;\n" "UPDATE pgbench_accounts SET abalance = abalance + :delta WHERE aid = :aid AND bid = :bid;\n" - "SELECT abalance FROM pgbench_accounts WHERE aid = :aid AND bid = :bid\n" + "SELECT abalance FROM pgbench_accounts WHERE aid = :aid AND bid = :bid;\n" "UPDATE pgbench_tellers SET tbalance = tbalance + :delta WHERE tid = :tid AND bid = :bid;\n" "UPDATE pgbench_branches SET bbalance = bbalance + :delta WHERE bid = :bid;\n" "INSERT INTO pgbench_history (tid, bid, aid, delta, mtime) VALUES (:tid, :bid, :aid, :delta, CURRENT_TIMESTAMP);\n"