mirror of
https://github.com/postgres/postgres.git
synced 2025-04-24 10:47:04 +03:00
Prevent overflow in pgbench's percent-done display.
Per Thom Brown.
This commit is contained in:
parent
5d1abe64e6
commit
ca0b960eb5
@ -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"))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user