1
/***************************************************************************
2
Version control for database, common definitions, and include files
4
(c) 1994 - 2000 Innobase Oy
6
Created 1/20/1994 Heikki Tuuri
7
****************************************************************************/
14
/* If UNIV_WINNT is not defined, we assume Windows 95 */
23
#define _WIN32_WINNT 0x0400
25
/* DEBUG VERSION CONTROL
26
===================== */
27
/* Make a non-inline debug version */
30
#define UNIV_MEM_DEBUG
31
#define UNIV_SYNC_DEBUG
32
#define UNIV_SEARCH_DEBUG
34
#define UNIV_IBUF_DEBUG
36
#define UNIV_SEARCH_PERF_STAT
37
#define UNIV_SYNC_PERF_STAT
39
#define UNIV_LIGHT_MEM_DEBUG
43
#define UNIV_SQL_DEBUG
44
#define UNIV_LOG_DEBUG
46
/* the above option prevents forcing of log to disk
47
at a buffer page write: it should be tested with this
48
option off; also some ibuf tests are suppressed */
50
#define UNIV_BASIC_LOG_DEBUG
52
/* the above option enables basic recovery debugging:
53
new allocated file pages are reset */
55
/* The debug version is slower, thus we may change the length of test loops
56
depending on the UNIV_DBC parameter */
64
/* Definition for inline version */
67
#define UNIV_INLINE __inline
68
#elif defined(UNIV_GNUC)
69
#define UNIV_INLINE extern __inline__
73
/* If we want to compile a noninlined version we use the following macro
79
#endif /* UNIV_DEBUG */
80
/* If the compiler does not know inline specifier, we use: */
82
#define UNIV_INLINE static
87
MACHINE VERSION CONTROL
88
=======================
93
/* In a 32-bit computer word size is 4 */
94
#define UNIV_WORD_SIZE 4
96
/* The following alignment is used in memory allocations in memory heap
97
management to ensure correct alignment for doubles etc. */
98
#define UNIV_MEM_ALIGNMENT 8
100
/* The following alignment is used in aligning lints etc. */
101
#define UNIV_WORD_ALIGNMENT UNIV_WORD_SIZE
106
DATABASE VERSION CONTROL
107
========================
110
/* The universal page size of the database */
111
#define UNIV_PAGE_SIZE (2 * 8192)/* NOTE! Currently, this has to be a
112
power of 2 and divisible by
113
UNIV_MEM_ALIGNMENT */
115
/* Do non-buffered io in buffer pool read/write operations */
116
#define UNIV_NON_BUFFERED_IO
118
/* Maximum number of parallel threads in a parallelized operation */
119
#define UNIV_MAX_PARALLELISM 32
122
UNIVERSAL TYPE DEFINITIONS
123
==========================
127
typedef unsigned char byte;
129
/* An other basic type we use is unsigned long integer which is intended to be
130
equal to the word size of the machine. */
132
typedef unsigned long int ulint;
134
typedef long int lint;
136
/* The following type should be at least a 64-bit floating point number */
137
typedef double utfloat;
139
/* The 'undefined' value for a ulint */
140
#define ULINT_UNDEFINED ((ulint)(-1))
142
/* The undefined 32-bit unsigned integer */
143
#define ULINT32_UNDEFINED 0xFFFFFFFF
145
/* Maximum value for a ulint */
146
#define ULINT_MAX ((ulint)(-2))
149
/* Definition of the boolean type */
155
/* The following number as the length of a logical field means that the field
156
has the SQL NULL as its value. */
157
#define UNIV_SQL_NULL ULINT_UNDEFINED