Skip to content

Commit

Permalink
Merge pull request #245 from PeterWeiWang/mysql-8.0.25-olap-kp
Browse files Browse the repository at this point in the history
support for parallel queries
  • Loading branch information
liuwei-ck authored Mar 7, 2022
2 parents 7b41f16 + 32232a5 commit a3d285f
Show file tree
Hide file tree
Showing 64 changed files with 93,734 additions and 0 deletions.
1,790 changes: 1,790 additions & 0 deletions mysql-test/suite/gcol/r/gcol_keys_innodb.result-pq

Large diffs are not rendered by default.

2,007 changes: 2,007 additions & 0 deletions mysql-test/suite/innodb/r/innodb-index.result-pq

Large diffs are not rendered by default.

128 changes: 128 additions & 0 deletions mysql-test/suite/innodb/r/innodb-index_ucs2.result-pq
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
create table t1(a int not null, b int, c char(10), d varchar(20), primary key (a)) engine = innodb default charset=ucs2;
insert into t1 values (1,1,'ab','ab'),(2,2,'ac','ac'),(3,2,'ad','ad'),(4,4,'afe','afe');
commit;
alter table t1 add unique index (b);
ERROR 23000: Duplicate entry '2' for key 't1.b'
insert into t1 values(8,9,'fff','fff');
select * from t1;
a b c d
1 1 ab ab
2 2 ac ac
3 2 ad ad
4 4 afe afe
8 9 fff fff
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int NOT NULL,
`b` int DEFAULT NULL,
`c` char(10) DEFAULT NULL,
`d` varchar(20) DEFAULT NULL,
PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=ucs2
alter table t1 add index (b);
insert into t1 values(10,10,'kkk','iii');
select * from t1;
a b c d
1 1 ab ab
2 2 ac ac
3 2 ad ad
4 4 afe afe
8 9 fff fff
10 10 kkk iii
select * from t1 force index(b) order by b;
a b c d
1 1 ab ab
2 2 ac ac
3 2 ad ad
4 4 afe afe
8 9 fff fff
10 10 kkk iii
explain select * from t1 force index(b) order by b;
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1 SIMPLE <gather2> NULL ALL NULL NULL NULL NULL 6 100.00 Parallel execute (1 workers)
2 SIMPLE t1 NULL index NULL b 5 NULL 6 100.00 NULL
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d` from `test`.`t1` FORCE INDEX (`b`) order by `test`.`t1`.`b`
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int NOT NULL,
`b` int DEFAULT NULL,
`c` char(10) DEFAULT NULL,
`d` varchar(20) DEFAULT NULL,
PRIMARY KEY (`a`),
KEY `b` (`b`)
) ENGINE=InnoDB DEFAULT CHARSET=ucs2
alter table t1 add unique index (c), add index (d);
insert into t1 values(11,11,'aaa','mmm');
select * from t1;
a b c d
1 1 ab ab
2 2 ac ac
3 2 ad ad
4 4 afe afe
8 9 fff fff
10 10 kkk iii
11 11 aaa mmm
select * from t1 force index(b) order by b;
a b c d
1 1 ab ab
2 2 ac ac
3 2 ad ad
4 4 afe afe
8 9 fff fff
10 10 kkk iii
11 11 aaa mmm
select * from t1 force index(c) order by c;
a b c d
11 11 aaa mmm
1 1 ab ab
2 2 ac ac
3 2 ad ad
4 4 afe afe
8 9 fff fff
10 10 kkk iii
select * from t1 force index(d) order by d;
a b c d
1 1 ab ab
2 2 ac ac
3 2 ad ad
4 4 afe afe
8 9 fff fff
10 10 kkk iii
11 11 aaa mmm
explain select * from t1 force index(b) order by b;
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1 SIMPLE <gather2> NULL ALL NULL NULL NULL NULL 7 100.00 Parallel execute (1 workers)
2 SIMPLE t1 NULL index NULL b 5 NULL 7 100.00 NULL
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d` from `test`.`t1` FORCE INDEX (`b`) order by `test`.`t1`.`b`
explain select * from t1 force index(c) order by c;
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1 SIMPLE <gather2> NULL ALL NULL NULL NULL NULL 7 100.00 Parallel execute (1 workers)
2 SIMPLE t1 NULL index NULL c 21 NULL 7 100.00 NULL
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d` from `test`.`t1` FORCE INDEX (`c`) order by `test`.`t1`.`c`
explain select * from t1 force index(d) order by d;
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1 SIMPLE <gather2> NULL ALL NULL NULL NULL NULL 7 100.00 Parallel execute (1 workers)
2 SIMPLE t1 NULL index NULL d 43 NULL 7 100.00 NULL
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d` from `test`.`t1` FORCE INDEX (`d`) order by `test`.`t1`.`d`
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int NOT NULL,
`b` int DEFAULT NULL,
`c` char(10) DEFAULT NULL,
`d` varchar(20) DEFAULT NULL,
PRIMARY KEY (`a`),
UNIQUE KEY `c` (`c`),
KEY `b` (`b`),
KEY `d` (`d`)
) ENGINE=InnoDB DEFAULT CHARSET=ucs2
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
drop table t1;
Loading

0 comments on commit a3d285f

Please sign in to comment.