summaryrefslogtreecommitdiff
path: root/sql/lock.cc
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2015-04-15 11:29:01 +0400
committerSergey Vojtovich <svoj@mariadb.org>2015-05-13 10:43:13 +0400
commit55d5af733d97808a1479b185c029ac0121c0f158 (patch)
treeb8cf068171645ffda853e03e631d8d1602047053 /sql/lock.cc
parentc8ad5b2f1223d8bb6edcdcb56317172206c9fd8e (diff)
downloadmariadb-git-55d5af733d97808a1479b185c029ac0121c0f158.tar.gz
MDEV-7945 - THD::enter_stage() takes 0.48% in OLTP RO
THD::enter_stage() optimizations: - stage backup code moved to THD::backup_stage(), saves one condition - moved check for "new_stage" out to callers that actually need it - remnants of enter_stage() moved to sql_class.h so it can be inlined THD::enter_stage() overhead dropped 0.48% -> 0.07%. PROFILING::status_change() optimizations: - "status_arg" is now checked by QUERY_PROFILE::new_status() - no need to check "enabled": !enabled && current is impossible - remnants of status_change() moved to sql_profile.h so it can be inlined PROFILING::status_change() overhead dropped 0.1% -> out of radar.
Diffstat (limited to 'sql/lock.cc')
-rw-r--r--sql/lock.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/lock.cc b/sql/lock.cc
index c241e635e6b..a2f7df04de5 100644
--- a/sql/lock.cc
+++ b/sql/lock.cc
@@ -306,8 +306,8 @@ bool mysql_lock_tables(THD *thd, MYSQL_LOCK *sql_lock, uint flags)
PSI_stage_info org_stage;
DBUG_ENTER("mysql_lock_tables(sql_lock)");
- thd->enter_stage(&stage_system_lock, &org_stage, __func__, __FILE__,
- __LINE__);
+ thd->backup_stage(&org_stage);
+ THD_STAGE_INFO(thd, stage_system_lock);
if (sql_lock->table_count && lock_external(thd, sql_lock->table,
sql_lock->table_count))
goto end;