-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDEV-7317: Make an index ignorable to the optimizer: more tests
Add a test that marking index as [not] ignored uses algorithm=instant with InnoDB.
- Loading branch information
Showing
2 changed files
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
create table t1 (a int, b int, key a1(a)) engine=innodb; | ||
insert into t1 values (1,1),(2,2),(3,3); | ||
set alter_algorithm='instant'; | ||
alter table t1 alter index a1 ignored; | ||
alter table t1 alter index a1 not ignored; | ||
set alter_algorithm=default; | ||
drop table t1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--source include/have_innodb.inc | ||
|
||
# | ||
# Check if marking index as [not] ignored is an instant operation with InnoDB | ||
# | ||
create table t1 (a int, b int, key a1(a)) engine=innodb; | ||
insert into t1 values (1,1),(2,2),(3,3); | ||
|
||
set alter_algorithm='instant'; | ||
alter table t1 alter index a1 ignored; | ||
|
||
alter table t1 alter index a1 not ignored; | ||
|
||
set alter_algorithm=default; | ||
drop table t1; | ||
|