mariadb/mysql-test/suite/innodb/t/innodb-agregate.test
Jan Lindström 8103526b38 MDEV-9667: Server hangs after select count(distinct name) from t2 where a=8366 and b>=5 and b<=5;
In row_search_for_mysql function on XtraDB there was a old logic
where null bytes were inited. This caused server to think that
key value is null and continue on incorrect path.
2016-03-11 13:36:29 +02:00

18 lines
760 B
Text

--source include/have_innodb.inc
#
# MDEV-9667: Server hangs after select count(distinct name) from t2 where a=8366 and b>=5 and b<=5;
#
create table t2 (a smallint(6) not null, b int(10) not null, name varchar(20), primary key(a,b), key(name)) engine=InnoDB;
insert into t2 values (8355,3,"sanja"),(8355,4,"wlad"),(8366,5, "lawrin"),(8366,6,"markusjm");
select count(distinct name) from t2 where a=8366 and b>=5 and b<=5;
select count(distinct name) from t2 where a=8366 and b=5;
select count(distinct name) from t2 where a=8366 and b between 5 and 5.5;
select sum(distinct a) from t2 where a=8366 and b>=5 and b<=5;
select sum(distinct a) from t2 where a=8366 and b=5;
select sum(distinct a) from t2 where a=8366 and b between 5 and 5.5;
drop table t2;