~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Monty Taylor
  • Date: 2010-04-22 02:46:23 UTC
  • mto: (1497.3.4 enable-dtrace)
  • mto: This revision was merged to the branch mainline in revision 1527.
  • Revision ID: mordred@inaugust.com-20100422024623-4urw8fi8eraci08p
Don't overwrite the pandora_vc_revinfo file if we don't have new
authoratative information.

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.
 
3
Copyright (c) 1994, 2009, Innobase Oy. All Rights Reserved.
4
4
Copyright (c) 2008, Google Inc.
5
5
Copyright (c) 2009, Sun Microsystems, Inc.
6
6
 
25
25
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
26
26
 
27
27
You should have received a copy of the GNU General Public License along with
28
 
this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
29
 
St, Fifth Floor, Boston, MA 02110-1301 USA
 
28
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
 
29
Place, Suite 330, Boston, MA 02111-1307 USA
30
30
 
31
31
*****************************************************************************/
32
32
 
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   3
 
54
#define INNODB_VERSION_MINOR    0
 
55
#define INNODB_VERSION_BUGFIX   4
56
56
 
57
57
/* The following is the InnoDB version as shown in
58
58
SELECT plugin_version FROM information_schema.plugins;
59
 
calculated in make_version_string() in sql/sql_show.cc like this:
 
59
calculated in in make_version_string() in sql/sql_show.cc like this:
60
60
"version >> 8" . "version & 0xff"
61
61
because the version is shown with only one dot, we skip the last
62
62
component, i.e. we show M.N.P as M.N */
90
90
 
91
91
# include <windows.h>
92
92
 
 
93
# if defined(HAVE_WINDOWS_ATOMICS)
 
94
/* If atomics are defined we use them in InnoDB mutex implementation */
 
95
#  define HAVE_ATOMIC_BUILTINS
 
96
# endif /* HAVE_WINDOWS_ATOMICS */
 
97
 
93
98
# ifdef _NT_
94
99
#  define __NT__
95
100
# endif
108
113
#  endif /* UNIV_HOTBACKUP */
109
114
# endif
110
115
 
111
 
#ifdef HAVE_PTHREAD
112
 
#include <pthread.h>
113
 
#endif
114
 
 
115
116
/* Include <sys/stat.h> to get S_I... macros defined for os0file.c */
116
117
# include <sys/stat.h>
117
 
# if !defined(__WIN__) 
 
118
# if !defined(__NETWARE__) && !defined(__WIN__) 
118
119
#  include <sys/mman.h> /* mmap() for os0proc.c */
119
120
# endif
120
121
 
 
122
# undef PACKAGE
 
123
# undef VERSION
 
124
 
121
125
/* Include the header file generated by GNU autoconf */
122
126
# if !defined(__WIN__) && !defined(BUILD_DRIZZLE)
123
127
#  ifndef UNIV_HOTBACKUP
129
133
#  include <sched.h>
130
134
# endif
131
135
 
 
136
# if defined(HAVE_GCC_ATOMIC_BUILTINS) || defined(HAVE_SOLARIS_ATOMICS) \
 
137
     || defined(HAVE_WINDOWS_ATOMICS)
 
138
/* If atomics are defined we use them in InnoDB mutex implementation */
 
139
#  define HAVE_ATOMIC_BUILTINS
 
140
# endif /* (HAVE_GCC_ATOMIC_BUILTINS) || (HAVE_SOLARIS_ATOMICS)
 
141
        || (HAVE_WINDOWS_ATOMICS) */
 
142
 
 
143
/* For InnoDB rw_locks to work with atomics we need the thread_id
 
144
to be no more than machine word wide. The following enables using
 
145
atomics for InnoDB rw_locks where these conditions are met. */
 
146
#ifdef HAVE_ATOMIC_BUILTINS
 
147
/* if HAVE_ATOMIC_PTHREAD_T is defined at this point that means that
 
148
the code from plug.in has defined it and we do not need to include
 
149
ut0auxconf.h which would either define HAVE_ATOMIC_PTHREAD_T or will
 
150
be empty */
 
151
# ifndef HAVE_ATOMIC_PTHREAD_T
 
