summaryrefslogtreecommitdiff
path: root/sql/sql_base.cc
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2015-06-17 13:09:22 +0400
committerSergey Vojtovich <svoj@mariadb.org>2015-06-19 15:06:34 +0400
commit12d9fe14bea38eaa2ff0f5edeea22d4c7a5debed (patch)
tree330f309dd955bfec99f6e3131f846b67586dcf9e /sql/sql_base.cc
parent8f603bcbcac4a9091b6adbca3fd3655a947e759a (diff)
downloadmariadb-git-12d9fe14bea38eaa2ff0f5edeea22d4c7a5debed.tar.gz
MDEV-7956 - handler::rebind_psi() takes 0.07% in OLTP RO
Do not call handler::rebind_psi() and handler::unbind_psi() when performance schema is compiled out. Overhead change: handler::rebind_psi 0.04% -> out of radar handler::unbind_psi 0.03% -> out of radar open_table 0.21% -> 0.18% close_thread_table 0.05% -> 0.05%
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r--sql/sql_base.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 96d317e2b57..848020c1846 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -1100,7 +1100,7 @@ void close_thread_table(THD *thd, TABLE **table_ptr)
critical section.
*/
if (table->file != NULL)
- table->file->unbind_psi();
+ MYSQL_UNBIND_TABLE(table->file);
tc_release_table(table);
DBUG_VOID_RETURN;
@@ -1635,8 +1635,8 @@ use_temporary_table(THD *thd, TABLE *table, TABLE **out_table)
thread to another, we need to let the performance schema know that,
for aggregates per thread to work properly.
*/
- table->file->unbind_psi();
- table->file->rebind_psi();
+ MYSQL_UNBIND_TABLE(table->file);
+ MYSQL_REBIND_TABLE(table->file);
}
#endif
}
@@ -2530,7 +2530,7 @@ retry_share:
if (table)
{
DBUG_ASSERT(table->file != NULL);
- table->file->rebind_psi();
+ MYSQL_REBIND_TABLE(table->file);
}
else
{