diff options
author | Igor Babaev <igor@askmonty.org> | 2014-02-20 21:27:33 -0800 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2014-02-20 21:27:33 -0800 |
commit | 3e03c9eae9089cd2cae0f378bd81ff29367f41eb (patch) | |
tree | 59de03ac847622691243e92d7f90f8e1bc102098 /mysql-test/r/select_pkeycache.result | |
parent | 6ebaa4939e0a4e22491a4a251863f0b31af90829 (diff) | |
download | mariadb-git-3e03c9eae9089cd2cae0f378bd81ff29367f41eb.tar.gz |
After constant row substitution the optimizer should call the method
update_used_tables for the the where condition to update cached
indicators of constant subexpressions. It should be done before further
possible simplification of the where condition.
This change caused simplification of the executed where conditions
in many test cases.
Diffstat (limited to 'mysql-test/r/select_pkeycache.result')
-rw-r--r-- | mysql-test/r/select_pkeycache.result | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mysql-test/r/select_pkeycache.result b/mysql-test/r/select_pkeycache.result index e8bcba8043a..883deb95f43 100644 --- a/mysql-test/r/select_pkeycache.result +++ b/mysql-test/r/select_pkeycache.result @@ -5125,7 +5125,7 @@ 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) +Note 1003 select 2 AS `pk`,0 AS `a` from `test`.`t1` where 0 DROP TABLE t1; SELECT * FROM mysql.time_zone WHERE ( NOT (Use_leap_seconds <= Use_leap_seconds AND Time_zone_id != 1) @@ -5148,7 +5148,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE t1 system idx NULL NULL NULL 1 100.00 1 SIMPLE t2 ref idx idx 5 const 1 100.00 Using index Warnings: -Note 1003 select 8 AS `a`,8 AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t1` join `test`.`t2` where ((`test`.`t2`.`c` = 8) and (8 < 33)) +Note 1003 select 8 AS `a`,8 AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t1` join `test`.`t2` where (`test`.`t2`.`c` = 8) SELECT * FROM t1 INNER JOIN t2 ON ( c = a ) WHERE 1 IS NULL OR b < 33 AND b = c; a b c @@ -5272,7 +5272,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE t2 system PRIMARY NULL NULL NULL 1 100.00 1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where Warnings: -Note 1003 select `test`.`t1`.`pk1` AS `pk1`,`test`.`t1`.`a1` AS `a1`,`test`.`t1`.`b1` AS `b1`,1 AS `pk2`,1 AS `a2` from `test`.`t1` join `test`.`t2` where ((`test`.`t1`.`a1` = 1) and ((`test`.`t1`.`b1` = 6) or (1 > 4))) +Note 1003 select `test`.`t1`.`pk1` AS `pk1`,`test`.`t1`.`a1` AS `a1`,`test`.`t1`.`b1` AS `b1`,1 AS `pk2`,1 AS `a2` from `test`.`t1` join `test`.`t2` where ((`test`.`t1`.`a1` = 1) and (`test`.`t1`.`b1` = 6)) INSERT INTO t1 VALUES (3,1,6); SELECT * FROM t1, t2 WHERE a1 = pk2 AND ( ( b1 = 6 OR a2 > 4 ) AND pk2 = a2 OR pk1 IS NULL ); |