• Sergey Vojtovich's avatar
    BUG#51307 - widespread corruption with partitions and · 1613b3e1
    Sergey Vojtovich authored
                insert...select
    
    Queries following bulk insert into an empty MyISAM table
    may break it. This was pure MyISAM problem.
    
    When bulk insert into an empty table is complete, MyISAM
    may want to enable indexes via repair by sort. If repair
    by sort fails (e.g. insufficient buffer), MyISAM failover
    to repair with key cache, requesting repair of data file.
    
    Repair of data file performs data file substitution. This
    means that current table instance will point to new data
    file. Other cached table instances are still pointing to
    an old, deleted data file.
    
    This is fixed by not requesting repair of data file
    during enable indexes.
    
    Explicit REPAIR is not affected, since it flushes all
    table instances.
    1613b3e1
myisam.test 60.6 KB