152
#  include "ut0auxconf.h"
 
153
# endif /* HAVE_ATOMIC_PTHREAD_T */
 
154
/* now HAVE_ATOMIC_PTHREAD_T is eventually defined either by plug.in or
 
155
from Makefile.in->ut0auxconf.h */
 
156
# ifdef HAVE_ATOMIC_PTHREAD_T
 
157
#  define INNODB_RW_LOCKS_USE_ATOMICS
 
158
# endif /* HAVE_ATOMIC_PTHREAD_T */
 
159
#endif /* HAVE_ATOMIC_BUILTINS */
 
160
 
132
161
/* We only try to do explicit inlining of functions with gcc and
133
162
Sun Studio */
134
163
 
137
166
#  define UNIV_MUST_NOT_INLINE
138
167
# endif
139
168
 
140
 
# if defined(__GNUC__)
141
 
#  define UNIV_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
142
 
#else
143
 
#  define UNIV_WARN_UNUSED_RESULT
144
 
#endif
145
 
 
146
169
# ifdef HAVE_PREAD
147
170
#  define HAVE_PWRITE
148
171
# endif
149
172
 
150
173
#endif /* #if (defined(WIN32) || ... */
151
174
 
152
 
/* Following defines are to enable performance schema
153
 
instrumentation in each of four InnoDB modules if
154
 
HAVE_PSI_INTERFACE is defined. */
155
 
#ifdef HAVE_PSI_INTERFACE
156
 
# define UNIV_PFS_MUTEX
157
 
# define UNIV_PFS_RWLOCK
158
 
/* For I/O instrumentation, performance schema rely
159
 
on a native descriptor to identify the file, this
160
 
descriptor could conflict with our OS level descriptor.
161
 
Disable IO instrumentation on Windows until this is
162
 
resolved */
163
 
# ifndef __WIN__
164
 
#  define UNIV_PFS_IO
165
 
# endif
166
 
# define UNIV_PFS_THREAD
167
 
#endif /* HAVE_PSI_INTERFACE */
168
 
 
169
175
/*                      DEBUG VERSION CONTROL
170
176
                        ===================== */
171
177
 
187
193
#define UNIV_COMPILE_TEST_FUNCS
188
194
*/
189
195
 
190
 
#if defined HAVE_VALGRIND
191
 
# define UNIV_DEBUG_VALGRIND
192
 
#endif /* HAVE_VALGRIND */
193
196
#if 0
194
197
#define UNIV_DEBUG_VALGRIND                     /* Enable extra
195
198
                                                Valgrind instrumentation */
201
204
                                                debugging without UNIV_DEBUG */
202
205
#define UNIV_DEBUG                              /* Enable ut_ad() assertions
203
206
                                                and disable UNIV_INLINE */
204
 
#define UNIV_DEBUG_LOCK_VALIDATE                /* Enable
205
 
                                                ut_ad(lock_rec_validate_page())
206
 
                                                assertions. */
207
207
#define UNIV_DEBUG_FILE_ACCESSES                /* Debug .ibd file access
208
208
                                                (field file_page_was_freed
209
209
                                                in buf_page_t) */
210
210
#define UNIV_LRU_DEBUG                          /* debug the buffer pool LRU */
211
211
#define UNIV_HASH_DEBUG                         /* debug HASH_ macros */
212
212
#define UNIV_LIST_DEBUG                         /* debug UT_LIST_ macros */
213
 
#define UNIV_LOG_LSN_DEBUG                      /* write LSN to the redo log;
214
 
this will break redo log file compatibility, but it may be useful when
215
 
debugging redo log application problems. */
216
213
#define UNIV_MEM_DEBUG                          /* detect memory leaks etc */
217
214
#define UNIV_IBUF_DEBUG                         /* debug the insert buffer */
218
215
#define UNIV_IBUF_COUNT_DEBUG                   /* debug the insert buffer;
233
230
                                                for compressed pages */
234
231
#define UNIV_ZIP_COPY                           /* call page_zip_copy_recs()
235
232
                                                more often */
236
 
#define UNIV_AIO_DEBUG                          /* prints info about
237
 
                                                submitted and reaped AIO
