Skip to content

Commit e9ff025

Browse files
Jan WieckJan Wieck
authored andcommitted
Fixed calculation of bid when generating accounts. Used to create
accounts.bid values of zero. Jan
1 parent 4f7a2fa commit e9ff025

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contrib/pgbench/pgbench.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* $Header: /cvsroot/pgsql/contrib/pgbench/pgbench.c,v 1.26 2003/08/04 00:43:11 momjian Exp $
2+
* $Header: /cvsroot/pgsql/contrib/pgbench/pgbench.c,v 1.27 2003/09/27 19:15:34 wieck Exp $
33
*
44
* pgbench: a simple TPC-B like benchmark program for PostgreSQL
55
* written by Tatsuo Ishii
@@ -567,7 +567,7 @@ init(void)
567567
PQclear(res);
568568
}
569569

570-
snprintf(sql, 256, "%d\t%d\t%d\t\n", j, j / naccounts, 0);
570+
snprintf(sql, 256, "%d\t%d\t%d\t\n", j, i / naccounts + 1, 0);
571571
if (PQputline(con, sql))
572572
{
573573
fprintf(stderr, "PQputline failed\n");

0 commit comments

Comments
 (0)