From b3c320db57eb76e504b4ecf784fd90bb4a2eeed3 Mon Sep 17 00:00:00 2001 From: Neil Conway Date: Tue, 24 May 2005 00:26:40 +0000 Subject: [PATCH] Correct a thinko in pgbench that might result in incorrectly ignoring an error condition when executing some DDL. Per report from ITAGAKI Takahiro. --- contrib/pgbench/pgbench.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.39.5