1003
# Bug#16539979 BASIC SELECT COUNT(DISTINCT ID) IS BROKEN.
1004
# Bug#17867117 ERROR RESULT WHEN "COUNT + DISTINCT + CASE WHEN" NEED MERGE_WALK
1006
SET @tmp_table_size_save= @@tmp_table_size;
1007
SET @@tmp_table_size= 1024;
1008
CREATE TABLE t1 (a INT);
1009
INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8);
1010
INSERT INTO t1 SELECT a+8 FROM t1;
1011
INSERT INTO t1 SELECT a+16 FROM t1;
1012
INSERT INTO t1 SELECT a+32 FROM t1;
1013
INSERT INTO t1 SELECT a+64 FROM t1;
1014
INSERT INTO t1 VALUE(NULL);
1015
SELECT COUNT(DISTINCT a) FROM t1;
1018
SELECT COUNT(DISTINCT (a+0)) FROM t1;
1019
COUNT(DISTINCT (a+0))
1023
id int auto_increment primary key,
1025
engine=myisam charset=gbk;
1026
insert into tb(v) values("aaa");
1027
insert into tb(v) (select v from tb);
1028
insert into tb(v) (select v from tb);
1029
insert into tb(v) (select v from tb);
1030
insert into tb(v) (select v from tb);
1031
insert into tb(v) (select v from tb);
1032
insert into tb(v) (select v from tb);
1033
update tb set v=concat(v, id);
1034
select count(distinct case when id<=64 then id end) from tb;
1035
count(distinct case when id<=64 then id end)
1037
select count(distinct case when id<=63 then id end) from tb;
1038
count(distinct case when id<=63 then id end)
1041
SET @@tmp_table_size= @tmp_table_size_save;
1002
1042
End of 5.5 tests