mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Fix for bug #28652: MySQL (with-debug=full) asserts when alter table operations
Problem: we may create a deadlock committing changes in the mysql_alter_table() when LOCK_open is set. Moreover, "in some variants of the ALTER TABLE commit happens earlier, outside of LOCK_open, in other later - inside. It's no good, a storage engine code that is called in between could expect a consistency - either there is a transaction or there is not". Fix: move the commit to happen earlier and outside of the LOCK_open.
This commit is contained in:

parent
0dc78d3913
commit
2b2a80733d
@ -617,4 +617,12 @@ EXPLAIN SELECT COUNT(*) FROM t2 WHERE stat_id IN (1,3) AND acct_id=785;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 range idx1,idx2 idx1 9 NULL 2 Using where; Using index
|
||||
DROP TABLE t1,t2;
|
||||
create table t1(a int) engine=innodb;
|
||||
alter table t1 comment '123';
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) default NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='123'
|
||||
drop table t1;
|
||||
End of 5.0 tests
|
||||
|
Reference in New Issue
Block a user