1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Fixed a bug in optimiser with MERGE tables with non-unique values

with aggregating functions.

This consistently crashed Mysql
This commit is contained in:
unknown
2002-06-15 20:59:42 +03:00
parent 451a5e510b
commit e9c43803dd
4 changed files with 26 additions and 4 deletions

View File

@ -462,3 +462,12 @@ a b
6 1
6 2
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;
max(b)
NULL
drop table if exists t,t1,t2;