mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-28944 XA assertions failing in binlog_rollback and binlog_commit
This commit is contained in:
@ -54,3 +54,22 @@ c c2 stamp
|
|||||||
5 5 0000-00-00 00:00:00
|
5 5 0000-00-00 00:00:00
|
||||||
drop table t;
|
drop table t;
|
||||||
set sql_mode=default;
|
set sql_mode=default;
|
||||||
|
#
|
||||||
|
# MDEV-28944 XA assertions failing in binlog_rollback and binlog_commit
|
||||||
|
#
|
||||||
|
CREATE TABLE t (a INT) ENGINE=MyISAM;
|
||||||
|
INSERT INTO t VALUES (1);
|
||||||
|
connect con1,localhost,root,,test;
|
||||||
|
XA START 'xid';
|
||||||
|
SELECT * FROM t;
|
||||||
|
a
|
||||||
|
1
|
||||||
|
connection default;
|
||||||
|
ALTER TABLE t NOWAIT ADD KEY (a);
|
||||||
|
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||||
|
connection con1;
|
||||||
|
UPDATE t SET a = 2;
|
||||||
|
XA END 'xid';
|
||||||
|
XA COMMIT 'xid' ONE PHASE;
|
||||||
|
DROP TABLE t;
|
||||||
|
disconnect con1;
|
||||||
|
@ -33,3 +33,25 @@ alter table t modify c date;
|
|||||||
select * from t;
|
select * from t;
|
||||||
drop table t;
|
drop table t;
|
||||||
set sql_mode=default;
|
set sql_mode=default;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-28944 XA assertions failing in binlog_rollback and binlog_commit
|
||||||
|
--echo #
|
||||||
|
CREATE TABLE t (a INT) ENGINE=MyISAM;
|
||||||
|
INSERT INTO t VALUES (1);
|
||||||
|
|
||||||
|
--connect (con1,localhost,root,,test)
|
||||||
|
XA START 'xid';
|
||||||
|
SELECT * FROM t;
|
||||||
|
|
||||||
|
--connection default
|
||||||
|
--error ER_LOCK_WAIT_TIMEOUT
|
||||||
|
ALTER TABLE t NOWAIT ADD KEY (a);
|
||||||
|
|
||||||
|
--connection con1
|
||||||
|
UPDATE t SET a = 2;
|
||||||
|
XA END 'xid';
|
||||||
|
XA COMMIT 'xid' ONE PHASE;
|
||||||
|
|
||||||
|
DROP TABLE t;
|
||||||
|
--disconnect con1
|
||||||
|
@ -12011,6 +12011,8 @@ copy_data_between_tables(THD *thd, TABLE *from, TABLE *to,
|
|||||||
thd_progress_next_stage(thd);
|
thd_progress_next_stage(thd);
|
||||||
error= online_alter_read_from_binlog(thd, &rgi, binlog);
|
error= online_alter_read_from_binlog(thd, &rgi, binlog);
|
||||||
}
|
}
|
||||||
|
if (error)
|
||||||
|
from->s->tdc->flush_unused(1); // to free the binlog
|
||||||
}
|
}
|
||||||
else if (online) // error was on copy stage
|
else if (online) // error was on copy stage
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user