diff --git a/lib/PgSQL_ExplicitTxnStateMgr.cpp b/lib/PgSQL_ExplicitTxnStateMgr.cpp index ec4a167de..a8de9862a 100644 --- a/lib/PgSQL_ExplicitTxnStateMgr.cpp +++ b/lib/PgSQL_ExplicitTxnStateMgr.cpp @@ -391,14 +391,12 @@ TxnCmd PgSQL_TxnCmdParser::parse(std::string_view input) noexcept { cmd_type = TxnCmd::SAVEPOINT; } else if (iequals(first_word, "release")) { cmd_type = TxnCmd::RELEASE; - } else if (iequals(first_word, "rollback")) { + } else if (iequals(first_word, "rollback") || iequals(first_word, "abort")) { + // ABORT is a synonym for ROLLBACK (including ABORT AND CHAIN = ROLLBACK AND CHAIN) cmd_type = TxnCmd::ROLLBACK; } else if (iequals(first_word, "commit") || iequals(first_word, "end")) { cmd.type = TxnCmd::COMMIT; return cmd; - } else if (iequals(first_word, "abort")) { - cmd.type = TxnCmd::ROLLBACK; - return cmd; } // If not a transaction command, return early