Content-Length: 258167 | pFad | http://github.com/postgrespro/postgres/commit/ca0b960eb502db429d9134b0ddf24b9e12f45257

28 Prevent overflow in pgbench's percent-done display. · postgrespro/postgres@ca0b960 · GitHub
Skip to content

Commit ca0b960

Browse files
committed
Prevent overflow in pgbench's percent-done display.
Per Thom Brown.
1 parent 5d1abe6 commit ca0b960

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/pgbench/pgbench.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1444,7 +1444,7 @@ init(bool is_no_vacuum)
14441444
if (j % 100000 == 0)
14451445
fprintf(stderr, "%d of %d tuples (%d%%) done.\n",
14461446
j, naccounts * scale,
1447-
j * 100 / (naccounts * scale));
1447+
(int) (((int64) j * 100) / (naccounts * scale)));
14481448
}
14491449
if (PQputline(con, "\\.\n"))
14501450
{

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/ca0b960eb502db429d9134b0ddf24b9e12f45257

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy