19 #ifndef NDBT_TABLES_HPP
20 #define NDBT_TABLES_HPP
25 #include <NdbDictionary.hpp>
26 #include <NDBT_Table.hpp>
36 STATIC_CONST(MaxRowBytes= NDB_MAX_TUPLE_SIZE_IN_WORDS * 4);
37 STATIC_CONST(MaxKeyBytes= NDB_MAX_KEYSIZE_IN_WORDS * 4);
38 STATIC_CONST(MinKeyBytes= 4);
40 STATIC_CONST(MaxVarTypeKeyBytes= MaxKeyBytes - 2);
42 STATIC_CONST(MaxKeyMaxAttrBytes= MaxRowBytes - MaxKeyBytes);
43 STATIC_CONST(MaxKeyMaxVarTypeAttrBytes= MaxKeyMaxAttrBytes - 2);
45 STATIC_CONST(MinKeyMaxAttrBytes= MaxRowBytes - MinKeyBytes);
46 STATIC_CONST(MinKeyMaxVarTypeAttrBytes= MinKeyMaxAttrBytes - 2);
48 STATIC_CONST(UniqueIndexOverheadBytes= 4);
52 STATIC_CONST(MaxKeyMaxVarTypeAttrBytesIndex =
53 ((MaxKeyMaxVarTypeAttrBytes <= MaxKeyBytes) ?
54 MaxKeyMaxVarTypeAttrBytes : MaxKeyBytes) - UniqueIndexOverheadBytes);
59 STATIC_CONST(HugoOverheadBytes= 2 * (4 + 4));
61 static int createTable(
Ndb* pNdb,
const char* _name,
bool _temp =
false,
62 bool existsOK =
false, NDBT_CreateTableHook = 0,
64 static int createAllTables(
Ndb* pNdb,
bool _temp,
bool existsOK =
false);
65 static int createAllTables(
Ndb* pNdb);
67 static int dropAllTables(
Ndb* pNdb);
69 static int print(
const char *
name);
70 static int printAll();
74 static int getNumTables();
76 static const char** getIndexes(
const char*
table);
78 static int create_default_tablespace(
Ndb* pNdb);