mirror of
https://github.com/MariaDB/server.git
synced 2025-02-07 06:12:18 +01:00
af9649c722
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[].
16 lines
399 B
Text
16 lines
399 B
Text
create table t1 (f text, vf tinytext as (f), key (vf(64))) engine=innodb;
|
|
insert t1 (f) values ('foo');
|
|
flush tables;
|
|
connect con1,localhost,root,,test;
|
|
set debug_sync='TABLE_after_field_clone WAIT_FOR go';
|
|
delete from t1;
|
|
connection default;
|
|
select * from t1;
|
|
f vf
|
|
foo foo
|
|
set debug_sync='now SIGNAL go';
|
|
connection con1;
|
|
disconnect con1;
|
|
connection default;
|
|
drop table t1;
|
|
set debug_sync='reset';
|