mirror of
https://github.com/MariaDB/server.git
synced 2025-01-25 00:04:33 +01:00
09ec3e6d9f
git-svn-id: file:///svn/mysql/tests/mysql-test@40869 c7de825b-a66e-492c-adef-691d508d4ae1
78 lines
1.9 KiB
Text
78 lines
1.9 KiB
Text
--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;
|