diff options
author | Sergei Golubchik <serg@mariadb.org> | 2018-11-03 21:17:17 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2018-11-04 08:12:28 +0100 |
commit | af9649c722810eb1754953eb406a84ec876ce693 (patch) | |
tree | 20089193150bac2119ca6a0a8a31c7e92321241f /sql/table.h | |
parent | 8a346f31b913daa011085afec2b2d38450c73e00 (diff) | |
download | mariadb-git-af9649c722810eb1754953eb406a84ec876ce693.tar.gz |
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[].
Diffstat (limited to 'sql/table.h')
-rw-r--r-- | sql/table.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/table.h b/sql/table.h index 33b921cd946..4cd5c3ba5f3 100644 --- a/sql/table.h +++ b/sql/table.h @@ -695,6 +695,9 @@ struct TABLE_SHARE uint column_bitmap_size; uchar frm_version; + enum enum_v_keys { NOT_INITIALIZED=0, NO_V_KEYS, V_KEYS }; + enum_v_keys check_set_initialized; + bool use_ext_keys; /* Extended keys can be used */ bool null_field_first; bool system; /* Set if system table (one record) */ @@ -705,7 +708,6 @@ struct TABLE_SHARE bool table_creation_was_logged; bool non_determinstic_insert; bool vcols_need_refixing; - bool check_set_initialized; bool has_update_default_function; ulong table_map_id; /* for row-based replication */ |