238
 
                                                requests to the log. */
239
233
#endif
240
234
 
241
235
#define UNIV_BTR_DEBUG                          /* check B-tree links */
242
236
#define UNIV_LIGHT_MEM_DEBUG                    /* light memory debugging */
243
237
 
244
 
#ifdef HAVE_VALGRIND
 
238
#ifdef HAVE_purify
245
239
/* The following sets all new allocated memory to zero before use:
246
240
this can be used to eliminate unnecessary Purify warnings, but note that
247
241
it also masks many bugs Purify could detect. For detailed Purify analysis it
257
251
                        /* the above option prevents forcing of log to disk
258
252
                        at a buffer page write: it should be tested with this
259
253
                        option off; also some ibuf tests are suppressed */
 
254
/*
 
255
#define UNIV_BASIC_LOG_DEBUG
 
256
*/
 
257
                        /* the above option enables basic recovery debugging:
 
258
                        new allocated file pages are reset */
260
259
 
261
260
/* Linkage specifier for non-static InnoDB symbols (variables and functions)
262
261
that are only referenced from within InnoDB, not from MySQL */
302
301
/* The following alignment is used in aligning lints etc. */
303
302
#define UNIV_WORD_ALIGNMENT     UNIV_WORD_SIZE
304
303
 
305
 
/* The maximum length of a table name. This is the MySQL limit and is
306
 
defined in mysql_com.h like NAME_CHAR_LEN*SYSTEM_CHARSET_MBMAXLEN, the
307
 
number does not include a terminating '\0'. InnoDB probably can handle
308
 
longer names internally */
309
 
#define MAX_TABLE_NAME_LEN      192
310
 
 
311
304
/*
312
305
                        DATABASE VERSION CONTROL
313
306
                        ========================
321
314
/* Maximum number of parallel threads in a parallelized operation */
322
315
#define UNIV_MAX_PARALLELISM    32
323
316
 
324
 
/* The maximum length of a table name. This is the MySQL limit and is
325
 
defined in mysql_com.h like NAME_CHAR_LEN*SYSTEM_CHARSET_MBMAXLEN, the
326
 
number does not include a terminating '\0'. InnoDB probably can handle
327
 
longer names internally */
328
 
#define MAX_TABLE_NAME_LEN      192
329
 
 
330
317
/*
331
318
                        UNIVERSAL TYPE DEFINITIONS
332
319
                        ==========================
391
378
/* The 'undefined' value for a ulint */
392
379
#define ULINT_UNDEFINED         ((ulint)(-1))
393
380
 
394
 
/** The bitmask of 32-bit unsigned integer */
395
 
#define ULINT32_MASK            0xFFFFFFFF
396
381
/* The undefined 32-bit unsigned integer */
397
 
#define ULINT32_UNDEFINED       ULINT32_MASK
 
382
#define ULINT32_UNDEFINED       0xFFFFFFFF
398
383
 
399
384
/* Maximum value for a ulint */
400
385
#define ULINT_MAX               ((ulint)(-2))
402
387
/* Maximum value for ib_uint64_t */
403
388
#define IB_ULONGLONG_MAX        ((ib_uint64_t) (~0ULL))
404
389
 
405
 
/** The generic InnoDB system object identifier data type */
406
 
typedef ib_uint64_t     ib_id_t;
407
 
 
408
390
/* This 'ibool' type is used within Innobase. Remember that different included
409
391
headers may define 'bool' differently. Do not assume that 'bool' is a ulint! */
410
392
#define ibool                   ulint
443
425
/* Minimize cache-miss latency by moving data at addr into a cache before
444
426
it is read or written. */
445
427
# define UNIV_PREFETCH_RW(addr) __builtin_prefetch(addr, 1, 3)
446
 
/* Sun Studio includes sun_prefetch.h as of version 5.9 */
447
 
#elif (defined(__SUNPRO_C) && __SUNPRO_C >= 0x590) \
448
 
       || (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x590)
 
428
#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
449
429
# include <sun_prefetch.h>
450
430
#if __SUNPRO_C >= 0x550
451
431
# undef UNIV_INTERN