mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Fixed that LEFT OUTER JOIN was replaced with a regulat join
in some cases, because "charset(x) = 'string'" was considered as "x is not null" due to incorrect not_null_tables().
This commit is contained in:
@@ -376,6 +376,20 @@ insert into t1 values (null);
|
||||
select charset(a), collation(a), coercibility(a) from t1;
|
||||
drop table t1;
|
||||
select charset(null), collation(null), coercibility(null);
|
||||
#
|
||||
# Make sure OUTER JOIN is not replaced with a regular joun
|
||||
#
|
||||
CREATE TABLE t1 (a int, b int);
|
||||
CREATE TABLE t2 (a int, b int);
|
||||
INSERT INTO t1 VALUES (1,1),(2,2);
|
||||
INSERT INTO t2 VALUES (2,2),(3,3);
|
||||
select t1.*,t2.* from t1 left join t2 on (t1.b=t2.b)
|
||||
where collation(t2.a) = _utf8'binary' order by t1.a,t2.a;
|
||||
select t1.*,t2.* from t1 left join t2 on (t1.b=t2.b)
|
||||
where charset(t2.a) = _utf8'binary' order by t1.a,t2.a;
|
||||
select t1.*,t2.* from t1 left join t2 on (t1.b=t2.b)
|
||||
where coercibility(t2.a) = 2 order by t1.a,t2.a;
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
#
|
||||
# test for SUBSTR
|
||||
|
||||
Reference in New Issue
Block a user