summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorbar@mysql.com <>2005-03-24 18:11:35 +0400
committerbar@mysql.com <>2005-03-24 18:11:35 +0400
commit56b931f8184739b859bc92c846fcc59f10028dd6 (patch)
tree6d6a49fa52ecbddf765d1f9c96f7063189e4d19e /mysql-test
parentc4a698ea3e1eb1955844489a3bde126cd512fbda (diff)
parent29ffcad226e35e0c101253b35a73d83bdc98fbde (diff)
downloadmariadb-git-56b931f8184739b859bc92c846fcc59f10028dd6.tar.gz
Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/usr/home/bar/mysql-4.1
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/func_str.result20
-rw-r--r--mysql-test/t/func_str.test14
2 files changed, 34 insertions, 0 deletions
diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result
index ab652b9d850..5405dbf53d9 100644
--- a/mysql-test/r/func_str.result
+++ b/mysql-test/r/func_str.result
@@ -636,6 +636,26 @@ drop table t1;
select charset(null), collation(null), coercibility(null);
charset(null) collation(null) coercibility(null)
binary binary 5
+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;
+a b a b
+1 1 NULL NULL
+2 2 2 2
+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;
+a b a b
+1 1 NULL NULL
+2 2 2 2
+select t1.*,t2.* from t1 left join t2 on (t1.b=t2.b)
+where coercibility(t2.a) = 2 order by t1.a,t2.a;
+a b a b
+1 1 NULL NULL
+2 2 2 2
+DROP TABLE t1, t2;
select SUBSTR('abcdefg',3,2);
SUBSTR('abcdefg',3,2)
cd
diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test
index e7069c41716..22028437111 100644
--- a/mysql-test/t/func_str.test
+++ b/mysql-test/t/func_str.test
@@ -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