diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-12-10 01:09:07 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-12-10 01:09:07 +0000 |
commit | 69525fc0ef56ee4cf6502a7a57247f4cebeead45 (patch) | |
tree | 9d1b930e74cb98f536b891da58ac7b349e07eafd | |
parent | ecf4df6116c043a31f65eabfd9022a09d7490d7a (diff) | |
download | postgresql-69525fc0ef56ee4cf6502a7a57247f4cebeead45.tar.gz postgresql-69525fc0ef56ee4cf6502a7a57247f4cebeead45.zip |
Remove incorrect increment of lineno, per David Fetter.
Sync HEAD and 8.1 branches of pgbench.
-rw-r--r-- | contrib/pgbench/pgbench.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/contrib/pgbench/pgbench.c b/contrib/pgbench/pgbench.c index a5060204ce8..79f6ba66727 100644 --- a/contrib/pgbench/pgbench.c +++ b/contrib/pgbench/pgbench.c @@ -1,5 +1,5 @@ /* - * $PostgreSQL: pgsql/contrib/pgbench/pgbench.c,v 1.48 2005/11/23 12:19:12 ishii Exp $ + * $PostgreSQL: pgsql/contrib/pgbench/pgbench.c,v 1.49 2005/12/10 01:09:07 tgl Exp $ * * pgbench: a simple benchmark program for PostgreSQL * written by Tatsuo Ishii @@ -411,6 +411,7 @@ doCustom(CState * state, int n, int debug) CState *st = &state[n]; Command **commands; +top: commands = sql_files[st->use_file]; if (st->listen) @@ -489,6 +490,7 @@ doCustom(CState * state, int n, int debug) { st->state = 0; st->use_file = getrand(0, num_files - 1); + commands = sql_files[st->use_file]; } } @@ -572,6 +574,8 @@ doCustom(CState * state, int n, int debug) free(val); st->listen = 1; } + + goto top; } } @@ -894,10 +898,8 @@ process_file(char *filename) fclose(fd); return false; } - } else { - lineno++; + } else continue; - } my_commands[lineno] = commands; lineno++; |