• istruewing@stella.local's avatar
    Bug#33222 - myisam-table drops rows when column is added · f126800b
    istruewing@stella.local authored
               and a char-field > 128 exists
    
    CHECK TABLE (non-QUICK) and any form of repair table did wrongly rate
    records as corrupted under the following conditions:
    1. The table has dynamic row format and
    2. it has a CHAR like column > 127 bytes (but not VARCHAR)
       (for multi-byte character sets this could be less than 127
       characters) and
    3. it has records with > 127 bytes significant length in that column
       (a byte beyond byte position 127 must be non-space).
    Affected were the statements CHECK TABLE, REPAIR TABLE, OPTIMIZE TABLE,
    ALTER TABLE. CHECK TABLE reported and marked the table as crashed if any
    record was present that fulfilled condition 3. The other statements
    deleted these records.
    
    The problem was a signed/unsigned compare in MyISAM code. A
    char to uchar change became necessary after the big byte to uchar
    change.
    f126800b
mi_dynrec.c 55.4 KB