~mysql/mysql-server/mysql-6.0

« back to all changes in this revision

Viewing changes to innobase/include/univ.i

  • Committer: monty at mysql
  • Date: 2001-02-17 12:19:19 UTC
  • mto: (554.1.1)
  • mto: This revision was merged to the branch mainline in revision 556.
  • Revision ID: sp1r-monty@donna.mysql.com-20010217121919-07904
Added Innobase to source distribution

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
Version control for database, common definitions, and include files
 
3
 
 
4
(c) 1994 - 2000 Innobase Oy
 
5
 
 
6
Created 1/20/1994 Heikki Tuuri
 
7
****************************************************************************/
 
8
 
 
9
#ifndef univ_i
 
10
#define univ_i
 
11
 
 
12
#if (defined(_WIN32) || defined(_WIN64))
 
13
#define __WIN__
 
14
#include <windows.h>
 
15
 
 
16
 
 
17
#else
 
18
/* The Unix version */
 
19
 
 
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'. */
 
23
#include <global.h>
 
24
#include <my_pthread.h>
 
25
 
 
26
#undef PACKAGE
 
27
#undef VERSION
 
28
 
 
29
/* Include the header file generated by GNU autoconf */
 
30
#include "../ib_config.h"
 
31
 
 
32
#ifdef HAVE_PREAD
 
33
#define HAVE_PWRITE
 
34
#endif
 
35
 
 
36
#endif
 
37
 
 
38
/*                      DEBUG VERSION CONTROL
 
39
                        ===================== */
 
40
/* Make a non-inline debug version */
 
41
/*
 
42
#define UNIV_DEBUG
 
43
#define UNIV_MEM_DEBUG
 
44
#define UNIV_SYNC_DEBUG
 
45
#define UNIV_SEARCH_DEBUG
 
46
 
 
47
#define UNIV_IBUF_DEBUG
 
48
 
 
49
#define UNIV_SYNC_PERF_STAT
 
50
#define UNIV_SEARCH_PERF_STAT
 
51
*/
 
52
#define UNIV_LIGHT_MEM_DEBUG
 
53
 
 
54
#define YYDEBUG                 1
 
55
 
 
56
/*
 
57
#define UNIV_SQL_DEBUG
 
58
#define UNIV_LOG_DEBUG
 
59
*/
 
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 */
 
63
/*
 
64
#define UNIV_BASIC_LOG_DEBUG
 
65
*/
 
66
                        /* the above option enables basic recovery debugging:
 
67
                        new allocated file pages are reset */
 
68
 
 
69
#if (!defined(UNIV_DEBUG) && !defined(INSIDE_HA_INNOBASE_CC))
 
70
/* Definition for inline version */
 
71
 
 
72
#ifdef __WIN__
 
73
#define UNIV_INLINE     __inline
 
74
#else
 
75
/* config.h contains the right def for 'inline' for the current compiler */
 
76
#define UNIV_INLINE  extern inline
 
77
 
 
78
#endif
 
79
 
 
80
#else
 
81
/* If we want to compile a noninlined version we use the following macro
 
82
definitions: */
 
83
 
 
84
#define UNIV_NONINL
 
85
#define UNIV_INLINE
 
86
 
 
87
#endif  /* UNIV_DEBUG */
 
88
 
 
89
#ifdef _WIN32
 
90
#define UNIV_WORD_SIZE          4
 
91
#elif defined(_WIN64)
 
92
#define UNIV_WORD_SIZE          8
 
93
#else
 
94
/* config.h generated by GNU autoconf will define SIZEOF_INT in Posix */
 
95
#define UNIV_WORD_SIZE          SIZEOF_INT
 
96
#endif
 
97
 
 
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
 
101
 
 
102
/* The following alignment is used in aligning lints etc. */
 
103
#define UNIV_WORD_ALIGNMENT     UNIV_WORD_SIZE
 
104
 
 
105
/*
 
106
                        DATABASE VERSION CONTROL
 
107
                        ========================
 
108
*/
 
109
 
 
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 */
 
113
/* The 2-logarithm of UNIV_PAGE_SIZE: */
 
114
#define UNIV_PAGE_SIZE_SHIFT    14                                      
 
115
 
 
116
/* Maximum number of parallel threads in a parallelized operation */
 
117
#define UNIV_MAX_PARALLELISM    32
 
118
 
 
119
/*
 
120
                        UNIVERSAL TYPE DEFINITIONS
 
121
                        ==========================
 
122
*/
 
123
 
 
124
/* Note that inside MySQL 'byte' is defined as char on Linux! */
 
125
#define byte    unsigned char
 
126
 
 
127
/* Another basic type we use is unsigned long integer which is intended to be
 
128
equal to the word size of the machine. */
 
129
 
 
130
typedef unsigned long int       ulint;
 
131
 
 
132
typedef long int                lint;
 
133
 
 
134
/* The following type should be at least a 64-bit floating point number */
 
135
typedef double          utfloat;
 
136
 
 
137
/* The 'undefined' value for a ulint */
 
138
#define ULINT_UNDEFINED         ((ulint)(-1))
 
139
 
 
140
/* The undefined 32-bit unsigned integer */
 
141
#define ULINT32_UNDEFINED       0xFFFFFFFF
 
142
 
 
143
/* Maximum value for a ulint */
 
144
#define ULINT_MAX               ((ulint)(-2))
 
145
 
 
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! */
 
148
#define ibool   ulint
 
149
 
 
150
#ifndef TRUE
 
151
 
 
152
#define TRUE    1
 
153
#define FALSE   0
 
154
 
 
155
#endif
 
156
 
 
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
 
160
 
 
161
#include <stdio.h>
 
162
#include "ut0dbg.h"
 
163
#include "ut0ut.h"
 
164
#include "db0err.h"
 
165
 
 
166
#endif