mirror of
https://github.com/MariaDB/server.git
synced 2025-09-09 18:40:27 +03:00
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())
29 lines
680 B
Plaintext
29 lines
680 B
Plaintext
#
|
|
# BUG#27216817: INNODB: FAILING ASSERTION:
|
|
# PREBUILT->TABLE->N_MYSQL_HANDLES_OPENED == 1
|
|
#
|
|
|
|
source include/have_innodb.inc;
|
|
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';
|
|
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';
|
|
unlock tables;
|
|
alter table t1 drop primary key;
|
|
|
|
flush status;
|
|
alter table t1 add primary key (b);
|
|
show status like 'Handler_read_rnd_next';
|
|
|
|
drop table t1;
|