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

Quelle  range.test  Sprache: unbekannt

 
Spracherkennung für: .test vermutete Sprache: SQL {SQL[93] VDM[62] ABAP[56]} [Methode: maximale Elemente, drei Dimensionen]

--source include/have_sequence.inc

--echo #
--echo # MDEV-22935 Erroneous Aria Index / Optimizer behaviour
--echo #

create table t1 (a char(255), b datetime, primary key(a,b)) engine=aria transactional=0 pack_keys=0;
insert into t1 select concat("hello world hello world", truncate(seq/100,0)),from_unixtime(seq+1) from seq_1_to_20000;

let $i= 200;
--disable_query_log
while ($i)
{
  let $tmp= `select count(*) from t1 where a="hello world hello world$i" and b <= from_unixtime($i*100+1)`;
  if (`SELECT $tmp != 1`)
  {
    --echo "Found $tmp rows, expected 1, for value $i"
  }  
  dec $i;
}
--enable_query_log
drop table t1;

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