Skip to content

Commit 0304aa8

Browse files
committed
Fix pa_unsafe flag in transaction::commit_or_rollback_by_xid()
Remove `flags` local variable and use flags_ member in transaction::commit_or_rollback_by_xid(). This avoids a case where the pa_unsafe flag was not passed to provider.
1 parent 85b8150 commit 0304aa8

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/transaction.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,14 +1106,13 @@ int wsrep::transaction::commit_or_rollback_by_xid(const wsrep::xid& xid,
11061106
return 1;
11071107
}
11081108

1109-
int flags(0);
11101109
if (commit)
11111110
{
1112-
flags = wsrep::provider::flag::commit;
1111+
flags(wsrep::provider::flag::commit);
11131112
}
11141113
else
11151114
{
1116-
flags = wsrep::provider::flag::rollback;
1115+
flags(wsrep::provider::flag::rollback);
11171116
}
11181117
pa_unsafe(true);
11191118
wsrep::stid stid(sa->transaction().server_id(),
@@ -1124,7 +1123,7 @@ int wsrep::transaction::commit_or_rollback_by_xid(const wsrep::xid& xid,
11241123
const enum wsrep::provider::status cert_ret(
11251124
provider().certify(client_state_.id(),
11261125
ws_handle_,
1127-
flags,
1126+
flags(),
11281127
meta));
11291128

11301129
int ret;

0 commit comments

Comments
 (0)