Skip to content

Commit e05e6ab

Browse files
committed
bugfix: cannot access shared MEM_ROOT without a lock
1 parent 9ef20ac commit e05e6ab

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

sql/sql_base.cc

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9916,13 +9916,10 @@ int TABLE::hlindex_open(uint nr)
99169916
s->lock_share();
99179917
if (!s->hlindex)
99189918
{
9919-
s->unlock_share();
9920-
TABLE_SHARE *share;
9921-
char *path= NULL;
99229919
size_t path_len= s->normalized_path.length + HLINDEX_BUF_LEN;
9923-
9924-
share= (TABLE_SHARE*)alloc_root(&s->mem_root, sizeof(*share));
9925-
path= (char*)alloc_root(&s->mem_root, path_len);
9920+
TABLE_SHARE *share= (TABLE_SHARE*)alloc_root(&s->mem_root, sizeof *share);
9921+
char *path= (char*)alloc_root(&s->mem_root, path_len);
9922+
s->unlock_share();
99269923
if (!share || !path)
99279924
return 1;
99289925

0 commit comments

Comments
 (0)