• unknown's avatar
    Bug#8841 - CHECKSUM TABLE is broken in MyISAM · 08394605
    unknown authored
    There are (at least) two implementations of the checksum
    computation. One is in MyISAM for the quick checksum. It
    is executed on every row change. The other is in the
    SQL layer for the extended checksum. It retrieves all rows
    of a table via the respective storage engine.
    
    In former MySQL versions varchars were stored with their 
    maximum length, but now with their real length similar to
    blobs.
    
    This change had been forgotten to take care of in the
    extended checksum calculation. Hence too much data was
    checksumed. In MyISAM this change had been taken care of 
    already. Only the real data is included in the checksum.
    
    I changed mysql_checksum_table() so that it uses the
    length information of true varchar fields instead
    of the field length like in former varchar 
    implementations.
    
    
    mysql-test/r/innodb.result:
      Bug#8841 - CHECKSUM TABLE is broken in MyISAM
      Fixed test results.
    mysql-test/r/myisam.result:
      Bug#8841 - CHECKSUM TABLE is broken in MyISAM
      Fixed test results.
    sql/sql_table.cc:
      Bug#8841 - CHECKSUM TABLE is broken in MyISAM
      Changed mysql_checksum_table() so that it uses the
      length information of true varchar fields instead
      of the field length like in former varchar 
      implementations.
    08394605
sql_table.cc 127 KB