1
0
mirror of https://github.com/MariaDB/server.git synced 2025-09-02 09:41:40 +03:00

Update to innoplug-1.0.4.

This commit is contained in:
Sergey Vojtovich
2009-07-30 17:42:56 +05:00
parent 058cd62565
commit bae6276d45
104 changed files with 5341 additions and 1173 deletions

View File

@@ -2,6 +2,7 @@
Copyright (c) 1994, 2009, Innobase Oy. All Rights Reserved.
Copyright (c) 2008, Google Inc.
Copyright (c) 2009, Sun Microsystems, Inc.
Portions of this file contain modifications contributed and copyrighted by
Google, Inc. Those modifications are gratefully acknowledged and are described
@@ -9,6 +10,12 @@ briefly in the InnoDB documentation. The contributions by Google are
incorporated with their permission, and subject to the conditions contained in
the file COPYING.Google.
Portions of this file contain modifications contributed and copyrighted by
Sun Microsystems, Inc. Those modifications are gratefully acknowledged and
are described briefly in the InnoDB documentation. The contributions by
Sun Microsystems are incorporated with their permission, and subject to the
conditions contained in the file COPYING.Sun_Microsystems.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; version 2 of the License.
@@ -33,6 +40,10 @@ Created 1/20/1994 Heikki Tuuri
#ifndef univ_i
#define univ_i
#ifdef UNIV_HOTBACKUP
#include "hb_univ.i"
#endif /* UNIV_HOTBACKUP */
#define INNODB_VERSION_MAJOR 1
#define INNODB_VERSION_MINOR 0
#define INNODB_VERSION_BUGFIX 4
@@ -89,8 +100,10 @@ the virtual method table (vtable) in GCC 3. */
in compiling more Posix-compatible. These headers also define __WIN__
if we are compiling on Windows. */
#ifndef UNIV_HOTBACKUP
# include <my_global.h>
# include <my_pthread.h>
#endif /* UNIV_HOTBACKUP */
/* Include <sys/stat.h> to get S_I... macros defined for os0file.c */
# include <sys/stat.h>
@@ -103,7 +116,9 @@ if we are compiling on Windows. */
/* Include the header file generated by GNU autoconf */
# ifndef __WIN__
# include "config.h"
#ifndef UNIV_HOTBACKUP
# include "config.h"
#endif /* UNIV_HOTBACKUP */
# endif
# ifdef HAVE_SCHED_H
@@ -136,9 +151,9 @@ from Makefile.in->ut0auxconf.h */
#endif /* HAVE_ATOMIC_BUILTINS */
/* We only try to do explicit inlining of functions with gcc and
Microsoft Visual C++ */
Sun Studio */
# if !defined(__GNUC__)
# if !defined(__GNUC__) && !(defined(__SUNPRO_C) || defined(__SUNPRO_CC))
# undef UNIV_MUST_NOT_INLINE /* Remove compiler warning */
# define UNIV_MUST_NOT_INLINE
# endif
@@ -236,10 +251,8 @@ by one. */
/* Linkage specifier for non-static InnoDB symbols (variables and functions)
that are only referenced from within InnoDB, not from MySQL */
#if defined(__GNUC__) && (__GNUC__ >= 4)
#if defined(__GNUC__) && (__GNUC__ >= 4) && !defined(UNIV_HOTBACKUP)
# define UNIV_INTERN __attribute__((visibility ("hidden")))
#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
# define UNIV_INTERN __hidden
#else
# define UNIV_INTERN
#endif
@@ -248,9 +261,11 @@ that are only referenced from within InnoDB, not from MySQL */
/* Definition for inline version */
#ifdef __WIN__
#define UNIV_INLINE __inline
# define UNIV_INLINE __inline
#elif defined(__SUNPRO_CC) || defined(__SUNPRO_C)
# define UNIV_INLINE static inline
#else
#define UNIV_INLINE static __inline__
# define UNIV_INLINE static __inline__
#endif
#else
@@ -327,13 +342,15 @@ typedef long int lint;
#ifdef __WIN__
typedef __int64 ib_int64_t;
typedef unsigned __int64 ib_uint64_t;
#else
#elif !defined(UNIV_HOTBACKUP)
/* Note: longlong and ulonglong come from MySQL headers. */
typedef longlong ib_int64_t;
typedef ulonglong ib_uint64_t;
#endif
#ifndef UNIV_HOTBACKUP
typedef unsigned long long int ullint;
#endif /* UNIV_HOTBACKUP */
#ifndef __WIN__
#if SIZEOF_LONG != SIZEOF_VOIDP
@@ -391,6 +408,17 @@ it is read. */
/* Minimize cache-miss latency by moving data at addr into a cache before
it is read or written. */
# define UNIV_PREFETCH_RW(addr) __builtin_prefetch(addr, 1, 3)
#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
# include <sun_prefetch.h>
#if __SUNPRO_C >= 0x550
# undef UNIV_INTERN
# define UNIV_INTERN __hidden
#endif /* __SUNPRO_C >= 0x550 */
/* Use sun_prefetch when compile with Sun Studio */
# define UNIV_EXPECT(expr,value) (expr)
# define UNIV_LIKELY_NULL(expr) (expr)
# define UNIV_PREFETCH_R(addr) sun_prefetch_read_many(addr)
# define UNIV_PREFETCH_RW(addr) sun_prefetch_write_many(addr)
#else
/* Dummy versions of the macros */
# define UNIV_EXPECT(expr,value) (expr)