• Sergei Golubchik's avatar
    MDEV-28020 CHECKSUM TABLE calculates different checksums · 39990135
    Sergei Golubchik authored
    Two bugs here:
    
    1. CHECKSUM TABLE asserted that all fields in the table are arranged
       sequentially in the record, but virtual columns are always at the
       end, violating this assertion
    2. virtual columns were not calculated for CHECKSUM, so CHECKSUM
       was using, essentially, garbage left from the previous statement.
       (that's why the test must use INSERT IGNORE to have this "previous
       statement" mark vcols not null)
    
    Fix: don't include virtual columns into the table CHECKSUM. Indeed,
    they cannot be included as the engine does not see virtual columns,
    so in-engine checksum cannot include them, meaning in-server checksum
    should not either
    39990135
sql_table.cc 363 KB