![](https://secure.gravatar.com/avatar/39b623a1559cf9c69ac3d9d4fb44e7fe.jpg?s=120&d=mm&r=g)
Hi, Nikita, On Jan 19, Nikita Malyavin wrote:
revision-id: 0b403e03939 (mariadb-11.7.1-16-g0b403e03939) parent(s): 40e502eca4c author: Nikita Malyavin committer: Nikita Malyavin timestamp: 2025-01-03 00:54:52 +0100 message:
MDEV-35661 Assertion `!cache_list ||...' fails in online_alter_close_connection
After MDEV-35182 (88adcbf3) fix, online_alter still wasn't fully ready for `XA PREPARE` to be skipped.
In fact, according to XA standard, even xa_commit() call may happen without preceding xa_prepare(), so this stage is completely optional.
This commit removes any relying on xa_prepare() call. The only thing that will be done there is an equivalent of "statement-level commit", which basically just flushes a pending rows event to an online alter cache.
This is done by always storing an online alter cache in the XA_data object whenever XA is active, rather than in THD::ha_data.
Why? I thought it'd be simpler to keep the cache in the THD and take it off it in commit or rollback. That is, almost as now, but commit/rollback won't rely on prepare being called before. Regards, Sergei Chief Architect, MariaDB Server and security@mariadb.org