~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/include/univ.i

  • Committer: Lee Bieber
  • Date: 2010-11-14 23:15:42 UTC
  • mfrom: (1929.1.42 warning-stack-frame)
  • Revision ID: kalebral@gmail.com-20101114231542-fnnu6ydd2p17n582
Merge Monty - fix bug 672372: some functions use > 32k stack

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*****************************************************************************
2
2
 
3
 
Copyright (C) 1994, 2010, Innobase Oy. All Rights Reserved.
4
 
Copyright (C) 2008 Google Inc.
5
 
Copyright (C) 2009 Sun Microsystems, Inc.
 
3
Copyright (c) 1994, 2010, Innobase Oy. All Rights Reserved.
 
4
Copyright (c) 2008, Google Inc.
 
5
Copyright (c) 2009, Sun Microsystems, Inc.
6
6
 
7
7
Portions of this file contain modifications contributed and copyrighted by
8
8
Google, Inc. Those modifications are gratefully acknowledged and are described
51
51
#endif /* UNIV_HOTBACKUP */
52
52
 
53
53
#define INNODB_VERSION_MAJOR    1
54
 
#define INNODB_VERSION_MINOR    1
55
 
#define INNODB_VERSION_BUGFIX   4
 
54
#define INNODB_VERSION_MINOR    0
 
55
#define INNODB_VERSION_BUGFIX   9
56
56
 
57
57
/* The following is the InnoDB version as shown in
58
58
SELECT plugin_version FROM information_schema.plugins;
84
84
# define ha_innobase ha_innodb
85
85
#endif /* MYSQL_DYNAMIC_PLUGIN */
86
86
 
 
87
/* if any of the following macros is defined at this point this means
 
88
that the code from the "right" plug.in was executed and we do not
 
89
need to include ut0auxconf.h which would either define the same macros
 
90
or will be empty */
 
91
#if !defined(HAVE_GCC_ATOMIC_BUILTINS) \
 
92
 && !defined(HAVE_IB_ATOMIC_PTHREAD_T_GCC) \
 
93
 && !defined(HAVE_SOLARIS_ATOMICS) \
 
94
 && !defined(HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS) \
 
95
 && !defined(SIZEOF_PTHREAD_T) \
 
96
 && !defined(IB_HAVE_PAUSE_INSTRUCTION)
 
97
# include "ut0auxconf.h"
 
98
#endif
 
99
 
87
100
#if (defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)) && !defined(MYSQL_SERVER) && !defined(__WIN__)
88
101
# undef __WIN__
89
102
# define __WIN__
114
127
 
115
128
/* Include <sys/stat.h> to get S_I... macros defined for os0file.c */
116
129
# include <sys/stat.h>
117
 
# if !defined(__WIN__) 
 
130
# if !defined(__NETWARE__) && !defined(__WIN__) 
118
131
#  include <sys/mman.h> /* mmap() for os0proc.c */
119
132
# endif
120
133
 
137
150
#  define UNIV_MUST_NOT_INLINE
138
151
# endif
139
152
 
140
 
# if defined(__GNUC__)
141
 
#  define UNIV_WARN_UNUSED_RESULT_NONNULL __attribute__((nonnull, warn_unused_result))
142
 
#  define UNIV_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
143
 
#else
144
 
#  define UNIV_WARN_UNUSED_RESULT
145
 
#  define UNIV_WARN_UNUSED_RESULT_NONNULL
146
 
#endif
147
 
 
148
153
# ifdef HAVE_PREAD
149
154
#  define HAVE_PWRITE
150
155
# endif
151
156
 
152
157
#endif /* #if (defined(WIN32) || ... */
153
158
 
154
 
/* Following defines are to enable performance schema
155
 
instrumentation in each of four InnoDB modules if
156
 
HAVE_PSI_INTERFACE is defined. */
157
 
#ifdef HAVE_PSI_INTERFACE
158
 
# define UNIV_PFS_MUTEX
159
 
# define UNIV_PFS_RWLOCK
160
 
/* For I/O instrumentation, performance schema rely
161
 
on a native descriptor to identify the file, this
162
 
descriptor could conflict with our OS level descriptor.
163
 
Disable IO instrumentation on Windows until this is
164
 
resolved */
165
 
# ifndef __WIN__
166
 
#  define UNIV_PFS_IO
167
 
