mirror of
https://github.com/MariaDB/server.git
synced 2025-09-11 05:52:26 +03:00
of the 5.3 code line after a merge with 5.2 on 2010-10-28 in order not to allow the cost to access a joined table to be equal to 0 ever. Expanded data sets for many test cases to get the same execution plans as before.
36 lines
918 B
Plaintext
36 lines
918 B
Plaintext
#
|
|
# Check on condition on different length keys.
|
|
|
|
--disable_warnings
|
|
drop table if exists t1;
|
|
--enable_warnings
|
|
|
|
CREATE TABLE t1 (
|
|
a char(5) NOT NULL,
|
|
b char(4) NOT NULL,
|
|
KEY (a),
|
|
KEY (b)
|
|
);
|
|
|
|
INSERT INTO t1 VALUES ('A','B'),('b','A'),('C','c'),('D','E'),('a','a');
|
|
INSERT INTO t1 VALUES
|
|
('AA','BB'),('bb','AA'),('CC','cc'),('DD','EE'),('aa','aa');
|
|
INSERT INTO t1 VALUES
|
|
('AAA','BBB'),('bbb','AAA'),('CCC','ccc'),('DDD','EEE'),('aaa','aaa');
|
|
|
|
select * from t1,t1 as t2
|
|
where length(t1.A)=1 and length(t2.B)=1 ;
|
|
explain select t1.*,t2.* from t1,t1 as t2
|
|
where t1.A=t2.B and length(t1.A)=1 and length(t2.B)=1;
|
|
#select t1.*,t2.* from t1,t1 as t2 where t1.A=t2.B;
|
|
select t1.*,t2.* from t1,t1 as t2
|
|
where t1.A=t2.B and length(t1.A)=1 and length(t2.B)=1
|
|
order by binary t1.a,t2.a;
|
|
select * from t1 where a='a';
|
|
drop table t1;
|
|
|
|
--disable_query_log
|
|
drop database pbxt;
|
|
--enable_query_log
|
|
# End of 4.1 tests
|