mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 13:32:33 +01:00
#4521 move add_index tests to common mysql test directory refs[t:4521]
git-svn-id: file:///svn/mysql/tests/mysql-test@40869 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
e072fc19e0
commit
09ec3e6d9f
56 changed files with 2176 additions and 0 deletions
15
mysql-test/suite/tokudb.add_index/r/1522.result
Executable file
15
mysql-test/suite/tokudb.add_index/r/1522.result
Executable file
|
@ -0,0 +1,15 @@
|
|||
SET STORAGE_ENGINE='tokudb';
|
||||
DROP TABLE IF EXISTS t1;
|
||||
create table t1 (a int, b int) engine=tokudb;
|
||||
insert into t1 values (1,1),(1,2),(2,1),(2,2);
|
||||
select count(*) from t1 where b > 0;
|
||||
count(*)
|
||||
4
|
||||
alter table t1 add clustering index b(b);
|
||||
explain select count(*) from t1 where b > 0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index b b 5 NULL 4 Using where; Using index
|
||||
select count(*) from t1 where b > 0;
|
||||
count(*)
|
||||
4
|
||||
DROP TABLE t1;
|
43
mysql-test/suite/tokudb.add_index/r/add_index_1.result
Normal file
43
mysql-test/suite/tokudb.add_index/r/add_index_1.result
Normal file
|
@ -0,0 +1,43 @@
|
|||
SET STORAGE_ENGINE='tokudb';
|
||||
*** Bug #22169 ***
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (a int, str varchar(3), b int, c int, z int, y int, x int, r int, s int, t int, d char(4), primary key (a,b), key (z), key(x), key(t));
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL foo foo NULL NULL NULL; Using where; Using index
|
||||
c r
|
||||
0 20
|
||||
2 18
|
||||
4 16
|
||||
6 14
|
||||
8 12
|
||||
10 10
|
||||
12 8
|
||||
14 6
|
||||
16 4
|
||||
18 2
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL foo foo NULL NULL NULL; Using where; Using index
|
||||
c r a b
|
||||
0 20 10 0
|
||||
2 18 9 1
|
||||
4 16 8 2
|
||||
6 14 7 3
|
||||
8 12 6 4
|
||||
10 10 5 5
|
||||
12 8 4 6
|
||||
14 6 3 7
|
||||
16 4 2 8
|
||||
18 2 1 9
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL NULL NULL NULL NULL NULL;
|
||||
a str b c z y x r s t d
|
||||
1 s 9 18 10 100 1000 2 3 4 AB
|
||||
2 s 8 16 20 200 2000 4 6 8 AB
|
||||
3 s 7 14 30 300 3000 6 9 12 AB
|
||||
4 s 6 12 40 400 4000 8 12 16 AB
|
||||
5 s 5 10 50 500 5000 10 15 20 AB
|
||||
6 s 4 8 60 600 6000 12 18 24 AB
|
||||
7 s 3 6 70 700 7000 14 21 28 AB
|
||||
8 s 2 4 80 800 8000 16 24 32 AB
|
||||
9 s 1 2 90 900 9000 18 27 36 AB
|
||||
10 s 0 0 100 1000 10000 20 30 40 AB
|
17
mysql-test/suite/tokudb.add_index/r/add_index_10.result
Normal file
17
mysql-test/suite/tokudb.add_index/r/add_index_10.result
Normal file
|
@ -0,0 +1,17 @@
|
|||
SET 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));
|
||||
ERROR 23000: Can't write; duplicate key in table '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
|
||||
5 52 18 5 5 5 2 5 5
|
30
mysql-test/suite/tokudb.add_index/r/add_index_11.result
Normal file
30
mysql-test/suite/tokudb.add_index/r/add_index_11.result
Normal file
|
@ -0,0 +1,30 @@
|
|||
SET STORAGE_ENGINE='tokudb';
|
||||
*** Bug #22169 ***
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (a int, str varchar(3), b int, c int, z int, y int, x int, r int, s int, t int, d char(4), key (z), key(x), key(t));
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL foo foo NULL NULL NULL; Using where; Using index
|
||||
c r
|
||||
0 20
|
||||
2 18
|
||||
4 16
|
||||
6 14
|
||||
8 12
|
||||
10 10
|
||||
12 8
|
||||
14 6
|
||||
16 4
|
||||
18 2
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL NULL NULL NULL NULL NULL;
|
||||
a str b c z y x r s t d
|
||||
1 s 9 18 10 100 1000 2 3 4 AB
|
||||
2 s 8 16 20 200 2000 4 6 8 AB
|
||||
3 s 7 14 30 300 3000 6 9 12 AB
|
||||
4 s 6 12 40 400 4000 8 12 16 AB
|
||||
5 s 5 10 50 500 5000 10 15 20 AB
|
||||
6 s 4 8 60 600 6000 12 18 24 AB
|
||||
7 s 3 6 70 700 7000 14 21 28 AB
|
||||
8 s 2 4 80 800 8000 16 24 32 AB
|
||||
9 s 1 2 90 900 9000 18 27 36 AB
|
||||
10 s 0 0 100 1000 10000 20 30 40 AB
|
30
mysql-test/suite/tokudb.add_index/r/add_index_12.result
Normal file
30
mysql-test/suite/tokudb.add_index/r/add_index_12.result
Normal file
|
@ -0,0 +1,30 @@
|
|||
SET 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 type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL foo foo NULL NULL NULL; Using where; Using index
|
||||
c r
|
||||
0 20
|
||||
2 18
|
||||
4 16
|
||||
6 14
|
||||
8 12
|
||||
10 10
|
||||
12 8
|
||||
14 6
|
||||
16 4
|
||||
18 2
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL NULL NULL NULL NULL NULL;
|
||||
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
|
30
mysql-test/suite/tokudb.add_index/r/add_index_13.result
Normal file
30
mysql-test/suite/tokudb.add_index/r/add_index_13.result
Normal file
|
@ -0,0 +1,30 @@
|
|||
SET STORAGE_ENGINE='tokudb';
|
||||
*** Bug #22169 ***
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (a int, str varchar(3), b int, c int, z int, y int, x int, r int, s int, t int, d char(4), key (z), key(x), key(t));
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL foo1 foo1 NULL NULL NULL; Using where; Using index
|
||||
c r
|
||||
0 20
|
||||
2 18
|
||||
4 16
|
||||
6 14
|
||||
8 12
|
||||
10 10
|
||||
12 8
|
||||
14 6
|
||||
16 4
|
||||
18 2
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL NULL NULL NULL NULL NULL;
|
||||
a str b c z y x r s t d
|
||||
1 s 9 18 10 100 1000 2 3 4 AB
|
||||
2 s 8 16 20 200 2000 4 6 8 AB
|
||||
3 s 7 14 30 300 3000 6 9 12 AB
|
||||
4 s 6 12 40 400 4000 8 12 16 AB
|
||||
5 s 5 10 50 500 5000 10 15 20 AB
|
||||
6 s 4 8 60 600 6000 12 18 24 AB
|
||||
7 s 3 6 70 700 7000 14 21 28 AB
|
||||
8 s 2 4 80 800 8000 16 24 32 AB
|
||||
9 s 1 2 90 900 9000 18 27 36 AB
|
||||
10 s 0 0 100 1000 10000 20 30 40 AB
|
30
mysql-test/suite/tokudb.add_index/r/add_index_14.result
Normal file
30
mysql-test/suite/tokudb.add_index/r/add_index_14.result
Normal file
|
@ -0,0 +1,30 @@
|
|||
SET 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 type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL foo1 foo1 NULL NULL NULL; Using where; Using index
|
||||
c r
|
||||
0 20
|
||||
2 18
|
||||
4 16
|
||||
6 14
|
||||
8 12
|
||||
10 10
|
||||
12 8
|
||||
14 6
|
||||
16 4
|
||||
18 2
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL NULL NULL NULL NULL NULL;
|
||||
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
|
161
mysql-test/suite/tokudb.add_index/r/add_index_15.result
Normal file
161
mysql-test/suite/tokudb.add_index/r/add_index_15.result
Normal file
|
@ -0,0 +1,161 @@
|
|||
SET 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 type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL foo foo NULL NULL NULL; Using where; Using index
|
||||
c r
|
||||
0 20
|
||||
2 18
|
||||
4 16
|
||||
6 14
|
||||
8 12
|
||||
10 10
|
||||
12 8
|
||||
14 6
|
||||
16 4
|
||||
18 2
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL NULL NULL NULL NULL NULL;
|
||||
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 type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL NULL NULL NULL NULL NULL; Using where
|
||||
c r
|
||||
18 2
|
||||
16 4
|
||||
14 6
|
||||
12 8
|
||||
10 10
|
||||
8 12
|
||||
6 14
|
||||
4 16
|
||||
2 18
|
||||
0 20
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL NULL NULL NULL NULL NULL;
|
||||
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 type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL foo foo NULL NULL NULL; Using where; Using index
|
||||
c r
|
||||
0 20
|
||||
2 18
|
||||
4 16
|
||||
6 14
|
||||
8 12
|
||||
10 10
|
||||
12 8
|
||||
14 6
|
||||
16 4
|
||||
18 2
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL NULL NULL NULL NULL NULL;
|
||||
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
|
||||
ERROR 42000: Duplicate key name 'foo'
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL foo foo NULL NULL NULL; Using where; Using index
|
||||
c r
|
||||
0 20
|
||||
2 18
|
||||
4 16
|
||||
6 14
|
||||
8 12
|
||||
10 10
|
||||
12 8
|
||||
14 6
|
||||
16 4
|
||||
18 2
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL NULL NULL NULL NULL NULL;
|
||||
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 type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL z z NULL NULL NULL; Using where; Using index
|
||||
z a
|
||||
10 1
|
||||
20 2
|
||||
30 3
|
||||
40 4
|
||||
50 5
|
||||
60 6
|
||||
70 7
|
||||
80 8
|
||||
90 9
|
||||
100 10
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL NULL NULL NULL NULL NULL;
|
||||
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 type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL foo foo NULL NULL NULL; Using where; Using index
|
||||
c r
|
||||
0 20
|
||||
2 18
|
||||
4 16
|
||||
6 14
|
||||
8 12
|
||||
10 10
|
||||
12 8
|
||||
14 6
|
||||
16 4
|
||||
18 2
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL NULL NULL NULL NULL NULL;
|
||||
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
|
5
mysql-test/suite/tokudb.add_index/r/add_index_16.result
Normal file
5
mysql-test/suite/tokudb.add_index/r/add_index_16.result
Normal file
|
@ -0,0 +1,5 @@
|
|||
SET 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));
|
||||
ERROR 23000: Can't write; duplicate key in table 't1'
|
5
mysql-test/suite/tokudb.add_index/r/add_index_17.result
Normal file
5
mysql-test/suite/tokudb.add_index/r/add_index_17.result
Normal file
|
@ -0,0 +1,5 @@
|
|||
SET 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));
|
||||
ERROR 23000: Duplicate entry '18-2' for key 'foo'
|
56
mysql-test/suite/tokudb.add_index/r/add_index_18.result
Normal file
56
mysql-test/suite/tokudb.add_index/r/add_index_18.result
Normal file
|
@ -0,0 +1,56 @@
|
|||
SET 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 type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index NULL foo 10 NULL 10 Using index
|
||||
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 type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 10
|
||||
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 type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index NULL bar 10 NULL 10 Using index
|
||||
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 type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 10
|
||||
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
|
43
mysql-test/suite/tokudb.add_index/r/add_index_2.result
Normal file
43
mysql-test/suite/tokudb.add_index/r/add_index_2.result
Normal file
|
@ -0,0 +1,43 @@
|
|||
SET 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, primary key (a,b), key (z), key(x), key(t));
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL foo foo NULL NULL NULL; Using where; Using index
|
||||
c r
|
||||
0 20
|
||||
2 18
|
||||
4 16
|
||||
6 14
|
||||
8 12
|
||||
10 10
|
||||
12 8
|
||||
14 6
|
||||
16 4
|
||||
18 2
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL foo foo NULL NULL NULL; Using where; Using index
|
||||
c r a b
|
||||
0 20 10 0
|
||||
2 18 9 1
|
||||
4 16 8 2
|
||||
6 14 7 3
|
||||
8 12 6 4
|
||||
10 10 5 5
|
||||
12 8 4 6
|
||||
14 6 3 7
|
||||
16 4 2 8
|
||||
18 2 1 9
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL NULL NULL NULL NULL NULL;
|
||||
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
|
43
mysql-test/suite/tokudb.add_index/r/add_index_3.result
Normal file
43
mysql-test/suite/tokudb.add_index/r/add_index_3.result
Normal file
|
@ -0,0 +1,43 @@
|
|||
SET STORAGE_ENGINE='tokudb';
|
||||
*** Bug #22169 ***
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (a int, str varchar(3), b int, c int, z int, y int, x int, r int, s int, t int, d char(4), primary key (a,b), key (z), key(x), key(t));
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL foo1 foo1 NULL NULL NULL; Using where; Using index
|
||||
c r
|
||||
0 20
|
||||
2 18
|
||||
4 16
|
||||
6 14
|
||||
8 12
|
||||
10 10
|
||||
12 8
|
||||
14 6
|
||||
16 4
|
||||
18 2
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL foo1 foo1 NULL NULL NULL; Using where; Using index
|
||||
c r a b
|
||||
0 20 10 0
|
||||
2 18 9 1
|
||||
4 16 8 2
|
||||
6 14 7 3
|
||||
8 12 6 4
|
||||
10 10 5 5
|
||||
12 8 4 6
|
||||
14 6 3 7
|
||||
16 4 2 8
|
||||
18 2 1 9
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL NULL NULL NULL NULL NULL;
|
||||
a str b c z y x r s t d
|
||||
1 s 9 18 10 100 1000 2 3 4 AB
|
||||
2 s 8 16 20 200 2000 4 6 8 AB
|
||||
3 s 7 14 30 300 3000 6 9 12 AB
|
||||
4 s 6 12 40 400 4000 8 12 16 AB
|
||||
5 s 5 10 50 500 5000 10 15 20 AB
|
||||
6 s 4 8 60 600 6000 12 18 24 AB
|
||||
7 s 3 6 70 700 7000 14 21 28 AB
|
||||
8 s 2 4 80 800 8000 16 24 32 AB
|
||||
9 s 1 2 90 900 9000 18 27 36 AB
|
||||
10 s 0 0 100 1000 10000 20 30 40 AB
|
43
mysql-test/suite/tokudb.add_index/r/add_index_4.result
Normal file
43
mysql-test/suite/tokudb.add_index/r/add_index_4.result
Normal file
|
@ -0,0 +1,43 @@
|
|||
SET 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, primary key (a,b), key (z), key(x), key(t));
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL foo1 foo1 NULL NULL NULL; Using where; Using index
|
||||
c r
|
||||
0 20
|
||||
2 18
|
||||
4 16
|
||||
6 14
|
||||
8 12
|
||||
10 10
|
||||
12 8
|
||||
14 6
|
||||
16 4
|
||||
18 2
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL foo1 foo1 NULL NULL NULL; Using where; Using index
|
||||
c r a b
|
||||
0 20 10 0
|
||||
2 18 9 1
|
||||
4 16 8 2
|
||||
6 14 7 3
|
||||
8 12 6 4
|
||||
10 10 5 5
|
||||
12 8 4 6
|
||||
14 6 3 7
|
||||
16 4 2 8
|
||||
18 2 1 9
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL NULL NULL NULL NULL NULL;
|
||||
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
|
161
mysql-test/suite/tokudb.add_index/r/add_index_5.result
Normal file
161
mysql-test/suite/tokudb.add_index/r/add_index_5.result
Normal file
|
@ -0,0 +1,161 @@
|
|||
SET 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, primary key (a,b), key (z), key(x), key(t));
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL foo foo NULL NULL NULL; Using where; Using index
|
||||
c r a b
|
||||
0 20 10 0
|
||||
2 18 9 1
|
||||
4 16 8 2
|
||||
6 14 7 3
|
||||
8 12 6 4
|
||||
10 10 5 5
|
||||
12 8 4 6
|
||||
14 6 3 7
|
||||
16 4 2 8
|
||||
18 2 1 9
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL NULL NULL NULL NULL NULL;
|
||||
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 type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL NULL NULL NULL NULL NULL; Using where
|
||||
c r a b
|
||||
18 2 1 9
|
||||
16 4 2 8
|
||||
14 6 3 7
|
||||
12 8 4 6
|
||||
10 10 5 5
|
||||
8 12 6 4
|
||||
6 14 7 3
|
||||
4 16 8 2
|
||||
2 18 9 1
|
||||
0 20 10 0
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL NULL NULL NULL NULL NULL;
|
||||
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 type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL foo foo NULL NULL NULL; Using where; Using index
|
||||
c r a b
|
||||
0 20 10 0
|
||||
2 18 9 1
|
||||
4 16 8 2
|
||||
6 14 7 3
|
||||
8 12 6 4
|
||||
10 10 5 5
|
||||
12 8 4 6
|
||||
14 6 3 7
|
||||
16 4 2 8
|
||||
18 2 1 9
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL NULL NULL NULL NULL NULL;
|
||||
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
|
||||
ERROR 42000: Duplicate key name 'foo'
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL foo foo NULL NULL NULL; Using where; Using index
|
||||
c r a b
|
||||
0 20 10 0
|
||||
2 18 9 1
|
||||
4 16 8 2
|
||||
6 14 7 3
|
||||
8 12 6 4
|
||||
10 10 5 5
|
||||
12 8 4 6
|
||||
14 6 3 7
|
||||
16 4 2 8
|
||||
18 2 1 9
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL NULL NULL NULL NULL NULL;
|
||||
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 type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL z z NULL NULL NULL; Using where; Using index
|
||||
z a b
|
||||
10 1 9
|
||||
20 2 8
|
||||
30 3 7
|
||||
40 4 6
|
||||
50 5 5
|
||||
60 6 4
|
||||
70 7 3
|
||||
80 8 2
|
||||
90 9 1
|
||||
100 10 0
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL NULL NULL NULL NULL NULL;
|
||||
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 type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL foo foo NULL NULL NULL; Using where; Using index
|
||||
c r a b
|
||||
0 20 10 0
|
||||
2 18 9 1
|
||||
4 16 8 2
|
||||
6 14 7 3
|
||||
8 12 6 4
|
||||
10 10 5 5
|
||||
12 8 4 6
|
||||
14 6 3 7
|
||||
16 4 2 8
|
||||
18 2 1 9
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 NULL NULL NULL NULL NULL NULL;
|
||||
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
|
5
mysql-test/suite/tokudb.add_index/r/add_index_6.result
Normal file
5
mysql-test/suite/tokudb.add_index/r/add_index_6.result
Normal file
|
@ -0,0 +1,5 @@
|
|||
SET 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, primary key (a,b), key (z), key(x), key(t));
|
||||
ERROR 23000: Can't write; duplicate key in table 't1'
|
5
mysql-test/suite/tokudb.add_index/r/add_index_7.result
Normal file
5
mysql-test/suite/tokudb.add_index/r/add_index_7.result
Normal file
|
@ -0,0 +1,5 @@
|
|||
SET 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, primary key (a,b), key (z), key(x), key(t));
|
||||
ERROR 23000: Duplicate entry '18-2' for key 'foo'
|
56
mysql-test/suite/tokudb.add_index/r/add_index_8.result
Normal file
56
mysql-test/suite/tokudb.add_index/r/add_index_8.result
Normal file
|
@ -0,0 +1,56 @@
|
|||
SET 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, primary key (a,b), key (z), key(x), key(t));
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index NULL foo 10 NULL 10 Using index
|
||||
c z a b
|
||||
0 100 10 0
|
||||
2 90 9 1
|
||||
4 80 8 2
|
||||
6 70 7 3
|
||||
8 60 6 4
|
||||
10 50 5 5
|
||||
12 40 4 6
|
||||
14 30 3 7
|
||||
16 20 2 8
|
||||
18 10 1 9
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 10
|
||||
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 type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index NULL bar 10 NULL 10 Using index
|
||||
t r a b
|
||||
4 2 1 9
|
||||
8 4 2 8
|
||||
12 6 3 7
|
||||
16 8 4 6
|
||||
20 10 5 5
|
||||
24 12 6 4
|
||||
28 14 7 3
|
||||
32 16 8 2
|
||||
36 18 9 1
|
||||
40 20 10 0
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 10
|
||||
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
|
56
mysql-test/suite/tokudb.add_index/r/add_index_9.result
Normal file
56
mysql-test/suite/tokudb.add_index/r/add_index_9.result
Normal file
|
@ -0,0 +1,56 @@
|
|||
SET 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, primary key (a,b), key (z), key(x), key(t));
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index NULL foo 10 NULL 10 Using index
|
||||
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 type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 10
|
||||
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 type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index NULL bar 10 NULL 10 Using index
|
||||
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 type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 10
|
||||
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
|
72
mysql-test/suite/tokudb.add_index/r/falcon_bug_22516.result
Normal file
72
mysql-test/suite/tokudb.add_index/r/falcon_bug_22516.result
Normal file
|
@ -0,0 +1,72 @@
|
|||
DROP TABLE IF EXISTS t1;
|
||||
set session tokudb_disable_slow_alter=ON;
|
||||
CREATE TABLE t1 (
|
||||
sca_code char(6) NOT NULL,
|
||||
cat_code char(6) NOT NULL,
|
||||
lan_code char(2) NOT NULL,
|
||||
sca_pic varchar(100),
|
||||
sca_sdesc varchar(50),
|
||||
sca_sch_desc varchar(16)
|
||||
, PRIMARY KEY (sca_code, cat_code, lan_code)
|
||||
) Engine = tokudb ;
|
||||
INSERT INTO t1 ( sca_code, cat_code, lan_code, sca_pic, sca_sdesc, sca_sch_desc) VALUES
|
||||
( 'PD', 'J', 'EN', NULL, NULL, 'PENDANT'),
|
||||
( 'RI', 'J', 'EN', NULL, NULL, 'RING'),
|
||||
( 'QQ', 'N', 'EN', 'not null', NULL, 'RING');
|
||||
alter table t1 add index sca_pic (cat_code, sca_pic);
|
||||
select count(*) from t1 where sca_pic >= 'n';
|
||||
count(*)
|
||||
1
|
||||
alter table t1 drop index sca_pic, add index (sca_pic, cat_code);
|
||||
ERROR 42000: Table 't1' uses an extension that doesn't exist in this MySQL version
|
||||
select count(*) from t1 where sca_pic >= 'n';
|
||||
count(*)
|
||||
1
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t1;
|
||||
ERROR 42S02: Unknown table 't1'
|
||||
CREATE TABLE t1 (
|
||||
sca_code char(6) NOT NULL,
|
||||
cat_code char(6) NOT NULL,
|
||||
sca_desc varchar(50),
|
||||
lan_code char(2) NOT NULL,
|
||||
sca_pic varchar(100),
|
||||
sca_sdesc varchar(50),
|
||||
sca_sch_desc varchar(16),
|
||||
PRIMARY KEY (sca_code, cat_code, lan_code),
|
||||
INDEX sca_pic (sca_pic)
|
||||
) Engine = tokudb ;
|
||||
INSERT INTO t1 ( sca_code, cat_code, sca_desc, lan_code, sca_pic, sca_sdesc, sca_sch_desc) VALUES ( 'PD', 'J', 'PENDANT', 'EN', NULL, NULL, 'PENDANT'
|
||||
),( 'RI', 'J', 'RING', 'EN', NULL, NULL, 'RING'),( 'QQ', 'N', 'RING', 'EN', 'not null', NULL, 'RING');
|
||||
select count(*) from t1 where sca_code = 'PD';
|
||||
count(*)
|
||||
1
|
||||
select count(*) from t1 where sca_code <= 'PD';
|
||||
count(*)
|
||||
1
|
||||
select count(*) from t1 where sca_pic is null;
|
||||
count(*)
|
||||
2
|
||||
alter table t1 drop index sca_pic, add index sca_pic (cat_code, sca_pic);
|
||||
ERROR 42000: Table 't1' uses an extension that doesn't exist in this MySQL version
|
||||
select count(*) from t1 where sca_code='PD' and sca_pic is null;
|
||||
count(*)
|
||||
1
|
||||
select count(*) from t1 where cat_code='E';
|
||||
count(*)
|
||||
0
|
||||
alter table t1 drop index sca_pic, add index (sca_pic, cat_code);
|
||||
ERROR 42000: Table 't1' uses an extension that doesn't exist in this MySQL version
|
||||
select count(*) from t1 where sca_code='PD' and sca_pic is null;
|
||||
count(*)
|
||||
1
|
||||
select count(*) from t1 where sca_pic >= 'n';
|
||||
count(*)
|
||||
1
|
||||
select sca_pic from t1 where sca_pic is null;
|
||||
sca_pic
|
||||
NULL
|
||||
NULL
|
||||
update t1 set sca_pic="test" where sca_pic is null;
|
||||
delete from t1 where sca_code='pd';
|
||||
DROP TABLE t1;
|
10
mysql-test/suite/tokudb.add_index/r/falcon_bug_23691.result
Normal file
10
mysql-test/suite/tokudb.add_index/r/falcon_bug_23691.result
Normal file
|
@ -0,0 +1,10 @@
|
|||
SET STORAGE_ENGINE = tokudb;
|
||||
*** Bug #23691 ***
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (a char(5));
|
||||
CREATE INDEX i1 on t1 (a(3));
|
||||
INSERT INTO t1 VALUES ('abcde');
|
||||
SELECT * FROM t1 WHERE a = 'abcde';
|
||||
a
|
||||
abcde
|
||||
DROP TABLE t1;
|
68
mysql-test/suite/tokudb.add_index/r/falcon_bug_23692.result
Normal file
68
mysql-test/suite/tokudb.add_index/r/falcon_bug_23692.result
Normal file
|
@ -0,0 +1,68 @@
|
|||
SET @@STORAGE_ENGINE = tokudb;
|
||||
*** Bug #23692 ***
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP TABLE IF EXISTS t2;
|
||||
DROP TABLE IF EXISTS t3;
|
||||
DROP TABLE IF EXISTS t4;
|
||||
CREATE TABLE t1 (a char(1), key (a));
|
||||
INSERT INTO t1 VALUES (0x00);
|
||||
SELECT count(*) FROM t1 WHERE a < '';
|
||||
count(*)
|
||||
1
|
||||
SELECT count(*) FROM t1 WHERE a = '';
|
||||
count(*)
|
||||
0
|
||||
SELECT count(*) FROM t1 WHERE a > '';
|
||||
count(*)
|
||||
0
|
||||
CREATE TABLE t2 (a varbinary(5));
|
||||
CREATE INDEX i ON t2 (a);
|
||||
INSERT INTO t2 VALUES (0x02), (0x0202);
|
||||
SELECT count(*) FROM t2 WHERE a >= 0x02 OR a = 0x0202;
|
||||
count(*)
|
||||
2
|
||||
SELECT hex(a) FROM t2 WHERE a < 0x02;
|
||||
hex(a)
|
||||
SELECT hex(a) FROM t2 WHERE a = 0x02;
|
||||
hex(a)
|
||||
02
|
||||
SELECT hex(a) FROM t2 WHERE a > 0x02;
|
||||
hex(a)
|
||||
0202
|
||||
CREATE TABLE t3 (a char(5));
|
||||
CREATE INDEX i ON t3 (a);
|
||||
INSERT INTO t3 VALUES (0x4200), (0x4209), (0x42), (0x4220), (0x4242);
|
||||
SELECT hex(a) FROM t3 WHERE a < 0x42;
|
||||
hex(a)
|
||||
4200
|
||||
4209
|
||||
SELECT hex(a) FROM t3 WHERE a = 0x42;
|
||||
hex(a)
|
||||
42
|
||||
42
|
||||
SELECT hex(a) FROM t3 WHERE a > 0x42;
|
||||
hex(a)
|
||||
4242
|
||||
SELECT hex(a) FROM t3 WHERE a LIKE 'a%';
|
||||
hex(a)
|
||||
CREATE TABLE t4 (a varchar(5) character set ucs2, key(a)) engine=tokudb;
|
||||
INSERT INTO t4 VALUES (0x00420000), (0x00420009), (0x0041001f), (0x0042), (0x00420020), (0x00420042);
|
||||
SELECT hex(a) FROM t4 WHERE a < 'a';
|
||||
hex(a)
|
||||
0041001F
|
||||
SELECT hex(a) FROM t4 WHERE a = 'a';
|
||||
hex(a)
|
||||
SELECT hex(a) FROM t4 WHERE a > 'a';
|
||||
hex(a)
|
||||
00420000
|
||||
00420009
|
||||
0042
|
||||
00420020
|
||||
00420042
|
||||
SELECT hex(a) FROM t4 WHERE a LIKE 'a%';
|
||||
hex(a)
|
||||
0041001F
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
DROP TABLE t3;
|
||||
DROP TABLE t4;
|
|
@ -0,0 +1,22 @@
|
|||
SET @@STORAGE_ENGINE = tokudb;
|
||||
*** Bug #23818_I ***
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP PROCEDURE IF EXISTS p1;
|
||||
/* Does not fail with "b varchar(256) character set ucs2" */
|
||||
CREATE TABLE t1 (a int, b varchar(1000) character set ucs2, c varchar(10000));
|
||||
INSERT INTO t1 VALUES (null,null,null),(1,'',''),(2,'a','a');
|
||||
CREATE INDEX i1 ON t1 (b(550));
|
||||
CREATE PROCEDURE p1 ()
|
||||
BEGIN
|
||||
declare v int default 0;
|
||||
while v < 100 do
|
||||
SET @x = concat('update t1 set a = ', v,', b = repeat(0x', hex(rand()*10000),',rand()*549), c = repeat(0x', hex(rand()*255), ',rand()*9999)');
|
||||
/* select v,@x; */
|
||||
PREPARE stmt1 FROM @x;
|
||||
EXECUTE stmt1;
|
||||
SET v = v + 1;
|
||||
END while;
|
||||
END//
|
||||
CALL p1()//
|
||||
DROP TABLE t1;
|
||||
DROP PROCEDURE p1;
|
|
@ -0,0 +1,21 @@
|
|||
SET @@STORAGE_ENGINE = tokudb;
|
||||
*** Bug #23818_II ***
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP PROCEDURE IF EXISTS p1;
|
||||
CREATE TABLE t1 (a int, b varchar(1100) character set latin1, c varchar(10000));
|
||||
INSERT INTO t1 VALUES (null,null,null),(1,'',''),(2,'a','a');
|
||||
CREATE INDEX i1 ON t1 (b);
|
||||
CREATE PROCEDURE p1 ()
|
||||
BEGIN
|
||||
declare v int default 0;
|
||||
while v < 1000 do
|
||||
SET @x = concat('update t1 set a = ', v,', b = repeat(0x', hex(rand()*255),',rand()*999), c = repeat(0x', hex(rand()*255), ',rand()*9999)');
|
||||
/* select v,@x; */
|
||||
PREPARE stmt1 FROM @x;
|
||||
EXECUTE stmt1;
|
||||
SET v = v + 1;
|
||||
END while;
|
||||
END//
|
||||
CALL p1()//
|
||||
DROP TABLE t1;
|
||||
DROP PROCEDURE p1;
|
|
@ -0,0 +1,7 @@
|
|||
SET @@STORAGE_ENGINE = tokudb;
|
||||
*** Bug #23818_A ***
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (a int, b varchar(1100));
|
||||
INSERT INTO t1 VALUES (0,null),(0,null),(0,null);
|
||||
CREATE INDEX i1 ON t1 (b);
|
||||
DROP TABLE t1;
|
|
@ -0,0 +1,7 @@
|
|||
SET @@STORAGE_ENGINE = tokudb;
|
||||
*** Bug #23818_B ***
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (a int, b varchar(1100));
|
||||
INSERT INTO t1 VALUES (0,null),(0,null),(0,null);
|
||||
CREATE INDEX i1 ON t1 (b);
|
||||
DROP TABLE t1;
|
|
@ -0,0 +1,7 @@
|
|||
SET @@STORAGE_ENGINE = tokudb;
|
||||
*** Bug #23818_C ***
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (a int, b varchar(1100));
|
||||
INSERT INTO t1 VALUES (0,null),(0,null),(0,null);
|
||||
CREATE INDEX i1 ON t1 (b);
|
||||
DROP TABLE t1;
|
12
mysql-test/suite/tokudb.add_index/r/tokudb_bug_1152.result
Normal file
12
mysql-test/suite/tokudb.add_index/r/tokudb_bug_1152.result
Normal file
|
@ -0,0 +1,12 @@
|
|||
SET STORAGE_ENGINE='tokudb';
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (a1 int,a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int, a10 int) engine = tokudb;
|
||||
insert into t1 (a9,a10) values (1,2);
|
||||
alter table t1 add index blah(a9,a10);
|
||||
select * from t1;
|
||||
a1 a2 a3 a4 a5 a6 a7 a8 a9 a10
|
||||
NULL NULL NULL NULL NULL NULL NULL NULL 1 2
|
||||
select a9,a10 from t1;
|
||||
a9 a10
|
||||
1 2
|
||||
DROP table t1;
|
14
mysql-test/suite/tokudb.add_index/t/1522.test
Normal file
14
mysql-test/suite/tokudb.add_index/t/1522.test
Normal file
|
@ -0,0 +1,14 @@
|
|||
#--source include/have_tokudb.inc
|
||||
SET STORAGE_ENGINE='tokudb';
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
||||
create table t1 (a int, b int) engine=tokudb;
|
||||
insert into t1 values (1,1),(1,2),(2,1),(2,2);
|
||||
select count(*) from t1 where b > 0;
|
||||
alter table t1 add clustering index b(b);
|
||||
explain select count(*) from t1 where b > 0;
|
||||
select count(*) from t1 where b > 0;
|
||||
DROP TABLE t1;
|
44
mysql-test/suite/tokudb.add_index/t/add_index_1.test
Normal file
44
mysql-test/suite/tokudb.add_index/t/add_index_1.test
Normal file
|
@ -0,0 +1,44 @@
|
|||
#--source include/have_tokudb.inc
|
||||
SET STORAGE_ENGINE='tokudb';
|
||||
#
|
||||
# Bug #22169: Crash with count(distinct)
|
||||
#
|
||||
--echo *** Bug #22169 ***
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
||||
CREATE TABLE t1 (a int, str varchar(3), b int, c int, z int, y int, x int, r int, s int, t int, d char(4), primary key (a,b), key (z), key(x), key(t));
|
||||
|
||||
--disable_query_log
|
||||
let $1 = 10;
|
||||
SET @length = 10;
|
||||
SET @a=1;
|
||||
while ($1)
|
||||
{
|
||||
SET @b=@length-@a;
|
||||
SET @c = @b + @b;
|
||||
SET @d = 'AB';
|
||||
INSERT INTO t1 VALUES (@a,"s", @b,@c,10*@a,100*@a,1000*@a,2*@a,3*@a,4*@a,@d);
|
||||
SET @a=@a+1;
|
||||
dec $1;
|
||||
}
|
||||
|
||||
|
||||
create index foo on t1 (c,r);
|
||||
|
||||
# Ignore the type, key_len, and rows columns.
|
||||
--replace_column 4 NULL 7 NULL 9 NULL;
|
||||
explain select c,r from t1 WHERE c>=0;
|
||||
select c,r from t1 WHERE c>=0;
|
||||
|
||||
--replace_column 4 NULL 7 NULL 9 NULL;
|
||||
explain select c,r,a,b from t1 WHERE c>=0;
|
||||
select c,r,a,b from t1 WHERE c>=0;
|
||||
|
||||
--replace_column 4 NULL 7 NULL 9 NULL;
|
||||
explain SELECT * from t1;
|
||||
SELECT * from t1;
|
||||
|
||||
DROP TABLE t1;
|
32
mysql-test/suite/tokudb.add_index/t/add_index_10.test
Normal file
32
mysql-test/suite/tokudb.add_index/t/add_index_10.test
Normal file
|
@ -0,0 +1,32 @@
|
|||
#--source include/have_tokudb.inc
|
||||
SET STORAGE_ENGINE='tokudb';
|
||||
#
|
||||
# Bug #22169: Crash with count(distinct)
|
||||
#
|
||||
--echo *** Bug #22169 ***
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
||||
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));
|
||||
|
||||
--disable_query_log
|
||||
let $1 = 10;
|
||||
SET @length = 10;
|
||||
SET @a=1;
|
||||
while ($1)
|
||||
{
|
||||
SET @b=@length-@a;
|
||||
SET @c = @b + @b;
|
||||
INSERT INTO t1 VALUES (@a, @b,@c,10*@a,100*@a,1000*@a,2*@a,3*@a,4*@a);
|
||||
SET @a=@a+1;
|
||||
dec $1;
|
||||
}
|
||||
|
||||
insert into t1 values (5,52,18,5,5,5,2,5,5);
|
||||
--error ER_DUP_KEY
|
||||
create unique index foo on t1 (c,r);
|
||||
select * from t1;
|
||||
|
||||
DROP TABLE t1;
|
40
mysql-test/suite/tokudb.add_index/t/add_index_11.test
Normal file
40
mysql-test/suite/tokudb.add_index/t/add_index_11.test
Normal file
|
@ -0,0 +1,40 @@
|
|||
#--source include/have_tokudb.inc
|
||||
SET STORAGE_ENGINE='tokudb';
|
||||
#
|
||||
# Bug #22169: Crash with count(distinct)
|
||||
#
|
||||
--echo *** Bug #22169 ***
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
||||
CREATE TABLE t1 (a int, str varchar(3), b int, c int, z int, y int, x int, r int, s int, t int, d char(4), key (z), key(x), key(t));
|
||||
|
||||
--disable_query_log
|
||||
let $1 = 10;
|
||||
SET @length = 10;
|
||||
SET @a=1;
|
||||
while ($1)
|
||||
{
|
||||
SET @b=@length-@a;
|
||||
SET @c = @b + @b;
|
||||
SET @d = 'AB';
|
||||
INSERT INTO t1 VALUES (@a,"s", @b,@c,10*@a,100*@a,1000*@a,2*@a,3*@a,4*@a,@d);
|
||||
SET @a=@a+1;
|
||||
dec $1;
|
||||
}
|
||||
|
||||
|
||||
create index foo on t1 (c,r);
|
||||
|
||||
# Ignore type, key_len, and rows columns
|
||||
--replace_column 4 NULL 7 NULL 9 NULL;
|
||||
explain select c,r from t1 WHERE c>=0;
|
||||
select c,r from t1 WHERE c>=0;
|
||||
|
||||
--replace_column 4 NULL 7 NULL 9 NULL;
|
||||
explain SELECT * from t1;
|
||||
SELECT * from t1;
|
||||
|
||||
DROP TABLE t1;
|
39
mysql-test/suite/tokudb.add_index/t/add_index_12.test
Normal file
39
mysql-test/suite/tokudb.add_index/t/add_index_12.test
Normal file
|
@ -0,0 +1,39 @@
|
|||
#--source include/have_tokudb.inc
|
||||
SET STORAGE_ENGINE='tokudb';
|
||||
#
|
||||
# Bug #22169: Crash with count(distinct)
|
||||
#
|
||||
--echo *** Bug #22169 ***
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
||||
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));
|
||||
|
||||
--disable_query_log
|
||||
let $1 = 10;
|
||||
SET @length = 10;
|
||||
SET @a=1;
|
||||
while ($1)
|
||||
{
|
||||
SET @b=@length-@a;
|
||||
SET @c = @b + @b;
|
||||
INSERT INTO t1 VALUES (@a, @b,@c,10*@a,100*@a,1000*@a,2*@a,3*@a,4*@a);
|
||||
SET @a=@a+1;
|
||||
dec $1;
|
||||
}
|
||||
|
||||
|
||||
create index foo on t1 (c,r);
|
||||
|
||||
# Ignore type, key_len, and rows columns
|
||||
--replace_column 4 NULL 7 NULL 9 NULL;
|
||||
explain select c,r from t1 WHERE c>=0;
|
||||
select c,r from t1 WHERE c>=0;
|
||||
|
||||
--replace_column 4 NULL 7 NULL 9 NULL;
|
||||
explain SELECT * from t1;
|
||||
SELECT * from t1;
|
||||
|
||||
DROP TABLE t1;
|
39
mysql-test/suite/tokudb.add_index/t/add_index_13.test
Normal file
39
mysql-test/suite/tokudb.add_index/t/add_index_13.test
Normal file
|
@ -0,0 +1,39 @@
|
|||
#--source include/have_tokudb.inc
|
||||
SET STORAGE_ENGINE='tokudb';
|
||||
#
|
||||
# Bug #22169: Crash with count(distinct)
|
||||
#
|
||||
--echo *** Bug #22169 ***
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
||||
CREATE TABLE t1 (a int, str varchar(3), b int, c int, z int, y int, x int, r int, s int, t int, d char(4), key (z), key(x), key(t));
|
||||
|
||||
--disable_query_log
|
||||
let $1 = 10;
|
||||
SET @length = 10;
|
||||
SET @a=1;
|
||||
while ($1)
|
||||
{
|
||||
SET @b=@length-@a;
|
||||
SET @c = @b + @b;
|
||||
SET @d = 'AB';
|
||||
INSERT INTO t1 VALUES (@a,"s", @b,@c,10*@a,100*@a,1000*@a,2*@a,3*@a,4*@a,@d);
|
||||
SET @a=@a+1;
|
||||
dec $1;
|
||||
}
|
||||
|
||||
|
||||
create unique index foo1 on t1 (c,r);
|
||||
|
||||
# Ignore type, key_len, and rows columns
|
||||
--replace_column 4 NULL 7 NULL 9 NULL;
|
||||
explain select c,r from t1 WHERE c>=0;
|
||||
select c,r from t1 WHERE c>=0;
|
||||
--replace_column 4 NULL 7 NULL 9 NULL;
|
||||
explain SELECT * from t1;
|
||||
SELECT * from t1;
|
||||
|
||||
DROP TABLE t1;
|
39
mysql-test/suite/tokudb.add_index/t/add_index_14.test
Normal file
39
mysql-test/suite/tokudb.add_index/t/add_index_14.test
Normal file
|
@ -0,0 +1,39 @@
|
|||
#--source include/have_tokudb.inc
|
||||
SET STORAGE_ENGINE='tokudb';
|
||||
#
|
||||
# Bug #22169: Crash with count(distinct)
|
||||
#
|
||||
--echo *** Bug #22169 ***
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
||||
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));
|
||||
|
||||
--disable_query_log
|
||||
let $1 = 10;
|
||||
SET @length = 10;
|
||||
SET @a=1;
|
||||
while ($1)
|
||||
{
|
||||
SET @b=@length-@a;
|
||||
SET @c = @b + @b;
|
||||
INSERT INTO t1 VALUES (@a, @b,@c,10*@a,100*@a,1000*@a,2*@a,3*@a,4*@a);
|
||||
SET @a=@a+1;
|
||||
dec $1;
|
||||
}
|
||||
|
||||
|
||||
create unique index foo1 on t1 (c,r);
|
||||
|
||||
# Ignore type, key_len, and rows columns
|
||||
--replace_column 4 NULL 7 NULL 9 NULL;
|
||||
explain select c,r from t1 WHERE c>=0;
|
||||
select c,r from t1 WHERE c>=0;
|
||||
|
||||
--replace_column 4 NULL 7 NULL 9 NULL;
|
||||
explain SELECT * from t1;
|
||||
SELECT * from t1;
|
||||
|
||||
DROP TABLE t1;
|
78
mysql-test/suite/tokudb.add_index/t/add_index_15.test
Normal file
78
mysql-test/suite/tokudb.add_index/t/add_index_15.test
Normal file
|
@ -0,0 +1,78 @@
|
|||
--source include/have_tokudb.inc
|
||||
SET STORAGE_ENGINE='tokudb';
|
||||
#
|
||||
# Bug #22169: Crash with count(distinct)
|
||||
#
|
||||
--echo *** Bug #22169 ***
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
||||
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));
|
||||
|
||||
--disable_query_log
|
||||
let $1 = 10;
|
||||
SET @length = 10;
|
||||
SET @a=1;
|
||||
while ($1)
|
||||
{
|
||||
SET @b=@length-@a;
|
||||
SET @c = @b + @b;
|
||||
INSERT INTO t1 VALUES (@a, @b,@c,10*@a,100*@a,1000*@a,2*@a,3*@a,4*@a);
|
||||
SET @a=@a+1;
|
||||
dec $1;
|
||||
}
|
||||
|
||||
|
||||
create unique index foo on t1 (c,r);
|
||||
# Ignore type, key_len, and rows columns
|
||||
--replace_column 4 NULL 7 NULL 9 NULL;
|
||||
explain select c,r from t1 WHERE c>=0;
|
||||
select c,r from t1 WHERE c>=0;
|
||||
--replace_column 4 NULL 7 NULL 9 NULL;
|
||||
explain SELECT * from t1;
|
||||
SELECT * from t1;
|
||||
|
||||
drop index foo on t1;
|
||||
--replace_column 4 NULL 7 NULL 9 NULL;
|
||||
explain select c,r from t1 WHERE c>=0;
|
||||
select c,r from t1 WHERE c>=0;
|
||||
--replace_column 4 NULL 7 NULL 9 NULL;
|
||||
explain SELECT * from t1;
|
||||
SELECT * from t1;
|
||||
|
||||
create index foo on t1 (c,r);
|
||||
--replace_column 4 NULL 7 NULL 9 NULL;
|
||||
explain select c,r from t1 WHERE c>=0;
|
||||
select c,r from t1 WHERE c>=0;
|
||||
--replace_column 4 NULL 7 NULL 9 NULL;
|
||||
explain SELECT * from t1;
|
||||
SELECT * from t1;
|
||||
|
||||
drop index z on t1;
|
||||
--error ER_DUP_KEYNAME
|
||||
create unique index foo on t1 (c,r);
|
||||
--replace_column 4 NULL 7 NULL 9 NULL;
|
||||
explain select c,r from t1 WHERE c>=0;
|
||||
select c,r from t1 WHERE c>=0;
|
||||
--replace_column 4 NULL 7 NULL 9 NULL;
|
||||
explain SELECT * from t1;
|
||||
SELECT * from t1;
|
||||
|
||||
create index z on t1 (z,a);
|
||||
--replace_column 4 NULL 7 NULL 9 NULL;
|
||||
explain select z,a from t1 where z>=0;
|
||||
select z,a from t1 where z>=0;
|
||||
--replace_column 4 NULL 7 NULL 9 NULL;
|
||||
explain select * from t1;
|
||||
select * from t1;
|
||||
|
||||
--replace_column 4 NULL 7 NULL 9 NULL;
|
||||
explain select c,r from t1 WHERE c>=0;
|
||||
select c,r from t1 WHERE c>=0;
|
||||
--replace_column 4 NULL 7 NULL 9 NULL;
|
||||
explain SELECT * from t1;
|
||||
SELECT * from t1;
|
||||
|
||||
DROP TABLE t1;
|
32
mysql-test/suite/tokudb.add_index/t/add_index_16.test
Normal file
32
mysql-test/suite/tokudb.add_index/t/add_index_16.test
Normal file
|
@ -0,0 +1,32 @@
|
|||
#--source include/have_tokudb.inc
|
||||
SET STORAGE_ENGINE='tokudb';
|
||||
#
|
||||
# Bug #22169: Crash with count(distinct)
|
||||
#
|
||||
--echo *** Bug #22169 ***
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
||||
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));
|
||||
|
||||
--disable_query_log
|
||||
let $1 = 10;
|
||||
SET @length = 10;
|
||||
SET @a=1;
|
||||
while ($1)
|
||||
{
|
||||
SET @b=@length-@a;
|
||||
SET @c = @b + @b;
|
||||
INSERT INTO t1 VALUES (@a, @b,@c,10*@a,100*@a,1000*@a,2*@a,3*@a,4*@a);
|
||||
SET @a=@a+1;
|
||||
dec $1;
|
||||
}
|
||||
|
||||
insert into t1 values (5,52,18,5,5,5,2,5,5);
|
||||
--error ER_DUP_KEY
|
||||
create unique index foo on t1 (c,r);
|
||||
|
||||
|
||||
DROP TABLE t1;
|
32
mysql-test/suite/tokudb.add_index/t/add_index_17.test
Normal file
32
mysql-test/suite/tokudb.add_index/t/add_index_17.test
Normal file
|
@ -0,0 +1,32 @@
|
|||
#--source include/have_tokudb.inc
|
||||
SET STORAGE_ENGINE='tokudb';
|
||||
#
|
||||
# Bug #22169: Crash with count(distinct)
|
||||
#
|
||||
--echo *** Bug #22169 ***
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
||||
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));
|
||||
|
||||
--disable_query_log
|
||||
let $1 = 10;
|
||||
SET @length = 10;
|
||||
SET @a=1;
|
||||
while ($1)
|
||||
{
|
||||
SET @b=@length-@a;
|
||||
SET @c = @b + @b;
|
||||
INSERT INTO t1 VALUES (@a, @b,@c,10*@a,100*@a,1000*@a,2*@a,3*@a,4*@a);
|
||||
SET @a=@a+1;
|
||||
dec $1;
|
||||
}
|
||||
|
||||
create unique index foo on t1 (c,r);
|
||||
--error ER_DUP_ENTRY
|
||||
insert into t1 values (5,52,18,5,5,5,2,5,5);
|
||||
|
||||
|
||||
DROP TABLE t1;
|
43
mysql-test/suite/tokudb.add_index/t/add_index_18.test
Normal file
43
mysql-test/suite/tokudb.add_index/t/add_index_18.test
Normal file
|
@ -0,0 +1,43 @@
|
|||
#--source include/have_tokudb.inc
|
||||
SET STORAGE_ENGINE='tokudb';
|
||||
#
|
||||
# Bug #22169: Crash with count(distinct)
|
||||
#
|
||||
--echo *** Bug #22169 ***
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
||||
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));
|
||||
|
||||
--disable_query_log
|
||||
let $1 = 10;
|
||||
SET @length = 10;
|
||||
SET @a=1;
|
||||
while ($1)
|
||||
{
|
||||
SET @b=@length-@a;
|
||||
SET @c = @b + @b;
|
||||
INSERT INTO t1 VALUES (@a, @b,@c,10*@a,100*@a,1000*@a,2*@a,3*@a,4*@a);
|
||||
SET @a=@a+1;
|
||||
dec $1;
|
||||
}
|
||||
|
||||
#create index foo on t1 (c,r);
|
||||
#alter table t1 add index foo (z);
|
||||
#alter table t1 add index foo (a);
|
||||
|
||||
alter table t1 drop index z, add index foo (c,z), add index bar (t,r);
|
||||
explain select c,z from t1;
|
||||
select c,z from t1;
|
||||
explain select * from t1;
|
||||
select * from t1;
|
||||
|
||||
|
||||
explain select t,r from t1;
|
||||
select t,r from t1;
|
||||
explain select * from t1;
|
||||
select * from t1;
|
||||
|
||||
DROP TABLE t1;
|
41
mysql-test/suite/tokudb.add_index/t/add_index_2.test
Normal file
41
mysql-test/suite/tokudb.add_index/t/add_index_2.test
Normal file
|
@ -0,0 +1,41 @@
|
|||
#--source include/have_tokudb.inc
|
||||
SET STORAGE_ENGINE='tokudb';
|
||||
#
|
||||
# Bug #22169: Crash with count(distinct)
|
||||
#
|
||||
--echo *** Bug #22169 ***
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
||||
CREATE TABLE t1 (a int, b int, c int, z int, y int, x int, r int, s int, t int, primary key (a,b), key (z), key(x), key(t));
|
||||
|
||||
--disable_query_log
|
||||
let $1 = 10;
|
||||
SET @length = 10;
|
||||
SET @a=1;
|
||||
while ($1)
|
||||
{
|
||||
SET @b=@length-@a;
|
||||
SET @c = @b + @b;
|
||||
INSERT INTO t1 VALUES (@a, @b,@c,10*@a,100*@a,1000*@a,2*@a,3*@a,4*@a);
|
||||
SET @a=@a+1;
|
||||
dec $1;
|
||||
}
|
||||
|
||||
|
||||
create index foo on t1 (c,r);
|
||||
|
||||
# Ignore type, key_len, and rows columns
|
||||
--replace_column 4 NULL 7 NULL 9 NULL;
|
||||
explain select c,r from t1 WHERE c>=0;
|
||||
select c,r from t1 WHERE c>=0;
|
||||
--replace_column 4 NULL 7 NULL 9 NULL;
|
||||
explain select c,r,a,b from t1 WHERE c>=0;
|
||||
select c,r,a,b from t1 WHERE c>=0;
|
||||
--replace_column 4 NULL 7 NULL 9 NULL;
|
||||
explain SELECT * from t1;
|
||||
SELECT * from t1;
|
||||
|
||||
DROP TABLE t1;
|
42
mysql-test/suite/tokudb.add_index/t/add_index_3.test
Normal file
42
mysql-test/suite/tokudb.add_index/t/add_index_3.test
Normal file
|
@ -0,0 +1,42 @@
|
|||
#--source include/have_tokudb.inc
|
||||
SET STORAGE_ENGINE='tokudb';
|
||||
#
|
||||
# Bug #22169: Crash with count(distinct)
|
||||
#
|
||||
--echo *** Bug #22169 ***
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
||||
CREATE TABLE t1 (a int, str varchar(3), b int, c int, z int, y int, x int, r int, s int, t int, d char(4), primary key (a,b), key (z), key(x), key(t));
|
||||
|
||||
--disable_query_log
|
||||
let $1 = 10;
|
||||
SET @length = 10;
|
||||
SET @a=1;
|
||||
while ($1)
|
||||
{
|
||||
SET @b=@length-@a;
|
||||
SET @c = @b + @b;
|
||||
SET @d = 'AB';
|
||||
INSERT INTO t1 VALUES (@a,"s", @b,@c,10*@a,100*@a,1000*@a,2*@a,3*@a,4*@a,@d);
|
||||
SET @a=@a+1;
|
||||
dec $1;
|
||||
}
|
||||
|
||||
|
||||
create unique index foo1 on t1 (c,r);
|
||||
|
||||
# Ignore type, key_len, and rows columns
|
||||
--replace_column 4 NULL 7 NULL 9 NULL;
|
||||
explain select c,r from t1 WHERE c>=0;
|
||||
select c,r from t1 WHERE c>=0;
|
||||
--replace_column 4 NULL 7 NULL 9 NULL;
|
||||
explain select c,r,a,b from t1 WHERE c>=0;
|
||||
select c,r,a,b from t1 WHERE c>=0;
|
||||
--replace_column 4 NULL 7 NULL 9 NULL;
|
||||
explain SELECT * from t1;
|
||||
SELECT * from t1;
|
||||
|
||||
DROP TABLE t1;
|
41
mysql-test/suite/tokudb.add_index/t/add_index_4.test
Normal file
41
mysql-test/suite/tokudb.add_index/t/add_index_4.test
Normal file
|
@ -0,0 +1,41 @@
|
|||
#--source include/have_tokudb.inc
|
||||
SET STORAGE_ENGINE='tokudb';
|
||||
#
|
||||
# Bug #22169: Crash with count(distinct)
|
||||
#
|
||||
--echo *** Bug #22169 ***
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
||||
CREATE TABLE t1 (a int, b int, c int, z int, y int, x int, r int, s int, t int, primary key (a,b), key (z), key(x), key(t));
|
||||
|
||||
--disable_query_log
|
||||
let $1 = 10;
|
||||
SET @length = 10;
|
||||
SET @a=1;
|
||||
while ($1)
|
||||
{
|
||||
SET @b=@length-@a;
|
||||
SET @c = @b + @b;
|
||||
INSERT INTO t1 VALUES (@a, @b,@c,10*@a,100*@a,1000*@a,2*@a,3*@a,4*@a);
|
||||
SET @a=@a+1;
|
||||
dec $1;
|
||||
}
|
||||
|
||||
|
||||
create unique index foo1 on t1 (c,r);
|
||||
|
||||
# Ignore type, key_len, and rows columns
|
||||
--replace_column 4 NULL 7 NULL 9 NULL;
|
||||
explain select c,r from t1 WHERE c>=0;
|
||||
select c,r from t1 WHERE c>=0;
|
||||
--replace_column 4 NULL 7 NULL 9 NULL;
|
||||
explain select c,r,a,b from t1 WHERE c>=0;
|
||||
select c,r,a,b from t1 WHERE c>=0;
|
||||
--replace_column 4 NULL 7 NULL 9 NULL;
|
||||
explain SELECT * from t1;
|
||||
SELECT * from t1;
|
||||
|
||||
DROP TABLE t1;
|
78
mysql-test/suite/tokudb.add_index/t/add_index_5.test
Normal file
78
mysql-test/suite/tokudb.add_index/t/add_index_5.test
Normal file
|
@ -0,0 +1,78 @@
|
|||
--source include/have_tokudb.inc
|
||||
SET STORAGE_ENGINE='tokudb';
|
||||
#
|
||||
# Bug #22169: Crash with count(distinct)
|
||||
#
|
||||
--echo *** Bug #22169 ***
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
||||
CREATE TABLE t1 (a int, b int, c int, z int, y int, x int, r int, s int, t int, primary key (a,b), key (z), key(x), key(t));
|
||||
|
||||
--disable_query_log
|
||||
let $1 = 10;
|
||||
SET @length = 10;
|
||||
SET @a=1;
|
||||
while ($1)
|
||||
{
|
||||
SET @b=@length-@a;
|
||||
SET @c = @b + @b;
|
||||
INSERT INTO t1 VALUES (@a, @b,@c,10*@a,100*@a,1000*@a,2*@a,3*@a,4*@a);
|
||||
SET @a=@a+1;
|
||||
dec $1;
|
||||
}
|
||||
|
||||
|
||||
create unique index foo on t1 (c,r);
|
||||
# Ignore type, key_len, and rows columns
|
||||
--replace_column 4 NULL 7 NULL 9 NULL;
|
||||
explain select c,r,a,b from t1 WHERE c>=0;
|
||||
select c,r,a,b from t1 WHERE c>=0;
|
||||
--replace_column 4 NULL 7 NULL 9 NULL;
|
||||
explain SELECT * from t1;
|
||||
SELECT * from t1;
|
||||
|
||||
drop index foo on t1;
|
||||
--replace_column 4 NULL 7 NULL 9 NULL;
|
||||
explain select c,r,a,b from t1 WHERE c>=0;
|
||||
select c,r,a,b from t1 WHERE c>=0;
|
||||
--replace_column 4 NULL 7 NULL 9 NULL;
|
||||
explain SELECT * from t1;
|
||||
SELECT * from t1;
|
||||
|
||||
create index foo on t1 (c,r);
|
||||
--replace_column 4 NULL 7 NULL 9 NULL;
|
||||
explain select c,r,a,b from t1 WHERE c>=0;
|
||||
select c,r,a,b from t1 WHERE c>=0;
|
||||
--replace_column 4 NULL 7 NULL 9 NULL;
|
||||
explain SELECT * from t1;
|
||||
SELECT * from t1;
|
||||
|
||||
drop index z on t1;
|
||||
--error ER_DUP_KEYNAME
|
||||
create unique index foo on t1 (c,r);
|
||||
--replace_column 4 NULL 7 NULL 9 NULL;
|
||||
explain select c,r,a,b from t1 WHERE c>=0;
|
||||
select c,r,a,b from t1 WHERE c>=0;
|
||||
--replace_column 4 NULL 7 NULL 9 NULL;
|
||||
explain SELECT * from t1;
|
||||
SELECT * from t1;
|
||||
|
||||
create index z on t1 (z,a);
|
||||
--replace_column 4 NULL 7 NULL 9 NULL;
|
||||
explain select z,a,b from t1 where z>=0;
|
||||
select z,a,b from t1 where z>=0;
|
||||
--replace_column 4 NULL 7 NULL 9 NULL;
|
||||
explain select * from t1;
|
||||
select * from t1;
|
||||
|
||||
--replace_column 4 NULL 7 NULL 9 NULL;
|
||||
explain select c,r,a,b from t1 WHERE c>=0;
|
||||
select c,r,a,b from t1 WHERE c>=0;
|
||||
--replace_column 4 NULL 7 NULL 9 NULL;
|
||||
explain SELECT * from t1;
|
||||
SELECT * from t1;
|
||||
|
||||
DROP TABLE t1;
|
32
mysql-test/suite/tokudb.add_index/t/add_index_6.test
Normal file
32
mysql-test/suite/tokudb.add_index/t/add_index_6.test
Normal file
|
@ -0,0 +1,32 @@
|
|||
#--source include/have_tokudb.inc
|
||||
SET STORAGE_ENGINE='tokudb';
|
||||
#
|
||||
# Bug #22169: Crash with count(distinct)
|
||||
#
|
||||
--echo *** Bug #22169 ***
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
||||
CREATE TABLE t1 (a int, b int, c int, z int, y int, x int, r int, s int, t int, primary key (a,b), key (z), key(x), key(t));
|
||||
|
||||
--disable_query_log
|
||||
let $1 = 10;
|
||||
SET @length = 10;
|
||||
SET @a=1;
|
||||
while ($1)
|
||||
{
|
||||
SET @b=@length-@a;
|
||||
SET @c = @b + @b;
|
||||
INSERT INTO t1 VALUES (@a, @b,@c,10*@a,100*@a,1000*@a,2*@a,3*@a,4*@a);
|
||||
SET @a=@a+1;
|
||||
dec $1;
|
||||
}
|
||||
|
||||
insert into t1 values (5,52,18,5,5,5,2,5,5);
|
||||
--error ER_DUP_KEY
|
||||
create unique index foo on t1 (c,r);
|
||||
|
||||
|
||||
DROP TABLE t1;
|
32
mysql-test/suite/tokudb.add_index/t/add_index_7.test
Normal file
32
mysql-test/suite/tokudb.add_index/t/add_index_7.test
Normal file
|
@ -0,0 +1,32 @@
|
|||
#--source include/have_tokudb.inc
|
||||
SET STORAGE_ENGINE='tokudb';
|
||||
#
|
||||
# Bug #22169: Crash with count(distinct)
|
||||
#
|
||||
--echo *** Bug #22169 ***
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
||||
CREATE TABLE t1 (a int, b int, c int, z int, y int, x int, r int, s int, t int, primary key (a,b), key (z), key(x), key(t));
|
||||
|
||||
--disable_query_log
|
||||
let $1 = 10;
|
||||
SET @length = 10;
|
||||
SET @a=1;
|
||||
while ($1)
|
||||
{
|
||||
SET @b=@length-@a;
|
||||
SET @c = @b + @b;
|
||||
INSERT INTO t1 VALUES (@a, @b,@c,10*@a,100*@a,1000*@a,2*@a,3*@a,4*@a);
|
||||
SET @a=@a+1;
|
||||
dec $1;
|
||||
}
|
||||
|
||||
create unique index foo on t1 (c,r);
|
||||
--error ER_DUP_ENTRY
|
||||
insert into t1 values (5,52,18,5,5,5,2,5,5);
|
||||
|
||||
|
||||
DROP TABLE t1;
|
43
mysql-test/suite/tokudb.add_index/t/add_index_8.test
Normal file
43
mysql-test/suite/tokudb.add_index/t/add_index_8.test
Normal file
|
@ -0,0 +1,43 @@
|
|||
#--source include/have_tokudb.inc
|
||||
SET STORAGE_ENGINE='tokudb';
|
||||
#
|
||||
# Bug #22169: Crash with count(distinct)
|
||||
#
|
||||
--echo *** Bug #22169 ***
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
||||
CREATE TABLE t1 (a int, b int, c int, z int, y int, x int, r int, s int, t int, primary key (a,b), key (z), key(x), key(t));
|
||||
|
||||
--disable_query_log
|
||||
let $1 = 10;
|
||||
SET @length = 10;
|
||||
SET @a=1;
|
||||
while ($1)
|
||||
{
|
||||
SET @b=@length-@a;
|
||||
SET @c = @b + @b;
|
||||
INSERT INTO t1 VALUES (@a, @b,@c,10*@a,100*@a,1000*@a,2*@a,3*@a,4*@a);
|
||||
SET @a=@a+1;
|
||||
dec $1;
|
||||
}
|
||||
|
||||
#create index foo on t1 (c,r);
|
||||
#alter table t1 add index foo (z);
|
||||
#alter table t1 add index foo (a);
|
||||
|
||||
alter table t1 drop index z, add index foo (c,z), add index bar (t,r);
|
||||
explain select c,z,a,b from t1;
|
||||
select c,z,a,b from t1;
|
||||
explain select * from t1;
|
||||
select * from t1;
|
||||
|
||||
|
||||
explain select t,r,a,b from t1;
|
||||
select t,r,a,b from t1;
|
||||
explain select * from t1;
|
||||
select * from t1;
|
||||
|
||||
DROP TABLE t1;
|
43
mysql-test/suite/tokudb.add_index/t/add_index_9.test
Normal file
43
mysql-test/suite/tokudb.add_index/t/add_index_9.test
Normal file
|
@ -0,0 +1,43 @@
|
|||
#--source include/have_tokudb.inc
|
||||
SET STORAGE_ENGINE='tokudb';
|
||||
#
|
||||
# Bug #22169: Crash with count(distinct)
|
||||
#
|
||||
--echo *** Bug #22169 ***
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
||||
CREATE TABLE t1 (a int, b int, c int, z int, y int, x int, r int, s int, t int, primary key (a,b), key (z), key(x), key(t));
|
||||
|
||||
--disable_query_log
|
||||
let $1 = 10;
|
||||
SET @length = 10;
|
||||
SET @a=1;
|
||||
while ($1)
|
||||
{
|
||||
SET @b=@length-@a;
|
||||
SET @c = @b + @b;
|
||||
INSERT INTO t1 VALUES (@a, @b,@c,10*@a,100*@a,1000*@a,2*@a,3*@a,4*@a);
|
||||
SET @a=@a+1;
|
||||
dec $1;
|
||||
}
|
||||
|
||||
#create index foo on t1 (c,r);
|
||||
#alter table t1 add index foo (z);
|
||||
#alter table t1 add index foo (a);
|
||||
|
||||
alter table t1 drop index z, add index foo (c,z), add index bar (t,r), drop primary key;
|
||||
explain select c,z from t1;
|
||||
select c,z from t1;
|
||||
explain select * from t1;
|
||||
select * from t1;
|
||||
|
||||
|
||||
explain select t,r from t1;
|
||||
select t,r from t1;
|
||||
explain select * from t1;
|
||||
select * from t1;
|
||||
|
||||
DROP TABLE t1;
|
75
mysql-test/suite/tokudb.add_index/t/falcon_bug_22516.test
Normal file
75
mysql-test/suite/tokudb.add_index/t/falcon_bug_22516.test
Normal file
|
@ -0,0 +1,75 @@
|
|||
# Testcase derived from mix2_falcon
|
||||
--source include/have_tokudb.inc
|
||||
let $engine_type= tokudb;
|
||||
|
||||
--disable_abort_on_error
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
||||
set session tokudb_disable_slow_alter=ON;
|
||||
|
||||
# Slightly simplified testcase
|
||||
#
|
||||
# Test of index only reads
|
||||
#
|
||||
eval CREATE TABLE t1 (
|
||||
sca_code char(6) NOT NULL,
|
||||
cat_code char(6) NOT NULL,
|
||||
lan_code char(2) NOT NULL,
|
||||
sca_pic varchar(100),
|
||||
sca_sdesc varchar(50),
|
||||
sca_sch_desc varchar(16)
|
||||
, PRIMARY KEY (sca_code, cat_code, lan_code)
|
||||
) Engine = $engine_type ;
|
||||
|
||||
INSERT INTO t1 ( sca_code, cat_code, lan_code, sca_pic, sca_sdesc, sca_sch_desc) VALUES
|
||||
( 'PD', 'J', 'EN', NULL, NULL, 'PENDANT'),
|
||||
( 'RI', 'J', 'EN', NULL, NULL, 'RING'),
|
||||
( 'QQ', 'N', 'EN', 'not null', NULL, 'RING');
|
||||
alter table t1 add index sca_pic (cat_code, sca_pic);
|
||||
select count(*) from t1 where sca_pic >= 'n';
|
||||
|
||||
alter table t1 drop index sca_pic, add index (sca_pic, cat_code);
|
||||
# alter table t1 drop index sca_pic;
|
||||
# alter table t1 add index (sca_pic, cat_code);
|
||||
select count(*) from t1 where sca_pic >= 'n';
|
||||
DROP TABLE t1;
|
||||
|
||||
# The original testcase
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Test of index only reads
|
||||
#
|
||||
eval CREATE TABLE t1 (
|
||||
sca_code char(6) NOT NULL,
|
||||
cat_code char(6) NOT NULL,
|
||||
sca_desc varchar(50),
|
||||
lan_code char(2) NOT NULL,
|
||||
sca_pic varchar(100),
|
||||
sca_sdesc varchar(50),
|
||||
sca_sch_desc varchar(16),
|
||||
PRIMARY KEY (sca_code, cat_code, lan_code),
|
||||
INDEX sca_pic (sca_pic)
|
||||
) Engine = $engine_type ;
|
||||
|
||||
INSERT INTO t1 ( sca_code, cat_code, sca_desc, lan_code, sca_pic, sca_sdesc, sca_sch_desc) VALUES ( 'PD', 'J', 'PENDANT', 'EN', NULL, NULL, 'PENDANT'
|
||||
),( 'RI', 'J', 'RING', 'EN', NULL, NULL, 'RING'),( 'QQ', 'N', 'RING', 'EN', 'not null', NULL, 'RING');
|
||||
select count(*) from t1 where sca_code = 'PD';
|
||||
select count(*) from t1 where sca_code <= 'PD';
|
||||
select count(*) from t1 where sca_pic is null;
|
||||
alter table t1 drop index sca_pic, add index sca_pic (cat_code, sca_pic);
|
||||
select count(*) from t1 where sca_code='PD' and sca_pic is null;
|
||||
select count(*) from t1 where cat_code='E';
|
||||
|
||||
alter table t1 drop index sca_pic, add index (sca_pic, cat_code);
|
||||
select count(*) from t1 where sca_code='PD' and sca_pic is null;
|
||||
select count(*) from t1 where sca_pic >= 'n';
|
||||
select sca_pic from t1 where sca_pic is null;
|
||||
update t1 set sca_pic="test" where sca_pic is null;
|
||||
delete from t1 where sca_code='pd';
|
||||
|
||||
# Final cleanup
|
||||
DROP TABLE t1;
|
18
mysql-test/suite/tokudb.add_index/t/falcon_bug_23691.test
Normal file
18
mysql-test/suite/tokudb.add_index/t/falcon_bug_23691.test
Normal file
|
@ -0,0 +1,18 @@
|
|||
#--source include/have_tokudb.inc
|
||||
SET STORAGE_ENGINE = tokudb;
|
||||
#
|
||||
# Bug #23691: Falcon: searches fail if partial index
|
||||
#
|
||||
--echo *** Bug #23691 ***
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
||||
CREATE TABLE t1 (a char(5));
|
||||
CREATE INDEX i1 on t1 (a(3));
|
||||
INSERT INTO t1 VALUES ('abcde');
|
||||
|
||||
SELECT * FROM t1 WHERE a = 'abcde';
|
||||
|
||||
# Final cleanup.
|
||||
DROP TABLE t1;
|
47
mysql-test/suite/tokudb.add_index/t/falcon_bug_23692.test
Normal file
47
mysql-test/suite/tokudb.add_index/t/falcon_bug_23692.test
Normal file
|
@ -0,0 +1,47 @@
|
|||
#--source include/have_tokudb.inc
|
||||
SET @@STORAGE_ENGINE = tokudb;
|
||||
#
|
||||
# Bug #23692: Falcon: searches fail if data is 0x00
|
||||
#
|
||||
--echo *** Bug #23692 ***
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP TABLE IF EXISTS t2;
|
||||
DROP TABLE IF EXISTS t3;
|
||||
DROP TABLE IF EXISTS t4;
|
||||
--enable_warnings
|
||||
|
||||
CREATE TABLE t1 (a char(1), key (a));
|
||||
INSERT INTO t1 VALUES (0x00);
|
||||
SELECT count(*) FROM t1 WHERE a < '';
|
||||
SELECT count(*) FROM t1 WHERE a = '';
|
||||
SELECT count(*) FROM t1 WHERE a > '';
|
||||
|
||||
CREATE TABLE t2 (a varbinary(5));
|
||||
CREATE INDEX i ON t2 (a);
|
||||
INSERT INTO t2 VALUES (0x02), (0x0202);
|
||||
SELECT count(*) FROM t2 WHERE a >= 0x02 OR a = 0x0202;
|
||||
SELECT hex(a) FROM t2 WHERE a < 0x02;
|
||||
SELECT hex(a) FROM t2 WHERE a = 0x02;
|
||||
SELECT hex(a) FROM t2 WHERE a > 0x02;
|
||||
|
||||
CREATE TABLE t3 (a char(5));
|
||||
CREATE INDEX i ON t3 (a);
|
||||
INSERT INTO t3 VALUES (0x4200), (0x4209), (0x42), (0x4220), (0x4242);
|
||||
SELECT hex(a) FROM t3 WHERE a < 0x42;
|
||||
SELECT hex(a) FROM t3 WHERE a = 0x42;
|
||||
SELECT hex(a) FROM t3 WHERE a > 0x42;
|
||||
SELECT hex(a) FROM t3 WHERE a LIKE 'a%';
|
||||
|
||||
CREATE TABLE t4 (a varchar(5) character set ucs2, key(a)) engine=tokudb;
|
||||
INSERT INTO t4 VALUES (0x00420000), (0x00420009), (0x0041001f), (0x0042), (0x00420020), (0x00420042);
|
||||
SELECT hex(a) FROM t4 WHERE a < 'a';
|
||||
SELECT hex(a) FROM t4 WHERE a = 'a';
|
||||
SELECT hex(a) FROM t4 WHERE a > 'a';
|
||||
SELECT hex(a) FROM t4 WHERE a LIKE 'a%';
|
||||
|
||||
# Final cleanup.
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
DROP TABLE t3;
|
||||
DROP TABLE t4;
|
36
mysql-test/suite/tokudb.add_index/t/falcon_bug_23818_1.test
Normal file
36
mysql-test/suite/tokudb.add_index/t/falcon_bug_23818_1.test
Normal file
|
@ -0,0 +1,36 @@
|
|||
--source include/have_tokudb.inc
|
||||
SET @@STORAGE_ENGINE = tokudb;
|
||||
#
|
||||
# Bug #23818 Falcon: crash with random updates of long varchar columns
|
||||
# First part. Original bug reports loops 100000 times.
|
||||
# Use UCS2 which uses two bytes for every char.
|
||||
#
|
||||
--echo *** Bug #23818_I ***
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP PROCEDURE IF EXISTS p1;
|
||||
--enable_warnings
|
||||
|
||||
/* Does not fail with "b varchar(256) character set ucs2" */
|
||||
CREATE TABLE t1 (a int, b varchar(1000) character set ucs2, c varchar(10000));
|
||||
INSERT INTO t1 VALUES (null,null,null),(1,'',''),(2,'a','a');
|
||||
CREATE INDEX i1 ON t1 (b(550));
|
||||
|
||||
DELIMITER //;
|
||||
CREATE PROCEDURE p1 ()
|
||||
BEGIN
|
||||
declare v int default 0;
|
||||
while v < 100 do
|
||||
SET @x = concat('update t1 set a = ', v,', b = repeat(0x', hex(rand()*10000),',rand()*549), c = repeat(0x', hex(rand()*255), ',rand()*9999)');
|
||||
/* select v,@x; */
|
||||
PREPARE stmt1 FROM @x;
|
||||
EXECUTE stmt1;
|
||||
SET v = v + 1;
|
||||
END while;
|
||||
END//
|
||||
CALL p1()//
|
||||
|
||||
# Final cleanup.
|
||||
DELIMITER ;//
|
||||
DROP TABLE t1;
|
||||
DROP PROCEDURE p1;
|
35
mysql-test/suite/tokudb.add_index/t/falcon_bug_23818_2.test
Normal file
35
mysql-test/suite/tokudb.add_index/t/falcon_bug_23818_2.test
Normal file
|
@ -0,0 +1,35 @@
|
|||
--source include/have_tokudb.inc
|
||||
SET @@STORAGE_ENGINE = tokudb;
|
||||
#
|
||||
# Bug #23818 Falcon: crash with random updates of long varchar columns
|
||||
# Second part. Original bug reports loops 100000 times.
|
||||
# Use character set LATIN1, loop more times
|
||||
#
|
||||
--echo *** Bug #23818_II ***
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP PROCEDURE IF EXISTS p1;
|
||||
--enable_warnings
|
||||
|
||||
CREATE TABLE t1 (a int, b varchar(1100) character set latin1, c varchar(10000));
|
||||
INSERT INTO t1 VALUES (null,null,null),(1,'',''),(2,'a','a');
|
||||
CREATE INDEX i1 ON t1 (b);
|
||||
|
||||
DELIMITER //;
|
||||
CREATE PROCEDURE p1 ()
|
||||
BEGIN
|
||||
declare v int default 0;
|
||||
while v < 1000 do
|
||||
SET @x = concat('update t1 set a = ', v,', b = repeat(0x', hex(rand()*255),',rand()*999), c = repeat(0x', hex(rand()*255), ',rand()*9999)');
|
||||
/* select v,@x; */
|
||||
PREPARE stmt1 FROM @x;
|
||||
EXECUTE stmt1;
|
||||
SET v = v + 1;
|
||||
END while;
|
||||
END//
|
||||
CALL p1()//
|
||||
|
||||
# Final cleanup.
|
||||
DELIMITER ;//
|
||||
DROP TABLE t1;
|
||||
DROP PROCEDURE p1;
|
35
mysql-test/suite/tokudb.add_index/t/falcon_bug_23818_A.test
Normal file
35
mysql-test/suite/tokudb.add_index/t/falcon_bug_23818_A.test
Normal file
|
@ -0,0 +1,35 @@
|
|||
--source include/have_tokudb.inc
|
||||
SET @@STORAGE_ENGINE = tokudb;
|
||||
#
|
||||
# Bug #23818 Falcon: crash with random updates of long varchar columns
|
||||
# First part. Original bug reports loops 100000 times.
|
||||
#
|
||||
--echo *** Bug #23818_A ***
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
CREATE TABLE t1 (a int, b varchar(1100));
|
||||
INSERT INTO t1 VALUES (0,null),(0,null),(0,null);
|
||||
CREATE INDEX i1 ON t1 (b);
|
||||
|
||||
--disable_result_log
|
||||
--disable_query_log
|
||||
set @a = 32710;
|
||||
|
||||
let $k = 200;
|
||||
while ($k)
|
||||
{
|
||||
SELECT @a + 1 into @a;
|
||||
SELECT rand(@a) * DEGREES(@a) into @b;
|
||||
SELECT FLOOR(MOD(@b,255)) into @c;
|
||||
SELECT @a, @b, @c;
|
||||
UPDATE t1 SET a = a + 1;
|
||||
UPDATE t1 SET b = repeat(hex(@c), rand(@c) * 550);
|
||||
SELECT a, length(b), left(b,10) from t1;
|
||||
dec $k;
|
||||
}
|
||||
--enable_query_log
|
||||
--enable_result_log
|
||||
|
||||
# Final cleanup.
|
||||
DROP TABLE t1;
|
35
mysql-test/suite/tokudb.add_index/t/falcon_bug_23818_B.test
Normal file
35
mysql-test/suite/tokudb.add_index/t/falcon_bug_23818_B.test
Normal file
|
@ -0,0 +1,35 @@
|
|||
--source include/have_tokudb.inc
|
||||
SET @@STORAGE_ENGINE = tokudb;
|
||||
#
|
||||
# Bug #23818 Falcon: crash with random updates of long varchar columns
|
||||
# First part. Original bug reports loops 100000 times.
|
||||
#
|
||||
--echo *** Bug #23818_B ***
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
CREATE TABLE t1 (a int, b varchar(1100));
|
||||
INSERT INTO t1 VALUES (0,null),(0,null),(0,null);
|
||||
CREATE INDEX i1 ON t1 (b);
|
||||
|
||||
--disable_result_log
|
||||
--disable_query_log
|
||||
set @a = 5510;
|
||||
|
||||
let $k = 200;
|
||||
while ($k)
|
||||
{
|
||||
SELECT @a + 1 into @a;
|
||||
SELECT rand(@a) * DEGREES(@a) into @b;
|
||||
SELECT FLOOR(MOD(@b,255)) into @c;
|
||||
SELECT @a, @b, @c;
|
||||
UPDATE t1 SET a = a + 1;
|
||||
UPDATE t1 SET b = repeat(hex(@c), rand(@c) * 550);
|
||||
SELECT a, length(b), left(b,10) from t1;
|
||||
dec $k;
|
||||
}
|
||||
--enable_query_log
|
||||
--enable_result_log
|
||||
|
||||
# Final cleanup.
|
||||
DROP TABLE t1;
|
35
mysql-test/suite/tokudb.add_index/t/falcon_bug_23818_C.test
Normal file
35
mysql-test/suite/tokudb.add_index/t/falcon_bug_23818_C.test
Normal file
|
@ -0,0 +1,35 @@
|
|||
--source include/have_tokudb.inc
|
||||
SET @@STORAGE_ENGINE = tokudb;
|
||||
#
|
||||
# Bug #23818 Falcon: crash with random updates of long varchar columns
|
||||
# First part. Original bug reports loops 100000 times.
|
||||
#
|
||||
--echo *** Bug #23818_C ***
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
CREATE TABLE t1 (a int, b varchar(1100));
|
||||
INSERT INTO t1 VALUES (0,null),(0,null),(0,null);
|
||||
CREATE INDEX i1 ON t1 (b);
|
||||
|
||||
--disable_result_log
|
||||
--disable_query_log
|
||||
set @a = 28410;
|
||||
|
||||
let $k = 200;
|
||||
while ($k)
|
||||
{
|
||||
SELECT @a + 1 into @a;
|
||||
SELECT rand(@a) * DEGREES(@a) into @b;
|
||||
SELECT FLOOR(MOD(@b,255)) into @c;
|
||||
SELECT @a, @b, @c;
|
||||
UPDATE t1 SET a = a + 1;
|
||||
UPDATE t1 SET b = repeat(hex(@c), rand(@c) * 550);
|
||||
SELECT a, length(b), left(b,10) from t1;
|
||||
dec $k;
|
||||
}
|
||||
--enable_query_log
|
||||
--enable_result_log
|
||||
|
||||
# Final cleanup.
|
||||
DROP TABLE t1;
|
16
mysql-test/suite/tokudb.add_index/t/tokudb_bug_1152.test
Normal file
16
mysql-test/suite/tokudb.add_index/t/tokudb_bug_1152.test
Normal file
|
@ -0,0 +1,16 @@
|
|||
#--source include/have_tokudb.inc
|
||||
SET STORAGE_ENGINE='tokudb';
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
||||
CREATE TABLE t1 (a1 int,a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int, a10 int) engine = tokudb;
|
||||
|
||||
insert into t1 (a9,a10) values (1,2);
|
||||
alter table t1 add index blah(a9,a10);
|
||||
|
||||
select * from t1;
|
||||
select a9,a10 from t1;
|
||||
|
||||
DROP table t1;
|
Loading…
Reference in a new issue