1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-04 20:11:56 +03:00

Allow isolation tests to specify multiple setup blocks.

Each setup block is run as a single PQexec submission, and some
statements such as VACUUM cannot be combined with others in such a
block.

Backpatch to 9.2.

Kevin Grittner and Tom Lane
This commit is contained in:
Kevin Grittner
2012-09-04 19:31:06 -05:00
parent 63f1ccd838
commit c63f309cca
4 changed files with 35 additions and 8 deletions

View File

@@ -512,9 +512,9 @@ run_permutation(TestSpec * testspec, int nsteps, Step ** steps)
printf("\n");
/* Perform setup */
if (testspec->setupsql)
for (i = 0; i < testspec->nsetupsqls; i++)
{
res = PQexec(conns[0], testspec->setupsql);
res = PQexec(conns[0], testspec->setupsqls[i]);
if (PQresultStatus(res) != PGRES_COMMAND_OK)
{
fprintf(stderr, "setup failed: %s", PQerrorMessage(conns[0]));