diff options
author | Sergey Vojtovich <svoj@mariadb.org> | 2015-08-11 11:18:38 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2015-08-21 10:40:39 +0400 |
commit | 31e365efae28ba3208e80511c4d18fe11a79541a (patch) | |
tree | f249682cc42490fc86382f5244a051001dc13c9e /storage/spider | |
parent | 4374da63f03abc472f68f42e4e93261a18bfe417 (diff) | |
download | mariadb-git-31e365efae28ba3208e80511c4d18fe11a79541a.tar.gz |
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.
Diffstat (limited to 'storage/spider')
-rw-r--r-- | storage/spider/spd_sys_table.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/storage/spider/spd_sys_table.cc b/storage/spider/spd_sys_table.cc index 1ff3496d83e..7b996383f95 100644 --- a/storage/spider/spd_sys_table.cc +++ b/storage/spider/spd_sys_table.cc @@ -2390,7 +2390,7 @@ TABLE *spider_mk_sys_tmp_table( goto error_alloc_field; field->init(table); - if (!(i_field = new Item_field((Field *) field))) + if (!(i_field = new Item_field(thd, (Field *) field))) goto error_alloc_item_field; if (i_list.push_back(i_field)) @@ -2443,7 +2443,7 @@ TABLE *spider_mk_sys_tmp_table_for_result( goto error_alloc_field1; field1->init(table); - if (!(i_field1 = new Item_field((Field *) field1))) + if (!(i_field1 = new Item_field(thd, (Field *) field1))) goto error_alloc_item_field1; if (i_list.push_back(i_field1)) @@ -2454,7 +2454,7 @@ TABLE *spider_mk_sys_tmp_table_for_result( goto error_alloc_field2; field2->init(table); - if (!(i_field2 = new Item_field((Field *) field2))) + if (!(i_field2 = new Item_field(thd, (Field *) field2))) goto error_alloc_item_field2; if (i_list.push_back(i_field2)) @@ -2465,7 +2465,7 @@ TABLE *spider_mk_sys_tmp_table_for_result( goto error_alloc_field3; field3->init(table); - if (!(i_field3 = new Item_field((Field *) field3))) + if (!(i_field3 = new Item_field(thd, (Field *) field3))) goto error_alloc_item_field3; if (i_list.push_back(i_field3)) |