| 1 |
# |
| 2 |
# MDEV-25226 - Test the case the where wsrep_on is set OFF |
| 3 |
# on a transaction that has already replicated a fragment. |
| 4 |
# |
| 5 |
# This would cause: Assertion `transaction_.active() == false || |
| 6 |
# (transaction_.state() == wsrep::transaction::s_executing || |
| 7 |
# transaction_.state() == wsrep::transaction::s_prepared || |
| 8 |
# transaction_.state() == wsrep::transaction::s_aborted || |
| 9 |
# transaction_.state() == wsrep::transaction::s_must_abort)' |
| 10 |
# |
| 11 |
|
| 12 |
--source include/galera_cluster.inc |
| 13 |
|
| 14 |
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY); |
| 15 |
|
| 16 |
SET SESSION wsrep_trx_fragment_size=1; |
| 17 |
START TRANSACTION; |
| 18 |
INSERT INTO t1 VALUES(1); |
| 19 |
--error ER_CANT_DO_THIS_DURING_AN_TRANSACTION |
| 20 |
SET SESSION wsrep_on=OFF; |
| 21 |
--error ER_CANT_DO_THIS_DURING_AN_TRANSACTION |
| 22 |
SET GLOBAL wsrep_on=OFF; |
| 23 |
INSERT INTO t1 VALUES(2); |
| 24 |
COMMIT; |
| 25 |
|
| 26 |
--connection node_1 |
| 27 |
SELECT * FROM t1; |
| 28 |
|
| 29 |
--connection node_2 |
| 30 |
SELECT * FROM t1; |
| 31 |
|
| 32 |
--connection node_1 |
| 33 |
DROP TABLE t1; |