1
/* Copyright (C) 2003 MySQL AB
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.
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.
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 */
19
#include <ndb_types.h>
21
/* NDB build version */
22
#define NDB_VERSION_BUILD @NDB_VERSION_BUILD@
24
/* NDB major version */
25
#define NDB_VERSION_MAJOR @NDB_VERSION_MAJOR@
27
/* NDB minor version */
28
#define NDB_VERSION_MINOR @NDB_VERSION_MINOR@
30
/* NDB status version */
31
#define NDB_VERSION_STATUS "@NDB_VERSION_STATUS@"
34
#define NDB_MAKE_VERSION(A,B,C) (((A) << 16) | ((B) << 8) | ((C) << 0))
36
#define NDB_VERSION_D NDB_MAKE_VERSION(NDB_VERSION_MAJOR, NDB_VERSION_MINOR, NDB_VERSION_BUILD)
37
#define NDB_VERSION_STRING_BUF_SZ 100
42
void ndbPrintVersion();
44
Uint32 ndbMakeVersion(Uint32 major, Uint32 minor, Uint32 build);
46
Uint32 ndbGetMajor(Uint32 version);
48
Uint32 ndbGetMinor(Uint32 version);
50
Uint32 ndbGetBuild(Uint32 version);
52
const char* ndbGetVersionString(Uint32 version, const char * status,
53
char *buf, unsigned sz);
54
const char* ndbGetOwnVersionString();
56
Uint32 ndbGetOwnVersion();
62
#define NDB_VERSION_STRING ndbGetOwnVersionString()
64
#define NDB_VERSION ndbGetOwnVersion()
69
* Used by transporter and when communicating with
72
/*#define NDB_VERSION_ID 0*/
75
* From which version do we support rowid
77
#define NDBD_ROWID_VERSION (NDB_MAKE_VERSION(5,1,6))
78
#define NDBD_INCL_NODECONF_VERSION_4 NDB_MAKE_VERSION(4,1,17)
79
#define NDBD_INCL_NODECONF_VERSION_5 NDB_MAKE_VERSION(5,0,18)
80
#define NDBD_FRAGID_VERSION (NDB_MAKE_VERSION(5,1,6))
81
#define NDBD_DICT_LOCK_VERSION_5 NDB_MAKE_VERSION(5,0,23)
82
#define NDBD_DICT_LOCK_VERSION_5_1 NDB_MAKE_VERSION(5,1,12)
84
#define NDBD_UPDATE_FRAG_DIST_KEY_50 NDB_MAKE_VERSION(5,0,26)
85
#define NDBD_UPDATE_FRAG_DIST_KEY_51 NDB_MAKE_VERSION(5,1,12)
87
#define NDBD_QMGR_SINGLEUSER_VERSION_5 NDB_MAKE_VERSION(5,0,25)
89
#define NDBD_NODE_VERSION_REP NDB_MAKE_VERSION(6,1,1)
91
#define NDBD_PREPARE_COPY_FRAG_VERSION NDB_MAKE_VERSION(6,2,1)
92
#define NDBD_PREPARE_COPY_FRAG_V2_51 NDB_MAKE_VERSION(5,1,23)
93
#define NDBD_PREPARE_COPY_FRAG_V2_62 NDB_MAKE_VERSION(6,2,8)
94
#define NDBD_PREPARE_COPY_FRAG_V2_63 NDB_MAKE_VERSION(6,3,6)
97
* 0 = NO PREP COPY FRAG SUPPORT
98
* 1 = NO MAX PAGE SUPPORT
104
ndb_check_prep_copy_frag_version(Uint32 version)
106
const Uint32 major = (version >> 16) & 0xFF;
107
const Uint32 minor = (version >> 8) & 0xFF;
109
if (version == NDB_VERSION_D)
116
if (version >= NDBD_PREPARE_COPY_FRAG_V2_62)
118
if (version >= NDBD_PREPARE_COPY_FRAG_VERSION)
124
if (version >= NDBD_PREPARE_COPY_FRAG_V2_63)
130
else if (major == 5 && minor == 1)
132
if (version >= NDBD_PREPARE_COPY_FRAG_V2_51)