diff options
author | Igor Babaev <igor@askmonty.org> | 2010-09-28 12:39:33 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2010-09-28 12:39:33 -0700 |
commit | 21b1b5f0405f541bae2cda8882cd16696d39a4fd (patch) | |
tree | cdd6987f173108e0dc45c05969c98a065619d7b9 /mysql-test/r/view.result | |
parent | db37f2db82a8fc58439dcd5e554df3ca33380461 (diff) | |
download | mariadb-git-21b1b5f0405f541bae2cda8882cd16696d39a4fd.tar.gz |
Fixed bug #52636.
Applied the fix for bug #47217 from the mysql-6.0 codebase.
The patch adds not null predicates generated for the left parts
of the equality predicates used for ref accesses. This is done
for such predicates both in where conditions and on conditions.
For the where conditions the not null predicates were generated
but in 5.0/5.1 they actually never were used due to some lame
merge from 4.1 to 5.0. The fix for bug #47217 made these
predicates to be used in the condition pushed to the tables.
Yet only this patch generates not null predicates for equality
predicated from on conditions of outer joins.
This patch introduces a performance regression that can be
observed on a test case from null_key.test. The regression
will disappear after the fix for bug #57024 from mariadb-5.1
is pulled into mariadb-5.3.
The patch contains many changes in the outputs of the EXPLAIN
commands since generated not null predicates are considered as
parts of the conditions pushed to join tables and may add
'Usingwhere' in some rows of EXPLAINs where there used
to be no such comments.
Diffstat (limited to 'mysql-test/r/view.result')
-rw-r--r-- | mysql-test/r/view.result | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index 1d9f8a84e24..178901f5774 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -2341,11 +2341,11 @@ CREATE VIEW v1 AS SELECT t1.* FROM t1,t2 WHERE t1.a=t2.a AND t1.b=t2.b; CREATE VIEW v2 AS SELECT t3.* FROM t1,t3 WHERE t1.a=t3.a; EXPLAIN SELECT t1.* FROM t1 JOIN t2 WHERE t1.a=t2.a AND t1.b=t2.b AND t1.a=1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref a a 5 const 1 Using index +1 SIMPLE t1 ref a a 5 const 1 Using where; Using index 1 SIMPLE t2 ref a a 10 const,test.t1.b 1 Using index EXPLAIN SELECT * FROM v1 WHERE a=1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref a a 5 const 1 Using index +1 SIMPLE t1 ref a a 5 const 1 Using where; Using index 1 SIMPLE t2 ref a a 10 const,test.t1.b 1 Using index EXPLAIN SELECT * FROM v2 WHERE a=1; id select_type table type possible_keys key key_len ref rows Extra |