Commit ca0b960e authored by Tom Lane's avatar Tom Lane

Prevent overflow in pgbench's percent-done display.

Per Thom Brown.
parent 5d1abe64
...@@ -1444,7 +1444,7 @@ init(bool is_no_vacuum) ...@@ -1444,7 +1444,7 @@ init(bool is_no_vacuum)
if (j % 100000 == 0) if (j % 100000 == 0)
fprintf(stderr, "%d of %d tuples (%d%%) done.\n", fprintf(stderr, "%d of %d tuples (%d%%) done.\n",
j, naccounts * scale, j, naccounts * scale,
j * 100 / (naccounts * scale)); (int) (((int64) j * 100) / (naccounts * scale)));
} }
if (PQputline(con, "\\.\n")) if (PQputline(con, "\\.\n"))
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment