diff options
author | Tatsuo Ishii <ishii@postgresql.org> | 2005-11-23 13:23:34 +0000 |
---|---|---|
committer | Tatsuo Ishii <ishii@postgresql.org> | 2005-11-23 13:23:34 +0000 |
commit | 45722010efeedda925158fdb3046d6ed81c86474 (patch) | |
tree | 67fb165eba0f835578e5bd9b954727e3f24556b2 | |
parent | bef7764835725e5d8468da1c139e9020be689b95 (diff) | |
download | postgresql-45722010efeedda925158fdb3046d6ed81c86474.tar.gz postgresql-45722010efeedda925158fdb3046d6ed81c86474.zip |
Having blank lines in -f scripts was causing silent failures.
per David Fetter
-rw-r--r-- | contrib/pgbench/pgbench.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/contrib/pgbench/pgbench.c b/contrib/pgbench/pgbench.c index b764bdf9a76..8e999630330 100644 --- a/contrib/pgbench/pgbench.c +++ b/contrib/pgbench/pgbench.c @@ -1,5 +1,5 @@ /* - * $PostgreSQL: pgsql/contrib/pgbench/pgbench.c,v 1.45.2.1 2005/11/22 18:23:01 momjian Exp $ + * $PostgreSQL: pgsql/contrib/pgbench/pgbench.c,v 1.45.2.2 2005/11/23 13:23:34 ishii Exp $ * * pgbench: a simple benchmark program for PostgreSQL * written by Tatsuo Ishii @@ -886,11 +886,17 @@ process_file(char *filename) { Command *commands; - commands = process_commands(buf); - if (commands == NULL) - { - fclose(fd); - return false; + + if (strncmp(buf, "\n", 1) != 0) { + commands = process_commands(buf); + if (commands == NULL) + { + fclose(fd); + return false; + } + } else { + lineno++; + continue; } my_commands[lineno] = commands; |