19 #ifndef NDB_KERNEL_TYPES_H
20 #define NDB_KERNEL_TYPES_H
22 #include <my_global.h>
23 #include <ndb_types.h>
24 #include "ndb_limits.h"
26 typedef Uint16 NodeId;
27 typedef Uint16 BlockNumber;
28 typedef Uint16 BlockInstance;
29 typedef Uint32 BlockReference;
30 typedef Uint16 GlobalSignalNumber;
48 Uint32 data[GLOBAL_PAGE_SIZE/
sizeof(Uint32)];
59 bool isNull()
const {
return m_page_no == RNIL; }
60 void setNull() { m_page_no= RNIL; m_file_no= m_page_idx= ~0;}
62 Uint32 ref()
const {
return ref(m_page_no,m_page_idx) ;}
65 m_page_no = ref2page_id(ref);
66 m_page_idx = ref2page_idx(ref);
70 static Uint32 ref(Uint32 lk1, Uint32 lk2) {
71 return (lk1 << MAX_TUPLES_BITS) | lk2;
74 static Uint32 ref2page_id(Uint32 ref) {
return ref >> MAX_TUPLES_BITS; }
75 static Uint32 ref2page_idx(Uint32 ref) {
return ref & MAX_TUPLES_PER_PAGE; }
77 static bool isInvalid(Uint32 lk1, Uint32 lk2) {
78 return ref(lk1, lk2) == ~Uint32(0);
83 operator<<(
class NdbOut&,
const struct Local_key&);
87 table_version_major(Uint32 ver)
89 return ver & 0x00FFFFFF;