1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-07-28 20:02:00 +03:00

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.
This commit is contained in:
Daniele Sciascia
2021-06-09 17:40:43 +02:00
parent 85b8150321
commit 0304aa85c7

View File

@ -1106,14 +1106,13 @@ int wsrep::transaction::commit_or_rollback_by_xid(const wsrep::xid& xid,
return 1;
}
int flags(0);
if (commit)
{
flags = wsrep::provider::flag::commit;
flags(wsrep::provider::flag::commit);
}
else
{
flags = wsrep::provider::flag::rollback;
flags(wsrep::provider::flag::rollback);
}
pa_unsafe(true);
wsrep::stid stid(sa->transaction().server_id(),
@ -1124,7 +1123,7 @@ int wsrep::transaction::commit_or_rollback_by_xid(const wsrep::xid& xid,
const enum wsrep::provider::status cert_ret(
provider().certify(client_state_.id(),
ws_handle_,
flags,
flags(),
meta));
int ret;