diff options
author | Sergey Vojtovich <svoj@mariadb.org> | 2015-04-22 13:29:56 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2015-05-13 15:56:56 +0400 |
commit | b22959903b89e798f8804ec9a815c88f75915cd9 (patch) | |
tree | 8b3443332de3bea57ced828a7932ade4add36ce0 /sql/sql_cursor.cc | |
parent | 8345bc692192788c25ec004134a3a095437aeb1c (diff) | |
download | mariadb-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_cursor.cc')
-rw-r--r-- | sql/sql_cursor.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/sql_cursor.cc b/sql/sql_cursor.cc index a7dcc77f26c..912f6d97519 100644 --- a/sql/sql_cursor.cc +++ b/sql/sql_cursor.cc @@ -71,8 +71,8 @@ class Select_materialize: public select_union select_result *result; /**< the result object of the caller (PS or SP) */ public: Materialized_cursor *materialized_cursor; - Select_materialize(select_result *result_arg) - :result(result_arg), materialized_cursor(0) {} + Select_materialize(THD *thd_arg, select_result *result_arg): + select_union(thd_arg), result(result_arg), materialized_cursor(0) {} virtual bool send_result_set_metadata(List<Item> &list, uint flags); }; @@ -104,7 +104,7 @@ int mysql_open_cursor(THD *thd, select_result *result, LEX *lex= thd->lex; int rc; - if (! (result_materialize= new (thd->mem_root) Select_materialize(result))) + if (!(result_materialize= new (thd->mem_root) Select_materialize(thd, result))) return 1; save_result= lex->result; |