~fallenpegasus/drizzle/logcsv

« back to all changes in this revision

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

  • Committer: lbieber at stabletransit
  • Date: 2010-10-13 16:20:08 UTC
  • mfrom: (1843.1.3 build)
  • Revision ID: lbieber@drizzle-build-n02.wc1.dfw1.stabletransit.com-20101013162008-qi2e6k5yvfm16964
Merge Stewart - update innobase plugin to be based on innodb_plugin 1.0.6
Merge Monty - more valgrind cleanup
Merge Monty - Moved libdrizzle api listings from doxygen to sphinx

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
 
53
53
#define INNODB_VERSION_MAJOR    1
54
54
#define INNODB_VERSION_MINOR    0
55
 
#define INNODB_VERSION_BUGFIX   4
 
55
#define INNODB_VERSION_BUGFIX   6
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 in make_version_string() in sql/sql_show.cc like this:
 
59
calculated 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 */
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__
90
103
 
91
104
# include <windows.h>
92
105
 
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
 
 
98
106
# ifdef _NT_
99
107
#  define __NT__
100
108
# endif
113
121
#  endif /* UNIV_HOTBACKUP */
114
122
# endif
115
123
 
 
124
#ifdef HAVE_PTHREAD
 
125
#include <pthread.h>
 
126
#endif
 
127
 
116
128
/* Include <sys/stat.h> to get S_I... macros defined for os0file.c */
117
129
# include <sys/stat.h>
118
130
# if !defined(__NETWARE__) && !defined(__WIN__) 
119
131
#  include <sys/mman.h> /* mmap() for os0proc.c */
120
132
# endif
121
133
 
122
 
# undef PACKAGE
123
 
# undef VERSION
124
 
 
125
134
/* Include the header file generated by GNU autoconf */
126
135
# if !defined(__WIN__) && !defined(BUILD_DRIZZLE)
127
136
#  ifndef UNIV_HOTBACKUP
133
142
#  include <sched.h>
134
143
# endif
135
144
 
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
 
 
161
145
/* We only try to do explicit inlining of functions with gcc and
162
146
Sun Studio */
163
147
 
204
188
                                                debugging without UNIV_DEBUG */
205
189
#define UNIV_DEBUG                              /* Enable ut_ad() assertions
206
190
                                                and disable UNIV_INLINE */
 
191
#define UNIV_DEBUG_LOCK_VALIDATE                /* Enable
 
192
                                                ut_ad(lock_rec_validate_page())
 
193
                                                assertions. */
207
194
#define UNIV_DEBUG_FILE_ACCESSES                /* Debug .ibd file access
208
195
                                                (field file_page_was_freed
209
196
                                                in buf_page_t) */
210
197
#define UNIV_LRU_DEBUG                          /* debug the buffer pool LRU */
211
198
#define UNIV_HASH_DEBUG                         /* debug HASH_ macros */
212
199
#define UNIV_LIST_DEBUG                         /* debug UT_LIST_ macros */
 
200
#define UNIV_LOG_LSN_DEBUG                      /* write LSN to the redo log;
 
201
this will break redo log file compatibility, but it may be useful when
 
202
debugging redo log application problems. */
213
203
#define UNIV_MEM_DEBUG                          /* detect memory leaks etc */
214
204
#define UNIV_IBUF_DEBUG                         /* debug the insert buffer */
215
205
#define UNIV_IBUF_COUNT_DEBUG                   /* debug the insert buffer;
425
415
/* Minimize cache-miss latency by moving data at addr into a cache before
426
416
it is read or written. */
427
417
# define UNIV_PREFETCH_RW(addr) __builtin_prefetch(addr, 1, 3)
428
 
#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
 
418
/* Sun Studio includes sun_prefetch.h as of version 5.9 */
 
419
#elif (defined(__SUNPRO_C) && __SUNPRO_C >= 0x590) \
 
420
       || (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x590)
429
421
# include <sun_prefetch.h>
430
422
#if __SUNPRO_C >= 0x550
431
423
# undef UNIV_INTERN