mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Fix for BUG#9348: when computing union of two intervals set lower bound to
minimum of lower bounds of two joined intervals.
This commit is contained in:
@ -577,3 +577,22 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
explain select * from t1 where a='aaa' collate latin1_german1_ci;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL a NULL NULL NULL 9 Using where
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (
|
||||
`CLIENT` char(3) character set latin1 collate latin1_bin NOT NULL default '000',
|
||||
`ARG1` char(3) character set latin1 collate latin1_bin NOT NULL default '',
|
||||
`ARG2` char(3) character set latin1 collate latin1_bin NOT NULL default '',
|
||||
`FUNCTION` varchar(10) character set latin1 collate latin1_bin NOT NULL default '',
|
||||
`FUNCTINT` int(11) NOT NULL default '0',
|
||||
KEY `VERI_CLNT~2` (`ARG1`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
INSERT INTO t1 VALUES ('000',' 0',' 0','Text 001',0), ('000',' 0',' 1','Text 002',0),
|
||||
('000',' 1',' 2','Text 003',0), ('000',' 2',' 3','Text 004',0),
|
||||
('001',' 3',' 0','Text 017',0);
|
||||
SELECT count(*) FROM t1 WHERE CLIENT='000' AND (ARG1 != ' 1' OR ARG1 != ' 2');
|
||||
count(*)
|
||||
4
|
||||
SELECT count(*) FROM t1 WHERE CLIENT='000' AND (ARG1 != ' 2' OR ARG1 != ' 1');
|
||||
count(*)
|
||||
4
|
||||
drop table t1;
|
||||
|
Reference in New Issue
Block a user