1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge 10.5 into 10.6

This commit is contained in:
Marko Mäkelä
2023-04-21 16:38:22 +03:00
10 changed files with 165 additions and 21 deletions

View File

@ -1824,7 +1824,19 @@ int ha_commit_trans(THD *thd, bool all)
ordering is normally done. Commit ordering must be done here.
*/
if (run_wsrep_hooks)
error= wsrep_before_commit(thd, all);
{
// This commit involves more than one storage engine and requires
// two phases, but some engines don't support it.
// Issue a message to the client and roll back the transaction.
if (trans->no_2pc && rw_ha_count > 1)
{
my_message(ER_ERROR_DURING_COMMIT, "Transactional commit not supported "
"by involved engine(s)", MYF(0));
error= 1;
}
else
error= wsrep_before_commit(thd, all);
}
if (error)
{
ha_rollback_trans(thd, FALSE);