mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 02:51:44 +01:00
24 lines
667 B
Text
24 lines
667 B
Text
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 0
|
|
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;
|