MENT-1047 Assertion `active() == false' failed with "XA START.."

Galera replication does not support XA transactions yet. Reject any
attempt to `XA START` a transaction, if Galera is enabled.

Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
This commit is contained in:
Daniele Sciascia 2020-12-21 14:44:56 +01:00 committed by Jan Lindström
parent b79b3ff655
commit 04741dc736
3 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,4 @@
connection node_2;
connection node_1;
XA START 'trx';
ERROR 42000: This version of MariaDB doesn't yet support 'XA transactions with Galera replication'

View File

@ -0,0 +1,7 @@
#
# MENT-1047 - Reject XA with Galera replication
#
--source include/galera_cluster.inc
--error ER_NOT_SUPPORTED_YET
XA START 'trx';

View File

@ -5987,6 +5987,14 @@ mysql_execute_command(THD *thd)
break;
}
case SQLCOM_XA_START:
#ifdef WITH_WSREP
if (WSREP(thd))
{
my_error(ER_NOT_SUPPORTED_YET, MYF(0),
"XA transactions with Galera replication");
break;
}
#endif /* WITH_WSREP */
if (trans_xa_start(thd))
goto error;
my_ok(thd);