• Nikita Malyavin's avatar
    MDEV-30945 RPL tests are failing with MSAN use-of-uninitialized-value · 0775c7bd
    Nikita Malyavin authored
    ...in bitmap_intersect
    
    m_cols_ai was accessed during the Delete event, however this field is only
    related to Updates.
    
    Moving it to Update_rows_event would require too much effort. So instead:
    * Only access m_cols_ai in Update events (conditional branch is added in
      Rows_log_event::do_add_row_data)
    * Clean up m_cols_ai operations in Rows_log_event constructor.
      m_cols_ai.bitmap is first set to NULL, indicating invalid event.
      Then it is initialized:
      -> For Update events, a new bitmap is created.
      -> For other events, debug mode, m_cols_ai.bitmap is set to 1, indicating
         that the value is correct, but it shouldn't be accessed. To make sure
         we'll have a failure, n_bits is also set to 1.
      -> In release mode, m_cols_ai mirrors m_cols, providing extra safety
         in production.
    0775c7bd
log_event.cc 125 KB