diff options
author | Michael Widenius <monty@askmonty.org> | 2012-08-01 17:27:34 +0300 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2012-08-01 17:27:34 +0300 |
commit | 1d0f70c2f894b27e98773a282871d32802f67964 (patch) | |
tree | 833e683e0ced29c4323c29a9d845703d4dfcd81b /mysys/my_init.c | |
parent | 5a86a61219826aadf8d08cbc447fe438f2bf50c3 (diff) | |
download | mariadb-git-1d0f70c2f894b27e98773a282871d32802f67964.tar.gz |
Temporary commit of merge of MariaDB 10.0-base and MySQL 5.6
Diffstat (limited to 'mysys/my_init.c')
-rw-r--r-- | mysys/my_init.c | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/mysys/my_init.c b/mysys/my_init.c index 193c8281577..324f0f86f4d 100644 --- a/mysys/my_init.c +++ b/mysys/my_init.c @@ -21,6 +21,7 @@ #include <m_string.h> #include <m_ctype.h> #include <signal.h> +#include <mysql/psi/mysql_stage.h> #ifdef __WIN__ #ifdef _MSC_VER #include <locale.h> @@ -442,6 +443,9 @@ static my_bool win32_init_tcp_ip() #ifdef HAVE_PSI_INTERFACE +PSI_stage_info stage_waiting_for_table_level_lock= +{0, "Waiting for table level lock", 0}; + #if !defined(HAVE_PREAD) && !defined(_WIN32) PSI_mutex_key key_my_file_info_mutex; #endif /* !defined(HAVE_PREAD) && !defined(_WIN32) */ @@ -531,30 +535,34 @@ static PSI_file_info all_mysys_files[]= { &key_file_cnf, "cnf", 0} }; +PSI_stage_info *all_mysys_stages[]= +{ + & stage_waiting_for_table_level_lock +}; + void my_init_mysys_psi_keys() { const char* category= "mysys"; int count; - if (PSI_server == NULL) - return; - count= sizeof(all_mysys_mutexes)/sizeof(all_mysys_mutexes[0]); - PSI_server->register_mutex(category, all_mysys_mutexes, count); + mysql_mutex_register(category, all_mysys_mutexes, count); count= sizeof(all_mysys_conds)/sizeof(all_mysys_conds[0]); - PSI_server->register_cond(category, all_mysys_conds, count); + mysql_cond_register(category, all_mysys_conds, count); count= sizeof(all_mysys_rwlocks)/sizeof(all_mysys_rwlocks[0]); - PSI_server->register_rwlock(category, all_mysys_rwlocks, count); + mysql_rwlock_register(category, all_mysys_rwlocks, count); #ifdef USE_ALARM_THREAD count= sizeof(all_mysys_threads)/sizeof(all_mysys_threads[0]); - PSI_server->register_thread(category, all_mysys_threads, count); + mysql_thread_register(category, all_mysys_threads, count); #endif /* USE_ALARM_THREAD */ count= sizeof(all_mysys_files)/sizeof(all_mysys_files[0]); - PSI_server->register_file(category, all_mysys_files, count); + mysql_file_register(category, all_mysys_files, count); + + count= array_elements(all_mysys_stages); + mysql_stage_register(category, all_mysys_stages, count); } #endif /* HAVE_PSI_INTERFACE */ - |