• Sergey Vojtovich's avatar
    BUG#49628 - corrupt table after legal SQL, LONGTEXT column · 62933c50
    Sergey Vojtovich authored
    Bulk REPLACE or bulk INSERT ... ON DUPLICATE KEY UPDATE may
    break dynamic record MyISAM table.
    
    The problem is limited to bulk REPLACE and INSERT ... ON
    DUPLICATE KEY UPDATE, because only these operations may
    be done via UPDATE internally and may request write cache.
    
    When flushing write cache, MyISAM may write remaining
    cached data at wrong position. Fixed by requesting write
    cache to seek to a correct position.
    
    mysql-test/r/myisam.result:
      A test case for BUG#49628.
    mysql-test/t/myisam.test:
      A test case for BUG#49628.
    storage/myisam/mi_dynrec.c:
      delete_dynamic_record() may change data file position.
      IO cache must be notified as it may still have cached
      data, which has to be flushed later.
    62933c50
myisam.result 80.5 KB