https://www.cnblogs.com/isuben/p/7908468.html
1、首先要确保mysql开启XA事务支持 SHOW VARIABLES LIKE '%XA%'
如果innodb_support_xa的值是ON就说明mysql已经开启对XA事务的支持了。 如果不是就执行:
SET innodb_support_xa = ON
start transaction; insert into yejr.a values (1); insert into test.b values (2); commit;