Prevent overflow in pgbench's percent-done display.

Per Thom Brown.
This commit is contained in:
Tom Lane 2012-10-20 12:44:18 -04:00
parent 5d1abe64e6
commit ca0b960eb5
1 changed files with 1 additions and 1 deletions

View File

@ -1444,7 +1444,7 @@ init(bool is_no_vacuum)
if (j % 100000 == 0)
fprintf(stderr, "%d of %d tuples (%d%%) done.\n",
j, naccounts * scale,
j * 100 / (naccounts * scale));
(int) (((int64) j * 100) / (naccounts * scale)));
}
if (PQputline(con, "\\.\n"))
{