mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-7004 - Merge scalability fixes from 10.0-power
Preallocate dynamic array on THD mem_root to avoid expensive malloc.
This commit is contained in:
@ -5247,8 +5247,9 @@ update_ref_and_keys(THD *thd, DYNAMIC_ARRAY *keyuse,JOIN_TAB *join_tab,
|
||||
/* set a barrier for the array of SARGABLE_PARAM */
|
||||
(*sargables)[0].field= 0;
|
||||
|
||||
if (my_init_dynamic_array(keyuse,sizeof(KEYUSE),20,64,
|
||||
MYF(MY_THREAD_SPECIFIC)))
|
||||
if (my_init_dynamic_array2(keyuse, sizeof(KEYUSE),
|
||||
thd->alloc(sizeof(KEYUSE) * 20), 20, 64,
|
||||
MYF(MY_THREAD_SPECIFIC)))
|
||||
return TRUE;
|
||||
|
||||
if (cond)
|
||||
|
Reference in New Issue
Block a user