• Nikita Malyavin's avatar
    Add DBUG_ASSERT in Field::ptr_in_record · 30894fe9
    Nikita Malyavin authored
    1. Subtracting table->record[0] from record is UB (non-contiguous buffers)
    2. It is very popular to use move_field_offset, which changes Field::ptr,
    but leaves table->record[0] unchanged. This makes a ptr_in_record result
    incorrect, since it relies on table->record[0] value.
    The check ensures the result is within the queried record boundaries.
    30894fe9
field.h 209 KB