• unknown's avatar
    Bug#26464 - insert delayed + update + merge = corruption · da9c659c
    unknown authored
    Using INSERT DELAYED on MERGE tables could lead to table
    corruptions.
    
    The manual lists a couple of storage engines, which can be
    used with INSERT DELAYED. MERGE is not in this list.
    
    The attempt to try it anyway has not been rejected yet.
    This bug was not detected earlier as it can work under
    special circumstances. Most notable is low concurrency.
    
    To be safe, this patch rejects any attempt to use INSERT
    DELAYED on MERGE tables.
    
    
    mysql-test/r/merge.result:
      Bug#26464 - insert delayed + update + merge = corruption
      Added test result.
    mysql-test/t/merge.test:
      Bug#26464 - insert delayed + update + merge = corruption
      Added test.
    sql/ha_myisammrg.h:
      Bug#26464 - insert delayed + update + merge = corruption
      Removed HA_CAN_INSERT_DELAYED flag from table_flags().
      The insert delayed thread upgrades the lock from the first
      entry in MYSQL_LOCK::locks only. Hence it is incapable to
      handle MERGE tables, which have as many entries in this
      array as they have MyISAM sub-tables.
    da9c659c
ha_myisammrg.h 3.31 KB