1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-24981 LOAD INDEX may cause rollback of prepared XA transaction

XAER_RMFAIL means the admin statement was not allowed, it's not a
per-table message, so must fail the whole statement. And must
not rollback, obviously, it's not allowed after prepare.

Also, remove duplicate XAER_RMFAIL in open_tables(),
check_has_uncommitted_xa() already issues it.
This commit is contained in:
Sergei Golubchik
2025-07-18 20:32:45 +02:00
parent d6cb7255e9
commit 288db5fa5f
4 changed files with 40 additions and 11 deletions

View File

@@ -4598,10 +4598,7 @@ bool open_tables(THD *thd, const DDL_options_st &options,
if (!table->schema_table)
{
if (thd->transaction->xid_state.check_has_uncommitted_xa())
{
thd->transaction->xid_state.er_xaer_rmfail();
DBUG_RETURN(true);
}
else
break;
}