Skip to content
  • Vasil Dimov's avatar
    20697efb
    During stats rename try to delete the existent rows if UPDATE · 20697efb
    Vasil Dimov authored
    returns a duplicate key error and retry the operation a few
    times because transactions with trx->mysql_thd == NULL are not
    allowed to wait and could easily get lock wait timeout.
    
    Overwriting existent rows in the stats tables during rename is important
    because ALTER table that recreates the table will fail to rename the stats
    properly. Internally InnoDB sees a new (temp) table being created and later
    renamed to the real table, while the real table's stats are still in the
    stats tables.
    20697efb
    During stats rename try to delete the existent rows if UPDATE
    Vasil Dimov authored
    returns a duplicate key error and retry the operation a few
    times because transactions with trx->mysql_thd == NULL are not
    allowed to wait and could easily get lock wait timeout.
    
    Overwriting existent rows in the stats tables during rename is important
    because ALTER table that recreates the table will fail to rename the stats
    properly. Internally InnoDB sees a new (temp) table being created and later
    renamed to the real table, while the real table's stats are still in the
    stats tables.
Loading