MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NdbcntrSysTable.cpp
1 /*
2  Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
3 
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; version 2 of the License.
7 
8  This program is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  GNU General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License
14  along with this program; if not, write to the Free Software
15  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
16 */
17 
18 #include "Ndbcntr.hpp"
19 
20 #define arrayLength(x) sizeof(x)/sizeof(x[0])
21 
22 // SYSTAB_0
23 
24 static const Ndbcntr::SysColumn
25 column_SYSTAB_0[] = {
26  { 0, "SYSKEY_0",
27  DictTabInfo::ExtUnsigned, 1,
28  true, false
29  },
30  { 1, "NEXTID",
31  DictTabInfo::ExtBigunsigned, 1,
32  false, false
33  }
34 };
35 
37 Ndbcntr::g_sysTable_SYSTAB_0 = {
38  "sys/def/SYSTAB_0",
39  arrayLength(column_SYSTAB_0), column_SYSTAB_0,
40  DictTabInfo::SystemTable,
41  DictTabInfo::HashMapPartition,
42  true, ~0, ~0
43 };
44 
45 // NDB$EVENTS_0
46 
47 static const Ndbcntr::SysColumn
48 column_NDBEVENTS_0[] = {
49  { 0, "NAME",
50  DictTabInfo::ExtBinary, MAX_TAB_NAME_SIZE,
51  true, false
52  },
53  { 1, "EVENT_TYPE",
54  DictTabInfo::ExtUnsigned, 1,
55  false, false
56  },
57  { 2, "TABLEID",
58  DictTabInfo::ExtUnsigned, 1,
59  false, false
60  },
61  { 3, "TABLEVERSION",
62  DictTabInfo::ExtUnsigned, 1,
63  false, false
64  },
65  { 4, "TABLE_NAME",
66  DictTabInfo::ExtBinary, MAX_TAB_NAME_SIZE,
67  false, false
68  },
69  { 5, "ATTRIBUTE_MASK",
70  DictTabInfo::ExtUnsigned, MAXNROFATTRIBUTESINWORDS_OLD,
71  false, false
72  },
73  { 6, "SUBID",
74  DictTabInfo::ExtUnsigned, 1,
75  false, false
76  },
77  { 7, "SUBKEY",
78  DictTabInfo::ExtUnsigned, 1,
79  false, false
80  },
81  { 8, "ATTRIBUTE_MASK2",
82  DictTabInfo::ExtLongvarbinary, MAX_ATTRIBUTES_IN_TABLE_NDB_EVENTS_0 / 8,
83  false, true
84  }
85 };
86 
88 Ndbcntr::g_sysTable_NDBEVENTS_0 = {
89  "sys/def/NDB$EVENTS_0",
90  arrayLength(column_NDBEVENTS_0), column_NDBEVENTS_0,
91  DictTabInfo::SystemTable,
92  DictTabInfo::HashMapPartition,
93  true, ~0, ~0
94 };
95 
96 // all
97 
98 const Ndbcntr::SysTable*
99 Ndbcntr::g_sysTableList[] = {
100  &g_sysTable_SYSTAB_0,
101  &g_sysTable_NDBEVENTS_0
102 };
103 
104 //TODO Backup needs this info to allocate appropriate number of records
105 //BackupInit.cpp
106 const unsigned
107 Ndbcntr::g_sysTableCount = arrayLength(Ndbcntr::g_sysTableList);