From 138e5d57eb1d37f438294da9442e191812946381 Mon Sep 17 00:00:00 2001 From: "Sinisa@sinisa.nasamreza.org" <> Date: Sat, 15 Jun 2002 20:59:42 +0300 Subject: Fixed a bug in optimiser with MERGE tables with non-unique values with aggregating functions. This consistently crashed Mysql --- mysql-test/t/merge.test | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'mysql-test/t/merge.test') diff --git a/mysql-test/t/merge.test b/mysql-test/t/merge.test index 5bd78769a05..de26d7eb1d3 100644 --- a/mysql-test/t/merge.test +++ b/mysql-test/t/merge.test @@ -168,3 +168,10 @@ select * from t3 order by a,b; select * from t4 order by a,b; select * from t5 order by a,b; drop table if exists t6, t5, t4, t3, t2, t1; +CREATE TABLE t1 ( a int(11) NOT NULL default '0', b int(11) NOT NULL default '0', PRIMARY KEY (a,b)) TYPE=MyISAM; +INSERT INTO t1 VALUES (1,1), (2,1); +CREATE TABLE t2 ( a int(11) NOT NULL default '0', b int(11) NOT NULL default '0', PRIMARY KEY (a,b)) TYPE=MyISAM; +INSERT INTO t2 VALUES (1,2), (2,2); +CREATE TABLE t ( a int(11) NOT NULL default '0', b int(11) NOT NULL default '0', KEY a (a,b)) TYPE=MRG_MyISAM UNION=(t1,t2); +select max(b) from t where a = 2; +drop table if exists t,t1,t2; -- cgit v1.2.1