Correct a thinko in pgbench that might result in incorrectly ignoring an
authorNeil Conway <[email protected]>
Tue, 24 May 2005 00:26:40 +0000 (00:26 +0000)
committerNeil Conway <[email protected]>
Tue, 24 May 2005 00:26:40 +0000 (00:26 +0000)
error condition when executing some DDL. Per report from ITAGAKI Takahiro.

contrib/pgbench/pgbench.c

index f1740db648b2ed5cb248c30a3b77a9e836136937..714892a3c2a3936899d2224490a828a286c865f1 100644 (file)
@@ -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);