mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-29038 XA assertions failing in binlog_rollback and binlog_commit
ONLINE ALTER TABLE adds binlog handlerton into ha_list, so any rollback command can end up calling binlog_rollback having no cache_mngr, if binlog is not enabled. The assertion should be fixed in the same manner as DBUG_ASSERT(WSREP(thd))
This commit is contained in:
committed by
Sergei Golubchik
parent
45bafdbe25
commit
754c8dab52
@ -1113,6 +1113,45 @@ alter table t1 force;
|
||||
drop table t1, t2;
|
||||
set debug_sync= reset;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-29038 XA assertions failing in binlog_rollback and binlog_commit
|
||||
--echo #
|
||||
create table t (a int) engine=innodb;
|
||||
insert into t values (1);
|
||||
xa begin 'xid';
|
||||
--send
|
||||
set debug_sync= 'now wait_for downgraded';
|
||||
|
||||
--connect (con1,localhost,root,,test)
|
||||
set debug_sync= 'alter_table_online_downgraded signal downgraded wait_for goforit';
|
||||
--send
|
||||
alter table t force, algorithm=copy, lock=none;
|
||||
|
||||
--connection default
|
||||
--reap
|
||||
insert into t values (2);
|
||||
set debug_sync= 'now signal goforit';
|
||||
xa end 'xid';
|
||||
xa rollback 'xid';
|
||||
|
||||
xa begin 'xid';
|
||||
--connection con1
|
||||
--reap
|
||||
set debug_sync= 'alter_table_online_downgraded signal downgraded wait_for goforit';
|
||||
--send
|
||||
alter table t force, algorithm=copy, lock=none;
|
||||
|
||||
--connection default
|
||||
set debug_sync= 'now wait_for downgraded';
|
||||
insert into t values (3);
|
||||
set debug_sync= 'now signal goforit';
|
||||
xa end 'xid';
|
||||
xa commit 'xid' one phase;
|
||||
|
||||
# Cleanup
|
||||
drop table t;
|
||||
set debug_sync= reset;
|
||||
|
||||
--echo #
|
||||
--echo # End of 11.2 tests
|
||||
--echo #
|
||||
|
Reference in New Issue
Block a user