summaryrefslogtreecommitdiff
path: root/sql/sql_update.cc
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2015-04-22 13:29:56 +0400
committerSergey Vojtovich <svoj@mariadb.org>2015-05-13 15:56:56 +0400
commitb22959903b89e798f8804ec9a815c88f75915cd9 (patch)
tree8b3443332de3bea57ced828a7932ade4add36ce0 /sql/sql_update.cc
parent8345bc692192788c25ec004134a3a095437aeb1c (diff)
downloadmariadb-git-b22959903b89e798f8804ec9a815c88f75915cd9.tar.gz
MDEV-7943 - pthread_getspecific() takes 0.76% in OLTP RO
Added THD argument to select_result and all derivative classes. This reduces number of pthread_getspecific calls from 796 to 776 per OLTP RO transaction.
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r--sql/sql_update.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index 890e72f3314..37ad416f910 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -1571,7 +1571,7 @@ bool mysql_multi_update(THD *thd,
bool res;
DBUG_ENTER("mysql_multi_update");
- if (!(*result= new multi_update(table_list,
+ if (!(*result= new (thd->mem_root) multi_update(thd, table_list,
&thd->lex->select_lex.leaf_tables,
fields, values,
handle_duplicates, ignore)))
@@ -1605,12 +1605,13 @@ bool mysql_multi_update(THD *thd,
}
-multi_update::multi_update(TABLE_LIST *table_list,
+multi_update::multi_update(THD *thd_arg, TABLE_LIST *table_list,
List<TABLE_LIST> *leaves_list,
List<Item> *field_list, List<Item> *value_list,
enum enum_duplicates handle_duplicates_arg,
- bool ignore_arg)
- :all_tables(table_list), leaves(leaves_list), update_tables(0),
+ bool ignore_arg):
+ select_result_interceptor(thd_arg),
+ all_tables(table_list), leaves(leaves_list), update_tables(0),
tmp_tables(0), updated(0), found(0), fields(field_list),
values(value_list), table_count(0), copy_field(0),
handle_duplicates(handle_duplicates_arg), do_update(1), trans_safe(1),