diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:00:34 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:00:34 +0000 |
commit | 3f619478f796eddbba6e39502fe941b285dd97b1 (patch) | |
tree | e2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/suite/perfschema/t/server_init.test | |
parent | Initial commit. (diff) | |
download | mariadb-upstream.tar.xz mariadb-upstream.zip |
Adding upstream version 1:10.11.6.upstream/1%10.11.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/suite/perfschema/t/server_init.test')
-rw-r--r-- | mysql-test/suite/perfschema/t/server_init.test | 144 |
1 files changed, 144 insertions, 0 deletions
diff --git a/mysql-test/suite/perfschema/t/server_init.test b/mysql-test/suite/perfschema/t/server_init.test new file mode 100644 index 00000000..ae4f7ac9 --- /dev/null +++ b/mysql-test/suite/perfschema/t/server_init.test @@ -0,0 +1,144 @@ +# Tests for PERFORMANCE_SCHEMA + +--source include/not_embedded.inc +--source include/have_perfschema.inc + +# This test verifies that the mysys and server instruments are properly +# initialized and recorded by the performance schema during the bootstrap +# sequence in mysqld main(). +# Note that some globals mutexes/rwlocks/conds that depend on #ifdef options +# or runtime options are not tested here, to have a predictable result. + +use performance_schema; + +# Verify that these global mutexes have been properly initilized in mysys + +select count(name) from mutex_instances + where name like "wait/synch/mutex/mysys/THR_LOCK_malloc"; + +select count(name) from mutex_instances + where name like "wait/synch/mutex/mysys/THR_LOCK_open"; + +select count(name) from mutex_instances + where name like "wait/synch/mutex/mysys/THR_LOCK_myisam"; + +select count(name) from mutex_instances + where name like "wait/synch/mutex/mysys/THR_LOCK_heap"; + +select count(name) from mutex_instances + where name like "wait/synch/mutex/mysys/THR_LOCK_net"; + +select count(name) from mutex_instances + where name like "wait/synch/mutex/mysys/THR_LOCK_charset"; + +# There are no global rwlock in mysys + +# There are no global conditions in mysys +# (THR_COND_threads is only present in debug builds + +# Verify that these global mutexes have been properly initilized in sql + +select count(name) from mutex_instances + where name like "wait/synch/mutex/sql/LOCK_thread_count"; + +select count(name) from mutex_instances + where name like "wait/synch/mutex/sql/LOCK_log_throttle_qni"; + +select count(name) from mutex_instances + where name like "wait/synch/mutex/sql/LOCK_status"; + +select count(name) from mutex_instances + where name like "wait/synch/mutex/sql/LOCK_uuid_generator"; + +select count(name) from mutex_instances + where name like "wait/synch/mutex/sql/LOCK_crypt"; + +select count(name) from mutex_instances + where name like "wait/synch/mutex/sql/LOCK_active_mi"; + +select count(name) from mutex_instances + where name like "wait/synch/mutex/sql/LOCK_manager"; + +select count(name) from mutex_instances + where name like "wait/synch/mutex/sql/LOCK_global_system_variables"; + +select count(name) from mutex_instances + where name like "wait/synch/mutex/sql/LOCK_user_conn"; + +select count(name) from mutex_instances + where name like "wait/synch/mutex/sql/LOCK_prepared_stmt_count"; + +select count(name) from mutex_instances + where name like "wait/synch/mutex/sql/LOCK_server_started"; + +# LOG_INFO object are created on demand, and are not global. +# select count(name) from mutex_instances +# where name like "wait/synch/mutex/sql/LOG_INFO::lock"; + +select count(name) from mutex_instances + where name like "wait/synch/mutex/sql/Query_cache::structure_guard_mutex"; + +# The event scheduler may be disabled +# select count(name) from mutex_instances +# where name like "wait/synch/mutex/sql/Event_scheduler::LOCK_scheduler_state"; + +select count(name) from mutex_instances + where name like "wait/synch/mutex/sql/LOCK_event_queue"; + +select count(name) from mutex_instances + where name like "wait/synch/mutex/sql/LOCK_item_func_sleep"; + +select count(name) from mutex_instances + where name like "wait/synch/mutex/sql/LOCK_audit_mask"; + +select count(name) from mutex_instances + where name like "wait/synch/mutex/sql/LOCK_plugin"; + +# Not a global variable, may be destroyed already. +# select count(name) from mutex_instances +# where name like "wait/synch/mutex/sql/LOCK_gdl"; + +select count(name) from mutex_instances + where name like "wait/synch/mutex/sql/tz_LOCK"; + +# Verify that these global rwlocks have been properly initilized in sql + +select count(name) from rwlock_instances + where name like "wait/synch/rwlock/sql/LOCK_sys_init_connect"; + +select count(name) from rwlock_instances + where name like "wait/synch/rwlock/sql/LOCK_sys_init_slave"; + +select count(name) from rwlock_instances + where name like "wait/synch/rwlock/sql/LOCK_system_variables_hash"; + +# Verify that these global conditions have been properly initilized in sql + +select count(name) from cond_instances + where name like "wait/synch/cond/sql/COND_server_started"; + +select count(name) from cond_instances + where name like "wait/synch/cond/sql/COND_refresh"; + +select count(name) from cond_instances + where name like "wait/synch/cond/sql/COND_thread_count"; + +select count(name) from cond_instances + where name like "wait/synch/cond/sql/COND_manager"; + +select count(name) from cond_instances + where name like "wait/synch/cond/sql/COND_thread_cache"; + +select count(name) from cond_instances + where name like "wait/synch/cond/sql/COND_flush_thread_cache"; + +select count(name) from cond_instances + where name like "wait/synch/cond/sql/Query_cache::COND_cache_status_changed"; + +# The event scheduler may be disabled +# select count(name) from cond_instances +# where name like "wait/synch/cond/sql/Event_scheduler::COND_state"; + +select count(name) from cond_instances + where name like "wait/synch/cond/sql/COND_queue_state"; + |