summaryrefslogtreecommitdiff
path: root/mysql-test/r/select.result
diff options
context:
space:
mode:
authorSinisa@sinisa.nasamreza.org <>2002-06-15 14:56:35 +0300
committerSinisa@sinisa.nasamreza.org <>2002-06-15 14:56:35 +0300
commiteab0de7ce692477de6e13d820f0749c49a4c3c2b (patch)
treee9fd6f71bf7257eac77bf30ec0558fd225180552 /mysql-test/r/select.result
parentb559a6335ca5a7991c395265a57ccbb71d9cb8fe (diff)
downloadmariadb-git-eab0de7ce692477de6e13d820f0749c49a4c3c2b.tar.gz
A fix for a bug which hits the optimiser when trying to group keys
for a seemingly impoosbile conds in WHERE.... This crashed MySQL in 4.0.2
Diffstat (limited to 'mysql-test/r/select.result')
-rw-r--r--mysql-test/r/select.result8
1 files changed, 8 insertions, 0 deletions
diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result
index 051aeb43b43..6d26f9aa90a 100644
--- a/mysql-test/r/select.result
+++ b/mysql-test/r/select.result
@@ -3232,3 +3232,11 @@ t2 1 fld3 1 fld3 A NULL NULL NULL BTREE
DO 1;
DO benchmark(100,1+1),1,1;
drop table t4, t3,t2, t1;
+DROP TABLE IF EXISTS t1,t2;
+CREATE TABLE t1 ( gvid int(10) unsigned default NULL, hmid int(10) unsigned default NULL, volid int(10) unsigned default NULL, mmid int(10) unsigned default NULL, hdid int(10) unsigned default NULL, fsid int(10) unsigned default NULL, ctid int(10) unsigned default NULL, dtid int(10) unsigned default NULL, cost int(10) unsigned default NULL, performance int(10) unsigned default NULL, serialnumber bigint(20) unsigned default NULL, monitored tinyint(3) unsigned default '1', removed tinyint(3) unsigned default '0', target tinyint(3) unsigned default '0', dt_modified timestamp(14) NOT NULL, name varchar(255) binary default NULL, description varchar(255) default NULL, UNIQUE KEY hmid (hmid,volid)) TYPE=MyISAM;
+INSERT INTO t1 VALUES (200001,2,1,1,100,1,1,1,0,0,0,1,0,1,20020425060057,'\\\\ARKIVIO-TESTPDC\\E$',''),(200002,2,2,1,101,1,1,1,0,0,0,1,0,1,20020425060057,'\\\\ARKIVIO-TESTPDC\\C$',''),(200003,1,3,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,1,20020425060427,'c:',NULL);
+CREATE TABLE t2 ( hmid int(10) unsigned default NULL, volid int(10) unsigned default NULL, sampletid smallint(5) unsigned default NULL, sampletime datetime default NULL, samplevalue bigint(20) unsigned default NULL, KEY idx1 (hmid,volid,sampletid,sampletime)) TYPE=MyISAM;
+INSERT INTO t2 VALUES (1,3,10,'2002-06-01 08:00:00',35),(1,3,1010,'2002-06-01 12:00:01',35);
+SELECT a.gvid, (SUM(CASE b.sampletid WHEN 140 THEN b.samplevalue ELSE 0 END)) as the_success,(SUM(CASE b.sampletid WHEN 141 THEN b.samplevalue ELSE 0 END)) as the_fail,(SUM(CASE b.sampletid WHEN 142 THEN b.samplevalue ELSE 0 END)) as the_size,(SUM(CASE b.sampletid WHEN 143 THEN b.samplevalue ELSE 0 END)) as the_time FROM t1 a, t2 b WHERE a.hmid = b.hmid AND a.volid = b.volid AND b.sampletime >= 'NULL' AND b.sampletime < 'NULL' AND b.sampletid IN (140, 141, 142, 143) GROUP BY a.gvid;
+gvid the_success the_fail the_size the_time
+DROP TABLE t1,t2;