1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

5.3->5.5 merge

This commit is contained in:
Sergei Golubchik
2013-03-10 12:46:56 +01:00
11 changed files with 128 additions and 4 deletions

View File

@ -5302,4 +5302,24 @@ INSERT INTO t2 VALUES (3),(4);
SELECT * FROM t1, t2 WHERE a=3 AND a=b;
a b
drop table t1,t2;
#
# Bug mdev-4250: wrong transformation of WHERE condition with OR
#
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;
pk a
EXPLAIN EXTENDED
SELECT * FROM t1 WHERE (1=2 OR t1.pk=2) AND t1.a <> 0;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
Warnings:
Note 1003 select 2 AS `pk`,0 AS `a` from `test`.`t1` where ((0 <> 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';
Time_zone_id Use_leap_seconds
End of 5.3 tests