-
unknown authored
Apart from the fix, the patch also adds few more unrelated test cases for partial matching, and fixes few typos. Analysis: This bug uncovered that partial matching via rowid intersection didn't handle the case when: - the left IN argument has some NULLs, - there are no non-null value matches, and there is no non-null column, - the subquery columns that are not covered with the NULLs in the left IN argument contain at least one row, such that it has NULL values in all columns where the left IN operand has no NULLs. In this case there is a partial match. In addition the analysis of the related code uncovered incorrect handling of few other related cases. Solution: The solution for the bug is to check if there exists a row with NULLs in all columns other than the ones having NULL in the let IN operand. The check is implemented via checking whether the bitmaps that store NULL information in class Ordered_key have a non-empty intersection for the relevant columns. The intersection itself is implemented via the function bitmap_exists_intersection() in my_bitmap.c.
42221aba