mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / storage / ndb / include / ndb_constants.h
blobff603f55f02b25601d836e0c005d1c5e389372e0
1 /* Copyright (c) 2003-2007 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
16 /**
17 * @file ndb_constants.h
19 * Constants common to NDB API and NDB kernel.
20 * Changing the values makes database upgrade impossible.
22 * New or removed definitions must be replicated to
23 * NdbDictionary.hpp and NdbSqlUtil.hpp.
25 * Not for use by application programs.
26 * Use the enums provided by NdbDictionary instead.
29 #ifndef NDB_CONSTANTS_H
30 #define NDB_CONSTANTS_H
33 * Data type constants.
36 #define NDB_TYPE_UNDEFINED 0
38 #define NDB_TYPE_TINYINT 1
39 #define NDB_TYPE_TINYUNSIGNED 2
40 #define NDB_TYPE_SMALLINT 3
41 #define NDB_TYPE_SMALLUNSIGNED 4
42 #define NDB_TYPE_MEDIUMINT 5
43 #define NDB_TYPE_MEDIUMUNSIGNED 6
44 #define NDB_TYPE_INT 7
45 #define NDB_TYPE_UNSIGNED 8
46 #define NDB_TYPE_BIGINT 9
47 #define NDB_TYPE_BIGUNSIGNED 10
48 #define NDB_TYPE_FLOAT 11
49 #define NDB_TYPE_DOUBLE 12
50 #define NDB_TYPE_OLDDECIMAL 13
51 #define NDB_TYPE_CHAR 14
52 #define NDB_TYPE_VARCHAR 15
53 #define NDB_TYPE_BINARY 16
54 #define NDB_TYPE_VARBINARY 17
55 #define NDB_TYPE_DATETIME 18
56 #define NDB_TYPE_DATE 19
57 #define NDB_TYPE_BLOB 20
58 #define NDB_TYPE_TEXT 21
59 #define NDB_TYPE_BIT 22
60 #define NDB_TYPE_LONGVARCHAR 23
61 #define NDB_TYPE_LONGVARBINARY 24
62 #define NDB_TYPE_TIME 25
63 #define NDB_TYPE_YEAR 26
64 #define NDB_TYPE_TIMESTAMP 27
65 #define NDB_TYPE_OLDDECIMALUNSIGNED 28
66 #define NDB_TYPE_DECIMAL 29
67 #define NDB_TYPE_DECIMALUNSIGNED 30
69 #define NDB_TYPE_MAX 31
73 * Attribute array type.
76 #define NDB_ARRAYTYPE_FIXED 0 /* 0 length bytes */
77 #define NDB_ARRAYTYPE_SHORT_VAR 1 /* 1 length bytes */
78 #define NDB_ARRAYTYPE_MEDIUM_VAR 2 /* 2 length bytes */
81 * Attribute storage type.
84 #define NDB_STORAGETYPE_MEMORY 0
85 #define NDB_STORAGETYPE_DISK 1
88 * Table temporary status.
90 #define NDB_TEMP_TAB_PERMANENT 0
91 #define NDB_TEMP_TAB_TEMPORARY 1
94 * Table single user mode
96 #define NDB_SUM_LOCKED 0
97 #define NDB_SUM_READONLY 1
98 #define NDB_SUM_READ_WRITE 2
100 #endif