summaryrefslogtreecommitdiff
path: root/sql/lock.cc
diff options
context:
space:
mode:
authorMichael Widenius <monty@mariadb.org>2015-01-18 13:39:59 +0200
committerMichael Widenius <monty@mariadb.org>2015-01-18 13:39:59 +0200
commit32be7dffbe7c9bf5c65210e2775e6e2d3d6d411e (patch)
treed214cee4aee8bc7aa67ce6f041ef991d336adf48 /sql/lock.cc
parentc11a054a98f72bac2334c8c6b0b66feb94e8248f (diff)
downloadmariadb-git-32be7dffbe7c9bf5c65210e2775e6e2d3d6d411e.tar.gz
Return to original stage after mysql_lock_tables
Stage "Filling schema table" is now properly shown in 'show processlist' mysys/mf_keycache.c: Simple cleanup with more comments sql/lock.cc: Return to original stage after mysql_lock_tables Made 'Table lock' as a true stage sql/sql_show.cc: Restore original stage after get_schema_tables_result
Diffstat (limited to 'sql/lock.cc')
-rw-r--r--sql/lock.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/sql/lock.cc b/sql/lock.cc
index fbed8d8331c..e713990bd58 100644
--- a/sql/lock.cc
+++ b/sql/lock.cc
@@ -301,15 +301,16 @@ bool mysql_lock_tables(THD *thd, MYSQL_LOCK *sql_lock, uint flags)
int rc= 1;
ulong timeout= (flags & MYSQL_LOCK_IGNORE_TIMEOUT) ?
LONG_TIMEOUT : thd->variables.lock_wait_timeout;
-
+ PSI_stage_info org_stage;
DBUG_ENTER("mysql_lock_tables(sql_lock)");
- THD_STAGE_INFO(thd, stage_system_lock);
+ thd->enter_stage(&stage_system_lock, &org_stage, __func__, __FILE__,
+ __LINE__);
if (sql_lock->table_count && lock_external(thd, sql_lock->table,
sql_lock->table_count))
goto end;
- thd_proc_info(thd, "Table lock");
+ THD_STAGE_INFO(thd, stage_table_lock);
/* Copy the lock data array. thr_multi_lock() reorders its contents. */
memmove(sql_lock->locks + sql_lock->lock_count, sql_lock->locks,
@@ -323,7 +324,7 @@ bool mysql_lock_tables(THD *thd, MYSQL_LOCK *sql_lock, uint flags)
(void) unlock_external(thd, sql_lock->table, sql_lock->table_count);
end:
- THD_STAGE_INFO(thd, stage_after_table_lock);
+ THD_STAGE_INFO(thd, org_stage);
if (thd->killed)
{