• Nikita Malyavin's avatar
    MDEV-18366 Crash on SELECT on a table with indexed virtual columns · a3d66090
    Nikita Malyavin authored
    The problem was in improper error handling behavior in
    `row_upd_build_difference_binary`:
    `innobase_free_row_for_vcol` wasn't called.
    
    To eliminate this problem in all potential places, a refactoring has been
    made:
    * class ib_vcol_row is added. It owns VCOL_STORAGE and heap and maintains
     it in RAII manner
    * all innobase_allocate_row_for_vcol/innobase_free_row_for_vcol pairs are
     substituted
     with ib_vcol_row usage
    * row_merge_buf_add is only left untouched because it doesn't own vheap
     passed as an argument
    * innobase_allocate_row_for_vcol does not allocate VCOL_STORAGE anymore and
     accepts it as an argument -- this reduces a number of memory allocations
     * move rec_printer out of `#ifndef DBUG_OFF` and mark it cold
    a3d66090
innodb_virtual_index.test 9.05 KB