mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
BUG#27216817: INNODB: FAILING ASSERTION: PREBUILT->TABLE->N_MYSQL_HANDLES_OPENED == 1
disable online alter add primary key for innodb, if the table is opened/locked more than once in the current connection (see assert in ha_innobase::add_index())
This commit is contained in:
24
mysql-test/suite/innodb/r/innodb_bug27216817.result
Normal file
24
mysql-test/suite/innodb/r/innodb_bug27216817.result
Normal file
@@ -0,0 +1,24 @@
|
||||
create table t1 (a int not null, b int not null) engine=innodb;
|
||||
insert t1 values (1,2),(3,4);
|
||||
lock table t1 write, t1 tr read;
|
||||
flush status;
|
||||
alter table t1 add primary key (b);
|
||||
show status like 'Handler_read_rnd_next';
|
||||
Variable_name Value
|
||||
Handler_read_rnd_next 3
|
||||
unlock tables;
|
||||
alter table t1 drop primary key;
|
||||
lock table t1 write;
|
||||
flush status;
|
||||
alter table t1 add primary key (b);
|
||||
show status like 'Handler_read_rnd_next';
|
||||
Variable_name Value
|
||||
Handler_read_rnd_next 0
|
||||
unlock tables;
|
||||
alter table t1 drop primary key;
|
||||
flush status;
|
||||
alter table t1 add primary key (b);
|
||||
show status like 'Handler_read_rnd_next';
|
||||
Variable_name Value
|
||||
Handler_read_rnd_next 0
|
||||
drop table t1;
|
Reference in New Issue
Block a user