diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-03-10 12:46:56 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-03-10 12:46:56 +0100 |
commit | 8dad7dfa6ae40e54e814d3ba135f45bff0c13e8f (patch) | |
tree | 0432ab82e496017306a155eeb530ff5f2e184c4e /mysql-test/t | |
parent | 9d8ee74b38c5db13dc4466e76b7ad2eb8ce36a5a (diff) | |
parent | 926b0f54c9b0f261460e886969dde9bbf1916852 (diff) | |
download | mariadb-git-8dad7dfa6ae40e54e814d3ba135f45bff0c13e8f.tar.gz |
5.3->5.5 merge
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/select.test | 19 | ||||
-rw-r--r-- | mysql-test/t/type_enum.test | 15 |
2 files changed, 34 insertions, 0 deletions
diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test index 44eaf7130a7..af507b1f7ef 100644 --- a/mysql-test/t/select.test +++ b/mysql-test/t/select.test @@ -4460,5 +4460,24 @@ INSERT INTO t2 VALUES (3),(4); SELECT * FROM t1, t2 WHERE a=3 AND a=b; drop table t1,t2; +--echo # +--echo # Bug mdev-4250: wrong transformation of WHERE condition with OR +--echo # + +CREATE TABLE t1 (pk int PRIMARY KEY, a int); +INSERT INTO t1 VALUES (3,0), (2,0), (4,1), (5,0), (1,0); + +SELECT * FROM t1 WHERE (1=2 OR t1.pk=2) AND t1.a <> 0; +EXPLAIN EXTENDED +SELECT * FROM t1 WHERE (1=2 OR t1.pk=2) AND t1.a <> 0; + +DROP TABLE t1; + +SELECT * FROM mysql.time_zone +WHERE ( NOT (Use_leap_seconds <= Use_leap_seconds AND Time_zone_id != 1) + AND Time_zone_id = Time_zone_id + OR Time_zone_id <> Time_zone_id ) + AND Use_leap_seconds <> 'N'; + --echo End of 5.3 tests diff --git a/mysql-test/t/type_enum.test b/mysql-test/t/type_enum.test index 2043342e2c8..5b0b70631a5 100644 --- a/mysql-test/t/type_enum.test +++ b/mysql-test/t/type_enum.test @@ -221,3 +221,18 @@ SELECT a FROM t1 WHERE a=0; DROP TABLE t1; --echo End of 5.1 tests + +--echo # +--echo # MDEV-4241: Assertion failure: scale >= 0 && precision > 0 && +--echo # scale <= precision in decimal_bin_size +--echo # +CREATE TABLE t1 ( + f1 enum('1','2','3','4','5') +) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1),(2); +--enable_metadata +SELECT AVG(f1) FROM t1; +--disable_metadata +drop table t1; + +--echo End of 5.3 tests |