summaryrefslogtreecommitdiff
path: root/storage/tokudb/mysql-test/tokudb_add_index/t/add_index_13.test
blob: 3efbe8d6d2f46088ce52fa32c2335d13b4635414 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
--source include/have_tokudb.inc
SET DEFAULT_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;