From: Neil Conway Date: Tue, 24 May 2005 00:26:40 +0000 (+0000) Subject: Correct a thinko in pgbench that might result in incorrectly ignoring an X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=b3c320db57eb76e504b4ecf784fd90bb4a2eeed3;p=users%2Fbernd%2Fpostgres.git Correct a thinko in pgbench that might result in incorrectly ignoring an error condition when executing some DDL. Per report from ITAGAKI Takahiro. --- diff --git a/contrib/pgbench/pgbench.c b/contrib/pgbench/pgbench.c index f1740db648..714892a3c2 100644 --- a/contrib/pgbench/pgbench.c +++ b/contrib/pgbench/pgbench.c @@ -622,7 +622,7 @@ init(void) for (i = 0; i < (sizeof(DDLAFTERs) / sizeof(char *)); i++) { res = PQexec(con, DDLAFTERs[i]); - if (strncmp(DDLs[i], "drop", 4) && PQresultStatus(res) != PGRES_COMMAND_OK) + if (PQresultStatus(res) != PGRES_COMMAND_OK) { fprintf(stderr, "%s", PQerrorMessage(con)); exit(1);