diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-09-18 13:07:31 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-09-18 13:07:31 +0200 |
commit | 4ec2e9d7eda78d409d1b017ef4d8928fe9055438 (patch) | |
tree | 6c3a74a740d3c1c5f3a7d1f8154d8a791b435b3f /mysql-test/r/join.result | |
parent | 1a2a9d74fe1256554eceb09bbc6752a6376df87d (diff) | |
parent | 197bdbae4db78ba65f3668803bebd3c4a4509ae5 (diff) | |
download | mariadb-git-4ec2e9d7eda78d409d1b017ef4d8928fe9055438.tar.gz |
5.5 merge and fixes for compiler/test errors
Diffstat (limited to 'mysql-test/r/join.result')
-rw-r--r-- | mysql-test/r/join.result | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/mysql-test/r/join.result b/mysql-test/r/join.result index 0e5b36acb10..fdd2027990f 100644 --- a/mysql-test/r/join.result +++ b/mysql-test/r/join.result @@ -1460,7 +1460,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE D system PRIMARY NULL NULL NULL 1 1 SIMPLE DSAR system NULL NULL NULL NULL 1 1 SIMPLE DT range t_id t_id 2 NULL 2 Using where -1 SIMPLE DSA ref PRIMARY PRIMARY 8 const,test.DT.t_id,test.D.birthday 1 Using index +1 SIMPLE DSA ref PRIMARY PRIMARY 8 const,test.DT.t_id,func 1 Using index SELECT * FROM t5 DU, t1 D, t4 DT, t2 DSA, t3 DSAR WHERE DU.dog_id=D.dog_id AND D.dog_id=DT.dog_id AND D.birthday=DT.birthday AND DT.t_id=DSA.t_id AND DT.birthday=DSA.birthday AND DSA.dog_id=DSAR.dog_id; @@ -1477,6 +1477,25 @@ DROP TABLE t1,t2,t3,t4,t5; # SELECT * FROM t5 JOIN (t1 JOIN t2 UNION SELECT * FROM t3 JOIN t4); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')' at line 1 +# +# MDEV-4959: join of const table with NULL fields +# +CREATE TABLE t1 (i1 int) ENGINE=MyISAM; +INSERT INTO t1 VALUES (NULL); +CREATE TABLE t2 (i2 int, a int, b int) ENGINE=MyISAM; +CREATE ALGORITHM=TEMPTABLE VIEW v2 AS SELECT * FROM t2; +INSERT INTO t2 VALUES (NULL,1,2),(NULL,2,3); +SELECT * FROM t1 JOIN v2 ON i1 = i2 WHERE a < b; +i1 i2 a b +EXPLAIN EXTENDED +SELECT * FROM t1 JOIN v2 ON i1 = i2 WHERE a < b; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +2 DERIVED t2 ALL NULL NULL NULL NULL 2 100.00 +Warnings: +Note 1003 select NULL AS `i1`,`v2`.`i2` AS `i2`,`v2`.`a` AS `a`,`v2`.`b` AS `b` from `test`.`v2` where ((`v2`.`i2` = NULL) and (`v2`.`a` < `v2`.`b`)) +DROP VIEW v2; +DROP TABLE t1,t2; SET optimizer_switch=@save_optimizer_switch; # # Bug #35268: Parser can't handle STRAIGHT_JOIN with USING |