21 #include "my_global.h"
22 #include "my_pthread.h"
27 THR_LOCK table_performance_timers::m_table_lock;
32 { C_STRING_WITH_LEN(
"TIMER_NAME") },
33 { C_STRING_WITH_LEN(
"enum(\'CYCLE\',\'NANOSECOND\',\'MICROSECOND\',"
34 "\'MILLISECOND\',\'TICK\')") },
38 { C_STRING_WITH_LEN(
"TIMER_FREQUENCY") },
39 { C_STRING_WITH_LEN(
"bigint(20)") },
43 { C_STRING_WITH_LEN(
"TIMER_RESOLUTION") },
44 { C_STRING_WITH_LEN(
"bigint(20)") },
48 { C_STRING_WITH_LEN(
"TIMER_OVERHEAD") },
49 { C_STRING_WITH_LEN(
"bigint(20)") },
55 table_performance_timers::m_field_def=
61 { C_STRING_WITH_LEN(
"performance_timers") },
63 &table_performance_timers::create,
79 table_performance_timers::table_performance_timers()
81 m_row(NULL), m_pos(0), m_next_pos(0)
86 m_data[
index].m_timer_name= TIMER_NAME_CYCLE;
90 m_data[
index].m_timer_name= TIMER_NAME_NANOSEC;
94 m_data[
index].m_timer_name= TIMER_NAME_MICROSEC;
98 m_data[
index].m_timer_name= TIMER_NAME_MILLISEC;
102 m_data[
index].m_timer_name= TIMER_NAME_TICK;
116 m_pos.
set_at(&m_next_pos);
118 if (m_pos.
m_index < COUNT_TIMER_NAME)
127 result= HA_ERR_END_OF_FILE;
136 DBUG_ASSERT(m_pos.
m_index < COUNT_TIMER_NAME);
151 DBUG_ASSERT(table->s->null_bytes == 1);
154 for (; (f= *fields) ; fields++)
156 if (read_all || bitmap_is_set(table->read_set, f->field_index))
158 switch(f->field_index)