21 #include "my_global.h"
22 #include "my_pthread.h"
30 THR_LOCK table_file_summary_by_event_name::m_table_lock;
35 { C_STRING_WITH_LEN(
"EVENT_NAME") },
36 { C_STRING_WITH_LEN(
"varchar(128)") },
40 { C_STRING_WITH_LEN(
"COUNT_STAR") },
41 { C_STRING_WITH_LEN(
"bigint(20)") },
45 { C_STRING_WITH_LEN(
"SUM_TIMER_WAIT") },
46 { C_STRING_WITH_LEN(
"bigint(20)") },
50 { C_STRING_WITH_LEN(
"MIN_TIMER_WAIT") },
51 { C_STRING_WITH_LEN(
"bigint(20)") },
55 { C_STRING_WITH_LEN(
"AVG_TIMER_WAIT") },
56 { C_STRING_WITH_LEN(
"bigint(20)") },
60 { C_STRING_WITH_LEN(
"MAX_TIMER_WAIT") },
61 { C_STRING_WITH_LEN(
"bigint(20)") },
67 { C_STRING_WITH_LEN(
"COUNT_READ") },
68 { C_STRING_WITH_LEN(
"bigint(20)") },
72 { C_STRING_WITH_LEN(
"SUM_TIMER_READ") },
73 { C_STRING_WITH_LEN(
"bigint(20)") },
77 { C_STRING_WITH_LEN(
"MIN_TIMER_READ") },
78 { C_STRING_WITH_LEN(
"bigint(20)") },
82 { C_STRING_WITH_LEN(
"AVG_TIMER_READ") },
83 { C_STRING_WITH_LEN(
"bigint(20)") },
87 { C_STRING_WITH_LEN(
"MAX_TIMER_READ") },
88 { C_STRING_WITH_LEN(
"bigint(20)") },
92 { C_STRING_WITH_LEN(
"SUM_NUMBER_OF_BYTES_READ") },
93 { C_STRING_WITH_LEN(
"bigint(20)") },
99 { C_STRING_WITH_LEN(
"COUNT_WRITE") },
100 { C_STRING_WITH_LEN(
"bigint(20)") },
104 { C_STRING_WITH_LEN(
"SUM_TIMER_WRITE") },
105 { C_STRING_WITH_LEN(
"bigint(20)") },
109 { C_STRING_WITH_LEN(
"MIN_TIMER_WRITE") },
110 { C_STRING_WITH_LEN(
"bigint(20)") },
114 { C_STRING_WITH_LEN(
"AVG_TIMER_WRITE") },
115 { C_STRING_WITH_LEN(
"bigint(20)") },
119 { C_STRING_WITH_LEN(
"MAX_TIMER_WRITE") },
120 { C_STRING_WITH_LEN(
"bigint(20)") },
124 { C_STRING_WITH_LEN(
"SUM_NUMBER_OF_BYTES_WRITE") },
125 { C_STRING_WITH_LEN(
"bigint(20)") },
131 { C_STRING_WITH_LEN(
"COUNT_MISC") },
132 { C_STRING_WITH_LEN(
"bigint(20)") },
136 { C_STRING_WITH_LEN(
"SUM_TIMER_MISC") },
137 { C_STRING_WITH_LEN(
"bigint(20)") },
141 { C_STRING_WITH_LEN(
"MIN_TIMER_MISC") },
142 { C_STRING_WITH_LEN(
"bigint(20)") },
146 { C_STRING_WITH_LEN(
"AVG_TIMER_MISC") },
147 { C_STRING_WITH_LEN(
"bigint(20)") },
151 { C_STRING_WITH_LEN(
"MAX_TIMER_MISC") },
152 { C_STRING_WITH_LEN(
"bigint(20)") },
158 table_file_summary_by_event_name::m_field_def=
164 { C_STRING_WITH_LEN(
"file_summary_by_event_name") },
166 &table_file_summary_by_event_name::create,
168 table_file_summary_by_event_name::delete_all_rows,
182 int table_file_summary_by_event_name::delete_all_rows(
void)
189 table_file_summary_by_event_name::table_file_summary_by_event_name()
191 m_pos(1), m_next_pos(1)
204 m_pos.
set_at(&m_next_pos);
209 make_row(file_class);
214 return HA_ERR_END_OF_FILE;
226 make_row(file_class);
230 return HA_ERR_RECORD_DELETED;
237 void table_file_summary_by_event_name::make_row(
PFS_file_class *file_class)
252 int table_file_summary_by_event_name::read_row_values(
TABLE *
table,
259 if (unlikely(!m_row_exists))
260 return HA_ERR_RECORD_DELETED;
263 DBUG_ASSERT(table->s->null_bytes == 0);
265 for (; (f= *fields) ; fields++)
267 if (read_all || bitmap_is_set(table->read_set, f->field_index))
269 switch(f->field_index)