• Igor Babaev's avatar
    Fixed LP bug #806504. · f8db35bd
    Igor Babaev authored
    Missing initialization of the bitmap not_null_tables_cache to 0 
    in the function Item_func::eval_not_null_tables caused this bug.
    This function is called indirectly from the function
    SELECT_LEX::update_used_tables after merging mergeable views and
    derived tables into the main query. The leaf tables of resulting
    query may change their bitmap numbers after this merge. That's why
    the not_null_tables_cache bitmaps must be updated. Due to the bug 
    mentioned above the result of the re-evaluation of the 
    not_null_tables_cache turned out to be incorrect in some cases.
    This could trigger an invalid conversion of outer joins into 
    inner joins leading to invalid query result sets.
    
    Also removed an implicit conversion from int to bool in the function
    SELECT_LEX::update_used_tables.
    f8db35bd
sql_lex.cc 99.1 KB