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
****************************************************************************/
12
#if (defined(_WIN32) || defined(_WIN64))
18
/* The Unix version */
20
/* Include two header files from MySQL to make the Unix flavor used
21
in compiling more Posix-compatible. We assume that 'innobase' is a
22
subdirectory of 'mysql'. */
24
#include <my_pthread.h>
29
/* Include the header file generated by GNU autoconf */
30
#include "../ib_config.h"
38
/* DEBUG VERSION CONTROL
39
===================== */
40
/* Make a non-inline debug version */
43
#define UNIV_MEM_DEBUG
44
#define UNIV_SYNC_DEBUG
45
#define UNIV_SEARCH_DEBUG
47
#define UNIV_IBUF_DEBUG
49
#define UNIV_SYNC_PERF_STAT
50
#define UNIV_SEARCH_PERF_STAT
52
#define UNIV_LIGHT_MEM_DEBUG
57
#define UNIV_SQL_DEBUG
58
#define UNIV_LOG_DEBUG
60
/* the above option prevents forcing of log to disk
61
at a buffer page write: it should be tested with this
62
option off; also some ibuf tests are suppressed */
64
#define UNIV_BASIC_LOG_DEBUG
66
/* the above option enables basic recovery debugging:
67
new allocated file pages are reset */
69
#if (!defined(UNIV_DEBUG) && !defined(INSIDE_HA_INNOBASE_CC))
70
/* Definition for inline version */
73
#define UNIV_INLINE __inline
75
/* config.h contains the right def for 'inline' for the current compiler */
76
#define UNIV_INLINE extern inline
81
/* If we want to compile a noninlined version we use the following macro
87
#endif /* UNIV_DEBUG */
90
#define UNIV_WORD_SIZE 4
92
#define UNIV_WORD_SIZE 8
94
/* config.h generated by GNU autoconf will define SIZEOF_INT in Posix */
95
#define UNIV_WORD_SIZE SIZEOF_INT
98
/* The following alignment is used in memory allocations in memory heap
99
management to ensure correct alignment for doubles etc. */
100
#define UNIV_MEM_ALIGNMENT 8
102
/* The following alignment is used in aligning lints etc. */
103
#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
113
/* The 2-logarithm of UNIV_PAGE_SIZE: */
114
#define UNIV_PAGE_SIZE_SHIFT 14
116
/* Maximum number of parallel threads in a parallelized operation */
117
#define UNIV_MAX_PARALLELISM 32
120
UNIVERSAL TYPE DEFINITIONS
121
==========================
124
/* Note that inside MySQL 'byte' is defined as char on Linux! */
125
#define byte unsigned char
127
/* Another basic type we use is unsigned long integer which is intended to be
128
equal to the word size of the machine. */
130
typedef unsigned long int ulint;
132
typedef long int lint;
134
/* The following type should be at least a 64-bit floating point number */
135
typedef double utfloat;
137
/* The 'undefined' value for a ulint */
138
#define ULINT_UNDEFINED ((ulint)(-1))
140
/* The undefined 32-bit unsigned integer */
141
#define ULINT32_UNDEFINED 0xFFFFFFFF
143
/* Maximum value for a ulint */
144
#define ULINT_MAX ((ulint)(-2))
146
/* This 'ibool' type is used within Innobase. Remember that different included
147
headers may define 'bool' differently. Do not assume that 'bool' is a ulint! */
157
/* The following number as the length of a logical field means that the field
158
has the SQL NULL as its value. */
159
#define UNIV_SQL_NULL ULINT_UNDEFINED