• Evgeny Potemkin's avatar
    Bug#45266: Uninitialized variable lead to an empty result. · 0e64988a
    Evgeny Potemkin authored
    The TABLE::reginfo.impossible_range is used by the optimizer to indicate
    that the condition applied to the table is impossible. It wasn't initialized
    at table opening and this might lead to an empty result on complex queries:
    a query might set the impossible_range flag on a table and when the query finishes,
    all tables are returned back to the table cache. The next query that uses the table
    with the impossible_range flag set and an index over the table will see the flag
    and thus return an empty result.
    
    The open_table function now initializes the TABLE::reginfo.impossible_range
    variable.
    0e64988a
sql_base.cc 288 KB