mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-8010 - Avoid sql_alloc() in Items (Patch #1)
Added mandatory thd parameter to Item (and all derivative classes) constructor. Added thd parameter to all routines that may create items. Also removed "current_thd" from Item::Item. This reduced number of pthread_getspecific() calls from 290 to 177 per OLTP RO transaction.
This commit is contained in:
@@ -7039,7 +7039,7 @@ SEL_TREE *Item_func_in::get_func_mm_tree(RANGE_OPT_PARAM *param,
|
||||
per-statement mem_root (while thd->mem_root is currently pointing
|
||||
to mem_root local to range optimizer).
|
||||
*/
|
||||
Item *value_item= array->create_item();
|
||||
Item *value_item= array->create_item(param->thd);
|
||||
param->thd->mem_root= tmp_root;
|
||||
|
||||
if (array->count > NOT_IN_IGNORE_THRESHOLD || !value_item)
|
||||
|
Reference in New Issue
Block a user