• marko's avatar
    branches/zip: When the server crashes while freeing an externally stored · 8ec95fc7
    marko authored
    column of a compressed table, the BTR_EXTERN_LEN field in the BLOB pointer
    will be written as 0.  Tolerate this in the functions that deal with
    externally stored columns.  This fixes Issue #80 and was posted at rb://26.
    
    Note that the clustered index record is always deleted or purged last,
    after any secondary index records referring to it have been deleted.
    
    btr_free_externally_stored_field(): On an uncompressed table, zero out
    the BTR_EXTERN_LEN, so that half-deleted BLOBs can be detected after
    crash recovery.
    
    btr_copy_externally_stored_field_prefix(): Return 0 if the BLOB has been
    half-deleted.
    
    row_upd_ext_fetch(): Assert that the externally stored column exists.
    
    row_ext_cache_fill(): Allow btr_copy_externally_stored_field_prefix()
    to return 0.
    
    row_sel_sec_rec_is_for_blob(): Return FALSE if the BLOB has been half-deleted.
    This is correct, because the clustered index record would have been deleted
    or purged last, after any secondary index records referring to it had been
    deleted.
    8ec95fc7
btr0cur.c 129 KB