diff options
author | Igor Babaev <igor@askmonty.org> | 2013-05-04 21:56:45 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2013-05-04 21:56:45 -0700 |
commit | 75befe7526c6bdb38c042695fd302c037e59409d (patch) | |
tree | 2ad7d1dcf2fe25ebfafc64a32054cd1489d478f2 /mysql-test/t/select.test | |
parent | ddd341b71ae6b9c2dd206df64c662c0a29730ae9 (diff) | |
parent | 920c479c6ebd2236dbe5510e5ed8b748bf0ee158 (diff) | |
download | mariadb-git-75befe7526c6bdb38c042695fd302c037e59409d.tar.gz |
Merge 5.3->5.5
Diffstat (limited to 'mysql-test/t/select.test')
-rw-r--r-- | mysql-test/t/select.test | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test index af507b1f7ef..b036cc6bc01 100644 --- a/mysql-test/t/select.test +++ b/mysql-test/t/select.test @@ -4289,6 +4289,7 @@ SELECT f1 FROM t1 GROUP BY 1; SELECT f1 FROM t1 GROUP BY '123' = 'abc'; SELECT 1 FROM t1 GROUP BY 1; drop table t1; +set sql_buffer_result= 0; --echo # @@ -4479,5 +4480,41 @@ WHERE ( NOT (Use_leap_seconds <= Use_leap_seconds AND Time_zone_id != 1) OR Time_zone_id <> Time_zone_id ) AND Use_leap_seconds <> 'N'; +--echo # +--echo # Bug mdev-4274: result of simplification of OR badly merged +--echo # into embedding AND +--echo # + +CREATE TABLE t1 (a int, b int, INDEX idx(b)) ENGINE=MyISAM; +INSERT INTO t1 VALUES (8,8); + +CREATE TABLE t2 (c int, INDEX idx(c)) ENGINE=MyISAM; +INSERT INTO t2 VALUES (8), (9); + +EXPLAIN EXTENDED +SELECT * FROM t1 INNER JOIN t2 ON ( c = a ) + WHERE 1 IS NULL OR b < 33 AND b = c; +SELECT * FROM t1 INNER JOIN t2 ON ( c = a ) + WHERE 1 IS NULL OR b < 33 AND b = c; + +DROP TABLE t1,t2; + +--echo # +--echo # Bug mdev-4413: another manifestations of bug mdev-2474 +--echo # (valgrind complains) +--echo # + +CREATE TABLE t1 (a int, b int) ENGINE=MyISAM; +INSERT INTO t1 VALUES (7,1); + +CREATE TABLE t2 (c int) ENGINE=MyISAM; +INSERT INTO t2 VALUES (0), (8); + +SELECT * FROM t1, t2 + WHERE c = a AND + ( 0 OR ( b BETWEEN 45 AND 300 OR a > 45 AND a < 100 ) AND b = c ); + +DROP TABLE t1, t2; + --echo End of 5.3 tests |