SET DEFAULT_STORAGE_ENGINE='tokudb';
*** Bug #22169 ***
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a int, b int, c int, z int, y int, x int, r int, s int, t int, key (z), key(x), key(t));
id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	filtered	Extra
1	SIMPLE	t1	NULL	index	NULL	foo	10	NULL	10	100.00	Using index
Warnings:
Note	1003	/* select#1 */ select `test`.`t1`.`c` AS `c`,`test`.`t1`.`z` AS `z` from `test`.`t1`
c	z
0	100
2	90
4	80
6	70
8	60
10	50
12	40
14	30
16	20
18	10
id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	filtered	Extra
1	SIMPLE	t1	NULL	ALL	NULL	NULL	NULL	NULL	10	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`.`z` AS `z`,`test`.`t1`.`y` AS `y`,`test`.`t1`.`x` AS `x`,`test`.`t1`.`r` AS `r`,`test`.`t1`.`s` AS `s`,`test`.`t1`.`t` AS `t` from `test`.`t1`
a	b	c	z	y	x	r	s	t
1	9	18	10	100	1000	2	3	4
2	8	16	20	200	2000	4	6	8
3	7	14	30	300	3000	6	9	12
4	6	12	40	400	4000	8	12	16
5	5	10	50	500	5000	10	15	20
6	4	8	60	600	6000	12	18	24
7	3	6	70	700	7000	14	21	28
8	2	4	80	800	8000	16	24	32
9	1	2	90	900	9000	18	27	36
10	0	0	100	1000	10000	20	30	40
id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	filtered	Extra
1	SIMPLE	t1	NULL	index	NULL	bar	10	NULL	10	100.00	Using index
Warnings:
Note	1003	/* select#1 */ select `test`.`t1`.`t` AS `t`,`test`.`t1`.`r` AS `r` from `test`.`t1`
t	r
4	2
8	4
12	6
16	8
20	10
24	12
28	14
32	16
36	18
40	20
id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	filtered	Extra
1	SIMPLE	t1	NULL	ALL	NULL	NULL	NULL	NULL	10	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`.`z` AS `z`,`test`.`t1`.`y` AS `y`,`test`.`t1`.`x` AS `x`,`test`.`t1`.`r` AS `r`,`test`.`t1`.`s` AS `s`,`test`.`t1`.`t` AS `t` from `test`.`t1`
a	b	c	z	y	x	r	s	t
1	9	18	10	100	1000	2	3	4
2	8	16	20	200	2000	4	6	8
3	7	14	30	300	3000	6	9	12
4	6	12	40	400	4000	8	12	16
5	5	10	50	500	5000	10	15	20
6	4	8	60	600	6000	12	18	24
7	3	6	70	700	7000	14	21	28
8	2	4	80	800	8000	16	24	32
9	1	2	90	900	9000	18	27	36
10	0	0	100	1000	10000	20	30	40
