~maria-captains/maria/5.3

Viewing all changes in revision 3204.

  • Committer: timour at askmonty
  • Date: 2011-10-03 19:48:15 UTC
  • Revision ID: timour@askmonty.org-20111003194815-6zwfxwbwqmcox9ud
Fix bug lp:858038

Analysis:
The cause of the bug was the changed meaning of
subselect_partial_match_engine::has_covering_null_row.
Previously it meant that there is row with NULLs in
all nullable fields of the materialized subquery table.
Later it was changed to mean a row with NULLs in all
fields of this table.

At the same time there was a shortcut in
subselect_rowid_merge_engine::partial_match() that
detected a special case where:
- there is no match in any of the columns with NULLs, and
- there is no NULL-only row that covers all columns with
  NULLs.
With the change in the meaning of has_covering_null_row,
the condition that detected this special case was incomplete.
This resulted in an incorrect FALSE, when the result was a
partial match.

Solution:
Expand the condition that detected the special case with the
correct test for the existence of a row with NULL values in
all columns that contain NULLs (a kind of parially covering
NULL-row).

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: