21 #include "my_global.h"
22 #include "my_pthread.h"
28 #define COUNT_SETUP_CONSUMERS 12
32 { C_STRING_WITH_LEN(
"events_stages_current") },
37 { C_STRING_WITH_LEN(
"events_stages_history") },
42 { C_STRING_WITH_LEN(
"events_stages_history_long") },
47 { C_STRING_WITH_LEN(
"events_statements_current") },
52 { C_STRING_WITH_LEN(
"events_statements_history") },
57 { C_STRING_WITH_LEN(
"events_statements_history_long") },
62 { C_STRING_WITH_LEN(
"events_waits_current") },
67 { C_STRING_WITH_LEN(
"events_waits_history") },
72 { C_STRING_WITH_LEN(
"events_waits_history_long") },
77 { C_STRING_WITH_LEN(
"global_instrumentation") },
82 { C_STRING_WITH_LEN(
"thread_instrumentation") },
87 { C_STRING_WITH_LEN(
"statements_digest") },
88 &flag_statements_digest,
93 THR_LOCK table_setup_consumers::m_table_lock;
98 { C_STRING_WITH_LEN(
"NAME") },
99 { C_STRING_WITH_LEN(
"varchar(64)") },
103 { C_STRING_WITH_LEN(
"ENABLED") },
104 { C_STRING_WITH_LEN(
"enum(\'YES\',\'NO\')") },
110 table_setup_consumers::m_field_def=
116 { C_STRING_WITH_LEN(
"setup_consumers") },
118 &table_setup_consumers::create,
122 COUNT_SETUP_CONSUMERS,
134 table_setup_consumers::table_setup_consumers()
136 m_row(NULL), m_pos(0), m_next_pos(0)
149 m_pos.
set_at(&m_next_pos);
151 if (m_pos.
m_index < COUNT_SETUP_CONSUMERS)
153 m_row= &all_setup_consumers_data[m_pos.
m_index];
160 result= HA_ERR_END_OF_FILE;
169 DBUG_ASSERT(m_pos.
m_index < COUNT_SETUP_CONSUMERS);
170 m_row= &all_setup_consumers_data[m_pos.
m_index];
185 DBUG_ASSERT(table->s->null_bytes == 0);
187 for (; (f= *fields) ; fields++)
189 if (read_all || bitmap_is_set(table->read_set, f->field_index))
191 switch(f->field_index)
209 const unsigned char *,
218 for (; (f= *fields) ; fields++)
220 if (bitmap_is_set(table->write_set, f->field_index))
222 switch(f->field_index)
225 return HA_ERR_WRONG_COMMAND;