21 #include "my_global.h"
22 #include "my_pthread.h"
32 THR_LOCK table_esgs_global_by_event_name::m_table_lock;
37 { C_STRING_WITH_LEN(
"EVENT_NAME") },
38 { C_STRING_WITH_LEN(
"varchar(128)") },
42 { C_STRING_WITH_LEN(
"COUNT_STAR") },
43 { C_STRING_WITH_LEN(
"bigint(20)") },
47 { C_STRING_WITH_LEN(
"SUM_TIMER_WAIT") },
48 { C_STRING_WITH_LEN(
"bigint(20)") },
52 { C_STRING_WITH_LEN(
"MIN_TIMER_WAIT") },
53 { C_STRING_WITH_LEN(
"bigint(20)") },
57 { C_STRING_WITH_LEN(
"AVG_TIMER_WAIT") },
58 { C_STRING_WITH_LEN(
"bigint(20)") },
62 { C_STRING_WITH_LEN(
"MAX_TIMER_WAIT") },
63 { C_STRING_WITH_LEN(
"bigint(20)") },
69 table_esgs_global_by_event_name::m_field_def=
75 { C_STRING_WITH_LEN(
"events_stages_summary_global_by_event_name") },
77 table_esgs_global_by_event_name::create,
79 table_esgs_global_by_event_name::delete_all_rows,
89 table_esgs_global_by_event_name::create(
void)
95 table_esgs_global_by_event_name::delete_all_rows(
void)
105 table_esgs_global_by_event_name::table_esgs_global_by_event_name()
107 m_row_exists(false), m_pos(1), m_next_pos(1)
126 if (global_instr_class_stages_array == NULL)
127 return HA_ERR_END_OF_FILE;
129 m_pos.
set_at(&m_next_pos);
134 make_row(stage_class);
139 return HA_ERR_END_OF_FILE;
149 if (global_instr_class_stages_array == NULL)
150 return HA_ERR_END_OF_FILE;
155 make_row(stage_class);
159 return HA_ERR_RECORD_DELETED;
163 void table_esgs_global_by_event_name
171 true,
true, & visitor);
183 if (unlikely(! m_row_exists))
184 return HA_ERR_RECORD_DELETED;
187 DBUG_ASSERT(table->s->null_bytes == 0);
189 for (; (f= *fields) ; fields++)
191 if (read_all || bitmap_is_set(table->read_set, f->field_index))
193 switch(f->field_index)
196 m_row.m_event_name.set_field(f);
199 m_row.m_stat.set_field(f->field_index - 1, f);