• Sergey Vojtovich's avatar
    MDEV-19536 - Server crash or ASAN heap-use-after-free in is_temporary_table / · adefaeff
    Sergey Vojtovich authored
                 read_statistics_for_tables_if_needed
    
    Regression after 279a907f, read_statistics_for_tables_if_needed() was
    called after open_normal_and_derived_tables() failure.
    
    Fixed by moving read_statistics_for_tables() call to a branch of
    get_schema_stat_record() where result of open_normal_and_derived_tables()
    is checked.
    
    Removed THD::force_read_stats, added read_statistics_for_tables() instead.
    Simplified away statistics_for_command_is_needed().
    adefaeff
sql_statistics.cc 122 KB