summaryrefslogtreecommitdiff
path: root/mysql-test/main/select_pkeycache.result
diff options
context:
space:
mode:
authorVarun Gupta <varun.gupta@mariadb.com>2019-05-11 20:44:18 +0530
committerVarun Gupta <varun.gupta@mariadb.com>2019-05-11 20:50:12 +0530
commit6a365e0bf212cd11001a0dad1e51fd6020905301 (patch)
treef9ec17b312c21e8e838fe8f51c8bb2fdc647170a /mysql-test/main/select_pkeycache.result
parent9965966a49b5b17da4f631664a35da1b46f03cb2 (diff)
downloadmariadb-git-6a365e0bf212cd11001a0dad1e51fd6020905301.tar.gz
MDEV-13628: ORed condition in pushed index condition is not removed from the WHERE
So to push index condition for each join tab we have calculate the index condition that can be pushed and then remove this index condition from the original condition. This is done through the function make_cond_remainder. The problem is the function make_cond_remainder does not remove index condition when there is an OR operator. Fixed this by making the function make_cond_remainder to keep in mind of the OR operator. Also updated results for multiple test files which were incorrectly updated by the commit e0c1b3f24246d22e6785315f9a8448bd9a590422 code which was supposed to remove the condition present in the index condition was not getting executed when the condition had OR operator, with AND the pushed index condition was getting removed from where. This problem affects all versions starting from 5.5 but this is a performance improvement, so fixing it in 10.4
Diffstat (limited to 'mysql-test/main/select_pkeycache.result')
-rw-r--r--mysql-test/main/select_pkeycache.result2
1 files changed, 1 insertions, 1 deletions
diff --git a/mysql-test/main/select_pkeycache.result b/mysql-test/main/select_pkeycache.result
index a527459657a..804830c48df 100644
--- a/mysql-test/main/select_pkeycache.result
+++ b/mysql-test/main/select_pkeycache.result
@@ -3422,7 +3422,7 @@ SELECT t2.sku, t2.sppr, t2.name, t1.sku, t1.pr
FROM t2, t1 WHERE t2.sku=20 AND (t2.sku=t1.sku OR t2.sppr=t1.sku);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 const PRIMARY PRIMARY 4 const 1
-1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 2 Using index condition; Using where
+1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 2 Using index condition
DROP TABLE t1,t2;
SET SQL_MODE='NO_UNSIGNED_SUBTRACTION';
CREATE TABLE t1 (i TINYINT UNSIGNED NOT NULL);