Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/MariaDB/mysql-test/suite/innodb/t/   (MariaDB Server Version 8.1-8.4©)  Datei vom 1.9.2026 mit Größe 760 B image not shown  

Quelle  innodb-agregate.test  Sprache: unbekannt

 
Spracherkennung für: .test vermutete Sprache: SQL {SQL[275] VHDL[115] ADA[110]} [Methode: maximale Elemente, drei Dimensionen]

--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;

[Dauer der Verarbeitung: 0.11 Sekunden, vorverarbeitet 2026-10-08]