diff options
author | Sergey Glukhov <Sergey.Glukhov@sun.com> | 2010-05-27 19:13:53 +0400 |
---|---|---|
committer | Sergey Glukhov <Sergey.Glukhov@sun.com> | 2010-05-27 19:13:53 +0400 |
commit | fa3570f96a73d8967b45ac1620675d15565f6721 (patch) | |
tree | 1a05a019a5f6ef5538017e7b7722768f62b01345 /mysql-test/include | |
parent | 54a006fa0f33147b61a309a28e9ee0e3742f829c (diff) | |
download | mariadb-git-fa3570f96a73d8967b45ac1620675d15565f6721.tar.gz |
Bug#52005 'JOIN_TAB->dependent' may be incorrectly propageted for multilevel outer joins
There are two problems:
1. In simplify_joins function we calculate table dependencies. If STRAIGHT_JOIN hint
is used for whole SELECT we do not count it and as result some dependendecies
might be lost. It leads to incorrect table order which is returned by
join_tab_cmp_straight() function.
2. make_join_statistics() calculate the transitive closure for relations a particular
JOIN_TAB is 'dependent on'.
We aggregate the dependent table_map of a JOIN_TAB by adding dependencies from other
tables which we depend on. However, this may also cause new dependencies to be
available after we have completed processing a certain JOIN_TAB.
Both these problems affect condition pushdown and as result condition might be pushed
into wrong table which leads to crash or even omitted which leads to wrong result.
The fix:
1. Use modified 'transitive closure' algorithm provided by Ole John Aske
2. Update table dependences in simplify_joins according to
global STRAIGHT_JOIN hint.
Note: the patch also fixes bugs 46091 & 51492
Diffstat (limited to 'mysql-test/include')
0 files changed, 0 insertions, 0 deletions