16 #ifndef TABLE_ID_INCLUDED
17 #define TABLE_ID_INCLUDED
19 #include "my_global.h"
29 static const ulonglong TABLE_ID_MAX= (~0ULL >> 16);
36 ulonglong id()
const {
return m_id; }
37 bool is_valid()
const {
return m_id <= TABLE_ID_MAX; }
38 bool is_invalid()
const {
return m_id > TABLE_ID_MAX; }
40 void operator=(
const Table_id &tid) { m_id = tid.m_id; }
41 void operator=(ulonglong
id) { m_id = id; }
43 bool operator==(
const Table_id &tid)
const {
return m_id == tid.m_id; }
44 bool operator!=(
const Table_id &tid)
const {
return m_id != tid.m_id; }
47 operator ulonglong()
const {
return m_id; }
54 m_id = (m_id == TABLE_ID_MAX ? 0 : m_id + 1);
56 DBUG_ASSERT(m_id <= TABLE_ID_MAX );