diff options
author | Igor Babaev <igor@askmonty.org> | 2014-02-27 13:54:05 -0800 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2014-02-27 13:54:05 -0800 |
commit | 1a536c8daf7beabc1f08bfb4f614c8cc7d3aa8e5 (patch) | |
tree | 939d360479d9143ab5f8f5ff12f3d90477943ed1 /mysql-test/r/join.result | |
parent | 472bc477f6223c3f2b55daae668a56d4e505830b (diff) | |
download | mariadb-git-1a536c8daf7beabc1f08bfb4f614c8cc7d3aa8e5.tar.gz |
Fixed bug mdev-5635.
After constant row substitution some field items become constant items.
The range analyzer should take into account this fact when looking for
ranges.
Diffstat (limited to 'mysql-test/r/join.result')
-rw-r--r-- | mysql-test/r/join.result | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/r/join.result b/mysql-test/r/join.result index 0f798f7ba1a..e7292e8ddce 100644 --- a/mysql-test/r/join.result +++ b/mysql-test/r/join.result @@ -1538,3 +1538,14 @@ a 3 4 DROP TABLE t1,t2; +# +# MDEV-5635: join of a const table with non-const tables +# +CREATE TABLE t1 (a varchar(3) NOT NULL) ENGINE=MyISAM; +INSERT INTO t1 VALUES ('foo'); +CREATE TABLE t2 (b varchar(3), c varchar(3), INDEX(b)) ENGINE=MyISAM; +INSERT INTO t2 VALUES ('bar', 'bar'),( 'qux', 'qux'); +SELECT STRAIGHT_JOIN * FROM t1, t2 AS t2_1, t2 AS t2_2 +WHERE t2_2.c = t2_1.c AND t2_2.b = t2_1.b AND ( a IS NULL OR t2_1.c = a ); +a b c b c +DROP TABLE t1,t2; |