# endif
168
 
# define UNIV_PFS_THREAD
169
 
#endif /* HAVE_PSI_INTERFACE */
170
 
 
171
159
/*                      DEBUG VERSION CONTROL
172
160
                        ===================== */
173
161
 
189
177
#define UNIV_COMPILE_TEST_FUNCS
190
178
*/
191
179
 
192
 
#if defined HAVE_VALGRIND
 
180
#ifdef HAVE_purify
193
181
# define UNIV_DEBUG_VALGRIND
194
 
#endif /* HAVE_VALGRIND */
 
182
#endif /* HAVE_purify */
195
183
#if 0
196
184
#define UNIV_DEBUG_VALGRIND                     /* Enable extra
197
185
                                                Valgrind instrumentation */
229
217
                                                adaptive hash index */
230
218
#define UNIV_SRV_PRINT_LATCH_WAITS              /* enable diagnostic output
231
219
                                                in sync0sync.c */
 
220
#define UNIV_BTR_AVOID_COPY                     /* when splitting B-tree nodes,
 
221
                                                do not move any records when
 
222
                                                all the records would
 
223
                                                be moved */
232
224
#define UNIV_BTR_PRINT                          /* enable functions for
233
225
                                                printing B-trees */
234
226
#define UNIV_ZIP_DEBUG                          /* extensive consistency checks
235
227
                                                for compressed pages */
236
228
#define UNIV_ZIP_COPY                           /* call page_zip_copy_recs()
237
229
                                                more often */
238
 
#define UNIV_AIO_DEBUG                          /* prints info about
239
 
                                                submitted and reaped AIO
240
 
                                                requests to the log. */
241
230
#endif
242
231
 
243
232
#define UNIV_BTR_DEBUG                          /* check B-tree links */
304
293
/* The following alignment is used in aligning lints etc. */
305
294
#define UNIV_WORD_ALIGNMENT     UNIV_WORD_SIZE
306
295
 
307
 
/* The maximum length of a table name. This is the MySQL limit and is
308
 
defined in mysql_com.h like NAME_CHAR_LEN*SYSTEM_CHARSET_MBMAXLEN, the
309
 
number does not include a terminating '\0'. InnoDB probably can handle
310
 
longer names internally */
311
 
#define MAX_TABLE_NAME_LEN      192
312
 
 
313
296
/*
314
297
                        DATABASE VERSION CONTROL
315
298
                        ========================
323
306
/* Maximum number of parallel threads in a parallelized operation */
324
307
#define UNIV_MAX_PARALLELISM    32
325
308
 
326
 
/* The maximum length of a table name. This is the MySQL limit and is
327
 
defined in mysql_com.h like NAME_CHAR_LEN*SYSTEM_CHARSET_MBMAXLEN, the
328
 
number does not include a terminating '\0'. InnoDB probably can handle
329
 
longer names internally */
330
 
#define MAX_TABLE_NAME_LEN      192
331
 
 
332
309
/*
333
310
                        UNIVERSAL TYPE DEFINITIONS
334
311
                        ==========================
393
370
/* The 'undefined' value for a ulint */
394
371
#define ULINT_UNDEFINED         ((ulint)(-1))
395
372
 
396
 
/** The bitmask of 32-bit unsigned integer */
397
 
#define ULINT32_MASK            0xFFFFFFFF
398
373
/* The undefined 32-bit unsigned integer */
399
 
#define ULINT32_UNDEFINED       ULINT32_MASK
 
374
#define ULINT32_UNDEFINED       0xFFFFFFFF
400
375
 
401
376
/* Maximum value for a ulint */
402
377
#define ULINT_MAX               ((ulint)(-2))
404
379
/* Maximum value for ib_uint64_t */
405
380
#define IB_ULONGLONG_MAX        ((ib_uint64_t) (~0ULL))
406
381
 
407
 
/** The generic InnoDB system object identifier data type */
408
 
typedef ib_uint64_t     ib_id_t;
409
 
 
410
 
/* THe 'undefined' value for ullint */
411
 
#define ULLINT_UNDEFINED        ((ullint)(-1))
412
 
 
413
382
/* This 'ibool' type is used within Innobase. Remember that different included
414
383
headers may define 'bool' differently. Do not assume that 'bool' is a ulint! */
415
384
#define ibool                   ulint