You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
975 B

  1. #--source include/have_tokudb.inc
  2. SET DEFAULT_STORAGE_ENGINE='tokudb';
  3. #
  4. # Bug #22169: Crash with count(distinct)
  5. #
  6. --echo *** Bug #22169 ***
  7. --disable_warnings
  8. DROP TABLE IF EXISTS z1;
  9. --enable_warnings
  10. create table z1 (a int, b int, c int, d int, e int, primary key (c,d), clustering key (a,b));
  11. insert into z1 values (1,1,1,1,1), (1,2,3,4,5), (3,4,1,100,1),(3,4,1,2,3),(3,5,1,21,1),(7,8,4,2,6),(9,10,34,3,2);
  12. insert into z1 values (-1,-1,-1,-1,-1), (-1,-2,-3,-4,-5), (-3,-4,-1,-100,-1),(-3,-4,-1,-2,-3),(-3,-5,-1,-21,-1),(-7,-8,-4,-2,-6),(-9,-10,-34,-3,-2);
  13. select * from z1 group by a,b;
  14. explain select a,b from z1 where a > 1;
  15. select a,b from z1 where a > 1;
  16. explain select a,b from z1 where a >=1 and b > 1;
  17. select a,b from z1 where a >=1 and b > 1;
  18. explain select a,b from z1 where a > 3;
  19. select a,b from z1 where a > 3;
  20. explain select a,b from z1 where a >=3 and b > 4;
  21. select a,b from z1 where a >=3 and b > 4;
  22. select distinct a from z1;
  23. DROP TABLE z1;