forked from pingcap/tidb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
executor: add a new column
is_global
into `information_schema.tidb_…
…indexes` table (pingcap#53345) close pingcap#53342
- Loading branch information
1 parent
61809f8
commit c9b77d4
Showing
5 changed files
with
37 additions
and
5 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
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
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
14 changes: 14 additions & 0 deletions
14
tests/integrationtest/r/globalindex/information_schema.result
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,14 @@ | ||
set tidb_enable_global_index=true; | ||
drop table if exists t; | ||
CREATE TABLE `t` ( | ||
`a` int(11) DEFAULT NULL, | ||
`b` int(11) DEFAULT NULL, | ||
UNIQUE KEY `idx1` (`b`), | ||
KEY `idx` (`b`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin | ||
PARTITION BY HASH (`a`) PARTITIONS 5; | ||
select key_name, is_global from information_schema.tidb_indexes where table_name='t' and table_schema='globalindex__information_schema' order by key_name; | ||
key_name is_global | ||
idx 0 | ||
idx1 1 | ||
set tidb_enable_global_index=default; |
15 changes: 15 additions & 0 deletions
15
tests/integrationtest/t/globalindex/information_schema.test
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,15 @@ | ||
set tidb_enable_global_index=true; | ||
|
||
drop table if exists t; | ||
CREATE TABLE `t` ( | ||
`a` int(11) DEFAULT NULL, | ||
`b` int(11) DEFAULT NULL, | ||
UNIQUE KEY `idx1` (`b`), | ||
KEY `idx` (`b`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin | ||
PARTITION BY HASH (`a`) PARTITIONS 5; | ||
|
||
select key_name, is_global from information_schema.tidb_indexes where table_name='t' and table_schema='globalindex__information_schema' order by key_name; | ||
|
||
set tidb_enable_global_index=default; | ||
|