mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
MDEV-34919 Aria crashes with high-level (vector) indexes
Since high-level index tables do not participate in thr_multi_lock(), added explicit call to THR_LOCK::start_trans(). This is needed mostly for Aria to handle transaction logging.
This commit is contained in:
committed by
Sergei Golubchik
parent
72839c1435
commit
1cc7ef52e3
@@ -9896,8 +9896,21 @@ int TABLE::hlindex_open(uint nr)
|
||||
return 0;
|
||||
hlindex->in_use= in_use; // mark in use for this query
|
||||
hlindex->use_all_columns();
|
||||
return hlindex->file->ha_external_lock(in_use,
|
||||
reginfo.lock_type < TL_FIRST_WRITE ? F_RDLCK : F_WRLCK);
|
||||
|
||||
int res= hlindex->file->ha_external_lock(in_use,
|
||||
reginfo.lock_type < TL_FIRST_WRITE ? F_RDLCK : F_WRLCK);
|
||||
/*
|
||||
This code is here mostly for Aria. It requires start_trans() call to handle
|
||||
transaction logging.
|
||||
*/
|
||||
if (res == 0 && hlindex->file->lock_count() == 1)
|
||||
{
|
||||
THR_LOCK_DATA *lock_data;
|
||||
hlindex->file->store_lock(in_use, &lock_data, TL_IGNORE);
|
||||
if (lock_data->lock->start_trans)
|
||||
lock_data->lock->start_trans(lock_data->status_param);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
int TABLE::open_hlindexes_for_write()
|
||||
|
Reference in New Issue
Block a user