20 #error "Don't include this C++ header file from a non-C++ file!"
28 #include "mysql_com.h"
66 my_hash_value_type hash_value;
244 table_def(
unsigned char *types, ulong
size, uchar *field_metadata,
245 int metadata_size, uchar *null_bitmap, uint16
flags);
254 ulong
size()
const {
return m_size; }
261 enum_field_types binlog_type(ulong
index)
const
263 return static_cast<enum_field_types
>(m_type[
index]);
274 enum_field_types type(ulong
index)
const
276 DBUG_ASSERT(index < m_size);
282 enum_field_types source_type= binlog_type(index);
283 uint16 source_metadata= m_field_metadata[
index];
286 case MYSQL_TYPE_STRING:
288 int real_type= source_metadata >> 8;
289 if (real_type == MYSQL_TYPE_ENUM || real_type == MYSQL_TYPE_SET)
290 source_type=
static_cast<enum_field_types
>(real_type);
298 case MYSQL_TYPE_DATE:
299 source_type= MYSQL_TYPE_NEWDATE;
323 uint16 field_metadata(uint index)
const
325 DBUG_ASSERT(index < m_size);
326 if (m_field_metadata_size)
327 return m_field_metadata[
index];
336 my_bool maybe_null(uint index)
const
338 DBUG_ASSERT(index < m_size);
339 return ((m_null_bits[(index / 8)] &
340 (1 << (index % 8))) == (1 << (index %8)));
350 uint32 calc_field_size(uint col, uchar *master_data)
const;
380 TABLE **conv_table_var)
const;
410 unsigned char *m_type;
411 uint m_field_metadata_size;
412 uint16 *m_field_metadata;
427 bool m_tabledef_valid;
453 void assign(Obj* ptr) {
455 DBUG_ASSERT(m_ptr == NULL);
458 Obj*
get() {
return m_ptr; }
481 #define DBUG_PRINT_BITSET(N,FRM,BS) \
485 for (i = 0 ; i < MY_MIN(sizeof(buf) - 1, (BS)->n_bits) ; i++) \
486 buf[i] = bitmap_is_set((BS), i) ? '1' : '0'; \
488 DBUG_PRINT((N), ((FRM), buf)); \