• Sergei Golubchik's avatar
    MDEV-17349 Assertion `!table || (!table->read_set ||... · af9649c7
    Sergei Golubchik authored
    MDEV-17349 Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index))' failed on concurrent SELECT and DELETE after RENAME from table with index on virtual column
    
    Race condition. field->flags were copied from s->field->flags during
    field->clone(), early in open_table_from_share(). But s->field->flags
    were getting their PART_INDIRECT_KEY_FLAG bit much later in
    TABLE::mark_columns_used_by_virtual_fields() and only once per share.
    
    If two threads were executing the code between field->clone()
    and mark_columns_used_by_virtual_fields() at the same time, only
    one would get PART_INDIRECT_KEY_FLAG bits in field[].
    af9649c7
table.h 89.8 KB