MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BlockNumbers.h
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 #ifndef BLOCK_NUMBERS_H
19 #define BLOCK_NUMBERS_H
20 
21 #include <kernel_types.h>
22 #include <RefConvert.hpp>
23 
24 /* 32768 */
25 #define MIN_API_BLOCK_NO 0x8000
26 
27 /* 2047 */
28 #define API_PACKED 0x07ff
29 
30 /* Fixed block numbers in API */
31 #define NO_API_FIXED_BLOCKS 2
32 
33 /* 4002 */
34 #define API_CLUSTERMGR 0x0FA2
35 #define MGM_CONFIG_MAN 0x0FA3
36 
37 #define MIN_API_FIXED_BLOCK_NO (API_CLUSTERMGR)
38 #define MAX_API_FIXED_BLOCK_NO (MIN_API_FIXED_BLOCK_NO + NO_API_FIXED_BLOCKS)
39 
40 
41 #define BACKUP 0xF4
42 #define DBTC 0xF5
43 #define DBDIH 0xF6
44 #define DBLQH 0xF7
45 #define DBACC 0xF8
46 #define DBTUP 0xF9
47 #define DBDICT 0xFA
48 #define NDBCNTR 0xFB
49 #define CNTR 0xFB
50 #define QMGR 0xFC
51 #define NDBFS 0xFD
52 #define CMVMI 0xFE
53 #define TRIX 0xFF
54 #define DBUTIL 0x100
55 #define SUMA 0x101
56 #define DBTUX 0x102
57 #define TSMAN 0x103
58 #define LGMAN 0x104
59 #define PGMAN 0x105
60 #define RESTORE 0x106
61 #define DBINFO 0x107
62 #define DBSPJ 0x108
63 
64 const BlockReference BACKUP_REF = numberToRef(BACKUP, 0);
65 const BlockReference DBTC_REF = numberToRef(DBTC, 0);
66 const BlockReference DBDIH_REF = numberToRef(DBDIH, 0);
67 const BlockReference DBLQH_REF = numberToRef(DBLQH, 0);
68 const BlockReference DBACC_REF = numberToRef(DBACC, 0);
69 const BlockReference DBTUP_REF = numberToRef(DBTUP, 0);
70 const BlockReference DBDICT_REF = numberToRef(DBDICT, 0);
71 const BlockReference NDBCNTR_REF = numberToRef(NDBCNTR, 0);
72 const BlockReference QMGR_REF = numberToRef(QMGR, 0);
73 const BlockReference NDBFS_REF = numberToRef(NDBFS, 0);
74 const BlockReference CMVMI_REF = numberToRef(CMVMI, 0);
75 const BlockReference TRIX_REF = numberToRef(TRIX, 0);
76 const BlockReference DBUTIL_REF = numberToRef(DBUTIL, 0);
77 const BlockReference SUMA_REF = numberToRef(SUMA, 0);
78 const BlockReference DBTUX_REF = numberToRef(DBTUX, 0);
79 const BlockReference TSMAN_REF = numberToRef(TSMAN, 0);
80 const BlockReference LGMAN_REF = numberToRef(LGMAN, 0);
81 const BlockReference PGMAN_REF = numberToRef(PGMAN, 0);
82 const BlockReference RESTORE_REF = numberToRef(RESTORE, 0);
83 const BlockReference DBINFO_REF = numberToRef(DBINFO, 0);
84 const BlockReference DBSPJ_REF = numberToRef(DBSPJ, 0);
85 
86 static inline void __hide_warnings_unused_ref_vars(void) {
87  // Hide annoying warnings about unused variables
88  (void)BACKUP_REF; (void)DBTC_REF; (void)DBDIH_REF;
89  (void)DBLQH_REF; (void)DBACC_REF; (void)DBTUP_REF;
90  (void)DBDICT_REF; (void)NDBCNTR_REF; (void)QMGR_REF;
91  (void)NDBFS_REF; (void)CMVMI_REF; (void)TRIX_REF;
92  (void)DBUTIL_REF; (void)SUMA_REF; (void)DBTUX_REF;
93  (void)TSMAN_REF; (void)LGMAN_REF; (void)PGMAN_REF;
94  (void)RESTORE_REF; (void)DBINFO_REF; (void)DBSPJ_REF;
95 }
96 
97 const BlockNumber MIN_BLOCK_NO = BACKUP;
98 const BlockNumber MAX_BLOCK_NO = DBSPJ;
99 const BlockNumber NO_OF_BLOCKS = (MAX_BLOCK_NO - MIN_BLOCK_NO + 1);
100 
104 struct BlockName {
105  const char* name;
106  BlockNumber number;
107 };
108 
109 extern const BlockName BlockNames[];
110 extern const BlockNumber NO_OF_BLOCK_NAMES;
111 
112 #endif