diff options
author | Igor Babaev <igor@askmonty.org> | 2013-08-16 22:01:47 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2013-08-16 22:01:47 -0700 |
commit | 25c152018dceae35bf0d45de46a33a214048128c (patch) | |
tree | d9dfc7c5fff1c89abb2870b5a1086dedf24678c0 /mysql-test/r/select_pkeycache.result | |
parent | 752d5d022dd4e6f76338b4b57696d4eef29e1f6b (diff) | |
download | mariadb-git-25c152018dceae35bf0d45de46a33a214048128c.tar.gz |
Fixed bug mdev-4418.
After single row substitutions there might appear new equalities.
They should be properly propagated to all AND/OR levels the WHERE
condition. It's done now with an additional call of remove_eq_conds().
Diffstat (limited to 'mysql-test/r/select_pkeycache.result')
-rw-r--r-- | mysql-test/r/select_pkeycache.result | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/r/select_pkeycache.result b/mysql-test/r/select_pkeycache.result index dfc5236f794..56a4a8d2bdc 100644 --- a/mysql-test/r/select_pkeycache.result +++ b/mysql-test/r/select_pkeycache.result @@ -5217,4 +5217,22 @@ Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` SELECT * FROM t1 WHERE (b = 1 OR a = 5) AND (b = 5 AND a = 5 OR 1 != 1); a b DROP TABLE t1; +# +# Bug mdev-4418: impossible multiple equality in OR formula +# after row substitution +# +CREATE TABLE t1 (a int, b varchar(1)) ENGINE=MyISAM; +INSERT INTO t1 VALUES (0,'j'), (8,'v'); +CREATE TABLE t2 (c varchar(1), d varchar(1)) ENGINE=MyISAM; +INSERT INTO t2 VALUES ('k','k'); +EXPLAIN EXTENDED +SELECT * FROM t1, t2 WHERE c=b AND (1=2 OR ((b='h' OR a=136) AND d=b)); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 system NULL 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`.`a` AS `a`,`test`.`t1`.`b` AS `b`,'k' AS `c`,'k' AS `d` from `test`.`t1` join `test`.`t2` where ((`test`.`t1`.`b` = 'k') and (`test`.`t1`.`a` = 136)) +SELECT * FROM t1, t2 WHERE c=b AND (1=2 OR ((b='h' OR a=136) AND d=b)); +a b c d +DROP TABLE t1,t2; End of 5.3 tests |