• Sergei Petrunia's avatar
    MDEV-31199: Assertion `field->table->stats_is_read' fails with hash_join_cardinality=on · a24f2bb5
    Sergei Petrunia authored
    Derived table creation code would call Field::make_new_field() which would
    memcpy the Field object from the source table, including Field::read_stats.
    
    But the temp. table as a whole had table->stats_is_read=false. Which was
    correct but not consistent with Field::read_stats and caused an assertion.
    
    Fixed by making sure that Field::read_stats=NULL for fields in the new
    temporary (i.e. work) tables.
    a24f2bb5
selectivity_no_engine.result 15.9 KB