summaryrefslogtreecommitdiff
path: root/mysql-test/suite/perfschema/t/server_init.test
blob: 36e09adea782573e537ab54f9a1c123ebd32f57a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
# 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_threads";

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

# Verify that these global conditions have been properly initilized in mysys

select count(name) from cond_instances
 where name like "wait/synch/cond/mysys/THR_COND_threads";

# 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_error_log";

select count(name) from mutex_instances
 where name like "wait/synch/mutex/sql/LOCK_delayed_insert";

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_delayed_status";

select count(name) from mutex_instances
 where name like "wait/synch/mutex/sql/LOCK_delayed_create";

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_connection_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_user_locks";

select count(name) from mutex_instances
 where name like "wait/synch/mutex/sql/Cversion_lock";

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_grant";

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";