21 #include "my_global.h"
22 #include "my_pthread.h"
31 THR_LOCK table_setup_instruments::m_table_lock;
36 { C_STRING_WITH_LEN(
"NAME") },
37 { C_STRING_WITH_LEN(
"varchar(128)") },
41 { C_STRING_WITH_LEN(
"ENABLED") },
42 { C_STRING_WITH_LEN(
"enum(\'YES\',\'NO\')") },
46 { C_STRING_WITH_LEN(
"TIMED") },
47 { C_STRING_WITH_LEN(
"enum(\'YES\',\'NO\')") },
53 table_setup_instruments::m_field_def=
59 { C_STRING_WITH_LEN(
"setup_instruments") },
61 &table_setup_instruments::create,
77 table_setup_instruments::table_setup_instruments()
94 return HA_ERR_END_OF_FILE;
96 for (m_pos.
set_at(&m_next_pos);
97 m_pos.has_more_view();
102 case pos_setup_instruments::VIEW_MUTEX:
105 case pos_setup_instruments::VIEW_RWLOCK:
108 case pos_setup_instruments::VIEW_COND:
111 case pos_setup_instruments::VIEW_THREAD:
114 case pos_setup_instruments::VIEW_FILE:
117 case pos_setup_instruments::VIEW_TABLE:
118 instr_class= find_table_class(m_pos.
m_index_2);
120 case pos_setup_instruments::VIEW_STAGE:
123 case pos_setup_instruments::VIEW_STATEMENT:
126 case pos_setup_instruments::VIEW_SOCKET:
129 case pos_setup_instruments::VIEW_IDLE:
130 instr_class= find_idle_class(m_pos.
m_index_2);
135 make_row(instr_class);
141 return HA_ERR_END_OF_FILE;
150 return HA_ERR_END_OF_FILE;
156 case pos_setup_instruments::VIEW_MUTEX:
159 case pos_setup_instruments::VIEW_RWLOCK:
162 case pos_setup_instruments::VIEW_COND:
165 case pos_setup_instruments::VIEW_THREAD:
168 case pos_setup_instruments::VIEW_FILE:
171 case pos_setup_instruments::VIEW_TABLE:
172 instr_class= find_table_class(m_pos.
m_index_2);
174 case pos_setup_instruments::VIEW_STAGE:
177 case pos_setup_instruments::VIEW_STATEMENT:
180 case pos_setup_instruments::VIEW_SOCKET:
183 case pos_setup_instruments::VIEW_IDLE:
184 instr_class= find_idle_class(m_pos.
m_index_2);
189 make_row(instr_class);
193 return HA_ERR_RECORD_DELETED;
208 DBUG_ASSERT(table->s->null_bytes == 0);
215 for (; (f= *fields) ; fields++)
217 if (read_all || bitmap_is_set(table->read_set, f->field_index))
219 switch(f->field_index)
240 const unsigned char *,
247 for (; (f= *fields) ; fields++)
249 if (bitmap_is_set(table->write_set, f->field_index))
251 switch(f->field_index)
254 return HA_ERR_WRONG_COMMAND;
271 case pos_setup_instruments::VIEW_MUTEX:
274 case pos_setup_instruments::VIEW_RWLOCK:
277 case pos_setup_instruments::VIEW_COND:
280 case pos_setup_instruments::VIEW_THREAD:
283 case pos_setup_instruments::VIEW_FILE:
286 case pos_setup_instruments::VIEW_TABLE:
289 case pos_setup_instruments::VIEW_STAGE:
290 case pos_setup_instruments::VIEW_STATEMENT:
293 case pos_setup_instruments::VIEW_SOCKET:
296 case pos_setup_instruments::VIEW_IDLE: