22 #include "my_global.h"
23 #include "my_pthread.h"
30 THR_LOCK table_mutex_instances::m_table_lock;
35 { C_STRING_WITH_LEN(
"NAME") },
36 { C_STRING_WITH_LEN(
"varchar(128)") },
40 { C_STRING_WITH_LEN(
"OBJECT_INSTANCE_BEGIN") },
41 { C_STRING_WITH_LEN(
"bigint(20)") },
45 { C_STRING_WITH_LEN(
"LOCKED_BY_THREAD_ID") },
46 { C_STRING_WITH_LEN(
"bigint(20)") },
52 table_mutex_instances::m_field_def=
53 { 3, mutex_field_types };
58 { C_STRING_WITH_LEN(
"mutex_instances") },
60 &table_mutex_instances::create,
76 table_mutex_instances::table_mutex_instances()
78 m_row_exists(false), m_pos(0), m_next_pos(0)
102 return HA_ERR_END_OF_FILE;
118 return HA_ERR_RECORD_DELETED;
121 void table_mutex_instances::make_row(
PFS_mutex *pfs)
131 safe_class= sanitize_mutex_class(pfs->
m_class);
132 if (unlikely(safe_class == NULL))
153 int table_mutex_instances::read_row_values(
TABLE *
table,
160 if (unlikely(! m_row_exists))
161 return HA_ERR_RECORD_DELETED;
164 DBUG_ASSERT(table->s->null_bytes == 1);
167 for (; (f= *fields) ; fields++)
169 if (read_all || bitmap_is_set(table->read_set, f->field_index))
171 switch(f->field_index)
194 THR_LOCK table_rwlock_instances::m_table_lock;
199 { C_STRING_WITH_LEN(
"NAME") },
200 { C_STRING_WITH_LEN(
"varchar(128)") },
204 { C_STRING_WITH_LEN(
"OBJECT_INSTANCE_BEGIN") },
205 { C_STRING_WITH_LEN(
"bigint(20)") },
209 { C_STRING_WITH_LEN(
"WRITE_LOCKED_BY_THREAD_ID") },
210 { C_STRING_WITH_LEN(
"bigint(20)") },
214 { C_STRING_WITH_LEN(
"READ_LOCKED_BY_COUNT") },
215 { C_STRING_WITH_LEN(
"int(10)") },
221 table_rwlock_instances::m_field_def=
222 { 4, rwlock_field_types };
227 { C_STRING_WITH_LEN(
"rwlock_instances") },
229 &table_rwlock_instances::create,
245 table_rwlock_instances::table_rwlock_instances()
247 m_row_exists(false), m_pos(0), m_next_pos(0)
271 return HA_ERR_END_OF_FILE;
287 return HA_ERR_RECORD_DELETED;
290 void table_rwlock_instances::make_row(
PFS_rwlock *pfs)
300 safe_class= sanitize_rwlock_class(pfs->
m_class);
301 if (unlikely(safe_class == NULL))
326 int table_rwlock_instances::read_row_values(
TABLE *table,
333 if (unlikely(! m_row_exists))
334 return HA_ERR_RECORD_DELETED;
337 DBUG_ASSERT(table->s->null_bytes == 1);
340 for (; (f= *fields) ; fields++)
342 if (read_all || bitmap_is_set(table->read_set, f->field_index))
344 switch(f->field_index)
370 THR_LOCK table_cond_instances::m_table_lock;
375 { C_STRING_WITH_LEN(
"NAME") },
376 { C_STRING_WITH_LEN(
"varchar(128)") },
380 { C_STRING_WITH_LEN(
"OBJECT_INSTANCE_BEGIN") },
381 { C_STRING_WITH_LEN(
"bigint(20)") },
387 table_cond_instances::m_field_def=
388 { 2, cond_field_types };
393 { C_STRING_WITH_LEN(
"cond_instances") },
395 &table_cond_instances::create,
411 table_cond_instances::table_cond_instances()
413 m_row_exists(false), m_pos(0), m_next_pos(0)
437 return HA_ERR_END_OF_FILE;
453 return HA_ERR_RECORD_DELETED;
456 void table_cond_instances::make_row(
PFS_cond *pfs)
466 safe_class= sanitize_cond_class(pfs->
m_class);
467 if (unlikely(safe_class == NULL))
478 int table_cond_instances::read_row_values(
TABLE *table,
485 if (unlikely(! m_row_exists))
486 return HA_ERR_RECORD_DELETED;
489 DBUG_ASSERT(table->s->null_bytes == 0);
491 for (; (f= *fields) ; fields++)
493 if (read_all || bitmap_is_set(table->read_set, f->field_index))
495 switch(f->field_index)