~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrSysTable.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-03-17 14:56:02 UTC
  • Revision ID: james.westby@ubuntu.com-20100317145602-x7e30l1b2sb5s6w6
Tags: upstream-5.1.45
ImportĀ upstreamĀ versionĀ 5.1.45

Show diffs side-by-side

added added

removed removed

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