mariadb/mysql-test/suite/galera/r/mdev-31285.result
Jan Lindström 3c65434b78 MDEV-31285 : Assertion `state() == s_executing || state() == s_preparing ||
state() == s_prepared || state() == s_must_abort || state() == s_aborting ||
state() == s_cert_failed || state() == s_must_replay' failed

When applier tries to execute write rows event it find out
in table_def::compatible_with that value is not compatible
and sets error and thd->is_slave_error but thd->is_error()
is false. Later in rpl_group_info::slave_close_thread_tables
we commit stmt. This is bad for Galera because later in
apply_write_set we notice that event apply was not successful
and try to rollback transaction, but wsrep transaction
is already in s_committed state.

This is fixed on rpl_group_info::slave_close_thread_tables
so that in Galera case we rollback stmt if thd->is_slave_error
or thd->is_error() is set. Then later we can rollback wsrep
transaction.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2023-09-28 19:28:25 +02:00

23 lines
641 B
Text

connection node_2;
connection node_1;
connection node_1;
connection node_2;
connection node_1;
CREATE TABLE t ENGINE=InnoDB WITH SYSTEM VERSIONING AS SELECT 1 AS i;
SHOW CREATE TABLE t;
Table Create Table
t CREATE TABLE `t` (
`i` int(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
SELECT * from t;
i
1
DROP TABLE IF EXISTS t;
COMMIT;
connection node_2;
SET SESSION wsrep_sync_wait=0;
Killing server ...
Starting server ...
connection node_2;
call mtr.add_suppression("WSREP: Event .*Write_rows_v1 apply failed:.*");
call mtr.add_suppression("SREP: Failed to apply write set: gtid:.*");