bench_count_distinct.test 416 Bytes
Newer Older
1 2 3 4 5
#
# Test of count(distinct ..)
#

--disable_warnings
unknown's avatar
unknown committed
6
drop table if exists t1;
7
--enable_warnings
8
create table t1(n int not null, key(n)) delay_key_write = 1;
unknown's avatar
unknown committed
9
let $1=100;
unknown's avatar
unknown committed
10
disable_query_log;
unknown's avatar
unknown committed
11 12 13 14 15 16
while ($1)
{
 eval insert into t1 values($1);
 eval insert into t1 values($1);
 dec $1;
}
unknown's avatar
unknown committed
17
enable_query_log;
unknown's avatar
unknown committed
18
select count(distinct n) from t1;
19
explain extended select count(distinct n) from t1;
unknown's avatar
unknown committed
20
drop table t1;
21 22

# End of 4.1 tests