Fixed calculation of bid when generating accounts. Used to create
authorJan Wieck <JanWieck@Yahoo.com>
Sat, 27 Sep 2003 19:15:34 +0000 (19:15 +0000)
committerJan Wieck <JanWieck@Yahoo.com>
Sat, 27 Sep 2003 19:15:34 +0000 (19:15 +0000)
accounts.bid values of zero.

Jan

contrib/pgbench/pgbench.c

index a083f0140cd97c84bac230e48a9588c9d4db5919..6072b17c6e32c2acf1653b1d2bf2dfec59e922e7 100644 (file)
@@ -567,7 +567,7 @@ init(void)
                        PQclear(res);
                }
 
-               snprintf(sql, 256, "%d\t%d\t%d\t\n", j, j / naccounts, 0);
+               snprintf(sql, 256, "%d\t%d\t%d\t\n", j, i / naccounts + 1, 0);
                if (PQputline(con, sql))
                {
                        fprintf(stderr, "PQputline failed\n");