Skip to content

[YSQL] Output the result of COMMIT or ROLLBACK #29929

@pao214

Description

@pao214

Jira Link: DB-19783

Description

Better to output the result of COMMIT instead of repeating the command since that correctly checks that the txn committed or rolled back.

Here's the code change expected

 $ git diff -- src/postgres/src/test/isolation/isolationtester.c
diff --git a/src/postgres/src/test/isolation/isolationtester.c b/src/postgres/src/test/isolation/isolationtester.c
index dd53d8b0e5..10a788c988 100644
--- a/src/postgres/src/test/isolation/isolationtester.c
+++ b/src/postgres/src/test/isolation/isolationtester.c
@@ -1079,6 +1079,8 @@ try_complete_step(TestSpec *testspec, PermutationStep *pstep, int flags)
                switch (PQresultStatus(res))
                {
                        case PGRES_COMMAND_OK:
+                               printf("%s\n", PQcmdStatus(res));
+                               break;
                        case PGRES_EMPTY_QUERY:
                                break;
                        case PGRES_TUPLES_OK:

Issue Type

kind/bug

Warning: Please confirm that this issue does not contain any sensitive information

  • I confirm this issue does not contain any sensitive information.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions