--- /dev/null
+# 1 "buf/buf0buf.c"
+# 1 "<built-in>"
+# 1 "<command-line>"
+# 1 "buf/buf0buf.c"
+# 23 "buf/buf0buf.c"
+# 1 "./include/buf0buf.h" 1
+# 26 "./include/buf0buf.h"
+# 1 "./include/univ.i" 1
+# 33 "./include/univ.i"
+# 1 "./../include/my_global.h" 1
+# 83 "./../include/my_global.h"
+# 1 "./../include/my_config.h" 1
+# 84 "./../include/my_global.h" 2
+# 241 "./../include/my_global.h"
+# 1 "/usr/include/pthread.h" 1 3 4
+# 23 "/usr/include/pthread.h" 3 4
+# 1 "/usr/include/features.h" 1 3 4
+# 347 "/usr/include/features.h" 3 4
+# 1 "/usr/include/sys/cdefs.h" 1 3 4
+# 353 "/usr/include/sys/cdefs.h" 3 4
+# 1 "/usr/include/bits/wordsize.h" 1 3 4
+# 354 "/usr/include/sys/cdefs.h" 2 3 4
+# 348 "/usr/include/features.h" 2 3 4
+# 371 "/usr/include/features.h" 3 4
+# 1 "/usr/include/gnu/stubs.h" 1 3 4
+
+
+
+# 1 "/usr/include/bits/wordsize.h" 1 3 4
+# 5 "/usr/include/gnu/stubs.h" 2 3 4
+
+
+
+
+# 1 "/usr/include/gnu/stubs-64.h" 1 3 4
+# 10 "/usr/include/gnu/stubs.h" 2 3 4
+# 372 "/usr/include/features.h" 2 3 4
+# 24 "/usr/include/pthread.h" 2 3 4
+# 1 "/usr/include/endian.h" 1 3 4
+# 37 "/usr/include/endian.h" 3 4
+# 1 "/usr/include/bits/endian.h" 1 3 4
+# 38 "/usr/include/endian.h" 2 3 4
+# 61 "/usr/include/endian.h" 3 4
+# 1 "/usr/include/bits/byteswap.h" 1 3 4
+# 62 "/usr/include/endian.h" 2 3 4
+# 25 "/usr/include/pthread.h" 2 3 4
+# 1 "/usr/include/sched.h" 1 3 4
+# 26 "/usr/include/sched.h" 3 4
+# 1 "/usr/include/bits/types.h" 1 3 4
+# 28 "/usr/include/bits/types.h" 3 4
+# 1 "/usr/include/bits/wordsize.h" 1 3 4
+# 29 "/usr/include/bits/types.h" 2 3 4
+
+
+typedef unsigned char __u_char;
+typedef unsigned short int __u_short;
+typedef unsigned int __u_int;
+typedef unsigned long int __u_long;
+
+
+typedef signed char __int8_t;
+typedef unsigned char __uint8_t;
+typedef signed short int __int16_t;
+typedef unsigned short int __uint16_t;
+typedef signed int __int32_t;
+typedef unsigned int __uint32_t;
+
+typedef signed long int __int64_t;
+typedef unsigned long int __uint64_t;
+
+
+
+
+
+
+
+typedef long int __quad_t;
+typedef unsigned long int __u_quad_t;
+# 131 "/usr/include/bits/types.h" 3 4
+# 1 "/usr/include/bits/typesizes.h" 1 3 4
+# 132 "/usr/include/bits/types.h" 2 3 4
+
+
+typedef unsigned long int __dev_t;
+typedef unsigned int __uid_t;
+typedef unsigned int __gid_t;
+typedef unsigned long int __ino_t;
+typedef unsigned long int __ino64_t;
+typedef unsigned int __mode_t;
+typedef unsigned long int __nlink_t;
+typedef long int __off_t;
+typedef long int __off64_t;
+typedef int __pid_t;
+typedef struct { int __val[2]; } __fsid_t;
+typedef long int __clock_t;
+typedef unsigned long int __rlim_t;
+typedef unsigned long int __rlim64_t;
+typedef unsigned int __id_t;
+typedef long int __time_t;
+typedef unsigned int __useconds_t;
+typedef long int __suseconds_t;
+
+typedef int __daddr_t;
+typedef long int __swblk_t;
+typedef int __key_t;
+
+
+typedef int __clockid_t;
+
+
+typedef void * __timer_t;
+
+
+typedef long int __blksize_t;
+
+
+
+
+typedef long int __blkcnt_t;
+typedef long int __blkcnt64_t;
+
+
+typedef unsigned long int __fsblkcnt_t;
+typedef unsigned long int __fsblkcnt64_t;
+
+
+typedef unsigned long int __fsfilcnt_t;
+typedef unsigned long int __fsfilcnt64_t;
+
+typedef long int __ssize_t;
+
+
+
+typedef __off64_t __loff_t;
+typedef __quad_t *__qaddr_t;
+typedef char *__caddr_t;
+
+
+typedef long int __intptr_t;
+
+
+typedef unsigned int __socklen_t;
+# 27 "/usr/include/sched.h" 2 3 4
+
+
+# 1 "/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.4/include/stddef.h" 1 3 4
+# 214 "/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.4/include/stddef.h" 3 4
+typedef long unsigned int size_t;
+# 30 "/usr/include/sched.h" 2 3 4
+
+
+# 1 "/usr/include/time.h" 1 3 4
+# 120 "/usr/include/time.h" 3 4
+struct timespec
+ {
+ __time_t tv_sec;
+ long int tv_nsec;
+ };
+# 33 "/usr/include/sched.h" 2 3 4
+
+
+# 1 "/usr/include/bits/sched.h" 1 3 4
+# 71 "/usr/include/bits/sched.h" 3 4
+struct sched_param
+ {
+ int __sched_priority;
+ };
+
+
+
+
+
+extern int clone (int (*__fn) (void *__arg), void *__child_stack,
+ int __flags, void *__arg, ...) __attribute__ ((__nothrow__));
+
+
+extern int unshare (int __flags) __attribute__ ((__nothrow__));
+
+
+extern int sched_getcpu (void) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+
+
+
+
+struct __sched_param
+ {
+ int __sched_priority;
+ };
+# 113 "/usr/include/bits/sched.h" 3 4
+typedef unsigned long int __cpu_mask;
+
+
+
+
+
+
+typedef struct
+{
+ __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))];
+} cpu_set_t;
+# 196 "/usr/include/bits/sched.h" 3 4
+
+
+extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp)
+ __attribute__ ((__nothrow__));
+extern cpu_set_t *__sched_cpualloc (size_t __count) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
+extern void __sched_cpufree (cpu_set_t *__set) __attribute__ ((__nothrow__));
+
+
+# 36 "/usr/include/sched.h" 2 3 4
+
+
+
+
+
+
+
+extern int sched_setparam (__pid_t __pid, __const struct sched_param *__param)
+ __attribute__ ((__nothrow__));
+
+
+extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __attribute__ ((__nothrow__));
+
+
+extern int sched_setscheduler (__pid_t __pid, int __policy,
+ __const struct sched_param *__param) __attribute__ ((__nothrow__));
+
+
+extern int sched_getscheduler (__pid_t __pid) __attribute__ ((__nothrow__));
+
+
+extern int sched_yield (void) __attribute__ ((__nothrow__));
+
+
+extern int sched_get_priority_max (int __algorithm) __attribute__ ((__nothrow__));
+
+
+extern int sched_get_priority_min (int __algorithm) __attribute__ ((__nothrow__));
+
+
+extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __attribute__ ((__nothrow__));
+# 110 "/usr/include/sched.h" 3 4
+extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize,
+ __const cpu_set_t *__cpuset) __attribute__ ((__nothrow__));
+
+
+extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize,
+ cpu_set_t *__cpuset) __attribute__ ((__nothrow__));
+
+
+
+# 26 "/usr/include/pthread.h" 2 3 4
+# 1 "/usr/include/time.h" 1 3 4
+# 30 "/usr/include/time.h" 3 4
+
+
+
+
+
+
+
+
+# 1 "/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.4/include/stddef.h" 1 3 4
+# 39 "/usr/include/time.h" 2 3 4
+
+
+
+# 1 "/usr/include/bits/time.h" 1 3 4
+# 43 "/usr/include/time.h" 2 3 4
+# 58 "/usr/include/time.h" 3 4
+
+
+typedef __clock_t clock_t;
+
+
+
+# 74 "/usr/include/time.h" 3 4
+
+
+typedef __time_t time_t;
+
+
+
+# 92 "/usr/include/time.h" 3 4
+typedef __clockid_t clockid_t;
+# 104 "/usr/include/time.h" 3 4
+typedef __timer_t timer_t;
+# 131 "/usr/include/time.h" 3 4
+
+
+struct tm
+{
+ int tm_sec;
+ int tm_min;
+ int tm_hour;
+ int tm_mday;
+ int tm_mon;
+ int tm_year;
+ int tm_wday;
+ int tm_yday;
+ int tm_isdst;
+
+
+ long int tm_gmtoff;
+ __const char *tm_zone;
+
+
+
+
+};
+
+
+
+
+
+
+
+
+struct itimerspec
+ {
+ struct timespec it_interval;
+ struct timespec it_value;
+ };
+
+
+struct sigevent;
+
+
+
+
+
+typedef __pid_t pid_t;
+
+
+
+
+
+
+
+
+extern clock_t clock (void) __attribute__ ((__nothrow__));
+
+
+extern time_t time (time_t *__timer) __attribute__ ((__nothrow__));
+
+
+extern double difftime (time_t __time1, time_t __time0)
+ __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+
+extern time_t mktime (struct tm *__tp) __attribute__ ((__nothrow__));
+
+
+
+
+
+extern size_t strftime (char *__restrict __s, size_t __maxsize,
+ __const char *__restrict __format,
+ __const struct tm *__restrict __tp) __attribute__ ((__nothrow__));
+
+
+
+
+
+extern char *strptime (__const char *__restrict __s,
+ __const char *__restrict __fmt, struct tm *__tp)
+ __attribute__ ((__nothrow__));
+
+
+
+
+
+# 1 "/usr/include/xlocale.h" 1 3 4
+# 28 "/usr/include/xlocale.h" 3 4
+typedef struct __locale_struct
+{
+
+ struct locale_data *__locales[13];
+
+
+ const unsigned short int *__ctype_b;
+ const int *__ctype_tolower;
+ const int *__ctype_toupper;
+
+
+ const char *__names[13];
+} *__locale_t;
+
+
+typedef __locale_t locale_t;
+# 216 "/usr/include/time.h" 2 3 4
+
+extern size_t strftime_l (char *__restrict __s, size_t __maxsize,
+ __const char *__restrict __format,
+ __const struct tm *__restrict __tp,
+ __locale_t __loc) __attribute__ ((__nothrow__));
+
+
+
+extern char *strptime_l (__const char *__restrict __s,
+ __const char *__restrict __fmt, struct tm *__tp,
+ __locale_t __loc) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+extern struct tm *gmtime (__const time_t *__timer) __attribute__ ((__nothrow__));
+
+
+
+extern struct tm *localtime (__const time_t *__timer) __attribute__ ((__nothrow__));
+
+
+
+
+
+extern struct tm *gmtime_r (__const time_t *__restrict __timer,
+ struct tm *__restrict __tp) __attribute__ ((__nothrow__));
+
+
+
+extern struct tm *localtime_r (__const time_t *__restrict __timer,
+ struct tm *__restrict __tp) __attribute__ ((__nothrow__));
+
+
+
+
+
+extern char *asctime (__const struct tm *__tp) __attribute__ ((__nothrow__));
+
+
+extern char *ctime (__const time_t *__timer) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+
+extern char *asctime_r (__const struct tm *__restrict __tp,
+ char *__restrict __buf) __attribute__ ((__nothrow__));
+
+
+extern char *ctime_r (__const time_t *__restrict __timer,
+ char *__restrict __buf) __attribute__ ((__nothrow__));
+
+
+
+
+extern char *__tzname[2];
+extern int __daylight;
+extern long int __timezone;
+
+
+
+
+extern char *tzname[2];
+
+
+
+extern void tzset (void) __attribute__ ((__nothrow__));
+
+
+
+extern int daylight;
+extern long int timezone;
+
+
+
+
+
+extern int stime (__const time_t *__when) __attribute__ ((__nothrow__));
+# 313 "/usr/include/time.h" 3 4
+extern time_t timegm (struct tm *__tp) __attribute__ ((__nothrow__));
+
+
+extern time_t timelocal (struct tm *__tp) __attribute__ ((__nothrow__));
+
+
+extern int dysize (int __year) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+# 328 "/usr/include/time.h" 3 4
+extern int nanosleep (__const struct timespec *__requested_time,
+ struct timespec *__remaining);
+
+
+
+extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __attribute__ ((__nothrow__));
+
+
+extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __attribute__ ((__nothrow__));
+
+
+extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp)
+ __attribute__ ((__nothrow__));
+
+
+
+
+
+
+extern int clock_nanosleep (clockid_t __clock_id, int __flags,
+ __const struct timespec *__req,
+ struct timespec *__rem);
+
+
+extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __attribute__ ((__nothrow__));
+
+
+
+
+extern int timer_create (clockid_t __clock_id,
+ struct sigevent *__restrict __evp,
+ timer_t *__restrict __timerid) __attribute__ ((__nothrow__));
+
+
+extern int timer_delete (timer_t __timerid) __attribute__ ((__nothrow__));
+
+
+extern int timer_settime (timer_t __timerid, int __flags,
+ __const struct itimerspec *__restrict __value,
+ struct itimerspec *__restrict __ovalue) __attribute__ ((__nothrow__));
+
+
+extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)
+ __attribute__ ((__nothrow__));
+
+
+extern int timer_getoverrun (timer_t __timerid) __attribute__ ((__nothrow__));
+# 390 "/usr/include/time.h" 3 4
+extern int getdate_err;
+# 399 "/usr/include/time.h" 3 4
+extern struct tm *getdate (__const char *__string);
+# 413 "/usr/include/time.h" 3 4
+extern int getdate_r (__const char *__restrict __string,
+ struct tm *__restrict __resbufp);
+
+
+
+# 27 "/usr/include/pthread.h" 2 3 4
+
+
+# 1 "/usr/include/signal.h" 1 3 4
+# 31 "/usr/include/signal.h" 3 4
+
+
+# 1 "/usr/include/bits/sigset.h" 1 3 4
+# 24 "/usr/include/bits/sigset.h" 3 4
+typedef int __sig_atomic_t;
+
+
+
+
+typedef struct
+ {
+ unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
+ } __sigset_t;
+# 34 "/usr/include/signal.h" 2 3 4
+# 50 "/usr/include/signal.h" 3 4
+typedef __sigset_t sigset_t;
+# 408 "/usr/include/signal.h" 3 4
+
+# 30 "/usr/include/pthread.h" 2 3 4
+# 1 "/usr/include/bits/pthreadtypes.h" 1 3 4
+# 24 "/usr/include/bits/pthreadtypes.h" 3 4
+# 1 "/usr/include/bits/wordsize.h" 1 3 4
+# 25 "/usr/include/bits/pthreadtypes.h" 2 3 4
+# 51 "/usr/include/bits/pthreadtypes.h" 3 4
+typedef unsigned long int pthread_t;
+
+
+typedef union
+{
+ char __size[56];
+ long int __align;
+} pthread_attr_t;
+
+
+
+typedef struct __pthread_internal_list
+{
+ struct __pthread_internal_list *__prev;
+ struct __pthread_internal_list *__next;
+} __pthread_list_t;
+# 77 "/usr/include/bits/pthreadtypes.h" 3 4
+typedef union
+{
+ struct __pthread_mutex_s
+ {
+ int __lock;
+ unsigned int __count;
+ int __owner;
+
+ unsigned int __nusers;
+
+
+
+ int __kind;
+
+ int __spins;
+ __pthread_list_t __list;
+# 102 "/usr/include/bits/pthreadtypes.h" 3 4
+ } __data;
+ char __size[40];
+ long int __align;
+} pthread_mutex_t;
+
+typedef union
+{
+ char __size[4];
+ int __align;
+} pthread_mutexattr_t;
+
+
+
+
+typedef union
+{
+ struct
+ {
+ int __lock;
+ unsigned int __futex;
+ __extension__ unsigned long long int __total_seq;
+ __extension__ unsigned long long int __wakeup_seq;
+ __extension__ unsigned long long int __woken_seq;
+ void *__mutex;
+ unsigned int __nwaiters;
+ unsigned int __broadcast_seq;
+ } __data;
+ char __size[48];
+ __extension__ long long int __align;
+} pthread_cond_t;
+
+typedef union
+{
+ char __size[4];
+ int __align;
+} pthread_condattr_t;
+
+
+
+typedef unsigned int pthread_key_t;
+
+
+
+typedef int pthread_once_t;
+
+
+
+
+
+typedef union
+{
+
+ struct
+ {
+ int __lock;
+ unsigned int __nr_readers;
+ unsigned int __readers_wakeup;
+ unsigned int __writer_wakeup;
+ unsigned int __nr_readers_queued;
+ unsigned int __nr_writers_queued;
+ int __writer;
+ int __shared;
+ unsigned long int __pad1;
+ unsigned long int __pad2;
+
+
+ unsigned int __flags;
+ } __data;
+# 188 "/usr/include/bits/pthreadtypes.h" 3 4
+ char __size[56];
+ long int __align;
+} pthread_rwlock_t;
+
+typedef union
+{
+ char __size[8];
+ long int __align;
+} pthread_rwlockattr_t;
+
+
+
+
+
+typedef volatile int pthread_spinlock_t;
+
+
+
+
+typedef union
+{
+ char __size[32];
+ long int __align;
+} pthread_barrier_t;
+
+typedef union
+{
+ char __size[4];
+ int __align;
+} pthread_barrierattr_t;
+# 31 "/usr/include/pthread.h" 2 3 4
+# 1 "/usr/include/bits/setjmp.h" 1 3 4
+# 33 "/usr/include/bits/setjmp.h" 3 4
+# 1 "/usr/include/bits/wordsize.h" 1 3 4
+# 34 "/usr/include/bits/setjmp.h" 2 3 4
+# 44 "/usr/include/bits/setjmp.h" 3 4
+typedef long int __jmp_buf[64] __attribute__ ((__aligned__ (16)));
+# 32 "/usr/include/pthread.h" 2 3 4
+# 1 "/usr/include/bits/wordsize.h" 1 3 4
+# 33 "/usr/include/pthread.h" 2 3 4
+
+
+
+enum
+{
+ PTHREAD_CREATE_JOINABLE,
+
+ PTHREAD_CREATE_DETACHED
+
+};
+
+
+
+enum
+{
+ PTHREAD_MUTEX_TIMED_NP,
+ PTHREAD_MUTEX_RECURSIVE_NP,
+ PTHREAD_MUTEX_ERRORCHECK_NP,
+ PTHREAD_MUTEX_ADAPTIVE_NP
+
+ ,
+ PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP,
+ PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP,
+ PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP,
+ PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL
+
+
+
+ , PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_TIMED_NP
+
+};
+
+
+
+
+enum
+{
+ PTHREAD_MUTEX_STALLED,
+ PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED,
+ PTHREAD_MUTEX_ROBUST,
+ PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST
+};
+
+
+
+
+
+enum
+{
+ PTHREAD_PRIO_NONE,
+ PTHREAD_PRIO_INHERIT,
+ PTHREAD_PRIO_PROTECT
+};
+# 117 "/usr/include/pthread.h" 3 4
+enum
+{
+ PTHREAD_RWLOCK_PREFER_READER_NP,
+ PTHREAD_RWLOCK_PREFER_WRITER_NP,
+ PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,
+ PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP
+};
+# 149 "/usr/include/pthread.h" 3 4
+enum
+{
+ PTHREAD_INHERIT_SCHED,
+
+ PTHREAD_EXPLICIT_SCHED
+
+};
+
+
+
+enum
+{
+ PTHREAD_SCOPE_SYSTEM,
+
+ PTHREAD_SCOPE_PROCESS
+
+};
+
+
+
+enum
+{
+ PTHREAD_PROCESS_PRIVATE,
+
+ PTHREAD_PROCESS_SHARED
+
+};
+# 184 "/usr/include/pthread.h" 3 4
+struct _pthread_cleanup_buffer
+{
+ void (*__routine) (void *);
+ void *__arg;
+ int __canceltype;
+ struct _pthread_cleanup_buffer *__prev;
+};
+
+
+enum
+{
+ PTHREAD_CANCEL_ENABLE,
+
+ PTHREAD_CANCEL_DISABLE
+
+};
+enum
+{
+ PTHREAD_CANCEL_DEFERRED,
+
+ PTHREAD_CANCEL_ASYNCHRONOUS
+
+};
+# 222 "/usr/include/pthread.h" 3 4
+
+
+
+
+
+extern int pthread_create (pthread_t *__restrict __newthread,
+ __const pthread_attr_t *__restrict __attr,
+ void *(*__start_routine) (void *),
+ void *__restrict __arg) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3)));
+
+
+
+
+
+extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__));
+
+
+
+
+
+
+
+extern int pthread_join (pthread_t __th, void **__thread_return);
+
+
+
+
+extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+
+extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return,
+ __const struct timespec *__abstime);
+
+
+
+
+
+
+extern int pthread_detach (pthread_t __th) __attribute__ ((__nothrow__));
+
+
+
+extern pthread_t pthread_self (void) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+
+extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+
+extern int pthread_attr_init (pthread_attr_t *__attr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int pthread_attr_destroy (pthread_attr_t *__attr)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr,
+ int *__detachstate)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+extern int pthread_attr_setdetachstate (pthread_attr_t *__attr,
+ int __detachstate)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+extern int pthread_attr_getguardsize (__const pthread_attr_t *__attr,
+ size_t *__guardsize)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+extern int pthread_attr_setguardsize (pthread_attr_t *__attr,
+ size_t __guardsize)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict
+ __attr,
+ struct sched_param *__restrict __param)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr,
+ __const struct sched_param *__restrict
+ __param) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict
+ __attr, int *__restrict __policy)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict
+ __attr, int *__restrict __inherit)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+extern int pthread_attr_setinheritsched (pthread_attr_t *__attr,
+ int __inherit)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr,
+ int *__restrict __scope)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict
+ __attr, void **__restrict __stackaddr)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__deprecated__));
+
+
+
+
+
+extern int pthread_attr_setstackaddr (pthread_attr_t *__attr,
+ void *__stackaddr)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__));
+
+
+extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict
+ __attr, size_t *__restrict __stacksize)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+
+extern int pthread_attr_setstacksize (pthread_attr_t *__attr,
+ size_t __stacksize)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr,
+ void **__restrict __stackaddr,
+ size_t *__restrict __stacksize)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2, 3)));
+
+
+
+
+extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr,
+ size_t __stacksize) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr,
+ size_t __cpusetsize,
+ __const cpu_set_t *__cpuset)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3)));
+
+
+
+extern int pthread_attr_getaffinity_np (__const pthread_attr_t *__attr,
+ size_t __cpusetsize,
+ cpu_set_t *__cpuset)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3)));
+
+
+
+
+
+extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
+
+
+
+
+
+
+
+extern int pthread_setschedparam (pthread_t __target_thread, int __policy,
+ __const struct sched_param *__param)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3)));
+
+
+extern int pthread_getschedparam (pthread_t __target_thread,
+ int *__restrict __policy,
+ struct sched_param *__restrict __param)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3)));
+
+
+extern int pthread_setschedprio (pthread_t __target_thread, int __prio)
+ __attribute__ ((__nothrow__));
+
+
+
+
+extern int pthread_getconcurrency (void) __attribute__ ((__nothrow__));
+
+
+extern int pthread_setconcurrency (int __level) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+
+extern int pthread_yield (void) __attribute__ ((__nothrow__));
+
+
+
+
+extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize,
+ __const cpu_set_t *__cpuset)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3)));
+
+
+extern int pthread_getaffinity_np (pthread_t __th, size_t __cpusetsize,
+ cpu_set_t *__cpuset)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3)));
+# 468 "/usr/include/pthread.h" 3 4
+extern int pthread_once (pthread_once_t *__once_control,
+ void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2)));
+# 480 "/usr/include/pthread.h" 3 4
+extern int pthread_setcancelstate (int __state, int *__oldstate);
+
+
+
+extern int pthread_setcanceltype (int __type, int *__oldtype);
+
+
+extern int pthread_cancel (pthread_t __th);
+
+
+
+
+extern void pthread_testcancel (void);
+
+
+
+
+typedef struct
+{
+ struct
+ {
+ __jmp_buf __cancel_jmp_buf;
+ int __mask_was_saved;
+ } __cancel_jmp_buf[1];
+ void *__pad[4];
+} __pthread_unwind_buf_t __attribute__ ((__aligned__));
+# 514 "/usr/include/pthread.h" 3 4
+struct __pthread_cleanup_frame
+{
+ void (*__cancel_routine) (void *);
+ void *__cancel_arg;
+ int __do_it;
+ int __cancel_type;
+};
+# 654 "/usr/include/pthread.h" 3 4
+extern void __pthread_register_cancel (__pthread_unwind_buf_t *__buf)
+ ;
+# 666 "/usr/include/pthread.h" 3 4
+extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf)
+ ;
+# 689 "/usr/include/pthread.h" 3 4
+extern void __pthread_register_cancel_defer (__pthread_unwind_buf_t *__buf)
+ ;
+# 702 "/usr/include/pthread.h" 3 4
+extern void __pthread_unregister_cancel_restore (__pthread_unwind_buf_t *__buf)
+ ;
+
+
+
+extern void __pthread_unwind_next (__pthread_unwind_buf_t *__buf)
+ __attribute__ ((__noreturn__))
+
+ __attribute__ ((__weak__))
+
+ ;
+
+
+
+struct __jmp_buf_tag;
+extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __attribute__ ((__nothrow__));
+
+
+
+
+
+extern int pthread_mutex_init (pthread_mutex_t *__mutex,
+ __const pthread_mutexattr_t *__mutexattr)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int pthread_mutex_destroy (pthread_mutex_t *__mutex)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int pthread_mutex_trylock (pthread_mutex_t *__mutex)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int pthread_mutex_lock (pthread_mutex_t *__mutex)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,
+ __const struct timespec *__restrict
+ __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+extern int pthread_mutex_unlock (pthread_mutex_t *__mutex)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+extern int pthread_mutex_getprioceiling (__const pthread_mutex_t *
+ __restrict __mutex,
+ int *__restrict __prioceiling)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex,
+ int __prioceiling,
+ int *__restrict __old_ceiling)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3)));
+
+
+
+
+
+extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+# 782 "/usr/include/pthread.h" 3 4
+extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t *
+ __restrict __attr,
+ int *__restrict __pshared)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr,
+ int __pshared)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict
+ __attr, int *__restrict __kind)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+
+extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int pthread_mutexattr_getprotocol (__const pthread_mutexattr_t *
+ __restrict __attr,
+ int *__restrict __protocol)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr,
+ int __protocol)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int pthread_mutexattr_getprioceiling (__const pthread_mutexattr_t *
+ __restrict __attr,
+ int *__restrict __prioceiling)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr,
+ int __prioceiling)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+extern int pthread_mutexattr_getrobust (__const pthread_mutexattr_t *__attr,
+ int *__robustness)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+extern int pthread_mutexattr_getrobust_np (__const pthread_mutexattr_t *__attr,
+ int *__robustness)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr,
+ int __robustness)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr,
+ int __robustness)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+# 864 "/usr/include/pthread.h" 3 4
+extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock,
+ __const pthread_rwlockattr_t *__restrict
+ __attr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
+ __const struct timespec *__restrict
+ __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
+ __const struct timespec *__restrict
+ __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t *
+ __restrict __attr,
+ int *__restrict __pshared)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr,
+ int __pshared)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int pthread_rwlockattr_getkind_np (__const pthread_rwlockattr_t *
+ __restrict __attr,
+ int *__restrict __pref)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr,
+ int __pref) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+
+
+extern int pthread_cond_init (pthread_cond_t *__restrict __cond,
+ __const pthread_condattr_t *__restrict
+ __cond_attr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int pthread_cond_destroy (pthread_cond_t *__cond)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int pthread_cond_signal (pthread_cond_t *__cond)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int pthread_cond_broadcast (pthread_cond_t *__cond)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+
+extern int pthread_cond_wait (pthread_cond_t *__restrict __cond,
+ pthread_mutex_t *__restrict __mutex)
+ __attribute__ ((__nonnull__ (1, 2)));
+# 976 "/usr/include/pthread.h" 3 4
+extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,
+ pthread_mutex_t *__restrict __mutex,
+ __const struct timespec *__restrict
+ __abstime) __attribute__ ((__nonnull__ (1, 2, 3)));
+
+
+
+
+extern int pthread_condattr_init (pthread_condattr_t *__attr)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int pthread_condattr_destroy (pthread_condattr_t *__attr)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int pthread_condattr_getpshared (__const pthread_condattr_t *
+ __restrict __attr,
+ int *__restrict __pshared)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+extern int pthread_condattr_setpshared (pthread_condattr_t *__attr,
+ int __pshared) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+extern int pthread_condattr_getclock (__const pthread_condattr_t *
+ __restrict __attr,
+ __clockid_t *__restrict __clock_id)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+extern int pthread_condattr_setclock (pthread_condattr_t *__attr,
+ __clockid_t __clock_id)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+# 1020 "/usr/include/pthread.h" 3 4
+extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int pthread_spin_destroy (pthread_spinlock_t *__lock)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int pthread_spin_lock (pthread_spinlock_t *__lock)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int pthread_spin_trylock (pthread_spinlock_t *__lock)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int pthread_spin_unlock (pthread_spinlock_t *__lock)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+
+extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier,
+ __const pthread_barrierattr_t *__restrict
+ __attr, unsigned int __count)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int pthread_barrier_destroy (pthread_barrier_t *__barrier)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int pthread_barrier_wait (pthread_barrier_t *__barrier)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t *
+ __restrict __attr,
+ int *__restrict __pshared)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr,
+ int __pshared)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+# 1087 "/usr/include/pthread.h" 3 4
+extern int pthread_key_create (pthread_key_t *__key,
+ void (*__destr_function) (void *))
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int pthread_key_delete (pthread_key_t __key) __attribute__ ((__nothrow__));
+
+
+extern void *pthread_getspecific (pthread_key_t __key) __attribute__ ((__nothrow__));
+
+
+extern int pthread_setspecific (pthread_key_t __key,
+ __const void *__pointer) __attribute__ ((__nothrow__)) ;
+
+
+
+
+extern int pthread_getcpuclockid (pthread_t __thread_id,
+ __clockid_t *__clock_id)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
+# 1121 "/usr/include/pthread.h" 3 4
+extern int pthread_atfork (void (*__prepare) (void),
+ void (*__parent) (void),
+ void (*__child) (void)) __attribute__ ((__nothrow__));
+
+
+
+
+extern __inline int
+__attribute__ ((__nothrow__)) pthread_equal (pthread_t __thread1, pthread_t __thread2)
+{
+ return __thread1 == __thread2;
+}
+
+
+
+# 242 "./../include/my_global.h" 2
+# 311 "./../include/my_global.h"
+# 1 "/usr/include/stdio.h" 1 3 4
+# 30 "/usr/include/stdio.h" 3 4
+
+
+
+
+# 1 "/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.4/include/stddef.h" 1 3 4
+# 35 "/usr/include/stdio.h" 2 3 4
+# 45 "/usr/include/stdio.h" 3 4
+struct _IO_FILE;
+
+
+
+typedef struct _IO_FILE FILE;
+
+
+
+
+
+# 65 "/usr/include/stdio.h" 3 4
+typedef struct _IO_FILE __FILE;
+# 75 "/usr/include/stdio.h" 3 4
+# 1 "/usr/include/libio.h" 1 3 4
+# 32 "/usr/include/libio.h" 3 4
+# 1 "/usr/include/_G_config.h" 1 3 4
+# 15 "/usr/include/_G_config.h" 3 4
+# 1 "/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.4/include/stddef.h" 1 3 4
+# 16 "/usr/include/_G_config.h" 2 3 4
+
+
+
+
+# 1 "/usr/include/wchar.h" 1 3 4
+# 83 "/usr/include/wchar.h" 3 4
+typedef struct
+{
+ int __count;
+ union
+ {
+
+ unsigned int __wch;
+
+
+
+ char __wchb[4];
+ } __value;
+} __mbstate_t;
+# 21 "/usr/include/_G_config.h" 2 3 4
+
+typedef struct
+{
+ __off_t __pos;
+ __mbstate_t __state;
+} _G_fpos_t;
+typedef struct
+{
+ __off64_t __pos;
+ __mbstate_t __state;
+} _G_fpos64_t;
+# 53 "/usr/include/_G_config.h" 3 4
+typedef int _G_int16_t __attribute__ ((__mode__ (__HI__)));
+typedef int _G_int32_t __attribute__ ((__mode__ (__SI__)));
+typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__)));
+typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));
+# 33 "/usr/include/libio.h" 2 3 4
+# 53 "/usr/include/libio.h" 3 4
+# 1 "/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.4/include/stdarg.h" 1 3 4
+# 43 "/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.4/include/stdarg.h" 3 4
+typedef __builtin_va_list __gnuc_va_list;
+# 54 "/usr/include/libio.h" 2 3 4
+# 170 "/usr/include/libio.h" 3 4
+struct _IO_jump_t; struct _IO_FILE;
+# 180 "/usr/include/libio.h" 3 4
+typedef void _IO_lock_t;
+
+
+
+
+
+struct _IO_marker {
+ struct _IO_marker *_next;
+ struct _IO_FILE *_sbuf;
+
+
+
+ int _pos;
+# 203 "/usr/include/libio.h" 3 4
+};
+
+
+enum __codecvt_result
+{
+ __codecvt_ok,
+ __codecvt_partial,
+ __codecvt_error,
+ __codecvt_noconv
+};
+# 271 "/usr/include/libio.h" 3 4
+struct _IO_FILE {
+ int _flags;
+
+
+
+
+ char* _IO_read_ptr;
+ char* _IO_read_end;
+ char* _IO_read_base;
+ char* _IO_write_base;
+ char* _IO_write_ptr;
+ char* _IO_write_end;
+ char* _IO_buf_base;
+ char* _IO_buf_end;
+
+ char *_IO_save_base;
+ char *_IO_backup_base;
+ char *_IO_save_end;
+
+ struct _IO_marker *_markers;
+
+ struct _IO_FILE *_chain;
+
+ int _fileno;
+
+
+
+ int _flags2;
+
+ __off_t _old_offset;
+
+
+
+ unsigned short _cur_column;
+ signed char _vtable_offset;
+ char _shortbuf[1];
+
+
+
+ _IO_lock_t *_lock;
+# 319 "/usr/include/libio.h" 3 4
+ __off64_t _offset;
+# 328 "/usr/include/libio.h" 3 4
+ void *__pad1;
+ void *__pad2;
+ void *__pad3;
+ void *__pad4;
+ size_t __pad5;
+
+ int _mode;
+
+ char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)];
+
+};
+
+
+typedef struct _IO_FILE _IO_FILE;
+
+
+struct _IO_FILE_plus;
+
+extern struct _IO_FILE_plus _IO_2_1_stdin_;
+extern struct _IO_FILE_plus _IO_2_1_stdout_;
+extern struct _IO_FILE_plus _IO_2_1_stderr_;
+# 364 "/usr/include/libio.h" 3 4
+typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes);
+
+
+
+
+
+
+
+typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf,
+ size_t __n);
+
+
+
+
+
+
+
+typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w);
+
+
+typedef int __io_close_fn (void *__cookie);
+
+
+
+
+typedef __io_read_fn cookie_read_function_t;
+typedef __io_write_fn cookie_write_function_t;
+typedef __io_seek_fn cookie_seek_function_t;
+typedef __io_close_fn cookie_close_function_t;
+
+
+typedef struct
+{
+ __io_read_fn *read;
+ __io_write_fn *write;
+ __io_seek_fn *seek;
+ __io_close_fn *close;
+} _IO_cookie_io_functions_t;
+typedef _IO_cookie_io_functions_t cookie_io_functions_t;
+
+struct _IO_cookie_file;
+
+
+extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write,
+ void *__cookie, _IO_cookie_io_functions_t __fns);
+
+
+
+
+
+
+
+extern int __underflow (_IO_FILE *);
+extern int __uflow (_IO_FILE *);
+extern int __overflow (_IO_FILE *, int);
+# 458 "/usr/include/libio.h" 3 4
+extern int _IO_getc (_IO_FILE *__fp);
+extern int _IO_putc (int __c, _IO_FILE *__fp);
+extern int _IO_feof (_IO_FILE *__fp) __attribute__ ((__nothrow__));
+extern int _IO_ferror (_IO_FILE *__fp) __attribute__ ((__nothrow__));
+
+extern int _IO_peekc_locked (_IO_FILE *__fp);
+
+
+
+
+
+extern void _IO_flockfile (_IO_FILE *) __attribute__ ((__nothrow__));
+extern void _IO_funlockfile (_IO_FILE *) __attribute__ ((__nothrow__));
+extern int _IO_ftrylockfile (_IO_FILE *) __attribute__ ((__nothrow__));
+# 488 "/usr/include/libio.h" 3 4
+extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict,
+ __gnuc_va_list, int *__restrict);
+extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict,
+ __gnuc_va_list);
+extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t);
+extern size_t _IO_sgetn (_IO_FILE *, void *, size_t);
+
+extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int);
+extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int);
+
+extern void _IO_free_backup_area (_IO_FILE *) __attribute__ ((__nothrow__));
+# 76 "/usr/include/stdio.h" 2 3 4
+
+
+
+
+typedef __gnuc_va_list va_list;
+# 89 "/usr/include/stdio.h" 3 4
+
+
+typedef _G_fpos_t fpos_t;
+
+
+
+
+
+typedef _G_fpos64_t fpos64_t;
+# 141 "/usr/include/stdio.h" 3 4
+# 1 "/usr/include/bits/stdio_lim.h" 1 3 4
+# 142 "/usr/include/stdio.h" 2 3 4
+
+
+
+extern struct _IO_FILE *stdin;
+extern struct _IO_FILE *stdout;
+extern struct _IO_FILE *stderr;
+
+
+
+
+
+
+
+extern int remove (__const char *__filename) __attribute__ ((__nothrow__));
+
+extern int rename (__const char *__old, __const char *__new) __attribute__ ((__nothrow__));
+
+
+
+
+extern int renameat (int __oldfd, __const char *__old, int __newfd,
+ __const char *__new) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+
+
+extern FILE *tmpfile (void) __attribute__ ((__warn_unused_result__));
+# 182 "/usr/include/stdio.h" 3 4
+extern FILE *tmpfile64 (void) __attribute__ ((__warn_unused_result__));
+
+
+
+extern char *tmpnam (char *__s) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
+# 204 "/usr/include/stdio.h" 3 4
+extern char *tempnam (__const char *__dir, __const char *__pfx)
+ __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+
+
+
+extern int fclose (FILE *__stream);
+
+
+
+
+extern int fflush (FILE *__stream);
+
+# 229 "/usr/include/stdio.h" 3 4
+extern int fflush_unlocked (FILE *__stream);
+# 239 "/usr/include/stdio.h" 3 4
+extern int fcloseall (void);
+
+
+
+
+
+
+
+
+
+extern FILE *fopen (__const char *__restrict __filename,
+ __const char *__restrict __modes) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern FILE *freopen (__const char *__restrict __filename,
+ __const char *__restrict __modes,
+ FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
+# 272 "/usr/include/stdio.h" 3 4
+
+
+extern FILE *fopen64 (__const char *__restrict __filename,
+ __const char *__restrict __modes) __attribute__ ((__warn_unused_result__));
+extern FILE *freopen64 (__const char *__restrict __filename,
+ __const char *__restrict __modes,
+ FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern FILE *fdopen (int __fd, __const char *__modes) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+extern FILE *fopencookie (void *__restrict __magic_cookie,
+ __const char *__restrict __modes,
+ _IO_cookie_io_functions_t __io_funcs) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes)
+ __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+
+extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__));
+
+
+
+extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
+ int __modes, size_t __n) __attribute__ ((__nothrow__));
+
+
+
+
+
+extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
+ size_t __size) __attribute__ ((__nothrow__));
+
+
+extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+
+
+extern int fprintf (FILE *__restrict __stream,
+ __const char *__restrict __format, ...);
+
+
+
+
+extern int printf (__const char *__restrict __format, ...);
+
+extern int sprintf (char *__restrict __s,
+ __const char *__restrict __format, ...) __attribute__ ((__nothrow__));
+
+
+
+
+
+extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format,
+ __gnuc_va_list __arg);
+
+
+
+
+extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg);
+
+extern int vsprintf (char *__restrict __s, __const char *__restrict __format,
+ __gnuc_va_list __arg) __attribute__ ((__nothrow__));
+
+
+
+
+
+extern int snprintf (char *__restrict __s, size_t __maxlen,
+ __const char *__restrict __format, ...)
+ __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4)));
+
+extern int vsnprintf (char *__restrict __s, size_t __maxlen,
+ __const char *__restrict __format, __gnuc_va_list __arg)
+ __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0)));
+
+
+
+
+
+
+extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f,
+ __gnuc_va_list __arg)
+ __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0))) __attribute__ ((__warn_unused_result__));
+extern int __asprintf (char **__restrict __ptr,
+ __const char *__restrict __fmt, ...)
+ __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__));
+extern int asprintf (char **__restrict __ptr,
+ __const char *__restrict __fmt, ...)
+ __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__));
+# 394 "/usr/include/stdio.h" 3 4
+extern int vdprintf (int __fd, __const char *__restrict __fmt,
+ __gnuc_va_list __arg)
+ __attribute__ ((__format__ (__printf__, 2, 0)));
+extern int dprintf (int __fd, __const char *__restrict __fmt, ...)
+ __attribute__ ((__format__ (__printf__, 2, 3)));
+
+
+
+
+
+
+
+
+extern int fscanf (FILE *__restrict __stream,
+ __const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern int scanf (__const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__));
+
+extern int sscanf (__const char *__restrict __s,
+ __const char *__restrict __format, ...) __attribute__ ((__nothrow__));
+# 445 "/usr/include/stdio.h" 3 4
+
+
+
+
+
+
+
+
+extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format,
+ __gnuc_va_list __arg)
+ __attribute__ ((__format__ (__scanf__, 2, 0))) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg)
+ __attribute__ ((__format__ (__scanf__, 1, 0))) __attribute__ ((__warn_unused_result__));
+
+
+extern int vsscanf (__const char *__restrict __s,
+ __const char *__restrict __format, __gnuc_va_list __arg)
+ __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__scanf__, 2, 0)));
+# 504 "/usr/include/stdio.h" 3 4
+
+
+
+
+
+
+
+
+
+extern int fgetc (FILE *__stream);
+extern int getc (FILE *__stream);
+
+
+
+
+
+extern int getchar (void);
+
+# 532 "/usr/include/stdio.h" 3 4
+extern int getc_unlocked (FILE *__stream);
+extern int getchar_unlocked (void);
+# 543 "/usr/include/stdio.h" 3 4
+extern int fgetc_unlocked (FILE *__stream);
+
+
+
+
+
+
+
+
+
+
+
+extern int fputc (int __c, FILE *__stream);
+extern int putc (int __c, FILE *__stream);
+
+
+
+
+
+extern int putchar (int __c);
+
+# 576 "/usr/include/stdio.h" 3 4
+extern int fputc_unlocked (int __c, FILE *__stream);
+
+
+
+
+
+
+
+extern int putc_unlocked (int __c, FILE *__stream);
+extern int putchar_unlocked (int __c);
+
+
+
+
+
+
+extern int getw (FILE *__stream);
+
+
+extern int putw (int __w, FILE *__stream);
+
+
+
+
+
+
+
+
+extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
+ __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+
+extern char *gets (char *__s) __attribute__ ((__warn_unused_result__));
+
+# 622 "/usr/include/stdio.h" 3 4
+extern char *fgets_unlocked (char *__restrict __s, int __n,
+ FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
+# 638 "/usr/include/stdio.h" 3 4
+extern __ssize_t __getdelim (char **__restrict __lineptr,
+ size_t *__restrict __n, int __delimiter,
+ FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
+extern __ssize_t getdelim (char **__restrict __lineptr,
+ size_t *__restrict __n, int __delimiter,
+ FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+
+
+extern __ssize_t getline (char **__restrict __lineptr,
+ size_t *__restrict __n,
+ FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+
+
+
+extern int fputs (__const char *__restrict __s, FILE *__restrict __stream);
+
+
+
+
+
+extern int puts (__const char *__s);
+
+
+
+
+
+
+extern int ungetc (int __c, FILE *__stream);
+
+
+
+
+
+
+extern size_t fread (void *__restrict __ptr, size_t __size,
+ size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern size_t fwrite (__const void *__restrict __ptr, size_t __size,
+ size_t __n, FILE *__restrict __s) __attribute__ ((__warn_unused_result__));
+
+# 699 "/usr/include/stdio.h" 3 4
+extern int fputs_unlocked (__const char *__restrict __s,
+ FILE *__restrict __stream);
+# 710 "/usr/include/stdio.h" 3 4
+extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
+ size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
+extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size,
+ size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+
+
+
+extern int fseek (FILE *__stream, long int __off, int __whence);
+
+
+
+
+extern long int ftell (FILE *__stream) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern void rewind (FILE *__stream);
+
+# 746 "/usr/include/stdio.h" 3 4
+extern int fseeko (FILE *__stream, __off_t __off, int __whence);
+
+
+
+
+extern __off_t ftello (FILE *__stream) __attribute__ ((__warn_unused_result__));
+# 765 "/usr/include/stdio.h" 3 4
+
+
+
+
+
+
+extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos);
+
+
+
+
+extern int fsetpos (FILE *__stream, __const fpos_t *__pos);
+# 788 "/usr/include/stdio.h" 3 4
+
+
+
+extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence);
+extern __off64_t ftello64 (FILE *__stream) __attribute__ ((__warn_unused_result__));
+extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos);
+extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos);
+
+
+
+
+extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__));
+
+extern int feof (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
+
+extern int ferror (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__));
+extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
+extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+
+
+
+extern void perror (__const char *__s);
+
+
+
+
+
+
+# 1 "/usr/include/bits/sys_errlist.h" 1 3 4
+# 27 "/usr/include/bits/sys_errlist.h" 3 4
+extern int sys_nerr;
+extern __const char *__const sys_errlist[];
+
+
+extern int _sys_nerr;
+extern __const char *__const _sys_errlist[];
+# 827 "/usr/include/stdio.h" 2 3 4
+
+
+
+
+extern int fileno (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
+# 846 "/usr/include/stdio.h" 3 4
+extern FILE *popen (__const char *__command, __const char *__modes) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+extern int pclose (FILE *__stream);
+
+
+
+
+
+extern char *ctermid (char *__s) __attribute__ ((__nothrow__));
+
+
+
+
+
+extern char *cuserid (char *__s);
+
+
+
+
+struct obstack;
+
+
+extern int obstack_printf (struct obstack *__restrict __obstack,
+ __const char *__restrict __format, ...)
+ __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3)));
+extern int obstack_vprintf (struct obstack *__restrict __obstack,
+ __const char *__restrict __format,
+ __gnuc_va_list __args)
+ __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0)));
+
+
+
+
+
+
+
+extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__));
+
+
+
+extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
+
+
+extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__));
+# 907 "/usr/include/stdio.h" 3 4
+# 1 "/usr/include/bits/stdio.h" 1 3 4
+# 44 "/usr/include/bits/stdio.h" 3 4
+extern __inline int
+getchar (void)
+{
+ return _IO_getc (stdin);
+}
+
+
+
+
+extern __inline int
+fgetc_unlocked (FILE *__fp)
+{
+ return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++);
+}
+
+
+
+
+
+extern __inline int
+getc_unlocked (FILE *__fp)
+{
+ return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++);
+}
+
+
+extern __inline int
+getchar_unlocked (void)
+{
+ return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++);
+}
+
+
+
+
+extern __inline int
+putchar (int __c)
+{
+ return _IO_putc (__c, stdout);
+}
+
+
+
+
+extern __inline int
+fputc_unlocked (int __c, FILE *__stream)
+{
+ return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
+}
+
+
+
+
+
+extern __inline int
+putc_unlocked (int __c, FILE *__stream)
+{
+ return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
+}
+
+
+extern __inline int
+putchar_unlocked (int __c)
+{
+ return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c)));
+}
+
+
+
+
+
+extern __inline __ssize_t
+getline (char **__lineptr, size_t *__n, FILE *__stream)
+{
+ return __getdelim (__lineptr, __n, '\n', __stream);
+}
+
+
+
+
+
+extern __inline int
+__attribute__ ((__nothrow__)) feof_unlocked (FILE *__stream)
+{
+ return (((__stream)->_flags & 0x10) != 0);
+}
+
+
+extern __inline int
+__attribute__ ((__nothrow__)) ferror_unlocked (FILE *__stream)
+{
+ return (((__stream)->_flags & 0x20) != 0);
+}
+# 908 "/usr/include/stdio.h" 2 3 4
+
+
+# 1 "/usr/include/bits/stdio2.h" 1 3 4
+# 24 "/usr/include/bits/stdio2.h" 3 4
+extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen,
+ __const char *__restrict __format, ...) __attribute__ ((__nothrow__));
+extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen,
+ __const char *__restrict __format,
+ __gnuc_va_list __ap) __attribute__ ((__nothrow__));
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int
+__attribute__ ((__nothrow__)) sprintf (char *__restrict __s, __const char *__restrict __fmt, ...)
+{
+ return __builtin___sprintf_chk (__s, 2 - 1,
+ __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ());
+}
+
+
+
+
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int
+__attribute__ ((__nothrow__)) vsprintf (char *__restrict __s, __const char *__restrict __fmt, __gnuc_va_list __ap)
+
+{
+ return __builtin___vsprintf_chk (__s, 2 - 1,
+ __builtin_object_size (__s, 2 > 1), __fmt, __ap);
+}
+
+
+
+extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag,
+ size_t __slen, __const char *__restrict __format,
+ ...) __attribute__ ((__nothrow__));
+extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag,
+ size_t __slen, __const char *__restrict __format,
+ __gnuc_va_list __ap) __attribute__ ((__nothrow__));
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int
+__attribute__ ((__nothrow__)) snprintf (char *__restrict __s, size_t __n, __const char *__restrict __fmt, ...)
+
+{
+ return __builtin___snprintf_chk (__s, __n, 2 - 1,
+ __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ());
+}
+
+
+
+
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int
+__attribute__ ((__nothrow__)) vsnprintf (char *__restrict __s, size_t __n, __const char *__restrict __fmt, __gnuc_va_list __ap)
+
+{
+ return __builtin___vsnprintf_chk (__s, __n, 2 - 1,
+ __builtin_object_size (__s, 2 > 1), __fmt, __ap);
+}
+
+
+
+
+
+extern int __fprintf_chk (FILE *__restrict __stream, int __flag,
+ __const char *__restrict __format, ...);
+extern int __printf_chk (int __flag, __const char *__restrict __format, ...);
+extern int __vfprintf_chk (FILE *__restrict __stream, int __flag,
+ __const char *__restrict __format, __gnuc_va_list __ap);
+extern int __vprintf_chk (int __flag, __const char *__restrict __format,
+ __gnuc_va_list __ap);
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int
+fprintf (FILE *__restrict __stream, __const char *__restrict __fmt, ...)
+{
+ return __fprintf_chk (__stream, 2 - 1, __fmt,
+ __builtin_va_arg_pack ());
+}
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int
+printf (__const char *__restrict __fmt, ...)
+{
+ return __printf_chk (2 - 1, __fmt, __builtin_va_arg_pack ());
+}
+
+
+
+
+
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int
+vprintf (__const char *__restrict __fmt, __gnuc_va_list __ap)
+{
+
+ return __vfprintf_chk (stdout, 2 - 1, __fmt, __ap);
+
+
+
+}
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int
+vfprintf (FILE *__restrict __stream,
+ __const char *__restrict __fmt, __gnuc_va_list __ap)
+{
+ return __vfprintf_chk (__stream, 2 - 1, __fmt, __ap);
+}
+
+
+
+extern int __asprintf_chk (char **__restrict __ptr, int __flag,
+ __const char *__restrict __fmt, ...)
+ __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4))) __attribute__ ((__warn_unused_result__));
+extern int __vasprintf_chk (char **__restrict __ptr, int __flag,
+ __const char *__restrict __fmt, __gnuc_va_list __arg)
+ __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0))) __attribute__ ((__warn_unused_result__));
+extern int __dprintf_chk (int __fd, int __flag, __const char *__restrict __fmt,
+ ...) __attribute__ ((__format__ (__printf__, 3, 4)));
+extern int __vdprintf_chk (int __fd, int __flag,
+ __const char *__restrict __fmt, __gnuc_va_list __arg)
+ __attribute__ ((__format__ (__printf__, 3, 0)));
+extern int __obstack_printf_chk (struct obstack *__restrict __obstack,
+ int __flag, __const char *__restrict __format,
+ ...)
+ __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4)));
+extern int __obstack_vprintf_chk (struct obstack *__restrict __obstack,
+ int __flag,
+ __const char *__restrict __format,
+ __gnuc_va_list __args)
+ __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0)));
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int
+__attribute__ ((__nothrow__)) asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...)
+{
+ return __asprintf_chk (__ptr, 2 - 1, __fmt,
+ __builtin_va_arg_pack ());
+}
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int
+__attribute__ ((__nothrow__)) __asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...)
+
+{
+ return __asprintf_chk (__ptr, 2 - 1, __fmt,
+ __builtin_va_arg_pack ());
+}
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int
+dprintf (int __fd, __const char *__restrict __fmt, ...)
+{
+ return __dprintf_chk (__fd, 2 - 1, __fmt,
+ __builtin_va_arg_pack ());
+}
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int
+__attribute__ ((__nothrow__)) obstack_printf (struct obstack *__restrict __obstack, __const char *__restrict __fmt, ...)
+
+{
+ return __obstack_printf_chk (__obstack, 2 - 1, __fmt,
+ __builtin_va_arg_pack ());
+}
+# 195 "/usr/include/bits/stdio2.h" 3 4
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int
+__attribute__ ((__nothrow__)) vasprintf (char **__restrict __ptr, __const char *__restrict __fmt, __gnuc_va_list __ap)
+
+{
+ return __vasprintf_chk (__ptr, 2 - 1, __fmt, __ap);
+}
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int
+vdprintf (int __fd, __const char *__restrict __fmt, __gnuc_va_list __ap)
+{
+ return __vdprintf_chk (__fd, 2 - 1, __fmt, __ap);
+}
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int
+__attribute__ ((__nothrow__)) obstack_vprintf (struct obstack *__restrict __obstack, __const char *__restrict __fmt, __gnuc_va_list __ap)
+
+{
+ return __obstack_vprintf_chk (__obstack, 2 - 1, __fmt,
+ __ap);
+}
+
+
+
+
+
+extern char *__gets_chk (char *__str, size_t) __attribute__ ((__warn_unused_result__));
+extern char *__gets_warn (char *__str) __asm__ ("" "gets")
+ __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("please use fgets or getline instead, gets can't " "specify buffer size")));
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char *
+gets (char *__str)
+{
+ if (__builtin_object_size (__str, 2 > 1) != (size_t) -1)
+ return __gets_chk (__str, __builtin_object_size (__str, 2 > 1));
+ return __gets_warn (__str);
+}
+
+extern char *__fgets_chk (char *__restrict __s, size_t __size, int __n,
+ FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
+extern char *__fgets_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets") __attribute__ ((__warn_unused_result__));
+
+
+extern char *__fgets_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_chk")
+
+
+ __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets called with bigger size than length " "of destination buffer")));
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char *
+fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
+{
+ if (__builtin_object_size (__s, 2 > 1) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__n) || __n <= 0)
+ return __fgets_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream);
+
+ if ((size_t) __n > __builtin_object_size (__s, 2 > 1))
+ return __fgets_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream);
+ }
+ return __fgets_alias (__s, __n, __stream);
+}
+
+extern size_t __fread_chk (void *__restrict __ptr, size_t __ptrlen,
+ size_t __size, size_t __n,
+ FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
+extern size_t __fread_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread") __attribute__ ((__warn_unused_result__));
+
+
+
+extern size_t __fread_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_chk")
+
+
+
+
+ __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread called with bigger size * nmemb than length " "of destination buffer")));
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) size_t
+fread (void *__restrict __ptr, size_t __size, size_t __n,
+ FILE *__restrict __stream)
+{
+ if (__builtin_object_size (__ptr, 0) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__size)
+ || !__builtin_constant_p (__n)
+ || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2)))
+ return __fread_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream);
+
+ if (__size * __n > __builtin_object_size (__ptr, 0))
+ return __fread_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream);
+ }
+ return __fread_alias (__ptr, __size, __n, __stream);
+}
+
+
+extern char *__fgets_unlocked_chk (char *__restrict __s, size_t __size,
+ int __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
+extern char *__fgets_unlocked_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets_unlocked") __attribute__ ((__warn_unused_result__));
+
+
+extern char *__fgets_unlocked_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_unlocked_chk")
+
+
+ __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets_unlocked called with bigger size than length " "of destination buffer")));
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char *
+fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream)
+{
+ if (__builtin_object_size (__s, 2 > 1) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__n) || __n <= 0)
+ return __fgets_unlocked_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream);
+
+ if ((size_t) __n > __builtin_object_size (__s, 2 > 1))
+ return __fgets_unlocked_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream);
+ }
+ return __fgets_unlocked_alias (__s, __n, __stream);
+}
+
+
+
+
+extern size_t __fread_unlocked_chk (void *__restrict __ptr, size_t __ptrlen,
+ size_t __size, size_t __n,
+ FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
+extern size_t __fread_unlocked_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread_unlocked") __attribute__ ((__warn_unused_result__));
+
+
+
+extern size_t __fread_unlocked_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_unlocked_chk")
+
+
+
+
+ __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread_unlocked called with bigger size * nmemb than " "length of destination buffer")));
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) size_t
+fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n,
+ FILE *__restrict __stream)
+{
+ if (__builtin_object_size (__ptr, 0) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__size)
+ || !__builtin_constant_p (__n)
+ || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2)))
+ return __fread_unlocked_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n,
+ __stream);
+
+ if (__size * __n > __builtin_object_size (__ptr, 0))
+ return __fread_unlocked_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n,
+ __stream);
+ }
+
+
+ if (__builtin_constant_p (__size)
+ && __builtin_constant_p (__n)
+ && (__size | __n) < (((size_t) 1) << (8 * sizeof (size_t) / 2))
+ && __size * __n <= 8)
+ {
+ size_t __cnt = __size * __n;
+ char *__cptr = (char *) __ptr;
+ if (__cnt == 0)
+ return 0;
+
+ for (; __cnt > 0; --__cnt)
+ {
+ int __c = (__builtin_expect (((__stream)->_IO_read_ptr >= (__stream)->_IO_read_end), 0) ? __uflow (__stream) : *(unsigned char *) (__stream)->_IO_read_ptr++);
+ if (__c == (-1))
+ break;
+ *__cptr++ = __c;
+ }
+ return (__cptr - (char *) __ptr) / __size;
+ }
+
+ return __fread_unlocked_alias (__ptr, __size, __n, __stream);
+}
+# 911 "/usr/include/stdio.h" 2 3 4
+
+
+
+
+
+
+# 312 "./../include/my_global.h" 2
+
+
+# 1 "/usr/include/stdlib.h" 1 3 4
+# 33 "/usr/include/stdlib.h" 3 4
+# 1 "/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.4/include/stddef.h" 1 3 4
+# 326 "/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.4/include/stddef.h" 3 4
+typedef int wchar_t;
+# 34 "/usr/include/stdlib.h" 2 3 4
+
+
+
+
+
+
+
+
+# 1 "/usr/include/bits/waitflags.h" 1 3 4
+# 43 "/usr/include/stdlib.h" 2 3 4
+# 1 "/usr/include/bits/waitstatus.h" 1 3 4
+# 67 "/usr/include/bits/waitstatus.h" 3 4
+union wait
+ {
+ int w_status;
+ struct
+ {
+
+
+
+
+
+
+
+ unsigned int:16;
+ unsigned int __w_retcode:8;
+ unsigned int __w_coredump:1;
+ unsigned int __w_termsig:7;
+
+ } __wait_terminated;
+ struct
+ {
+
+
+
+
+
+
+ unsigned int:16;
+ unsigned int __w_stopsig:8;
+ unsigned int __w_stopval:8;
+
+ } __wait_stopped;
+ };
+# 44 "/usr/include/stdlib.h" 2 3 4
+# 68 "/usr/include/stdlib.h" 3 4
+typedef union
+ {
+ union wait *__uptr;
+ int *__iptr;
+ } __WAIT_STATUS __attribute__ ((__transparent_union__));
+# 96 "/usr/include/stdlib.h" 3 4
+
+
+typedef struct
+ {
+ int quot;
+ int rem;
+ } div_t;
+
+
+
+typedef struct
+ {
+ long int quot;
+ long int rem;
+ } ldiv_t;
+
+
+
+
+
+
+
+__extension__ typedef struct
+ {
+ long long int quot;
+ long long int rem;
+ } lldiv_t;
+
+
+# 140 "/usr/include/stdlib.h" 3 4
+extern size_t __ctype_get_mb_cur_max (void) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern double atof (__const char *__nptr)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+
+extern int atoi (__const char *__nptr)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+
+extern long int atol (__const char *__nptr)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+__extension__ extern long long int atoll (__const char *__nptr)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+extern double strtod (__const char *__restrict __nptr,
+ char **__restrict __endptr)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+extern float strtof (__const char *__restrict __nptr,
+ char **__restrict __endptr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+
+extern long double strtold (__const char *__restrict __nptr,
+ char **__restrict __endptr)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+extern long int strtol (__const char *__restrict __nptr,
+ char **__restrict __endptr, int __base)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+
+extern unsigned long int strtoul (__const char *__restrict __nptr,
+ char **__restrict __endptr, int __base)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+
+
+
+
+__extension__
+extern long long int strtoq (__const char *__restrict __nptr,
+ char **__restrict __endptr, int __base)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+
+__extension__
+extern unsigned long long int strtouq (__const char *__restrict __nptr,
+ char **__restrict __endptr, int __base)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+__extension__
+extern long long int strtoll (__const char *__restrict __nptr,
+ char **__restrict __endptr, int __base)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+
+__extension__
+extern unsigned long long int strtoull (__const char *__restrict __nptr,
+ char **__restrict __endptr, int __base)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+
+# 240 "/usr/include/stdlib.h" 3 4
+extern long int strtol_l (__const char *__restrict __nptr,
+ char **__restrict __endptr, int __base,
+ __locale_t __loc) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__));
+
+extern unsigned long int strtoul_l (__const char *__restrict __nptr,
+ char **__restrict __endptr,
+ int __base, __locale_t __loc)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__));
+
+__extension__
+extern long long int strtoll_l (__const char *__restrict __nptr,
+ char **__restrict __endptr, int __base,
+ __locale_t __loc)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__));
+
+__extension__
+extern unsigned long long int strtoull_l (__const char *__restrict __nptr,
+ char **__restrict __endptr,
+ int __base, __locale_t __loc)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__));
+
+extern double strtod_l (__const char *__restrict __nptr,
+ char **__restrict __endptr, __locale_t __loc)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__));
+
+extern float strtof_l (__const char *__restrict __nptr,
+ char **__restrict __endptr, __locale_t __loc)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__));
+
+extern long double strtold_l (__const char *__restrict __nptr,
+ char **__restrict __endptr,
+ __locale_t __loc)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+extern __inline double
+__attribute__ ((__nothrow__)) atof (__const char *__nptr)
+{
+ return strtod (__nptr, (char **) ((void *)0));
+}
+extern __inline int
+__attribute__ ((__nothrow__)) atoi (__const char *__nptr)
+{
+ return (int) strtol (__nptr, (char **) ((void *)0), 10);
+}
+extern __inline long int
+__attribute__ ((__nothrow__)) atol (__const char *__nptr)
+{
+ return strtol (__nptr, (char **) ((void *)0), 10);
+}
+
+
+
+
+__extension__ extern __inline long long int
+__attribute__ ((__nothrow__)) atoll (__const char *__nptr)
+{
+ return strtoll (__nptr, (char **) ((void *)0), 10);
+}
+
+# 311 "/usr/include/stdlib.h" 3 4
+extern char *l64a (long int __n) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
+
+
+extern long int a64l (__const char *__s)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+
+
+
+
+# 1 "/usr/include/sys/types.h" 1 3 4
+# 29 "/usr/include/sys/types.h" 3 4
+
+
+
+
+
+
+typedef __u_char u_char;
+typedef __u_short u_short;
+typedef __u_int u_int;
+typedef __u_long u_long;
+typedef __quad_t quad_t;
+typedef __u_quad_t u_quad_t;
+typedef __fsid_t fsid_t;
+
+
+
+
+typedef __loff_t loff_t;
+
+
+
+typedef __ino_t ino_t;
+
+
+
+
+
+
+typedef __ino64_t ino64_t;
+
+
+
+
+typedef __dev_t dev_t;
+
+
+
+
+typedef __gid_t gid_t;
+
+
+
+
+typedef __mode_t mode_t;
+
+
+
+
+typedef __nlink_t nlink_t;
+
+
+
+
+typedef __uid_t uid_t;
+
+
+
+
+
+typedef __off_t off_t;
+
+
+
+
+
+
+typedef __off64_t off64_t;
+# 105 "/usr/include/sys/types.h" 3 4
+typedef __id_t id_t;
+
+
+
+
+typedef __ssize_t ssize_t;
+
+
+
+
+
+typedef __daddr_t daddr_t;
+typedef __caddr_t caddr_t;
+
+
+
+
+
+typedef __key_t key_t;
+# 137 "/usr/include/sys/types.h" 3 4
+typedef __useconds_t useconds_t;
+
+
+
+typedef __suseconds_t suseconds_t;
+
+
+
+
+
+# 1 "/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.4/include/stddef.h" 1 3 4
+# 148 "/usr/include/sys/types.h" 2 3 4
+
+
+
+typedef unsigned long int ulong;
+typedef unsigned short int ushort;
+typedef unsigned int uint;
+# 195 "/usr/include/sys/types.h" 3 4
+typedef int int8_t __attribute__ ((__mode__ (__QI__)));
+typedef int int16_t __attribute__ ((__mode__ (__HI__)));
+typedef int int32_t __attribute__ ((__mode__ (__SI__)));
+typedef int int64_t __attribute__ ((__mode__ (__DI__)));
+
+
+typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__)));
+typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__)));
+typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__)));
+typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__)));
+
+typedef int register_t __attribute__ ((__mode__ (__word__)));
+# 220 "/usr/include/sys/types.h" 3 4
+# 1 "/usr/include/sys/select.h" 1 3 4
+# 31 "/usr/include/sys/select.h" 3 4
+# 1 "/usr/include/bits/select.h" 1 3 4
+# 32 "/usr/include/sys/select.h" 2 3 4
+
+
+# 1 "/usr/include/bits/sigset.h" 1 3 4
+# 35 "/usr/include/sys/select.h" 2 3 4
+# 46 "/usr/include/sys/select.h" 3 4
+# 1 "/usr/include/bits/time.h" 1 3 4
+# 69 "/usr/include/bits/time.h" 3 4
+struct timeval
+ {
+ __time_t tv_sec;
+ __suseconds_t tv_usec;
+ };
+# 47 "/usr/include/sys/select.h" 2 3 4
+# 55 "/usr/include/sys/select.h" 3 4
+typedef long int __fd_mask;
+# 67 "/usr/include/sys/select.h" 3 4
+typedef struct
+ {
+
+
+
+ __fd_mask fds_bits[1024 / (8 * sizeof (__fd_mask))];
+
+
+
+
+
+ } fd_set;
+
+
+
+
+
+
+typedef __fd_mask fd_mask;
+# 99 "/usr/include/sys/select.h" 3 4
+
+# 109 "/usr/include/sys/select.h" 3 4
+extern int select (int __nfds, fd_set *__restrict __readfds,
+ fd_set *__restrict __writefds,
+ fd_set *__restrict __exceptfds,
+ struct timeval *__restrict __timeout);
+# 121 "/usr/include/sys/select.h" 3 4
+extern int pselect (int __nfds, fd_set *__restrict __readfds,
+ fd_set *__restrict __writefds,
+ fd_set *__restrict __exceptfds,
+ const struct timespec *__restrict __timeout,
+ const __sigset_t *__restrict __sigmask);
+
+
+
+# 221 "/usr/include/sys/types.h" 2 3 4
+
+
+# 1 "/usr/include/sys/sysmacros.h" 1 3 4
+# 30 "/usr/include/sys/sysmacros.h" 3 4
+__extension__
+extern unsigned int gnu_dev_major (unsigned long long int __dev)
+ __attribute__ ((__nothrow__));
+__extension__
+extern unsigned int gnu_dev_minor (unsigned long long int __dev)
+ __attribute__ ((__nothrow__));
+__extension__
+extern unsigned long long int gnu_dev_makedev (unsigned int __major,
+ unsigned int __minor)
+ __attribute__ ((__nothrow__));
+
+
+__extension__ extern __inline unsigned int
+__attribute__ ((__nothrow__)) gnu_dev_major (unsigned long long int __dev)
+{
+ return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff);
+}
+
+__extension__ extern __inline unsigned int
+__attribute__ ((__nothrow__)) gnu_dev_minor (unsigned long long int __dev)
+{
+ return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff);
+}
+
+__extension__ extern __inline unsigned long long int
+__attribute__ ((__nothrow__)) gnu_dev_makedev (unsigned int __major, unsigned int __minor)
+{
+ return ((__minor & 0xff) | ((__major & 0xfff) << 8)
+ | (((unsigned long long int) (__minor & ~0xff)) << 12)
+ | (((unsigned long long int) (__major & ~0xfff)) << 32));
+}
+# 224 "/usr/include/sys/types.h" 2 3 4
+
+
+
+
+typedef __blksize_t blksize_t;
+
+
+
+
+
+
+typedef __blkcnt_t blkcnt_t;
+
+
+
+typedef __fsblkcnt_t fsblkcnt_t;
+
+
+
+typedef __fsfilcnt_t fsfilcnt_t;
+# 262 "/usr/include/sys/types.h" 3 4
+typedef __blkcnt64_t blkcnt64_t;
+typedef __fsblkcnt64_t fsblkcnt64_t;
+typedef __fsfilcnt64_t fsfilcnt64_t;
+# 273 "/usr/include/sys/types.h" 3 4
+
+# 321 "/usr/include/stdlib.h" 2 3 4
+
+
+
+
+
+
+extern long int random (void) __attribute__ ((__nothrow__));
+
+
+extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__));
+
+
+
+
+
+extern char *initstate (unsigned int __seed, char *__statebuf,
+ size_t __statelen) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
+
+
+
+extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+
+
+struct random_data
+ {
+ int32_t *fptr;
+ int32_t *rptr;
+ int32_t *state;
+ int rand_type;
+ int rand_deg;
+ int rand_sep;
+ int32_t *end_ptr;
+ };
+
+extern int random_r (struct random_data *__restrict __buf,
+ int32_t *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+extern int srandom_r (unsigned int __seed, struct random_data *__buf)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
+
+extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,
+ size_t __statelen,
+ struct random_data *__restrict __buf)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4)));
+
+extern int setstate_r (char *__restrict __statebuf,
+ struct random_data *__restrict __buf)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+
+
+
+extern int rand (void) __attribute__ ((__nothrow__));
+
+extern void srand (unsigned int __seed) __attribute__ ((__nothrow__));
+
+
+
+
+extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+
+extern double drand48 (void) __attribute__ ((__nothrow__));
+extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern long int lrand48 (void) __attribute__ ((__nothrow__));
+extern long int nrand48 (unsigned short int __xsubi[3])
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern long int mrand48 (void) __attribute__ ((__nothrow__));
+extern long int jrand48 (unsigned short int __xsubi[3])
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern void srand48 (long int __seedval) __attribute__ ((__nothrow__));
+extern unsigned short int *seed48 (unsigned short int __seed16v[3])
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+struct drand48_data
+ {
+ unsigned short int __x[3];
+ unsigned short int __old_x[3];
+ unsigned short int __c;
+ unsigned short int __init;
+ unsigned long long int __a;
+ };
+
+
+extern int drand48_r (struct drand48_data *__restrict __buffer,
+ double *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+extern int erand48_r (unsigned short int __xsubi[3],
+ struct drand48_data *__restrict __buffer,
+ double *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+extern int lrand48_r (struct drand48_data *__restrict __buffer,
+ long int *__restrict __result)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+extern int nrand48_r (unsigned short int __xsubi[3],
+ struct drand48_data *__restrict __buffer,
+ long int *__restrict __result)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+extern int mrand48_r (struct drand48_data *__restrict __buffer,
+ long int *__restrict __result)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+extern int jrand48_r (unsigned short int __xsubi[3],
+ struct drand48_data *__restrict __buffer,
+ long int *__restrict __result)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+extern int srand48_r (long int __seedval, struct drand48_data *__buffer)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
+
+extern int seed48_r (unsigned short int __seed16v[3],
+ struct drand48_data *__buffer) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+extern int lcong48_r (unsigned short int __param[7],
+ struct drand48_data *__buffer)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+
+
+
+
+
+
+extern void *malloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__));
+
+extern void *calloc (size_t __nmemb, size_t __size)
+ __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+
+
+
+
+
+extern void *realloc (void *__ptr, size_t __size)
+ __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
+
+extern void free (void *__ptr) __attribute__ ((__nothrow__));
+
+
+
+
+extern void cfree (void *__ptr) __attribute__ ((__nothrow__));
+
+
+
+# 1 "/usr/include/alloca.h" 1 3 4
+# 25 "/usr/include/alloca.h" 3 4
+# 1 "/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.4/include/stddef.h" 1 3 4
+# 26 "/usr/include/alloca.h" 2 3 4
+
+
+
+
+
+
+
+extern void *alloca (size_t __size) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+# 498 "/usr/include/stdlib.h" 2 3 4
+
+
+
+
+extern void *valloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern void abort (void) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
+
+
+
+extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+# 527 "/usr/include/stdlib.h" 3 4
+extern int at_quick_exit (void (*__func) (void)) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+
+
+extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+
+extern void exit (int __status) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
+
+
+
+
+
+
+
+extern void quick_exit (int __status) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
+
+
+
+
+
+
+
+extern void _Exit (int __status) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
+
+
+
+
+
+
+extern char *getenv (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern char *__secure_getenv (__const char *__name)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+extern int putenv (char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+extern int setenv (__const char *__name, __const char *__value, int __replace)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
+
+
+extern int unsetenv (__const char *__name) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+extern int clearenv (void) __attribute__ ((__nothrow__));
+# 604 "/usr/include/stdlib.h" 3 4
+extern char *mktemp (char *__template) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+# 615 "/usr/include/stdlib.h" 3 4
+extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+# 625 "/usr/include/stdlib.h" 3 4
+extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+# 635 "/usr/include/stdlib.h" 3 4
+extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+# 646 "/usr/include/stdlib.h" 3 4
+extern int mkostemp (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+# 656 "/usr/include/stdlib.h" 3 4
+extern int mkostemp64 (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+
+
+
+
+extern int system (__const char *__command) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+
+extern char *canonicalize_file_name (__const char *__name)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+# 683 "/usr/include/stdlib.h" 3 4
+extern char *realpath (__const char *__restrict __name,
+ char *__restrict __resolved) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+
+typedef int (*__compar_fn_t) (__const void *, __const void *);
+
+
+typedef __compar_fn_t comparison_fn_t;
+
+
+
+typedef int (*__compar_d_fn_t) (__const void *, __const void *, void *);
+
+
+
+
+
+extern void *bsearch (__const void *__key, __const void *__base,
+ size_t __nmemb, size_t __size, __compar_fn_t __compar)
+ __attribute__ ((__nonnull__ (1, 2, 5))) __attribute__ ((__warn_unused_result__));
+
+
+
+extern void qsort (void *__base, size_t __nmemb, size_t __size,
+ __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4)));
+
+extern void qsort_r (void *__base, size_t __nmemb, size_t __size,
+ __compar_d_fn_t __compar, void *__arg)
+ __attribute__ ((__nonnull__ (1, 4)));
+
+
+
+
+extern int abs (int __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
+extern long int labs (long int __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
+
+
+
+__extension__ extern long long int llabs (long long int __x)
+ __attribute__ ((__nothrow__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+
+
+extern div_t div (int __numer, int __denom)
+ __attribute__ ((__nothrow__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
+extern ldiv_t ldiv (long int __numer, long int __denom)
+ __attribute__ ((__nothrow__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+__extension__ extern lldiv_t lldiv (long long int __numer,
+ long long int __denom)
+ __attribute__ ((__nothrow__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
+
+# 756 "/usr/include/stdlib.h" 3 4
+extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt,
+ int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt,
+ int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern char *gcvt (double __value, int __ndigit, char *__buf)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern char *qecvt (long double __value, int __ndigit,
+ int *__restrict __decpt, int *__restrict __sign)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__));
+extern char *qfcvt (long double __value, int __ndigit,
+ int *__restrict __decpt, int *__restrict __sign)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__));
+extern char *qgcvt (long double __value, int __ndigit, char *__buf)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
+ int *__restrict __sign, char *__restrict __buf,
+ size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5)));
+extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
+ int *__restrict __sign, char *__restrict __buf,
+ size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5)));
+
+extern int qecvt_r (long double __value, int __ndigit,
+ int *__restrict __decpt, int *__restrict __sign,
+ char *__restrict __buf, size_t __len)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5)));
+extern int qfcvt_r (long double __value, int __ndigit,
+ int *__restrict __decpt, int *__restrict __sign,
+ char *__restrict __buf, size_t __len)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5)));
+
+
+
+
+
+
+
+extern int mblen (__const char *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
+
+
+extern int mbtowc (wchar_t *__restrict __pwc,
+ __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
+
+
+extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
+
+
+
+extern size_t mbstowcs (wchar_t *__restrict __pwcs,
+ __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__));
+
+extern size_t wcstombs (char *__restrict __s,
+ __const wchar_t *__restrict __pwcs, size_t __n)
+ __attribute__ ((__nothrow__));
+
+
+
+
+
+
+
+
+extern int rpmatch (__const char *__response) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+# 844 "/usr/include/stdlib.h" 3 4
+extern int getsubopt (char **__restrict __optionp,
+ char *__const *__restrict __tokens,
+ char **__restrict __valuep)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2, 3))) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+extern void setkey (__const char *__key) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+
+
+extern int posix_openpt (int __oflag) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+
+
+extern int grantpt (int __fd) __attribute__ ((__nothrow__));
+
+
+
+extern int unlockpt (int __fd) __attribute__ ((__nothrow__));
+
+
+
+
+extern char *ptsname (int __fd) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+
+extern int ptsname_r (int __fd, char *__buf, size_t __buflen)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
+
+
+extern int getpt (void);
+
+
+
+
+
+
+extern int getloadavg (double __loadavg[], int __nelem)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+# 1 "/usr/include/bits/stdlib.h" 1 3 4
+# 24 "/usr/include/bits/stdlib.h" 3 4
+extern char *__realpath_chk (__const char *__restrict __name,
+ char *__restrict __resolved,
+ size_t __resolvedlen) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
+extern char *__realpath_alias (__const char *__restrict __name, char *__restrict __resolved) __asm__ ("" "realpath") __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
+
+
+extern char *__realpath_chk_warn (__const char *__restrict __name, char *__restrict __resolved, size_t __resolvedlen) __asm__ ("" "__realpath_chk") __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__))
+
+
+
+ __attribute__((__warning__ ("second argument of realpath must be either NULL or at " "least PATH_MAX bytes long buffer")));
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char *
+__attribute__ ((__nothrow__)) realpath (__const char *__restrict __name, char *__restrict __resolved)
+{
+ if (__builtin_object_size (__resolved, 2 > 1) != (size_t) -1)
+ {
+
+
+
+
+ return __realpath_chk (__name, __resolved, __builtin_object_size (__resolved, 2 > 1));
+ }
+
+ return __realpath_alias (__name, __resolved);
+}
+
+
+extern int __ptsname_r_chk (int __fd, char *__buf, size_t __buflen,
+ size_t __nreal) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
+extern int __ptsname_r_alias (int __fd, char *__buf, size_t __buflen) __asm__ ("" "ptsname_r") __attribute__ ((__nothrow__))
+
+ __attribute__ ((__nonnull__ (2)));
+extern int __ptsname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__ptsname_r_chk") __attribute__ ((__nothrow__))
+
+
+ __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ptsname_r called with buflen bigger than " "size of buf")));
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int
+__attribute__ ((__nothrow__)) ptsname_r (int __fd, char *__buf, size_t __buflen)
+{
+ if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__buflen))
+ return __ptsname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1));
+ if (__buflen > __builtin_object_size (__buf, 2 > 1))
+ return __ptsname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1));
+ }
+ return __ptsname_r_alias (__fd, __buf, __buflen);
+}
+
+
+extern int __wctomb_chk (char *__s, wchar_t __wchar, size_t __buflen)
+ __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
+extern int __wctomb_alias (char *__s, wchar_t __wchar) __asm__ ("" "wctomb") __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) int
+__attribute__ ((__nothrow__)) wctomb (char *__s, wchar_t __wchar)
+{
+
+
+
+
+
+
+
+ if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 && 16 > __builtin_object_size (__s, 2 > 1))
+ return __wctomb_chk (__s, __wchar, __builtin_object_size (__s, 2 > 1));
+ return __wctomb_alias (__s, __wchar);
+}
+
+
+extern size_t __mbstowcs_chk (wchar_t *__restrict __dst,
+ __const char *__restrict __src,
+ size_t __len, size_t __dstlen) __attribute__ ((__nothrow__));
+extern size_t __mbstowcs_alias (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len) __asm__ ("" "mbstowcs") __attribute__ ((__nothrow__));
+
+
+
+extern size_t __mbstowcs_chk_warn (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len, size_t __dstlen) __asm__ ("" "__mbstowcs_chk") __attribute__ ((__nothrow__))
+
+
+
+ __attribute__((__warning__ ("mbstowcs called with dst buffer smaller than len " "* sizeof (wchar_t)")));
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) size_t
+__attribute__ ((__nothrow__)) mbstowcs (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len)
+
+{
+ if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__len))
+ return __mbstowcs_chk (__dst, __src, __len,
+ __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t));
+
+ if (__len > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t))
+ return __mbstowcs_chk_warn (__dst, __src, __len,
+ __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t));
+ }
+ return __mbstowcs_alias (__dst, __src, __len);
+}
+
+
+extern size_t __wcstombs_chk (char *__restrict __dst,
+ __const wchar_t *__restrict __src,
+ size_t __len, size_t __dstlen) __attribute__ ((__nothrow__));
+extern size_t __wcstombs_alias (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len) __asm__ ("" "wcstombs") __attribute__ ((__nothrow__));
+
+
+
+extern size_t __wcstombs_chk_warn (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len, size_t __dstlen) __asm__ ("" "__wcstombs_chk") __attribute__ ((__nothrow__))
+
+
+
+ __attribute__((__warning__ ("wcstombs called with dst buffer smaller than len")));
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) size_t
+__attribute__ ((__nothrow__)) wcstombs (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len)
+
+{
+ if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__len))
+ return __wcstombs_chk (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1));
+ if (__len > __builtin_object_size (__dst, 2 > 1))
+ return __wcstombs_chk_warn (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1));
+ }
+ return __wcstombs_alias (__dst, __src, __len);
+}
+# 904 "/usr/include/stdlib.h" 2 3 4
+# 912 "/usr/include/stdlib.h" 3 4
+
+# 315 "./../include/my_global.h" 2
+
+
+# 1 "/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.4/include/stddef.h" 1 3 4
+# 152 "/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.4/include/stddef.h" 3 4
+typedef long int ptrdiff_t;
+# 318 "./../include/my_global.h" 2
+
+
+# 1 "/usr/include/math.h" 1 3 4
+# 30 "/usr/include/math.h" 3 4
+
+
+
+
+# 1 "/usr/include/bits/huge_val.h" 1 3 4
+# 35 "/usr/include/math.h" 2 3 4
+
+# 1 "/usr/include/bits/huge_valf.h" 1 3 4
+# 37 "/usr/include/math.h" 2 3 4
+# 1 "/usr/include/bits/huge_vall.h" 1 3 4
+# 38 "/usr/include/math.h" 2 3 4
+
+
+# 1 "/usr/include/bits/inf.h" 1 3 4
+# 41 "/usr/include/math.h" 2 3 4
+
+
+# 1 "/usr/include/bits/nan.h" 1 3 4
+# 44 "/usr/include/math.h" 2 3 4
+
+
+
+# 1 "/usr/include/bits/mathdef.h" 1 3 4
+# 38 "/usr/include/bits/mathdef.h" 3 4
+typedef float float_t;
+
+typedef double double_t;
+# 48 "/usr/include/math.h" 2 3 4
+# 71 "/usr/include/math.h" 3 4
+# 1 "/usr/include/bits/mathcalls.h" 1 3 4
+# 53 "/usr/include/bits/mathcalls.h" 3 4
+
+
+extern double acos (double __x) __attribute__ ((__nothrow__)); extern double __acos (double __x) __attribute__ ((__nothrow__));
+
+extern double asin (double __x) __attribute__ ((__nothrow__)); extern double __asin (double __x) __attribute__ ((__nothrow__));
+
+extern double atan (double __x) __attribute__ ((__nothrow__)); extern double __atan (double __x) __attribute__ ((__nothrow__));
+
+extern double atan2 (double __y, double __x) __attribute__ ((__nothrow__)); extern double __atan2 (double __y, double __x) __attribute__ ((__nothrow__));
+
+
+extern double cos (double __x) __attribute__ ((__nothrow__)); extern double __cos (double __x) __attribute__ ((__nothrow__));
+
+extern double sin (double __x) __attribute__ ((__nothrow__)); extern double __sin (double __x) __attribute__ ((__nothrow__));
+
+extern double tan (double __x) __attribute__ ((__nothrow__)); extern double __tan (double __x) __attribute__ ((__nothrow__));
+
+
+
+
+extern double cosh (double __x) __attribute__ ((__nothrow__)); extern double __cosh (double __x) __attribute__ ((__nothrow__));
+
+extern double sinh (double __x) __attribute__ ((__nothrow__)); extern double __sinh (double __x) __attribute__ ((__nothrow__));
+
+extern double tanh (double __x) __attribute__ ((__nothrow__)); extern double __tanh (double __x) __attribute__ ((__nothrow__));
+
+
+
+
+extern void sincos (double __x, double *__sinx, double *__cosx) __attribute__ ((__nothrow__)); extern void __sincos (double __x, double *__sinx, double *__cosx) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+extern double acosh (double __x) __attribute__ ((__nothrow__)); extern double __acosh (double __x) __attribute__ ((__nothrow__));
+
+extern double asinh (double __x) __attribute__ ((__nothrow__)); extern double __asinh (double __x) __attribute__ ((__nothrow__));
+
+extern double atanh (double __x) __attribute__ ((__nothrow__)); extern double __atanh (double __x) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+
+extern double exp (double __x) __attribute__ ((__nothrow__)); extern double __exp (double __x) __attribute__ ((__nothrow__));
+
+
+extern double frexp (double __x, int *__exponent) __attribute__ ((__nothrow__)); extern double __frexp (double __x, int *__exponent) __attribute__ ((__nothrow__));
+
+
+extern double ldexp (double __x, int __exponent) __attribute__ ((__nothrow__)); extern double __ldexp (double __x, int __exponent) __attribute__ ((__nothrow__));
+
+
+extern double log (double __x) __attribute__ ((__nothrow__)); extern double __log (double __x) __attribute__ ((__nothrow__));
+
+
+extern double log10 (double __x) __attribute__ ((__nothrow__)); extern double __log10 (double __x) __attribute__ ((__nothrow__));
+
+
+extern double modf (double __x, double *__iptr) __attribute__ ((__nothrow__)); extern double __modf (double __x, double *__iptr) __attribute__ ((__nothrow__));
+
+
+
+
+extern double exp10 (double __x) __attribute__ ((__nothrow__)); extern double __exp10 (double __x) __attribute__ ((__nothrow__));
+
+extern double pow10 (double __x) __attribute__ ((__nothrow__)); extern double __pow10 (double __x) __attribute__ ((__nothrow__));
+
+
+
+
+
+extern double expm1 (double __x) __attribute__ ((__nothrow__)); extern double __expm1 (double __x) __attribute__ ((__nothrow__));
+
+
+extern double log1p (double __x) __attribute__ ((__nothrow__)); extern double __log1p (double __x) __attribute__ ((__nothrow__));
+
+
+extern double logb (double __x) __attribute__ ((__nothrow__)); extern double __logb (double __x) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+extern double exp2 (double __x) __attribute__ ((__nothrow__)); extern double __exp2 (double __x) __attribute__ ((__nothrow__));
+
+
+extern double log2 (double __x) __attribute__ ((__nothrow__)); extern double __log2 (double __x) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+
+
+extern double pow (double __x, double __y) __attribute__ ((__nothrow__)); extern double __pow (double __x, double __y) __attribute__ ((__nothrow__));
+
+
+extern double sqrt (double __x) __attribute__ ((__nothrow__)); extern double __sqrt (double __x) __attribute__ ((__nothrow__));
+
+
+
+
+
+extern double hypot (double __x, double __y) __attribute__ ((__nothrow__)); extern double __hypot (double __x, double __y) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+extern double cbrt (double __x) __attribute__ ((__nothrow__)); extern double __cbrt (double __x) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+
+
+extern double ceil (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __ceil (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+
+extern double fabs (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __fabs (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+
+extern double floor (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __floor (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+
+extern double fmod (double __x, double __y) __attribute__ ((__nothrow__)); extern double __fmod (double __x, double __y) __attribute__ ((__nothrow__));
+
+
+
+
+extern int __isinf (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+
+extern int __finite (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+
+
+
+
+extern int isinf (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+
+extern int finite (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+
+extern double drem (double __x, double __y) __attribute__ ((__nothrow__)); extern double __drem (double __x, double __y) __attribute__ ((__nothrow__));
+
+
+
+extern double significand (double __x) __attribute__ ((__nothrow__)); extern double __significand (double __x) __attribute__ ((__nothrow__));
+
+
+
+
+
+extern double copysign (double __x, double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __copysign (double __x, double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+
+
+
+
+
+extern double nan (__const char *__tagb) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __nan (__const char *__tagb) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+
+
+
+
+extern int __isnan (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+
+
+extern int isnan (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+
+extern double j0 (double) __attribute__ ((__nothrow__)); extern double __j0 (double) __attribute__ ((__nothrow__));
+extern double j1 (double) __attribute__ ((__nothrow__)); extern double __j1 (double) __attribute__ ((__nothrow__));
+extern double jn (int, double) __attribute__ ((__nothrow__)); extern double __jn (int, double) __attribute__ ((__nothrow__));
+extern double y0 (double) __attribute__ ((__nothrow__)); extern double __y0 (double) __attribute__ ((__nothrow__));
+extern double y1 (double) __attribute__ ((__nothrow__)); extern double __y1 (double) __attribute__ ((__nothrow__));
+extern double yn (int, double) __attribute__ ((__nothrow__)); extern double __yn (int, double) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+extern double erf (double) __attribute__ ((__nothrow__)); extern double __erf (double) __attribute__ ((__nothrow__));
+extern double erfc (double) __attribute__ ((__nothrow__)); extern double __erfc (double) __attribute__ ((__nothrow__));
+extern double lgamma (double) __attribute__ ((__nothrow__)); extern double __lgamma (double) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+extern double tgamma (double) __attribute__ ((__nothrow__)); extern double __tgamma (double) __attribute__ ((__nothrow__));
+
+
+
+
+
+extern double gamma (double) __attribute__ ((__nothrow__)); extern double __gamma (double) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+extern double lgamma_r (double, int *__signgamp) __attribute__ ((__nothrow__)); extern double __lgamma_r (double, int *__signgamp) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+
+extern double rint (double __x) __attribute__ ((__nothrow__)); extern double __rint (double __x) __attribute__ ((__nothrow__));
+
+
+extern double nextafter (double __x, double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __nextafter (double __x, double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+extern double nexttoward (double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __nexttoward (double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+
+
+extern double remainder (double __x, double __y) __attribute__ ((__nothrow__)); extern double __remainder (double __x, double __y) __attribute__ ((__nothrow__));
+
+
+
+extern double scalbn (double __x, int __n) __attribute__ ((__nothrow__)); extern double __scalbn (double __x, int __n) __attribute__ ((__nothrow__));
+
+
+
+extern int ilogb (double __x) __attribute__ ((__nothrow__)); extern int __ilogb (double __x) __attribute__ ((__nothrow__));
+
+
+
+
+extern double scalbln (double __x, long int __n) __attribute__ ((__nothrow__)); extern double __scalbln (double __x, long int __n) __attribute__ ((__nothrow__));
+
+
+
+extern double nearbyint (double __x) __attribute__ ((__nothrow__)); extern double __nearbyint (double __x) __attribute__ ((__nothrow__));
+
+
+
+extern double round (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __round (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+
+
+extern double trunc (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __trunc (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+
+
+
+extern double remquo (double __x, double __y, int *__quo) __attribute__ ((__nothrow__)); extern double __remquo (double __x, double __y, int *__quo) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+extern long int lrint (double __x) __attribute__ ((__nothrow__)); extern long int __lrint (double __x) __attribute__ ((__nothrow__));
+extern long long int llrint (double __x) __attribute__ ((__nothrow__)); extern long long int __llrint (double __x) __attribute__ ((__nothrow__));
+
+
+
+extern long int lround (double __x) __attribute__ ((__nothrow__)); extern long int __lround (double __x) __attribute__ ((__nothrow__));
+extern long long int llround (double __x) __attribute__ ((__nothrow__)); extern long long int __llround (double __x) __attribute__ ((__nothrow__));
+
+
+
+extern double fdim (double __x, double __y) __attribute__ ((__nothrow__)); extern double __fdim (double __x, double __y) __attribute__ ((__nothrow__));
+
+
+extern double fmax (double __x, double __y) __attribute__ ((__nothrow__)); extern double __fmax (double __x, double __y) __attribute__ ((__nothrow__));
+
+
+extern double fmin (double __x, double __y) __attribute__ ((__nothrow__)); extern double __fmin (double __x, double __y) __attribute__ ((__nothrow__));
+
+
+
+extern int __fpclassify (double __value) __attribute__ ((__nothrow__))
+ __attribute__ ((__const__));
+
+
+extern int __signbit (double __value) __attribute__ ((__nothrow__))
+ __attribute__ ((__const__));
+
+
+
+extern double fma (double __x, double __y, double __z) __attribute__ ((__nothrow__)); extern double __fma (double __x, double __y, double __z) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+
+
+extern double scalb (double __x, double __n) __attribute__ ((__nothrow__)); extern double __scalb (double __x, double __n) __attribute__ ((__nothrow__));
+# 72 "/usr/include/math.h" 2 3 4
+# 94 "/usr/include/math.h" 3 4
+# 1 "/usr/include/bits/mathcalls.h" 1 3 4
+# 53 "/usr/include/bits/mathcalls.h" 3 4
+
+
+extern float acosf (float __x) __attribute__ ((__nothrow__)); extern float __acosf (float __x) __attribute__ ((__nothrow__));
+
+extern float asinf (float __x) __attribute__ ((__nothrow__)); extern float __asinf (float __x) __attribute__ ((__nothrow__));
+
+extern float atanf (float __x) __attribute__ ((__nothrow__)); extern float __atanf (float __x) __attribute__ ((__nothrow__));
+
+extern float atan2f (float __y, float __x) __attribute__ ((__nothrow__)); extern float __atan2f (float __y, float __x) __attribute__ ((__nothrow__));
+
+
+extern float cosf (float __x) __attribute__ ((__nothrow__)); extern float __cosf (float __x) __attribute__ ((__nothrow__));
+
+extern float sinf (float __x) __attribute__ ((__nothrow__)); extern float __sinf (float __x) __attribute__ ((__nothrow__));
+
+extern float tanf (float __x) __attribute__ ((__nothrow__)); extern float __tanf (float __x) __attribute__ ((__nothrow__));
+
+
+
+
+extern float coshf (float __x) __attribute__ ((__nothrow__)); extern float __coshf (float __x) __attribute__ ((__nothrow__));
+
+extern float sinhf (float __x) __attribute__ ((__nothrow__)); extern float __sinhf (float __x) __attribute__ ((__nothrow__));
+
+extern float tanhf (float __x) __attribute__ ((__nothrow__)); extern float __tanhf (float __x) __attribute__ ((__nothrow__));
+
+
+
+
+extern void sincosf (float __x, float *__sinx, float *__cosx) __attribute__ ((__nothrow__)); extern void __sincosf (float __x, float *__sinx, float *__cosx) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+extern float acoshf (float __x) __attribute__ ((__nothrow__)); extern float __acoshf (float __x) __attribute__ ((__nothrow__));
+
+extern float asinhf (float __x) __attribute__ ((__nothrow__)); extern float __asinhf (float __x) __attribute__ ((__nothrow__));
+
+extern float atanhf (float __x) __attribute__ ((__nothrow__)); extern float __atanhf (float __x) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+
+extern float expf (float __x) __attribute__ ((__nothrow__)); extern float __expf (float __x) __attribute__ ((__nothrow__));
+
+
+extern float frexpf (float __x, int *__exponent) __attribute__ ((__nothrow__)); extern float __frexpf (float __x, int *__exponent) __attribute__ ((__nothrow__));
+
+
+extern float ldexpf (float __x, int __exponent) __attribute__ ((__nothrow__)); extern float __ldexpf (float __x, int __exponent) __attribute__ ((__nothrow__));
+
+
+extern float logf (float __x) __attribute__ ((__nothrow__)); extern float __logf (float __x) __attribute__ ((__nothrow__));
+
+
+extern float log10f (float __x) __attribute__ ((__nothrow__)); extern float __log10f (float __x) __attribute__ ((__nothrow__));
+
+
+extern float modff (float __x, float *__iptr) __attribute__ ((__nothrow__)); extern float __modff (float __x, float *__iptr) __attribute__ ((__nothrow__));
+
+
+
+
+extern float exp10f (float __x) __attribute__ ((__nothrow__)); extern float __exp10f (float __x) __attribute__ ((__nothrow__));
+
+extern float pow10f (float __x) __attribute__ ((__nothrow__)); extern float __pow10f (float __x) __attribute__ ((__nothrow__));
+
+
+
+
+
+extern float expm1f (float __x) __attribute__ ((__nothrow__)); extern float __expm1f (float __x) __attribute__ ((__nothrow__));
+
+
+extern float log1pf (float __x) __attribute__ ((__nothrow__)); extern float __log1pf (float __x) __attribute__ ((__nothrow__));
+
+
+extern float logbf (float __x) __attribute__ ((__nothrow__)); extern float __logbf (float __x) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+extern float exp2f (float __x) __attribute__ ((__nothrow__)); extern float __exp2f (float __x) __attribute__ ((__nothrow__));
+
+
+extern float log2f (float __x) __attribute__ ((__nothrow__)); extern float __log2f (float __x) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+
+
+extern float powf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __powf (float __x, float __y) __attribute__ ((__nothrow__));
+
+
+extern float sqrtf (float __x) __attribute__ ((__nothrow__)); extern float __sqrtf (float __x) __attribute__ ((__nothrow__));
+
+
+
+
+
+extern float hypotf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __hypotf (float __x, float __y) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+extern float cbrtf (float __x) __attribute__ ((__nothrow__)); extern float __cbrtf (float __x) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+
+
+extern float ceilf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __ceilf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+
+extern float fabsf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __fabsf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+
+extern float floorf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __floorf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+
+extern float fmodf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __fmodf (float __x, float __y) __attribute__ ((__nothrow__));
+
+
+
+
+extern int __isinff (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+
+extern int __finitef (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+
+
+
+
+extern int isinff (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+
+extern int finitef (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+
+extern float dremf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __dremf (float __x, float __y) __attribute__ ((__nothrow__));
+
+
+
+extern float significandf (float __x) __attribute__ ((__nothrow__)); extern float __significandf (float __x) __attribute__ ((__nothrow__));
+
+
+
+
+
+extern float copysignf (float __x, float __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+
+
+
+
+
+extern float nanf (__const char *__tagb) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __nanf (__const char *__tagb) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+
+
+
+
+extern int __isnanf (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+
+
+extern int isnanf (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+
+extern float j0f (float) __attribute__ ((__nothrow__)); extern float __j0f (float) __attribute__ ((__nothrow__));
+extern float j1f (float) __attribute__ ((__nothrow__)); extern float __j1f (float) __attribute__ ((__nothrow__));
+extern float jnf (int, float) __attribute__ ((__nothrow__)); extern float __jnf (int, float) __attribute__ ((__nothrow__));
+extern float y0f (float) __attribute__ ((__nothrow__)); extern float __y0f (float) __attribute__ ((__nothrow__));
+extern float y1f (float) __attribute__ ((__nothrow__)); extern float __y1f (float) __attribute__ ((__nothrow__));
+extern float ynf (int, float) __attribute__ ((__nothrow__)); extern float __ynf (int, float) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+extern float erff (float) __attribute__ ((__nothrow__)); extern float __erff (float) __attribute__ ((__nothrow__));
+extern float erfcf (float) __attribute__ ((__nothrow__)); extern float __erfcf (float) __attribute__ ((__nothrow__));
+extern float lgammaf (float) __attribute__ ((__nothrow__)); extern float __lgammaf (float) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+extern float tgammaf (float) __attribute__ ((__nothrow__)); extern float __tgammaf (float) __attribute__ ((__nothrow__));
+
+
+
+
+
+extern float gammaf (float) __attribute__ ((__nothrow__)); extern float __gammaf (float) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+extern float lgammaf_r (float, int *__signgamp) __attribute__ ((__nothrow__)); extern float __lgammaf_r (float, int *__signgamp) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+
+extern float rintf (float __x) __attribute__ ((__nothrow__)); extern float __rintf (float __x) __attribute__ ((__nothrow__));
+
+
+extern float nextafterf (float __x, float __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __nextafterf (float __x, float __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+extern float nexttowardf (float __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __nexttowardf (float __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+
+
+extern float remainderf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __remainderf (float __x, float __y) __attribute__ ((__nothrow__));
+
+
+
+extern float scalbnf (float __x, int __n) __attribute__ ((__nothrow__)); extern float __scalbnf (float __x, int __n) __attribute__ ((__nothrow__));
+
+
+
+extern int ilogbf (float __x) __attribute__ ((__nothrow__)); extern int __ilogbf (float __x) __attribute__ ((__nothrow__));
+
+
+
+
+extern float scalblnf (float __x, long int __n) __attribute__ ((__nothrow__)); extern float __scalblnf (float __x, long int __n) __attribute__ ((__nothrow__));
+
+
+
+extern float nearbyintf (float __x) __attribute__ ((__nothrow__)); extern float __nearbyintf (float __x) __attribute__ ((__nothrow__));
+
+
+
+extern float roundf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __roundf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+
+
+extern float truncf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __truncf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+
+
+
+extern float remquof (float __x, float __y, int *__quo) __attribute__ ((__nothrow__)); extern float __remquof (float __x, float __y, int *__quo) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+extern long int lrintf (float __x) __attribute__ ((__nothrow__)); extern long int __lrintf (float __x) __attribute__ ((__nothrow__));
+extern long long int llrintf (float __x) __attribute__ ((__nothrow__)); extern long long int __llrintf (float __x) __attribute__ ((__nothrow__));
+
+
+
+extern long int lroundf (float __x) __attribute__ ((__nothrow__)); extern long int __lroundf (float __x) __attribute__ ((__nothrow__));
+extern long long int llroundf (float __x) __attribute__ ((__nothrow__)); extern long long int __llroundf (float __x) __attribute__ ((__nothrow__));
+
+
+
+extern float fdimf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __fdimf (float __x, float __y) __attribute__ ((__nothrow__));
+
+
+extern float fmaxf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __fmaxf (float __x, float __y) __attribute__ ((__nothrow__));
+
+
+extern float fminf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __fminf (float __x, float __y) __attribute__ ((__nothrow__));
+
+
+
+extern int __fpclassifyf (float __value) __attribute__ ((__nothrow__))
+ __attribute__ ((__const__));
+
+
+extern int __signbitf (float __value) __attribute__ ((__nothrow__))
+ __attribute__ ((__const__));
+
+
+
+extern float fmaf (float __x, float __y, float __z) __attribute__ ((__nothrow__)); extern float __fmaf (float __x, float __y, float __z) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+
+
+extern float scalbf (float __x, float __n) __attribute__ ((__nothrow__)); extern float __scalbf (float __x, float __n) __attribute__ ((__nothrow__));
+# 95 "/usr/include/math.h" 2 3 4
+# 141 "/usr/include/math.h" 3 4
+# 1 "/usr/include/bits/mathcalls.h" 1 3 4
+# 53 "/usr/include/bits/mathcalls.h" 3 4
+
+
+extern long double acosl (long double __x) __attribute__ ((__nothrow__)); extern long double __acosl (long double __x) __attribute__ ((__nothrow__));
+
+extern long double asinl (long double __x) __attribute__ ((__nothrow__)); extern long double __asinl (long double __x) __attribute__ ((__nothrow__));
+
+extern long double atanl (long double __x) __attribute__ ((__nothrow__)); extern long double __atanl (long double __x) __attribute__ ((__nothrow__));
+
+extern long double atan2l (long double __y, long double __x) __attribute__ ((__nothrow__)); extern long double __atan2l (long double __y, long double __x) __attribute__ ((__nothrow__));
+
+
+extern long double cosl (long double __x) __attribute__ ((__nothrow__)); extern long double __cosl (long double __x) __attribute__ ((__nothrow__));
+
+extern long double sinl (long double __x) __attribute__ ((__nothrow__)); extern long double __sinl (long double __x) __attribute__ ((__nothrow__));
+
+extern long double tanl (long double __x) __attribute__ ((__nothrow__)); extern long double __tanl (long double __x) __attribute__ ((__nothrow__));
+
+
+
+
+extern long double coshl (long double __x) __attribute__ ((__nothrow__)); extern long double __coshl (long double __x) __attribute__ ((__nothrow__));
+
+extern long double sinhl (long double __x) __attribute__ ((__nothrow__)); extern long double __sinhl (long double __x) __attribute__ ((__nothrow__));
+
+extern long double tanhl (long double __x) __attribute__ ((__nothrow__)); extern long double __tanhl (long double __x) __attribute__ ((__nothrow__));
+
+
+
+
+extern void sincosl (long double __x, long double *__sinx, long double *__cosx) __attribute__ ((__nothrow__)); extern void __sincosl (long double __x, long double *__sinx, long double *__cosx) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+extern long double acoshl (long double __x) __attribute__ ((__nothrow__)); extern long double __acoshl (long double __x) __attribute__ ((__nothrow__));
+
+extern long double asinhl (long double __x) __attribute__ ((__nothrow__)); extern long double __asinhl (long double __x) __attribute__ ((__nothrow__));
+
+extern long double atanhl (long double __x) __attribute__ ((__nothrow__)); extern long double __atanhl (long double __x) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+
+extern long double expl (long double __x) __attribute__ ((__nothrow__)); extern long double __expl (long double __x) __attribute__ ((__nothrow__));
+
+
+extern long double frexpl (long double __x, int *__exponent) __attribute__ ((__nothrow__)); extern long double __frexpl (long double __x, int *__exponent) __attribute__ ((__nothrow__));
+
+
+extern long double ldexpl (long double __x, int __exponent) __attribute__ ((__nothrow__)); extern long double __ldexpl (long double __x, int __exponent) __attribute__ ((__nothrow__));
+
+
+extern long double logl (long double __x) __attribute__ ((__nothrow__)); extern long double __logl (long double __x) __attribute__ ((__nothrow__));
+
+
+extern long double log10l (long double __x) __attribute__ ((__nothrow__)); extern long double __log10l (long double __x) __attribute__ ((__nothrow__));
+
+
+extern long double modfl (long double __x, long double *__iptr) __attribute__ ((__nothrow__)); extern long double __modfl (long double __x, long double *__iptr) __attribute__ ((__nothrow__));
+
+
+
+
+extern long double exp10l (long double __x) __attribute__ ((__nothrow__)); extern long double __exp10l (long double __x) __attribute__ ((__nothrow__));
+
+extern long double pow10l (long double __x) __attribute__ ((__nothrow__)); extern long double __pow10l (long double __x) __attribute__ ((__nothrow__));
+
+
+
+
+
+extern long double expm1l (long double __x) __attribute__ ((__nothrow__)); extern long double __expm1l (long double __x) __attribute__ ((__nothrow__));
+
+
+extern long double log1pl (long double __x) __attribute__ ((__nothrow__)); extern long double __log1pl (long double __x) __attribute__ ((__nothrow__));
+
+
+extern long double logbl (long double __x) __attribute__ ((__nothrow__)); extern long double __logbl (long double __x) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+extern long double exp2l (long double __x) __attribute__ ((__nothrow__)); extern long double __exp2l (long double __x) __attribute__ ((__nothrow__));
+
+
+extern long double log2l (long double __x) __attribute__ ((__nothrow__)); extern long double __log2l (long double __x) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+
+
+extern long double powl (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __powl (long double __x, long double __y) __attribute__ ((__nothrow__));
+
+
+extern long double sqrtl (long double __x) __attribute__ ((__nothrow__)); extern long double __sqrtl (long double __x) __attribute__ ((__nothrow__));
+
+
+
+
+
+extern long double hypotl (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __hypotl (long double __x, long double __y) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+extern long double cbrtl (long double __x) __attribute__ ((__nothrow__)); extern long double __cbrtl (long double __x) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+
+
+extern long double ceill (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __ceill (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+
+extern long double fabsl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __fabsl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+
+extern long double floorl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __floorl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+
+extern long double fmodl (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __fmodl (long double __x, long double __y) __attribute__ ((__nothrow__));
+
+
+
+
+extern int __isinfl (long double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+
+extern int __finitel (long double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+
+
+
+
+extern int isinfl (long double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+
+extern int finitel (long double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+
+extern long double dreml (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __dreml (long double __x, long double __y) __attribute__ ((__nothrow__));
+
+
+
+extern long double significandl (long double __x) __attribute__ ((__nothrow__)); extern long double __significandl (long double __x) __attribute__ ((__nothrow__));
+
+
+
+
+
+extern long double copysignl (long double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __copysignl (long double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+
+
+
+
+
+extern long double nanl (__const char *__tagb) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __nanl (__const char *__tagb) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+
+
+
+
+extern int __isnanl (long double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+
+
+extern int isnanl (long double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+
+extern long double j0l (long double) __attribute__ ((__nothrow__)); extern long double __j0l (long double) __attribute__ ((__nothrow__));
+extern long double j1l (long double) __attribute__ ((__nothrow__)); extern long double __j1l (long double) __attribute__ ((__nothrow__));
+extern long double jnl (int, long double) __attribute__ ((__nothrow__)); extern long double __jnl (int, long double) __attribute__ ((__nothrow__));
+extern long double y0l (long double) __attribute__ ((__nothrow__)); extern long double __y0l (long double) __attribute__ ((__nothrow__));
+extern long double y1l (long double) __attribute__ ((__nothrow__)); extern long double __y1l (long double) __attribute__ ((__nothrow__));
+extern long double ynl (int, long double) __attribute__ ((__nothrow__)); extern long double __ynl (int, long double) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+extern long double erfl (long double) __attribute__ ((__nothrow__)); extern long double __erfl (long double) __attribute__ ((__nothrow__));
+extern long double erfcl (long double) __attribute__ ((__nothrow__)); extern long double __erfcl (long double) __attribute__ ((__nothrow__));
+extern long double lgammal (long double) __attribute__ ((__nothrow__)); extern long double __lgammal (long double) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+extern long double tgammal (long double) __attribute__ ((__nothrow__)); extern long double __tgammal (long double) __attribute__ ((__nothrow__));
+
+
+
+
+
+extern long double gammal (long double) __attribute__ ((__nothrow__)); extern long double __gammal (long double) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+extern long double lgammal_r (long double, int *__signgamp) __attribute__ ((__nothrow__)); extern long double __lgammal_r (long double, int *__signgamp) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+
+extern long double rintl (long double __x) __attribute__ ((__nothrow__)); extern long double __rintl (long double __x) __attribute__ ((__nothrow__));
+
+
+extern long double nextafterl (long double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __nextafterl (long double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+extern long double nexttowardl (long double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __nexttowardl (long double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+
+
+extern long double remainderl (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __remainderl (long double __x, long double __y) __attribute__ ((__nothrow__));
+
+
+
+extern long double scalbnl (long double __x, int __n) __attribute__ ((__nothrow__)); extern long double __scalbnl (long double __x, int __n) __attribute__ ((__nothrow__));
+
+
+
+extern int ilogbl (long double __x) __attribute__ ((__nothrow__)); extern int __ilogbl (long double __x) __attribute__ ((__nothrow__));
+
+
+
+
+extern long double scalblnl (long double __x, long int __n) __attribute__ ((__nothrow__)); extern long double __scalblnl (long double __x, long int __n) __attribute__ ((__nothrow__));
+
+
+
+extern long double nearbyintl (long double __x) __attribute__ ((__nothrow__)); extern long double __nearbyintl (long double __x) __attribute__ ((__nothrow__));
+
+
+
+extern long double roundl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __roundl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+
+
+extern long double truncl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __truncl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+
+
+
+extern long double remquol (long double __x, long double __y, int *__quo) __attribute__ ((__nothrow__)); extern long double __remquol (long double __x, long double __y, int *__quo) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+extern long int lrintl (long double __x) __attribute__ ((__nothrow__)); extern long int __lrintl (long double __x) __attribute__ ((__nothrow__));
+extern long long int llrintl (long double __x) __attribute__ ((__nothrow__)); extern long long int __llrintl (long double __x) __attribute__ ((__nothrow__));
+
+
+
+extern long int lroundl (long double __x) __attribute__ ((__nothrow__)); extern long int __lroundl (long double __x) __attribute__ ((__nothrow__));
+extern long long int llroundl (long double __x) __attribute__ ((__nothrow__)); extern long long int __llroundl (long double __x) __attribute__ ((__nothrow__));
+
+
+
+extern long double fdiml (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __fdiml (long double __x, long double __y) __attribute__ ((__nothrow__));
+
+
+extern long double fmaxl (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __fmaxl (long double __x, long double __y) __attribute__ ((__nothrow__));
+
+
+extern long double fminl (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __fminl (long double __x, long double __y) __attribute__ ((__nothrow__));
+
+
+
+extern int __fpclassifyl (long double __value) __attribute__ ((__nothrow__))
+ __attribute__ ((__const__));
+
+
+extern int __signbitl (long double __value) __attribute__ ((__nothrow__))
+ __attribute__ ((__const__));
+
+
+
+extern long double fmal (long double __x, long double __y, long double __z) __attribute__ ((__nothrow__)); extern long double __fmal (long double __x, long double __y, long double __z) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+
+
+extern long double scalbl (long double __x, long double __n) __attribute__ ((__nothrow__)); extern long double __scalbl (long double __x, long double __n) __attribute__ ((__nothrow__));
+# 142 "/usr/include/math.h" 2 3 4
+# 157 "/usr/include/math.h" 3 4
+extern int signgam;
+# 198 "/usr/include/math.h" 3 4
+enum
+ {
+ FP_NAN,
+
+ FP_INFINITE,
+
+ FP_ZERO,
+
+ FP_SUBNORMAL,
+
+ FP_NORMAL
+
+ };
+# 284 "/usr/include/math.h" 3 4
+typedef enum
+{
+ _IEEE_ = -1,
+ _SVID_,
+ _XOPEN_,
+ _POSIX_,
+ _ISOC_
+} _LIB_VERSION_TYPE;
+
+
+
+
+extern _LIB_VERSION_TYPE _LIB_VERSION;
+# 309 "/usr/include/math.h" 3 4
+struct exception
+
+ {
+ int type;
+ char *name;
+ double arg1;
+ double arg2;
+ double retval;
+ };
+
+
+
+
+extern int matherr (struct exception *__exc);
+# 409 "/usr/include/math.h" 3 4
+# 1 "/usr/include/bits/mathinline.h" 1 3 4
+# 63 "/usr/include/bits/mathinline.h" 3 4
+extern __inline int
+__attribute__ ((__nothrow__)) __signbitf (float __x)
+{
+ __extension__ union { float __f; int __i; } __u = { __f: __x };
+ return __u.__i < 0;
+}
+extern __inline int
+__attribute__ ((__nothrow__)) __signbit (double __x)
+{
+ __extension__ union { double __d; int __i[2]; } __u = { __d: __x };
+ return __u.__i[0] < 0;
+}
+
+extern __inline int
+__attribute__ ((__nothrow__)) __signbitl (long double __x)
+{
+ __extension__ union { long double __d; int __i[4]; } __u = { __d: __x };
+ return __u.__i[0] < 0;
+}
+# 116 "/usr/include/bits/mathinline.h" 3 4
+extern __inline double fdim (double __x, double __y) __attribute__ ((__nothrow__));
+extern __inline double
+__attribute__ ((__nothrow__)) fdim (double __x, double __y)
+{
+ return __x <= __y ? 0 : __x - __y;
+}
+
+extern __inline float fdimf (float __x, float __y) __attribute__ ((__nothrow__));
+extern __inline float
+__attribute__ ((__nothrow__)) fdimf (float __x, float __y)
+{
+ return __x <= __y ? 0 : __x - __y;
+}
+# 410 "/usr/include/math.h" 2 3 4
+# 465 "/usr/include/math.h" 3 4
+
+# 321 "./../include/my_global.h" 2
+
+# 1 "/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.4/include-fixed/limits.h" 1 3 4
+# 11 "/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.4/include-fixed/limits.h" 3 4
+# 1 "/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.4/include-fixed/syslimits.h" 1 3 4
+
+
+
+
+
+
+# 1 "/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.4/include-fixed/limits.h" 1 3 4
+# 122 "/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.4/include-fixed/limits.h" 3 4
+# 1 "/usr/include/limits.h" 1 3 4
+# 145 "/usr/include/limits.h" 3 4
+# 1 "/usr/include/bits/posix1_lim.h" 1 3 4
+# 157 "/usr/include/bits/posix1_lim.h" 3 4
+# 1 "/usr/include/bits/local_lim.h" 1 3 4
+# 40 "/usr/include/bits/local_lim.h" 3 4
+# 1 "/usr/include/linux/limits.h" 1 3 4
+# 41 "/usr/include/bits/local_lim.h" 2 3 4
+# 158 "/usr/include/bits/posix1_lim.h" 2 3 4
+# 146 "/usr/include/limits.h" 2 3 4
+
+
+
+# 1 "/usr/include/bits/posix2_lim.h" 1 3 4
+# 150 "/usr/include/limits.h" 2 3 4
+
+
+
+# 1 "/usr/include/bits/xopen_lim.h" 1 3 4
+# 34 "/usr/include/bits/xopen_lim.h" 3 4
+# 1 "/usr/include/bits/stdio_lim.h" 1 3 4
+# 35 "/usr/include/bits/xopen_lim.h" 2 3 4
+# 154 "/usr/include/limits.h" 2 3 4
+# 123 "/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.4/include-fixed/limits.h" 2 3 4
+# 8 "/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.4/include-fixed/syslimits.h" 2 3 4
+# 12 "/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.4/include-fixed/limits.h" 2 3 4
+# 323 "./../include/my_global.h" 2
+
+
+# 1 "/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.4/include/float.h" 1 3 4
+# 326 "./../include/my_global.h" 2
+
+
+# 1 "/usr/include/fenv.h" 1 3 4
+# 58 "/usr/include/fenv.h" 3 4
+# 1 "/usr/include/bits/fenv.h" 1 3 4
+# 26 "/usr/include/bits/fenv.h" 3 4
+enum
+ {
+ FE_INEXACT = 1 << (31 - 6),
+
+ FE_DIVBYZERO = 1 << (31 - 5),
+
+ FE_UNDERFLOW = 1 << (31 - 4),
+
+ FE_OVERFLOW = 1 << (31 - 3),
+# 43 "/usr/include/bits/fenv.h" 3 4
+ FE_INVALID = 1 << (31 - 2),
+# 54 "/usr/include/bits/fenv.h" 3 4
+ FE_INVALID_SNAN = 1 << (31 - 7),
+
+
+
+ FE_INVALID_ISI = 1 << (31 - 8),
+
+
+
+ FE_INVALID_IDI = 1 << (31 - 9),
+
+
+
+ FE_INVALID_ZDZ = 1 << (31 - 10),
+
+
+
+ FE_INVALID_IMZ = 1 << (31 - 11),
+
+
+
+ FE_INVALID_COMPARE = 1 << (31 - 12),
+
+
+
+
+
+ FE_INVALID_SOFTWARE = 1 << (31 - 21),
+
+
+
+
+ FE_INVALID_SQRT = 1 << (31 - 22),
+
+
+
+ FE_INVALID_INTEGER_CONVERSION = 1 << (31 - 23)
+
+
+
+
+
+
+
+ };
+
+
+
+
+
+
+
+enum
+ {
+ FE_TONEAREST = 0,
+
+ FE_TOWARDZERO = 1,
+
+ FE_UPWARD = 2,
+
+ FE_DOWNWARD = 3
+
+ };
+
+
+typedef unsigned int fexcept_t;
+
+
+
+typedef double fenv_t;
+
+
+extern const fenv_t __fe_dfl_env;
+
+
+
+
+
+extern const fenv_t __fe_enabled_env;
+
+
+
+
+extern const fenv_t __fe_nonieee_env;
+
+
+
+
+
+
+
+
+
+
+extern const fenv_t *__fe_nomask_env (void);
+
+
+
+
+
+
+
+extern const fenv_t *__fe_mask_env (void);
+
+
+
+# 59 "/usr/include/fenv.h" 2 3 4
+
+
+
+
+
+
+extern int feclearexcept (int __excepts) __attribute__ ((__nothrow__));
+
+
+
+extern int fegetexceptflag (fexcept_t *__flagp, int __excepts) __attribute__ ((__nothrow__));
+
+
+extern int feraiseexcept (int __excepts) __attribute__ ((__nothrow__));
+
+
+
+extern int fesetexceptflag (__const fexcept_t *__flagp, int __excepts) __attribute__ ((__nothrow__));
+
+
+
+extern int fetestexcept (int __excepts) __attribute__ ((__nothrow__));
+
+
+
+
+
+extern int fegetround (void) __attribute__ ((__nothrow__));
+
+
+extern int fesetround (int __rounding_direction) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+extern int fegetenv (fenv_t *__envp) __attribute__ ((__nothrow__));
+
+
+
+
+extern int feholdexcept (fenv_t *__envp) __attribute__ ((__nothrow__));
+
+
+
+extern int fesetenv (__const fenv_t *__envp) __attribute__ ((__nothrow__));
+
+
+
+
+extern int feupdateenv (__const fenv_t *__envp) __attribute__ ((__nothrow__));
+
+
+
+
+# 1 "/usr/include/bits/fenvinline.h" 1 3 4
+# 116 "/usr/include/fenv.h" 2 3 4
+
+
+
+
+
+
+
+extern int feenableexcept (int __excepts) __attribute__ ((__nothrow__));
+
+
+
+
+extern int fedisableexcept (int __excepts) __attribute__ ((__nothrow__));
+
+
+extern int fegetexcept (void) __attribute__ ((__nothrow__));
+
+
+
+# 329 "./../include/my_global.h" 2
+
+
+
+
+
+
+# 1 "/usr/include/fcntl.h" 1 3 4
+# 30 "/usr/include/fcntl.h" 3 4
+
+
+
+
+# 1 "/usr/include/bits/fcntl.h" 1 3 4
+# 27 "/usr/include/bits/fcntl.h" 3 4
+# 1 "/usr/include/bits/uio.h" 1 3 4
+# 44 "/usr/include/bits/uio.h" 3 4
+struct iovec
+ {
+ void *iov_base;
+ size_t iov_len;
+ };
+# 28 "/usr/include/bits/fcntl.h" 2 3 4
+# 144 "/usr/include/bits/fcntl.h" 3 4
+struct flock
+ {
+ short int l_type;
+ short int l_whence;
+
+ __off_t l_start;
+ __off_t l_len;
+
+
+
+
+ __pid_t l_pid;
+ };
+
+
+struct flock64
+ {
+ short int l_type;
+ short int l_whence;
+ __off64_t l_start;
+ __off64_t l_len;
+ __pid_t l_pid;
+ };
+# 211 "/usr/include/bits/fcntl.h" 3 4
+
+
+
+
+
+extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
+ __attribute__ ((__nothrow__));
+
+
+
+extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
+ unsigned int __flags);
+
+
+
+extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
+ size_t __count, unsigned int __flags);
+
+
+extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout,
+ __off64_t *__offout, size_t __len,
+ unsigned int __flags);
+
+
+extern ssize_t tee (int __fdin, int __fdout, size_t __len,
+ unsigned int __flags);
+
+
+
+extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
+# 251 "/usr/include/bits/fcntl.h" 3 4
+extern int fallocate64 (int __fd, int __mode, __off64_t __offset,
+ __off64_t __len);
+
+
+
+
+
+# 35 "/usr/include/fcntl.h" 2 3 4
+
+
+
+# 1 "/usr/include/sys/stat.h" 1 3 4
+# 105 "/usr/include/sys/stat.h" 3 4
+
+
+# 1 "/usr/include/bits/stat.h" 1 3 4
+# 24 "/usr/include/bits/stat.h" 3 4
+# 1 "/usr/include/bits/wordsize.h" 1 3 4
+# 25 "/usr/include/bits/stat.h" 2 3 4
+# 140 "/usr/include/bits/stat.h" 3 4
+struct stat
+ {
+ __dev_t st_dev;
+
+ __ino_t st_ino;
+
+
+
+ __nlink_t st_nlink;
+ __mode_t st_mode;
+ __uid_t st_uid;
+ __gid_t st_gid;
+ int __pad2;
+ __dev_t st_rdev;
+
+ __off_t st_size;
+
+
+
+ __blksize_t st_blksize;
+
+
+ __blkcnt_t st_blocks;
+# 173 "/usr/include/bits/stat.h" 3 4
+ struct timespec st_atim;
+ struct timespec st_mtim;
+ struct timespec st_ctim;
+# 187 "/usr/include/bits/stat.h" 3 4
+ unsigned long int __unused4;
+ unsigned long int __unused5;
+ unsigned long int __unused6;
+ };
+
+
+struct stat64
+ {
+ __dev_t st_dev;
+ __ino64_t st_ino;
+ __nlink_t st_nlink;
+ __mode_t st_mode;
+ __uid_t st_uid;
+ __gid_t st_gid;
+ int __pad2;
+ __dev_t st_rdev;
+ __off64_t st_size;
+ __blksize_t st_blksize;
+ __blkcnt64_t st_blocks;
+
+
+
+
+
+
+
+ struct timespec st_atim;
+ struct timespec st_mtim;
+ struct timespec st_ctim;
+# 227 "/usr/include/bits/stat.h" 3 4
+ unsigned long int __unused4;
+ unsigned long int __unused5;
+ unsigned long int __unused6;
+ };
+# 108 "/usr/include/sys/stat.h" 2 3 4
+# 209 "/usr/include/sys/stat.h" 3 4
+extern int stat (__const char *__restrict __file,
+ struct stat *__restrict __buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+extern int fstat (int __fd, struct stat *__buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
+# 228 "/usr/include/sys/stat.h" 3 4
+extern int stat64 (__const char *__restrict __file,
+ struct stat64 *__restrict __buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+extern int fstat64 (int __fd, struct stat64 *__buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
+
+
+
+
+
+
+
+extern int fstatat (int __fd, __const char *__restrict __file,
+ struct stat *__restrict __buf, int __flag)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3)));
+# 253 "/usr/include/sys/stat.h" 3 4
+extern int fstatat64 (int __fd, __const char *__restrict __file,
+ struct stat64 *__restrict __buf, int __flag)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3)));
+
+
+
+
+
+
+
+extern int lstat (__const char *__restrict __file,
+ struct stat *__restrict __buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+# 276 "/usr/include/sys/stat.h" 3 4
+extern int lstat64 (__const char *__restrict __file,
+ struct stat64 *__restrict __buf)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+
+
+extern int chmod (__const char *__file, __mode_t __mode)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+extern int lchmod (__const char *__file, __mode_t __mode)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+extern int fchmod (int __fd, __mode_t __mode) __attribute__ ((__nothrow__));
+
+
+
+
+
+extern int fchmodat (int __fd, __const char *__file, __mode_t __mode,
+ int __flag)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+
+extern __mode_t umask (__mode_t __mask) __attribute__ ((__nothrow__));
+
+
+
+
+extern __mode_t getumask (void) __attribute__ ((__nothrow__));
+
+
+
+extern int mkdir (__const char *__path, __mode_t __mode)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+extern int mkdirat (int __fd, __const char *__path, __mode_t __mode)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
+
+
+
+
+
+
+extern int mknod (__const char *__path, __mode_t __mode, __dev_t __dev)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+extern int mknodat (int __fd, __const char *__path, __mode_t __mode,
+ __dev_t __dev) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
+
+
+
+
+
+extern int mkfifo (__const char *__path, __mode_t __mode)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+extern int mkfifoat (int __fd, __const char *__path, __mode_t __mode)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
+
+
+
+
+
+extern int utimensat (int __fd, __const char *__path,
+ __const struct timespec __times[2],
+ int __flags)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
+
+
+
+
+extern int futimens (int __fd, __const struct timespec __times[2]) __attribute__ ((__nothrow__));
+# 399 "/usr/include/sys/stat.h" 3 4
+extern int __fxstat (int __ver, int __fildes, struct stat *__stat_buf)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3)));
+extern int __xstat (int __ver, __const char *__filename,
+ struct stat *__stat_buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3)));
+extern int __lxstat (int __ver, __const char *__filename,
+ struct stat *__stat_buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3)));
+extern int __fxstatat (int __ver, int __fildes, __const char *__filename,
+ struct stat *__stat_buf, int __flag)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4)));
+# 432 "/usr/include/sys/stat.h" 3 4
+extern int __fxstat64 (int __ver, int __fildes, struct stat64 *__stat_buf)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3)));
+extern int __xstat64 (int __ver, __const char *__filename,
+ struct stat64 *__stat_buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3)));
+extern int __lxstat64 (int __ver, __const char *__filename,
+ struct stat64 *__stat_buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3)));
+extern int __fxstatat64 (int __ver, int __fildes, __const char *__filename,
+ struct stat64 *__stat_buf, int __flag)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4)));
+
+extern int __xmknod (int __ver, __const char *__path, __mode_t __mode,
+ __dev_t *__dev) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4)));
+
+extern int __xmknodat (int __ver, int __fd, __const char *__path,
+ __mode_t __mode, __dev_t *__dev)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 5)));
+
+
+
+
+extern __inline int
+__attribute__ ((__nothrow__)) stat (__const char *__path, struct stat *__statbuf)
+{
+ return __xstat (1, __path, __statbuf);
+}
+
+
+extern __inline int
+__attribute__ ((__nothrow__)) lstat (__const char *__path, struct stat *__statbuf)
+{
+ return __lxstat (1, __path, __statbuf);
+}
+
+
+extern __inline int
+__attribute__ ((__nothrow__)) fstat (int __fd, struct stat *__statbuf)
+{
+ return __fxstat (1, __fd, __statbuf);
+}
+
+
+extern __inline int
+__attribute__ ((__nothrow__)) fstatat (int __fd, __const char *__filename, struct stat *__statbuf, int __flag)
+
+{
+ return __fxstatat (1, __fd, __filename, __statbuf, __flag);
+}
+
+
+
+extern __inline int
+__attribute__ ((__nothrow__)) mknod (__const char *__path, __mode_t __mode, __dev_t __dev)
+{
+ return __xmknod (1, __path, __mode, &__dev);
+}
+
+
+
+extern __inline int
+__attribute__ ((__nothrow__)) mknodat (int __fd, __const char *__path, __mode_t __mode, __dev_t __dev)
+
+{
+ return __xmknodat (1, __fd, __path, __mode, &__dev);
+}
+
+
+
+
+
+extern __inline int
+__attribute__ ((__nothrow__)) stat64 (__const char *__path, struct stat64 *__statbuf)
+{
+ return __xstat64 (1, __path, __statbuf);
+}
+
+
+extern __inline int
+__attribute__ ((__nothrow__)) lstat64 (__const char *__path, struct stat64 *__statbuf)
+{
+ return __lxstat64 (1, __path, __statbuf);
+}
+
+
+extern __inline int
+__attribute__ ((__nothrow__)) fstat64 (int __fd, struct stat64 *__statbuf)
+{
+ return __fxstat64 (1, __fd, __statbuf);
+}
+
+
+extern __inline int
+__attribute__ ((__nothrow__)) fstatat64 (int __fd, __const char *__filename, struct stat64 *__statbuf, int __flag)
+
+{
+ return __fxstatat64 (1, __fd, __filename, __statbuf, __flag);
+}
+
+
+
+
+
+
+
+# 39 "/usr/include/fcntl.h" 2 3 4
+# 76 "/usr/include/fcntl.h" 3 4
+extern int fcntl (int __fd, int __cmd, ...);
+# 85 "/usr/include/fcntl.h" 3 4
+extern int open (__const char *__file, int __oflag, ...) __attribute__ ((__nonnull__ (1)));
+# 95 "/usr/include/fcntl.h" 3 4
+extern int open64 (__const char *__file, int __oflag, ...) __attribute__ ((__nonnull__ (1)));
+# 109 "/usr/include/fcntl.h" 3 4
+extern int openat (int __fd, __const char *__file, int __oflag, ...)
+ __attribute__ ((__nonnull__ (2)));
+# 120 "/usr/include/fcntl.h" 3 4
+extern int openat64 (int __fd, __const char *__file, int __oflag, ...)
+ __attribute__ ((__nonnull__ (2)));
+# 130 "/usr/include/fcntl.h" 3 4
+extern int creat (__const char *__file, __mode_t __mode) __attribute__ ((__nonnull__ (1)));
+# 140 "/usr/include/fcntl.h" 3 4
+extern int creat64 (__const char *__file, __mode_t __mode) __attribute__ ((__nonnull__ (1)));
+# 159 "/usr/include/fcntl.h" 3 4
+extern int lockf (int __fd, int __cmd, __off_t __len);
+# 168 "/usr/include/fcntl.h" 3 4
+extern int lockf64 (int __fd, int __cmd, __off64_t __len);
+
+
+
+
+
+
+
+extern int posix_fadvise (int __fd, __off_t __offset, __off_t __len,
+ int __advise) __attribute__ ((__nothrow__));
+# 188 "/usr/include/fcntl.h" 3 4
+extern int posix_fadvise64 (int __fd, __off64_t __offset, __off64_t __len,
+ int __advise) __attribute__ ((__nothrow__));
+# 198 "/usr/include/fcntl.h" 3 4
+extern int posix_fallocate (int __fd, __off_t __offset, __off_t __len);
+# 209 "/usr/include/fcntl.h" 3 4
+extern int posix_fallocate64 (int __fd, __off64_t __offset, __off64_t __len);
+
+
+
+
+
+
+
+# 1 "/usr/include/bits/fcntl2.h" 1 3 4
+# 27 "/usr/include/bits/fcntl2.h" 3 4
+extern int __open_2 (__const char *__path, int __oflag) __attribute__ ((__nonnull__ (1)));
+extern int __open_alias (__const char *__path, int __oflag, ...) __asm__ ("" "open") __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+
+
+extern void __open_too_many_args (void) __attribute__((__error__ ("open can be called either with 2 or 3 arguments, not more")));
+
+extern void __open_missing_mode (void) __attribute__((__error__ ("open with O_CREAT in second argument needs 3 arguments")));
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int
+open (__const char *__path, int __oflag, ...)
+{
+ if (__builtin_va_arg_pack_len () > 1)
+ __open_too_many_args ();
+
+ if (__builtin_constant_p (__oflag))
+ {
+ if ((__oflag & 0100) != 0 && __builtin_va_arg_pack_len () < 1)
+ {
+ __open_missing_mode ();
+ return __open_2 (__path, __oflag);
+ }
+ return __open_alias (__path, __oflag, __builtin_va_arg_pack ());
+ }
+
+ if (__builtin_va_arg_pack_len () < 1)
+ return __open_2 (__path, __oflag);
+
+ return __open_alias (__path, __oflag, __builtin_va_arg_pack ());
+}
+
+
+
+extern int __open64_2 (__const char *__path, int __oflag) __attribute__ ((__nonnull__ (1)));
+extern int __open64_alias (__const char *__path, int __oflag, ...) __asm__ ("" "open64") __attribute__ ((__nonnull__ (1)));
+
+extern void __open64_too_many_args (void) __attribute__((__error__ ("open64 can be called either with 2 or 3 arguments, not more")));
+
+extern void __open64_missing_mode (void) __attribute__((__error__ ("open64 with O_CREAT in second argument needs 3 arguments")));
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int
+open64 (__const char *__path, int __oflag, ...)
+{
+ if (__builtin_va_arg_pack_len () > 1)
+ __open64_too_many_args ();
+
+ if (__builtin_constant_p (__oflag))
+ {
+ if ((__oflag & 0100) != 0 && __builtin_va_arg_pack_len () < 1)
+ {
+ __open64_missing_mode ();
+ return __open64_2 (__path, __oflag);
+ }
+ return __open64_alias (__path, __oflag, __builtin_va_arg_pack ());
+ }
+
+ if (__builtin_va_arg_pack_len () < 1)
+ return __open64_2 (__path, __oflag);
+
+ return __open64_alias (__path, __oflag, __builtin_va_arg_pack ());
+}
+
+
+
+
+
+extern int __openat_2 (int __fd, __const char *__path, int __oflag)
+ __attribute__ ((__nonnull__ (2)));
+extern int __openat_alias (int __fd, __const char *__path, int __oflag, ...) __asm__ ("" "openat")
+
+ __attribute__ ((__nonnull__ (2)));
+# 112 "/usr/include/bits/fcntl2.h" 3 4
+extern void __openat_too_many_args (void) __attribute__((__error__ ("openat can be called either with 3 or 4 arguments, not more")));
+
+extern void __openat_missing_mode (void) __attribute__((__error__ ("openat with O_CREAT in third argument needs 4 arguments")));
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int
+openat (int __fd, __const char *__path, int __oflag, ...)
+{
+ if (__builtin_va_arg_pack_len () > 1)
+ __openat_too_many_args ();
+
+ if (__builtin_constant_p (__oflag))
+ {
+ if ((__oflag & 0100) != 0 && __builtin_va_arg_pack_len () < 1)
+ {
+ __openat_missing_mode ();
+ return __openat_2 (__fd, __path, __oflag);
+ }
+ return __openat_alias (__fd, __path, __oflag, __builtin_va_arg_pack ());
+ }
+
+ if (__builtin_va_arg_pack_len () < 1)
+ return __openat_2 (__fd, __path, __oflag);
+
+ return __openat_alias (__fd, __path, __oflag, __builtin_va_arg_pack ());
+}
+
+
+
+extern int __openat64_2 (int __fd, __const char *__path, int __oflag)
+ __attribute__ ((__nonnull__ (2)));
+extern int __openat64_alias (int __fd, __const char *__path, int __oflag, ...) __asm__ ("" "openat64")
+
+ __attribute__ ((__nonnull__ (2)));
+extern void __openat64_too_many_args (void) __attribute__((__error__ ("openat64 can be called either with 3 or 4 arguments, not more")));
+
+extern void __openat64_missing_mode (void) __attribute__((__error__ ("openat64 with O_CREAT in third argument needs 4 arguments")));
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int
+openat64 (int __fd, __const char *__path, int __oflag, ...)
+{
+ if (__builtin_va_arg_pack_len () > 1)
+ __openat64_too_many_args ();
+
+ if (__builtin_constant_p (__oflag))
+ {
+ if ((__oflag & 0100) != 0 && __builtin_va_arg_pack_len () < 1)
+ {
+ __openat64_missing_mode ();
+ return __openat64_2 (__fd, __path, __oflag);
+ }
+ return __openat64_alias (__fd, __path, __oflag, __builtin_va_arg_pack ());
+ }
+
+ if (__builtin_va_arg_pack_len () < 1)
+ return __openat64_2 (__fd, __path, __oflag);
+
+ return __openat64_alias (__fd, __path, __oflag, __builtin_va_arg_pack ());
+}
+# 218 "/usr/include/fcntl.h" 2 3 4
+
+
+
+# 336 "./../include/my_global.h" 2
+
+
+# 1 "/usr/include/sys/timeb.h" 1 3 4
+# 28 "/usr/include/sys/timeb.h" 3 4
+
+
+
+
+struct timeb
+ {
+ time_t time;
+ unsigned short int millitm;
+ short int timezone;
+ short int dstflag;
+ };
+
+
+
+extern int ftime (struct timeb *__timebuf);
+
+
+# 339 "./../include/my_global.h" 2
+
+
+# 1 "/usr/include/sys/time.h" 1 3 4
+# 29 "/usr/include/sys/time.h" 3 4
+# 1 "/usr/include/bits/time.h" 1 3 4
+# 30 "/usr/include/sys/time.h" 2 3 4
+# 39 "/usr/include/sys/time.h" 3 4
+
+# 57 "/usr/include/sys/time.h" 3 4
+struct timezone
+ {
+ int tz_minuteswest;
+ int tz_dsttime;
+ };
+
+typedef struct timezone *__restrict __timezone_ptr_t;
+# 73 "/usr/include/sys/time.h" 3 4
+extern int gettimeofday (struct timeval *__restrict __tv,
+ __timezone_ptr_t __tz) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+extern int settimeofday (__const struct timeval *__tv,
+ __const struct timezone *__tz)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+extern int adjtime (__const struct timeval *__delta,
+ struct timeval *__olddelta) __attribute__ ((__nothrow__));
+
+
+
+
+enum __itimer_which
+ {
+
+ ITIMER_REAL = 0,
+
+
+ ITIMER_VIRTUAL = 1,
+
+
+
+ ITIMER_PROF = 2
+
+ };
+
+
+
+struct itimerval
+ {
+
+ struct timeval it_interval;
+
+ struct timeval it_value;
+ };
+
+
+
+
+typedef enum __itimer_which __itimer_which_t;
+
+
+
+
+
+
+extern int getitimer (__itimer_which_t __which,
+ struct itimerval *__value) __attribute__ ((__nothrow__));
+
+
+
+
+extern int setitimer (__itimer_which_t __which,
+ __const struct itimerval *__restrict __new,
+ struct itimerval *__restrict __old) __attribute__ ((__nothrow__));
+
+
+
+
+extern int utimes (__const char *__file, __const struct timeval __tvp[2])
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+extern int lutimes (__const char *__file, __const struct timeval __tvp[2])
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int futimes (int __fd, __const struct timeval __tvp[2]) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+extern int futimesat (int __fd, __const char *__file,
+ __const struct timeval __tvp[2]) __attribute__ ((__nothrow__));
+# 191 "/usr/include/sys/time.h" 3 4
+
+# 342 "./../include/my_global.h" 2
+# 351 "./../include/my_global.h"
+# 1 "/usr/include/unistd.h" 1 3 4
+# 28 "/usr/include/unistd.h" 3 4
+
+# 175 "/usr/include/unistd.h" 3 4
+# 1 "/usr/include/bits/posix_opt.h" 1 3 4
+# 176 "/usr/include/unistd.h" 2 3 4
+
+
+
+# 1 "/usr/include/bits/environments.h" 1 3 4
+# 23 "/usr/include/bits/environments.h" 3 4
+# 1 "/usr/include/bits/wordsize.h" 1 3 4
+# 24 "/usr/include/bits/environments.h" 2 3 4
+# 180 "/usr/include/unistd.h" 2 3 4
+# 199 "/usr/include/unistd.h" 3 4
+# 1 "/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.4/include/stddef.h" 1 3 4
+# 200 "/usr/include/unistd.h" 2 3 4
+# 240 "/usr/include/unistd.h" 3 4
+typedef __intptr_t intptr_t;
+
+
+
+
+
+
+typedef __socklen_t socklen_t;
+# 260 "/usr/include/unistd.h" 3 4
+extern int access (__const char *__name, int __type) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+extern int euidaccess (__const char *__name, int __type)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int eaccess (__const char *__name, int __type)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+
+extern int faccessat (int __fd, __const char *__file, int __type, int __flag)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__));
+# 303 "/usr/include/unistd.h" 3 4
+extern __off_t lseek (int __fd, __off_t __offset, int __whence) __attribute__ ((__nothrow__));
+# 314 "/usr/include/unistd.h" 3 4
+extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence)
+ __attribute__ ((__nothrow__));
+
+
+
+
+
+
+extern int close (int __fd);
+
+
+
+
+
+
+extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+extern ssize_t write (int __fd, __const void *__buf, size_t __n) __attribute__ ((__warn_unused_result__));
+# 345 "/usr/include/unistd.h" 3 4
+extern ssize_t pread (int __fd, void *__buf, size_t __nbytes,
+ __off_t __offset) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+
+extern ssize_t pwrite (int __fd, __const void *__buf, size_t __n,
+ __off_t __offset) __attribute__ ((__warn_unused_result__));
+# 373 "/usr/include/unistd.h" 3 4
+extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes,
+ __off64_t __offset) __attribute__ ((__warn_unused_result__));
+
+
+extern ssize_t pwrite64 (int __fd, __const void *__buf, size_t __n,
+ __off64_t __offset) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+
+
+extern int pipe (int __pipedes[2]) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern int pipe2 (int __pipedes[2], int __flags) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
+# 401 "/usr/include/unistd.h" 3 4
+extern unsigned int alarm (unsigned int __seconds) __attribute__ ((__nothrow__));
+# 413 "/usr/include/unistd.h" 3 4
+extern unsigned int sleep (unsigned int __seconds);
+
+
+
+
+
+
+extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval)
+ __attribute__ ((__nothrow__));
+
+
+
+
+
+
+extern int usleep (__useconds_t __useconds);
+# 437 "/usr/include/unistd.h" 3 4
+extern int pause (void);
+
+
+
+extern int chown (__const char *__file, __uid_t __owner, __gid_t __group)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+
+
+
+extern int fchown (int __fd, __uid_t __owner, __gid_t __group) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern int lchown (__const char *__file, __uid_t __owner, __gid_t __group)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+
+extern int fchownat (int __fd, __const char *__file, __uid_t __owner,
+ __gid_t __group, int __flag)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__));
+
+
+
+extern int chdir (__const char *__path) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+
+
+
+extern int fchdir (int __fd) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
+# 479 "/usr/include/unistd.h" 3 4
+extern char *getcwd (char *__buf, size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+extern char *get_current_dir_name (void) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+extern char *getwd (char *__buf)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern int dup (int __fd) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
+
+
+extern int dup2 (int __fd, int __fd2) __attribute__ ((__nothrow__));
+
+
+
+
+extern int dup3 (int __fd, int __fd2, int __flags) __attribute__ ((__nothrow__));
+
+
+
+extern char **__environ;
+
+extern char **environ;
+
+
+
+
+
+extern int execve (__const char *__path, char *__const __argv[],
+ char *__const __envp[]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+extern int fexecve (int __fd, char *__const __argv[], char *__const __envp[])
+ __attribute__ ((__nothrow__));
+
+
+
+
+extern int execv (__const char *__path, char *__const __argv[])
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+extern int execle (__const char *__path, __const char *__arg, ...)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+extern int execl (__const char *__path, __const char *__arg, ...)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+extern int execvp (__const char *__file, char *__const __argv[])
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+extern int execlp (__const char *__file, __const char *__arg, ...)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+extern int nice (int __inc) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern void _exit (int __status) __attribute__ ((__noreturn__));
+
+
+
+
+
+# 1 "/usr/include/bits/confname.h" 1 3 4
+# 26 "/usr/include/bits/confname.h" 3 4
+enum
+ {
+ _PC_LINK_MAX,
+
+ _PC_MAX_CANON,
+
+ _PC_MAX_INPUT,
+
+ _PC_NAME_MAX,
+
+ _PC_PATH_MAX,
+
+ _PC_PIPE_BUF,
+
+ _PC_CHOWN_RESTRICTED,
+
+ _PC_NO_TRUNC,
+
+ _PC_VDISABLE,
+
+ _PC_SYNC_IO,
+
+ _PC_ASYNC_IO,
+
+ _PC_PRIO_IO,
+
+ _PC_SOCK_MAXBUF,
+
+ _PC_FILESIZEBITS,
+
+ _PC_REC_INCR_XFER_SIZE,
+
+ _PC_REC_MAX_XFER_SIZE,
+
+ _PC_REC_MIN_XFER_SIZE,
+
+ _PC_REC_XFER_ALIGN,
+
+ _PC_ALLOC_SIZE_MIN,
+
+ _PC_SYMLINK_MAX,
+
+ _PC_2_SYMLINKS
+
+ };
+
+
+enum
+ {
+ _SC_ARG_MAX,
+
+ _SC_CHILD_MAX,
+
+ _SC_CLK_TCK,
+
+ _SC_NGROUPS_MAX,
+
+ _SC_OPEN_MAX,
+
+ _SC_STREAM_MAX,
+
+ _SC_TZNAME_MAX,
+
+ _SC_JOB_CONTROL,
+
+ _SC_SAVED_IDS,
+
+ _SC_REALTIME_SIGNALS,
+
+ _SC_PRIORITY_SCHEDULING,
+
+ _SC_TIMERS,
+
+ _SC_ASYNCHRONOUS_IO,
+
+ _SC_PRIORITIZED_IO,
+
+ _SC_SYNCHRONIZED_IO,
+
+ _SC_FSYNC,
+
+ _SC_MAPPED_FILES,
+
+ _SC_MEMLOCK,
+
+ _SC_MEMLOCK_RANGE,
+
+ _SC_MEMORY_PROTECTION,
+
+ _SC_MESSAGE_PASSING,
+
+ _SC_SEMAPHORES,
+
+ _SC_SHARED_MEMORY_OBJECTS,
+
+ _SC_AIO_LISTIO_MAX,
+
+ _SC_AIO_MAX,
+
+ _SC_AIO_PRIO_DELTA_MAX,
+
+ _SC_DELAYTIMER_MAX,
+
+ _SC_MQ_OPEN_MAX,
+
+ _SC_MQ_PRIO_MAX,
+
+ _SC_VERSION,
+
+ _SC_PAGESIZE,
+
+
+ _SC_RTSIG_MAX,
+
+ _SC_SEM_NSEMS_MAX,
+
+ _SC_SEM_VALUE_MAX,
+
+ _SC_SIGQUEUE_MAX,
+
+ _SC_TIMER_MAX,
+
+
+
+
+ _SC_BC_BASE_MAX,
+
+ _SC_BC_DIM_MAX,
+
+ _SC_BC_SCALE_MAX,
+
+ _SC_BC_STRING_MAX,
+
+ _SC_COLL_WEIGHTS_MAX,
+
+ _SC_EQUIV_CLASS_MAX,
+
+ _SC_EXPR_NEST_MAX,
+
+ _SC_LINE_MAX,
+
+ _SC_RE_DUP_MAX,
+
+ _SC_CHARCLASS_NAME_MAX,
+
+
+ _SC_2_VERSION,
+
+ _SC_2_C_BIND,
+
+ _SC_2_C_DEV,
+
+ _SC_2_FORT_DEV,
+
+ _SC_2_FORT_RUN,
+
+ _SC_2_SW_DEV,
+
+ _SC_2_LOCALEDEF,
+
+
+ _SC_PII,
+
+ _SC_PII_XTI,
+
+ _SC_PII_SOCKET,
+
+ _SC_PII_INTERNET,
+
+ _SC_PII_OSI,
+
+ _SC_POLL,
+
+ _SC_SELECT,
+
+ _SC_UIO_MAXIOV,
+
+ _SC_IOV_MAX = _SC_UIO_MAXIOV,
+
+ _SC_PII_INTERNET_STREAM,
+
+ _SC_PII_INTERNET_DGRAM,
+
+ _SC_PII_OSI_COTS,
+
+ _SC_PII_OSI_CLTS,
+
+ _SC_PII_OSI_M,
+
+ _SC_T_IOV_MAX,
+
+
+
+ _SC_THREADS,
+
+ _SC_THREAD_SAFE_FUNCTIONS,
+
+ _SC_GETGR_R_SIZE_MAX,
+
+ _SC_GETPW_R_SIZE_MAX,
+
+ _SC_LOGIN_NAME_MAX,
+
+ _SC_TTY_NAME_MAX,
+
+ _SC_THREAD_DESTRUCTOR_ITERATIONS,
+
+ _SC_THREAD_KEYS_MAX,
+
+ _SC_THREAD_STACK_MIN,
+
+ _SC_THREAD_THREADS_MAX,
+
+ _SC_THREAD_ATTR_STACKADDR,
+
+ _SC_THREAD_ATTR_STACKSIZE,
+
+ _SC_THREAD_PRIORITY_SCHEDULING,
+
+ _SC_THREAD_PRIO_INHERIT,
+
+ _SC_THREAD_PRIO_PROTECT,
+
+ _SC_THREAD_PROCESS_SHARED,
+
+
+ _SC_NPROCESSORS_CONF,
+
+ _SC_NPROCESSORS_ONLN,
+
+ _SC_PHYS_PAGES,
+
+ _SC_AVPHYS_PAGES,
+
+ _SC_ATEXIT_MAX,
+
+ _SC_PASS_MAX,
+
+
+ _SC_XOPEN_VERSION,
+
+ _SC_XOPEN_XCU_VERSION,
+
+ _SC_XOPEN_UNIX,
+
+ _SC_XOPEN_CRYPT,
+
+ _SC_XOPEN_ENH_I18N,
+
+ _SC_XOPEN_SHM,
+
+
+ _SC_2_CHAR_TERM,
+
+ _SC_2_C_VERSION,
+
+ _SC_2_UPE,
+
+
+ _SC_XOPEN_XPG2,
+
+ _SC_XOPEN_XPG3,
+
+ _SC_XOPEN_XPG4,
+
+
+ _SC_CHAR_BIT,
+
+ _SC_CHAR_MAX,
+
+ _SC_CHAR_MIN,
+
+ _SC_INT_MAX,
+
+ _SC_INT_MIN,
+
+ _SC_LONG_BIT,
+
+ _SC_WORD_BIT,
+
+ _SC_MB_LEN_MAX,
+
+ _SC_NZERO,
+
+ _SC_SSIZE_MAX,
+
+ _SC_SCHAR_MAX,
+
+ _SC_SCHAR_MIN,
+
+ _SC_SHRT_MAX,
+
+ _SC_SHRT_MIN,
+
+ _SC_UCHAR_MAX,
+
+ _SC_UINT_MAX,
+
+ _SC_ULONG_MAX,
+
+ _SC_USHRT_MAX,
+
+
+ _SC_NL_ARGMAX,
+
+ _SC_NL_LANGMAX,
+
+ _SC_NL_MSGMAX,
+
+ _SC_NL_NMAX,
+
+ _SC_NL_SETMAX,
+
+ _SC_NL_TEXTMAX,
+
+
+ _SC_XBS5_ILP32_OFF32,
+
+ _SC_XBS5_ILP32_OFFBIG,
+
+ _SC_XBS5_LP64_OFF64,
+
+ _SC_XBS5_LPBIG_OFFBIG,
+
+
+ _SC_XOPEN_LEGACY,
+
+ _SC_XOPEN_REALTIME,
+
+ _SC_XOPEN_REALTIME_THREADS,
+
+
+ _SC_ADVISORY_INFO,
+
+ _SC_BARRIERS,
+
+ _SC_BASE,
+
+ _SC_C_LANG_SUPPORT,
+
+ _SC_C_LANG_SUPPORT_R,
+
+ _SC_CLOCK_SELECTION,
+
+ _SC_CPUTIME,
+
+ _SC_THREAD_CPUTIME,
+
+ _SC_DEVICE_IO,
+
+ _SC_DEVICE_SPECIFIC,
+
+ _SC_DEVICE_SPECIFIC_R,
+
+ _SC_FD_MGMT,
+
+ _SC_FIFO,
+
+ _SC_PIPE,
+
+ _SC_FILE_ATTRIBUTES,
+
+ _SC_FILE_LOCKING,
+
+ _SC_FILE_SYSTEM,
+
+ _SC_MONOTONIC_CLOCK,
+
+ _SC_MULTI_PROCESS,
+
+ _SC_SINGLE_PROCESS,
+
+ _SC_NETWORKING,
+
+ _SC_READER_WRITER_LOCKS,
+
+ _SC_SPIN_LOCKS,
+
+ _SC_REGEXP,
+
+ _SC_REGEX_VERSION,
+
+ _SC_SHELL,
+
+ _SC_SIGNALS,
+
+ _SC_SPAWN,
+
+ _SC_SPORADIC_SERVER,
+
+ _SC_THREAD_SPORADIC_SERVER,
+
+ _SC_SYSTEM_DATABASE,
+
+ _SC_SYSTEM_DATABASE_R,
+
+ _SC_TIMEOUTS,
+
+ _SC_TYPED_MEMORY_OBJECTS,
+
+ _SC_USER_GROUPS,
+
+ _SC_USER_GROUPS_R,
+
+ _SC_2_PBS,
+
+ _SC_2_PBS_ACCOUNTING,
+
+ _SC_2_PBS_LOCATE,
+
+ _SC_2_PBS_MESSAGE,
+
+ _SC_2_PBS_TRACK,
+
+ _SC_SYMLOOP_MAX,
+
+ _SC_STREAMS,
+
+ _SC_2_PBS_CHECKPOINT,
+
+
+ _SC_V6_ILP32_OFF32,
+
+ _SC_V6_ILP32_OFFBIG,
+
+ _SC_V6_LP64_OFF64,
+
+ _SC_V6_LPBIG_OFFBIG,
+
+
+ _SC_HOST_NAME_MAX,
+
+ _SC_TRACE,
+
+ _SC_TRACE_EVENT_FILTER,
+
+ _SC_TRACE_INHERIT,
+
+ _SC_TRACE_LOG,
+
+
+ _SC_LEVEL1_ICACHE_SIZE,
+
+ _SC_LEVEL1_ICACHE_ASSOC,
+
+ _SC_LEVEL1_ICACHE_LINESIZE,
+
+ _SC_LEVEL1_DCACHE_SIZE,
+
+ _SC_LEVEL1_DCACHE_ASSOC,
+
+ _SC_LEVEL1_DCACHE_LINESIZE,
+
+ _SC_LEVEL2_CACHE_SIZE,
+
+ _SC_LEVEL2_CACHE_ASSOC,
+
+ _SC_LEVEL2_CACHE_LINESIZE,
+
+ _SC_LEVEL3_CACHE_SIZE,
+
+ _SC_LEVEL3_CACHE_ASSOC,
+
+ _SC_LEVEL3_CACHE_LINESIZE,
+
+ _SC_LEVEL4_CACHE_SIZE,
+
+ _SC_LEVEL4_CACHE_ASSOC,
+
+ _SC_LEVEL4_CACHE_LINESIZE,
+
+
+
+ _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50,
+
+ _SC_RAW_SOCKETS,
+
+
+ _SC_V7_ILP32_OFF32,
+
+ _SC_V7_ILP32_OFFBIG,
+
+ _SC_V7_LP64_OFF64,
+
+ _SC_V7_LPBIG_OFFBIG,
+
+
+ _SC_SS_REPL_MAX,
+
+
+ _SC_TRACE_EVENT_NAME_MAX,
+
+ _SC_TRACE_NAME_MAX,
+
+ _SC_TRACE_SYS_MAX,
+
+ _SC_TRACE_USER_EVENT_MAX,
+
+
+ _SC_XOPEN_STREAMS,
+
+
+ _SC_THREAD_ROBUST_PRIO_INHERIT,
+
+ _SC_THREAD_ROBUST_PRIO_PROTECT,
+
+ };
+
+
+enum
+ {
+ _CS_PATH,
+
+
+ _CS_V6_WIDTH_RESTRICTED_ENVS,
+
+
+
+ _CS_GNU_LIBC_VERSION,
+
+ _CS_GNU_LIBPTHREAD_VERSION,
+
+
+ _CS_V5_WIDTH_RESTRICTED_ENVS,
+
+
+
+ _CS_V7_WIDTH_RESTRICTED_ENVS,
+
+
+
+ _CS_LFS_CFLAGS = 1000,
+
+ _CS_LFS_LDFLAGS,
+
+ _CS_LFS_LIBS,
+
+ _CS_LFS_LINTFLAGS,
+
+ _CS_LFS64_CFLAGS,
+
+ _CS_LFS64_LDFLAGS,
+
+ _CS_LFS64_LIBS,
+
+ _CS_LFS64_LINTFLAGS,
+
+
+ _CS_XBS5_ILP32_OFF32_CFLAGS = 1100,
+
+ _CS_XBS5_ILP32_OFF32_LDFLAGS,
+
+ _CS_XBS5_ILP32_OFF32_LIBS,
+
+ _CS_XBS5_ILP32_OFF32_LINTFLAGS,
+
+ _CS_XBS5_ILP32_OFFBIG_CFLAGS,
+
+ _CS_XBS5_ILP32_OFFBIG_LDFLAGS,
+
+ _CS_XBS5_ILP32_OFFBIG_LIBS,
+
+ _CS_XBS5_ILP32_OFFBIG_LINTFLAGS,
+
+ _CS_XBS5_LP64_OFF64_CFLAGS,
+
+ _CS_XBS5_LP64_OFF64_LDFLAGS,
+
+ _CS_XBS5_LP64_OFF64_LIBS,
+
+ _CS_XBS5_LP64_OFF64_LINTFLAGS,
+
+ _CS_XBS5_LPBIG_OFFBIG_CFLAGS,
+
+ _CS_XBS5_LPBIG_OFFBIG_LDFLAGS,
+
+ _CS_XBS5_LPBIG_OFFBIG_LIBS,
+
+ _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS,
+
+
+ _CS_POSIX_V6_ILP32_OFF32_CFLAGS,
+
+ _CS_POSIX_V6_ILP32_OFF32_LDFLAGS,
+
+ _CS_POSIX_V6_ILP32_OFF32_LIBS,
+
+ _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS,
+
+ _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS,
+
+ _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS,
+
+ _CS_POSIX_V6_ILP32_OFFBIG_LIBS,
+
+ _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS,
+
+ _CS_POSIX_V6_LP64_OFF64_CFLAGS,
+
+ _CS_POSIX_V6_LP64_OFF64_LDFLAGS,
+
+ _CS_POSIX_V6_LP64_OFF64_LIBS,
+
+ _CS_POSIX_V6_LP64_OFF64_LINTFLAGS,
+
+ _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS,
+
+ _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS,
+
+ _CS_POSIX_V6_LPBIG_OFFBIG_LIBS,
+
+ _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS,
+
+
+ _CS_POSIX_V7_ILP32_OFF32_CFLAGS,
+
+ _CS_POSIX_V7_ILP32_OFF32_LDFLAGS,
+
+ _CS_POSIX_V7_ILP32_OFF32_LIBS,
+
+ _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS,
+
+ _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS,
+
+ _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS,
+
+ _CS_POSIX_V7_ILP32_OFFBIG_LIBS,
+
+ _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS,
+
+ _CS_POSIX_V7_LP64_OFF64_CFLAGS,
+
+ _CS_POSIX_V7_LP64_OFF64_LDFLAGS,
+
+ _CS_POSIX_V7_LP64_OFF64_LIBS,
+
+ _CS_POSIX_V7_LP64_OFF64_LINTFLAGS,
+
+ _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS,
+
+ _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS,
+
+ _CS_POSIX_V7_LPBIG_OFFBIG_LIBS,
+
+ _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS
+
+ };
+# 569 "/usr/include/unistd.h" 2 3 4
+
+
+extern long int pathconf (__const char *__path, int __name)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern long int fpathconf (int __fd, int __name) __attribute__ ((__nothrow__));
+
+
+extern long int sysconf (int __name) __attribute__ ((__nothrow__));
+
+
+
+extern size_t confstr (int __name, char *__buf, size_t __len) __attribute__ ((__nothrow__));
+
+
+
+
+extern __pid_t getpid (void) __attribute__ ((__nothrow__));
+
+
+extern __pid_t getppid (void) __attribute__ ((__nothrow__));
+
+
+
+
+extern __pid_t getpgrp (void) __attribute__ ((__nothrow__));
+# 605 "/usr/include/unistd.h" 3 4
+extern __pid_t __getpgid (__pid_t __pid) __attribute__ ((__nothrow__));
+
+extern __pid_t getpgid (__pid_t __pid) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+extern int setpgid (__pid_t __pid, __pid_t __pgid) __attribute__ ((__nothrow__));
+# 631 "/usr/include/unistd.h" 3 4
+extern int setpgrp (void) __attribute__ ((__nothrow__));
+# 648 "/usr/include/unistd.h" 3 4
+extern __pid_t setsid (void) __attribute__ ((__nothrow__));
+
+
+
+extern __pid_t getsid (__pid_t __pid) __attribute__ ((__nothrow__));
+
+
+
+extern __uid_t getuid (void) __attribute__ ((__nothrow__));
+
+
+extern __uid_t geteuid (void) __attribute__ ((__nothrow__));
+
+
+extern __gid_t getgid (void) __attribute__ ((__nothrow__));
+
+
+extern __gid_t getegid (void) __attribute__ ((__nothrow__));
+
+
+
+
+extern int getgroups (int __size, __gid_t __list[]) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
+
+
+
+extern int group_member (__gid_t __gid) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+extern int setuid (__uid_t __uid) __attribute__ ((__nothrow__));
+
+
+
+
+extern int setreuid (__uid_t __ruid, __uid_t __euid) __attribute__ ((__nothrow__));
+
+
+
+
+extern int seteuid (__uid_t __uid) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+extern int setgid (__gid_t __gid) __attribute__ ((__nothrow__));
+
+
+
+
+extern int setregid (__gid_t __rgid, __gid_t __egid) __attribute__ ((__nothrow__));
+
+
+
+
+extern int setegid (__gid_t __gid) __attribute__ ((__nothrow__));
+
+
+
+
+
+extern int getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid)
+ __attribute__ ((__nothrow__));
+
+
+
+extern int getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid)
+ __attribute__ ((__nothrow__));
+
+
+
+extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid)
+ __attribute__ ((__nothrow__));
+
+
+
+extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid)
+ __attribute__ ((__nothrow__));
+
+
+
+
+
+
+extern __pid_t fork (void) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+extern __pid_t vfork (void) __attribute__ ((__nothrow__));
+
+
+
+
+
+extern char *ttyname (int __fd) __attribute__ ((__nothrow__));
+
+
+
+extern int ttyname_r (int __fd, char *__buf, size_t __buflen)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__));
+
+
+
+extern int isatty (int __fd) __attribute__ ((__nothrow__));
+
+
+
+
+
+extern int ttyslot (void) __attribute__ ((__nothrow__));
+
+
+
+
+extern int link (__const char *__from, __const char *__to)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern int linkat (int __fromfd, __const char *__from, int __tofd,
+ __const char *__to, int __flags)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4))) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern int symlink (__const char *__from, __const char *__to)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern ssize_t readlink (__const char *__restrict __path,
+ char *__restrict __buf, size_t __len)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern int symlinkat (__const char *__from, int __tofd,
+ __const char *__to) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__));
+
+
+extern ssize_t readlinkat (int __fd, __const char *__restrict __path,
+ char *__restrict __buf, size_t __len)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__));
+
+
+
+extern int unlink (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+extern int unlinkat (int __fd, __const char *__name, int __flag)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
+
+
+
+extern int rmdir (__const char *__path) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+extern __pid_t tcgetpgrp (int __fd) __attribute__ ((__nothrow__));
+
+
+extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+extern char *getlogin (void);
+
+
+
+
+
+
+
+extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+extern int setlogin (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+# 851 "/usr/include/unistd.h" 3 4
+# 1 "/usr/include/getopt.h" 1 3 4
+# 59 "/usr/include/getopt.h" 3 4
+extern char *optarg;
+# 73 "/usr/include/getopt.h" 3 4
+extern int optind;
+
+
+
+
+extern int opterr;
+
+
+
+extern int optopt;
+# 152 "/usr/include/getopt.h" 3 4
+extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
+ __attribute__ ((__nothrow__));
+# 852 "/usr/include/unistd.h" 2 3 4
+
+
+
+
+
+
+
+extern int gethostname (char *__name, size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+
+extern int sethostname (__const char *__name, size_t __len)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+
+
+
+extern int sethostid (long int __id) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+extern int getdomainname (char *__name, size_t __len)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+extern int setdomainname (__const char *__name, size_t __len)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+extern int vhangup (void) __attribute__ ((__nothrow__));
+
+
+extern int revoke (__const char *__file) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+
+
+extern int profil (unsigned short int *__sample_buffer, size_t __size,
+ size_t __offset, unsigned int __scale)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+extern int acct (__const char *__name) __attribute__ ((__nothrow__));
+
+
+
+extern char *getusershell (void) __attribute__ ((__nothrow__));
+extern void endusershell (void) __attribute__ ((__nothrow__));
+extern void setusershell (void) __attribute__ ((__nothrow__));
+
+
+
+
+
+extern int daemon (int __nochdir, int __noclose) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+
+extern int chroot (__const char *__path) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+
+
+
+extern char *getpass (__const char *__prompt) __attribute__ ((__nonnull__ (1)));
+# 937 "/usr/include/unistd.h" 3 4
+extern int fsync (int __fd);
+
+
+
+
+
+
+extern long int gethostid (void);
+
+
+extern void sync (void) __attribute__ ((__nothrow__));
+
+
+
+
+extern int getpagesize (void) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+
+
+
+extern int getdtablesize (void) __attribute__ ((__nothrow__));
+
+
+
+
+extern int truncate (__const char *__file, __off_t __length)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+# 974 "/usr/include/unistd.h" 3 4
+extern int truncate64 (__const char *__file, __off64_t __length)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+# 984 "/usr/include/unistd.h" 3 4
+extern int ftruncate (int __fd, __off_t __length) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
+# 994 "/usr/include/unistd.h" 3 4
+extern int ftruncate64 (int __fd, __off64_t __length) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
+# 1004 "/usr/include/unistd.h" 3 4
+extern int brk (void *__addr) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+extern void *sbrk (intptr_t __delta) __attribute__ ((__nothrow__));
+# 1025 "/usr/include/unistd.h" 3 4
+extern long int syscall (long int __sysno, ...) __attribute__ ((__nothrow__));
+# 1079 "/usr/include/unistd.h" 3 4
+extern int fdatasync (int __fildes);
+
+
+
+
+
+
+
+extern char *crypt (__const char *__key, __const char *__salt)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+extern void encrypt (char *__block, int __edflag) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+
+extern void swab (__const void *__restrict __from, void *__restrict __to,
+ ssize_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+
+
+
+
+extern char *ctermid (char *__s) __attribute__ ((__nothrow__));
+
+
+
+
+
+# 1 "/usr/include/bits/unistd.h" 1 3 4
+# 24 "/usr/include/bits/unistd.h" 3 4
+extern ssize_t __read_chk (int __fd, void *__buf, size_t __nbytes,
+ size_t __buflen) __attribute__ ((__warn_unused_result__));
+extern ssize_t __read_alias (int __fd, void *__buf, size_t __nbytes) __asm__ ("" "read") __attribute__ ((__warn_unused_result__));
+
+extern ssize_t __read_chk_warn (int __fd, void *__buf, size_t __nbytes, size_t __buflen) __asm__ ("" "__read_chk")
+
+
+ __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("read called with bigger length than size of " "the destination buffer")));
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t
+read (int __fd, void *__buf, size_t __nbytes)
+{
+ if (__builtin_object_size (__buf, 0) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__nbytes))
+ return __read_chk (__fd, __buf, __nbytes, __builtin_object_size (__buf, 0));
+
+ if (__nbytes > __builtin_object_size (__buf, 0))
+ return __read_chk_warn (__fd, __buf, __nbytes, __builtin_object_size (__buf, 0));
+ }
+ return __read_alias (__fd, __buf, __nbytes);
+}
+
+
+extern ssize_t __pread_chk (int __fd, void *__buf, size_t __nbytes,
+ __off_t __offset, size_t __bufsize) __attribute__ ((__warn_unused_result__));
+extern ssize_t __pread64_chk (int __fd, void *__buf, size_t __nbytes,
+ __off64_t __offset, size_t __bufsize) __attribute__ ((__warn_unused_result__));
+extern ssize_t __pread_alias (int __fd, void *__buf, size_t __nbytes, __off_t __offset) __asm__ ("" "pread") __attribute__ ((__warn_unused_result__));
+
+
+extern ssize_t __pread64_alias (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) __asm__ ("" "pread64") __attribute__ ((__warn_unused_result__));
+
+
+extern ssize_t __pread_chk_warn (int __fd, void *__buf, size_t __nbytes, __off_t __offset, size_t __bufsize) __asm__ ("" "__pread_chk")
+
+
+ __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("pread called with bigger length than size of " "the destination buffer")));
+
+extern ssize_t __pread64_chk_warn (int __fd, void *__buf, size_t __nbytes, __off64_t __offset, size_t __bufsize) __asm__ ("" "__pread64_chk")
+
+
+
+ __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("pread64 called with bigger length than size of " "the destination buffer")));
+
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t
+pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset)
+{
+ if (__builtin_object_size (__buf, 0) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__nbytes))
+ return __pread_chk (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0));
+
+ if ( __nbytes > __builtin_object_size (__buf, 0))
+ return __pread_chk_warn (__fd, __buf, __nbytes, __offset,
+ __builtin_object_size (__buf, 0));
+ }
+ return __pread_alias (__fd, __buf, __nbytes, __offset);
+}
+# 105 "/usr/include/bits/unistd.h" 3 4
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t
+pread64 (int __fd, void *__buf, size_t __nbytes, __off64_t __offset)
+{
+ if (__builtin_object_size (__buf, 0) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__nbytes))
+ return __pread64_chk (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0));
+
+ if ( __nbytes > __builtin_object_size (__buf, 0))
+ return __pread64_chk_warn (__fd, __buf, __nbytes, __offset,
+ __builtin_object_size (__buf, 0));
+ }
+
+ return __pread64_alias (__fd, __buf, __nbytes, __offset);
+}
+
+
+
+
+extern ssize_t __readlink_chk (__const char *__restrict __path,
+ char *__restrict __buf, size_t __len,
+ size_t __buflen)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__));
+extern ssize_t __readlink_alias (__const char *__restrict __path, char *__restrict __buf, size_t __len) __asm__ ("" "readlink") __attribute__ ((__nothrow__))
+
+
+ __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__));
+extern ssize_t __readlink_chk_warn (__const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) __asm__ ("" "__readlink_chk") __attribute__ ((__nothrow__))
+
+
+
+ __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlink called with bigger length " "than size of destination buffer")));
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) ssize_t
+__attribute__ ((__nothrow__)) readlink (__const char *__restrict __path, char *__restrict __buf, size_t __len)
+
+{
+ if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__len))
+ return __readlink_chk (__path, __buf, __len, __builtin_object_size (__buf, 2 > 1));
+
+ if ( __len > __builtin_object_size (__buf, 2 > 1))
+ return __readlink_chk_warn (__path, __buf, __len, __builtin_object_size (__buf, 2 > 1));
+ }
+ return __readlink_alias (__path, __buf, __len);
+}
+
+
+
+extern ssize_t __readlinkat_chk (int __fd, __const char *__restrict __path,
+ char *__restrict __buf, size_t __len,
+ size_t __buflen)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__));
+extern ssize_t __readlinkat_alias (int __fd, __const char *__restrict __path, char *__restrict __buf, size_t __len) __asm__ ("" "readlinkat") __attribute__ ((__nothrow__))
+
+
+
+ __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__));
+extern ssize_t __readlinkat_chk_warn (int __fd, __const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) __asm__ ("" "__readlinkat_chk") __attribute__ ((__nothrow__))
+
+
+
+ __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlinkat called with bigger " "length than size of destination " "buffer")));
+
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) ssize_t
+__attribute__ ((__nothrow__)) readlinkat (int __fd, __const char *__restrict __path, char *__restrict __buf, size_t __len)
+
+{
+ if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__len))
+ return __readlinkat_chk (__fd, __path, __buf, __len, __builtin_object_size (__buf, 2 > 1));
+
+ if (__len > __builtin_object_size (__buf, 2 > 1))
+ return __readlinkat_chk_warn (__fd, __path, __buf, __len,
+ __builtin_object_size (__buf, 2 > 1));
+ }
+ return __readlinkat_alias (__fd, __path, __buf, __len);
+}
+
+
+extern char *__getcwd_chk (char *__buf, size_t __size, size_t __buflen)
+ __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
+extern char *__getcwd_alias (char *__buf, size_t __size) __asm__ ("" "getcwd") __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
+
+extern char *__getcwd_chk_warn (char *__buf, size_t __size, size_t __buflen) __asm__ ("" "__getcwd_chk") __attribute__ ((__nothrow__))
+
+
+ __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getcwd caller with bigger length than size of " "destination buffer")));
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char *
+__attribute__ ((__nothrow__)) getcwd (char *__buf, size_t __size)
+{
+ if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__size))
+ return __getcwd_chk (__buf, __size, __builtin_object_size (__buf, 2 > 1));
+
+ if (__size > __builtin_object_size (__buf, 2 > 1))
+ return __getcwd_chk_warn (__buf, __size, __builtin_object_size (__buf, 2 > 1));
+ }
+ return __getcwd_alias (__buf, __size);
+}
+
+
+extern char *__getwd_chk (char *__buf, size_t buflen)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+extern char *__getwd_warn (char *__buf) __asm__ ("" "getwd") __attribute__ ((__nothrow__))
+ __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("please use getcwd instead, as getwd " "doesn't specify buffer size")));
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__)) char *
+__attribute__ ((__nothrow__)) getwd (char *__buf)
+{
+ if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
+ return __getwd_chk (__buf, __builtin_object_size (__buf, 2 > 1));
+ return __getwd_warn (__buf);
+}
+
+
+extern size_t __confstr_chk (int __name, char *__buf, size_t __len,
+ size_t __buflen) __attribute__ ((__nothrow__));
+extern size_t __confstr_alias (int __name, char *__buf, size_t __len) __asm__ ("" "confstr") __attribute__ ((__nothrow__));
+
+extern size_t __confstr_chk_warn (int __name, char *__buf, size_t __len, size_t __buflen) __asm__ ("" "__confstr_chk") __attribute__ ((__nothrow__))
+
+
+ __attribute__((__warning__ ("confstr called with bigger length than size of destination " "buffer")));
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) size_t
+__attribute__ ((__nothrow__)) confstr (int __name, char *__buf, size_t __len)
+{
+ if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__len))
+ return __confstr_chk (__name, __buf, __len, __builtin_object_size (__buf, 2 > 1));
+
+ if (__builtin_object_size (__buf, 2 > 1) < __len)
+ return __confstr_chk_warn (__name, __buf, __len, __builtin_object_size (__buf, 2 > 1));
+ }
+ return __confstr_alias (__name, __buf, __len);
+}
+
+
+extern int __getgroups_chk (int __size, __gid_t __list[], size_t __listlen)
+ __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
+extern int __getgroups_alias (int __size, __gid_t __list[]) __asm__ ("" "getgroups") __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
+
+extern int __getgroups_chk_warn (int __size, __gid_t __list[], size_t __listlen) __asm__ ("" "__getgroups_chk") __attribute__ ((__nothrow__))
+
+
+ __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getgroups called with bigger group count than what " "can fit into destination buffer")));
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int
+__attribute__ ((__nothrow__)) getgroups (int __size, __gid_t __list[])
+{
+ if (__builtin_object_size (__list, 2 > 1) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__size) || __size < 0)
+ return __getgroups_chk (__size, __list, __builtin_object_size (__list, 2 > 1));
+
+ if (__size * sizeof (__gid_t) > __builtin_object_size (__list, 2 > 1))
+ return __getgroups_chk_warn (__size, __list, __builtin_object_size (__list, 2 > 1));
+ }
+ return __getgroups_alias (__size, __list);
+}
+
+
+extern int __ttyname_r_chk (int __fd, char *__buf, size_t __buflen,
+ size_t __nreal) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
+extern int __ttyname_r_alias (int __fd, char *__buf, size_t __buflen) __asm__ ("" "ttyname_r") __attribute__ ((__nothrow__))
+
+ __attribute__ ((__nonnull__ (2)));
+extern int __ttyname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__ttyname_r_chk") __attribute__ ((__nothrow__))
+
+
+ __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ttyname_r called with bigger buflen than " "size of destination buffer")));
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int
+__attribute__ ((__nothrow__)) ttyname_r (int __fd, char *__buf, size_t __buflen)
+{
+ if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__buflen))
+ return __ttyname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1));
+
+ if (__buflen > __builtin_object_size (__buf, 2 > 1))
+ return __ttyname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1));
+ }
+ return __ttyname_r_alias (__fd, __buf, __buflen);
+}
+
+
+
+extern int __getlogin_r_chk (char *__buf, size_t __buflen, size_t __nreal)
+ __attribute__ ((__nonnull__ (1)));
+extern int __getlogin_r_alias (char *__buf, size_t __buflen) __asm__ ("" "getlogin_r") __attribute__ ((__nonnull__ (1)));
+
+extern int __getlogin_r_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__getlogin_r_chk")
+
+
+ __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("getlogin_r called with bigger buflen than " "size of destination buffer")));
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int
+getlogin_r (char *__buf, size_t __buflen)
+{
+ if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__buflen))
+ return __getlogin_r_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1));
+
+ if (__buflen > __builtin_object_size (__buf, 2 > 1))
+ return __getlogin_r_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1));
+ }
+ return __getlogin_r_alias (__buf, __buflen);
+}
+
+
+
+
+extern int __gethostname_chk (char *__buf, size_t __buflen, size_t __nreal)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+extern int __gethostname_alias (char *__buf, size_t __buflen) __asm__ ("" "gethostname") __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+extern int __gethostname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__gethostname_chk") __attribute__ ((__nothrow__))
+
+
+ __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("gethostname called with bigger buflen than " "size of destination buffer")));
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int
+__attribute__ ((__nothrow__)) gethostname (char *__buf, size_t __buflen)
+{
+ if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__buflen))
+ return __gethostname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1));
+
+ if (__buflen > __builtin_object_size (__buf, 2 > 1))
+ return __gethostname_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1));
+ }
+ return __gethostname_alias (__buf, __buflen);
+}
+
+
+
+
+extern int __getdomainname_chk (char *__buf, size_t __buflen, size_t __nreal)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+extern int __getdomainname_alias (char *__buf, size_t __buflen) __asm__ ("" "getdomainname") __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+
+
+extern int __getdomainname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__getdomainname_chk") __attribute__ ((__nothrow__))
+
+
+ __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getdomainname called with bigger " "buflen than size of destination " "buffer")));
+
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int
+__attribute__ ((__nothrow__)) getdomainname (char *__buf, size_t __buflen)
+{
+ if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__buflen))
+ return __getdomainname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1));
+
+ if (__buflen > __builtin_object_size (__buf, 2 > 1))
+ return __getdomainname_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1));
+ }
+ return __getdomainname_alias (__buf, __buflen);
+}
+# 1115 "/usr/include/unistd.h" 2 3 4
+
+
+
+# 352 "./../include/my_global.h" 2
+# 371 "./../include/my_global.h"
+# 1 "/usr/include/errno.h" 1 3 4
+# 32 "/usr/include/errno.h" 3 4
+
+
+
+
+# 1 "/usr/include/bits/errno.h" 1 3 4
+# 25 "/usr/include/bits/errno.h" 3 4
+# 1 "/usr/include/linux/errno.h" 1 3 4
+
+
+
+# 1 "/usr/include/asm/errno.h" 1 3 4
+
+
+
+# 1 "/usr/include/asm-generic/errno.h" 1 3 4
+
+
+
+# 1 "/usr/include/asm-generic/errno-base.h" 1 3 4
+# 5 "/usr/include/asm-generic/errno.h" 2 3 4
+# 5 "/usr/include/asm/errno.h" 2 3 4
+# 5 "/usr/include/linux/errno.h" 2 3 4
+# 26 "/usr/include/bits/errno.h" 2 3 4
+# 43 "/usr/include/bits/errno.h" 3 4
+extern int *__errno_location (void) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+# 37 "/usr/include/errno.h" 2 3 4
+# 55 "/usr/include/errno.h" 3 4
+extern char *program_invocation_name, *program_invocation_short_name;
+
+
+
+
+# 69 "/usr/include/errno.h" 3 4
+typedef int error_t;
+# 372 "./../include/my_global.h" 2
+
+
+# 1 "/usr/include/crypt.h" 1 3 4
+# 30 "/usr/include/crypt.h" 3 4
+
+
+
+extern char *crypt (__const char *__key, __const char *__salt)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+extern void setkey (__const char *__key) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+extern void encrypt (char *__block, int __edflag) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+struct crypt_data
+ {
+ char keysched[16 * 8];
+ char sb0[32768];
+ char sb1[32768];
+ char sb2[32768];
+ char sb3[32768];
+
+ char crypt_3_buf[14];
+ char current_salt[2];
+ long int current_saltbits;
+ int direction, initialized;
+ };
+
+extern char *crypt_r (__const char *__key, __const char *__salt,
+ struct crypt_data * __restrict __data)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2, 3)));
+
+extern void setkey_r (__const char *__key,
+ struct crypt_data * __restrict __data)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+extern void encrypt_r (char *__block, int __edflag,
+ struct crypt_data * __restrict __data)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3)));
+
+
+
+# 375 "./../include/my_global.h" 2
+
+
+
+
+
+
+
+# 1 "/usr/include/assert.h" 1 3 4
+# 66 "/usr/include/assert.h" 3 4
+
+
+
+extern void __assert_fail (__const char *__assertion, __const char *__file,
+ unsigned int __line, __const char *__function)
+ __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
+
+
+extern void __assert_perror_fail (int __errnum, __const char *__file,
+ unsigned int __line,
+ __const char *__function)
+ __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
+
+
+
+
+extern void __assert (const char *__assertion, const char *__file, int __line)
+ __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
+
+
+
+# 383 "./../include/my_global.h" 2
+# 508 "./../include/my_global.h"
+# 1 "./../include/my_attribute.h" 1
+# 509 "./../include/my_global.h" 2
+# 544 "./../include/my_global.h"
+# 1 "./../include/my_dbug.h" 1
+# 545 "./../include/my_global.h" 2
+
+
+
+
+
+
+
+typedef int File;
+
+typedef int my_socket;
+
+
+
+
+
+typedef void (*sig_return)();
+
+
+typedef char pchar;
+typedef char puchar;
+typedef char pbool;
+typedef short pshort;
+typedef float pfloat;
+
+
+
+
+
+
+
+
+typedef int (*qsort_cmp)(const void *,const void *);
+typedef int (*qsort_cmp2)(void*, const void *,const void *);
+
+# 590 "./../include/my_global.h"
+# 1 "/usr/include/sys/socket.h" 1 3 4
+# 26 "/usr/include/sys/socket.h" 3 4
+
+
+# 1 "/usr/include/sys/uio.h" 1 3 4
+# 26 "/usr/include/sys/uio.h" 3 4
+
+
+
+# 1 "/usr/include/bits/uio.h" 1 3 4
+# 30 "/usr/include/sys/uio.h" 2 3 4
+# 40 "/usr/include/sys/uio.h" 3 4
+extern ssize_t readv (int __fd, __const struct iovec *__iovec, int __count)
+ __attribute__ ((__warn_unused_result__));
+# 51 "/usr/include/sys/uio.h" 3 4
+extern ssize_t writev (int __fd, __const struct iovec *__iovec, int __count)
+ __attribute__ ((__warn_unused_result__));
+# 66 "/usr/include/sys/uio.h" 3 4
+extern ssize_t preadv (int __fd, __const struct iovec *__iovec, int __count,
+ __off_t __offset) __attribute__ ((__warn_unused_result__));
+# 78 "/usr/include/sys/uio.h" 3 4
+extern ssize_t pwritev (int __fd, __const struct iovec *__iovec, int __count,
+ __off_t __offset) __attribute__ ((__warn_unused_result__));
+# 104 "/usr/include/sys/uio.h" 3 4
+extern ssize_t preadv64 (int __fd, __const struct iovec *__iovec, int __count,
+ __off64_t __offset) __attribute__ ((__warn_unused_result__));
+# 116 "/usr/include/sys/uio.h" 3 4
+extern ssize_t pwritev64 (int __fd, __const struct iovec *__iovec, int __count,
+ __off64_t __offset) __attribute__ ((__warn_unused_result__));
+
+
+
+
+# 29 "/usr/include/sys/socket.h" 2 3 4
+
+# 1 "/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.4/include/stddef.h" 1 3 4
+# 31 "/usr/include/sys/socket.h" 2 3 4
+
+
+# 1 "/usr/include/bits/sigset.h" 1 3 4
+# 34 "/usr/include/sys/socket.h" 2 3 4
+
+
+
+
+
+
+# 1 "/usr/include/bits/socket.h" 1 3 4
+# 29 "/usr/include/bits/socket.h" 3 4
+# 1 "/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.4/include/stddef.h" 1 3 4
+# 30 "/usr/include/bits/socket.h" 2 3 4
+# 40 "/usr/include/bits/socket.h" 3 4
+enum __socket_type
+{
+ SOCK_STREAM = 1,
+
+
+ SOCK_DGRAM = 2,
+
+
+ SOCK_RAW = 3,
+
+ SOCK_RDM = 4,
+
+ SOCK_SEQPACKET = 5,
+
+
+ SOCK_DCCP = 6,
+
+ SOCK_PACKET = 10,
+
+
+
+
+
+
+
+ SOCK_CLOEXEC = 02000000,
+
+
+ SOCK_NONBLOCK = 04000
+
+
+};
+# 169 "/usr/include/bits/socket.h" 3 4
+# 1 "/usr/include/bits/sockaddr.h" 1 3 4
+# 29 "/usr/include/bits/sockaddr.h" 3 4
+typedef unsigned short int sa_family_t;
+# 170 "/usr/include/bits/socket.h" 2 3 4
+
+
+struct sockaddr
+ {
+ sa_family_t sa_family;
+ char sa_data[14];
+ };
+# 185 "/usr/include/bits/socket.h" 3 4
+struct sockaddr_storage
+ {
+ sa_family_t ss_family;
+ unsigned long int __ss_align;
+ char __ss_padding[(128 - (2 * sizeof (unsigned long int)))];
+ };
+
+
+
+enum
+ {
+ MSG_OOB = 0x01,
+
+ MSG_PEEK = 0x02,
+
+ MSG_DONTROUTE = 0x04,
+
+
+
+ MSG_TRYHARD = MSG_DONTROUTE,
+
+
+ MSG_CTRUNC = 0x08,
+
+ MSG_PROXY = 0x10,
+
+ MSG_TRUNC = 0x20,
+
+ MSG_DONTWAIT = 0x40,
+
+ MSG_EOR = 0x80,
+
+ MSG_WAITALL = 0x100,
+
+ MSG_FIN = 0x200,
+
+ MSG_SYN = 0x400,
+
+ MSG_CONFIRM = 0x800,
+
+ MSG_RST = 0x1000,
+
+ MSG_ERRQUEUE = 0x2000,
+
+ MSG_NOSIGNAL = 0x4000,
+
+ MSG_MORE = 0x8000,
+
+
+ MSG_CMSG_CLOEXEC = 0x40000000
+
+
+
+ };
+
+
+
+
+struct msghdr
+ {
+ void *msg_name;
+ socklen_t msg_namelen;
+
+ struct iovec *msg_iov;
+ size_t msg_iovlen;
+
+ void *msg_control;
+ size_t msg_controllen;
+
+
+
+
+ int msg_flags;
+ };
+
+
+struct cmsghdr
+ {
+ size_t cmsg_len;
+
+
+
+
+ int cmsg_level;
+ int cmsg_type;
+
+ __extension__ unsigned char __cmsg_data [];
+
+ };
+# 291 "/usr/include/bits/socket.h" 3 4
+extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
+ struct cmsghdr *__cmsg) __attribute__ ((__nothrow__));
+
+
+
+
+extern __inline struct cmsghdr *
+__attribute__ ((__nothrow__)) __cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg)
+{
+ if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
+
+ return 0;
+
+ __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
+ + (((__cmsg->cmsg_len) + sizeof (size_t) - 1) & (size_t) ~(sizeof (size_t) - 1)));
+ if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control
+ + __mhdr->msg_controllen)
+ || ((unsigned char *) __cmsg + (((__cmsg->cmsg_len) + sizeof (size_t) - 1) & (size_t) ~(sizeof (size_t) - 1))
+ > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
+
+ return 0;
+ return __cmsg;
+}
+
+
+
+
+enum
+ {
+ SCM_RIGHTS = 0x01
+
+
+ , SCM_CREDENTIALS = 0x02
+
+
+ };
+
+
+
+struct ucred
+{
+ pid_t pid;
+ uid_t uid;
+ gid_t gid;
+};
+# 364 "/usr/include/bits/socket.h" 3 4
+# 1 "/usr/include/asm/socket.h" 1 3 4
+# 11 "/usr/include/asm/socket.h" 3 4
+# 1 "/usr/include/asm/sockios.h" 1 3 4
+# 12 "/usr/include/asm/socket.h" 2 3 4
+# 365 "/usr/include/bits/socket.h" 2 3 4
+# 398 "/usr/include/bits/socket.h" 3 4
+struct linger
+ {
+ int l_onoff;
+ int l_linger;
+ };
+# 41 "/usr/include/sys/socket.h" 2 3 4
+
+
+
+
+struct osockaddr
+ {
+ unsigned short int sa_family;
+ unsigned char sa_data[14];
+ };
+
+
+
+
+enum
+{
+ SHUT_RD = 0,
+
+ SHUT_WR,
+
+ SHUT_RDWR
+
+};
+# 92 "/usr/include/sys/socket.h" 3 4
+typedef union { struct sockaddr *__restrict __sockaddr__; struct sockaddr_at *__restrict __sockaddr_at__; struct sockaddr_ax25 *__restrict __sockaddr_ax25__; struct sockaddr_dl *__restrict __sockaddr_dl__; struct sockaddr_eon *__restrict __sockaddr_eon__; struct sockaddr_in *__restrict __sockaddr_in__; struct sockaddr_in6 *__restrict __sockaddr_in6__; struct sockaddr_inarp *__restrict __sockaddr_inarp__; struct sockaddr_ipx *__restrict __sockaddr_ipx__; struct sockaddr_iso *__restrict __sockaddr_iso__; struct sockaddr_ns *__restrict __sockaddr_ns__; struct sockaddr_un *__restrict __sockaddr_un__; struct sockaddr_x25 *__restrict __sockaddr_x25__;
+ } __SOCKADDR_ARG __attribute__ ((__transparent_union__));
+
+
+typedef union { __const struct sockaddr *__restrict __sockaddr__; __const struct sockaddr_at *__restrict __sockaddr_at__; __const struct sockaddr_ax25 *__restrict __sockaddr_ax25__; __const struct sockaddr_dl *__restrict __sockaddr_dl__; __const struct sockaddr_eon *__restrict __sockaddr_eon__; __const struct sockaddr_in *__restrict __sockaddr_in__; __const struct sockaddr_in6 *__restrict __sockaddr_in6__; __const struct sockaddr_inarp *__restrict __sockaddr_inarp__; __const struct sockaddr_ipx *__restrict __sockaddr_ipx__; __const struct sockaddr_iso *__restrict __sockaddr_iso__; __const struct sockaddr_ns *__restrict __sockaddr_ns__; __const struct sockaddr_un *__restrict __sockaddr_un__; __const struct sockaddr_x25 *__restrict __sockaddr_x25__;
+ } __CONST_SOCKADDR_ARG __attribute__ ((__transparent_union__));
+
+
+
+
+
+
+
+extern int socket (int __domain, int __type, int __protocol) __attribute__ ((__nothrow__));
+
+
+
+
+
+extern int socketpair (int __domain, int __type, int __protocol,
+ int __fds[2]) __attribute__ ((__nothrow__));
+
+
+extern int bind (int __fd, __CONST_SOCKADDR_ARG __addr, socklen_t __len)
+ __attribute__ ((__nothrow__));
+
+
+extern int getsockname (int __fd, __SOCKADDR_ARG __addr,
+ socklen_t *__restrict __len) __attribute__ ((__nothrow__));
+# 129 "/usr/include/sys/socket.h" 3 4
+extern int connect (int __fd, __CONST_SOCKADDR_ARG __addr, socklen_t __len);
+
+
+
+extern int getpeername (int __fd, __SOCKADDR_ARG __addr,
+ socklen_t *__restrict __len) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+extern ssize_t send (int __fd, __const void *__buf, size_t __n, int __flags);
+
+
+
+
+
+
+extern ssize_t recv (int __fd, void *__buf, size_t __n, int __flags);
+
+
+
+
+
+
+extern ssize_t sendto (int __fd, __const void *__buf, size_t __n,
+ int __flags, __CONST_SOCKADDR_ARG __addr,
+ socklen_t __addr_len);
+# 166 "/usr/include/sys/socket.h" 3 4
+extern ssize_t recvfrom (int __fd, void *__restrict __buf, size_t __n,
+ int __flags, __SOCKADDR_ARG __addr,
+ socklen_t *__restrict __addr_len);
+
+
+
+
+
+
+
+extern ssize_t sendmsg (int __fd, __const struct msghdr *__message,
+ int __flags);
+
+
+
+
+
+
+extern ssize_t recvmsg (int __fd, struct msghdr *__message, int __flags);
+
+
+
+
+
+extern int getsockopt (int __fd, int __level, int __optname,
+ void *__restrict __optval,
+ socklen_t *__restrict __optlen) __attribute__ ((__nothrow__));
+
+
+
+
+extern int setsockopt (int __fd, int __level, int __optname,
+ __const void *__optval, socklen_t __optlen) __attribute__ ((__nothrow__));
+
+
+
+
+
+extern int listen (int __fd, int __n) __attribute__ ((__nothrow__));
+# 214 "/usr/include/sys/socket.h" 3 4
+extern int accept (int __fd, __SOCKADDR_ARG __addr,
+ socklen_t *__restrict __addr_len);
+
+
+
+
+
+
+extern int accept4 (int __fd, __SOCKADDR_ARG __addr,
+ socklen_t *__restrict __addr_len, int __flags);
+# 232 "/usr/include/sys/socket.h" 3 4
+extern int shutdown (int __fd, int __how) __attribute__ ((__nothrow__));
+
+
+
+
+extern int sockatmark (int __fd) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+
+extern int isfdtype (int __fd, int __fdtype) __attribute__ ((__nothrow__));
+
+
+
+
+
+# 1 "/usr/include/bits/socket2.h" 1 3 4
+# 24 "/usr/include/bits/socket2.h" 3 4
+extern ssize_t __recv_chk (int __fd, void *__buf, size_t __n, size_t __buflen,
+ int __flags);
+extern ssize_t __recv_alias (int __fd, void *__buf, size_t __n, int __flags) __asm__ ("" "recv");
+
+extern ssize_t __recv_chk_warn (int __fd, void *__buf, size_t __n, size_t __buflen, int __flags) __asm__ ("" "__recv_chk")
+
+
+ __attribute__((__warning__ ("recv called with bigger length than size of destination " "buffer")));
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) ssize_t
+recv (int __fd, void *__buf, size_t __n, int __flags)
+{
+ if (__builtin_object_size (__buf, 0) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__n))
+ return __recv_chk (__fd, __buf, __n, __builtin_object_size (__buf, 0), __flags);
+
+ if (__n > __builtin_object_size (__buf, 0))
+ return __recv_chk_warn (__fd, __buf, __n, __builtin_object_size (__buf, 0), __flags);
+ }
+ return __recv_alias (__fd, __buf, __n, __flags);
+}
+
+extern ssize_t __recvfrom_chk (int __fd, void *__restrict __buf, size_t __n,
+ size_t __buflen, int __flags,
+ __SOCKADDR_ARG __addr,
+ socklen_t *__restrict __addr_len);
+extern ssize_t __recvfrom_alias (int __fd, void *__restrict __buf, size_t __n, int __flags, __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len) __asm__ ("" "recvfrom");
+
+
+
+extern ssize_t __recvfrom_chk_warn (int __fd, void *__restrict __buf, size_t __n, size_t __buflen, int __flags, __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len) __asm__ ("" "__recvfrom_chk")
+
+
+
+
+ __attribute__((__warning__ ("recvfrom called with bigger length than size of " "destination buffer")));
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) ssize_t
+recvfrom (int __fd, void *__restrict __buf, size_t __n, int __flags,
+ __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len)
+{
+ if (__builtin_object_size (__buf, 0) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__n))
+ return __recvfrom_chk (__fd, __buf, __n, __builtin_object_size (__buf, 0), __flags,
+ __addr, __addr_len);
+ if (__n > __builtin_object_size (__buf, 0))
+ return __recvfrom_chk_warn (__fd, __buf, __n, __builtin_object_size (__buf, 0), __flags,
+ __addr, __addr_len);
+ }
+ return __recvfrom_alias (__fd, __buf, __n, __flags, __addr, __addr_len);
+}
+# 252 "/usr/include/sys/socket.h" 2 3 4
+
+
+
+# 591 "./../include/my_global.h" 2
+
+typedef socklen_t size_socket;
+# 834 "./../include/my_global.h"
+typedef long long my_ptrdiff_t;
+# 882 "./../include/my_global.h"
+typedef char *gptr;
+
+
+typedef signed char int8;
+typedef short int16;
+
+
+typedef unsigned char uchar;
+
+typedef unsigned char uint8;
+typedef unsigned short uint16;
+
+
+
+typedef int int32;
+
+typedef unsigned int uint32;
+# 918 "./../include/my_global.h"
+typedef unsigned long long int ulonglong;
+typedef long long int longlong;
+# 931 "./../include/my_global.h"
+typedef unsigned long long my_ulonglong;
+# 951 "./../include/my_global.h"
+typedef ulonglong my_off_t;
+
+
+
+
+
+typedef off_t os_off_t;
+# 991 "./../include/my_global.h"
+typedef uint8 int7;
+typedef short int15;
+typedef char *my_string;
+typedef unsigned long size_s;
+typedef int myf;
+
+typedef char byte;
+
+typedef char my_bool;
+
+typedef char bool;
+# 34 "./include/univ.i" 2
+# 1 "./../include/my_pthread.h" 1
+# 21 "./../include/my_pthread.h"
+# 1 "/usr/include/errno.h" 1 3 4
+# 22 "./../include/my_pthread.h" 2
+# 288 "./../include/my_pthread.h"
+extern int my_pthread_getprio(pthread_t thread_id);
+
+
+
+
+
+
+typedef void *(* pthread_handler)(void *);
+# 382 "./../include/my_pthread.h"
+extern void my_pthread_setprio(pthread_t thread_id,int prior);
+
+
+
+
+
+
+
+extern void my_pthread_attr_setprio(pthread_attr_t *attr, int priority);
+# 549 "./../include/my_pthread.h"
+typedef struct st_safe_mutex_t
+{
+ pthread_mutex_t global,mutex;
+ const char *file;
+ uint line,count;
+ pthread_t thread;
+
+
+
+} safe_mutex_t;
+# 576 "./../include/my_pthread.h"
+int safe_mutex_init(safe_mutex_t *mp, const pthread_mutexattr_t *attr,
+ const char *file, uint line);
+int safe_mutex_lock(safe_mutex_t *mp, my_bool try_lock, const char *file, uint line);
+int safe_mutex_unlock(safe_mutex_t *mp,const char *file, uint line);
+int safe_mutex_destroy(safe_mutex_t *mp,const char *file, uint line);
+int safe_cond_wait(pthread_cond_t *cond, safe_mutex_t *mp,const char *file,
+ uint line);
+int safe_cond_timedwait(pthread_cond_t *cond, safe_mutex_t *mp,
+ struct timespec *abstime, const char *file, uint line);
+void safe_mutex_global_init(void);
+void safe_mutex_end(FILE *file);
+# 690 "./../include/my_pthread.h"
+extern pthread_mutexattr_t my_fast_mutexattr;
+
+
+
+
+
+extern pthread_mutexattr_t my_errorcheck_mutexattr;
+# 707 "./../include/my_pthread.h"
+extern my_bool my_thread_global_init(void);
+extern void my_thread_global_end(void);
+extern my_bool my_thread_init(void);
+extern void my_thread_end(void);
+extern const char *my_thread_name(void);
+extern long my_thread_id(void);
+extern int pthread_no_free(void *);
+extern int pthread_dummy(int);
+# 731 "./../include/my_pthread.h"
+struct st_my_thread_var
+{
+ int thr_errno;
+ pthread_cond_t suspend;
+ pthread_mutex_t mutex;
+ pthread_mutex_t * volatile current_mutex;
+ pthread_cond_t * volatile current_cond;
+ pthread_t pthread_self;
+ long id;
+ int cmp_length;
+ int volatile abort;
+ my_bool init;
+ struct st_my_thread_var *next,**prev;
+ void *opt_info;
+
+
+
+
+};
+
+extern struct st_my_thread_var *_my_thread_var(void) __attribute__ ((const));
+extern uint my_thread_end_wait_time;
+# 766 "./../include/my_pthread.h"
+extern uint thd_lib_detected;
+# 35 "./include/univ.i" 2
+# 44 "./include/univ.i"
+# 1 "./include/../ib_config.h" 1
+# 45 "./include/univ.i" 2
+# 187 "./include/univ.i"
+typedef unsigned long int ulint;
+
+typedef long int lint;
+
+
+
+
+
+typedef longlong ib_longlong;
+
+
+typedef unsigned long long int ullint;
+# 207 "./include/univ.i"
+typedef double utfloat;
+# 272 "./include/univ.i"
+# 1 "./include/ut0dbg.h" 1
+# 12 "./include/ut0dbg.h"
+# 1 "./include/univ.i" 1
+# 13 "./include/ut0dbg.h" 2
+
+# 1 "./include/os0thread.h" 1
+# 33 "./include/os0thread.h"
+typedef pthread_t os_thread_t;
+typedef os_thread_t os_thread_id_t;
+
+
+
+
+
+typedef void* (*os_posix_f_t) (void*);
+
+
+
+
+ulint
+os_thread_eq(
+
+
+ os_thread_id_t a,
+ os_thread_id_t b);
+
+
+
+
+ulint
+os_thread_pf(
+
+
+ os_thread_id_t a);
+
+
+
+
+
+
+
+os_thread_t
+os_thread_create(
+
+
+
+ os_posix_f_t start_f,
+
+
+
+
+ void* arg,
+
+ os_thread_id_t* thread_id);
+
+int
+os_thread_join(
+
+ os_thread_id_t thread_id);
+
+
+
+void
+os_thread_exit(
+
+ void* exit_value);
+
+
+
+
+os_thread_id_t
+os_thread_get_curr_id(void);
+
+
+
+
+os_thread_t
+os_thread_get_curr(void);
+
+
+
+
+void
+os_thread_yield(void);
+
+
+
+
+void
+os_thread_sleep(
+
+ ulint tm);
+
+
+
+ulint
+os_thread_get_priority(
+
+
+ os_thread_t handle);
+
+
+
+void
+os_thread_set_priority(
+
+ os_thread_t handle,
+ ulint pri);
+
+
+
+ulint
+os_thread_get_last_error(void);
+
+
+
+# 1 "./include/os0thread.ic" 1
+# 143 "./include/os0thread.h" 2
+# 15 "./include/ut0dbg.h" 2
+# 27 "./include/ut0dbg.h"
+void
+ut_dbg_assertion_failed(
+
+ const char* expr,
+ const char* file,
+ ulint line);
+# 46 "./include/ut0dbg.h"
+extern ulint ut_dbg_stop_threads;
+
+
+extern ulint* ut_dbg_null_ptr;
+
+
+
+
+void
+ut_dbg_stop_thread(
+
+ const char* file,
+ ulint line);
+# 273 "./include/univ.i" 2
+# 1 "./include/ut0ut.h" 1
+# 15 "./include/ut0ut.h"
+# 1 "/usr/include/ctype.h" 1 3 4
+# 30 "/usr/include/ctype.h" 3 4
+
+# 48 "/usr/include/ctype.h" 3 4
+enum
+{
+ _ISupper = (1 << (0)),
+ _ISlower = (1 << (1)),
+ _ISalpha = (1 << (2)),
+ _ISdigit = (1 << (3)),
+ _ISxdigit = (1 << (4)),
+ _ISspace = (1 << (5)),
+ _ISprint = (1 << (6)),
+ _ISgraph = (1 << (7)),
+ _ISblank = (1 << (8)),
+ _IScntrl = (1 << (9)),
+ _ISpunct = (1 << (10)),
+ _ISalnum = (1 << (11))
+};
+# 81 "/usr/include/ctype.h" 3 4
+extern __const unsigned short int **__ctype_b_loc (void)
+ __attribute__ ((__nothrow__)) __attribute__ ((__const));
+extern __const __int32_t **__ctype_tolower_loc (void)
+ __attribute__ ((__nothrow__)) __attribute__ ((__const));
+extern __const __int32_t **__ctype_toupper_loc (void)
+ __attribute__ ((__nothrow__)) __attribute__ ((__const));
+# 96 "/usr/include/ctype.h" 3 4
+
+
+
+
+
+
+extern int isalnum (int) __attribute__ ((__nothrow__));
+extern int isalpha (int) __attribute__ ((__nothrow__));
+extern int iscntrl (int) __attribute__ ((__nothrow__));
+extern int isdigit (int) __attribute__ ((__nothrow__));
+extern int islower (int) __attribute__ ((__nothrow__));
+extern int isgraph (int) __attribute__ ((__nothrow__));
+extern int isprint (int) __attribute__ ((__nothrow__));
+extern int ispunct (int) __attribute__ ((__nothrow__));
+extern int isspace (int) __attribute__ ((__nothrow__));
+extern int isupper (int) __attribute__ ((__nothrow__));
+extern int isxdigit (int) __attribute__ ((__nothrow__));
+
+
+
+extern int tolower (int __c) __attribute__ ((__nothrow__));
+
+
+extern int toupper (int __c) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+
+
+extern int isblank (int) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+extern int isctype (int __c, int __mask) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+extern int isascii (int __c) __attribute__ ((__nothrow__));
+
+
+
+extern int toascii (int __c) __attribute__ ((__nothrow__));
+
+
+
+extern int _toupper (int) __attribute__ ((__nothrow__));
+extern int _tolower (int) __attribute__ ((__nothrow__));
+# 190 "/usr/include/ctype.h" 3 4
+extern __inline int
+__attribute__ ((__nothrow__)) tolower (int __c)
+{
+ return __c >= -128 && __c < 256 ? (*__ctype_tolower_loc ())[__c] : __c;
+}
+
+extern __inline int
+__attribute__ ((__nothrow__)) toupper (int __c)
+{
+ return __c >= -128 && __c < 256 ? (*__ctype_toupper_loc ())[__c] : __c;
+}
+# 247 "/usr/include/ctype.h" 3 4
+extern int isalnum_l (int, __locale_t) __attribute__ ((__nothrow__));
+extern int isalpha_l (int, __locale_t) __attribute__ ((__nothrow__));
+extern int iscntrl_l (int, __locale_t) __attribute__ ((__nothrow__));
+extern int isdigit_l (int, __locale_t) __attribute__ ((__nothrow__));
+extern int islower_l (int, __locale_t) __attribute__ ((__nothrow__));
+extern int isgraph_l (int, __locale_t) __attribute__ ((__nothrow__));
+extern int isprint_l (int, __locale_t) __attribute__ ((__nothrow__));
+extern int ispunct_l (int, __locale_t) __attribute__ ((__nothrow__));
+extern int isspace_l (int, __locale_t) __attribute__ ((__nothrow__));
+extern int isupper_l (int, __locale_t) __attribute__ ((__nothrow__));
+extern int isxdigit_l (int, __locale_t) __attribute__ ((__nothrow__));
+
+extern int isblank_l (int, __locale_t) __attribute__ ((__nothrow__));
+
+
+
+extern int __tolower_l (int __c, __locale_t __l) __attribute__ ((__nothrow__));
+extern int tolower_l (int __c, __locale_t __l) __attribute__ ((__nothrow__));
+
+
+extern int __toupper_l (int __c, __locale_t __l) __attribute__ ((__nothrow__));
+extern int toupper_l (int __c, __locale_t __l) __attribute__ ((__nothrow__));
+# 323 "/usr/include/ctype.h" 3 4
+
+# 16 "./include/ut0ut.h" 2
+
+
+typedef time_t ib_time_t;
+
+
+
+
+
+
+ulint
+ut_get_high32(
+
+
+ ulint a);
+
+
+static inline
+ulint
+ut_min(
+
+
+ ulint n1,
+ ulint n2);
+
+
+static inline
+ulint
+ut_max(
+
+
+ ulint n1,
+ ulint n2);
+
+
+static inline
+void
+ut_pair_min(
+
+ ulint* a,
+ ulint* b,
+ ulint a1,
+ ulint b1,
+ ulint a2,
+ ulint b2);
+
+
+static inline
+int
+ut_ulint_cmp(
+
+
+ ulint a,
+ ulint b);
+
+
+static inline
+int
+ut_pair_cmp(
+
+
+
+ ulint a1,
+ ulint a2,
+ ulint b1,
+ ulint b2);
+
+
+static inline
+ulint
+ut_2pow_remainder(
+
+ ulint n,
+ ulint m);
+
+
+static inline
+ulint
+ut_2pow_round(
+
+
+ ulint n,
+ ulint m);
+
+
+
+static inline
+ulint
+ut_2_log(
+
+
+ ulint n);
+
+
+static inline
+ulint
+ut_2_exp(
+
+
+ ulint n);
+
+
+
+ulint
+ut_2_power_up(
+
+
+ ulint n);
+
+
+
+void
+ut_ulint_sort(ulint* arr, ulint* aux_arr, ulint low, ulint high);
+
+
+
+
+ulint
+ut_clock(void);
+
+
+
+
+ib_time_t
+ut_time(void);
+
+
+
+
+
+
+
+int
+ut_usectime(
+
+
+ ulint* sec,
+ ulint* ms);
+
+
+
+double
+ut_difftime(
+
+
+ ib_time_t time2,
+ ib_time_t time1);
+
+
+
+void
+ut_print_timestamp(
+
+ FILE* file);
+
+
+
+void
+ut_sprintf_timestamp(
+
+ char* buf);
+
+
+
+
+void
+ut_sprintf_timestamp_without_extra_chars(
+
+ char* buf);
+
+
+
+void
+ut_get_year_month_day(
+
+ ulint* year,
+ ulint* month,
+ ulint* day);
+
+
+
+
+ulint
+ut_delay(
+
+
+ ulint delay);
+
+
+
+void
+ut_print_buf(
+
+ FILE* file,
+ const unsigned char* buf,
+ ulint len);
+
+
+
+
+void
+ut_print_filename(
+
+ FILE* f,
+ const char* name);
+
+
+
+
+struct trx_struct;
+
+void
+ut_print_name(
+
+ FILE* f,
+ struct trx_struct*trx,
+ const char* name);
+
+
+
+
+void
+ut_print_namel(
+
+ FILE* f,
+ struct trx_struct*trx,
+ const char* name,
+ ulint namelen);
+
+
+
+
+void
+ut_copy_file(
+
+ FILE* dest,
+ FILE* src);
+
+
+# 1 "./include/ut0ut.ic" 1
+# 11 "./include/ut0ut.ic"
+static inline
+ulint
+ut_min(
+
+
+ ulint n1,
+ ulint n2)
+{
+ return((n1 <= n2) ? n1 : n2);
+}
+
+
+
+static inline
+ulint
+ut_max(
+
+
+ ulint n1,
+ ulint n2)
+{
+ return((n1 <= n2) ? n2 : n1);
+}
+
+
+
+static inline
+void
+ut_pair_min(
+
+ ulint* a,
+ ulint* b,
+ ulint a1,
+ ulint b1,
+ ulint a2,
+ ulint b2)
+{
+ if (a1 == a2) {
+ *a = a1;
+ *b = ut_min(b1, b2);
+ } else if (a1 < a2) {
+ *a = a1;
+ *b = b1;
+ } else {
+ *a = a2;
+ *b = b2;
+ }
+}
+
+
+
+static inline
+int
+ut_ulint_cmp(
+
+
+ ulint a,
+ ulint b)
+{
+ if (a < b) {
+ return(-1);
+ } else if (a == b) {
+ return(0);
+ } else {
+ return(1);
+ }
+}
+
+
+
+static inline
+int
+ut_pair_cmp(
+
+
+ ulint a1,
+ ulint a2,
+ ulint b1,
+ ulint b2)
+{
+ if (a1 > b1) {
+ return(1);
+ } else if (a1 < b1) {
+ return(-1);
+ } else if (a2 > b2) {
+ return(1);
+ } else if (a2 < b2) {
+ return(-1);
+ } else {
+ return(0);
+ }
+}
+
+
+
+static inline
+ulint
+ut_2pow_remainder(
+
+ ulint n,
+ ulint m)
+{
+ ;
+
+ return(n & (m - 1));
+}
+
+
+
+static inline
+ulint
+ut_2pow_round(
+
+
+ ulint n,
+ ulint m)
+{
+ ;
+
+ return(n & ~(m - 1));
+}
+
+
+
+
+static inline
+ulint
+ut_2_log(
+
+
+ ulint n)
+{
+ ulint res;
+
+ res = 0;
+
+ ;
+
+ n = n - 1;
+
+ for (;;) {
+ n = n / 2;
+
+ if (n == 0) {
+ break;
+ }
+
+ res++;
+ }
+
+ return(res + 1);
+}
+
+
+
+static inline
+ulint
+ut_2_exp(
+
+
+ ulint n)
+{
+ return((ulint) 1 << n);
+}
+# 255 "./include/ut0ut.h" 2
+# 274 "./include/univ.i" 2
+# 1 "./include/db0err.h" 1
+# 275 "./include/univ.i" 2
+# 27 "./include/buf0buf.h" 2
+# 1 "./include/fil0fil.h" 1
+# 13 "./include/fil0fil.h"
+# 1 "./include/sync0rw.h" 1
+# 13 "./include/sync0rw.h"
+# 1 "./include/ut0lst.h" 1
+# 14 "./include/sync0rw.h" 2
+# 1 "./include/sync0sync.h" 1
+# 13 "./include/sync0sync.h"
+# 1 "./include/sync0types.h" 1
+# 13 "./include/sync0types.h"
+typedef struct mutex_struct ib_mutex_t;
+# 14 "./include/sync0sync.h" 2
+
+# 1 "./include/ut0mem.h" 1
+# 13 "./include/ut0mem.h"
+# 1 "/usr/include/string.h" 1 3 4
+# 28 "/usr/include/string.h" 3 4
+
+
+
+
+
+# 1 "/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.4/include/stddef.h" 1 3 4
+# 34 "/usr/include/string.h" 2 3 4
+
+
+
+
+
+
+
+
+
+extern void *memcpy (void *__restrict __dest,
+ __const void *__restrict __src, size_t __n)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+extern void *memmove (void *__dest, __const void *__src, size_t __n)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+
+
+
+extern void *memccpy (void *__restrict __dest, __const void *__restrict __src,
+ int __c, size_t __n)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+
+
+extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int memcmp (__const void *__s1, __const void *__s2, size_t __n)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
+# 94 "/usr/include/string.h" 3 4
+extern void *memchr (__const void *__s, int __c, size_t __n)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
+
+
+# 108 "/usr/include/string.h" 3 4
+extern void *rawmemchr (__const void *__s, int __c)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
+# 119 "/usr/include/string.h" 3 4
+extern void *memrchr (__const void *__s, int __c, size_t __n)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+
+extern char *strcpy (char *__restrict __dest, __const char *__restrict __src)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+extern char *strncpy (char *__restrict __dest,
+ __const char *__restrict __src, size_t __n)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+extern char *strcat (char *__restrict __dest, __const char *__restrict __src)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+extern char *strncat (char *__restrict __dest, __const char *__restrict __src,
+ size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+extern int strcmp (__const char *__s1, __const char *__s2)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
+
+extern int strncmp (__const char *__s1, __const char *__s2, size_t __n)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+extern int strcoll (__const char *__s1, __const char *__s2)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
+
+extern size_t strxfrm (char *__restrict __dest,
+ __const char *__restrict __src, size_t __n)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
+
+# 164 "/usr/include/string.h" 3 4
+extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));
+
+extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n,
+ __locale_t __l) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4)));
+
+
+
+
+extern char *strdup (__const char *__s)
+ __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+
+extern char *strndup (__const char *__string, size_t __n)
+ __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
+# 208 "/usr/include/string.h" 3 4
+
+# 233 "/usr/include/string.h" 3 4
+extern char *strchr (__const char *__s, int __c)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
+# 260 "/usr/include/string.h" 3 4
+extern char *strrchr (__const char *__s, int __c)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
+
+
+# 274 "/usr/include/string.h" 3 4
+extern char *strchrnul (__const char *__s, int __c)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+
+extern size_t strcspn (__const char *__s, __const char *__reject)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+extern size_t strspn (__const char *__s, __const char *__accept)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
+# 312 "/usr/include/string.h" 3 4
+extern char *strpbrk (__const char *__s, __const char *__accept)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
+# 340 "/usr/include/string.h" 3 4
+extern char *strstr (__const char *__haystack, __const char *__needle)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+
+extern char *strtok (char *__restrict __s, __const char *__restrict __delim)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
+
+
+
+
+extern char *__strtok_r (char *__restrict __s,
+ __const char *__restrict __delim,
+ char **__restrict __save_ptr)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3)));
+
+extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim,
+ char **__restrict __save_ptr)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3)));
+# 371 "/usr/include/string.h" 3 4
+extern char *strcasestr (__const char *__haystack, __const char *__needle)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+
+
+
+
+extern void *memmem (__const void *__haystack, size_t __haystacklen,
+ __const void *__needle, size_t __needlelen)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3)));
+
+
+
+extern void *__mempcpy (void *__restrict __dest,
+ __const void *__restrict __src, size_t __n)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+extern void *mempcpy (void *__restrict __dest,
+ __const void *__restrict __src, size_t __n)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+
+
+extern size_t strlen (__const char *__s)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+extern size_t strnlen (__const char *__string, size_t __maxlen)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+extern char *strerror (int __errnum) __attribute__ ((__nothrow__));
+
+# 436 "/usr/include/string.h" 3 4
+extern char *strerror_r (int __errnum, char *__buf, size_t __buflen)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
+
+
+
+
+
+extern char *strerror_l (int __errnum, __locale_t __l) __attribute__ ((__nothrow__));
+
+
+
+
+
+extern void __bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+extern void bcopy (__const void *__src, void *__dest, size_t __n)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int bcmp (__const void *__s1, __const void *__s2, size_t __n)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
+# 487 "/usr/include/string.h" 3 4
+extern char *index (__const char *__s, int __c)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
+# 515 "/usr/include/string.h" 3 4
+extern char *rindex (__const char *__s, int __c)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+extern int ffs (int __i) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+
+
+
+extern int ffsl (long int __l) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+__extension__ extern int ffsll (long long int __ll)
+ __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+
+
+
+extern int strcasecmp (__const char *__s1, __const char *__s2)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+
+
+extern int strcasecmp_l (__const char *__s1, __const char *__s2,
+ __locale_t __loc)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));
+
+extern int strncasecmp_l (__const char *__s1, __const char *__s2,
+ size_t __n, __locale_t __loc)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4)));
+
+
+
+
+
+extern char *strsep (char **__restrict __stringp,
+ __const char *__restrict __delim)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+
+extern char *strsignal (int __sig) __attribute__ ((__nothrow__));
+
+
+extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+extern char *__stpncpy (char *__restrict __dest,
+ __const char *__restrict __src, size_t __n)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+extern char *stpncpy (char *__restrict __dest,
+ __const char *__restrict __src, size_t __n)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+
+extern int strverscmp (__const char *__s1, __const char *__s2)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+extern char *strfry (char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern void *memfrob (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+# 604 "/usr/include/string.h" 3 4
+extern char *basename (__const char *__filename) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+# 632 "/usr/include/string.h" 3 4
+# 1 "/usr/include/bits/string.h" 1 3 4
+# 633 "/usr/include/string.h" 2 3 4
+
+
+# 1 "/usr/include/bits/string2.h" 1 3 4
+# 80 "/usr/include/bits/string2.h" 3 4
+typedef struct { unsigned char __arr[2]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR2;
+typedef struct { unsigned char __arr[3]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR3;
+typedef struct { unsigned char __arr[4]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR4;
+typedef struct { unsigned char __arr[5]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR5;
+typedef struct { unsigned char __arr[6]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR6;
+typedef struct { unsigned char __arr[7]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR7;
+typedef struct { unsigned char __arr[8]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR8;
+# 394 "/usr/include/bits/string2.h" 3 4
+extern void *__rawmemchr (const void *__s, int __c);
+# 969 "/usr/include/bits/string2.h" 3 4
+extern __inline size_t __strcspn_c1 (__const char *__s, int __reject);
+extern __inline size_t
+__strcspn_c1 (__const char *__s, int __reject)
+{
+ register size_t __result = 0;
+ while (__s[__result] != '\0' && __s[__result] != __reject)
+ ++__result;
+ return __result;
+}
+
+extern __inline size_t __strcspn_c2 (__const char *__s, int __reject1,
+ int __reject2);
+extern __inline size_t
+__strcspn_c2 (__const char *__s, int __reject1, int __reject2)
+{
+ register size_t __result = 0;
+ while (__s[__result] != '\0' && __s[__result] != __reject1
+ && __s[__result] != __reject2)
+ ++__result;
+ return __result;
+}
+
+extern __inline size_t __strcspn_c3 (__const char *__s, int __reject1,
+ int __reject2, int __reject3);
+extern __inline size_t
+__strcspn_c3 (__const char *__s, int __reject1, int __reject2,
+ int __reject3)
+{
+ register size_t __result = 0;
+ while (__s[__result] != '\0' && __s[__result] != __reject1
+ && __s[__result] != __reject2 && __s[__result] != __reject3)
+ ++__result;
+ return __result;
+}
+# 1045 "/usr/include/bits/string2.h" 3 4
+extern __inline size_t __strspn_c1 (__const char *__s, int __accept);
+extern __inline size_t
+__strspn_c1 (__const char *__s, int __accept)
+{
+ register size_t __result = 0;
+
+ while (__s[__result] == __accept)
+ ++__result;
+ return __result;
+}
+
+extern __inline size_t __strspn_c2 (__const char *__s, int __accept1,
+ int __accept2);
+extern __inline size_t
+__strspn_c2 (__const char *__s, int __accept1, int __accept2)
+{
+ register size_t __result = 0;
+
+ while (__s[__result] == __accept1 || __s[__result] == __accept2)
+ ++__result;
+ return __result;
+}
+
+extern __inline size_t __strspn_c3 (__const char *__s, int __accept1,
+ int __accept2, int __accept3);
+extern __inline size_t
+__strspn_c3 (__const char *__s, int __accept1, int __accept2, int __accept3)
+{
+ register size_t __result = 0;
+
+ while (__s[__result] == __accept1 || __s[__result] == __accept2
+ || __s[__result] == __accept3)
+ ++__result;
+ return __result;
+}
+# 1121 "/usr/include/bits/string2.h" 3 4
+extern __inline char *__strpbrk_c2 (__const char *__s, int __accept1,
+ int __accept2);
+extern __inline char *
+__strpbrk_c2 (__const char *__s, int __accept1, int __accept2)
+{
+
+ while (*__s != '\0' && *__s != __accept1 && *__s != __accept2)
+ ++__s;
+ return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s;
+}
+
+extern __inline char *__strpbrk_c3 (__const char *__s, int __accept1,
+ int __accept2, int __accept3);
+extern __inline char *
+__strpbrk_c3 (__const char *__s, int __accept1, int __accept2,
+ int __accept3)
+{
+
+ while (*__s != '\0' && *__s != __accept1 && *__s != __accept2
+ && *__s != __accept3)
+ ++__s;
+ return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s;
+}
+# 1172 "/usr/include/bits/string2.h" 3 4
+extern __inline char *__strtok_r_1c (char *__s, char __sep, char **__nextp);
+extern __inline char *
+__strtok_r_1c (char *__s, char __sep, char **__nextp)
+{
+ char *__result;
+ if (__s == ((void *)0))
+ __s = *__nextp;
+ while (*__s == __sep)
+ ++__s;
+ __result = ((void *)0);
+ if (*__s != '\0')
+ {
+ __result = __s++;
+ while (*__s != '\0')
+ if (*__s++ == __sep)
+ {
+ __s[-1] = '\0';
+ break;
+ }
+ }
+ *__nextp = __s;
+ return __result;
+}
+# 1204 "/usr/include/bits/string2.h" 3 4
+extern char *__strsep_g (char **__stringp, __const char *__delim);
+# 1222 "/usr/include/bits/string2.h" 3 4
+extern __inline char *__strsep_1c (char **__s, char __reject);
+extern __inline char *
+__strsep_1c (char **__s, char __reject)
+{
+ register char *__retval = *__s;
+ if (__retval != ((void *)0) && (*__s = (__extension__ (__builtin_constant_p (__reject) && !__builtin_constant_p (__retval) && (__reject) == '\0' ? (char *) __rawmemchr (__retval, __reject) : __builtin_strchr (__retval, __reject)))) != ((void *)0))
+ *(*__s)++ = '\0';
+ return __retval;
+}
+
+extern __inline char *__strsep_2c (char **__s, char __reject1, char __reject2);
+extern __inline char *
+__strsep_2c (char **__s, char __reject1, char __reject2)
+{
+ register char *__retval = *__s;
+ if (__retval != ((void *)0))
+ {
+ register char *__cp = __retval;
+ while (1)
+ {
+ if (*__cp == '\0')
+ {
+ __cp = ((void *)0);
+ break;
+ }
+ if (*__cp == __reject1 || *__cp == __reject2)
+ {
+ *__cp++ = '\0';
+ break;
+ }
+ ++__cp;
+ }
+ *__s = __cp;
+ }
+ return __retval;
+}
+
+extern __inline char *__strsep_3c (char **__s, char __reject1, char __reject2,
+ char __reject3);
+extern __inline char *
+__strsep_3c (char **__s, char __reject1, char __reject2, char __reject3)
+{
+ register char *__retval = *__s;
+ if (__retval != ((void *)0))
+ {
+ register char *__cp = __retval;
+ while (1)
+ {
+ if (*__cp == '\0')
+ {
+ __cp = ((void *)0);
+ break;
+ }
+ if (*__cp == __reject1 || *__cp == __reject2 || *__cp == __reject3)
+ {
+ *__cp++ = '\0';
+ break;
+ }
+ ++__cp;
+ }
+ *__s = __cp;
+ }
+ return __retval;
+}
+# 1303 "/usr/include/bits/string2.h" 3 4
+extern char *__strdup (__const char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__));
+# 1322 "/usr/include/bits/string2.h" 3 4
+extern char *__strndup (__const char *__string, size_t __n)
+ __attribute__ ((__nothrow__)) __attribute__ ((__malloc__));
+# 636 "/usr/include/string.h" 2 3 4
+
+
+
+
+# 1 "/usr/include/bits/string3.h" 1 3 4
+# 23 "/usr/include/bits/string3.h" 3 4
+extern void __warn_memset_zero_len (void) __attribute__((__warning__ ("memset used with constant zero length parameter; this could be due to transposed parameters")));
+# 48 "/usr/include/bits/string3.h" 3 4
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) void *
+__attribute__ ((__nothrow__)) memcpy (void *__restrict __dest, __const void *__restrict __src, size_t __len)
+
+{
+ return __builtin___memcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0));
+}
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) void *
+__attribute__ ((__nothrow__)) memmove (void *__restrict __dest, __const void *__restrict __src, size_t __len)
+
+{
+ return __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0));
+}
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) void *
+__attribute__ ((__nothrow__)) mempcpy (void *__restrict __dest, __const void *__restrict __src, size_t __len)
+
+{
+ return __builtin___mempcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0));
+}
+# 77 "/usr/include/bits/string3.h" 3 4
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) void *
+__attribute__ ((__nothrow__)) memset (void *__dest, int __ch, size_t __len)
+{
+ if (__builtin_constant_p (__len) && __len == 0)
+ {
+ __warn_memset_zero_len ();
+ return __dest;
+ }
+ return __builtin___memset_chk (__dest, __ch, __len, __builtin_object_size (__dest, 0));
+}
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) void
+__attribute__ ((__nothrow__)) bcopy (__const void *__restrict __src, void *__restrict __dest, size_t __len)
+
+{
+ (void) __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0));
+}
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) void
+__attribute__ ((__nothrow__)) bzero (void *__dest, size_t __len)
+{
+ (void) __builtin___memset_chk (__dest, '\0', __len, __builtin_object_size (__dest, 0));
+}
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) char *
+__attribute__ ((__nothrow__)) strcpy (char *__restrict __dest, __const char *__restrict __src)
+{
+ return __builtin___strcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1));
+}
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) char *
+__attribute__ ((__nothrow__)) stpcpy (char *__restrict __dest, __const char *__restrict __src)
+{
+ return __builtin___stpcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1));
+}
+
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) char *
+__attribute__ ((__nothrow__)) strncpy (char *__restrict __dest, __const char *__restrict __src, size_t __len)
+
+{
+ return __builtin___strncpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1));
+}
+
+
+extern char *__stpncpy_chk (char *__dest, __const char *__src, size_t __n,
+ size_t __destlen) __attribute__ ((__nothrow__));
+extern char *__stpncpy_alias (char *__dest, __const char *__src, size_t __n) __asm__ ("" "stpncpy") __attribute__ ((__nothrow__));
+
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) char *
+__attribute__ ((__nothrow__)) stpncpy (char *__dest, __const char *__src, size_t __n)
+{
+ if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1
+ && (!__builtin_constant_p (__n) || __n <= __builtin_object_size (__dest, 2 > 1)))
+ return __stpncpy_chk (__dest, __src, __n, __builtin_object_size (__dest, 2 > 1));
+ return __stpncpy_alias (__dest, __src, __n);
+}
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) char *
+__attribute__ ((__nothrow__)) strcat (char *__restrict __dest, __const char *__restrict __src)
+{
+ return __builtin___strcat_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1));
+}
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) char *
+__attribute__ ((__nothrow__)) strncat (char *__restrict __dest, __const char *__restrict __src, size_t __len)
+
+{
+ return __builtin___strncat_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1));
+}
+# 641 "/usr/include/string.h" 2 3 4
+
+
+
+
+# 14 "./include/ut0mem.h" 2
+
+
+
+extern ulint ut_total_allocated_memory;
+
+static inline
+void*
+ut_memcpy(void* dest, const void* sour, ulint n);
+
+static inline
+void*
+ut_memmove(void* dest, const void* sour, ulint n);
+
+static inline
+int
+ut_memcmp(const void* str1, const void* str2, ulint n);
+
+
+
+
+
+
+void*
+ut_malloc_low(
+
+
+ ulint n,
+ ulint set_to_zero,
+
+ ulint assert_on_error);
+
+
+
+
+
+void*
+ut_malloc(
+
+
+ ulint n);
+
+
+
+
+
+ulint
+ut_test_malloc(
+
+
+ ulint n);
+
+
+
+void
+ut_free(
+
+ void* ptr);
+# 96 "./include/ut0mem.h"
+void*
+ut_realloc(
+
+
+ void* ptr,
+ ulint size);
+
+
+
+void
+ut_free_all_mem(void);
+
+
+static inline
+char*
+ut_strcpy(char* dest, const char* sour);
+
+static inline
+ulint
+ut_strlen(const char* str);
+
+static inline
+int
+ut_strcmp(const void* str1, const void* str2);
+
+
+
+
+
+
+ulint
+ut_strlcpy(
+
+
+ char* dst,
+ const char* src,
+ ulint size);
+
+
+
+
+
+ulint
+ut_strlcpy_rev(
+
+
+ char* dst,
+ const char* src,
+ ulint size);
+
+
+
+static inline
+ulint
+ut_strlenq(
+
+
+ const char* str,
+ char q);
+
+
+
+
+
+
+char*
+ut_strcpyq(
+
+
+ char* dest,
+ char q,
+ const char* src);
+
+
+
+
+
+
+char*
+ut_memcpyq(
+
+
+ char* dest,
+ char q,
+ const char* src,
+ ulint len);
+
+
+# 1 "./include/ut0mem.ic" 1
+# 9 "./include/ut0mem.ic"
+static inline
+void*
+ut_memcpy(void* dest, const void* sour, ulint n)
+{
+ return(memcpy(dest, sour, n));
+}
+
+static inline
+void*
+ut_memmove(void* dest, const void* sour, ulint n)
+{
+ return(memmove(dest, sour, n));
+}
+
+static inline
+int
+ut_memcmp(const void* str1, const void* str2, ulint n)
+{
+ return(memcmp(str1, str2, n));
+}
+
+static inline
+char*
+ut_strcpy(char* dest, const char* sour)
+{
+ return(strcpy(dest, sour));
+}
+
+static inline
+ulint
+ut_strlen(const char* str)
+{
+ return(strlen(str));
+}
+
+static inline
+int
+ut_strcmp(const void* str1, const void* str2)
+{
+ return(__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ((const char*)str1) && __builtin_constant_p ((const char*)str2) && (__s1_len = strlen ((const char*)str1), __s2_len = strlen ((const char*)str2), (!((size_t)(const void *)(((const char*)str1) + 1) - (size_t)(const void *)((const char*)str1) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(((const char*)str2) + 1) - (size_t)(const void *)((const char*)str2) == 1) || __s2_len >= 4)) ? __builtin_strcmp ((const char*)str1, (const char*)str2) : (__builtin_constant_p ((const char*)str1) && ((size_t)(const void *)(((const char*)str1) + 1) - (size_t)(const void *)((const char*)str1) == 1) && (__s1_len = strlen ((const char*)str1), __s1_len < 4) ? (__builtin_constant_p ((const char*)str2) && ((size_t)(const void *)(((const char*)str2) + 1) - (size_t)(const void *)((const char*)str2) == 1) ? __builtin_strcmp ((const char*)str1, (const char*)str2) : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ((const char*)str2); register int __result = (((__const unsigned char *) (__const char *) ((const char*)str1))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) ((const char*)str1))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) ((const char*)str1))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) ((const char*)str1))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ((const char*)str2) && ((size_t)(const void *)(((const char*)str2) + 1) - (size_t)(const void *)((const char*)str2) == 1) && (__s2_len = strlen ((const char*)str2), __s2_len < 4) ? (__builtin_constant_p ((const char*)str1) && ((size_t)(const void *)(((const char*)str1) + 1) - (size_t)(const void *)((const char*)str1) == 1) ? __builtin_strcmp ((const char*)str1, (const char*)str2) : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) ((const char*)str1); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ((const char*)str2))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ((const char*)str2))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ((const char*)str2))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ((const char*)str2))[3]); } } __result; }))) : __builtin_strcmp ((const char*)str1, (const char*)str2)))); }));
+}
+
+
+
+static inline
+ulint
+ut_strlenq(
+
+
+ const char* str,
+ char q)
+{
+ ulint len;
+
+ for (len = 0; *str; len++, str++) {
+ if (*str == q) {
+ len++;
+ }
+ }
+
+ return(len);
+}
+# 185 "./include/ut0mem.h" 2
+# 16 "./include/sync0sync.h" 2
+
+# 1 "./include/os0sync.h" 1
+# 31 "./include/os0sync.h"
+typedef pthread_mutex_t os_fast_mutex_t;
+
+typedef struct os_event_struct os_event_struct_t;
+typedef os_event_struct_t* os_event_t;
+
+struct os_event_struct {
+ os_fast_mutex_t os_mutex;
+
+ ulint is_set;
+
+
+
+ ib_longlong signal_count;
+
+ pthread_cond_t cond_var;
+
+ struct { os_event_struct_t * prev; os_event_struct_t * next; } os_event_list;
+
+};
+
+
+typedef struct os_mutex_struct os_mutex_str_t;
+typedef os_mutex_str_t* os_mutex_t;
+
+
+
+
+
+
+extern os_mutex_t os_sync_mutex;
+
+
+
+extern ulint os_thread_count;
+
+extern ulint os_event_count;
+extern ulint os_mutex_count;
+extern ulint os_fast_mutex_count;
+
+
+
+
+void
+os_sync_init(void);
+
+
+
+
+void
+os_sync_free(void);
+
+
+
+
+
+
+os_event_t
+os_event_create(
+
+
+ const char* name);
+# 109 "./include/os0sync.h"
+void
+os_event_set(
+
+ os_event_t event);
+# 121 "./include/os0sync.h"
+ib_longlong
+os_event_reset(
+
+ os_event_t event);
+
+
+
+void
+os_event_free(
+
+ os_event_t event);
+# 156 "./include/os0sync.h"
+void
+os_event_wait_low(
+
+ os_event_t event,
+ ib_longlong reset_sig_count);
+
+
+
+
+
+
+
+ulint
+os_event_wait_time(
+
+
+
+
+ os_event_t event,
+ ulint time);
+# 197 "./include/os0sync.h"
+os_mutex_t
+os_mutex_create(
+
+
+ const char* name);
+
+
+
+
+void
+os_mutex_enter(
+
+ os_mutex_t mutex);
+
+
+
+void
+os_mutex_exit(
+
+ os_mutex_t mutex);
+
+
+
+void
+os_mutex_free(
+
+ os_mutex_t mutex);
+
+
+
+static inline
+ulint
+os_fast_mutex_trylock(
+
+
+
+
+ os_fast_mutex_t* fast_mutex);
+
+
+
+void
+os_fast_mutex_unlock(
+
+ os_fast_mutex_t* fast_mutex);
+
+
+
+void
+os_fast_mutex_init(
+
+ os_fast_mutex_t* fast_mutex);
+
+
+
+void
+os_fast_mutex_lock(
+
+ os_fast_mutex_t* fast_mutex);
+
+
+
+void
+os_fast_mutex_free(
+
+ os_fast_mutex_t* fast_mutex);
+
+
+# 1 "./include/os0sync.ic" 1
+# 16 "./include/os0sync.ic"
+static inline
+ulint
+os_fast_mutex_trylock(
+
+
+
+
+ os_fast_mutex_t* fast_mutex)
+{
+# 43 "./include/os0sync.ic"
+ return((ulint) pthread_mutex_trylock(fast_mutex));
+
+
+}
+# 266 "./include/os0sync.h" 2
+# 18 "./include/sync0sync.h" 2
+# 1 "./include/sync0arr.h" 1
+# 17 "./include/sync0arr.h"
+typedef struct sync_cell_struct sync_cell_t;
+typedef struct sync_array_struct sync_array_t;
+# 28 "./include/sync0arr.h"
+sync_array_t*
+sync_array_create(
+
+
+ ulint n_cells,
+
+ ulint protection);
+
+
+
+
+
+void
+sync_array_free(
+
+ sync_array_t* arr);
+
+
+
+
+void
+sync_array_reserve_cell(
+
+ sync_array_t* arr,
+ void* object,
+ ulint type,
+ const char* file,
+ ulint line,
+ ulint* index);
+
+
+
+
+
+
+void
+sync_array_wait_event(
+
+ sync_array_t* arr,
+ ulint index);
+
+
+
+
+void
+sync_array_free_cell(
+
+ sync_array_t* arr,
+ ulint index);
+
+
+
+void
+sync_array_object_signalled(
+
+ sync_array_t* arr);
+
+
+
+
+
+void
+sync_arr_wake_threads_if_sema_free(void);
+
+
+
+
+ulint
+sync_array_print_long_waits(void);
+
+
+
+
+
+
+
+void
+sync_array_validate(
+
+ sync_array_t* arr);
+
+
+
+void
+sync_array_print_info(
+
+ FILE* file,
+ sync_array_t* arr);
+
+
+
+# 1 "./include/sync0arr.ic" 1
+# 120 "./include/sync0arr.h" 2
+# 19 "./include/sync0sync.h" 2
+
+
+extern my_bool timed_mutexes;
+
+
+
+
+
+void
+sync_init(void);
+
+
+
+
+void
+sync_close(void);
+# 54 "./include/sync0sync.h"
+void
+mutex_create_func(
+
+ ib_mutex_t* mutex,
+
+
+
+ const char* cfile_name,
+ ulint cline);
+
+
+
+
+
+
+void
+mutex_free(
+
+ ib_mutex_t* mutex);
+# 83 "./include/sync0sync.h"
+void
+mutex_enter_noninline(
+
+ ib_mutex_t* mutex);
+# 100 "./include/sync0sync.h"
+static inline
+void
+mutex_enter_func(
+
+ ib_mutex_t* mutex,
+ const char* file_name,
+ ulint line);
+
+
+
+
+ulint
+mutex_enter_nowait(
+
+
+ ib_mutex_t* mutex,
+ const char* file_name,
+
+ ulint line);
+
+
+static inline
+void
+mutex_exit(
+
+ ib_mutex_t* mutex);
+
+
+
+void
+mutex_exit_noninline(
+
+ ib_mutex_t* mutex);
+
+
+
+
+ulint
+sync_all_freed(void);
+
+
+
+
+
+
+void
+sync_print_wait_info(
+
+ FILE* file);
+
+
+
+void
+sync_print(
+
+ FILE* file);
+
+
+
+ulint
+mutex_validate(
+
+ ib_mutex_t* mutex);
+
+
+
+void
+mutex_set_level(
+
+ ib_mutex_t* mutex,
+ ulint level);
+
+
+
+
+
+void
+sync_thread_add_level(
+
+ void* latch,
+ ulint level);
+
+
+
+
+ulint
+sync_thread_reset_level(
+
+
+
+
+
+ void* latch);
+
+
+
+ulint
+sync_thread_levels_empty(void);
+
+
+
+
+
+ulint
+sync_thread_levels_empty_gen(
+
+
+
+ ulint dict_mutex_allowed);
+# 249 "./include/sync0sync.h"
+static inline
+ulint
+mutex_get_lock_word(
+
+ ib_mutex_t* mutex);
+# 461 "./include/sync0sync.h"
+struct mutex_struct {
+ os_event_t event;
+ ulint lock_word;
+
+
+ os_fast_mutex_t
+ os_fast_mutex;
+
+
+ ulint waiters;
+
+
+
+ struct { ib_mutex_t * prev; ib_mutex_t * next; } list;
+
+
+
+
+
+
+
+ ulint level;
+
+ const char* cfile_name;
+ ulint cline;
+ ulint magic_n;
+
+ ulong count_os_wait;
+# 500 "./include/sync0sync.h"
+};
+
+
+
+
+
+
+extern sync_array_t* sync_primary_wait_array;
+# 524 "./include/sync0sync.h"
+extern ulint mutex_system_call_count;
+extern ulint mutex_exit_count;
+
+
+extern ulint sync_order_checks_on;
+
+
+extern ulint sync_initialized;
+
+
+typedef struct { ulint count; ib_mutex_t * start; ib_mutex_t * end; } ut_list_base_node_t;
+extern ut_list_base_node_t mutex_list;
+
+
+extern ib_mutex_t mutex_list_mutex;
+
+
+
+# 1 "./include/sync0sync.ic" 1
+# 22 "./include/sync0sync.ic"
+void
+mutex_set_waiters(
+
+ ib_mutex_t* mutex,
+ ulint n);
+
+
+
+
+
+void
+mutex_spin_wait(
+
+ ib_mutex_t* mutex,
+ const char* file_name,
+ ulint line);
+# 52 "./include/sync0sync.ic"
+void
+mutex_signal_object(
+
+ ib_mutex_t* mutex);
+
+
+
+
+static inline
+ulint
+mutex_test_and_set(
+
+
+
+ ib_mutex_t* mutex)
+{
+# 104 "./include/sync0sync.ic"
+ ulint ret;
+
+ ret = os_fast_mutex_trylock(&(mutex->os_fast_mutex));
+
+ if (ret == 0) {
+
+
+ do { if (__builtin_expect(!((ulint)(mutex->lock_word == 0)), (0))) { ut_dbg_assertion_failed("mutex->lock_word == 0", "./include/sync0sync.ic", (ulint) 111); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("./include/sync0sync.ic", (ulint) 111); } while (0); } while (0);
+
+ mutex->lock_word = 1;
+ }
+
+ return(ret);
+
+}
+
+
+
+
+static inline
+void
+mutex_reset_lock_word(
+
+ ib_mutex_t* mutex)
+{
+# 144 "./include/sync0sync.ic"
+ mutex->lock_word = 0;
+
+ os_fast_mutex_unlock(&(mutex->os_fast_mutex));
+
+}
+
+
+
+static inline
+ulint
+mutex_get_lock_word(
+
+ ib_mutex_t* mutex)
+{
+volatile ulint* ptr;
+
+ ;
+
+ ptr = &(mutex->lock_word);
+
+ return(*ptr);
+}
+
+
+
+static inline
+ulint
+mutex_get_waiters(
+
+
+ ib_mutex_t* mutex)
+{
+volatile ulint* ptr;
+
+ ;
+
+ ptr = &(mutex->waiters);
+
+ return(*ptr);
+
+}
+
+
+
+static inline
+void
+mutex_exit(
+
+ ib_mutex_t* mutex)
+{
+
+
+
+
+
+
+
+ mutex_reset_lock_word(mutex);
+# 215 "./include/sync0sync.ic"
+ if (mutex_get_waiters(mutex) != 0) {
+
+ mutex_signal_object(mutex);
+ }
+
+
+
+
+}
+
+
+
+
+
+static inline
+void
+mutex_enter_func(
+
+ ib_mutex_t* mutex,
+ const char* file_name,
+ ulint line)
+{
+ ;
+# 246 "./include/sync0sync.ic"
+ if (!mutex_test_and_set(mutex))
+ {
+
+
+
+ return;
+ }
+
+ mutex_spin_wait(mutex, file_name, line);
+
+}
+# 543 "./include/sync0sync.h" 2
+# 15 "./include/sync0rw.h" 2
+# 27 "./include/sync0rw.h"
+typedef struct rw_lock_struct rw_lock_t;
+
+
+
+
+typedef struct { ulint count; rw_lock_t * start; rw_lock_t * end; } rw_lock_list_t;
+
+extern rw_lock_list_t rw_lock_list;
+extern ib_mutex_t rw_lock_list_mutex;
+# 50 "./include/sync0rw.h"
+extern ulint rw_s_system_call_count;
+extern ulint rw_s_spin_wait_count;
+extern ulint rw_s_exit_count;
+extern ulint rw_s_os_wait_count;
+extern ulint rw_x_system_call_count;
+extern ulint rw_x_spin_wait_count;
+extern ulint rw_x_os_wait_count;
+extern ulint rw_x_exit_count;
+# 77 "./include/sync0rw.h"
+void
+rw_lock_create_func(
+
+ rw_lock_t* lock,
+
+
+
+ const char* cfile_name,
+ ulint cline);
+
+
+
+
+
+void
+rw_lock_free(
+
+ rw_lock_t* lock);
+
+
+
+
+ulint
+rw_lock_validate(
+
+ rw_lock_t* lock);
+# 128 "./include/sync0rw.h"
+static inline
+void
+rw_lock_s_lock_func(
+
+ rw_lock_t* lock,
+ ulint pass,
+
+ const char* file_name,
+ ulint line);
+
+
+
+
+static inline
+ulint
+rw_lock_s_lock_func_nowait(
+
+
+ rw_lock_t* lock,
+ const char* file_name,
+ ulint line);
+
+
+
+
+static inline
+ulint
+rw_lock_x_lock_func_nowait(
+
+
+ rw_lock_t* lock,
+ const char* file_name,
+ ulint line);
+
+
+static inline
+void
+rw_lock_s_unlock_func(
+
+ rw_lock_t* lock
+
+
+
+
+ );
+# 217 "./include/sync0rw.h"
+void
+rw_lock_x_lock_func(
+
+ rw_lock_t* lock,
+ ulint pass,
+
+ const char* file_name,
+ ulint line);
+
+
+static inline
+void
+rw_lock_x_unlock_func(
+
+ rw_lock_t* lock
+
+
+
+
+ );
+# 257 "./include/sync0rw.h"
+static inline
+void
+rw_lock_s_lock_direct(
+
+ rw_lock_t* lock,
+ const char* file_name,
+ ulint line
+);
+
+
+
+
+static inline
+void
+rw_lock_x_lock_direct(
+
+ rw_lock_t* lock,
+ const char* file_name,
+ ulint line
+);
+# 286 "./include/sync0rw.h"
+void
+rw_lock_x_lock_move_ownership(
+
+ rw_lock_t* lock);
+
+
+
+
+static inline
+void
+rw_lock_s_unlock_direct(
+
+ rw_lock_t* lock);
+
+
+
+static inline
+void
+rw_lock_x_unlock_direct(
+
+ rw_lock_t* lock);
+
+
+
+void
+rw_lock_set_level(
+
+ rw_lock_t* lock,
+ ulint level);
+
+
+
+static inline
+ulint
+rw_lock_get_x_lock_count(
+
+
+ rw_lock_t* lock);
+
+
+static inline
+ulint
+rw_lock_get_s_waiters(
+
+ rw_lock_t* lock);
+static inline
+ulint
+rw_lock_get_x_waiters(
+
+ rw_lock_t* lock);
+static inline
+ulint
+rw_lock_get_wx_waiters(
+
+ rw_lock_t* lock);
+static inline
+ulint
+rw_lock_get_writer(
+
+ rw_lock_t* lock);
+static inline
+ulint
+rw_lock_get_reader_count(
+
+ rw_lock_t* lock);
+# 366 "./include/sync0rw.h"
+ulint
+rw_lock_is_locked(
+
+ rw_lock_t* lock,
+ ulint lock_type);
+# 440 "./include/sync0rw.h"
+struct rw_lock_struct {
+
+ os_event_t s_event;
+ os_event_t x_event;
+ os_event_t wait_ex_event;
+# 453 "./include/sync0rw.h"
+ volatile lint lock_word;
+
+
+ volatile ulint reader_count;
+
+ volatile ulint writer;
+
+
+
+
+ volatile os_thread_id_t writer_thread;
+
+ volatile ulint writer_count;
+
+
+
+
+
+ ulint pass;
+
+
+
+
+ volatile ulint s_waiters;
+ volatile ulint x_waiters;
+ volatile ulint wait_ex_waiters;
+ volatile ulint writer_is_wait_ex;
+
+
+
+
+
+
+ struct { rw_lock_t * prev; rw_lock_t * next; } list;
+
+
+
+
+
+
+
+ ulint level;
+
+ const char* cfile_name;
+ ulint cline;
+ const char* last_s_file_name;
+ const char* last_x_file_name;
+ ulint last_s_line;
+ ulint last_x_line;
+ ulint magic_n;
+};
+# 525 "./include/sync0rw.h"
+# 1 "./include/sync0rw.ic" 1
+# 15 "./include/sync0rw.ic"
+void
+rw_lock_s_lock_spin(
+
+ rw_lock_t* lock,
+ ulint pass,
+
+ const char* file_name,
+ ulint line);
+# 48 "./include/sync0rw.ic"
+static inline
+ulint
+rw_lock_get_s_waiters(
+
+ rw_lock_t* lock)
+{
+ return(lock->s_waiters);
+}
+static inline
+ulint
+rw_lock_get_x_waiters(
+
+ rw_lock_t* lock)
+{
+ return(lock->x_waiters);
+}
+static inline
+ulint
+rw_lock_get_wx_waiters(
+
+ rw_lock_t* lock)
+{
+ return(lock->wait_ex_waiters);
+}
+static inline
+void
+rw_lock_set_s_waiters(
+ rw_lock_t* lock,
+ ulint flag)
+{
+
+ __sync_lock_test_and_set(&lock->s_waiters, flag);
+
+
+
+}
+static inline
+void
+rw_lock_set_x_waiters(
+ rw_lock_t* lock,
+ ulint flag)
+{
+
+ __sync_lock_test_and_set(&lock->x_waiters, flag);
+
+
+
+}
+static inline
+void
+rw_lock_set_wx_waiters(
+
+ rw_lock_t* lock,
+ ulint flag)
+{
+
+ __sync_lock_test_and_set(&lock->wait_ex_waiters, flag);
+
+
+
+}
+static inline
+ulint
+rw_lock_get_writer(
+
+ rw_lock_t* lock)
+{
+
+ if (lock->writer == 350) {
+ return(350);
+ }
+
+ if (lock->writer_is_wait_ex) {
+ return(353);
+ } else {
+ return(351);
+ }
+
+
+
+}
+static inline
+void
+rw_lock_set_writer(
+
+ rw_lock_t* lock,
+ ulint flag)
+{
+ lock->writer = flag;
+}
+static inline
+ulint
+rw_lock_get_reader_count(
+
+ rw_lock_t* lock)
+{
+ return(lock->reader_count);
+}
+static inline
+void
+rw_lock_set_reader_count(
+
+ rw_lock_t* lock,
+ ulint count)
+{
+ lock->reader_count = count;
+}
+# 169 "./include/sync0rw.ic"
+static inline
+ulint
+rw_lock_get_x_lock_count(
+
+
+ rw_lock_t* lock)
+{
+ return(lock->writer_count);
+}
+
+
+
+
+static inline
+ulint
+rw_lock_s_lock_low(
+
+
+ rw_lock_t* lock,
+ ulint pass __attribute__((unused)),
+
+
+ const char* file_name,
+ ulint line)
+{
+
+
+
+
+
+
+ if (__builtin_expect(rw_lock_get_writer(lock) == 350, (1))) {
+
+ if(__sync_sub_and_fetch(&(lock->lock_word),1) <= 0) {
+
+ __sync_fetch_and_add(&(lock->lock_word),1);
+ return((0));
+ }
+
+ __sync_fetch_and_add(&(lock->reader_count),1);
+# 219 "./include/sync0rw.ic"
+ lock->last_s_file_name = file_name;
+ lock->last_s_line = line;
+
+ return((1));
+ }
+
+ return((0));
+}
+
+
+
+
+
+static inline
+void
+rw_lock_s_lock_direct(
+
+ rw_lock_t* lock,
+ const char* file_name,
+ ulint line)
+{
+ ;
+ ;
+
+
+
+ __sync_fetch_and_add(&(lock->reader_count),1);
+
+
+
+
+ lock->last_s_file_name = file_name;
+ lock->last_s_line = line;
+
+
+
+
+}
+
+
+
+
+
+static inline
+void
+rw_lock_x_lock_direct(
+
+ rw_lock_t* lock,
+ const char* file_name,
+ ulint line)
+{
+ ;
+ ;
+ ;
+
+ rw_lock_set_writer(lock, 351);
+ lock->writer_thread = os_thread_get_curr_id();
+
+ __sync_fetch_and_add(&(lock->writer_count),1);
+
+
+
+ lock->pass = 0;
+
+ lock->last_x_file_name = file_name;
+ lock->last_x_line = line;
+
+
+
+
+}
+
+
+
+
+
+
+
+static inline
+void
+rw_lock_s_lock_func(
+
+ rw_lock_t* lock,
+ ulint pass,
+
+ const char* file_name,
+ ulint line)
+{
+# 326 "./include/sync0rw.ic"
+ if (__builtin_expect(rw_lock_s_lock_low(lock, pass, file_name, line), (1))) {
+
+
+
+
+ return;
+ } else {
+
+
+
+
+
+ rw_lock_s_lock_spin(lock, pass, file_name, line);
+
+ return;
+ }
+}
+
+
+
+
+
+static inline
+ulint
+rw_lock_s_lock_func_nowait(
+
+
+ rw_lock_t* lock,
+ const char* file_name,
+ ulint line)
+{
+ ulint success = (0);
+
+
+ if (rw_lock_get_writer(lock) == 350) {
+
+ if(__sync_sub_and_fetch(&(lock->lock_word),1) <= 0) {
+
+ __sync_fetch_and_add(&(lock->lock_word),1);
+ return((0));
+ }
+
+ __sync_fetch_and_add(&(lock->reader_count),1);
+# 382 "./include/sync0rw.ic"
+ lock->last_s_file_name = file_name;
+ lock->last_s_line = line;
+
+ success = (1);
+ }
+
+
+
+
+
+ return(success);
+}
+
+
+
+
+
+static inline
+ulint
+rw_lock_x_lock_func_nowait(
+
+
+ rw_lock_t* lock,
+ const char* file_name,
+ ulint line)
+{
+ ulint success = (0);
+ os_thread_id_t curr_thread = os_thread_get_curr_id();
+
+ if (lock->reader_count == 0) {
+
+ if(__sync_lock_test_and_set(&(lock->writer),351)
+ == 350) {
+
+retry_x_lock:
+
+ if(__sync_sub_and_fetch(&(lock->lock_word),
+ 0x00100000) == 0) {
+
+ lock->writer_thread = curr_thread;
+ lock->pass = 0;
+ lock->writer_is_wait_ex = (0);
+
+ relock:
+ __sync_fetch_and_add(&(lock->writer_count),1);
+
+
+
+
+
+ lock->last_x_file_name = file_name;
+ lock->last_x_line = line;
+
+ ;
+
+ return((1));
+ } else {
+
+ if (__sync_fetch_and_add(&(lock->lock_word),0x00100000)
+ == 0)
+ goto retry_x_lock;
+ }
+
+ __sync_lock_test_and_set(&(lock->writer),350);
+ }
+ }
+
+ if (lock->pass == 0
+ && os_thread_eq(lock->writer_thread, curr_thread)) {
+ goto relock;
+ }
+
+
+
+ return((0));
+# 489 "./include/sync0rw.ic"
+}
+
+
+
+static inline
+void
+rw_lock_s_unlock_func(
+
+ rw_lock_t* lock
+
+
+
+
+ )
+{
+
+
+
+ ulint x_sg = (0);
+ ulint wx_sg = (0);
+
+ ulint last = (0);
+# 520 "./include/sync0rw.ic"
+ do { if (__builtin_expect(!((ulint)(lock->reader_count > 0)), (0))) { ut_dbg_assertion_failed("lock->reader_count > 0", "./include/sync0rw.ic", (ulint) 520); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("./include/sync0rw.ic", (ulint) 520); } while (0); } while (0);
+
+
+ __sync_fetch_and_add(&(lock->lock_word),1);
+
+ if(__sync_sub_and_fetch(&(lock->reader_count),1) == 0) {
+ last = (1);
+ }
+# 540 "./include/sync0rw.ic"
+ if (__builtin_expect(last && __sync_lock_test_and_set(&lock->wait_ex_waiters, 0), (0))) {
+ os_event_set(lock->wait_ex_event);
+ sync_array_object_signalled(sync_primary_wait_array);
+ }
+ else if (__builtin_expect(last && __sync_lock_test_and_set(&lock->x_waiters, 0), (0))) {
+ os_event_set(lock->x_event);
+ sync_array_object_signalled(sync_primary_wait_array);
+ }
+# 573 "./include/sync0rw.ic"
+ ;
+
+
+
+
+}
+
+
+
+
+static inline
+void
+rw_lock_s_unlock_direct(
+
+ rw_lock_t* lock)
+{
+
+
+ ;
+
+
+ __sync_sub_and_fetch(&(lock->reader_count),1);
+# 604 "./include/sync0rw.ic"
+ ;
+ ;
+
+
+
+ ;
+
+
+
+}
+
+
+
+static inline
+void
+rw_lock_x_unlock_func(
+
+ rw_lock_t* lock
+
+
+
+
+ )
+{
+
+ ulint last = (0);
+
+ ulint s_sg = (0);
+ ulint x_sg = (0);
+# 642 "./include/sync0rw.ic"
+ ;
+
+
+ if(__sync_sub_and_fetch(&(lock->writer_count),1) == 0) {
+ last = (1);
+ }
+
+ if (last) {
+
+ __sync_fetch_and_add(&(lock->lock_word),0x00100000);
+
+
+
+ lock->writer_thread = -1;
+ __sync_lock_test_and_set(&(lock->writer),350);
+ }
+# 672 "./include/sync0rw.ic"
+ if (last) {
+ if(__sync_lock_test_and_set(&lock->s_waiters, 0)){
+ s_sg = (1);
+ }
+ if(__sync_lock_test_and_set(&lock->x_waiters, 0)){
+ x_sg = (1);
+ }
+ }
+# 695 "./include/sync0rw.ic"
+ if (__builtin_expect(s_sg, (0))) {
+ os_event_set(lock->s_event);
+ sync_array_object_signalled(sync_primary_wait_array);
+ }
+ if (__builtin_expect(x_sg, (0))) {
+
+
+
+
+ os_event_set(lock->x_event);
+ sync_array_object_signalled(sync_primary_wait_array);
+ }
+
+ ;
+
+
+
+
+}
+
+
+
+
+static inline
+void
+rw_lock_x_unlock_direct(
+
+ rw_lock_t* lock)
+{
+
+
+
+ ;
+
+
+ if(__sync_sub_and_fetch(&(lock->writer_count),1) == 0) {
+
+
+
+
+
+ rw_lock_set_writer(lock, 350);
+ }
+
+
+
+
+
+
+ ;
+ ;
+
+
+
+ ;
+
+
+
+
+}
+# 526 "./include/sync0rw.h" 2
+# 14 "./include/fil0fil.h" 2
+# 1 "./include/dict0types.h" 1
+# 12 "./include/dict0types.h"
+typedef struct dict_sys_struct dict_sys_t;
+typedef struct dict_col_struct dict_col_t;
+typedef struct dict_field_struct dict_field_t;
+typedef struct dict_index_struct dict_index_t;
+typedef struct dict_tree_struct dict_tree_t;
+typedef struct dict_table_struct dict_table_t;
+typedef struct dict_foreign_struct dict_foreign_t;
+
+
+
+
+typedef dict_table_t dict_cluster_t;
+
+typedef struct ind_node_struct ind_node_t;
+typedef struct tab_node_struct tab_node_t;
+# 15 "./include/fil0fil.h" 2
+# 1 "./include/ibuf0types.h" 1
+# 12 "./include/ibuf0types.h"
+typedef struct ibuf_data_struct ibuf_data_t;
+typedef struct ibuf_struct ibuf_t;
+# 16 "./include/fil0fil.h" 2
+# 1 "./include/ut0byte.h" 1
+# 20 "./include/ut0byte.h"
+typedef struct dulint_struct dulint;
+struct dulint_struct{
+ ulint high;
+ ulint low;
+};
+
+
+extern dulint ut_dulint_zero;
+
+
+extern dulint ut_dulint_max;
+
+
+
+static inline
+dulint
+ut_dulint_create(
+
+
+ ulint high,
+ ulint low);
+
+
+static inline
+ulint
+ut_dulint_get_high(
+
+
+ dulint d);
+
+
+static inline
+ulint
+ut_dulint_get_low(
+
+
+ dulint d);
+
+
+
+static inline
+ib_longlong
+ut_conv_dulint_to_longlong(
+
+
+ dulint d);
+
+
+static inline
+ulint
+ut_dulint_is_zero(
+
+
+ dulint a);
+
+
+static inline
+int
+ut_dulint_cmp(
+
+
+
+ dulint a,
+ dulint b);
+
+
+static inline
+dulint
+ut_dulint_get_max(
+
+
+ dulint a,
+ dulint b);
+
+
+static inline
+dulint
+ut_dulint_get_min(
+
+
+ dulint a,
+ dulint b);
+
+
+static inline
+dulint
+ut_dulint_add(
+
+
+ dulint a,
+ ulint b);
+
+
+static inline
+dulint
+ut_dulint_subtract(
+
+
+ dulint a,
+ ulint b);
+
+
+
+static inline
+ulint
+ut_dulint_minus(
+
+
+ dulint a,
+
+ dulint b);
+
+
+static inline
+dulint
+ut_dulint_align_down(
+
+
+ dulint n,
+ ulint align_no);
+
+
+
+static inline
+dulint
+ut_dulint_align_up(
+
+
+ dulint n,
+ ulint align_no);
+# 168 "./include/ut0byte.h"
+void
+ut_dulint_sort(dulint* arr, dulint* aux_arr, ulint low, ulint high);
+
+
+
+
+
+static inline
+ulint
+ut_calc_align(
+
+
+ ulint n,
+ ulint align_no);
+
+
+
+
+static inline
+ulint
+ut_calc_align_down(
+
+
+ ulint n,
+ ulint align_no);
+
+
+static inline
+void*
+ut_align(
+
+
+ void* ptr,
+ ulint align_no);
+
+
+
+static inline
+void*
+ut_align_down(
+
+
+ void* ptr,
+ ulint align_no)
+ __attribute__((const));
+
+
+
+static inline
+ulint
+ut_align_offset(
+
+
+
+ const void* ptr,
+ ulint align_no)
+ __attribute__((const));
+
+
+static inline
+ulint
+ut_bit_get_nth(
+
+
+
+ ulint a,
+ ulint n);
+
+
+static inline
+ulint
+ut_bit_set_nth(
+
+
+ ulint a,
+ ulint n,
+ ulint val);
+
+
+# 1 "./include/ut0byte.ic" 1
+# 11 "./include/ut0byte.ic"
+static inline
+dulint
+ut_dulint_create(
+
+
+ ulint high,
+ ulint low)
+{
+ dulint res;
+
+ ;
+ ;
+
+ res.high = high;
+ res.low = low;
+
+ return(res);
+}
+
+
+
+static inline
+ulint
+ut_dulint_get_high(
+
+
+ dulint d)
+{
+ return(d.high);
+}
+
+
+
+static inline
+ulint
+ut_dulint_get_low(
+
+
+ dulint d)
+{
+ return(d.low);
+}
+
+
+
+
+static inline
+ib_longlong
+ut_conv_dulint_to_longlong(
+
+
+ dulint d)
+{
+ return((ib_longlong)d.low
+ + (((ib_longlong)d.high) << 32));
+}
+
+
+
+static inline
+ulint
+ut_dulint_is_zero(
+
+
+ dulint a)
+{
+ if ((a.low == 0) && (a.high == 0)) {
+
+ return((1));
+ }
+
+ return((0));
+}
+
+
+
+static inline
+int
+ut_dulint_cmp(
+
+
+
+ dulint a,
+ dulint b)
+{
+ if (a.high > b.high) {
+ return(1);
+ } else if (a.high < b.high) {
+ return(-1);
+ } else if (a.low > b.low) {
+ return(1);
+ } else if (a.low < b.low) {
+ return(-1);
+ } else {
+ return(0);
+ }
+}
+
+
+
+static inline
+dulint
+ut_dulint_get_max(
+
+
+ dulint a,
+ dulint b)
+{
+ if (ut_dulint_cmp(a, b) > 0) {
+
+ return(a);
+ }
+
+ return(b);
+}
+
+
+
+static inline
+dulint
+ut_dulint_get_min(
+
+
+ dulint a,
+ dulint b)
+{
+ if (ut_dulint_cmp(a, b) > 0) {
+
+ return(b);
+ }
+
+ return(a);
+}
+
+
+
+static inline
+dulint
+ut_dulint_add(
+
+
+ dulint a,
+ ulint b)
+{
+ if (0xFFFFFFFFUL - b >= a.low) {
+ a.low += b;
+
+ return(a);
+ }
+
+ a.low = a.low - (0xFFFFFFFFUL - b) - 1;
+
+ a.high++;
+
+ return(a);
+}
+
+
+
+static inline
+dulint
+ut_dulint_subtract(
+
+
+ dulint a,
+ ulint b)
+{
+ if (a.low >= b) {
+ a.low -= b;
+
+ return(a);
+ }
+
+ b -= a.low + 1;
+
+ a.low = 0xFFFFFFFFUL - b;
+
+ ;
+
+ a.high--;
+
+ return(a);
+}
+
+
+
+
+static inline
+ulint
+ut_dulint_minus(
+
+
+ dulint a,
+
+ dulint b)
+{
+ ulint diff;
+
+ if (a.high == b.high) {
+ ;
+
+ return(a.low - b.low);
+ }
+
+ ;
+
+ diff = (ulint)(0xFFFFFFFFUL - b.low);
+ diff += 1 + a.low;
+
+ ;
+
+ return(diff);
+}
+
+
+
+static inline
+dulint
+ut_dulint_align_down(
+
+
+ dulint n,
+ ulint align_no)
+
+{
+ ulint low, high;
+
+ ;
+ ;
+
+ low = ut_dulint_get_low(n);
+ high = ut_dulint_get_high(n);
+
+ low = low & ~(align_no - 1);
+
+ return(ut_dulint_create(high, low));
+}
+
+
+
+static inline
+dulint
+ut_dulint_align_up(
+
+
+ dulint n,
+ ulint align_no)
+
+{
+ return(ut_dulint_align_down(ut_dulint_add(n, align_no - 1), align_no));
+}
+
+
+
+
+
+static inline
+ulint
+ut_calc_align(
+
+
+ ulint n,
+ ulint align_no)
+{
+ ;
+ ;
+
+ return((n + align_no - 1) & ~(align_no - 1));
+}
+
+
+
+static inline
+void*
+ut_align(
+
+
+ void* ptr,
+ ulint align_no)
+{
+ ;
+ ;
+ ;
+
+ ;
+
+ return((void*)((((ulint)ptr) + align_no - 1) & ~(align_no - 1)));
+}
+
+
+
+
+
+static inline
+ulint
+ut_calc_align_down(
+
+
+ ulint n,
+ ulint align_no)
+{
+ ;
+ ;
+
+ return(n & ~(align_no - 1));
+}
+
+
+
+
+static inline
+void*
+ut_align_down(
+
+
+ void* ptr,
+ ulint align_no)
+{
+ ;
+ ;
+ ;
+
+ ;
+
+ return((void*)((((ulint)ptr)) & ~(align_no - 1)));
+}
+
+
+
+
+static inline
+ulint
+ut_align_offset(
+
+
+
+ const void* ptr,
+ ulint align_no)
+{
+ ;
+ ;
+ ;
+
+ ;
+
+ return(((ulint)ptr) & (align_no - 1));
+}
+
+
+
+static inline
+ulint
+ut_bit_get_nth(
+
+
+
+ ulint a,
+ ulint n)
+{
+ ;
+ ;
+
+ return(1 & (a >> n));
+}
+
+
+
+static inline
+ulint
+ut_bit_set_nth(
+
+
+ ulint a,
+ ulint n,
+ ulint val)
+{
+ ;
+ ;
+
+ if (val) {
+ return(((ulint) 1 << n) | a);
+ } else {
+ return(~((ulint) 1 << n) & a);
+ }
+}
+# 248 "./include/ut0byte.h" 2
+# 17 "./include/fil0fil.h" 2
+# 1 "./include/os0file.h" 1
+# 14 "./include/os0file.h"
+# 1 "./include/trx0types.h" 1
+# 12 "./include/trx0types.h"
+# 1 "./include/lock0types.h" 1
+# 13 "./include/lock0types.h"
+typedef struct lock_struct ib_lock_t;
+typedef struct lock_sys_struct lock_sys_t;
+# 13 "./include/trx0types.h" 2
+
+
+
+typedef struct trx_struct trx_t;
+typedef struct trx_sys_struct trx_sys_t;
+typedef struct trx_doublewrite_struct trx_doublewrite_t;
+typedef struct trx_sig_struct trx_sig_t;
+typedef struct trx_rseg_struct trx_rseg_t;
+typedef struct trx_undo_struct trx_undo_t;
+typedef struct trx_undo_arr_struct trx_undo_arr_t;
+typedef struct trx_undo_inf_struct trx_undo_inf_t;
+typedef struct trx_purge_struct trx_purge_t;
+typedef struct roll_node_struct roll_node_t;
+typedef struct commit_node_struct commit_node_t;
+typedef struct trx_named_savept_struct trx_named_savept_t;
+
+
+typedef struct trx_savept_struct trx_savept_t;
+struct trx_savept_struct{
+ dulint least_undo_no;
+};
+
+
+typedef unsigned char trx_sysf_t;
+typedef unsigned char trx_rsegf_t;
+typedef unsigned char trx_usegf_t;
+typedef unsigned char trx_ulogf_t;
+typedef unsigned char trx_upagef_t;
+
+
+typedef unsigned char trx_undo_rec_t;
+# 15 "./include/os0file.h" 2
+
+
+# 1 "/usr/include/dirent.h" 1 3 4
+# 28 "/usr/include/dirent.h" 3 4
+
+# 62 "/usr/include/dirent.h" 3 4
+# 1 "/usr/include/bits/dirent.h" 1 3 4
+# 23 "/usr/include/bits/dirent.h" 3 4
+struct dirent
+ {
+
+ __ino_t d_ino;
+ __off_t d_off;
+
+
+
+
+ unsigned short int d_reclen;
+ unsigned char d_type;
+ char d_name[256];
+ };
+
+
+struct dirent64
+ {
+ __ino64_t d_ino;
+ __off64_t d_off;
+ unsigned short int d_reclen;
+ unsigned char d_type;
+ char d_name[256];
+ };
+# 63 "/usr/include/dirent.h" 2 3 4
+# 98 "/usr/include/dirent.h" 3 4
+enum
+ {
+ DT_UNKNOWN = 0,
+
+ DT_FIFO = 1,
+
+ DT_CHR = 2,
+
+ DT_DIR = 4,
+
+ DT_BLK = 6,
+
+ DT_REG = 8,
+
+ DT_LNK = 10,
+
+ DT_SOCK = 12,
+
+ DT_WHT = 14
+
+ };
+# 128 "/usr/include/dirent.h" 3 4
+typedef struct __dirstream DIR;
+
+
+
+
+
+
+extern DIR *opendir (__const char *__name) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+
+extern DIR *fdopendir (int __fd);
+
+
+
+
+
+
+
+extern int closedir (DIR *__dirp) __attribute__ ((__nonnull__ (1)));
+# 163 "/usr/include/dirent.h" 3 4
+extern struct dirent *readdir (DIR *__dirp) __attribute__ ((__nonnull__ (1)));
+# 174 "/usr/include/dirent.h" 3 4
+extern struct dirent64 *readdir64 (DIR *__dirp) __attribute__ ((__nonnull__ (1)));
+# 184 "/usr/include/dirent.h" 3 4
+extern int readdir_r (DIR *__restrict __dirp,
+ struct dirent *__restrict __entry,
+ struct dirent **__restrict __result)
+ __attribute__ ((__nonnull__ (1, 2, 3)));
+# 201 "/usr/include/dirent.h" 3 4
+extern int readdir64_r (DIR *__restrict __dirp,
+ struct dirent64 *__restrict __entry,
+ struct dirent64 **__restrict __result)
+ __attribute__ ((__nonnull__ (1, 2, 3)));
+
+
+
+
+extern void rewinddir (DIR *__dirp) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+extern void seekdir (DIR *__dirp, long int __pos) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern long int telldir (DIR *__dirp) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+extern int dirfd (DIR *__dirp) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
+# 245 "/usr/include/dirent.h" 3 4
+# 1 "/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.4/include/stddef.h" 1 3 4
+# 246 "/usr/include/dirent.h" 2 3 4
+
+
+
+
+
+
+extern int scandir (__const char *__restrict __dir,
+ struct dirent ***__restrict __namelist,
+ int (*__selector) (__const struct dirent *),
+ int (*__cmp) (__const struct dirent **,
+ __const struct dirent **))
+ __attribute__ ((__nonnull__ (1, 2)));
+# 275 "/usr/include/dirent.h" 3 4
+extern int scandir64 (__const char *__restrict __dir,
+ struct dirent64 ***__restrict __namelist,
+ int (*__selector) (__const struct dirent64 *),
+ int (*__cmp) (__const struct dirent64 **,
+ __const struct dirent64 **))
+ __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+
+extern int alphasort (__const struct dirent **__e1,
+ __const struct dirent **__e2)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
+# 300 "/usr/include/dirent.h" 3 4
+extern int alphasort64 (__const struct dirent64 **__e1,
+ __const struct dirent64 **__e2)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
+# 313 "/usr/include/dirent.h" 3 4
+extern __ssize_t getdirentries (int __fd, char *__restrict __buf,
+ size_t __nbytes,
+ __off_t *__restrict __basep)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4)));
+# 330 "/usr/include/dirent.h" 3 4
+extern __ssize_t getdirentries64 (int __fd, char *__restrict __buf,
+ size_t __nbytes,
+ __off64_t *__restrict __basep)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4)));
+
+
+
+
+
+
+extern int versionsort (__const struct dirent **__e1,
+ __const struct dirent **__e2)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
+# 356 "/usr/include/dirent.h" 3 4
+extern int versionsort64 (__const struct dirent64 **__e1,
+ __const struct dirent64 **__e2)
+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+
+# 18 "./include/os0file.h" 2
+
+
+
+
+typedef struct fil_node_struct fil_node_t;
+
+
+
+
+extern ulint os_has_said_disk_full;
+extern ulint os_aio_print_debug;
+
+extern ulint os_file_n_pending_preads;
+extern ulint os_file_n_pending_pwrites;
+
+extern ulint os_n_pending_reads;
+extern ulint os_n_pending_writes;
+# 49 "./include/os0file.h"
+typedef int os_file_t;
+
+
+extern ulint os_innodb_umask;
+
+
+
+
+
+extern ulint os_aio_use_native_aio;
+# 138 "./include/os0file.h"
+extern ulint os_n_file_reads;
+extern ulint os_n_file_writes;
+extern ulint os_n_fsyncs;
+
+
+
+enum os_file_type_enum{
+ OS_FILE_TYPE_UNKNOWN = 0,
+ OS_FILE_TYPE_FILE,
+ OS_FILE_TYPE_DIR,
+ OS_FILE_TYPE_LINK
+};
+typedef enum os_file_type_enum os_file_type_t;
+# 159 "./include/os0file.h"
+struct os_file_stat_struct{
+ char name[4000];
+ os_file_type_t type;
+ ib_longlong size;
+ time_t ctime;
+ time_t mtime;
+ time_t atime;
+};
+typedef struct os_file_stat_struct os_file_stat_t;
+
+
+
+
+typedef DIR* os_file_dir_t;
+
+
+
+
+
+ulint
+os_get_os_version(void);
+
+
+
+
+
+void
+os_io_init_simple(void);
+
+
+
+
+FILE*
+os_file_create_tmpfile(void);
+# 201 "./include/os0file.h"
+os_file_dir_t
+os_file_opendir(
+
+
+
+ const char* dirname,
+
+ ulint error_is_fatal);
+
+
+
+
+
+
+
+int
+os_file_closedir(
+
+
+ os_file_dir_t dir);
+
+
+
+
+int
+os_file_readdir_next_file(
+
+
+
+ const char* dirname,
+ os_file_dir_t dir,
+ os_file_stat_t* info);
+
+
+
+
+
+
+ulint
+os_file_create_directory(
+
+
+
+ const char* pathname,
+
+ ulint fail_if_exists);
+
+
+
+
+os_file_t
+os_file_create_simple(
+
+
+
+
+ const char* name,
+
+ ulint create_mode,
+
+
+
+
+
+
+ ulint access_type,
+
+ ulint* success);
+
+
+
+os_file_t
+os_file_create_simple_no_error_handling(
+
+
+
+
+ const char* name,
+
+ ulint create_mode,
+
+
+
+ ulint access_type,
+
+
+
+ ulint* success);
+
+
+
+os_file_t
+os_file_create(
+
+
+
+
+ const char* name,
+
+ ulint create_mode,
+
+
+
+
+
+
+
+ ulint purpose,
+
+
+
+
+
+
+ ulint type,
+ ulint* success);
+
+
+
+ulint
+os_file_delete(
+
+
+ const char* name);
+
+
+
+
+ulint
+os_file_delete_if_exists(
+
+
+ const char* name);
+
+
+
+
+ulint
+os_file_rename(
+
+
+ const char* oldpath,
+
+ const char* newpath);
+
+
+
+
+ulint
+os_file_close(
+
+
+ os_file_t file);
+
+
+
+ulint
+os_file_close_no_error_handling(
+
+
+ os_file_t file);
+
+
+
+ulint
+os_file_get_size(
+
+
+ os_file_t file,
+ ulint* size,
+
+ ulint* size_high);
+
+
+
+ib_longlong
+os_file_get_size_as_iblonglong(
+
+
+ os_file_t file);
+
+
+
+ulint
+os_file_set_size(
+
+
+ const char* name,
+
+ os_file_t file,
+ ulint size,
+
+ ulint size_high);
+
+
+
+ulint
+os_file_set_eof(
+
+
+ FILE* file);
+
+
+
+ulint
+os_file_flush(
+
+
+ os_file_t file);
+
+
+
+
+
+
+ulint
+os_file_get_last_error(
+
+
+
+ ulint report_all_errors);
+
+
+
+
+
+
+
+ulint
+_os_file_read(
+
+
+
+ os_file_t file,
+ void* buf,
+ ulint offset,
+
+ ulint offset_high,
+
+ ulint n,
+ trx_t* trx);
+
+
+
+
+
+void
+os_file_read_string(
+
+ FILE* file,
+ char* str,
+ ulint size);
+
+
+
+
+ulint
+os_file_read_no_error_handling(
+
+
+
+ os_file_t file,
+ void* buf,
+ ulint offset,
+
+ ulint offset_high,
+
+ ulint n);
+
+
+
+
+ulint
+os_file_write(
+
+
+
+ const char* name,
+
+ os_file_t file,
+ const void* buf,
+ ulint offset,
+
+ ulint offset_high,
+
+ ulint n);
+
+
+
+ulint
+os_file_status(
+
+
+ const char* path,
+ ulint* exists,
+ os_file_type_t* type);
+# 525 "./include/os0file.h"
+char*
+os_file_dirname(
+
+
+
+ const char* path);
+
+
+
+ulint
+os_file_create_subdirs_if_needed(
+
+
+
+ const char* path);
+# 549 "./include/os0file.h"
+void
+os_aio_init(
+
+ ulint n,
+
+
+
+ ulint n_read_threads,
+ ulint n_write_threads,
+ ulint n_slots_sync);
+
+
+
+ulint
+os_aio(
+
+
+
+ ulint type,
+ ulint mode,
+# 581 "./include/os0file.h"
+ const char* name,
+
+ os_file_t file,
+ void* buf,
+
+ ulint offset,
+
+ ulint offset_high,
+
+ ulint n,
+ fil_node_t* message1,
+
+
+
+ void* message2,
+ trx_t* trx);
+
+
+
+
+void
+os_aio_wake_all_threads_at_shutdown(void);
+
+
+
+
+
+void
+os_aio_wait_until_no_pending_writes(void);
+
+
+
+
+void
+os_aio_simulated_wake_handler_threads(void);
+
+
+
+
+
+
+
+void
+os_aio_simulated_put_read_threads_to_sleep(void);
+# 681 "./include/os0file.h"
+ulint
+os_aio_simulated_handle(
+
+
+ ulint segment,
+
+
+
+
+ fil_node_t**message1,
+
+
+
+
+ void** message2,
+ ulint* type);
+
+
+
+ulint
+os_aio_validate(void);
+
+
+
+
+
+void
+os_aio_print(
+
+ FILE* file);
+
+
+
+void
+os_aio_refresh_stats(void);
+# 730 "./include/os0file.h"
+ulint
+os_file_get_status(
+
+
+ const char* path,
+ os_file_stat_t* stat_info);
+# 18 "./include/fil0fil.h" 2
+
+
+
+
+extern const char* fil_path_to_mysql_datadir;
+# 34 "./include/fil0fil.h"
+typedef unsigned char fil_faddr_t;
+# 44 "./include/fil0fil.h"
+typedef struct fil_addr_struct fil_addr_t;
+struct fil_addr_struct{
+ ulint page;
+ ulint boffset;
+};
+
+
+extern fil_addr_t fil_addr_null;
+# 92 "./include/fil0fil.h"
+extern ulint fil_n_log_flushes;
+
+extern ulint fil_n_pending_log_flushes;
+extern ulint fil_n_pending_tablespace_flushes;
+
+
+
+
+
+ib_longlong
+fil_space_get_version(
+
+
+
+ ulint id);
+
+
+
+rw_lock_t*
+fil_space_get_latch(
+
+
+ ulint id);
+
+
+
+ulint
+fil_space_get_type(
+
+
+ ulint id);
+
+
+
+ibuf_data_t*
+fil_space_get_ibuf_data(
+
+
+ ulint id);
+
+
+
+void
+fil_node_create(
+
+ const char* name,
+ ulint size,
+
+ ulint id,
+ ulint is_raw);
+
+
+
+
+
+void
+fil_space_truncate_start(
+
+ ulint id,
+ ulint trunc_len);
+
+
+
+
+
+
+ulint
+fil_space_create(
+
+
+ const char* name,
+ ulint id,
+ ulint purpose);
+
+
+
+
+ulint
+fil_space_free(
+
+
+ ulint id);
+
+
+
+
+ulint
+fil_space_get_size(
+
+
+ ulint id);
+
+
+
+
+ulint
+fil_check_adress_in_tablespace(
+
+
+ ulint id,
+ ulint page_no);
+
+
+
+void
+fil_init(
+
+ ulint max_n_open);
+
+
+
+void
+fil_print(
+
+ FILE* file);
+
+
+
+
+
+
+
+void
+fil_open_log_and_system_tablespace_files(void);
+
+
+
+
+
+void
+fil_close_all_files(void);
+
+
+
+
+
+void
+fil_set_max_space_id_if_bigger(
+
+ ulint max_id);
+
+
+
+
+
+void
+fil_ibuf_init_at_db_start(void);
+
+
+
+
+
+ulint
+fil_write_flushed_lsn_to_data_files(
+
+
+ dulint lsn,
+ ulint arch_log_no);
+
+
+
+
+void
+fil_read_flushed_lsn_and_arch_log_no(
+
+ os_file_t data_file,
+ ulint one_read_already,
+
+
+
+
+
+ dulint* min_flushed_lsn,
+ dulint* max_flushed_lsn);
+
+
+
+
+ulint
+fil_inc_pending_ibuf_merges(
+
+
+
+ ulint id);
+
+
+
+void
+fil_decr_pending_ibuf_merges(
+
+ ulint id);
+# 296 "./include/fil0fil.h"
+unsigned char*
+fil_op_log_parse_or_replay(
+
+
+
+
+ unsigned char* ptr,
+
+
+ unsigned char* end_ptr,
+ ulint type,
+ ulint do_replay,
+
+ ulint space_id);
+
+
+
+
+
+
+ulint
+fil_delete_tablespace(
+
+
+ ulint id);
+# 330 "./include/fil0fil.h"
+ulint
+fil_discard_tablespace(
+
+
+ ulint id);
+
+
+
+
+ulint
+fil_rename_tablespace(
+
+
+ const char* old_name,
+
+
+
+ ulint id,
+ const char* new_name);
+# 359 "./include/fil0fil.h"
+ulint
+fil_create_new_single_table_tablespace(
+
+
+ ulint* space_id,
+
+
+ const char* tablename,
+
+
+
+ ulint is_temp,
+
+ ulint size);
+# 385 "./include/fil0fil.h"
+ulint
+fil_open_single_table_tablespace(
+
+
+ ulint check_space_id,
+
+
+
+
+
+
+ ulint id,
+ const char* name);
+# 409 "./include/fil0fil.h"
+ulint
+fil_reset_too_high_lsns(
+
+
+ const char* name,
+
+ dulint current_lsn);
+# 426 "./include/fil0fil.h"
+ulint
+fil_load_single_table_tablespaces(void);
+# 437 "./include/fil0fil.h"
+void
+fil_print_orphaned_tablespaces(void);
+
+
+
+
+
+ulint
+fil_tablespace_deleted_or_being_deleted_in_mem(
+
+
+
+ ulint id,
+ ib_longlong version);
+
+
+
+
+
+ulint
+fil_tablespace_exists_in_mem(
+
+
+ ulint id);
+
+
+
+
+
+ulint
+fil_space_for_table_exists_in_mem(
+
+
+
+ ulint id,
+ const char* name,
+
+
+ ulint is_temp,
+
+ ulint mark_space,
+
+
+
+
+
+ ulint print_error_if_does_not_exist);
+# 493 "./include/fil0fil.h"
+ulint
+fil_extend_space_to_desired_size(
+
+
+ ulint* actual_size,
+
+
+ ulint space_id,
+ ulint size_after_extend);
+# 518 "./include/fil0fil.h"
+ulint
+fil_space_reserve_free_extents(
+
+
+ ulint id,
+ ulint n_free_now,
+ ulint n_to_reserve);
+
+
+
+void
+fil_space_release_free_extents(
+
+ ulint id,
+ ulint n_reserved);
+
+
+
+
+ulint
+fil_space_get_n_reserved_extents(
+
+ ulint id);
+
+
+
+
+
+
+ulint
+_fil_io(
+
+
+
+
+ ulint type,
+# 562 "./include/fil0fil.h"
+ ulint sync,
+ ulint space_id,
+ ulint block_offset,
+ ulint byte_offset,
+
+
+ ulint len,
+
+
+ void* buf,
+
+
+ void* message,
+
+ trx_t* trx);
+
+
+
+
+
+ulint
+fil_read(
+
+
+
+
+ ulint sync,
+ ulint space_id,
+ ulint block_offset,
+ ulint byte_offset,
+
+ ulint len,
+
+
+ void* buf,
+
+ void* message);
+
+
+
+
+
+
+ulint
+fil_write(
+
+
+
+
+ ulint sync,
+ ulint space_id,
+ ulint block_offset,
+ ulint byte_offset,
+
+ ulint len,
+
+
+ void* buf,
+
+ void* message);
+
+
+
+
+
+
+
+void
+fil_aio_wait(
+
+ ulint segment);
+
+
+
+typedef enum {
+ FLUSH_FROM_DIRTY_BUFFER,
+ FLUSH_FROM_OTHER,
+ FLUSH_FROM_CHECKPOINT,
+ FLUSH_FROM_LOG_IO_COMPLETE,
+ FLUSH_FROM_LOG_WRITE_UP_TO,
+ FLUSH_FROM_ARCHIVE,
+ FLUSH_FROM_NUMBER
+} flush_from_type;
+
+
+
+
+void
+fil_flush(
+
+ ulint space_id,
+
+ flush_from_type flush_type);
+
+
+
+
+void
+fil_flush_file_spaces(
+
+ ulint purpose,
+ flush_from_type flush_type);
+
+
+
+ulint
+fil_validate(void);
+
+
+
+
+
+ulint
+fil_addr_is_null(
+
+
+ fil_addr_t addr);
+
+
+
+ulint
+fil_page_get_prev(unsigned char* page);
+ulint
+fil_page_get_next(unsigned char* page);
+
+
+
+void
+fil_page_set_type(
+
+ unsigned char* page,
+ ulint type);
+
+
+
+ulint
+fil_page_get_type(
+
+
+
+ unsigned char* page);
+
+
+
+
+ulint
+fil_system_hash_cells(void);
+
+
+ulint
+fil_system_hash_nodes(void);
+
+
+typedef struct fil_space_struct fil_space_t;
+# 28 "./include/buf0buf.h" 2
+# 1 "./include/mtr0types.h" 1
+# 12 "./include/mtr0types.h"
+typedef struct mtr_struct mtr_t;
+# 29 "./include/buf0buf.h" 2
+# 1 "./include/buf0types.h" 1
+# 12 "./include/buf0types.h"
+typedef struct buf_block_struct buf_block_t;
+typedef struct buf_pool_struct buf_pool_t;
+
+typedef struct buf_io_counter_struct buf_io_counter_t;
+
+
+typedef unsigned char buf_frame_t;
+# 30 "./include/buf0buf.h" 2
+
+# 1 "./include/hash0hash.h" 1
+# 13 "./include/hash0hash.h"
+# 1 "./include/mem0mem.h" 1
+# 16 "./include/mem0mem.h"
+# 1 "./include/ut0rnd.h" 1
+# 22 "./include/ut0rnd.h"
+static inline
+void
+ut_rnd_set_seed(
+
+ ulint seed);
+
+
+static inline
+ulint
+ut_rnd_gen_next_ulint(
+
+
+ ulint rnd);
+
+
+
+
+
+static inline
+ulint
+ut_rnd_gen_ulint(void);
+
+
+
+
+static inline
+ulint
+ut_rnd_interval(
+
+
+ ulint low,
+ ulint high);
+
+
+static inline
+ulint
+ut_rnd_gen_ibool(void);
+
+
+
+
+
+
+static inline
+ulint
+ut_hash_ulint(
+
+
+ ulint key,
+ ulint table_size);
+
+
+static inline
+ulint
+ut_fold_ulint_pair(
+
+
+ ulint n1,
+ ulint n2);
+
+
+static inline
+ulint
+ut_fold_dulint(
+
+
+ dulint d);
+
+
+static inline
+ulint
+ut_fold_string(
+
+
+ const char* str);
+
+
+static inline
+ulint
+ut_fold_binary(
+
+
+ const unsigned char* str,
+ ulint len);
+
+
+
+
+ulint
+ut_find_prime(
+
+
+ ulint n);
+
+
+
+# 1 "./include/ut0rnd.ic" 1
+# 21 "./include/ut0rnd.ic"
+extern ulint ut_rnd_ulint_counter;
+
+
+
+static inline
+void
+ut_rnd_set_seed(
+
+ ulint seed)
+{
+ ut_rnd_ulint_counter = seed;
+}
+
+
+
+static inline
+ulint
+ut_rnd_gen_next_ulint(
+
+
+ ulint rnd)
+{
+ ulint n_bits;
+
+ n_bits = 8 * sizeof(ulint);
+
+ rnd = 119785373 * rnd + 126792457;
+ rnd = 187678878 ^ rnd;
+ rnd = (rnd << 20) + (rnd >> (n_bits - 20));
+ rnd = 85689495 * rnd + 63498502;
+ rnd = 143537923 ^ rnd;
+ rnd = (rnd << 20) + (rnd >> (n_bits - 20));
+ rnd = 151117737 * rnd + 98781234;
+
+ return(rnd);
+}
+
+
+
+
+
+
+static inline
+ulint
+ut_rnd_gen_ulint(void)
+
+
+{
+ ulint rnd;
+ ulint n_bits;
+
+ n_bits = 8 * sizeof(ulint);
+
+ ut_rnd_ulint_counter =
+ 151117737 * ut_rnd_ulint_counter + 119785373;
+
+ rnd = ut_rnd_gen_next_ulint(ut_rnd_ulint_counter);
+
+ return(rnd);
+}
+
+
+
+static inline
+ulint
+ut_rnd_interval(
+
+
+ ulint low,
+ ulint high)
+{
+ ulint rnd;
+
+ ;
+
+ if (low == high) {
+
+ return(low);
+ }
+
+ rnd = ut_rnd_gen_ulint();
+
+ return(low + (rnd % (high - low + 1)));
+}
+
+
+
+static inline
+ulint
+ut_rnd_gen_ibool(void)
+
+
+{
+ ulint x;
+
+ x = ut_rnd_gen_ulint();
+
+ if (((x >> 20) + (x >> 15)) & 1) {
+
+ return((1));
+ }
+
+ return((0));
+}
+
+
+
+
+
+static inline
+ulint
+ut_hash_ulint(
+
+
+ ulint key,
+ ulint table_size)
+{
+ key = key ^ 1653893711;
+
+ return(key % table_size);
+}
+
+
+
+static inline
+ulint
+ut_fold_ulint_pair(
+
+
+ ulint n1,
+ ulint n2)
+{
+ return(((((n1 ^ n2 ^ 1653893711) << 8) + n1)
+ ^ 1463735687) + n2);
+}
+
+
+
+static inline
+ulint
+ut_fold_dulint(
+
+
+ dulint d)
+{
+ return(ut_fold_ulint_pair(ut_dulint_get_low(d),
+ ut_dulint_get_high(d)));
+}
+
+
+
+static inline
+ulint
+ut_fold_string(
+
+
+ const char* str)
+{
+
+
+
+ ulint fold = 0;
+
+ ;
+
+ while (*str != '\0') {
+
+
+
+
+
+
+ fold = ut_fold_ulint_pair(fold, (ulint)(*str));
+ str++;
+ }
+
+ return(fold);
+}
+
+
+
+static inline
+ulint
+ut_fold_binary(
+
+
+ const unsigned char* str,
+ ulint len)
+{
+ const unsigned char* str_end = str + len;
+ ulint fold = 0;
+
+ ;
+
+ while (str < str_end) {
+ fold = ut_fold_ulint_pair(fold, (ulint)(*str));
+
+ str++;
+ }
+
+ return(fold);
+}
+# 119 "./include/ut0rnd.h" 2
+# 17 "./include/mem0mem.h" 2
+
+
+# 1 "./include/mach0data.h" 1
+# 23 "./include/mach0data.h"
+static inline
+void
+mach_write_to_1(
+
+ unsigned char* b,
+ ulint n);
+
+
+static inline
+ulint
+mach_read_from_1(
+
+
+ unsigned char* b);
+
+
+
+static inline
+void
+mach_write_to_2(
+
+ unsigned char* b,
+ ulint n);
+
+
+
+static inline
+ulint
+mach_read_from_2(
+
+
+ unsigned char* b);
+
+
+
+
+
+static inline
+uint16
+mach_encode_2(
+
+
+ ulint n);
+
+
+
+
+static inline
+ulint
+mach_decode_2(
+
+
+ uint16 n);
+
+
+
+static inline
+void
+mach_write_to_3(
+
+ unsigned char* b,
+ ulint n);
+
+
+
+static inline
+ulint
+mach_read_from_3(
+
+
+ unsigned char* b);
+
+
+
+static inline
+void
+mach_write_to_4(
+
+ unsigned char* b,
+ ulint n);
+
+
+
+static inline
+ulint
+mach_read_from_4(
+
+
+ unsigned char* b);
+
+
+static inline
+ulint
+mach_write_compressed(
+
+
+ unsigned char* b,
+ ulint n);
+
+
+static inline
+ulint
+mach_get_compressed_size(
+
+
+ ulint n);
+
+
+static inline
+ulint
+mach_read_compressed(
+
+
+ unsigned char* b);
+
+
+
+static inline
+void
+mach_write_to_6(
+
+ unsigned char* b,
+ dulint n);
+
+
+
+static inline
+dulint
+mach_read_from_6(
+
+
+ unsigned char* b);
+
+
+
+static inline
+void
+mach_write_to_7(
+
+ unsigned char* b,
+ dulint n);
+
+
+
+static inline
+dulint
+mach_read_from_7(
+
+
+ unsigned char* b);
+
+
+
+static inline
+void
+mach_write_to_8(
+
+ unsigned char* b,
+ dulint n);
+
+
+
+static inline
+dulint
+mach_read_from_8(
+
+
+ unsigned char* b);
+
+
+static inline
+ulint
+mach_dulint_write_compressed(
+
+
+ unsigned char* b,
+ dulint n);
+
+
+static inline
+ulint
+mach_dulint_get_compressed_size(
+
+
+ dulint n);
+
+
+static inline
+dulint
+mach_dulint_read_compressed(
+
+
+ unsigned char* b);
+
+
+static inline
+ulint
+mach_dulint_write_much_compressed(
+
+
+ unsigned char* b,
+ dulint n);
+
+
+static inline
+ulint
+mach_dulint_get_much_compressed_size(
+
+
+ dulint n);
+
+
+static inline
+dulint
+mach_dulint_read_much_compressed(
+
+
+ unsigned char* b);
+
+
+
+unsigned char*
+mach_parse_compressed(
+
+
+
+ unsigned char* ptr,
+ unsigned char* end_ptr,
+ ulint* val);
+
+
+
+unsigned char*
+mach_dulint_parse_compressed(
+
+
+
+ unsigned char* ptr,
+ unsigned char* end_ptr,
+ dulint* val);
+
+
+static inline
+double
+mach_double_read(
+
+
+ unsigned char* b);
+
+
+static inline
+void
+mach_double_write(
+
+ unsigned char* b,
+ double d);
+
+
+static inline
+float
+mach_float_read(
+
+
+ unsigned char* b);
+
+
+static inline
+void
+mach_float_write(
+
+ unsigned char* b,
+ float d);
+
+
+static inline
+ulint
+mach_read_from_n_little_endian(
+
+
+ unsigned char* buf,
+ ulint buf_size);
+
+
+static inline
+void
+mach_write_to_n_little_endian(
+
+ unsigned char* dest,
+ ulint dest_size,
+ ulint n);
+
+
+static inline
+ulint
+mach_read_from_2_little_endian(
+
+
+ unsigned char* buf);
+
+
+static inline
+void
+mach_write_to_2_little_endian(
+
+ unsigned char* dest,
+ ulint n);
+
+
+# 1 "./include/mach0data.ic" 1
+# 12 "./include/mach0data.ic"
+static inline
+void
+mach_write_to_1(
+
+ unsigned char* b,
+ ulint n)
+{
+ ;
+ ;
+
+ b[0] = (unsigned char)n;
+}
+
+
+
+static inline
+ulint
+mach_read_from_1(
+
+
+ unsigned char* b)
+{
+ ;
+ return((ulint)(b[0]));
+}
+
+
+
+
+static inline
+void
+mach_write_to_2(
+
+ unsigned char* b,
+ ulint n)
+{
+ ;
+ ;
+
+ b[0] = (unsigned char)(n >> 8);
+ b[1] = (unsigned char)(n);
+}
+
+
+
+
+static inline
+ulint
+mach_read_from_2(
+
+
+ unsigned char* b)
+{
+ ;
+ return( ((ulint)(b[0]) << 8)
+ + (ulint)(b[1])
+ );
+}
+
+
+
+
+
+static inline
+uint16
+mach_encode_2(
+
+
+ ulint n)
+{
+ uint16 ret;
+ ;
+ mach_write_to_2((unsigned char*) &ret, n);
+ return(ret);
+}
+
+
+
+
+static inline
+ulint
+mach_decode_2(
+
+
+ uint16 n)
+{
+ ;
+ return(mach_read_from_2((unsigned char*) &n));
+}
+
+
+
+
+static inline
+void
+mach_write_to_3(
+
+ unsigned char* b,
+ ulint n)
+{
+ ;
+ ;
+
+ b[0] = (unsigned char)(n >> 16);
+ b[1] = (unsigned char)(n >> 8);
+ b[2] = (unsigned char)(n);
+}
+
+
+
+
+static inline
+ulint
+mach_read_from_3(
+
+
+ unsigned char* b)
+{
+ ;
+ return( ((ulint)(b[0]) << 16)
+ + ((ulint)(b[1]) << 8)
+ + (ulint)(b[2])
+ );
+}
+
+
+
+
+static inline
+void
+mach_write_to_4(
+
+ unsigned char* b,
+ ulint n)
+{
+ ;
+# 160 "./include/mach0data.ic"
+ b[0] = (unsigned char)(n >> 24);
+ b[1] = (unsigned char)(n >> 16);
+ b[2] = (unsigned char)(n >> 8);
+ b[3] = (unsigned char)n;
+
+}
+
+
+
+
+static inline
+ulint
+mach_read_from_4(
+
+
+ unsigned char* b)
+{
+# 192 "./include/mach0data.ic"
+ ;
+ return( ((ulint)(b[0]) << 24)
+ + ((ulint)(b[1]) << 16)
+ + ((ulint)(b[2]) << 8)
+ + (ulint)(b[3])
+ );
+
+}
+# 208 "./include/mach0data.ic"
+static inline
+ulint
+mach_write_compressed(
+
+
+ unsigned char* b,
+ ulint n)
+{
+ ;
+
+ if (n < 0x80UL) {
+ mach_write_to_1(b, n);
+ return(1);
+ } else if (n < 0x4000UL) {
+ mach_write_to_2(b, n | 0x8000UL);
+ return(2);
+ } else if (n < 0x200000UL) {
+ mach_write_to_3(b, n | 0xC00000UL);
+ return(3);
+ } else if (n < 0x10000000UL) {
+ mach_write_to_4(b, n | 0xE0000000UL);
+ return(4);
+ } else {
+ mach_write_to_1(b, 0xF0UL);
+ mach_write_to_4(b + 1, n);
+ return(5);
+ }
+}
+
+
+
+static inline
+ulint
+mach_get_compressed_size(
+
+
+ ulint n)
+{
+ if (n < 0x80UL) {
+ return(1);
+ } else if (n < 0x4000UL) {
+ return(2);
+ } else if (n < 0x200000UL) {
+ return(3);
+ } else if (n < 0x10000000UL) {
+ return(4);
+ } else {
+ return(5);
+ }
+}
+
+
+
+static inline
+ulint
+mach_read_compressed(
+
+
+ unsigned char* b)
+{
+ ulint flag;
+
+ ;
+
+ flag = mach_read_from_1(b);
+
+ if (flag < 0x80UL) {
+ return(flag);
+ } else if (flag < 0xC0UL) {
+ return(mach_read_from_2(b) & 0x7FFFUL);
+ } else if (flag < 0xE0UL) {
+ return(mach_read_from_3(b) & 0x3FFFFFUL);
+ } else if (flag < 0xF0UL) {
+ return(mach_read_from_4(b) & 0x1FFFFFFFUL);
+ } else {
+ ;
+ return(mach_read_from_4(b + 1));
+ }
+}
+
+
+
+
+static inline
+void
+mach_write_to_8(
+
+ unsigned char* b,
+ dulint n)
+{
+ ;
+
+ mach_write_to_4(b, ut_dulint_get_high(n));
+ mach_write_to_4(b + 4, ut_dulint_get_low(n));
+}
+
+
+
+
+static inline
+dulint
+mach_read_from_8(
+
+
+ unsigned char* b)
+{
+ ulint high;
+ ulint low;
+
+ ;
+
+ high = mach_read_from_4(b);
+ low = mach_read_from_4(b + 4);
+
+ return(ut_dulint_create(high, low));
+}
+
+
+
+
+static inline
+void
+mach_write_to_7(
+
+ unsigned char* b,
+ dulint n)
+{
+ ;
+
+ mach_write_to_3(b, ut_dulint_get_high(n));
+ mach_write_to_4(b + 3, ut_dulint_get_low(n));
+}
+
+
+
+
+static inline
+dulint
+mach_read_from_7(
+
+
+ unsigned char* b)
+{
+ ulint high;
+ ulint low;
+
+ ;
+
+ high = mach_read_from_3(b);
+ low = mach_read_from_4(b + 3);
+
+ return(ut_dulint_create(high, low));
+}
+
+
+
+
+static inline
+void
+mach_write_to_6(
+
+ unsigned char* b,
+ dulint n)
+{
+ ;
+
+ mach_write_to_2(b, ut_dulint_get_high(n));
+ mach_write_to_4(b + 2, ut_dulint_get_low(n));
+}
+
+
+
+
+static inline
+dulint
+mach_read_from_6(
+
+
+ unsigned char* b)
+{
+ ulint high;
+ ulint low;
+
+ ;
+
+ high = mach_read_from_2(b);
+ low = mach_read_from_4(b + 2);
+
+ return(ut_dulint_create(high, low));
+}
+
+
+
+static inline
+ulint
+mach_dulint_write_compressed(
+
+
+ unsigned char* b,
+ dulint n)
+{
+ ulint size;
+
+ ;
+
+ size = mach_write_compressed(b, ut_dulint_get_high(n));
+ mach_write_to_4(b + size, ut_dulint_get_low(n));
+
+ return(size + 4);
+}
+
+
+
+static inline
+ulint
+mach_dulint_get_compressed_size(
+
+
+ dulint n)
+{
+ return(4 + mach_get_compressed_size(ut_dulint_get_high(n)));
+}
+
+
+
+static inline
+dulint
+mach_dulint_read_compressed(
+
+
+ unsigned char* b)
+{
+ ulint high;
+ ulint low;
+ ulint size;
+
+ ;
+
+ high = mach_read_compressed(b);
+
+ size = mach_get_compressed_size(high);
+
+ low = mach_read_from_4(b + size);
+
+ return(ut_dulint_create(high, low));
+}
+
+
+
+static inline
+ulint
+mach_dulint_write_much_compressed(
+
+
+ unsigned char* b,
+ dulint n)
+{
+ ulint size;
+
+ ;
+
+ if (ut_dulint_get_high(n) == 0) {
+ return(mach_write_compressed(b, ut_dulint_get_low(n)));
+ }
+
+ *b = (unsigned char)0xFF;
+ size = 1 + mach_write_compressed(b + 1, ut_dulint_get_high(n));
+
+ size += mach_write_compressed(b + size, ut_dulint_get_low(n));
+
+ return(size);
+}
+
+
+
+static inline
+ulint
+mach_dulint_get_much_compressed_size(
+
+
+ dulint n)
+{
+ if (0 == ut_dulint_get_high(n)) {
+ return(mach_get_compressed_size(ut_dulint_get_low(n)));
+ }
+
+ return(1 + mach_get_compressed_size(ut_dulint_get_high(n))
+ + mach_get_compressed_size(ut_dulint_get_low(n)));
+}
+
+
+
+static inline
+dulint
+mach_dulint_read_much_compressed(
+
+
+ unsigned char* b)
+{
+ ulint high;
+ ulint low;
+ ulint size;
+
+ ;
+
+ if (*b != (unsigned char)0xFF) {
+ high = 0;
+ size = 0;
+ } else {
+ high = mach_read_compressed(b + 1);
+
+ size = 1 + mach_get_compressed_size(high);
+ }
+
+ low = mach_read_compressed(b + size);
+
+ return(ut_dulint_create(high, low));
+}
+
+
+
+static inline
+double
+mach_double_read(
+
+
+ unsigned char* b)
+{
+ double d;
+ ulint i;
+ unsigned char* ptr;
+
+ ptr = (unsigned char*)&d;
+
+ for (i = 0; i < sizeof(double); i++) {
+
+ ptr[sizeof(double) - i - 1] = b[i];
+
+
+
+ }
+
+ return(d);
+}
+
+
+
+static inline
+void
+mach_double_write(
+
+ unsigned char* b,
+ double d)
+{
+ ulint i;
+ unsigned char* ptr;
+
+ ptr = (unsigned char*)&d;
+
+ for (i = 0; i < sizeof(double); i++) {
+
+ b[i] = ptr[sizeof(double) - i - 1];
+
+
+
+ }
+}
+
+
+
+static inline
+float
+mach_float_read(
+
+
+ unsigned char* b)
+{
+ float d;
+ ulint i;
+ unsigned char* ptr;
+
+ ptr = (unsigned char*)&d;
+
+ for (i = 0; i < sizeof(float); i++) {
+
+ ptr[sizeof(float) - i - 1] = b[i];
+
+
+
+ }
+
+ return(d);
+}
+
+
+
+static inline
+void
+mach_float_write(
+
+ unsigned char* b,
+ float d)
+{
+ ulint i;
+ unsigned char* ptr;
+
+ ptr = (unsigned char*)&d;
+
+ for (i = 0; i < sizeof(float); i++) {
+
+ b[i] = ptr[sizeof(float) - i - 1];
+
+
+
+ }
+}
+
+
+
+static inline
+ulint
+mach_read_from_n_little_endian(
+
+
+ unsigned char* buf,
+ ulint buf_size)
+{
+ ulint n = 0;
+ unsigned char* ptr;
+
+ ;
+ ;
+
+ ptr = buf + buf_size;
+
+ for (;;) {
+ ptr--;
+
+ n = n << 8;
+
+ n += (ulint)(*ptr);
+
+ if (ptr == buf) {
+ break;
+ }
+ }
+
+ return(n);
+}
+
+
+
+static inline
+void
+mach_write_to_n_little_endian(
+
+ unsigned char* dest,
+ ulint dest_size,
+ ulint n)
+{
+ unsigned char* end;
+
+ ;
+ ;
+
+ end = dest + dest_size;
+
+ for (;;) {
+ *dest = (unsigned char)(n & 0xFF);
+
+ n = n >> 8;
+
+ dest++;
+
+ if (dest == end) {
+ break;
+ }
+ }
+
+ ;
+}
+
+
+
+static inline
+ulint
+mach_read_from_2_little_endian(
+
+
+ unsigned char* buf)
+{
+ return((ulint)(*buf) + ((ulint)(*(buf + 1))) * 256);
+}
+
+
+
+static inline
+void
+mach_write_to_2_little_endian(
+
+ unsigned char* dest,
+ ulint n)
+{
+ ;
+
+ *dest = (unsigned char)(n & 0xFFUL);
+
+ n = n >> 8;
+ dest++;
+
+ *dest = (unsigned char)(n & 0xFFUL);
+}
+# 332 "./include/mach0data.h" 2
+# 20 "./include/mem0mem.h" 2
+
+
+
+
+typedef struct mem_block_info_struct mem_block_info_t;
+
+
+
+typedef mem_block_info_t mem_block_t;
+
+
+typedef mem_block_t mem_heap_t;
+# 57 "./include/mem0mem.h"
+void
+mem_init(
+
+ ulint size);
+# 103 "./include/mem0mem.h"
+static inline
+mem_heap_t*
+mem_heap_create_func(
+
+
+ ulint n,
+
+
+
+
+
+ void* init_block,
+# 124 "./include/mem0mem.h"
+ ulint type,
+
+ const char* file_name,
+ ulint line
+ );
+
+
+
+
+static inline
+void
+mem_heap_free_func(
+
+ mem_heap_t* heap,
+ const char* file_name,
+ ulint line);
+
+
+static inline
+void*
+mem_heap_alloc(
+
+
+
+ mem_heap_t* heap,
+ ulint n);
+
+
+
+
+static inline
+unsigned char*
+mem_heap_get_heap_top(
+
+
+ mem_heap_t* heap);
+
+
+
+
+static inline
+void
+mem_heap_free_heap_top(
+
+ mem_heap_t* heap,
+ unsigned char* old_top);
+
+
+static inline
+void
+mem_heap_empty(
+
+ mem_heap_t* heap);
+
+
+
+static inline
+void*
+mem_heap_get_top(
+
+
+ mem_heap_t* heap,
+ ulint n);
+
+
+
+static inline
+void
+mem_heap_free_top(
+
+ mem_heap_t* heap,
+ ulint n);
+
+
+static inline
+ulint
+mem_heap_get_size(
+
+ mem_heap_t* heap);
+# 219 "./include/mem0mem.h"
+static inline
+void*
+mem_alloc_func(
+
+
+
+ ulint n,
+ const char* file_name,
+ ulint line
+);
+
+
+
+
+
+
+void*
+mem_alloc_func_noninline(
+
+
+
+ ulint n,
+ const char* file_name,
+ ulint line
+ );
+# 253 "./include/mem0mem.h"
+static inline
+void
+mem_free_func(
+
+ void* ptr,
+ const char* file_name,
+ ulint line
+);
+
+
+
+static inline
+char*
+mem_strdup(
+
+
+
+ const char* str);
+
+
+static inline
+char*
+mem_strdupl(
+
+
+
+ const char* str,
+ ulint len);
+
+
+
+static inline
+char*
+mem_strdupq(
+
+
+
+ const char* str,
+ char q);
+
+
+
+
+char*
+mem_heap_strdup(
+
+
+ mem_heap_t* heap,
+ const char* str);
+
+
+
+static inline
+char*
+mem_heap_strdupl(
+
+
+ mem_heap_t* heap,
+ const char* str,
+ ulint len);
+# 328 "./include/mem0mem.h"
+struct mem_block_info_struct {
+ ulint magic_n;
+ char file_name[8];
+ ulint line;
+ struct { ulint count; mem_block_t * start; mem_block_t * end; } base;
+
+
+ struct { mem_block_t * prev; mem_block_t * next; } list;
+
+
+
+ ulint len;
+ ulint type;
+
+ ulint init_block;
+
+
+ ulint free;
+
+ ulint start;
+
+ unsigned char* free_block;
+# 360 "./include/mem0mem.h"
+};
+
+
+
+
+
+
+
+# 1 "./include/mem0dbg.h" 1
+# 41 "./include/mem0dbg.h"
+void
+mem_heap_validate_or_print(
+
+ mem_heap_t* heap,
+ unsigned char* top,
+
+
+ ulint print,
+
+
+ ulint* error,
+ ulint* us_size,
+
+
+
+
+ ulint* ph_size,
+
+
+ ulint* n_blocks);
+# 75 "./include/mem0dbg.h"
+ulint
+mem_heap_check(
+
+
+ mem_heap_t* heap);
+
+
+
+ulint
+mem_heap_validate(
+
+
+ mem_heap_t* heap);
+# 115 "./include/mem0dbg.h"
+void
+mem_analyze_corruption(
+
+ unsigned char* ptr);
+
+
+
+
+void
+mem_print_info(void);
+
+
+
+
+
+void
+mem_print_new_info(void);
+# 369 "./include/mem0mem.h" 2
+
+
+# 1 "./include/mem0mem.ic" 1
+# 9 "./include/mem0mem.ic"
+# 1 "./include/mem0dbg.ic" 1
+# 10 "./include/mem0mem.ic" 2
+
+# 1 "./include/mem0pool.h" 1
+# 16 "./include/mem0pool.h"
+typedef struct mem_area_struct mem_area_t;
+typedef struct mem_pool_struct mem_pool_t;
+
+
+extern mem_pool_t* mem_comm_pool;
+
+
+
+struct mem_area_struct{
+ ulint size_and_free;
+
+
+
+ struct { mem_area_t * prev; mem_area_t * next; }
+ free_list;
+};
+# 40 "./include/mem0pool.h"
+mem_pool_t*
+mem_pool_create(
+
+
+ ulint size);
+
+
+
+
+void*
+mem_area_alloc(
+
+
+ ulint size,
+
+
+ mem_pool_t* pool);
+
+
+
+void
+mem_area_free(
+
+ void* ptr,
+
+ mem_pool_t* pool);
+
+
+
+ulint
+mem_pool_get_reserved(
+
+
+ mem_pool_t* pool);
+
+
+
+void
+mem_pool_mutex_enter(void);
+
+
+
+
+void
+mem_pool_mutex_exit(void);
+
+
+
+
+ulint
+mem_pool_validate(
+
+
+ mem_pool_t* pool);
+
+
+
+void
+mem_pool_print_info(
+
+ FILE* outfile,
+ mem_pool_t* pool);
+
+
+
+# 1 "./include/mem0pool.ic" 1
+# 106 "./include/mem0pool.h" 2
+# 12 "./include/mem0mem.ic" 2
+
+
+
+
+mem_block_t*
+mem_heap_create_block(
+
+
+
+ mem_heap_t* heap,
+
+ ulint n,
+
+ void* init_block,
+
+ ulint type,
+
+ const char* file_name,
+ ulint line);
+
+
+
+void
+mem_heap_block_free(
+
+ mem_heap_t* heap,
+ mem_block_t* block);
+
+
+
+void
+mem_heap_free_block_free(
+
+ mem_heap_t* heap);
+
+
+
+mem_block_t*
+mem_heap_add_block(
+
+
+
+ mem_heap_t* heap,
+ ulint n);
+
+static inline
+void
+mem_block_set_len(mem_block_t* block, ulint len)
+{
+ ;
+
+ block->len = len;
+}
+
+static inline
+ulint
+mem_block_get_len(mem_block_t* block)
+{
+ return(block->len);
+}
+
+static inline
+void
+mem_block_set_type(mem_block_t* block, ulint type)
+{
+ ;
+
+
+ block->type = type;
+}
+
+static inline
+ulint
+mem_block_get_type(mem_block_t* block)
+{
+ return(block->type);
+}
+
+static inline
+void
+mem_block_set_free(mem_block_t* block, ulint free)
+{
+ ;
+ ;
+
+ block->free = free;
+}
+
+static inline
+ulint
+mem_block_get_free(mem_block_t* block)
+{
+ return(block->free);
+}
+
+static inline
+void
+mem_block_set_start(mem_block_t* block, ulint start)
+{
+ ;
+
+ block->start = start;
+}
+
+static inline
+ulint
+mem_block_get_start(mem_block_t* block)
+{
+ return(block->start);
+}
+
+
+
+static inline
+void*
+mem_heap_alloc(
+
+
+ mem_heap_t* heap,
+ ulint n)
+
+
+{
+ mem_block_t* block;
+ void* buf;
+ ulint free;
+
+ ;
+
+ block = (heap->base).end;
+
+ ;
+
+
+
+
+ if (mem_block_get_len(block)
+ < mem_block_get_free(block) + ut_calc_align((n), 8)) {
+
+ block = mem_heap_add_block(heap, n);
+
+ if (block == ((void *)0)) {
+
+ return(((void *)0));
+ }
+ }
+
+ free = mem_block_get_free(block);
+
+ buf = (unsigned char*)block + free;
+
+ mem_block_set_free(block, free + ut_calc_align((n), 8));
+# 178 "./include/mem0mem.ic"
+ return(buf);
+}
+
+
+
+static inline
+unsigned char*
+mem_heap_get_heap_top(
+
+
+ mem_heap_t* heap)
+{
+ mem_block_t* block;
+ unsigned char* buf;
+
+ ;
+
+ block = (heap->base).end;
+
+ buf = (unsigned char*)block + mem_block_get_free(block);
+
+ return(buf);
+}
+
+
+
+
+
+static inline
+void
+mem_heap_free_heap_top(
+
+ mem_heap_t* heap,
+ unsigned char* old_top)
+{
+ mem_block_t* block;
+ mem_block_t* prev_block;
+
+
+
+
+
+
+ ;
+# 237 "./include/mem0mem.ic"
+ block = (heap->base).end;
+
+ while (block != ((void *)0)) {
+ if (((unsigned char*)block + mem_block_get_free(block) >= old_top)
+ && ((unsigned char*)block <= old_top)) {
+
+
+ break;
+ }
+
+
+
+
+ prev_block = (((block)->list).prev);
+
+ mem_heap_block_free(heap, block);
+
+ block = prev_block;
+ }
+
+ ;
+
+
+ mem_block_set_free(block, old_top - (unsigned char*)block);
+# 279 "./include/mem0mem.ic"
+ if ((heap != block) && (mem_block_get_free(block) ==
+ mem_block_get_start(block))) {
+ mem_heap_block_free(heap, block);
+ }
+}
+
+
+
+static inline
+void
+mem_heap_empty(
+
+ mem_heap_t* heap)
+{
+ mem_heap_free_heap_top(heap, (unsigned char*)heap + mem_block_get_start(heap));
+
+ if (heap->free_block) {
+ mem_heap_free_block_free(heap);
+ }
+}
+
+
+
+
+static inline
+void*
+mem_heap_get_top(
+
+
+ mem_heap_t* heap,
+ ulint n)
+{
+ mem_block_t* block;
+ void* buf;
+
+ ;
+
+ block = (heap->base).end;
+
+ buf = (unsigned char*)block + mem_block_get_free(block) - ut_calc_align((n), 8);
+# 332 "./include/mem0mem.ic"
+ return(buf);
+}
+
+
+
+
+static inline
+void
+mem_heap_free_top(
+
+ mem_heap_t* heap,
+ ulint n)
+{
+ mem_block_t* block;
+
+ ;
+
+ block = (heap->base).end;
+
+
+ mem_block_set_free(block, mem_block_get_free(block)
+ - ut_calc_align((n), 8));
+# 365 "./include/mem0mem.ic"
+ if ((heap != block) && (mem_block_get_free(block) ==
+ mem_block_get_start(block))) {
+ mem_heap_block_free(heap, block);
+ }
+}
+
+
+
+
+
+static inline
+mem_heap_t*
+mem_heap_create_func(
+
+
+ ulint n,
+
+
+
+
+
+ void* init_block,
+# 396 "./include/mem0mem.ic"
+ ulint type,
+
+ const char* file_name,
+ ulint line
+ )
+{
+ mem_block_t* block;
+
+ if (n > 0) {
+ block = mem_heap_create_block(((void *)0), n, init_block, type,
+ file_name, line);
+ } else {
+ block = mem_heap_create_block(((void *)0), 64,
+ init_block, type, file_name, line);
+ }
+
+ ;
+
+ { (block->base).count = 0; (block->base).start = ((void *)0); (block->base).end = ((void *)0);};
+
+
+ { ; ((block->base).count)++; ((block)->list).next = (block->base).start; ((block)->list).prev = ((void *)0); if ((block->base).start != ((void *)0)) { (((block->base).start)->list).prev = (block); } (block->base).start = (block); if ((block->base).end == ((void *)0)) { (block->base).end = (block); }};
+# 430 "./include/mem0mem.ic"
+ return(block);
+}
+
+
+
+
+
+static inline
+void
+mem_heap_free_func(
+
+ mem_heap_t* heap,
+ const char* file_name __attribute__((unused)),
+
+ ulint line __attribute__((unused)))
+{
+ mem_block_t* block;
+ mem_block_t* prev_block;
+
+ ;
+
+ block = (heap->base).end;
+# 462 "./include/mem0mem.ic"
+ if (heap->free_block) {
+ mem_heap_free_block_free(heap);
+ }
+
+ while (block != ((void *)0)) {
+
+
+
+ prev_block = (((block)->list).prev);
+
+ mem_heap_block_free(heap, block);
+
+ block = prev_block;
+ }
+}
+
+
+
+
+
+
+static inline
+void*
+mem_alloc_func(
+
+
+
+ ulint n,
+ const char* file_name,
+ ulint line
+ )
+{
+ mem_heap_t* heap;
+ void* buf;
+
+ heap = mem_heap_create_func(n, ((void *)0), 0, file_name,
+ line);
+ if (heap == ((void *)0)) {
+
+ return(((void *)0));
+ }
+
+
+
+
+
+
+ buf = mem_heap_alloc(heap, n);
+
+ do { if (__builtin_expect(!((ulint)((unsigned char*)heap == (unsigned char*)buf - ut_calc_align(sizeof(mem_block_info_t), 8) - 0)), (0))) { ut_dbg_assertion_failed("(byte*)heap == (byte*)buf - MEM_BLOCK_HEADER_SIZE - MEM_FIELD_HEADER_SIZE", "./include/mem0mem.ic", (ulint) 512); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("./include/mem0mem.ic", (ulint) 512); } while (0); } while (0);
+
+ return(buf);
+}
+
+
+
+
+
+static inline
+void
+mem_free_func(
+
+ void* ptr,
+ const char* file_name,
+ ulint line
+ )
+{
+ mem_heap_t* heap;
+
+ heap = (mem_heap_t*)((unsigned char*)ptr - ut_calc_align(sizeof(mem_block_info_t), 8)
+ - 0);
+ mem_heap_free_func(heap, file_name, line);
+}
+
+
+
+static inline
+ulint
+mem_heap_get_size(
+
+ mem_heap_t* heap)
+{
+ mem_block_t* block;
+ ulint size = 0;
+
+ ;
+
+ block = heap;
+
+ while (block != ((void *)0)) {
+
+ size += mem_block_get_len(block);
+ block = (((block)->list).next);
+ }
+
+ if (heap->free_block) {
+ size += (2 * 8192);
+ }
+
+ return(size);
+}
+
+
+
+static inline
+char*
+mem_strdup(
+
+
+
+ const char* str)
+{
+ ulint len = strlen(str) + 1;
+ return(memcpy(mem_alloc_func((len), "./include/mem0mem.ic", 575), str, len));
+}
+
+
+
+static inline
+char*
+mem_strdupl(
+
+
+
+ const char* str,
+ ulint len)
+{
+ char* s = mem_alloc_func((len + 1), "./include/mem0mem.ic", 589);
+ s[len] = 0;
+ return(memcpy(s, str, len));
+}
+
+
+
+static inline
+char*
+mem_strdupq(
+
+
+
+ const char* str,
+ char q)
+{
+ char* dst;
+ char* d;
+ const char* s = str;
+ size_t len = strlen(str) + 3;
+
+ while((s = (__extension__ (__builtin_constant_p (q) && !__builtin_constant_p (s) && (q) == '\0' ? (char *) __rawmemchr (s, q) : __builtin_strchr (s, q)))) != ((void *)0)) {
+ s++;
+ len++;
+ }
+
+ d = dst = mem_alloc_func((len), "./include/mem0mem.ic", 615);
+ *d++ = q;
+ s = str;
+ while(*s) {
+ if ((*d++ = *s++) == q) {
+ *d++ = q;
+ }
+ }
+ *d++ = q;
+ *d++ = '\0';
+ ;
+ return(dst);
+}
+
+
+
+
+static inline
+char*
+mem_heap_strdupl(
+
+
+ mem_heap_t* heap,
+ const char* str,
+ ulint len)
+{
+ char* s = mem_heap_alloc(heap, len + 1);
+ s[len] = 0;
+ return(memcpy(s, str, len));
+}
+# 372 "./include/mem0mem.h" 2
+# 14 "./include/hash0hash.h" 2
+
+
+typedef struct hash_table_struct hash_table_t;
+typedef struct hash_cell_struct hash_cell_t;
+
+typedef void* hash_node_t;
+# 28 "./include/hash0hash.h"
+hash_table_t*
+hash0_create(
+
+
+ ulint n);
+
+
+
+void
+hash_create_mutexes(
+
+ hash_table_t* table,
+ ulint n_mutexes,
+ ulint sync_level);
+
+
+
+
+void
+hash_table_free(
+
+ hash_table_t* table);
+
+
+static inline
+ulint
+hash_calc_hash(
+
+
+ ulint fold,
+ hash_table_t* table);
+# 154 "./include/hash0hash.h"
+static inline
+hash_cell_t*
+hash_get_nth_cell(
+
+
+ hash_table_t* table,
+ ulint n);
+
+
+static inline
+ulint
+hash_get_n_cells(
+
+
+ hash_table_t* table);
+# 230 "./include/hash0hash.h"
+static inline
+ulint
+hash_get_mutex_no(
+
+
+ hash_table_t* table,
+ ulint fold);
+
+
+static inline
+mem_heap_t*
+hash_get_nth_heap(
+
+
+ hash_table_t* table,
+ ulint i);
+
+
+static inline
+mem_heap_t*
+hash_get_heap(
+
+
+ hash_table_t* table,
+ ulint fold);
+
+
+static inline
+ib_mutex_t*
+hash_get_nth_mutex(
+
+
+ hash_table_t* table,
+ ulint i);
+
+
+static inline
+ib_mutex_t*
+hash_get_mutex(
+
+
+ hash_table_t* table,
+ ulint fold);
+
+
+
+void
+hash_mutex_enter(
+
+ hash_table_t* table,
+ ulint fold);
+
+
+
+void
+hash_mutex_exit(
+
+ hash_table_t* table,
+ ulint fold);
+
+
+
+void
+hash_mutex_enter_all(
+
+ hash_table_t* table);
+
+
+
+void
+hash_mutex_exit_all(
+
+ hash_table_t* table);
+
+
+struct hash_cell_struct{
+ void* node;
+};
+
+
+struct hash_table_struct {
+ ulint adaptive;
+
+ ulint n_cells;
+ hash_cell_t* array;
+ ulint n_mutexes;
+
+ ib_mutex_t* mutexes;
+
+ mem_heap_t** heaps;
+
+
+
+ mem_heap_t* heap;
+ ulint magic_n;
+};
+
+
+
+
+# 1 "./include/hash0hash.ic" 1
+# 13 "./include/hash0hash.ic"
+static inline
+hash_cell_t*
+hash_get_nth_cell(
+
+
+ hash_table_t* table,
+ ulint n)
+{
+ ;
+
+ return(table->array + n);
+}
+
+
+
+static inline
+ulint
+hash_get_n_cells(
+
+
+ hash_table_t* table)
+{
+ return(table->n_cells);
+}
+
+
+
+static inline
+ulint
+hash_calc_hash(
+
+
+ ulint fold,
+ hash_table_t* table)
+{
+ return(ut_hash_ulint(fold, table->n_cells));
+}
+
+
+
+static inline
+ulint
+hash_get_mutex_no(
+
+
+ hash_table_t* table,
+ ulint fold)
+{
+ return(ut_2pow_remainder(fold, table->n_mutexes));
+}
+
+
+
+static inline
+mem_heap_t*
+hash_get_nth_heap(
+
+
+ hash_table_t* table,
+ ulint i)
+{
+ ;
+
+ return(table->heaps[i]);
+}
+
+
+
+static inline
+mem_heap_t*
+hash_get_heap(
+
+
+ hash_table_t* table,
+ ulint fold)
+{
+ ulint i;
+
+ if (table->heap) {
+ return(table->heap);
+ }
+
+ i = hash_get_mutex_no(table, fold);
+
+ return(hash_get_nth_heap(table, i));
+}
+
+
+
+static inline
+ib_mutex_t*
+hash_get_nth_mutex(
+
+
+ hash_table_t* table,
+ ulint i)
+{
+ ;
+
+ return(table->mutexes + i);
+}
+
+
+
+static inline
+ib_mutex_t*
+hash_get_mutex(
+
+
+ hash_table_t* table,
+ ulint fold)
+{
+ ulint i;
+
+ i = hash_get_mutex_no(table, fold);
+
+ return(hash_get_nth_mutex(table, i));
+}
+# 331 "./include/hash0hash.h" 2
+# 32 "./include/buf0buf.h" 2
+
+# 1 "./include/os0proc.h" 1
+# 16 "./include/os0proc.h"
+# 1 "/usr/include/sys/ipc.h" 1 3 4
+# 29 "/usr/include/sys/ipc.h" 3 4
+# 1 "/usr/include/bits/ipctypes.h" 1 3 4
+# 33 "/usr/include/bits/ipctypes.h" 3 4
+typedef int __ipc_pid_t;
+# 30 "/usr/include/sys/ipc.h" 2 3 4
+# 1 "/usr/include/bits/ipc.h" 1 3 4
+# 43 "/usr/include/bits/ipc.h" 3 4
+struct ipc_perm
+ {
+ __key_t __key;
+ __uid_t uid;
+ __gid_t gid;
+ __uid_t cuid;
+ __gid_t cgid;
+ __mode_t mode;
+ __uint32_t __seq;
+ __uint32_t __pad1;
+ __uint64_t __unused1;
+ __uint64_t __unused2;
+ };
+
+
+
+
+
+extern int __ipc (int __call, int __first, int __second, int __third,
+ void *__ptr) __attribute__ ((__nothrow__));
+
+
+# 31 "/usr/include/sys/ipc.h" 2 3 4
+# 52 "/usr/include/sys/ipc.h" 3 4
+
+
+
+extern key_t ftok (__const char *__pathname, int __proj_id) __attribute__ ((__nothrow__));
+
+
+# 17 "./include/os0proc.h" 2
+# 1 "/usr/include/sys/shm.h" 1 3 4
+# 25 "/usr/include/sys/shm.h" 3 4
+# 1 "/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.3.4/include/stddef.h" 1 3 4
+# 26 "/usr/include/sys/shm.h" 2 3 4
+
+
+
+
+
+# 1 "/usr/include/bits/shm.h" 1 3 4
+# 40 "/usr/include/bits/shm.h" 3 4
+
+
+
+
+extern int __getpagesize (void) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+
+
+
+typedef unsigned long int shmatt_t;
+
+
+struct shmid_ds
+ {
+ struct ipc_perm shm_perm;
+
+
+
+ __time_t shm_atime;
+
+
+
+ __time_t shm_dtime;
+
+
+
+ __time_t shm_ctime;
+
+
+
+ size_t shm_segsz;
+ __pid_t shm_cpid;
+ __pid_t shm_lpid;
+ shmatt_t shm_nattch;
+ unsigned long __unused5;
+ unsigned long __unused6;
+ };
+# 89 "/usr/include/bits/shm.h" 3 4
+struct shminfo
+ {
+ unsigned long int shmmax;
+ unsigned long int shmmin;
+ unsigned long int shmmni;
+ unsigned long int shmseg;
+ unsigned long int shmall;
+ unsigned long int __unused1;
+ unsigned long int __unused2;
+ unsigned long int __unused3;
+ unsigned long int __unused4;
+ };
+
+struct shm_info
+ {
+ int used_ids;
+ unsigned long int shm_tot;
+ unsigned long int shm_rss;
+ unsigned long int shm_swp;
+ unsigned long int swap_attempts;
+ unsigned long int swap_successes;
+ };
+
+
+
+
+# 32 "/usr/include/sys/shm.h" 2 3 4
+# 45 "/usr/include/sys/shm.h" 3 4
+
+
+
+
+
+
+extern int shmctl (int __shmid, int __cmd, struct shmid_ds *__buf) __attribute__ ((__nothrow__));
+
+
+extern int shmget (key_t __key, size_t __size, int __shmflg) __attribute__ ((__nothrow__));
+
+
+extern void *shmat (int __shmid, __const void *__shmaddr, int __shmflg)
+ __attribute__ ((__nothrow__));
+
+
+extern int shmdt (__const void *__shmaddr) __attribute__ ((__nothrow__));
+
+
+# 18 "./include/os0proc.h" 2
+
+
+typedef void* os_process_t;
+typedef unsigned long int os_process_id_t;
+
+
+
+
+
+typedef ulint os_awe_t;
+
+
+
+
+
+
+
+extern ulint os_use_large_pages;
+
+extern ulint os_large_page_size;
+
+
+
+
+
+
+ulint
+os_awe_enable_lock_pages_in_mem(void);
+
+
+
+
+
+
+
+ulint
+os_awe_allocate_physical_mem(
+
+
+ os_awe_t** page_info,
+
+
+
+ ulint n_megabytes);
+
+
+
+
+unsigned char*
+os_awe_allocate_virtual_mem_window(
+
+
+
+ ulint size);
+# 83 "./include/os0proc.h"
+ulint
+os_awe_map_physical_mem_to_window(
+
+
+
+ unsigned char* ptr,
+
+
+
+ ulint n_mem_pages,
+
+ os_awe_t* page_info);
+# 103 "./include/os0proc.h"
+ulint
+os_proc_get_number(void);
+
+
+
+
+void*
+os_mem_alloc_nocache(
+
+
+ ulint n);
+
+
+
+void*
+os_mem_alloc_large(
+
+
+ ulint n,
+ ulint set_to_zero,
+
+ ulint assert_on_error);
+
+
+
+
+void
+os_mem_free_large(
+
+void *ptr);
+
+
+
+
+void
+os_process_set_priority_boost(
+
+ ulint do_boost);
+
+
+
+# 1 "./include/os0proc.ic" 1
+# 145 "./include/os0proc.h" 2
+# 34 "./include/buf0buf.h" 2
+# 58 "./include/buf0buf.h"
+extern buf_pool_t* buf_pool;
+
+
+
+
+
+extern ulint srv_buf_pool_write_requests;
+
+
+
+
+
+buf_pool_t*
+buf_pool_init(
+
+
+
+ ulint max_size,
+
+ ulint curr_size,
+
+
+ ulint n_frames);
+
+
+
+
+
+
+
+static inline
+ulint
+buf_pool_get_curr_size(void);
+
+
+
+
+
+static inline
+ulint
+buf_pool_get_max_size(void);
+
+
+
+
+
+static inline
+dulint
+buf_pool_get_oldest_modification(void);
+
+
+
+
+
+
+buf_frame_t*
+buf_frame_alloc(void);
+
+
+
+
+
+void
+buf_frame_free(
+
+ buf_frame_t* frame);
+
+
+static inline
+unsigned char*
+buf_frame_copy(
+
+
+ unsigned char* buf,
+ buf_frame_t* frame);
+# 165 "./include/buf0buf.h"
+ulint
+buf_page_optimistic_get_func(
+
+
+ ulint rw_latch,
+ buf_block_t* block,
+ buf_frame_t* guess,
+
+ dulint modify_clock,
+
+ const char* file,
+ ulint line,
+ mtr_t* mtr);
+
+
+
+
+
+static inline
+buf_frame_t*
+buf_page_get_release_on_io(
+
+
+
+ ulint space,
+ ulint offset,
+
+ buf_frame_t* guess,
+ ulint rw_latch,
+
+ ulint savepoint,
+ mtr_t* mtr);
+
+
+
+
+ulint
+buf_page_get_known_nowait(
+
+
+ ulint rw_latch,
+ buf_frame_t* guess,
+ ulint mode,
+ const char* file,
+ ulint line,
+ mtr_t* mtr);
+
+
+
+buf_frame_t*
+buf_page_get_gen(
+
+
+ ulint space,
+ ulint offset,
+ ulint rw_latch,
+ buf_frame_t* guess,
+ ulint mode,
+
+ const char* file,
+ ulint line,
+ mtr_t* mtr);
+
+
+
+
+
+
+buf_frame_t*
+buf_page_create(
+
+
+ ulint space,
+ ulint offset,
+
+ mtr_t* mtr);
+
+
+
+void
+buf_page_init_for_backup_restore(
+
+ ulint space,
+ ulint offset,
+
+ buf_block_t* block);
+
+
+
+static inline
+void
+buf_page_release(
+
+ buf_block_t* block,
+ ulint rw_latch,
+
+ mtr_t* mtr);
+
+
+
+
+
+void
+buf_page_make_young(
+
+ buf_frame_t* frame);
+
+
+
+
+ulint
+buf_page_peek(
+
+
+
+
+ ulint space,
+ ulint offset);
+
+
+
+
+
+buf_block_t*
+buf_page_peek_block(
+
+
+
+
+ ulint space,
+ ulint offset);
+
+
+
+
+void
+buf_reset_check_index_page_at_flush(
+
+ ulint space,
+ ulint offset);
+
+
+
+
+
+
+buf_block_t*
+buf_page_set_file_page_was_freed(
+
+
+
+ ulint space,
+ ulint offset);
+
+
+
+
+
+
+buf_block_t*
+buf_page_reset_file_page_was_freed(
+
+
+
+ ulint space,
+ ulint offset);
+
+
+
+
+static inline
+ulint
+buf_block_peek_if_too_old(
+
+
+ buf_block_t* block);
+
+
+
+
+
+ulint
+buf_page_peek_if_search_hashed(
+
+
+
+ ulint space,
+ ulint offset);
+
+
+
+static inline
+dulint
+buf_frame_get_newest_modification(
+
+
+ buf_frame_t* frame);
+
+
+
+
+static inline
+dulint
+buf_frame_modify_clock_inc(
+
+
+ buf_frame_t* frame);
+
+
+
+
+static inline
+dulint
+buf_block_modify_clock_inc(
+
+
+ buf_block_t* block);
+
+
+
+static inline
+dulint
+buf_block_get_modify_clock(
+
+
+ buf_block_t* block);
+
+
+
+
+
+ulint
+buf_calc_page_new_checksum(
+
+
+ unsigned char* page);
+# 409 "./include/buf0buf.h"
+ulint
+buf_calc_page_old_checksum(
+
+
+ unsigned char* page);
+
+
+
+ulint
+buf_page_is_corrupted(
+
+
+ unsigned char* read_buf);
+
+
+
+static inline
+ulint
+buf_frame_get_page_no(
+
+
+ unsigned char* ptr);
+
+
+
+static inline
+ulint
+buf_frame_get_space_id(
+
+
+ unsigned char* ptr);
+
+
+
+static inline
+void
+buf_ptr_get_fsp_addr(
+
+ unsigned char* ptr,
+ ulint* space,
+ fil_addr_t* addr);
+
+
+
+static inline
+ulint
+buf_frame_get_lock_hash_val(
+
+
+ unsigned char* ptr);
+
+
+
+static inline
+ib_mutex_t*
+buf_frame_get_mutex(
+
+
+ unsigned char* ptr);
+
+
+static inline
+buf_frame_t*
+buf_frame_align(
+
+
+ unsigned char* ptr);
+
+
+
+static inline
+ulint
+buf_pool_is_block(
+
+
+ void* ptr);
+# 510 "./include/buf0buf.h"
+void
+buf_page_print(
+
+ unsigned char* read_buf);
+
+
+
+
+ulint
+buf_get_n_pending_ios(void);
+
+
+
+
+void
+buf_print_io(
+
+ FILE* file);
+
+
+
+
+ulint
+buf_get_modified_ratio_pct(void);
+
+
+
+
+void
+buf_refresh_io_stats(void);
+
+
+
+
+ulint
+buf_all_freed(void);
+
+
+
+
+
+ulint
+buf_pool_check_no_pending_io(void);
+
+
+
+
+
+
+
+void
+buf_pool_invalidate(void);
+# 572 "./include/buf0buf.h"
+void
+buf_awe_map_page_to_frame(
+
+ buf_block_t* block,
+
+ ulint add_to_mapped_list);
+# 596 "./include/buf0buf.h"
+static inline
+buf_frame_t*
+buf_block_get_frame(
+
+
+ buf_block_t* block);
+
+
+static inline
+ulint
+buf_block_get_space(
+
+
+ buf_block_t* block);
+
+
+static inline
+ulint
+buf_block_get_page_no(
+
+
+ buf_block_t* block);
+
+
+static inline
+buf_block_t*
+buf_block_align(
+
+
+ unsigned char* ptr);
+
+
+
+static inline
+ulint
+buf_page_io_query(
+
+
+ buf_block_t* block);
+
+
+static inline
+buf_block_t*
+buf_pool_get_nth_block(
+
+
+ buf_pool_t* pool,
+ ulint i);
+# 656 "./include/buf0buf.h"
+buf_block_t*
+buf_page_init_for_read(
+
+
+ ulint* err,
+ ulint mode,
+ ulint space,
+ ib_longlong tablespace_version,
+
+
+ ulint offset);
+
+
+
+
+void
+buf_page_io_complete(
+
+ buf_block_t* block);
+
+
+
+static inline
+ulint
+buf_page_address_fold(
+
+
+ ulint space,
+ ulint offset);
+
+
+static inline
+buf_block_t*
+buf_page_hash_get(
+
+
+ ulint space,
+ ulint offset);
+
+
+
+static inline
+ulint
+buf_pool_clock_tic(void);
+
+
+
+
+
+ulint
+buf_get_free_list_len(void);
+
+
+void buf_pool_dump(void);
+buf_block_t* buf_pool_get_nth_block_no_inline(buf_pool_t* pool, ulint i);
+
+
+
+
+
+
+void
+buf_io_counter_control(void);
+
+
+void
+buf_io_counter_clear(void);
+
+
+
+
+struct buf_block_struct{
+
+
+
+ ulint magic_n;
+ ulint state;
+
+
+
+
+ unsigned char* frame;
+
+
+
+
+
+
+
+ os_awe_t* awe_info;
+
+
+
+
+ ulint space;
+ ulint offset;
+ ulint lock_hash_val;
+
+ ib_mutex_t mutex;
+
+
+
+
+
+ rw_lock_t lock;
+
+ buf_block_t* hash;
+
+ ulint check_index_page_at_flush;
+# 774 "./include/buf0buf.h"
+ struct { buf_block_t * prev; buf_block_t * next; } flush_list;
+
+
+ dulint newest_modification;
+
+
+
+ dulint oldest_modification;
+
+
+
+
+
+ ulint flush_type;
+
+
+
+
+
+
+ struct { buf_block_t * prev; buf_block_t * next; } free;
+
+ ulint in_free_list;
+
+ struct { buf_block_t * prev; buf_block_t * next; } LRU;
+
+ struct { buf_block_t * prev; buf_block_t * next; } awe_LRU_free_mapped;
+
+
+
+ ulint in_LRU_list;
+
+ ulint LRU_position;
+
+
+
+
+
+
+
+ ulint freed_page_clock;
+
+
+
+
+
+ ulint old;
+
+ ulint accessed;
+
+
+
+
+
+
+ ulint buf_fix_count;
+
+
+ ulint io_fix;
+
+
+
+
+
+ dulint modify_clock;
+# 853 "./include/buf0buf.h"
+ ulint n_hash_helps;
+
+ ulint n_fields;
+
+ ulint n_bytes;
+
+ ulint side;
+# 873 "./include/buf0buf.h"
+ ulint is_hashed;
+
+
+
+
+
+ ulint n_pointers;
+
+
+ ulint curr_n_fields;
+
+ ulint curr_n_bytes;
+ ulint curr_side;
+
+
+ dict_index_t* index;
+# 897 "./include/buf0buf.h"
+ ulint file_page_was_freed;
+
+
+};
+
+
+
+
+
+
+struct buf_pool_struct{
+
+
+
+ ib_mutex_t mutex;
+
+
+ unsigned char* frame_mem;
+
+
+
+
+ unsigned char* frame_zero;
+
+
+ unsigned char* high_end;
+
+ ulint n_frames;
+ buf_block_t* blocks;
+ buf_block_t** blocks_of_frames;
+# 937 "./include/buf0buf.h"
+ os_awe_t* awe_info;
+
+
+ ulint max_size;
+
+ ulint curr_size;
+
+
+ hash_table_t* io_counter_hash;
+ mem_heap_t* io_counter_heap;
+ ulint io_counters;
+ hash_table_t* page_hash;
+ rw_lock_t hash_latch;
+
+ ulint n_pend_reads;
+
+ time_t last_printout_time;
+
+ ulint n_pages_read;
+ ulint n_pages_written;
+ ulint n_pages_created;
+
+ ulint n_page_gets;
+
+
+
+
+
+ ulint n_pages_awe_remapped;
+
+
+ ulint n_page_gets_old;
+
+
+ ulint n_pages_read_old;
+
+ ulint n_pages_written_old;
+ ulint n_pages_created_old;
+
+ ulint n_pages_awe_remapped_old;
+
+
+ struct { ulint count; buf_block_t * start; buf_block_t * end; } flush_list;
+
+
+ ib_mutex_t flush_list_mutex;
+ ulint init_flush[3 + 1];
+
+
+ ulint n_flush[3 + 1];
+
+
+ os_event_t no_flush[3 + 1];
+
+
+
+ ulint ulint_clock;
+
+
+
+ ulint freed_page_clock;
+
+
+
+
+
+
+ ulint LRU_flush_ended;
+
+
+
+
+
+
+ struct { ulint count; buf_block_t * start; buf_block_t * end; } free;
+
+
+
+
+ ib_mutex_t free_mutex;
+ struct { ulint count; buf_block_t * start; buf_block_t * end; } LRU;
+
+ ib_mutex_t LRU_mutex;
+ buf_block_t* LRU_old;
+
+
+ ulint LRU_old_len;
+
+
+
+
+
+ struct { ulint count; buf_block_t * start; buf_block_t * end; } awe_LRU_free_mapped;
+
+
+
+
+
+};
+
+struct buf_io_counter_struct{
+ ulint space;
+ ulint offset;
+ buf_io_counter_t* hash;
+ ulint index_id;
+ ulint n_read;
+ ulint n_write;
+};
+# 1104 "./include/buf0buf.h"
+# 1 "./include/buf0buf.ic" 1
+# 9 "./include/buf0buf.ic"
+# 1 "./include/buf0flu.h" 1
+# 20 "./include/buf0flu.h"
+void
+buf_flush_write_complete(
+
+ buf_block_t* block);
+
+
+
+
+void
+buf_flush_free_margin(
+
+ ulint wait);
+
+
+
+void
+buf_flush_init_for_writing(
+
+ unsigned char* page,
+ dulint newest_lsn,
+ ulint space,
+ ulint page_no);
+
+
+
+
+
+
+
+ulint
+buf_flush_batch(
+
+
+
+ ulint flush_type,
+
+
+ ulint min_n,
+
+
+ dulint lsn_limit);
+
+
+
+
+
+
+void
+buf_flush_wait_batch_end(
+
+ ulint type);
+
+
+
+
+static inline
+void
+buf_flush_note_modification(
+
+ buf_block_t* block,
+ mtr_t* mtr);
+
+
+static inline
+void
+buf_flush_recv_note_modification(
+
+ buf_block_t* block,
+ dulint start_lsn,
+
+ dulint end_lsn);
+
+
+
+
+ulint
+buf_flush_ready_for_replace(
+
+
+ buf_block_t* block);
+
+
+
+
+ulint
+buf_flush_validate(void);
+# 118 "./include/buf0flu.h"
+# 1 "./include/buf0flu.ic" 1
+# 9 "./include/buf0flu.ic"
+# 1 "./include/buf0buf.h" 1
+# 10 "./include/buf0flu.ic" 2
+# 1 "./include/mtr0mtr.h" 1
+# 14 "./include/mtr0mtr.h"
+# 1 "./include/dyn0dyn.h" 1
+# 16 "./include/dyn0dyn.h"
+typedef struct dyn_block_struct dyn_block_t;
+typedef dyn_block_t dyn_array_t;
+# 26 "./include/dyn0dyn.h"
+static inline
+dyn_array_t*
+dyn_array_create(
+
+
+ dyn_array_t* arr);
+
+
+
+static inline
+void
+dyn_array_free(
+
+ dyn_array_t* arr);
+
+
+
+
+static inline
+unsigned char*
+dyn_array_open(
+
+
+ dyn_array_t* arr,
+ ulint size);
+
+
+
+static inline
+void
+dyn_array_close(
+
+ dyn_array_t* arr,
+ unsigned char* ptr);
+
+
+
+
+static inline
+void*
+dyn_array_push(
+
+
+ dyn_array_t* arr,
+ ulint size);
+
+
+static inline
+void*
+dyn_array_get_element(
+
+
+ dyn_array_t* arr,
+ ulint pos);
+
+
+
+static inline
+ulint
+dyn_array_get_data_size(
+
+
+ dyn_array_t* arr);
+
+
+static inline
+dyn_block_t*
+dyn_array_get_first_block(
+
+ dyn_array_t* arr);
+
+
+static inline
+dyn_block_t*
+dyn_array_get_last_block(
+
+ dyn_array_t* arr);
+
+
+static inline
+dyn_block_t*
+dyn_array_get_next_block(
+
+
+ dyn_array_t* arr,
+ dyn_block_t* block);
+
+
+static inline
+ulint
+dyn_block_get_used(
+
+
+ dyn_block_t* block);
+
+
+static inline
+unsigned char*
+dyn_block_get_data(
+
+
+ dyn_block_t* block);
+
+
+static inline
+void
+dyn_push_string(
+
+ dyn_array_t* arr,
+ const unsigned char* str,
+ ulint len);
+
+
+
+
+
+struct dyn_block_struct{
+ mem_heap_t* heap;
+
+ ulint used;
+ unsigned char data[512];
+
+ struct { ulint count; dyn_block_t * start; dyn_block_t * end; } base;
+
+
+ struct { dyn_block_t * prev; dyn_block_t * next; } list;
+
+
+
+
+
+
+
+};
+
+
+
+# 1 "./include/dyn0dyn.ic" 1
+# 15 "./include/dyn0dyn.ic"
+dyn_block_t*
+dyn_array_add_block(
+
+
+ dyn_array_t* arr);
+
+
+
+
+static inline
+dyn_block_t*
+dyn_array_get_first_block(
+
+ dyn_array_t* arr)
+{
+ return(arr);
+}
+
+
+
+static inline
+dyn_block_t*
+dyn_array_get_last_block(
+
+ dyn_array_t* arr)
+{
+ if (arr->heap == ((void *)0)) {
+
+ return(arr);
+ }
+
+ return((arr->base).end);
+}
+
+
+
+static inline
+dyn_block_t*
+dyn_array_get_next_block(
+
+
+ dyn_array_t* arr,
+ dyn_block_t* block)
+{
+ ;
+
+ if (arr->heap == ((void *)0)) {
+ ;
+
+ return(((void *)0));
+ }
+
+ return((((block)->list).next));
+}
+
+
+
+static inline
+ulint
+dyn_block_get_used(
+
+
+ dyn_block_t* block)
+{
+ ;
+
+ return((block->used) & ~0x1000000UL);
+}
+
+
+
+static inline
+unsigned char*
+dyn_block_get_data(
+
+
+ dyn_block_t* block)
+{
+ ;
+
+ return(block->data);
+}
+
+
+
+static inline
+dyn_array_t*
+dyn_array_create(
+
+
+ dyn_array_t* arr)
+
+{
+ ;
+ ;
+
+ arr->heap = ((void *)0);
+ arr->used = 0;
+
+
+
+
+
+ return(arr);
+}
+
+
+
+static inline
+void
+dyn_array_free(
+
+ dyn_array_t* arr)
+{
+ if (arr->heap != ((void *)0)) {
+ mem_heap_free_func( (arr->heap), "./include/dyn0dyn.ic", 130);
+ }
+
+
+
+
+}
+
+
+
+
+static inline
+void*
+dyn_array_push(
+
+
+ dyn_array_t* arr,
+ ulint size)
+{
+ dyn_block_t* block;
+ ulint used;
+
+ ;
+ ;
+ ;
+ ;
+
+ block = arr;
+ used = block->used;
+
+ if (used + size > 512) {
+
+
+ block = dyn_array_get_last_block(arr);
+ used = block->used;
+
+ if (used + size > 512) {
+ block = dyn_array_add_block(arr);
+ used = block->used;
+ }
+ }
+
+ block->used = used + size;
+ ;
+
+ return((block->data) + used);
+}
+
+
+
+
+
+static inline
+unsigned char*
+dyn_array_open(
+
+
+ dyn_array_t* arr,
+ ulint size)
+
+{
+ dyn_block_t* block;
+ ulint used;
+
+ ;
+ ;
+ ;
+ ;
+
+ block = arr;
+ used = block->used;
+
+ if (used + size > 512) {
+
+
+ block = dyn_array_get_last_block(arr);
+ used = block->used;
+
+ if (used + size > 512) {
+ block = dyn_array_add_block(arr);
+ used = block->used;
+ do { if (__builtin_expect(!((ulint)(size <= 512)), (0))) { ut_dbg_assertion_failed("size <= DYN_ARRAY_DATA_SIZE", "./include/dyn0dyn.ic", (ulint) 211); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("./include/dyn0dyn.ic", (ulint) 211); } while (0); } while (0);
+ }
+ }
+
+ ;
+
+
+
+
+
+ return((block->data) + used);
+}
+
+
+
+static inline
+void
+dyn_array_close(
+
+ dyn_array_t* arr,
+ unsigned char* ptr)
+{
+ dyn_block_t* block;
+
+ ;
+ ;
+
+ block = dyn_array_get_last_block(arr);
+
+ ;
+
+ block->used = ptr - block->data;
+
+ ;
+
+
+
+
+}
+
+
+
+static inline
+void*
+dyn_array_get_element(
+
+
+ dyn_array_t* arr,
+ ulint pos)
+
+{
+ dyn_block_t* block;
+ ulint used;
+
+ ;
+ ;
+
+
+ block = dyn_array_get_first_block(arr);
+
+ if (arr->heap != ((void *)0)) {
+ used = dyn_block_get_used(block);
+
+ while (pos >= used) {
+ pos -= used;
+ block = (((block)->list).next);
+ ;
+
+ used = dyn_block_get_used(block);
+ }
+ }
+
+ ;
+ ;
+
+ return(block->data + pos);
+}
+
+
+
+static inline
+ulint
+dyn_array_get_data_size(
+
+
+ dyn_array_t* arr)
+{
+ dyn_block_t* block;
+ ulint sum = 0;
+
+ ;
+ ;
+
+ if (arr->heap == ((void *)0)) {
+
+ return(arr->used);
+ }
+
+
+ block = dyn_array_get_first_block(arr);
+
+ while (block != ((void *)0)) {
+ sum += dyn_block_get_used(block);
+ block = dyn_array_get_next_block(arr, block);
+ }
+
+ return(sum);
+}
+
+
+
+static inline
+void
+dyn_push_string(
+
+ dyn_array_t* arr,
+ const unsigned char* str,
+ ulint len)
+{
+ ulint n_copied;
+
+ while (len > 0) {
+ if (len > 512) {
+ n_copied = 512;
+ } else {
+ n_copied = len;
+ }
+
+ memcpy(dyn_array_push(arr, n_copied), str, n_copied);
+
+ str += n_copied;
+ len -= n_copied;
+ }
+}
+# 164 "./include/dyn0dyn.h" 2
+# 15 "./include/mtr0mtr.h" 2
+
+
+
+
+# 1 "./include/page0types.h" 1
+# 17 "./include/page0types.h"
+typedef unsigned char ib_page_t;
+typedef struct page_search_struct page_search_t;
+typedef struct page_cur_struct page_cur_t;
+# 20 "./include/mtr0mtr.h" 2
+# 139 "./include/mtr0mtr.h"
+static inline
+mtr_t*
+mtr_start(
+
+
+
+ mtr_t* mtr);
+
+
+
+
+mtr_t*
+mtr_start_noninline(
+
+
+
+ mtr_t* mtr);
+
+
+
+void
+mtr_commit(
+
+ mtr_t* mtr);
+
+
+static inline
+ulint
+mtr_set_savepoint(
+
+
+ mtr_t* mtr);
+
+
+
+
+
+void
+mtr_rollback_to_savepoint(
+
+ mtr_t* mtr,
+ ulint savepoint);
+
+
+
+static inline
+void
+mtr_release_s_latch_at_savepoint(
+
+ mtr_t* mtr,
+ ulint savepoint,
+ rw_lock_t* lock);
+
+
+static inline
+ulint
+mtr_get_log_mode(
+
+
+ mtr_t* mtr);
+
+
+static inline
+ulint
+mtr_set_log_mode(
+
+
+ mtr_t* mtr,
+ ulint mode);
+
+
+
+ulint
+mtr_read_ulint(
+
+
+ unsigned char* ptr,
+ ulint type,
+ mtr_t* mtr);
+
+
+
+dulint
+mtr_read_dulint(
+
+
+ unsigned char* ptr,
+ mtr_t* mtr);
+# 238 "./include/mtr0mtr.h"
+static inline
+void
+mtr_s_lock_func(
+
+ rw_lock_t* lock,
+ const char* file,
+ ulint line,
+ mtr_t* mtr);
+
+
+
+static inline
+void
+mtr_x_lock_func(
+
+ rw_lock_t* lock,
+ const char* file,
+ ulint line,
+ mtr_t* mtr);
+
+
+
+
+void
+mtr_memo_release(
+
+ mtr_t* mtr,
+ void* object,
+ ulint type);
+
+
+static inline
+ulint
+mtr_memo_contains(
+
+
+ mtr_t* mtr,
+ void* object,
+ ulint type);
+
+
+
+void
+mtr_print(
+
+ mtr_t* mtr);
+
+
+
+
+
+
+static inline
+dyn_array_t*
+mtr_get_log(
+
+
+ mtr_t* mtr);
+
+
+static inline
+void
+mtr_memo_push(
+
+ mtr_t* mtr,
+ void* object,
+ ulint type);
+
+
+
+typedef struct mtr_memo_slot_struct mtr_memo_slot_t;
+struct mtr_memo_slot_struct{
+ ulint type;
+ void* object;
+};
+
+
+struct mtr_struct{
+ ulint state;
+ dyn_array_t memo;
+ dyn_array_t log;
+ ulint modifications;
+
+
+ ulint n_log_recs;
+
+
+ ulint log_mode;
+
+ dulint start_lsn;
+
+ dulint end_lsn;
+
+ ulint magic_n;
+};
+# 341 "./include/mtr0mtr.h"
+# 1 "./include/mtr0mtr.ic" 1
+# 16 "./include/mtr0mtr.ic"
+static inline
+mtr_t*
+mtr_start(
+
+
+
+ mtr_t* mtr)
+{
+ dyn_array_create(&(mtr->memo));
+ dyn_array_create(&(mtr->log));
+
+ mtr->log_mode = 21;
+ mtr->modifications = (0);
+ mtr->n_log_recs = 0;
+
+
+
+
+
+ return(mtr);
+}
+
+
+
+static inline
+void
+mtr_memo_push(
+
+ mtr_t* mtr,
+ void* object,
+ ulint type)
+{
+ dyn_array_t* memo;
+ mtr_memo_slot_t* slot;
+
+ ;
+ ;
+ ;
+ ;
+ ;
+
+ memo = &(mtr->memo);
+
+ slot = dyn_array_push(memo, sizeof(mtr_memo_slot_t));
+
+ slot->object = object;
+ slot->type = type;
+}
+
+
+
+static inline
+ulint
+mtr_set_savepoint(
+
+
+ mtr_t* mtr)
+{
+ dyn_array_t* memo;
+
+ ;
+ ;
+
+ memo = &(mtr->memo);
+
+ return(dyn_array_get_data_size(memo));
+}
+
+
+
+
+static inline
+void
+mtr_release_s_latch_at_savepoint(
+
+ mtr_t* mtr,
+ ulint savepoint,
+ rw_lock_t* lock)
+{
+ mtr_memo_slot_t* slot;
+ dyn_array_t* memo;
+
+ ;
+ ;
+ ;
+
+ memo = &(mtr->memo);
+
+ ;
+
+ slot = dyn_array_get_element(memo, savepoint);
+
+ ;
+ ;
+
+ rw_lock_s_unlock_func(lock);
+
+ slot->object = ((void *)0);
+}
+
+
+
+static inline
+ulint
+mtr_memo_contains(
+
+
+ mtr_t* mtr,
+ void* object,
+ ulint type)
+{
+ mtr_memo_slot_t* slot;
+ dyn_array_t* memo;
+ ulint offset;
+
+ ;
+ ;
+
+ memo = &(mtr->memo);
+
+ offset = dyn_array_get_data_size(memo);
+
+ while (offset > 0) {
+ offset -= sizeof(mtr_memo_slot_t);
+
+ slot = dyn_array_get_element(memo, offset);
+
+ if ((object == slot->object) && (type == slot->type)) {
+
+ return((1));
+ }
+ }
+
+ return((0));
+}
+
+
+
+static inline
+dyn_array_t*
+mtr_get_log(
+
+
+ mtr_t* mtr)
+{
+ ;
+ ;
+
+ return(&(mtr->log));
+}
+
+
+
+static inline
+ulint
+mtr_get_log_mode(
+
+
+ mtr_t* mtr)
+{
+ ;
+ ;
+ ;
+
+ return(mtr->log_mode);
+}
+
+
+
+static inline
+ulint
+mtr_set_log_mode(
+
+
+ mtr_t* mtr,
+ ulint mode)
+{
+ ulint old_mode;
+
+ ;
+ ;
+ ;
+
+ old_mode = mtr->log_mode;
+
+ if ((mode == 24) && (old_mode == 22)) {
+
+ } else {
+ mtr->log_mode = mode;
+ }
+
+ ;
+ ;
+
+ return(old_mode);
+}
+
+
+
+static inline
+void
+mtr_s_lock_func(
+
+ rw_lock_t* lock,
+ const char* file,
+ ulint line,
+ mtr_t* mtr)
+{
+ ;
+ ;
+
+ rw_lock_s_lock_func(lock, 0, file, line);
+
+ mtr_memo_push(mtr, lock, 55);
+}
+
+
+
+static inline
+void
+mtr_x_lock_func(
+
+ rw_lock_t* lock,
+ const char* file,
+ ulint line,
+ mtr_t* mtr)
+{
+ ;
+ ;
+
+ rw_lock_x_lock_func(lock, 0, file, line);
+
+ mtr_memo_push(mtr, lock, 56);
+}
+# 342 "./include/mtr0mtr.h" 2
+# 11 "./include/buf0flu.ic" 2
+
+
+
+
+void
+buf_flush_insert_into_flush_list(
+
+ buf_block_t* block);
+
+
+
+
+
+void
+buf_flush_insert_sorted_into_flush_list(
+
+ buf_block_t* block);
+
+
+
+
+
+static inline
+void
+buf_flush_note_modification(
+
+ buf_block_t* block,
+ mtr_t* mtr)
+{
+ ;
+ ;
+ ;
+
+
+
+
+
+ ;
+ ;
+ ;
+
+ block->newest_modification = mtr->end_lsn;
+
+ if (ut_dulint_is_zero(block->oldest_modification)) {
+
+ block->oldest_modification = mtr->start_lsn;
+ ;
+
+ buf_flush_insert_into_flush_list(block);
+ } else {
+ ;
+
+ }
+
+ ++srv_buf_pool_write_requests;
+}
+
+
+
+static inline
+void
+buf_flush_recv_note_modification(
+
+ buf_block_t* block,
+ dulint start_lsn,
+
+ dulint end_lsn)
+
+{
+ ;
+ ;
+ ;
+
+
+
+
+ mutex_enter_func((&(buf_pool->flush_list_mutex)), "./include/buf0flu.ic", 87);
+
+ ;
+
+ block->newest_modification = end_lsn;
+
+ if (ut_dulint_is_zero(block->oldest_modification)) {
+
+ block->oldest_modification = start_lsn;
+
+ ;
+
+ buf_flush_insert_sorted_into_flush_list(block);
+ } else {
+ ;
+
+ }
+
+ mutex_exit(&(buf_pool->flush_list_mutex));
+}
+# 119 "./include/buf0flu.h" 2
+# 10 "./include/buf0buf.ic" 2
+# 1 "./include/buf0lru.h" 1
+# 25 "./include/buf0lru.h"
+void
+buf_LRU_try_free_flushed_blocks(void);
+
+
+
+
+
+
+ulint
+buf_LRU_buf_pool_running_out(void);
+# 55 "./include/buf0lru.h"
+void
+buf_LRU_invalidate_tablespace(
+
+ ulint id);
+
+
+
+
+
+ulint
+buf_LRU_get_recent_limit(void);
+
+
+
+
+
+
+ulint
+buf_LRU_search_and_free_block(
+
+
+ ulint n_iterations);
+# 87 "./include/buf0lru.h"
+buf_block_t*
+buf_LRU_get_free_block(void);
+
+
+
+
+
+
+
+void
+buf_LRU_block_free_non_file_page(
+
+ buf_block_t* block);
+
+
+
+void
+buf_LRU_add_block(
+
+ buf_block_t* block,
+ ulint old);
+
+
+
+
+
+
+void
+buf_LRU_make_block_young(
+
+ buf_block_t* block);
+
+
+
+void
+buf_LRU_make_block_old(
+
+ buf_block_t* block);
+
+
+
+ulint
+buf_LRU_validate(void);
+
+
+
+
+void
+buf_LRU_print(void);
+
+
+
+# 1 "./include/buf0lru.ic" 1
+# 140 "./include/buf0lru.h" 2
+# 11 "./include/buf0buf.ic" 2
+# 1 "./include/buf0rea.h" 1
+# 23 "./include/buf0rea.h"
+ulint
+buf_read_page(
+
+
+
+ ulint space,
+ ulint offset,
+ trx_t* trx);
+# 55 "./include/buf0rea.h"
+ulint
+buf_read_ahead_linear(
+
+
+ ulint space,
+ ulint offset,
+
+ trx_t* trx);
+
+
+
+
+
+void
+buf_read_ibuf_merge_pages(
+
+ ulint sync,
+
+
+ ulint* space_ids,
+ ib_longlong* space_versions,
+
+
+
+
+ ulint* page_nos,
+
+ ulint n_stored);
+
+
+
+void
+buf_read_recv_pages(
+
+ ulint sync,
+
+
+ ulint space,
+ ulint* page_nos,
+
+ ulint n_stored);
+# 12 "./include/buf0buf.ic" 2
+
+
+
+
+
+void
+buf_print_diagnostic(
+
+ mtr_t* mtr,
+ const buf_block_t* block);
+# 32 "./include/buf0buf.ic"
+static inline
+ulint
+buf_block_peek_if_too_old(
+
+
+ buf_block_t* block)
+{
+ return(buf_pool->freed_page_clock >= block->freed_page_clock
+ + 1 + (buf_pool->curr_size / 1024));
+}
+
+
+
+
+static inline
+ulint
+buf_pool_get_curr_size(void)
+
+
+{
+ return((buf_pool->n_frames) * (2 * 8192));
+}
+
+
+
+
+static inline
+ulint
+buf_pool_get_max_size(void)
+
+
+{
+ return((buf_pool->n_frames) * (2 * 8192));
+}
+
+
+
+static inline
+buf_block_t*
+buf_pool_get_nth_block(
+
+
+ buf_pool_t* buf_pool,
+ ulint i)
+{
+ ;
+ ;
+
+ return(i + buf_pool->blocks);
+}
+
+
+
+
+static inline
+ulint
+buf_pool_is_block(
+
+
+ void* ptr)
+{
+ if ((buf_pool->blocks <= (buf_block_t*)ptr)
+ && ((buf_block_t*)ptr < buf_pool->blocks + buf_pool->max_size)) {
+
+ return((1));
+ }
+
+ return((0));
+}
+
+
+
+
+static inline
+dulint
+buf_pool_get_oldest_modification(void)
+
+
+
+{
+ buf_block_t* block;
+ dulint lsn;
+
+ mutex_enter_func((&(buf_pool->flush_list_mutex)), "./include/buf0buf.ic", 115);
+
+ block = (buf_pool->flush_list).end;
+
+ if (block == ((void *)0)) {
+ lsn = ut_dulint_zero;
+ } else {
+ lsn = block->oldest_modification;
+ }
+
+ mutex_exit(&(buf_pool->flush_list_mutex));
+
+ return(lsn);
+}
+
+
+
+
+static inline
+ulint
+buf_pool_clock_tic(void)
+
+
+{
+
+
+
+
+ buf_pool->ulint_clock++;
+
+ return(buf_pool->ulint_clock);
+}
+
+
+
+static inline
+buf_frame_t*
+buf_block_get_frame(
+
+
+ buf_block_t* block)
+{
+ ;
+ ;
+ ;
+ ;
+ ;
+
+
+ return(block->frame);
+}
+
+
+
+static inline
+ulint
+buf_block_get_space(
+
+
+ buf_block_t* block)
+{
+ ;
+ ;
+ ;
+ do { if (__builtin_expect(!((ulint)(block->state == 213)), (0))) { ut_dbg_assertion_failed("block->state == BUF_BLOCK_FILE_PAGE", "./include/buf0buf.ic", (ulint) 179); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("./include/buf0buf.ic", (ulint) 179); } while (0); } while (0);
+ ;
+
+ return(block->space);
+}
+
+
+
+static inline
+ulint
+buf_block_get_page_no(
+
+
+ buf_block_t* block)
+{
+ ;
+ ;
+ ;
+ do { if (__builtin_expect(!((ulint)(block->state == 213)), (0))) { ut_dbg_assertion_failed("block->state == BUF_BLOCK_FILE_PAGE", "./include/buf0buf.ic", (ulint) 197); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("./include/buf0buf.ic", (ulint) 197); } while (0); } while (0);
+ ;
+
+ return(block->offset);
+}
+
+
+
+static inline
+buf_block_t*
+buf_block_align(
+
+
+ unsigned char* ptr)
+{
+ buf_block_t* block;
+ buf_frame_t* frame_zero;
+
+ ;
+
+ frame_zero = buf_pool->frame_zero;
+
+ if (__builtin_expect((ulint)ptr < (ulint)frame_zero, (0))
+ || __builtin_expect((ulint)ptr > (ulint)(buf_pool->high_end), (0))) {
+
+ ut_print_timestamp(stderr);
+ fprintf(stderr,
+"InnoDB: Error: trying to access a stray pointer %p\n"
+"InnoDB: buf pool start is at %p, end at %p\n"
+"InnoDB: Probable reason is database corruption or memory\n"
+"InnoDB: corruption. If this happens in an InnoDB database recovery, see\n"
+"InnoDB: http://dev.mysql.com/doc/refman/5.0/en/forcing-recovery.html\n"
+"InnoDB: how to force recovery.\n",
+ ptr, frame_zero,
+ buf_pool->high_end);
+ do { ut_dbg_assertion_failed(0, "./include/buf0buf.ic", (ulint) 232); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } while (0);
+ }
+
+ block = *(buf_pool->blocks_of_frames + (((ulint)(ptr - frame_zero))
+ >> 14));
+ return(block);
+}
+
+
+
+static inline
+buf_frame_t*
+buf_frame_align(
+
+
+ unsigned char* ptr)
+{
+ buf_frame_t* frame;
+
+ ;
+
+ frame = ut_align_down(ptr, (2 * 8192));
+
+ if (__builtin_expect((ulint)frame < (ulint)(buf_pool->frame_zero), (0))
+ || __builtin_expect((ulint)frame >= (ulint)(buf_pool->high_end), (0))) {
+
+ ut_print_timestamp(stderr);
+ fprintf(stderr,
+"InnoDB: Error: trying to access a stray pointer %p\n"
+"InnoDB: buf pool start is at %p, end at %p\n"
+"InnoDB: Probable reason is database corruption or memory\n"
+"InnoDB: corruption. If this happens in an InnoDB database recovery, see\n"
+"InnoDB: http://dev.mysql.com/doc/refman/5.0/en/forcing-recovery.html\n"
+"InnoDB: how to force recovery.\n",
+ ptr, buf_pool->frame_zero,
+ buf_pool->high_end);
+ do { ut_dbg_assertion_failed(0, "./include/buf0buf.ic", (ulint) 268); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } while (0);
+ }
+
+ return(frame);
+}
+
+
+
+
+static inline
+ulint
+buf_frame_get_page_no(
+
+
+ unsigned char* ptr)
+{
+ return(buf_block_get_page_no(buf_block_align(ptr)));
+}
+
+
+
+
+static inline
+ulint
+buf_frame_get_space_id(
+
+
+ unsigned char* ptr)
+{
+ return(buf_block_get_space(buf_block_align(ptr)));
+}
+
+
+
+
+static inline
+void
+buf_ptr_get_fsp_addr(
+
+ unsigned char* ptr,
+ ulint* space,
+ fil_addr_t* addr)
+{
+ buf_block_t* block;
+
+ block = buf_block_align(ptr);
+
+ *space = buf_block_get_space(block);
+ addr->page = buf_block_get_page_no(block);
+ addr->boffset = ptr - buf_frame_align(ptr);
+}
+
+
+
+
+static inline
+ulint
+buf_frame_get_lock_hash_val(
+
+
+ unsigned char* ptr)
+{
+ buf_block_t* block;
+
+ block = buf_block_align(ptr);
+
+ return(block->lock_hash_val);
+}
+
+
+
+
+static inline
+ib_mutex_t*
+buf_frame_get_mutex(
+
+
+ unsigned char* ptr)
+{
+ buf_block_t* block;
+
+ block = buf_block_align(ptr);
+
+ return(&block->mutex);
+}
+
+
+
+static inline
+unsigned char*
+buf_frame_copy(
+
+
+ unsigned char* buf,
+ buf_frame_t* frame)
+{
+ ;
+
+ ut_memcpy(buf, frame, (2 * 8192));
+
+ return(buf);
+}
+
+
+
+
+static inline
+ulint
+buf_page_address_fold(
+
+
+ ulint space,
+ ulint offset)
+{
+ return((space << 20) + space + offset);
+}
+
+
+
+
+static inline
+ulint
+buf_page_io_query(
+
+
+ buf_block_t* block)
+{
+ mutex_enter_func((&block->mutex), "./include/buf0buf.ic", 395);
+
+ ;
+ ;
+
+ if (block->io_fix != 0) {
+ mutex_exit(&block->mutex);
+
+ return((1));
+ }
+
+ mutex_exit(&block->mutex);
+
+ return((0));
+}
+
+
+
+
+static inline
+dulint
+buf_frame_get_newest_modification(
+
+
+ buf_frame_t* frame)
+{
+ buf_block_t* block;
+ dulint lsn;
+
+ ;
+
+ block = buf_block_align(frame);
+
+ mutex_enter_func((&block->mutex), "./include/buf0buf.ic", 428);
+
+ if (block->state == 213) {
+ lsn = block->newest_modification;
+ } else {
+ lsn = ut_dulint_zero;
+ }
+
+ mutex_exit(&block->mutex);
+
+ return(lsn);
+}
+
+
+
+
+
+static inline
+dulint
+buf_frame_modify_clock_inc(
+
+
+ buf_frame_t* frame)
+{
+ buf_block_t* block;
+
+ ;
+
+ block = buf_block_align(frame);
+
+
+
+
+
+
+ { if ((block->modify_clock).low == 0xFFFFFFFFUL) { (block->modify_clock).high = (block->modify_clock).high + 1; (block->modify_clock).low = 0; } else { (block->modify_clock).low = (block->modify_clock).low + 1; }};
+
+ return(block->modify_clock);
+}
+
+
+
+
+
+static inline
+dulint
+buf_block_modify_clock_inc(
+
+
+ buf_block_t* block)
+{
+
+
+
+
+
+ { if ((block->modify_clock).low == 0xFFFFFFFFUL) { (block->modify_clock).high = (block->modify_clock).high + 1; (block->modify_clock).low = 0; } else { (block->modify_clock).low = (block->modify_clock).low + 1; }};
+
+ return(block->modify_clock);
+}
+
+
+
+
+static inline
+dulint
+buf_block_get_modify_clock(
+
+
+ buf_block_t* block)
+{
+
+
+
+
+
+ return(block->modify_clock);
+}
+# 531 "./include/buf0buf.ic"
+static inline
+void
+buf_block_buf_fix_inc(
+
+ buf_block_t* block)
+{
+
+
+
+ block->buf_fix_count++;
+}
+
+
+
+static inline
+buf_block_t*
+buf_page_hash_get(
+
+
+ ulint space,
+ ulint offset)
+{
+ buf_block_t* block;
+ ulint fold;
+
+ ;
+
+
+
+
+
+
+ fold = buf_page_address_fold(space, offset);
+
+ { (block) = (hash_get_nth_cell(buf_pool->page_hash, hash_calc_hash(fold, buf_pool->page_hash))->node); while ((block) != ((void *)0)) { if ((block->space == space) && (block->offset == offset)) { break; } else { (block) = ((block)->hash); } }};
+
+ do { if (__builtin_expect(!((ulint)(block == ((void *)0) || block->state == 213)), (0))) { ut_dbg_assertion_failed("block == NULL || block->state == BUF_BLOCK_FILE_PAGE", "./include/buf0buf.ic", (ulint) 567); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("./include/buf0buf.ic", (ulint) 567); } while (0); } while (0);
+
+ return(block);
+}
+
+
+
+
+
+
+static inline
+buf_frame_t*
+buf_page_get_release_on_io(
+
+
+
+ ulint space,
+ ulint offset,
+
+ buf_frame_t* guess,
+ ulint rw_latch,
+
+ ulint savepoint,
+ mtr_t* mtr)
+{
+ buf_frame_t* frame;
+
+ frame = buf_page_get_gen(space, offset, rw_latch, guess,
+ 11,
+ "./include/buf0buf.ic", 596,
+ mtr);
+ if (frame != ((void *)0)) {
+
+ return(frame);
+ }
+
+
+
+
+ mtr_rollback_to_savepoint(mtr, savepoint);
+
+ buf_page_get_gen( space, offset, 1, ((void *)0), 10, "./include/buf0buf.ic", 608, mtr);
+
+
+
+
+ mtr_rollback_to_savepoint(mtr, savepoint);
+
+ return(((void *)0));
+}
+
+
+
+
+static inline
+void
+buf_page_release(
+
+ buf_block_t* block,
+ ulint rw_latch,
+
+ mtr_t* mtr)
+{
+ ;
+
+ do { if (__builtin_expect(!((ulint)(block->state == 213)), (0))) { ut_dbg_assertion_failed("block->state == BUF_BLOCK_FILE_PAGE", "./include/buf0buf.ic", (ulint) 632); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("./include/buf0buf.ic", (ulint) 632); } while (0); } while (0);
+
+ if (rw_latch == 2 && mtr->modifications) {
+ mutex_enter_func((&buf_pool->flush_list_mutex), "./include/buf0buf.ic", 635);
+ buf_flush_note_modification(block, mtr);
+ mutex_exit(&buf_pool->flush_list_mutex);
+ }
+
+ mutex_enter_func((&block->mutex), "./include/buf0buf.ic", 640);
+
+
+ if (__builtin_expect(block->buf_fix_count == 0, (0))) {
+ buf_print_diagnostic(mtr, block);
+ do { ut_dbg_assertion_failed(0, "./include/buf0buf.ic", (ulint) 645); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } while (0);
+ }
+
+
+
+
+ --block->buf_fix_count;
+
+ mutex_exit(&block->mutex);
+
+ if (rw_latch == 1) {
+ rw_lock_s_unlock_func(&(block->lock));
+ } else if (rw_latch == 2) {
+ rw_lock_x_unlock_func(&(block->lock));
+ }
+}
+# 1105 "./include/buf0buf.h" 2
+# 24 "buf/buf0buf.c" 2
+
+
+
+
+
+# 1 "./include/mem0mem.h" 1
+# 30 "buf/buf0buf.c" 2
+# 1 "./include/btr0btr.h" 1
+# 14 "./include/btr0btr.h"
+# 1 "./include/dict0dict.h" 1
+# 14 "./include/dict0dict.h"
+# 1 "./include/dict0mem.h" 1
+# 14 "./include/dict0mem.h"
+# 1 "./include/data0type.h" 1
+# 14 "./include/data0type.h"
+extern ulint data_mysql_default_charset_coll;
+
+
+
+
+typedef struct dtype_struct dtype_t;
+
+
+
+extern dtype_t* dtype_binary;
+# 162 "./include/data0type.h"
+static inline
+ulint
+dtype_get_mysql_type(
+
+
+
+ dtype_t* type);
+
+
+
+
+
+ulint
+dtype_get_at_most_n_mbchars(
+
+
+
+ const dtype_t* dtype,
+ ulint prefix_len,
+
+
+ ulint data_len,
+ const char* str);
+
+
+
+
+
+ulint
+dtype_is_string_type(
+
+
+ ulint mtype);
+
+
+
+
+
+ulint
+dtype_is_binary_string_type(
+
+
+ ulint mtype,
+ ulint prtype);
+
+
+
+
+
+
+ulint
+dtype_is_non_binary_string_type(
+
+
+ ulint mtype,
+ ulint prtype);
+
+
+static inline
+void
+dtype_set(
+
+ dtype_t* type,
+ ulint mtype,
+ ulint prtype,
+ ulint len,
+ ulint prec);
+
+
+static inline
+void
+dtype_copy(
+
+ dtype_t* type1,
+ dtype_t* type2);
+
+
+static inline
+ulint
+dtype_get_mtype(
+
+ dtype_t* type);
+
+
+static inline
+ulint
+dtype_get_prtype(
+
+ dtype_t* type);
+
+
+
+ulint
+dtype_get_charset_coll_noninline(
+
+ ulint prtype);
+
+
+static inline
+ulint
+dtype_get_charset_coll(
+
+ ulint prtype);
+
+
+
+
+ulint
+dtype_form_prtype(
+
+ ulint old_prtype,
+
+ ulint charset_coll);
+
+
+static inline
+ulint
+dtype_get_len(
+
+ dtype_t* type);
+
+
+static inline
+ulint
+dtype_get_prec(
+
+ dtype_t* type);
+
+
+static inline
+ulint
+dtype_get_mbminlen(
+
+
+
+ const dtype_t* type);
+
+
+static inline
+ulint
+dtype_get_mbmaxlen(
+
+
+
+ const dtype_t* type);
+
+
+static inline
+ulint
+dtype_get_pad_char(
+
+
+
+ const dtype_t* type);
+
+
+static inline
+ulint
+dtype_get_fixed_size(
+
+
+ dtype_t* type);
+
+
+static inline
+ulint
+dtype_get_min_size(
+
+
+ const dtype_t* type);
+
+
+
+static inline
+ulint
+dtype_get_sql_null_size(
+
+
+ dtype_t* type);
+
+
+static inline
+ulint
+dtype_is_fixed_size(
+
+
+ dtype_t* type);
+
+
+
+static inline
+void
+dtype_read_for_order_and_null_size(
+
+ dtype_t* type,
+ unsigned char* buf);
+
+
+
+
+static inline
+void
+dtype_new_store_for_order_and_null_size(
+
+ unsigned char* buf,
+
+
+ dtype_t* type,
+ ulint prefix_len);
+
+
+
+
+
+static inline
+void
+dtype_new_read_for_order_and_null_size(
+
+ dtype_t* type,
+ unsigned char* buf);
+
+
+
+
+ulint
+dtype_validate(
+
+
+ dtype_t* type);
+
+
+
+void
+dtype_print(
+
+ dtype_t* type);
+# 407 "./include/data0type.h"
+struct dtype_struct{
+ ulint mtype;
+ ulint prtype;
+
+
+
+
+
+
+
+ ulint len;
+
+
+
+
+
+ ulint prec;
+
+ ulint mbminlen;
+ ulint mbmaxlen;
+};
+
+
+# 1 "./include/data0type.ic" 1
+# 16 "./include/data0type.ic"
+extern
+void
+innobase_get_cset_width(
+
+ ulint cset,
+ ulint* mbminlen,
+ ulint* mbmaxlen);
+
+
+
+static inline
+ulint
+dtype_get_charset_coll(
+
+ ulint prtype)
+{
+ return((prtype >> 16) & 0xFFUL);
+}
+
+
+
+static inline
+ulint
+dtype_get_mysql_type(
+
+
+
+ dtype_t* type)
+{
+ return(type->prtype & 0xFFUL);
+}
+
+
+
+static inline
+void
+dtype_set_mblen(
+
+ dtype_t* type)
+{
+ ;
+ if (dtype_is_string_type(type->mtype)) {
+ innobase_get_cset_width(dtype_get_charset_coll(type->prtype),
+ &type->mbminlen, &type->mbmaxlen);
+ ;
+ } else {
+ type->mbminlen = type->mbmaxlen = 0;
+ }
+}
+
+
+
+static inline
+void
+dtype_set(
+
+ dtype_t* type,
+ ulint mtype,
+ ulint prtype,
+ ulint len,
+ ulint prec)
+{
+ ;
+ ;
+
+ type->mtype = mtype;
+ type->prtype = prtype;
+ type->len = len;
+ type->prec = prec;
+
+ dtype_set_mblen(type);
+ ;
+}
+
+
+
+static inline
+void
+dtype_copy(
+
+ dtype_t* type1,
+ dtype_t* type2)
+{
+ *type1 = *type2;
+
+ ;
+}
+
+
+
+static inline
+ulint
+dtype_get_mtype(
+
+ dtype_t* type)
+{
+ ;
+
+ return(type->mtype);
+}
+
+
+
+static inline
+ulint
+dtype_get_prtype(
+
+ dtype_t* type)
+{
+ ;
+
+ return(type->prtype);
+}
+
+
+
+static inline
+ulint
+dtype_get_len(
+
+ dtype_t* type)
+{
+ ;
+
+ return(type->len);
+}
+
+
+
+static inline
+ulint
+dtype_get_prec(
+
+ dtype_t* type)
+{
+ ;
+
+ return(type->prec);
+}
+
+
+
+static inline
+ulint
+dtype_get_mbminlen(
+
+
+
+ const dtype_t* type)
+{
+ ;
+ return(type->mbminlen);
+}
+
+
+static inline
+ulint
+dtype_get_mbmaxlen(
+
+
+
+ const dtype_t* type)
+{
+ ;
+ return(type->mbmaxlen);
+}
+
+
+
+static inline
+ulint
+dtype_get_pad_char(
+
+
+
+ const dtype_t* type)
+{
+ switch (type->mtype) {
+ case 3:
+ case 4:
+ if (__builtin_expect(dtype_get_charset_coll(type->prtype) == 63, (0))) {
+
+
+
+ return(((ulint)(-1)));
+ }
+
+ case 2:
+ case 1:
+ case 13:
+ case 12:
+
+
+
+ return(0x20);
+ case 5:
+ if ((type->prtype & 1024) == 0) {
+ return(0x20);
+ }
+
+ default:
+
+ return(((ulint)(-1)));
+ }
+}
+
+
+
+
+
+static inline
+void
+dtype_new_store_for_order_and_null_size(
+
+ unsigned char* buf,
+
+
+ dtype_t* type,
+ ulint prefix_len)
+
+{
+
+
+
+ ulint len;
+
+ buf[0] = (unsigned char)(type->mtype & 0xFFUL);
+
+ if (type->prtype & 1024) {
+ buf[0] = buf[0] | 128;
+ }
+
+
+
+
+
+
+ buf[1] = (unsigned char)(type->prtype & 0xFFUL);
+
+ len = prefix_len ? prefix_len : type->len;
+
+ mach_write_to_2(buf + 2, len & 0xFFFFUL);
+
+ ;
+ mach_write_to_2(buf + 4, dtype_get_charset_coll(type->prtype));
+
+ if (type->prtype & 256) {
+ buf[4] |= 128;
+ }
+}
+
+
+
+
+
+static inline
+void
+dtype_read_for_order_and_null_size(
+
+ dtype_t* type,
+ unsigned char* buf)
+{
+ ;
+
+ type->mtype = buf[0] & 63;
+ type->prtype = buf[1];
+
+ if (buf[0] & 128) {
+ type->prtype = type->prtype | 1024;
+ }
+
+ type->len = mach_read_from_2(buf + 2);
+
+ type->prtype = dtype_form_prtype(type->prtype,
+ data_mysql_default_charset_coll);
+ dtype_set_mblen(type);
+}
+
+
+
+
+
+static inline
+void
+dtype_new_read_for_order_and_null_size(
+
+ dtype_t* type,
+ unsigned char* buf)
+{
+ ulint charset_coll;
+
+
+
+
+
+ type->mtype = buf[0] & 63;
+ type->prtype = buf[1];
+
+ if (buf[0] & 128) {
+ type->prtype |= 1024;
+ }
+
+ if (buf[4] & 128) {
+ type->prtype |= 256;
+ }
+
+ type->len = mach_read_from_2(buf + 2);
+
+ mach_read_from_2(buf + 4);
+
+ charset_coll = mach_read_from_2(buf + 4) & 0x7fff;
+
+ if (dtype_is_string_type(type->mtype)) {
+ do { if (__builtin_expect(!((ulint)(charset_coll < 256)), (0))) { ut_dbg_assertion_failed("charset_coll < 256", "./include/data0type.ic", (ulint) 329); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("./include/data0type.ic", (ulint) 329); } while (0); } while (0);
+
+ if (charset_coll == 0) {
+
+
+
+
+
+
+ charset_coll = data_mysql_default_charset_coll;
+ }
+
+ type->prtype = dtype_form_prtype(type->prtype, charset_coll);
+ }
+ dtype_set_mblen(type);
+}
+
+
+
+
+static inline
+ulint
+dtype_get_fixed_size(
+
+
+ dtype_t* type)
+{
+ ulint mtype;
+
+ mtype = dtype_get_mtype(type);
+
+ switch (mtype) {
+ case 8:
+# 381 "./include/data0type.ic"
+ case 2:
+ case 3:
+ case 6:
+ case 9:
+ case 10:
+ return(dtype_get_len(type));
+ case 13:
+ if (type->prtype & 1024) {
+ return(dtype_get_len(type));
+ } else {
+# 399 "./include/data0type.ic"
+ ulint mbminlen, mbmaxlen;
+
+ innobase_get_cset_width(
+ dtype_get_charset_coll(type->prtype),
+ &mbminlen, &mbmaxlen);
+
+ if (__builtin_expect(type->mbminlen != mbminlen, (0))
+ || __builtin_expect(type->mbmaxlen != mbmaxlen, (0))) {
+
+ ut_print_timestamp(stderr);
+ fprintf(stderr, " InnoDB: "
+ "mbminlen=%lu, "
+ "mbmaxlen=%lu, "
+ "type->mbminlen=%lu, "
+ "type->mbmaxlen=%lu\n",
+ (ulong) mbminlen,
+ (ulong) mbmaxlen,
+ (ulong) type->mbminlen,
+ (ulong) type->mbmaxlen);
+ }
+ if (mbminlen == mbmaxlen) {
+ return(dtype_get_len(type));
+ }
+ }
+
+ case 1:
+ case 4:
+ case 11:
+ case 12:
+ case 5:
+ return(0);
+ default: do { ut_dbg_assertion_failed(0, "./include/data0type.ic", (ulint) 430); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } while (0);
+ }
+
+ return(0);
+}
+
+
+
+static inline
+ulint
+dtype_get_min_size(
+
+
+ const dtype_t* type)
+{
+ switch (type->mtype) {
+ case 8:
+# 466 "./include/data0type.ic"
+ case 2:
+ case 3:
+ case 6:
+ case 9:
+ case 10:
+ return(type->len);
+ case 13:
+ if ((type->prtype & 1024)
+ || type->mbminlen == type->mbmaxlen) {
+ return(type->len);
+ }
+
+ do { if (__builtin_expect(!((ulint)(type->mbminlen > 0)), (0))) { ut_dbg_assertion_failed("type->mbminlen > 0", "./include/data0type.ic", (ulint) 478); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("./include/data0type.ic", (ulint) 478); } while (0); } while (0);
+ do { if (__builtin_expect(!((ulint)(type->mbmaxlen > type->mbminlen)), (0))) { ut_dbg_assertion_failed("type->mbmaxlen > type->mbminlen", "./include/data0type.ic", (ulint) 479); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("./include/data0type.ic", (ulint) 479); } while (0); } while (0);
+ do { if (__builtin_expect(!((ulint)(type->len % type->mbmaxlen == 0)), (0))) { ut_dbg_assertion_failed("type->len % type->mbmaxlen == 0", "./include/data0type.ic", (ulint) 480); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("./include/data0type.ic", (ulint) 480); } while (0); } while (0);
+ return(type->len * type->mbminlen / type->mbmaxlen);
+ case 1:
+ case 4:
+ case 11:
+ case 12:
+ case 5:
+ return(0);
+ default: do { ut_dbg_assertion_failed(0, "./include/data0type.ic", (ulint) 488); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } while (0);
+ }
+
+ return(0);
+}
+
+
+
+
+
+static inline
+ulint
+dtype_get_sql_null_size(
+
+
+ dtype_t* type)
+{
+ return(dtype_get_fixed_size(type));
+}
+
+
+
+static inline
+ulint
+dtype_is_fixed_size(
+
+
+ dtype_t* type)
+{
+ ulint size;
+
+ size = dtype_get_fixed_size(type);
+
+ if (size) {
+ return((1));
+ }
+
+ return((0));
+}
+# 431 "./include/data0type.h" 2
+# 15 "./include/dict0mem.h" 2
+# 1 "./include/data0data.h" 1
+# 14 "./include/data0data.h"
+# 1 "./include/data0types.h" 1
+# 13 "./include/data0types.h"
+typedef struct dfield_struct dfield_t;
+
+
+typedef struct dtuple_struct dtuple_t;
+# 15 "./include/data0data.h" 2
+
+
+
+
+typedef struct big_rec_struct big_rec_t;
+
+
+void
+dfield_set_data_noninline(
+ dfield_t* field,
+ void* data,
+ ulint len);
+void*
+dfield_get_data_noninline(
+ dfield_t* field);
+ulint
+dfield_get_len_noninline(
+ dfield_t* field);
+ulint
+dtuple_get_n_fields_noninline(
+ dtuple_t* tuple);
+dfield_t*
+dtuple_get_nth_field_noninline(
+ dtuple_t* tuple,
+ ulint n);
+
+
+
+static inline
+dtype_t*
+dfield_get_type(
+
+
+ dfield_t* field);
+
+
+static inline
+void
+dfield_set_type(
+
+ dfield_t* field,
+ dtype_t* type);
+
+
+static inline
+void*
+dfield_get_data(
+
+
+ dfield_t* field);
+
+
+static inline
+ulint
+dfield_get_len(
+
+
+
+ dfield_t* field);
+
+
+static inline
+void
+dfield_set_len(
+
+ dfield_t* field,
+ ulint len);
+
+
+static inline
+void
+dfield_set_data(
+
+ dfield_t* field,
+ const void* data,
+ ulint len);
+
+
+static inline
+void
+data_write_sql_null(
+
+ unsigned char* data,
+ ulint len);
+
+
+static inline
+void
+dfield_copy_data(
+
+ dfield_t* field1,
+ dfield_t* field2);
+
+
+static inline
+void
+dfield_copy(
+
+ dfield_t* field1,
+ dfield_t* field2);
+
+
+static inline
+ulint
+dfield_datas_are_binary_equal(
+
+
+ dfield_t* field1,
+ dfield_t* field2);
+
+
+
+ulint
+dfield_data_is_binary_equal(
+
+
+ dfield_t* field,
+ ulint len,
+ unsigned char* data);
+
+
+static inline
+ulint
+dtuple_get_n_fields(
+
+
+ dtuple_t* tuple);
+
+
+static inline
+dfield_t*
+dtuple_get_nth_field(
+
+
+ dtuple_t* tuple,
+ ulint n);
+
+
+static inline
+ulint
+dtuple_get_info_bits(
+
+
+ dtuple_t* tuple);
+
+
+static inline
+void
+dtuple_set_info_bits(
+
+ dtuple_t* tuple,
+ ulint info_bits);
+
+
+static inline
+ulint
+dtuple_get_n_fields_cmp(
+
+
+
+ dtuple_t* tuple);
+
+
+static inline
+void
+dtuple_set_n_fields_cmp(
+
+ dtuple_t* tuple,
+ ulint n_fields_cmp);
+
+
+
+
+static inline
+dtuple_t*
+dtuple_create(
+
+
+ mem_heap_t* heap,
+
+ ulint n_fields);
+
+
+
+
+dtuple_t*
+dtuple_create_for_mysql(
+
+
+ void** heap,
+ ulint n_fields);
+
+
+
+void
+dtuple_free_for_mysql(
+
+ void* heap);
+
+
+
+
+void
+dtuple_set_n_fields(
+
+ dtuple_t* tuple,
+ ulint n_fields);
+
+
+
+static inline
+ulint
+dtuple_get_data_size(
+
+
+ dtuple_t* tuple);
+
+
+
+
+
+ulint
+dtuple_datas_are_ordering_equal(
+
+
+
+
+
+ dtuple_t* tuple1,
+ dtuple_t* tuple2);
+
+
+static inline
+ulint
+dtuple_fold(
+
+
+ dtuple_t* tuple,
+ ulint n_fields,
+ ulint n_bytes,
+
+ dulint tree_id);
+
+
+static inline
+void
+dtuple_set_types_binary(
+
+ dtuple_t* tuple,
+ ulint n);
+
+
+static inline
+ulint
+dtuple_contains_null(
+
+
+ dtuple_t* tuple);
+
+
+
+ulint
+dfield_check_typed(
+
+
+ dfield_t* field);
+
+
+
+ulint
+dtuple_check_typed(
+
+
+ dtuple_t* tuple);
+
+
+
+ulint
+dtuple_check_typed_no_assert(
+
+
+ dtuple_t* tuple);
+# 311 "./include/data0data.h"
+void
+dfield_print(
+
+ dfield_t* dfield);
+
+
+
+
+void
+dfield_print_also_hex(
+
+ dfield_t* dfield);
+
+
+
+void
+dtuple_print(
+
+ FILE* f,
+ dtuple_t* tuple);
+
+
+
+
+
+
+big_rec_t*
+dtuple_convert_big_rec(
+
+
+
+
+
+ dict_index_t* index,
+ dtuple_t* entry,
+ ulint* ext_vec,
+
+
+
+ ulint n_ext_vec);
+
+
+
+
+
+void
+dtuple_convert_back_big_rec(
+
+ dict_index_t* index,
+ dtuple_t* entry,
+ big_rec_t* vector);
+
+
+
+
+void
+dtuple_big_rec_free(
+
+ big_rec_t* vector);
+
+
+
+
+
+struct dfield_struct{
+ void* data;
+ ulint len;
+ dtype_t type;
+};
+
+struct dtuple_struct {
+ ulint info_bits;
+
+
+
+ ulint n_fields;
+ ulint n_fields_cmp;
+
+
+
+
+
+
+ dfield_t* fields;
+ struct { dtuple_t * prev; dtuple_t * next; } tuple_list;
+
+
+ ulint magic_n;
+};
+
+
+
+
+typedef struct big_rec_field_struct big_rec_field_t;
+struct big_rec_field_struct {
+ ulint field_no;
+ ulint len;
+ unsigned char* data;
+};
+
+
+
+
+struct big_rec_struct {
+ mem_heap_t* heap;
+ ulint n_fields;
+ big_rec_field_t* fields;
+};
+
+
+# 1 "./include/data0data.ic" 1
+# 12 "./include/data0data.ic"
+extern unsigned char data_error;
+
+
+
+static inline
+dtype_t*
+dfield_get_type(
+
+
+ dfield_t* field)
+{
+ ;
+
+ return(&(field->type));
+}
+
+
+
+static inline
+void
+dfield_set_type(
+
+ dfield_t* field,
+ dtype_t* type)
+{
+ ;
+
+ field->type = *type;
+}
+
+
+
+static inline
+void*
+dfield_get_data(
+
+
+ dfield_t* field)
+{
+ ;
+ ;
+
+
+ return(field->data);
+}
+
+
+
+static inline
+ulint
+dfield_get_len(
+
+
+
+ dfield_t* field)
+{
+ ;
+ ;
+
+
+ return(field->len);
+}
+
+
+
+static inline
+void
+dfield_set_len(
+
+ dfield_t* field,
+ ulint len)
+{
+ ;
+
+ field->len = len;
+}
+
+
+
+static inline
+void
+dfield_set_data(
+
+ dfield_t* field,
+ const void* data,
+ ulint len)
+{
+ ;
+
+ field->data = (void*) data;
+ field->len = len;
+}
+
+
+
+static inline
+void
+dfield_copy_data(
+
+ dfield_t* field1,
+ dfield_t* field2)
+{
+ ;
+
+ field1->data = field2->data;
+ field1->len = field2->len;
+}
+
+
+
+static inline
+void
+dfield_copy(
+
+ dfield_t* field1,
+ dfield_t* field2)
+{
+ *field1 = *field2;
+}
+
+
+
+static inline
+ulint
+dfield_datas_are_binary_equal(
+
+
+ dfield_t* field1,
+ dfield_t* field2)
+{
+ ulint len;
+
+ len = field1->len;
+
+ if ((len != field2->len)
+ || ((len != 0xFFFFFFFF)
+ && (0 != ut_memcmp(field1->data, field2->data, len)))) {
+
+ return((0));
+ }
+
+ return((1));
+}
+
+
+
+static inline
+ulint
+dtuple_get_info_bits(
+
+
+ dtuple_t* tuple)
+{
+ ;
+
+ return(tuple->info_bits);
+}
+
+
+
+static inline
+void
+dtuple_set_info_bits(
+
+ dtuple_t* tuple,
+ ulint info_bits)
+{
+ ;
+
+ tuple->info_bits = info_bits;
+}
+
+
+
+static inline
+ulint
+dtuple_get_n_fields_cmp(
+
+
+
+ dtuple_t* tuple)
+{
+ ;
+
+ return(tuple->n_fields_cmp);
+}
+
+
+
+static inline
+void
+dtuple_set_n_fields_cmp(
+
+ dtuple_t* tuple,
+ ulint n_fields_cmp)
+
+{
+ ;
+ ;
+
+ tuple->n_fields_cmp = n_fields_cmp;
+}
+
+
+
+static inline
+ulint
+dtuple_get_n_fields(
+
+
+ dtuple_t* tuple)
+{
+ ;
+
+ return(tuple->n_fields);
+}
+
+
+
+static inline
+dfield_t*
+dtuple_get_nth_field(
+
+
+ dtuple_t* tuple,
+ ulint n)
+{
+ ;
+ ;
+
+ return(tuple->fields + n);
+}
+
+
+
+
+static inline
+dtuple_t*
+dtuple_create(
+
+
+ mem_heap_t* heap,
+
+ ulint n_fields)
+{
+ dtuple_t* tuple;
+
+ ;
+
+ tuple = (dtuple_t*) mem_heap_alloc(heap, sizeof(dtuple_t)
+ + n_fields * sizeof(dfield_t));
+ tuple->info_bits = 0;
+ tuple->n_fields = n_fields;
+ tuple->n_fields_cmp = n_fields;
+ tuple->fields = (dfield_t*)(((unsigned char*)tuple) + sizeof(dtuple_t));
+# 280 "./include/data0data.ic"
+ return(tuple);
+}
+
+
+
+
+
+static inline
+ulint
+dtuple_get_data_size(
+
+
+ dtuple_t* tuple)
+{
+ dfield_t* field;
+ ulint n_fields;
+ ulint len;
+ ulint i;
+ ulint sum = 0;
+
+ ;
+ ;
+ ;
+
+ n_fields = tuple->n_fields;
+
+ for (i = 0; i < n_fields; i++) {
+ field = dtuple_get_nth_field(tuple, i);
+ len = dfield_get_len(field);
+
+ if (len == 0xFFFFFFFF) {
+ len = dtype_get_sql_null_size(dfield_get_type(field));
+ }
+
+ sum += len;
+ }
+
+ return(sum);
+}
+
+
+
+static inline
+void
+dtuple_set_types_binary(
+
+ dtuple_t* tuple,
+ ulint n)
+{
+ dtype_t* dfield_type;
+ ulint i;
+
+ for (i = 0; i < n; i++) {
+ dfield_type = dfield_get_type(dtuple_get_nth_field(tuple, i));
+ dtype_set(dfield_type, 4, 0, 0, 0);
+ }
+}
+
+
+
+static inline
+ulint
+dtuple_fold(
+
+
+ dtuple_t* tuple,
+ ulint n_fields,
+ ulint n_bytes,
+
+ dulint tree_id)
+{
+ dfield_t* field;
+ ulint i;
+ unsigned char* data;
+ ulint len;
+ ulint fold;
+
+ ;
+ ;
+ ;
+
+ fold = ut_fold_dulint(tree_id);
+
+ for (i = 0; i < n_fields; i++) {
+ field = dtuple_get_nth_field(tuple, i);
+
+ data = (unsigned char*) dfield_get_data(field);
+ len = dfield_get_len(field);
+
+ if (len != 0xFFFFFFFF) {
+ fold = ut_fold_ulint_pair(fold,
+ ut_fold_binary(data, len));
+ }
+ }
+
+ if (n_bytes > 0) {
+ field = dtuple_get_nth_field(tuple, i);
+
+ data = (unsigned char*) dfield_get_data(field);
+ len = dfield_get_len(field);
+
+ if (len != 0xFFFFFFFF) {
+ if (len > n_bytes) {
+ len = n_bytes;
+ }
+
+ fold = ut_fold_ulint_pair(fold,
+ ut_fold_binary(data, len));
+ }
+ }
+
+ return(fold);
+}
+
+
+
+static inline
+void
+data_write_sql_null(
+
+ unsigned char* data,
+ ulint len)
+{
+ ulint j;
+
+ for (j = 0; j < len; j++) {
+ data[j] = '\0';
+ }
+}
+
+
+
+static inline
+ulint
+dtuple_contains_null(
+
+
+ dtuple_t* tuple)
+{
+ ulint n;
+ ulint i;
+
+ n = dtuple_get_n_fields(tuple);
+
+ for (i = 0; i < n; i++) {
+ if (dfield_get_len(dtuple_get_nth_field(tuple, i))
+ == 0xFFFFFFFF) {
+
+ return((1));
+ }
+ }
+
+ return((0));
+}
+# 422 "./include/data0data.h" 2
+# 16 "./include/dict0mem.h" 2
+
+# 1 "./include/rem0types.h" 1
+# 13 "./include/rem0types.h"
+typedef unsigned char rec_t;
+# 18 "./include/dict0mem.h" 2
+# 1 "./include/btr0types.h" 1
+# 17 "./include/btr0types.h"
+typedef struct btr_pcur_struct btr_pcur_t;
+typedef struct btr_cur_struct btr_cur_t;
+typedef struct btr_search_struct btr_search_t;
+# 19 "./include/dict0mem.h" 2
+
+
+
+
+
+
+
+# 1 "./include/que0types.h" 1
+# 16 "./include/que0types.h"
+typedef void que_node_t;
+
+typedef struct que_fork_struct que_fork_t;
+
+
+typedef que_fork_t que_t;
+
+typedef struct que_thr_struct que_thr_t;
+typedef struct que_common_struct que_common_t;
+
+
+
+
+struct que_common_struct{
+ ulint type;
+ que_node_t* parent;
+ que_node_t* brother;
+ dfield_t val;
+ ulint val_buf_size;
+
+
+
+
+
+
+};
+# 27 "./include/dict0mem.h" 2
+# 48 "./include/dict0mem.h"
+dict_table_t*
+dict_mem_table_create(
+
+
+ const char* name,
+ ulint space,
+
+
+
+ ulint n_cols,
+ ulint comp);
+
+
+
+void
+dict_mem_table_free(
+
+ dict_table_t* table);
+
+
+
+dict_cluster_t*
+dict_mem_cluster_create(
+
+
+
+ const char* name,
+ ulint space,
+
+
+ ulint n_cols,
+ ulint mix_len);
+
+
+
+
+void
+dict_mem_table_make_cluster_member(
+
+ dict_table_t* table,
+ const char* cluster_name);
+
+
+
+void
+dict_mem_table_add_col(
+
+ dict_table_t* table,
+ const char* name,
+ ulint mtype,
+ ulint prtype,
+ ulint len,
+ ulint prec);
+
+
+
+dict_index_t*
+dict_mem_index_create(
+
+
+ const char* table_name,
+ const char* index_name,
+ ulint space,
+
+
+ ulint type,
+
+ ulint n_fields);
+
+
+
+
+
+void
+dict_mem_index_add_field(
+
+ dict_index_t* index,
+ const char* name,
+ ulint order,
+
+ ulint prefix_len);
+
+
+
+
+
+void
+dict_mem_index_free(
+
+ dict_index_t* index);
+
+
+
+dict_foreign_t*
+dict_mem_foreign_create(void);
+
+
+
+
+struct dict_col_struct{
+ hash_node_t hash;
+ ulint ind;
+
+ ulint clust_pos;
+
+ ulint ord_part;
+
+ const char* name;
+ dtype_t type;
+ dict_table_t* table;
+ ulint aux;
+
+};
+# 173 "./include/dict0mem.h"
+struct dict_field_struct{
+ dict_col_t* col;
+ const char* name;
+ ulint order;
+
+ ulint prefix_len;
+
+
+
+
+
+
+ ulint fixed_len;
+
+
+ ulint fixed_offs;
+
+
+
+};
+
+
+struct dict_tree_struct{
+ ulint type;
+ dulint id;
+
+
+ ulint space;
+ ulint page;
+ unsigned char pad[64];
+
+ rw_lock_t lock;
+
+ ulint mem_fix;
+
+
+
+ struct { ulint count; dict_index_t * start; dict_index_t * end; }
+ tree_indexes;
+
+
+
+
+
+ ulint magic_n;
+};
+
+
+
+
+struct dict_index_struct{
+ dulint id;
+ mem_heap_t* heap;
+ ulint type;
+ const char* name;
+ const char* table_name;
+ dict_table_t* table;
+ ulint space;
+ ulint trx_id_offset;
+
+
+
+ ulint n_user_defined_cols;
+
+
+
+ ulint n_uniq;
+
+
+ ulint n_def;
+ ulint n_fields;
+ dict_field_t* fields;
+ ulint n_nullable;
+ struct { dict_index_t * prev; dict_index_t * next; }
+ indexes;
+ dict_tree_t* tree;
+ struct { dict_index_t * prev; dict_index_t * next; }
+ tree_indexes;
+
+ ulint cached;
+
+ btr_search_t* search_info;
+
+ ib_longlong* stat_n_diff_key_vals;
+
+
+
+
+ ulint stat_index_size;
+
+ ulint stat_n_leaf_pages;
+
+
+ ulint magic_n;
+};
+
+
+
+
+struct dict_foreign_struct{
+ mem_heap_t* heap;
+
+ char* id;
+
+ ulint type;
+
+ char* foreign_table_name;
+ dict_table_t* foreign_table;
+ const char** foreign_col_names;
+
+ char* referenced_table_name;
+ dict_table_t* referenced_table;
+
+ const char** referenced_col_names;
+
+ ulint n_fields;
+
+
+
+
+
+ dict_index_t* foreign_index;
+
+
+
+
+ dict_index_t* referenced_index;
+ struct { dict_foreign_t * prev; dict_foreign_t * next; }
+ foreign_list;
+
+ struct { dict_foreign_t * prev; dict_foreign_t * next; }
+ referenced_list;
+
+};
+# 321 "./include/dict0mem.h"
+struct dict_table_struct{
+ dulint id;
+ ulint type;
+ mem_heap_t* heap;
+ const char* name;
+ const char* dir_path_of_temp_table;
+
+
+
+
+
+ ulint space;
+
+ ulint ibd_file_missing;
+
+
+
+ ulint tablespace_discarded;
+
+
+ ulint comp;
+ hash_node_t name_hash;
+ hash_node_t id_hash;
+ ulint n_def;
+ ulint n_cols;
+ dict_col_t* cols;
+ struct { ulint count; dict_index_t * start; dict_index_t * end; }
+ indexes;
+ struct { ulint count; dict_foreign_t * start; dict_foreign_t * end; }
+ foreign_list;
+
+
+ struct { ulint count; dict_foreign_t * start; dict_foreign_t * end; }
+ referenced_list;
+
+ struct { dict_table_t * prev; dict_table_t * next; }
+ table_LRU;
+ ulint mem_fix;
+
+
+ ulint n_mysql_handles_opened;
+
+
+
+
+
+ ulint n_foreign_key_checks_running;
+
+
+
+
+
+ ulint cached;
+
+ ib_lock_t* auto_inc_lock;
+
+
+
+
+
+
+ dulint query_cache_inv_trx_id;
+
+
+
+
+
+
+ struct { ulint count; ib_lock_t * start; ib_lock_t * end; }
+ locks;
+
+ dulint mix_id;
+
+ ulint mix_len;
+
+ ulint mix_id_len;
+ unsigned char mix_id_buf[12];
+
+
+ const char* cluster_name;
+
+
+ ulint does_not_fit_in_memory;
+# 413 "./include/dict0mem.h"
+ ib_longlong stat_n_rows;
+
+
+ ulint stat_clustered_index_size;
+
+
+ ulint stat_sum_of_other_index_sizes;
+
+ ulint stat_initialized;
+
+
+ ulint stat_modified_counter;
+# 437 "./include/dict0mem.h"
+ ib_mutex_t autoinc_mutex;
+
+
+ ulint autoinc_inited;
+
+
+
+ ib_longlong autoinc;
+
+ ulint magic_n;
+};
+
+
+
+# 1 "./include/dict0mem.ic" 1
+# 452 "./include/dict0mem.h" 2
+# 15 "./include/dict0dict.h" 2
+# 32 "./include/dict0dict.h"
+void
+dict_casedn_str(
+
+ char* a);
+
+
+
+ulint
+dict_get_db_name_len(
+
+
+ const char* name);
+
+
+
+
+const char*
+dict_accept(
+
+
+
+ const char* ptr,
+ const char* string,
+
+ ulint* success);
+
+
+
+void
+dict_table_decrement_handle_count(
+
+ dict_table_t* table);
+
+
+
+void
+dict_init(void);
+# 77 "./include/dict0dict.h"
+void
+dict_load_space_id_list(void);
+
+
+
+static inline
+dtype_t*
+dict_col_get_type(
+
+ dict_col_t* col);
+# 100 "./include/dict0dict.h"
+static inline
+ulint
+dict_col_get_no(
+
+ dict_col_t* col);
+
+
+static inline
+ulint
+dict_col_get_clust_pos(
+
+ dict_col_t* col);
+
+
+
+
+ulint
+dict_col_name_is_reserved(
+
+
+ const char* name);
+
+
+
+
+void
+dict_table_autoinc_initialize(
+
+ dict_table_t* table,
+ ib_longlong value);
+
+
+
+
+ib_longlong
+dict_table_autoinc_get(
+
+
+ dict_table_t* table);
+
+
+
+void
+dict_table_autoinc_decrement(
+
+ dict_table_t* table);
+
+
+
+
+ib_longlong
+dict_table_autoinc_read(
+
+
+ dict_table_t* table);
+
+
+
+
+ib_longlong
+dict_table_autoinc_peek(
+
+
+ dict_table_t* table);
+
+
+
+
+void
+dict_table_autoinc_update(
+
+
+ dict_table_t* table,
+ ib_longlong value);
+
+
+
+void
+dict_table_add_to_cache(
+
+ dict_table_t* table);
+
+
+
+void
+dict_table_remove_from_cache(
+
+ dict_table_t* table);
+
+
+
+ulint
+dict_table_rename_in_cache(
+
+
+ dict_table_t* table,
+ const char* new_name,
+ ulint rename_also_foreigns);
+
+
+
+
+
+
+void
+dict_table_change_id_in_cache(
+
+ dict_table_t* table,
+ dulint new_id);
+
+
+
+
+
+
+ulint
+dict_foreign_add_to_cache(
+
+
+ dict_foreign_t* foreign,
+ ulint check_charsets);
+
+
+
+
+ulint
+dict_table_referenced_by_foreign_key(
+
+
+
+ dict_table_t* table);
+# 239 "./include/dict0dict.h"
+ulint
+dict_create_foreign_constraints(
+
+
+ trx_t* trx,
+ const char* sql_string,
+
+
+
+
+
+
+
+ const char* name,
+
+
+ ulint reject_fks);
+
+
+
+
+
+ulint
+dict_foreign_parse_drop_constraints(
+
+
+
+
+
+ mem_heap_t* heap,
+
+ trx_t* trx,
+ dict_table_t* table,
+ ulint* n,
+
+ const char*** constraints_to_drop);
+
+
+
+
+
+
+dict_table_t*
+dict_table_get(
+
+
+
+ const char* table_name,
+ trx_t* trx);
+
+
+
+
+dict_table_t*
+dict_table_get_and_increment_handle_count(
+
+
+
+ const char* table_name,
+ trx_t* trx);
+
+
+
+dict_table_t*
+dict_table_get_on_id(
+
+
+ dulint table_id,
+ trx_t* trx);
+
+
+static inline
+dict_table_t*
+dict_table_get_on_id_low(
+
+
+ dulint table_id,
+ trx_t* trx);
+
+
+static inline
+void
+dict_table_release(
+
+ dict_table_t* table);
+
+
+static inline
+dict_table_t*
+dict_table_check_if_in_cache_low(
+
+
+ const char* table_name);
+
+
+
+static inline
+dict_table_t*
+dict_table_get_low(
+
+
+ const char* table_name);
+
+
+static inline
+dict_index_t*
+dict_table_get_index(
+
+
+ dict_table_t* table,
+ const char* name);
+
+
+
+dict_index_t*
+dict_table_get_index_noninline(
+
+
+ dict_table_t* table,
+ const char* name);
+
+
+
+void
+dict_table_print(
+
+ dict_table_t* table);
+
+
+
+void
+dict_table_print_low(
+
+ dict_table_t* table);
+
+
+
+void
+dict_table_print_by_name(
+
+ const char* name);
+
+
+
+void
+dict_print_info_on_foreign_keys(
+
+ ulint create_table_format,
+
+
+
+ FILE* file,
+ trx_t* trx,
+ dict_table_t* table);
+
+
+
+void
+dict_print_info_on_foreign_key_in_create_format(
+
+ FILE* file,
+ trx_t* trx,
+ dict_foreign_t* foreign,
+ ulint add_newline);
+
+
+void
+dict_index_name_print(
+
+ FILE* file,
+ trx_t* trx,
+ const dict_index_t* index);
+
+
+static inline
+dict_index_t*
+dict_table_get_first_index(
+
+
+ dict_table_t* table);
+
+
+
+dict_index_t*
+dict_table_get_first_index_noninline(
+
+
+ dict_table_t* table);
+
+
+static inline
+dict_index_t*
+dict_table_get_next_index(
+
+
+ dict_index_t* index);
+
+
+
+dict_index_t*
+dict_table_get_next_index_noninline(
+
+
+ dict_index_t* index);
+
+
+
+static inline
+ulint
+dict_table_get_n_user_cols(
+
+
+
+ dict_table_t* table);
+
+
+static inline
+ulint
+dict_table_get_n_sys_cols(
+
+
+
+ dict_table_t* table);
+
+
+
+static inline
+ulint
+dict_table_get_n_cols(
+
+
+ dict_table_t* table);
+
+
+static inline
+dict_col_t*
+dict_table_get_nth_col(
+
+
+ dict_table_t* table,
+ ulint pos);
+
+
+
+dict_col_t*
+dict_table_get_nth_col_noninline(
+
+
+ dict_table_t* table,
+ ulint pos);
+
+
+static inline
+dict_col_t*
+dict_table_get_sys_col(
+
+
+ dict_table_t* table,
+ ulint sys);
+
+
+static inline
+ulint
+dict_table_get_sys_col_no(
+
+
+ dict_table_t* table,
+ ulint sys);
+
+
+
+
+ulint
+dict_table_col_in_clustered_key(
+
+
+
+ dict_table_t* table,
+ ulint n);
+
+
+
+void
+dict_table_copy_types(
+
+ dtuple_t* tuple,
+ dict_table_t* table);
+
+
+
+
+
+dict_index_t*
+dict_index_find_on_id_low(
+
+
+ dulint id);
+
+
+
+ulint
+dict_index_add_to_cache(
+
+
+ dict_table_t* table,
+ dict_index_t* index,
+
+ ulint page_no);
+
+
+
+static inline
+ulint
+dict_index_get_n_fields(
+
+
+ dict_index_t* index);
+
+
+
+
+
+
+static inline
+ulint
+dict_index_get_n_unique(
+
+
+ dict_index_t* index);
+
+
+
+
+
+static inline
+ulint
+dict_index_get_n_unique_in_tree(
+
+
+ dict_index_t* index);
+
+
+
+
+
+
+static inline
+ulint
+dict_index_get_n_ordering_defined_by_user(
+
+
+ dict_index_t* index);
+
+
+
+static inline
+dict_field_t*
+dict_index_get_nth_field(
+
+
+ dict_index_t* index,
+ ulint pos);
+
+
+static inline
+dtype_t*
+dict_index_get_nth_type(
+
+
+ dict_index_t* index,
+ ulint pos);
+
+
+static inline
+ulint
+dict_index_get_nth_col_no(
+
+
+ dict_index_t* index,
+ ulint pos);
+
+
+
+ulint
+dict_index_get_nth_col_pos(
+
+
+
+
+ dict_index_t* index,
+ ulint n);
+
+
+
+ulint
+dict_index_contains_col_or_prefix(
+
+
+
+ dict_index_t* index,
+ ulint n);
+
+
+
+
+
+
+ulint
+dict_index_get_nth_field_pos(
+
+
+
+
+ dict_index_t* index,
+ dict_index_t* index2,
+ ulint n);
+
+
+
+ulint
+dict_table_get_nth_col_pos(
+
+
+
+ dict_table_t* table,
+ ulint n);
+
+
+static inline
+ulint
+dict_index_get_sys_col_pos(
+
+
+
+ dict_index_t* index,
+ ulint type);
+
+
+
+void
+dict_index_add_col(
+
+ dict_index_t* index,
+ dict_col_t* col,
+ ulint order,
+ ulint prefix_len);
+
+
+
+void
+dict_index_copy_types(
+
+ dtuple_t* tuple,
+ dict_index_t* index,
+ ulint n_fields);
+
+
+static inline
+dict_tree_t*
+dict_index_get_tree(
+
+
+ dict_index_t* index);
+
+
+static inline
+ulint
+dict_field_get_order(
+
+ dict_field_t* field);
+
+
+static inline
+dict_col_t*
+dict_field_get_col(
+
+ dict_field_t* field);
+
+
+
+dict_tree_t*
+dict_tree_create(
+
+
+ dict_index_t* index,
+
+
+ ulint page_no);
+
+
+
+void
+dict_tree_free(
+
+ dict_tree_t* tree);
+
+
+
+dict_index_t*
+dict_tree_find_index(
+
+
+ dict_tree_t* tree,
+ rec_t* rec);
+
+
+
+
+dict_index_t*
+dict_tree_find_index_for_tuple(
+
+
+
+ dict_tree_t* tree,
+ dtuple_t* tuple);
+
+
+
+ulint
+dict_is_mixed_table_rec(
+
+
+
+ dict_table_t* table,
+ rec_t* rec);
+
+
+
+dict_index_t*
+dict_index_get_if_in_cache(
+
+
+ dulint index_id);
+
+
+
+
+ulint
+dict_tree_check_search_tuple(
+
+
+ dict_tree_t* tree,
+ dtuple_t* tuple);
+
+
+
+dtuple_t*
+dict_tree_build_node_ptr(
+
+
+ dict_tree_t* tree,
+ rec_t* rec,
+
+ ulint page_no,
+ mem_heap_t* heap,
+ ulint level);
+
+
+
+
+
+rec_t*
+dict_tree_copy_rec_order_prefix(
+
+
+ dict_tree_t* tree,
+ rec_t* rec,
+ ulint* n_fields,
+ unsigned char** buf,
+
+ ulint* buf_size);
+
+
+
+dtuple_t*
+dict_tree_build_data_tuple(
+
+
+ dict_tree_t* tree,
+ rec_t* rec,
+ ulint n_fields,
+ mem_heap_t* heap);
+
+
+static inline
+ulint
+dict_tree_get_space(
+
+
+ dict_tree_t* tree);
+
+
+static inline
+void
+dict_tree_set_space(
+
+ dict_tree_t* tree,
+ ulint space);
+
+
+static inline
+ulint
+dict_tree_get_page(
+
+
+ dict_tree_t* tree);
+
+
+static inline
+void
+dict_tree_set_page(
+
+ dict_tree_t* tree,
+ ulint page);
+
+
+static inline
+ulint
+dict_tree_get_type(
+
+
+ dict_tree_t* tree);
+
+
+static inline
+rw_lock_t*
+dict_tree_get_lock(
+
+
+ dict_tree_t* tree);
+
+
+
+
+static inline
+ulint
+dict_tree_get_space_reserve(
+
+
+
+ dict_tree_t* tree);
+
+
+
+ulint
+dict_index_calc_min_rec_len(
+
+ dict_index_t* index);
+
+
+
+
+void
+dict_update_statistics_low(
+
+ dict_table_t* table,
+ ulint has_dict_mutex);
+
+
+
+
+
+void
+dict_update_statistics(
+
+ dict_table_t* table);
+
+
+
+void
+dict_mutex_enter_for_mysql(void);
+
+
+
+
+void
+dict_mutex_exit_for_mysql(void);
+
+
+
+
+ulint
+dict_tables_have_same_db(
+
+
+ const char* name1,
+
+ const char* name2);
+
+
+
+
+
+
+
+const char*
+dict_scan_to(
+
+
+ const char* ptr,
+ const char* string);
+
+void
+dict_table_LRU_trim(
+
+ dict_table_t* self);
+
+
+
+extern FILE* dict_foreign_err_file;
+extern ib_mutex_t dict_foreign_err_mutex;
+
+extern dict_sys_t* dict_sys;
+extern rw_lock_t dict_operation_lock;
+
+
+struct dict_sys_struct{
+ ib_mutex_t mutex;
+
+
+
+
+
+
+ dulint row_id;
+
+
+
+
+
+ hash_table_t* table_hash;
+
+ hash_table_t* table_id_hash;
+
+ hash_table_t* col_hash;
+ struct { ulint count; dict_table_t * start; dict_table_t * end; }
+ table_LRU;
+ ulint size;
+
+
+ dict_table_t* sys_tables;
+ dict_table_t* sys_columns;
+ dict_table_t* sys_indexes;
+ dict_table_t* sys_fields;
+};
+
+
+# 1 "./include/dict0dict.ic" 1
+# 9 "./include/dict0dict.ic"
+# 1 "./include/dict0load.h" 1
+# 26 "./include/dict0load.h"
+void
+dict_check_tablespaces_and_store_max_id(
+
+ ulint in_crash_recovery);
+
+
+
+char*
+dict_get_first_table_name_in_db(
+
+
+
+
+ const char* name);
+
+
+
+
+
+
+dict_table_t*
+dict_load_table(
+
+
+
+
+
+
+ const char* name);
+
+
+
+
+dict_table_t*
+dict_load_table_on_id(
+
+
+ dulint table_id);
+
+
+
+
+
+void
+dict_load_sys_table(
+
+ dict_table_t* table);
+
+
+
+
+
+
+
+ulint
+dict_load_foreigns(
+
+
+ const char* table_name,
+ ulint check_charsets);
+
+
+
+
+
+void
+dict_print(void);
+
+
+
+
+# 1 "./include/dict0load.ic" 1
+# 98 "./include/dict0load.h" 2
+# 10 "./include/dict0dict.ic" 2
+# 1 "./include/trx0undo.h" 1
+# 15 "./include/trx0undo.h"
+# 1 "./include/trx0sys.h" 1
+# 16 "./include/trx0sys.h"
+# 1 "./include/mtr0log.h" 1
+# 20 "./include/mtr0log.h"
+void
+mlog_write_ulint(
+
+ unsigned char* ptr,
+ ulint val,
+ unsigned char type,
+ mtr_t* mtr);
+
+
+
+
+void
+mlog_write_dulint(
+
+ unsigned char* ptr,
+ dulint val,
+ mtr_t* mtr);
+
+
+
+
+void
+mlog_write_string(
+
+ unsigned char* ptr,
+ const unsigned char* str,
+ ulint len,
+ mtr_t* mtr);
+
+
+
+
+void
+mlog_write_initial_log_record(
+
+ unsigned char* ptr,
+
+
+ unsigned char type,
+ mtr_t* mtr);
+
+
+static inline
+unsigned char*
+mlog_write_initial_log_record_for_file_op(
+
+
+ ulint type,
+
+ ulint space_id,
+ ulint page_no,
+ unsigned char* log_ptr,
+ mtr_t* mtr);
+
+
+static inline
+void
+mlog_catenate_ulint(
+
+ mtr_t* mtr,
+ ulint val,
+ ulint type);
+
+
+
+void
+mlog_catenate_string(
+
+ mtr_t* mtr,
+ const unsigned char* str,
+ ulint len);
+
+
+static inline
+void
+mlog_catenate_ulint_compressed(
+
+ mtr_t* mtr,
+ ulint val);
+
+
+static inline
+void
+mlog_catenate_dulint_compressed(
+
+ mtr_t* mtr,
+ dulint val);
+
+
+static inline
+unsigned char*
+mlog_open(
+
+
+ mtr_t* mtr,
+ ulint size);
+
+
+
+static inline
+void
+mlog_close(
+
+ mtr_t* mtr,
+ unsigned char* ptr);
+
+
+
+
+static inline
+unsigned char*
+mlog_write_initial_log_record_fast(
+
+
+ unsigned char* ptr,
+
+ unsigned char type,
+ unsigned char* log_ptr,
+ mtr_t* mtr);
+
+
+
+unsigned char*
+mlog_parse_initial_log_record(
+
+
+
+ unsigned char* ptr,
+ unsigned char* end_ptr,
+ unsigned char* type,
+ ulint* space,
+ ulint* page_no);
+
+
+
+unsigned char*
+mlog_parse_nbytes(
+
+
+
+ ulint type,
+ unsigned char* ptr,
+ unsigned char* end_ptr,
+ unsigned char* page);
+
+
+
+unsigned char*
+mlog_parse_string(
+
+
+
+ unsigned char* ptr,
+ unsigned char* end_ptr,
+ unsigned char* page);
+# 183 "./include/mtr0log.h"
+unsigned char*
+mlog_open_and_write_index(
+
+
+
+ mtr_t* mtr,
+ unsigned char* rec,
+ dict_index_t* index,
+ unsigned char type,
+ ulint size);
+
+
+
+
+
+unsigned char*
+mlog_parse_index(
+
+
+
+ unsigned char* ptr,
+ unsigned char* end_ptr,
+
+ ulint comp,
+ dict_index_t** index);
+
+
+
+
+
+
+# 1 "./include/mtr0log.ic" 1
+# 15 "./include/mtr0log.ic"
+static inline
+unsigned char*
+mlog_open(
+
+
+ mtr_t* mtr,
+ ulint size)
+
+{
+ dyn_array_t* mlog;
+
+ mtr->modifications = (1);
+
+ if (mtr_get_log_mode(mtr) == 22) {
+
+ return(((void *)0));
+ }
+
+ mlog = &(mtr->log);
+
+ return(dyn_array_open(mlog, size));
+}
+
+
+
+static inline
+void
+mlog_close(
+
+ mtr_t* mtr,
+ unsigned char* ptr)
+{
+ dyn_array_t* mlog;
+
+ ;
+
+ mlog = &(mtr->log);
+
+ dyn_array_close(mlog, ptr);
+}
+
+
+
+static inline
+void
+mlog_catenate_ulint(
+
+ mtr_t* mtr,
+ ulint val,
+ ulint type)
+{
+ dyn_array_t* mlog;
+ unsigned char* ptr;
+
+ if (mtr_get_log_mode(mtr) == 22) {
+
+ return;
+ }
+
+ mlog = &(mtr->log);
+
+ ;
+ ;
+ ;
+
+ ptr = dyn_array_push(mlog, type);
+
+ if (type == ((unsigned char)4)) {
+ mach_write_to_4(ptr, val);
+ } else if (type == ((unsigned char)2)) {
+ mach_write_to_2(ptr, val);
+ } else {
+ ;
+ mach_write_to_1(ptr, val);
+ }
+}
+
+
+
+static inline
+void
+mlog_catenate_ulint_compressed(
+
+ mtr_t* mtr,
+ ulint val)
+{
+ unsigned char* log_ptr;
+
+ log_ptr = mlog_open(mtr, 10);
+
+
+ if (log_ptr == ((void *)0)) {
+
+ return;
+ }
+
+ log_ptr += mach_write_compressed(log_ptr, val);
+
+ mlog_close(mtr, log_ptr);
+}
+
+
+
+static inline
+void
+mlog_catenate_dulint_compressed(
+
+ mtr_t* mtr,
+ dulint val)
+{
+ unsigned char* log_ptr;
+
+ log_ptr = mlog_open(mtr, 15);
+
+
+ if (log_ptr == ((void *)0)) {
+
+ return;
+ }
+
+ log_ptr += mach_dulint_write_compressed(log_ptr, val);
+
+ mlog_close(mtr, log_ptr);
+}
+
+
+
+
+
+static inline
+unsigned char*
+mlog_write_initial_log_record_fast(
+
+
+ unsigned char* ptr,
+
+ unsigned char type,
+ unsigned char* log_ptr,
+ mtr_t* mtr)
+{
+ buf_block_t* block;
+ ulint space;
+ ulint offset;
+
+ ;
+
+ ;
+ ;
+
+ block = buf_block_align(ptr);
+
+ space = buf_block_get_space(block);
+ offset = buf_block_get_page_no(block);
+
+ mach_write_to_1(log_ptr, type);
+ log_ptr++;
+ log_ptr += mach_write_compressed(log_ptr, space);
+ log_ptr += mach_write_compressed(log_ptr, offset);
+
+ mtr->n_log_recs++;
+# 190 "./include/mtr0log.ic"
+ return(log_ptr);
+}
+
+
+
+static inline
+unsigned char*
+mlog_write_initial_log_record_for_file_op(
+
+
+ ulint type,
+
+ ulint space_id,
+ ulint page_no,
+ unsigned char* log_ptr,
+ mtr_t* mtr)
+{
+ ;
+
+ mach_write_to_1(log_ptr, type);
+ log_ptr++;
+
+
+ log_ptr += mach_write_compressed(log_ptr, space_id);
+ log_ptr += mach_write_compressed(log_ptr, page_no);
+
+ mtr->n_log_recs++;
+
+ return(log_ptr);
+}
+# 215 "./include/mtr0log.h" 2
+# 17 "./include/trx0sys.h" 2
+
+
+
+
+
+
+# 1 "./include/fut0lst.h" 1
+# 22 "./include/fut0lst.h"
+typedef unsigned char flst_base_node_t;
+typedef unsigned char flst_node_t;
+# 34 "./include/fut0lst.h"
+static inline
+void
+flst_init(
+
+ flst_base_node_t* base,
+ mtr_t* mtr);
+
+
+
+void
+flst_add_last(
+
+ flst_base_node_t* base,
+ flst_node_t* node,
+ mtr_t* mtr);
+
+
+
+void
+flst_add_first(
+
+ flst_base_node_t* base,
+ flst_node_t* node,
+ mtr_t* mtr);
+
+
+
+void
+flst_insert_after(
+
+ flst_base_node_t* base,
+ flst_node_t* node1,
+ flst_node_t* node2,
+ mtr_t* mtr);
+
+
+
+void
+flst_insert_before(
+
+ flst_base_node_t* base,
+ flst_node_t* node2,
+ flst_node_t* node3,
+ mtr_t* mtr);
+
+
+
+void
+flst_remove(
+
+ flst_base_node_t* base,
+ flst_node_t* node2,
+ mtr_t* mtr);
+
+
+
+
+
+void
+flst_cut_end(
+
+ flst_base_node_t* base,
+ flst_node_t* node2,
+ ulint n_nodes,
+
+ mtr_t* mtr);
+
+
+
+
+
+void
+flst_truncate_end(
+
+ flst_base_node_t* base,
+ flst_node_t* node2,
+ ulint n_nodes,
+ mtr_t* mtr);
+
+
+static inline
+ulint
+flst_get_len(
+
+
+ flst_base_node_t* base,
+ mtr_t* mtr);
+
+
+static inline
+fil_addr_t
+flst_get_first(
+
+
+ flst_base_node_t* base,
+ mtr_t* mtr);
+
+
+static inline
+fil_addr_t
+flst_get_last(
+
+
+ flst_base_node_t* base,
+ mtr_t* mtr);
+
+
+static inline
+fil_addr_t
+flst_get_next_addr(
+
+
+ flst_node_t* node,
+ mtr_t* mtr);
+
+
+static inline
+fil_addr_t
+flst_get_prev_addr(
+
+
+ flst_node_t* node,
+ mtr_t* mtr);
+
+
+static inline
+void
+flst_write_addr(
+
+ fil_faddr_t* faddr,
+ fil_addr_t addr,
+ mtr_t* mtr);
+
+
+static inline
+fil_addr_t
+flst_read_addr(
+
+
+ fil_faddr_t* faddr,
+ mtr_t* mtr);
+
+
+
+ulint
+flst_validate(
+
+
+ flst_base_node_t* base,
+ mtr_t* mtr1);
+
+
+
+void
+flst_print(
+
+ flst_base_node_t* base,
+ mtr_t* mtr);
+
+
+
+# 1 "./include/fut0lst.ic" 1
+# 9 "./include/fut0lst.ic"
+# 1 "./include/fut0fut.h" 1
+# 20 "./include/fut0fut.h"
+static inline
+unsigned char*
+fut_get_ptr(
+
+
+
+ ulint space,
+ fil_addr_t addr,
+ ulint rw_latch,
+ mtr_t* mtr);
+
+
+# 1 "./include/fut0fut.ic" 1
+# 14 "./include/fut0fut.ic"
+static inline
+unsigned char*
+fut_get_ptr(
+
+
+
+ ulint space,
+ fil_addr_t addr,
+ ulint rw_latch,
+ mtr_t* mtr)
+{
+ unsigned char* ptr;
+
+ ;
+ ;
+ ;
+
+ ptr = buf_page_get_gen( space, addr.page, rw_latch, ((void *)0), 10, "./include/fut0fut.ic", 31, mtr) + addr.boffset;
+
+
+
+
+
+ return(ptr);
+}
+# 33 "./include/fut0fut.h" 2
+# 10 "./include/fut0lst.ic" 2
+# 31 "./include/fut0lst.ic"
+static inline
+void
+flst_write_addr(
+
+ fil_faddr_t* faddr,
+ fil_addr_t addr,
+ mtr_t* mtr)
+{
+ ;
+ ;
+
+
+ mlog_write_ulint(faddr + 0, addr.page, ((unsigned char)4), mtr);
+ mlog_write_ulint(faddr + 4, addr.boffset,
+ ((unsigned char)2), mtr);
+}
+
+
+
+static inline
+fil_addr_t
+flst_read_addr(
+
+
+ fil_faddr_t* faddr,
+ mtr_t* mtr)
+{
+ fil_addr_t addr;
+
+ ;
+
+ addr.page = mtr_read_ulint(faddr + 0, ((unsigned char)4), mtr);
+ addr.boffset = mtr_read_ulint(faddr + 4, ((unsigned char)2),
+ mtr);
+ return(addr);
+}
+
+
+
+static inline
+void
+flst_init(
+
+ flst_base_node_t* base,
+ mtr_t* mtr)
+{
+ ;
+
+ mlog_write_ulint(base + 0, 0, ((unsigned char)4), mtr);
+ flst_write_addr(base + 4, fil_addr_null, mtr);
+ flst_write_addr(base + (4 + 6), fil_addr_null, mtr);
+}
+
+
+
+static inline
+ulint
+flst_get_len(
+
+
+ flst_base_node_t* base,
+ mtr_t* mtr)
+{
+ return(mtr_read_ulint(base + 0, ((unsigned char)4), mtr));
+}
+
+
+
+static inline
+fil_addr_t
+flst_get_first(
+
+
+ flst_base_node_t* base,
+ mtr_t* mtr)
+{
+ return(flst_read_addr(base + 4, mtr));
+}
+
+
+
+static inline
+fil_addr_t
+flst_get_last(
+
+
+ flst_base_node_t* base,
+ mtr_t* mtr)
+{
+ return(flst_read_addr(base + (4 + 6), mtr));
+}
+
+
+
+static inline
+fil_addr_t
+flst_get_next_addr(
+
+
+ flst_node_t* node,
+ mtr_t* mtr)
+{
+ return(flst_read_addr(node + 6, mtr));
+}
+
+
+
+static inline
+fil_addr_t
+flst_get_prev_addr(
+
+
+ flst_node_t* node,
+ mtr_t* mtr)
+{
+ return(flst_read_addr(node + 0, mtr));
+}
+# 196 "./include/fut0lst.h" 2
+# 24 "./include/trx0sys.h" 2
+# 1 "./include/fsp0fsp.h" 1
+# 34 "./include/fsp0fsp.h"
+typedef unsigned char fseg_header_t;
+# 45 "./include/fsp0fsp.h"
+void
+fsp_init(void);
+
+
+
+
+
+
+
+ulint
+fsp_header_get_free_limit(
+
+
+ ulint space);
+
+
+
+
+
+ulint
+fsp_header_get_tablespace_size(
+
+
+ ulint space);
+
+
+
+ulint
+fsp_get_size_low(
+
+
+ ib_page_t* page);
+
+
+
+ulint
+fsp_header_get_space_id(
+
+
+ ib_page_t* page);
+
+
+
+
+void
+fsp_header_write_space_id(
+
+ ib_page_t* page,
+ ulint space_id);
+
+
+
+
+void
+fsp_header_init(
+
+ ulint space,
+ ulint size,
+ mtr_t* mtr);
+
+
+
+void
+fsp_header_inc_size(
+
+ ulint space,
+ ulint size_inc,
+ mtr_t* mtr);
+
+
+
+ib_page_t*
+fseg_create(
+
+
+
+
+ ulint space,
+ ulint page,
+
+
+
+ ulint byte_offset,
+
+ mtr_t* mtr);
+
+
+
+ib_page_t*
+fseg_create_general(
+
+
+
+
+ ulint space,
+ ulint page,
+
+
+
+ ulint byte_offset,
+
+ ulint has_done_reservation,
+
+
+
+
+
+ mtr_t* mtr);
+
+
+
+
+ulint
+fseg_n_reserved_pages(
+
+
+ fseg_header_t* header,
+ ulint* used,
+ mtr_t* mtr);
+
+
+
+
+
+ulint
+fseg_alloc_free_page(
+
+
+
+ fseg_header_t* seg_header,
+ ulint hint,
+ unsigned char direction,
+
+
+
+
+ mtr_t* mtr);
+
+
+
+
+
+ulint
+fseg_alloc_free_page_general(
+
+
+
+ fseg_header_t* seg_header,
+ ulint hint,
+ unsigned char direction,
+
+
+
+
+ ulint has_done_reservation,
+
+
+
+
+ mtr_t* mtr);
+# 231 "./include/fsp0fsp.h"
+ulint
+fsp_reserve_free_extents(
+
+
+ ulint* n_reserved,
+
+
+ ulint space,
+ ulint n_ext,
+ ulint alloc_type,
+ mtr_t* mtr);
+
+
+
+
+
+
+ullint
+fsp_get_available_space_in_free_extents(
+
+
+ ulint space);
+
+
+
+void
+fseg_free_page(
+
+ fseg_header_t* seg_header,
+ ulint space,
+ ulint page,
+ mtr_t* mtr);
+
+
+
+
+void
+fseg_free(
+
+ ulint space,
+ ulint page_no,
+
+ ulint offset);
+
+
+
+
+
+
+
+ulint
+fseg_free_step(
+
+
+ fseg_header_t* header,
+
+
+
+ mtr_t* mtr);
+
+
+
+
+ulint
+fseg_free_step_not_header(
+
+
+
+ fseg_header_t* header,
+
+ mtr_t* mtr);
+
+
+static inline
+ulint
+fsp_descr_page(
+
+
+ ulint page_no);
+
+
+
+unsigned char*
+fsp_parse_init_file_page(
+
+
+ unsigned char* ptr,
+ unsigned char* end_ptr,
+ ib_page_t* page);
+
+
+
+ulint
+fsp_validate(
+
+
+ ulint space);
+
+
+
+void
+fsp_print(
+
+ ulint space);
+
+
+
+ulint
+fseg_validate(
+
+
+ fseg_header_t* header,
+ mtr_t* mtr2);
+
+
+
+void
+fseg_print(
+
+ fseg_header_t* header,
+ mtr_t* mtr);
+# 384 "./include/fsp0fsp.h"
+# 1 "./include/fsp0fsp.ic" 1
+# 11 "./include/fsp0fsp.ic"
+static inline
+ulint
+fsp_descr_page(
+
+
+ ulint page_no)
+{
+ if (page_no % (2 * 8192) == 0) {
+
+ return((1));
+ }
+
+ return((0));
+}
+# 385 "./include/fsp0fsp.h" 2
+# 25 "./include/trx0sys.h" 2
+# 1 "./include/read0types.h" 1
+# 12 "./include/read0types.h"
+typedef struct read_view_struct read_view_t;
+typedef struct cursor_view_struct cursor_view_t;
+# 26 "./include/trx0sys.h" 2
+
+
+
+
+
+
+extern char trx_sys_mysql_master_log_name[];
+extern ib_longlong trx_sys_mysql_master_log_pos;
+
+
+
+
+
+
+extern char trx_sys_mysql_bin_log_name[];
+extern ib_longlong trx_sys_mysql_bin_log_pos;
+
+
+extern trx_sys_t* trx_sys;
+
+
+extern trx_doublewrite_t* trx_doublewrite;
+extern ulint trx_doublewrite_must_reset_space_ids;
+extern ulint trx_sys_multiple_tablespace_format;
+
+
+
+
+
+void
+trx_sys_create_doublewrite_buf(void);
+# 66 "./include/trx0sys.h"
+void
+trx_sys_doublewrite_init_or_restore_pages(
+
+ ulint restore_corrupt_pages);
+
+
+
+
+void
+trx_sys_mark_upgraded_to_multiple_tablespaces(void);
+
+
+
+
+ulint
+trx_doublewrite_page_inside(
+
+
+
+ ulint page_no);
+
+
+static inline
+ulint
+trx_sys_hdr_page(
+
+
+ ulint space,
+ ulint page_no);
+
+
+
+
+void
+trx_sys_init_at_db_start(void);
+
+
+
+
+void
+trx_sys_create(void);
+
+
+
+
+void
+trx_sys_create_extra_rseg(
+
+ ulint num);
+
+
+
+ulint
+trx_sysf_rseg_find_free(
+
+
+
+ mtr_t* mtr);
+
+
+static inline
+trx_rseg_t*
+trx_sys_get_nth_rseg(
+
+
+
+ trx_sys_t* sys,
+ ulint n);
+
+
+static inline
+void
+trx_sys_set_nth_rseg(
+
+ trx_sys_t* sys,
+ ulint n,
+ trx_rseg_t* rseg);
+
+
+
+static inline
+trx_sysf_t*
+trx_sysf_get(
+
+
+ mtr_t* mtr);
+
+
+
+static inline
+ulint
+trx_sysf_rseg_get_space(
+
+
+ trx_sysf_t* sys_header,
+ ulint i,
+ mtr_t* mtr);
+
+
+
+static inline
+ulint
+trx_sysf_rseg_get_page_no(
+
+
+
+ trx_sysf_t* sys_header,
+ ulint i,
+ mtr_t* mtr);
+
+
+
+static inline
+void
+trx_sysf_rseg_set_space(
+
+ trx_sysf_t* sys_header,
+ ulint i,
+ ulint space,
+ mtr_t* mtr);
+
+
+
+static inline
+void
+trx_sysf_rseg_set_page_no(
+
+ trx_sysf_t* sys_header,
+ ulint i,
+ ulint page_no,
+
+ mtr_t* mtr);
+
+
+static inline
+dulint
+trx_sys_get_new_trx_id(void);
+
+
+
+
+static inline
+dulint
+trx_sys_get_new_trx_no(void);
+
+
+
+
+
+
+static inline
+void
+trx_write_trx_id(
+
+ unsigned char* ptr,
+ dulint id);
+
+
+
+
+static inline
+dulint
+trx_read_trx_id(
+
+
+ unsigned char* ptr);
+
+
+static inline
+trx_t*
+trx_get_on_id(
+
+
+ dulint trx_id);
+
+
+
+
+
+static inline
+dulint
+trx_list_get_min_trx_id(void);
+
+
+
+
+
+static inline
+ulint
+trx_is_active(
+
+
+ dulint trx_id);
+
+
+
+ulint
+trx_in_trx_list(
+
+
+ trx_t* in_trx);
+
+
+
+
+
+
+void
+trx_sys_update_mysql_binlog_offset(
+
+ const char* file_name,
+ ib_longlong offset,
+ ulint field,
+
+ mtr_t* mtr);
+
+
+
+
+void
+trx_sys_print_mysql_binlog_offset(void);
+# 303 "./include/trx0sys.h"
+void
+trx_sys_print_mysql_master_log_pos(void);
+# 403 "./include/trx0sys.h"
+struct trx_doublewrite_struct{
+ ib_mutex_t mutex;
+
+ ulint block1;
+
+ ulint block2;
+ ulint first_free;
+
+ unsigned char* write_buf;
+
+
+
+ unsigned char* write_buf_unaligned;
+ buf_block_t**
+ buf_block_arr;
+
+};
+
+
+
+struct trx_sys_struct{
+ dulint max_trx_id;
+
+
+ struct { ulint count; trx_t * start; trx_t * end; } trx_list;
+
+
+
+ struct { ulint count; trx_t * start; trx_t * end; } mysql_trx_list;
+
+
+ struct { ulint count; trx_rseg_t * start; trx_rseg_t * end; } rseg_list;
+
+ trx_rseg_t* latest_rseg;
+
+
+ trx_rseg_t* rseg_array[256];
+
+
+ ulint rseg_history_len;
+
+
+
+ struct { ulint count; read_view_t * start; read_view_t * end; } view_list;
+
+
+};
+
+
+
+
+
+
+
+# 1 "./include/trx0sys.ic" 1
+# 9 "./include/trx0sys.ic"
+# 1 "./include/srv0srv.h" 1
+# 19 "./include/srv0srv.h"
+extern const char* srv_main_thread_op_info;
+
+
+
+extern os_event_t srv_lock_timeout_thread_event;
+
+
+
+
+
+
+extern ulint srv_slow_log;
+
+
+extern ulint srv_lower_case_table_names;
+
+
+extern ib_mutex_t srv_monitor_file_mutex;
+
+extern FILE* srv_monitor_file;
+
+
+
+extern ib_mutex_t srv_dict_tmpfile_mutex;
+
+extern FILE* srv_dict_tmpfile;
+
+
+
+extern ib_mutex_t srv_misc_tmpfile_mutex;
+
+extern FILE* srv_misc_tmpfile;
+
+
+
+extern char* srv_data_home;
+
+
+
+
+extern ulint srv_file_per_table;
+extern ulint srv_locks_unsafe_for_binlog;
+
+extern ulint srv_n_data_files;
+extern char** srv_data_file_names;
+extern ulint* srv_data_file_sizes;
+extern ulint* srv_data_file_is_raw_partition;
+
+extern ulint srv_auto_extend_last_data_file;
+extern ulint srv_last_file_size_max;
+extern ulong srv_auto_extend_increment;
+
+extern ulint srv_created_new_raw;
+
+
+
+
+extern char** srv_log_group_home_dirs;
+
+extern ulint srv_n_log_groups;
+extern ulint srv_n_log_files;
+extern ulint srv_log_file_size;
+extern ulint srv_log_buffer_size;
+extern ulong srv_flush_log_at_trx_commit;
+extern ulong srv_show_locks_held;
+extern ulong srv_show_verbose_locks;
+
+extern unsigned char srv_latin1_ordering[256];
+
+extern ulint srv_pool_size;
+extern ulint srv_awe_window_size;
+extern ulint srv_mem_pool_size;
+extern ulint srv_lock_table_size;
+
+extern ulint srv_thread_concurrency_timer_based;
+
+extern ulint srv_n_file_io_threads;
+extern ulint srv_n_read_io_threads;
+extern ulint srv_n_write_io_threads;
+
+
+
+
+
+
+
+extern ulint srv_lock_wait_timeout;
+
+extern char* srv_file_flush_method_str;
+extern ulint srv_unix_file_flush_method;
+extern ulint srv_win_file_flush_method;
+
+extern ulint srv_max_n_open_files;
+
+extern ulint srv_max_dirty_pages_pct;
+
+extern ulint srv_force_recovery;
+extern ulong srv_thread_concurrency;
+extern ulong srv_commit_concurrency;
+
+extern ulint srv_max_n_threads;
+
+extern lint srv_conc_n_threads;
+
+extern ulint srv_fast_shutdown;
+
+
+
+
+
+
+extern ulint srv_innodb_status;
+
+extern ulint srv_use_doublewrite_buf;
+extern ulint srv_use_checksums;
+
+extern ulint srv_set_thread_priorities;
+extern int srv_query_thread_priority;
+
+extern ulong srv_max_buf_pool_modified_pct;
+extern ulong srv_max_purge_lag;
+extern ulint srv_use_awe;
+extern ulint srv_use_adaptive_hash_indexes;
+
+extern ulint srv_io_capacity;
+extern long long srv_ibuf_max_size;
+extern ulint srv_ibuf_active_contract;
+extern ulint srv_ibuf_accel_rate;
+extern ulint srv_flush_neighbor_pages;
+extern ulint srv_enable_unsafe_group_commit;
+extern uint srv_read_ahead;
+extern ulint srv_adaptive_checkpoint;
+
+extern ulint srv_extra_rsegments;
+
+extern ulint srv_dict_size_limit;
+
+extern volatile ulint srv_io_pattern;
+extern ulong srv_io_pattern_trace;
+extern ulong srv_io_pattern_trace_running;
+extern ulong srv_io_pattern_size_limit;
+
+
+extern ulint srv_n_rows_inserted;
+extern ulint srv_n_rows_updated;
+extern ulint srv_n_rows_deleted;
+extern ulint srv_n_rows_read;
+
+extern ulint srv_print_innodb_monitor;
+extern ulint srv_print_innodb_lock_monitor;
+extern ulint srv_print_innodb_tablespace_monitor;
+extern ulint srv_print_verbose_log;
+extern ulint srv_print_innodb_table_monitor;
+
+extern ulint srv_lock_timeout_and_monitor_active;
+extern ulint srv_error_monitor_active;
+
+extern ulong srv_n_spin_wait_rounds;
+extern ulong srv_n_free_tickets_to_enter;
+extern ulong srv_thread_sleep_delay;
+extern ulint srv_spin_wait_delay;
+extern ulint srv_priority_boost;
+
+extern ulint srv_pool_size;
+extern ulint srv_mem_pool_size;
+extern ulint srv_lock_table_size;
+
+extern ulint srv_sim_disk_wait_pct;
+extern ulint srv_sim_disk_wait_len;
+extern ulint srv_sim_disk_wait_by_yield;
+extern ulint srv_sim_disk_wait_by_wait;
+
+extern ulint srv_measure_contention;
+extern ulint srv_measure_by_spin;
+
+extern ulint srv_print_thread_releases;
+extern ulint srv_print_lock_waits;
+extern ulint srv_print_buf_io;
+extern ulint srv_print_log_io;
+extern ulint srv_print_parsed_sql;
+extern ulint srv_print_latch_waits;
+
+extern ulint srv_test_nocache;
+extern ulint srv_test_cache_evict;
+
+extern ulint srv_test_extra_mutexes;
+extern ulint srv_test_sync;
+extern ulint srv_test_n_threads;
+extern ulint srv_test_n_loops;
+extern ulint srv_test_n_free_rnds;
+extern ulint srv_test_n_reserved_rnds;
+extern ulint srv_test_n_mutexes;
+extern ulint srv_test_array_size;
+
+extern ulint srv_activity_count;
+extern ulint srv_fatal_semaphore_wait_threshold;
+extern ulint srv_dml_needed_delay;
+
+extern ib_mutex_t* kernel_mutex_temp;
+# 227 "./include/srv0srv.h"
+extern const char* srv_io_thread_op_info[];
+extern const char* srv_io_thread_function[];
+
+
+extern ulint srv_log_write_requests;
+
+
+extern ulint srv_log_writes;
+
+
+extern ulint srv_os_log_written;
+
+
+extern ulint srv_os_log_pending_writes;
+
+
+
+extern ulint srv_log_waits;
+
+
+extern ulint srv_data_read;
+
+
+extern ulint srv_data_written;
+
+
+
+extern ulint srv_dblwr_writes;
+
+
+
+extern ulint srv_dblwr_pages_written;
+
+
+extern ulint srv_buf_pool_write_requests;
+
+
+
+
+extern ulint srv_buf_pool_wait_free;
+
+
+
+extern ulint srv_buf_pool_flushed;
+
+
+
+extern ulint srv_buf_pool_reads;
+
+
+extern ulint srv_read_ahead_seq;
+
+
+extern ulint srv_read_ahead_rnd;
+
+
+
+
+
+extern char srv_use_legacy_cardinality_algorithm;
+
+
+typedef struct export_var_struct export_struc;
+
+extern export_struc export_vars;
+
+typedef struct srv_sys_struct srv_sys_t;
+
+
+extern srv_sys_t* srv_sys;
+# 338 "./include/srv0srv.h"
+ulint
+srv_boot(void);
+
+
+
+
+
+void
+srv_init(void);
+
+
+
+
+void
+srv_free(void);
+
+
+
+
+
+void
+srv_general_init(void);
+
+
+
+
+ulint
+srv_get_n_threads(void);
+
+
+
+
+ulint
+srv_get_thread_type(void);
+
+
+
+
+
+void
+srv_set_io_thread_op_info(
+
+ ulint i,
+ const char* str);
+
+
+
+
+
+ulint
+srv_release_threads(
+
+
+
+
+ ulint type,
+ ulint n);
+
+
+
+
+void*
+
+
+
+srv_master_thread(
+
+
+ void* arg);
+# 415 "./include/srv0srv.h"
+void
+srv_active_wake_master_thread(void);
+
+
+
+
+void
+srv_wake_master_thread(void);
+
+
+
+
+
+void
+srv_conc_enter_innodb(
+
+ trx_t* trx);
+
+
+
+
+
+void
+srv_conc_force_enter_innodb(
+
+ trx_t* trx);
+
+
+
+
+
+void
+srv_conc_force_exit_innodb(
+
+ trx_t* trx);
+
+
+
+
+void
+srv_conc_exit_innodb(
+
+ trx_t* trx);
+# 466 "./include/srv0srv.h"
+void
+srv_suspend_mysql_thread(
+
+ que_thr_t* thr);
+
+
+
+
+
+void
+srv_release_mysql_thread_if_suspended(
+
+ que_thr_t* thr);
+
+
+
+
+
+
+void*
+
+
+
+srv_lock_timeout_and_monitor_thread(
+
+
+ void* arg);
+
+
+
+
+
+
+void*
+
+
+
+srv_error_monitor_thread(
+
+
+ void* arg);
+
+
+
+
+void
+srv_printf_innodb_monitor(
+
+ FILE* file,
+ ulint* trx_start,
+
+ ulint* trx_end);
+
+
+
+
+
+void
+srv_export_innodb_status(void);
+# 546 "./include/srv0srv.h"
+typedef struct srv_slot_struct srv_slot_t;
+
+
+typedef srv_slot_t srv_table_t;
+
+
+struct export_var_struct{
+ ulint innodb_data_pending_reads;
+ ulint innodb_data_pending_writes;
+ ulint innodb_data_pending_fsyncs;
+ ulint innodb_data_fsyncs;
+ ulint innodb_data_read;
+ ulint innodb_data_writes;
+ ulint innodb_data_written;
+ ulint innodb_data_reads;
+ ulint innodb_dict_tables;
+ ulint innodb_buffer_pool_pages_total;
+ ulint innodb_buffer_pool_pages_data;
+ ulint innodb_buffer_pool_pages_dirty;
+ ulint innodb_buffer_pool_pages_misc;
+ ulint innodb_buffer_pool_pages_free;
+
+
+
+ ulint innodb_buffer_pool_read_requests;
+ ulint innodb_buffer_pool_reads;
+ ulint innodb_buffer_pool_wait_free;
+ ulint innodb_buffer_pool_pages_flushed;
+ ulint innodb_buffer_pool_write_requests;
+ ulint innodb_buffer_pool_read_ahead_seq;
+ ulint innodb_buffer_pool_read_ahead_rnd;
+ ulint innodb_dblwr_pages_written;
+ ulint innodb_dblwr_writes;
+ ulint innodb_log_waits;
+ ulint innodb_log_write_requests;
+ ulint innodb_log_writes;
+ ulint innodb_os_log_written;
+ ulint innodb_os_log_fsyncs;
+ ulint innodb_os_log_pending_writes;
+ ulint innodb_os_log_pending_fsyncs;
+ ulint innodb_page_size;
+ ulint innodb_pages_created;
+ ulint innodb_pages_read;
+ ulint innodb_pages_written;
+ ulint innodb_row_lock_waits;
+ ulint innodb_row_lock_current_waits;
+ ib_longlong innodb_row_lock_time;
+ ulint innodb_row_lock_time_avg;
+ ulint innodb_row_lock_time_max;
+ ulint innodb_rows_read;
+ ulint innodb_rows_inserted;
+ ulint innodb_rows_updated;
+ ulint innodb_rows_deleted;
+};
+
+
+struct srv_sys_struct{
+ os_event_t operational;
+
+
+ srv_table_t* threads;
+ struct { ulint count; que_thr_t * start; que_thr_t * end; }
+ tasks;
+ dict_index_t* dummy_ind1;
+
+ dict_index_t* dummy_ind2;
+
+};
+
+extern ulint srv_n_threads_active[];
+# 10 "./include/trx0sys.ic" 2
+# 1 "./include/trx0trx.h" 1
+# 15 "./include/trx0trx.h"
+# 1 "./include/usr0types.h" 1
+# 12 "./include/usr0types.h"
+typedef struct sess_struct sess_t;
+# 16 "./include/trx0trx.h" 2
+
+
+
+
+# 1 "./include/trx0xa.h" 1
+# 18 "./include/trx0xa.h"
+struct xid_t {
+ long formatID;
+ long gtrid_length;
+ long bqual_length;
+ char data[128];
+};
+typedef struct xid_t XID;
+# 21 "./include/trx0trx.h" 2
+
+extern ulint trx_n_mysql_transactions;
+
+
+
+static inline
+void
+trx_reset_new_rec_lock_info(
+
+ trx_t* trx);
+
+
+
+
+static inline
+void
+trx_register_new_rec_lock(
+
+ trx_t* trx,
+ dict_index_t* index);
+
+
+
+static inline
+ulint
+trx_new_rec_locks_contain(
+
+
+
+ trx_t* trx,
+ dict_index_t* index);
+
+
+
+void
+trx_search_latch_release_if_reserved(
+
+ trx_t* trx);
+
+
+void
+trx_set_detailed_error(
+
+ trx_t* trx,
+ const char* msg);
+
+
+
+
+void
+trx_set_detailed_error_from_file(
+
+ trx_t* trx,
+ FILE* file);
+
+
+
+void*
+trx_get_error_info(
+
+
+ trx_t* trx);
+
+
+
+trx_t*
+trx_create(
+
+
+ sess_t* sess);
+
+
+
+trx_t*
+trx_allocate_for_mysql(void);
+
+
+
+
+
+trx_t*
+trx_allocate_for_background(void);
+
+
+
+
+
+void
+trx_free(
+
+ trx_t* trx);
+
+
+
+void
+trx_free_for_mysql(
+
+ trx_t* trx);
+
+
+
+void
+trx_free_for_background(
+
+ trx_t* trx);
+
+
+
+
+
+
+
+void
+trx_lists_init_at_db_start(void);
+
+
+
+
+ulint
+trx_start(
+
+
+
+ trx_t* trx,
+ ulint rseg_id);
+
+
+
+
+
+ulint
+trx_start_low(
+
+
+ trx_t* trx,
+ ulint rseg_id);
+
+
+
+
+static inline
+void
+trx_start_if_not_started(
+
+ trx_t* trx);
+
+
+
+static inline
+void
+trx_start_if_not_started_low(
+
+ trx_t* trx);
+
+
+
+void
+trx_start_if_not_started_noninline(
+
+ trx_t* trx);
+
+
+
+void
+trx_commit_off_kernel(
+
+ trx_t* trx);
+
+
+
+
+
+void
+trx_cleanup_at_db_startup(
+
+ trx_t* trx);
+
+
+
+ulint
+trx_commit_for_mysql(
+
+
+ trx_t* trx);
+
+
+
+ulint
+trx_prepare_for_mysql(
+
+
+ trx_t* trx);
+
+
+
+
+int
+trx_recover_for_mysql(
+
+
+ XID* xid_list,
+ ulint len);
+
+
+
+trx_t *
+trx_get_trx_by_xid(
+
+
+ XID* xid);
+
+
+
+
+ulint
+trx_commit_complete_for_mysql(
+
+
+ trx_t* trx);
+
+
+
+void
+trx_mark_sql_stat_end(
+
+ trx_t* trx);
+
+
+
+
+
+read_view_t*
+trx_assign_read_view(
+
+
+ trx_t* trx);
+
+
+
+
+
+void
+trx_end_lock_wait(
+
+ trx_t* trx);
+
+
+
+ulint
+trx_sig_send(
+
+
+
+ trx_t* trx,
+ ulint type,
+ ulint sender,
+
+ que_thr_t* receiver_thr,
+
+
+ trx_savept_t* savept,
+
+ que_thr_t** next_thr);
+# 293 "./include/trx0trx.h"
+void
+trx_sig_reply(
+
+ trx_sig_t* sig,
+ que_thr_t** next_thr);
+
+
+
+
+
+
+
+void
+trx_sig_remove(
+
+ trx_t* trx,
+ trx_sig_t* sig);
+
+
+
+void
+trx_sig_start_handle(
+
+ trx_t* trx,
+ que_thr_t** next_thr);
+# 328 "./include/trx0trx.h"
+void
+trx_end_signal_handling(
+
+ trx_t* trx);
+
+
+
+commit_node_t*
+commit_node_create(
+
+
+ mem_heap_t* heap);
+
+
+
+que_thr_t*
+trx_commit_step(
+
+
+ que_thr_t* thr);
+
+
+
+
+
+
+
+void
+trx_print(
+
+ FILE* f,
+ trx_t* trx,
+ uint max_query_len);
+
+
+
+
+
+
+ulint
+trx_is_interrupted(
+
+
+ trx_t* trx);
+
+
+
+
+
+
+struct trx_sig_struct{
+ ulint type;
+ ulint state;
+
+ ulint sender;
+
+ que_thr_t* receiver;
+
+
+ trx_savept_t savept;
+ struct { trx_sig_t * prev; trx_sig_t * next; }
+ signals;
+
+ struct { trx_sig_t * prev; trx_sig_t * next; }
+ reply_signals;
+
+};
+
+
+
+
+
+
+
+struct trx_struct{
+ ulint magic_n;
+
+
+ const char* op_info;
+
+
+ ulint type;
+ ulint conc_state;
+
+
+
+ time_t start_time;
+
+
+ ulint isolation_level;
+ ulint check_foreigns;
+
+
+
+ ulint check_unique_secondary;
+
+
+
+
+
+
+ dulint id;
+ XID xid;
+
+
+ ulint support_xa;
+
+
+
+
+ dulint no;
+
+
+ ulint flush_log_later;
+
+
+
+ ulint must_flush_log_later;
+
+
+
+
+
+ dulint commit_lsn;
+ ulint dict_operation;
+
+
+
+
+ dulint table_id;
+
+
+ int active_trans;
+
+
+ void* mysql_thd;
+
+ char** mysql_query_str;
+
+
+ const char* mysql_log_file_name;
+
+
+
+
+ ib_longlong mysql_log_offset;
+
+
+ const char* mysql_master_log_file_name;
+
+
+
+
+
+
+ ib_longlong mysql_master_log_pos;
+
+
+
+
+
+
+ char* repl_wait_binlog_name;
+
+
+
+
+
+
+
+ ib_longlong repl_wait_binlog_pos;
+
+
+ os_thread_id_t mysql_thread_id;
+
+ ulint mysql_process_no;
+
+
+
+ ulint n_mysql_tables_in_use;
+
+
+ ulint mysql_n_tables_locked;
+
+
+
+ ulint dict_operation_lock_mode;
+
+
+
+ ulint has_search_latch;
+
+
+ ulint search_latch_timeout;
+# 532 "./include/trx0trx.h"
+ ulint declared_to_be_inside_innodb;
+
+
+
+
+ ulint n_tickets_to_enter_innodb;
+
+
+
+
+
+ ib_lock_t* auto_inc_lock;
+
+
+ dict_index_t* new_rec_locks[2];
+# 558 "./include/trx0trx.h"
+ struct { trx_t * prev; trx_t * next; }
+ trx_list;
+ struct { trx_t * prev; trx_t * next; }
+ mysql_trx_list;
+
+
+ ulint error_state;
+
+
+
+
+ void* error_info;
+
+
+ sess_t* sess;
+ ulint que_state;
+
+ que_t* graph;
+
+
+
+
+
+ ulint n_active_thrs;
+ ulint handling_signals;
+
+ que_t* graph_before_signal_handling;
+
+
+
+
+ trx_sig_t sig;
+
+ struct { ulint count; trx_sig_t * start; trx_sig_t * end; }
+ signals;
+
+ struct { ulint count; trx_sig_t * start; trx_sig_t * end; }
+ reply_signals;
+
+
+
+
+
+ ib_lock_t* wait_lock;
+
+
+
+ ulint was_chosen_as_deadlock_victim;
+
+
+
+
+
+ time_t wait_started;
+ struct { ulint count; que_thr_t * start; que_thr_t * end; }
+ wait_thrs;
+
+
+ ulint deadlock_mark;
+
+
+ mem_heap_t* lock_heap;
+
+ struct { ulint count; ib_lock_t * start; ib_lock_t * end; }
+ trx_locks;
+
+ mem_heap_t* global_read_view_heap;
+
+
+ read_view_t* global_read_view;
+
+
+ read_view_t* read_view;
+
+
+
+
+
+
+ struct { ulint count; trx_named_savept_t * start; trx_named_savept_t * end; }
+ trx_savepoints;
+
+
+ ib_mutex_t undo_mutex;
+
+
+
+
+
+ dulint undo_no;
+
+ trx_savept_t last_sql_stat_start;
+
+
+
+
+ trx_rseg_t* rseg;
+
+
+ trx_undo_t* insert_undo;
+
+ trx_undo_t* update_undo;
+
+ dulint roll_limit;
+
+ ulint pages_undone;
+
+ trx_undo_arr_t* undo_no_arr;
+
+
+
+ char detailed_error[256];
+
+
+ ulint io_reads;
+ ib_longlong io_read;
+ ulint io_reads_wait_timer;
+ ib_longlong lock_que_wait_ustarted;
+ ulint lock_que_wait_timer;
+ ulint innodb_que_wait_timer;
+ ulint distinct_page_access;
+
+ unsigned char* distinct_page_access_hash;
+ ulint take_stats;
+};
+# 759 "./include/trx0trx.h"
+struct commit_node_struct{
+ que_common_t common;
+ ulint state;
+};
+
+
+
+
+
+
+
+# 1 "./include/trx0trx.ic" 1
+# 11 "./include/trx0trx.ic"
+static inline
+void
+trx_start_if_not_started(
+
+ trx_t* trx)
+{
+ ;
+
+ if (trx->conc_state == 1) {
+
+ trx_start(trx, ((ulint)(-1)));
+ }
+}
+
+
+
+
+static inline
+void
+trx_start_if_not_started_low(
+
+ trx_t* trx)
+{
+ ;
+
+ if (trx->conc_state == 1) {
+
+ trx_start_low(trx, ((ulint)(-1)));
+ }
+}
+
+
+
+static inline
+void
+trx_reset_new_rec_lock_info(
+
+ trx_t* trx)
+{
+ trx->new_rec_locks[0] = ((void *)0);
+ trx->new_rec_locks[1] = ((void *)0);
+}
+
+
+
+
+
+static inline
+void
+trx_register_new_rec_lock(
+
+ trx_t* trx,
+ dict_index_t* index)
+
+{
+ if (trx->new_rec_locks[0] == ((void *)0)) {
+ trx->new_rec_locks[0] = index;
+
+ return;
+ }
+
+ if (trx->new_rec_locks[0] == index) {
+
+ return;
+ }
+
+ if (trx->new_rec_locks[1] != ((void *)0)) {
+
+ return;
+ }
+
+ trx->new_rec_locks[1] = index;
+}
+
+
+
+static inline
+ulint
+trx_new_rec_locks_contain(
+
+
+
+ trx_t* trx,
+ dict_index_t* index)
+{
+ return(trx->new_rec_locks[0] == index
+ || trx->new_rec_locks[1] == index);
+}
+# 771 "./include/trx0trx.h" 2
+# 11 "./include/trx0sys.ic" 2
+
+
+
+typedef unsigned char trx_sysf_rseg_t;
+# 30 "./include/trx0sys.ic"
+void
+trx_sys_flush_max_trx_id(void);
+
+
+
+
+static inline
+ulint
+trx_sys_hdr_page(
+
+
+ ulint space,
+ ulint page_no)
+{
+ if ((space == 0) && (page_no == 5)) {
+
+ return((1));
+ }
+
+ return((0));
+}
+
+
+
+static inline
+trx_rseg_t*
+trx_sys_get_nth_rseg(
+
+
+
+ trx_sys_t* sys,
+ ulint n)
+{
+
+
+
+ ;
+
+ return(sys->rseg_array[n]);
+}
+
+
+
+static inline
+void
+trx_sys_set_nth_rseg(
+
+ trx_sys_t* sys,
+ ulint n,
+ trx_rseg_t* rseg)
+
+{
+ ;
+
+ sys->rseg_array[n] = rseg;
+}
+
+
+
+static inline
+trx_sysf_t*
+trx_sysf_get(
+
+
+ mtr_t* mtr)
+{
+ trx_sysf_t* header;
+
+ ;
+
+ header = 38 + buf_page_get_gen( 0, 5, 2, ((void *)0), 10, "./include/trx0sys.ic", 101, mtr);
+
+
+
+
+
+
+ return(header);
+}
+
+
+
+
+static inline
+ulint
+trx_sysf_rseg_get_space(
+
+
+ trx_sysf_t* sys_header,
+ ulint i,
+ mtr_t* mtr)
+{
+
+
+
+ ;
+ ;
+
+ return(mtr_read_ulint(sys_header + (8 + 10)
+ + i * 8
+ + 0, ((unsigned char)4), mtr));
+}
+
+
+
+
+static inline
+ulint
+trx_sysf_rseg_get_page_no(
+
+
+
+ trx_sysf_t* sys_header,
+ ulint i,
+ mtr_t* mtr)
+{
+ ;
+
+
+
+ ;
+
+ return(mtr_read_ulint(sys_header + (8 + 10)
+ + i * 8
+ + 4, ((unsigned char)4), mtr));
+}
+
+
+
+
+static inline
+void
+trx_sysf_rseg_set_space(
+
+ trx_sysf_t* sys_header,
+ ulint i,
+ ulint space,
+ mtr_t* mtr)
+{
+
+
+
+ ;
+ ;
+
+ mlog_write_ulint(sys_header + (8 + 10)
+ + i * 8
+ + 0,
+ space,
+ ((unsigned char)4), mtr);
+}
+
+
+
+
+static inline
+void
+trx_sysf_rseg_set_page_no(
+
+ trx_sysf_t* sys_header,
+ ulint i,
+ ulint page_no,
+
+ mtr_t* mtr)
+{
+
+
+
+ ;
+ ;
+
+ mlog_write_ulint(sys_header + (8 + 10)
+ + i * 8
+ + 4,
+ page_no,
+ ((unsigned char)4), mtr);
+}
+
+
+
+
+
+static inline
+void
+trx_write_trx_id(
+
+ unsigned char* ptr,
+ dulint id)
+{
+ ;
+
+ mach_write_to_6(ptr, id);
+}
+
+
+
+
+
+static inline
+dulint
+trx_read_trx_id(
+
+
+ unsigned char* ptr)
+{
+ ;
+
+ return(mach_read_from_6(ptr));
+}
+
+
+
+static inline
+trx_t*
+trx_get_on_id(
+
+
+ dulint trx_id)
+{
+ trx_t* trx;
+
+
+
+
+
+ trx = (trx_sys->trx_list).start;
+
+ while (trx != ((void *)0)) {
+ if (0 == ut_dulint_cmp(trx_id, trx->id)) {
+
+ return(trx);
+ }
+
+ trx = (((trx)->trx_list).next);
+ }
+
+ return(((void *)0));
+}
+
+
+
+
+
+
+static inline
+dulint
+trx_list_get_min_trx_id(void)
+
+
+
+{
+ trx_t* trx;
+
+
+
+
+
+ trx = (trx_sys->trx_list).end;
+
+ if (trx == ((void *)0)) {
+
+ return(trx_sys->max_trx_id);
+ }
+
+ return(trx->id);
+}
+
+
+
+static inline
+ulint
+trx_is_active(
+
+
+ dulint trx_id)
+{
+ trx_t* trx;
+
+
+
+
+
+ if (ut_dulint_cmp(trx_id, trx_list_get_min_trx_id()) < 0) {
+
+ return((0));
+ }
+
+ if (ut_dulint_cmp(trx_id, trx_sys->max_trx_id) >= 0) {
+
+
+
+
+
+
+ return((1));
+ }
+
+ trx = trx_get_on_id(trx_id);
+ if (trx && (trx->conc_state == 2 ||
+ trx->conc_state == 4)) {
+
+ return((1));
+ }
+
+ return((0));
+}
+
+
+
+static inline
+dulint
+trx_sys_get_new_trx_id(void)
+
+
+{
+ dulint id;
+# 358 "./include/trx0sys.ic"
+ if (ut_dulint_get_low(trx_sys->max_trx_id)
+ % 256 == 0) {
+
+ trx_sys_flush_max_trx_id();
+ }
+
+ id = trx_sys->max_trx_id;
+
+ { if ((trx_sys->max_trx_id).low == 0xFFFFFFFFUL) { (trx_sys->max_trx_id).high = (trx_sys->max_trx_id).high + 1; (trx_sys->max_trx_id).low = 0; } else { (trx_sys->max_trx_id).low = (trx_sys->max_trx_id).low + 1; }};
+
+ return(id);
+}
+
+
+
+static inline
+dulint
+trx_sys_get_new_trx_no(void)
+
+
+{
+
+
+
+
+ return(trx_sys_get_new_trx_id());
+}
+# 458 "./include/trx0sys.h" 2
+# 16 "./include/trx0undo.h" 2
+
+
+
+
+
+static inline
+dulint
+trx_undo_build_roll_ptr(
+
+
+ ulint is_insert,
+ ulint rseg_id,
+ ulint page_no,
+ ulint offset);
+
+
+static inline
+void
+trx_undo_decode_roll_ptr(
+
+ dulint roll_ptr,
+ ulint* is_insert,
+ ulint* rseg_id,
+ ulint* page_no,
+ ulint* offset);
+
+
+static inline
+ulint
+trx_undo_roll_ptr_is_insert(
+
+
+ dulint roll_ptr);
+
+
+
+
+static inline
+void
+trx_write_roll_ptr(
+
+ unsigned char* ptr,
+ dulint roll_ptr);
+
+
+
+
+static inline
+dulint
+trx_read_roll_ptr(
+
+
+ unsigned char* ptr);
+
+
+static inline
+ib_page_t*
+trx_undo_page_get(
+
+
+ ulint space,
+ ulint page_no,
+ mtr_t* mtr);
+
+
+static inline
+ib_page_t*
+trx_undo_page_get_s_latched(
+
+
+ ulint space,
+ ulint page_no,
+ mtr_t* mtr);
+
+
+
+static inline
+trx_undo_rec_t*
+trx_undo_page_get_prev_rec(
+
+
+ trx_undo_rec_t* rec,
+ ulint page_no,
+ ulint offset);
+
+
+
+static inline
+trx_undo_rec_t*
+trx_undo_page_get_next_rec(
+
+
+ trx_undo_rec_t* rec,
+ ulint page_no,
+ ulint offset);
+
+
+
+static inline
+trx_undo_rec_t*
+trx_undo_page_get_last_rec(
+
+
+ ib_page_t* undo_page,
+ ulint page_no,
+ ulint offset);
+
+
+
+static inline
+trx_undo_rec_t*
+trx_undo_page_get_first_rec(
+
+
+ ib_page_t* undo_page,
+ ulint page_no,
+ ulint offset);
+
+
+
+trx_undo_rec_t*
+trx_undo_get_prev_rec(
+
+
+
+ trx_undo_rec_t* rec,
+ ulint page_no,
+ ulint offset,
+ mtr_t* mtr);
+
+
+
+trx_undo_rec_t*
+trx_undo_get_next_rec(
+
+
+
+ trx_undo_rec_t* rec,
+ ulint page_no,
+ ulint offset,
+ mtr_t* mtr);
+
+
+
+trx_undo_rec_t*
+trx_undo_get_first_rec(
+
+
+
+ ulint space,
+ ulint page_no,
+ ulint offset,
+ ulint mode,
+ mtr_t* mtr);
+
+
+
+ulint
+trx_undo_add_page(
+
+
+
+ trx_t* trx,
+ trx_undo_t* undo,
+ mtr_t* mtr);
+
+
+
+
+
+
+void
+trx_undo_truncate_end(
+
+ trx_t* trx,
+ trx_undo_t* undo,
+ dulint limit);
+
+
+
+
+
+void
+trx_undo_truncate_start(
+
+ trx_rseg_t* rseg,
+ ulint space,
+ ulint hdr_page_no,
+ ulint hdr_offset,
+ dulint limit);
+# 215 "./include/trx0undo.h"
+ulint
+trx_undo_lists_init(
+
+
+
+ trx_rseg_t* rseg);
+
+
+
+
+ulint
+trx_undo_assign_undo(
+
+
+
+
+
+
+ trx_t* trx,
+ ulint type);
+
+
+
+ib_page_t*
+trx_undo_set_state_at_finish(
+
+
+
+ trx_rseg_t* rseg,
+ trx_t* trx,
+ trx_undo_t* undo,
+ mtr_t* mtr);
+
+
+
+ib_page_t*
+trx_undo_set_state_at_prepare(
+
+
+
+ trx_t* trx,
+ trx_undo_t* undo,
+ mtr_t* mtr);
+
+
+
+
+
+
+void
+trx_undo_update_cleanup(
+
+ trx_t* trx,
+ ib_page_t* undo_page,
+
+ mtr_t* mtr);
+
+
+
+
+
+void
+trx_undo_insert_cleanup(
+
+ trx_t* trx);
+
+
+
+unsigned char*
+trx_undo_parse_page_init(
+
+
+ unsigned char* ptr,
+ unsigned char* end_ptr,
+ ib_page_t* page,
+ mtr_t* mtr);
+
+
+
+unsigned char*
+trx_undo_parse_page_header(
+
+
+ ulint type,
+ unsigned char* ptr,
+ unsigned char* end_ptr,
+ ib_page_t* page,
+ mtr_t* mtr);
+
+
+
+unsigned char*
+trx_undo_parse_discard_latest(
+
+
+ unsigned char* ptr,
+ unsigned char* end_ptr,
+ ib_page_t* page,
+ mtr_t* mtr);
+# 335 "./include/trx0undo.h"
+struct trx_undo_struct{
+
+ ulint id;
+
+ ulint type;
+
+ ulint state;
+
+ ulint del_marks;
+
+
+
+
+
+
+
+ dulint trx_id;
+
+ XID xid;
+
+ ulint dict_operation;
+ dulint table_id;
+
+ trx_rseg_t* rseg;
+
+ ulint space;
+
+ ulint hdr_page_no;
+
+ ulint hdr_offset;
+
+ ulint last_page_no;
+
+
+ ulint size;
+
+ ulint empty;
+
+ ulint top_page_no;
+
+
+
+ ulint top_offset;
+
+
+ dulint top_undo_no;
+ ib_page_t* guess_page;
+
+
+ struct { trx_undo_t * prev; trx_undo_t * next; } undo_list;
+
+
+};
+# 500 "./include/trx0undo.h"
+# 1 "./include/trx0undo.ic" 1
+# 13 "./include/trx0undo.ic"
+static inline
+dulint
+trx_undo_build_roll_ptr(
+
+
+ ulint is_insert,
+ ulint rseg_id,
+ ulint page_no,
+ ulint offset)
+{
+ ;
+ ;
+
+ return(ut_dulint_create(is_insert * 128 * 256 * 256
+ + rseg_id * 256 * 256
+ + (page_no / 256) / 256,
+ (page_no % (256 * 256)) * 256 * 256
+ + offset));
+}
+
+
+
+static inline
+void
+trx_undo_decode_roll_ptr(
+
+ dulint roll_ptr,
+ ulint* is_insert,
+ ulint* rseg_id,
+ ulint* page_no,
+ ulint* offset)
+{
+ ulint low;
+ ulint high;
+
+ ;
+ ;
+
+ high = ut_dulint_get_high(roll_ptr);
+ low = ut_dulint_get_low(roll_ptr);
+
+ *offset = low % (256 * 256);
+
+ *is_insert = high / (256 * 256 * 128);
+ *rseg_id = (high / (256 * 256)) % 128;
+
+ *page_no = (high % (256 * 256)) * 256 * 256
+ + (low / 256) / 256;
+}
+
+
+
+static inline
+ulint
+trx_undo_roll_ptr_is_insert(
+
+
+ dulint roll_ptr)
+{
+ ulint high;
+
+ ;
+ ;
+
+ high = ut_dulint_get_high(roll_ptr);
+
+ return(high / (256 * 256 * 128));
+}
+
+
+
+
+
+static inline
+void
+trx_write_roll_ptr(
+
+ unsigned char* ptr,
+ dulint roll_ptr)
+{
+ ;
+
+ mach_write_to_7(ptr, roll_ptr);
+}
+
+
+
+
+
+static inline
+dulint
+trx_read_roll_ptr(
+
+
+ unsigned char* ptr)
+{
+ ;
+
+ return(mach_read_from_7(ptr));
+}
+
+
+
+static inline
+ib_page_t*
+trx_undo_page_get(
+
+
+ ulint space,
+ ulint page_no,
+ mtr_t* mtr)
+{
+ ib_page_t* page;
+
+ page = buf_page_get_gen( space, page_no, 2, ((void *)0), 10, "./include/trx0undo.ic", 127, mtr);
+
+
+
+
+
+ return(page);
+}
+
+
+
+static inline
+ib_page_t*
+trx_undo_page_get_s_latched(
+
+
+ ulint space,
+ ulint page_no,
+ mtr_t* mtr)
+{
+ ib_page_t* page;
+
+ page = buf_page_get_gen( space, page_no, 1, ((void *)0), 10, "./include/trx0undo.ic", 149, mtr);
+
+
+
+
+
+ return(page);
+}
+
+
+
+
+static inline
+ulint
+trx_undo_page_get_start(
+
+
+ ib_page_t* undo_page,
+ ulint page_no,
+ ulint offset)
+{
+ ulint start;
+
+ if (page_no == buf_frame_get_page_no(undo_page)) {
+
+ start = mach_read_from_2(offset + undo_page
+ + 18);
+ } else {
+ start = 38 + (6 + (2 * 6));
+ }
+
+ return(start);
+}
+
+
+
+
+static inline
+ulint
+trx_undo_page_get_end(
+
+
+ ib_page_t* undo_page,
+ ulint page_no,
+ ulint offset)
+{
+ trx_ulogf_t* log_hdr;
+ ulint end;
+
+ if (page_no == buf_frame_get_page_no(undo_page)) {
+
+ log_hdr = undo_page + offset;
+
+ end = mach_read_from_2(log_hdr + 30);
+
+ if (end == 0) {
+ end = mach_read_from_2(undo_page + 38
+ + 4);
+ }
+ } else {
+ end = mach_read_from_2(undo_page + 38
+ + 4);
+ }
+
+ return(end);
+}
+
+
+
+
+static inline
+trx_undo_rec_t*
+trx_undo_page_get_prev_rec(
+
+
+ trx_undo_rec_t* rec,
+ ulint page_no,
+ ulint offset)
+{
+ ib_page_t* undo_page;
+ ulint start;
+
+ undo_page = buf_frame_align(rec);
+
+ start = trx_undo_page_get_start(undo_page, page_no, offset);
+
+ if (start + undo_page == rec) {
+
+ return(((void *)0));
+ }
+
+ return(undo_page + mach_read_from_2(rec - 2));
+}
+
+
+
+
+static inline
+trx_undo_rec_t*
+trx_undo_page_get_next_rec(
+
+
+ trx_undo_rec_t* rec,
+ ulint page_no,
+ ulint offset)
+{
+ ib_page_t* undo_page;
+ ulint end;
+ ulint next;
+
+ undo_page = buf_frame_align(rec);
+
+ end = trx_undo_page_get_end(undo_page, page_no, offset);
+
+ next = mach_read_from_2(rec);
+
+ if (next == end) {
+
+ return(((void *)0));
+ }
+
+ return(undo_page + next);
+}
+
+
+
+
+static inline
+trx_undo_rec_t*
+trx_undo_page_get_last_rec(
+
+
+ ib_page_t* undo_page,
+ ulint page_no,
+ ulint offset)
+{
+ ulint start;
+ ulint end;
+
+ start = trx_undo_page_get_start(undo_page, page_no, offset);
+ end = trx_undo_page_get_end(undo_page, page_no, offset);
+
+ if (start == end) {
+
+ return(((void *)0));
+ }
+
+ return(undo_page + mach_read_from_2(undo_page + end - 2));
+}
+
+
+
+
+static inline
+trx_undo_rec_t*
+trx_undo_page_get_first_rec(
+
+
+ ib_page_t* undo_page,
+ ulint page_no,
+ ulint offset)
+{
+ ulint start;
+ ulint end;
+
+ start = trx_undo_page_get_start(undo_page, page_no, offset);
+ end = trx_undo_page_get_end(undo_page, page_no, offset);
+
+ if (start == end) {
+
+ return(((void *)0));
+ }
+
+ return(undo_page + start);
+}
+# 501 "./include/trx0undo.h" 2
+# 11 "./include/dict0dict.ic" 2
+
+
+
+
+static inline
+dtype_t*
+dict_col_get_type(
+
+ dict_col_t* col)
+{
+ ;
+
+ return(&col->type);
+}
+# 52 "./include/dict0dict.ic"
+static inline
+ulint
+dict_col_get_no(
+
+ dict_col_t* col)
+{
+ ;
+
+ return(col->ind);
+}
+
+
+
+static inline
+ulint
+dict_col_get_clust_pos(
+
+ dict_col_t* col)
+{
+ ;
+
+ return(col->clust_pos);
+}
+
+
+
+static inline
+dict_index_t*
+dict_table_get_first_index(
+
+
+ dict_table_t* table)
+{
+ ;
+ ;
+
+ return((table->indexes).start);
+}
+
+
+
+static inline
+dict_index_t*
+dict_table_get_next_index(
+
+
+ dict_index_t* index)
+{
+ ;
+ ;
+
+ return((((index)->indexes).next));
+}
+
+
+
+
+static inline
+ulint
+dict_table_get_n_user_cols(
+
+
+
+ dict_table_t* table)
+{
+ ;
+ ;
+
+ return(table->n_cols - 4);
+}
+
+
+
+static inline
+ulint
+dict_table_get_n_sys_cols(
+
+
+
+ dict_table_t* table __attribute__((unused)))
+{
+ ;
+ ;
+ ;
+
+ return(4);
+}
+
+
+
+
+static inline
+ulint
+dict_table_get_n_cols(
+
+
+ dict_table_t* table)
+{
+ ;
+ ;
+
+ return(table->n_cols);
+}
+
+
+
+static inline
+dict_col_t*
+dict_table_get_nth_col(
+
+
+ dict_table_t* table,
+ ulint pos)
+{
+ ;
+ ;
+ ;
+
+ return((table->cols) + pos);
+}
+
+
+
+static inline
+dict_col_t*
+dict_table_get_sys_col(
+
+
+ dict_table_t* table,
+ ulint sys)
+{
+ dict_col_t* col;
+
+ ;
+ ;
+ ;
+
+ col = dict_table_get_nth_col(table, table->n_cols
+ - 4 + sys);
+ ;
+ ;
+
+ return(col);
+}
+
+
+
+static inline
+ulint
+dict_table_get_sys_col_no(
+
+
+ dict_table_t* table,
+ ulint sys)
+{
+ ;
+ ;
+ ;
+
+ return(table->n_cols - 4 + sys);
+}
+
+
+
+
+static inline
+ulint
+dict_index_get_n_fields(
+
+
+ dict_index_t* index)
+
+{
+ ;
+ ;
+
+ return(index->n_fields);
+}
+
+
+
+
+
+
+static inline
+ulint
+dict_index_get_n_unique(
+
+
+ dict_index_t* index)
+
+{
+ ;
+ ;
+ ;
+
+ return(index->n_uniq);
+}
+
+
+
+
+
+static inline
+ulint
+dict_index_get_n_unique_in_tree(
+
+
+ dict_index_t* index)
+
+{
+ ;
+ ;
+ ;
+
+ if (index->type & 1) {
+
+ return(dict_index_get_n_unique(index));
+ }
+
+ return(dict_index_get_n_fields(index));
+}
+
+
+
+
+
+
+static inline
+ulint
+dict_index_get_n_ordering_defined_by_user(
+
+
+ dict_index_t* index)
+
+{
+ return(index->n_user_defined_cols);
+}
+
+
+
+static inline
+dict_field_t*
+dict_index_get_nth_field(
+
+
+ dict_index_t* index,
+ ulint pos)
+{
+ ;
+ ;
+ ;
+
+ return((index->fields) + pos);
+}
+
+
+
+static inline
+ulint
+dict_index_get_sys_col_pos(
+
+
+
+ dict_index_t* index,
+ ulint type)
+{
+ dict_col_t* col;
+
+ ;
+ ;
+ ;
+
+ col = dict_table_get_sys_col(index->table, type);
+
+ if (index->type & 1) {
+
+ return(col->clust_pos);
+ }
+
+ return(dict_index_get_nth_col_pos(index,
+ dict_table_get_sys_col_no(index->table, type)));
+}
+
+
+
+static inline
+dict_tree_t*
+dict_index_get_tree(
+
+
+ dict_index_t* index)
+{
+ ;
+ ;
+
+ return(index->tree);
+}
+
+
+
+static inline
+ulint
+dict_field_get_order(
+
+ dict_field_t* field)
+{
+ ;
+
+ return(field->order);
+}
+
+
+
+static inline
+dict_col_t*
+dict_field_get_col(
+
+ dict_field_t* field)
+{
+ ;
+
+ return(field->col);
+}
+
+
+
+static inline
+dtype_t*
+dict_index_get_nth_type(
+
+
+ dict_index_t* index,
+ ulint pos)
+{
+ return(dict_col_get_type(dict_field_get_col(
+ dict_index_get_nth_field(index, pos))));
+}
+
+
+
+static inline
+ulint
+dict_index_get_nth_col_no(
+
+
+ dict_index_t* index,
+ ulint pos)
+{
+ return(dict_col_get_no(dict_field_get_col(
+ dict_index_get_nth_field(index, pos))));
+}
+
+
+
+static inline
+ulint
+dict_tree_get_space(
+
+
+ dict_tree_t* tree)
+{
+ ;
+ ;
+
+ return(tree->space);
+}
+
+
+
+static inline
+void
+dict_tree_set_space(
+
+ dict_tree_t* tree,
+ ulint space)
+{
+ ;
+ ;
+
+ tree->space = space;
+}
+
+
+
+static inline
+ulint
+dict_tree_get_page(
+
+
+ dict_tree_t* tree)
+{
+ ;
+ ;
+
+ return(tree->page);
+}
+
+
+
+static inline
+void
+dict_tree_set_page(
+
+ dict_tree_t* tree,
+ ulint page)
+{
+ ;
+ ;
+
+ tree->page = page;
+}
+
+
+
+static inline
+ulint
+dict_tree_get_type(
+
+
+ dict_tree_t* tree)
+{
+ ;
+ ;
+
+ return(tree->type);
+}
+
+
+
+static inline
+rw_lock_t*
+dict_tree_get_lock(
+
+
+ dict_tree_t* tree)
+{
+ ;
+ ;
+
+ return(&(tree->lock));
+}
+
+
+
+
+
+static inline
+ulint
+dict_tree_get_space_reserve(
+
+
+
+ dict_tree_t* tree)
+{
+ ;
+
+ tree = tree;
+
+ return((2 * 8192) / 16);
+}
+
+
+
+static inline
+dict_table_t*
+dict_table_check_if_in_cache_low(
+
+
+ const char* table_name)
+{
+ dict_table_t* table;
+ ulint table_fold;
+
+ ;
+
+
+
+
+
+ table_fold = ut_fold_string(table_name);
+
+ { (table) = (hash_get_nth_cell(dict_sys->table_hash, hash_calc_hash(table_fold, dict_sys->table_hash))->node); while ((table) != ((void *)0)) { if (ut_strcmp(table->name, table_name) == 0) { break; } else { (table) = ((table)->name_hash); } }};
+
+
+
+ if (table) {
+ { ; do { if (__builtin_expect(!((ulint)((dict_sys->table_LRU).count > 0)), (0))) { ut_dbg_assertion_failed("(dict_sys->table_LRU).count > 0", "./include/dict0dict.ic", (ulint) 539); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("./include/dict0dict.ic", (ulint) 539); } while (0); } while (0); ((dict_sys->table_LRU).count)--; if (((table)->table_LRU).next != ((void *)0)) { ((((table)->table_LRU).next)->table_LRU).prev = ((table)->table_LRU).prev; } else { (dict_sys->table_LRU).end = ((table)->table_LRU).prev; } if (((table)->table_LRU).prev != ((void *)0)) { ((((table)->table_LRU).prev)->table_LRU).next = ((table)->table_LRU).next; } else { (dict_sys->table_LRU).start = ((table)->table_LRU).next; }};
+ { ; ((dict_sys->table_LRU).count)++; ((table)->table_LRU).next = (dict_sys->table_LRU).start; ((table)->table_LRU).prev = ((void *)0); if ((dict_sys->table_LRU).start != ((void *)0)) { (((dict_sys->table_LRU).start)->table_LRU).prev = (table); } (dict_sys->table_LRU).start = (table); if ((dict_sys->table_LRU).end == ((void *)0)) { (dict_sys->table_LRU).end = (table); }};
+ }
+
+ return(table);
+}
+
+
+
+
+static inline
+dict_table_t*
+dict_table_get_low(
+
+
+ const char* table_name)
+{
+ dict_table_t* table;
+
+ ;
+
+
+
+
+ table = dict_table_check_if_in_cache_low(table_name);
+
+ if (table == ((void *)0)) {
+ table = dict_load_table(table_name);
+ }
+
+ return(table);
+}
+
+
+
+static inline
+dict_table_t*
+dict_table_get_on_id_low(
+
+
+ dulint table_id,
+ trx_t* trx)
+{
+ dict_table_t* table;
+ ulint fold;
+
+
+
+
+ trx = trx;
+
+
+ fold = ut_fold_dulint(table_id);
+
+ { (table) = (hash_get_nth_cell(dict_sys->table_id_hash, hash_calc_hash(fold, dict_sys->table_id_hash))->node); while ((table) != ((void *)0)) { if (ut_dulint_cmp(table->id, table_id) == 0) { break; } else { (table) = ((table)->id_hash); } }};
+
+ if (table == ((void *)0)) {
+ table = dict_load_table_on_id(table_id);
+ }
+
+ if (table != ((void *)0)) {
+ table->mem_fix++;
+
+
+ { ; do { if (__builtin_expect(!((ulint)((dict_sys->table_LRU).count > 0)), (0))) { ut_dbg_assertion_failed("(dict_sys->table_LRU).count > 0", "./include/dict0dict.ic", (ulint) 603); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("./include/dict0dict.ic", (ulint) 603); } while (0); } while (0); ((dict_sys->table_LRU).count)--; if (((table)->table_LRU).next != ((void *)0)) { ((((table)->table_LRU).next)->table_LRU).prev = ((table)->table_LRU).prev; } else { (dict_sys->table_LRU).end = ((table)->table_LRU).prev; } if (((table)->table_LRU).prev != ((void *)0)) { ((((table)->table_LRU).prev)->table_LRU).next = ((table)->table_LRU).next; } else { (dict_sys->table_LRU).start = ((table)->table_LRU).next; }};
+ { ; ((dict_sys->table_LRU).count)++; ((table)->table_LRU).next = (dict_sys->table_LRU).start; ((table)->table_LRU).prev = ((void *)0); if ((dict_sys->table_LRU).start != ((void *)0)) { (((dict_sys->table_LRU).start)->table_LRU).prev = (table); } (dict_sys->table_LRU).start = (table); if ((dict_sys->table_LRU).end == ((void *)0)) { (dict_sys->table_LRU).end = (table); }};
+
+
+ }
+
+
+
+ return(table);
+}
+
+
+
+static inline
+void
+dict_table_release(
+
+ dict_table_t* table)
+{
+ mutex_enter_func((&(dict_sys->mutex)), "./include/dict0dict.ic", 622);
+
+ table->mem_fix--;
+
+ mutex_exit(&(dict_sys->mutex));
+}
+
+
+
+static inline
+dict_index_t*
+dict_table_get_index(
+
+
+ dict_table_t* table,
+ const char* name)
+{
+ dict_index_t* index = ((void *)0);
+
+ index = dict_table_get_first_index(table);
+
+ while (index != ((void *)0)) {
+ if (ut_strcmp(name, index->name) == 0) {
+
+ break;
+ }
+
+ index = dict_table_get_next_index(index);
+ }
+
+ return(index);
+}
+# 987 "./include/dict0dict.h" 2
+# 15 "./include/btr0btr.h" 2
+
+# 1 "./include/page0cur.h" 1
+# 15 "./include/page0cur.h"
+# 1 "./include/page0page.h" 1
+# 19 "./include/page0page.h"
+# 1 "./include/rem0rec.h" 1
+# 47 "./include/rem0rec.h"
+static inline
+ulint
+rec_get_next_offs(
+
+
+
+ rec_t* rec,
+ ulint comp);
+
+
+
+static inline
+void
+rec_set_next_offs(
+
+ rec_t* rec,
+ ulint comp,
+ ulint next);
+
+
+
+static inline
+ulint
+rec_get_n_fields_old(
+
+
+ rec_t* rec);
+
+
+
+static inline
+ulint
+rec_get_n_fields(
+
+
+ rec_t* rec,
+ dict_index_t* index);
+
+
+
+static inline
+ulint
+rec_get_n_owned(
+
+
+ rec_t* rec,
+ ulint comp);
+
+
+
+static inline
+void
+rec_set_n_owned(
+
+ rec_t* rec,
+ ulint comp,
+ ulint n_owned);
+
+
+
+static inline
+ulint
+rec_get_info_bits(
+
+
+ rec_t* rec,
+ ulint comp);
+
+
+static inline
+void
+rec_set_info_bits(
+
+ rec_t* rec,
+ ulint comp,
+ ulint bits);
+
+
+static inline
+ulint
+rec_get_status(
+
+
+ rec_t* rec);
+
+
+
+static inline
+void
+rec_set_status(
+
+ rec_t* rec,
+ ulint bits);
+
+
+
+
+static inline
+ulint
+rec_get_info_and_status_bits(
+
+
+ rec_t* rec,
+ ulint comp);
+
+
+
+static inline
+void
+rec_set_info_and_status_bits(
+
+ rec_t* rec,
+ ulint comp,
+ ulint bits);
+
+
+
+static inline
+ulint
+rec_get_deleted_flag(
+
+
+ rec_t* rec,
+ ulint comp);
+
+
+static inline
+void
+rec_set_deleted_flag(
+
+ rec_t* rec,
+ ulint comp,
+ ulint flag);
+
+
+static inline
+ulint
+rec_get_node_ptr_flag(
+
+
+ rec_t* rec);
+
+
+
+static inline
+ulint
+rec_get_heap_no(
+
+
+ rec_t* rec,
+ ulint comp);
+
+
+
+static inline
+void
+rec_set_heap_no(
+
+ rec_t* rec,
+ ulint comp,
+ ulint heap_no);
+
+
+
+static inline
+ulint
+rec_get_1byte_offs_flag(
+
+
+ rec_t* rec);
+
+
+
+
+ulint*
+rec_get_offsets_func(
+
+
+ rec_t* rec,
+ dict_index_t* index,
+ ulint* offsets,
+
+
+ ulint n_fields,
+
+ mem_heap_t** heap,
+ const char* file,
+ ulint line);
+
+
+
+
+
+
+static inline
+ulint
+rec_offs_validate(
+
+
+ rec_t* rec,
+ dict_index_t* index,
+ const ulint* offsets);
+
+
+
+static inline
+void
+rec_offs_make_valid(
+
+ rec_t* rec,
+ dict_index_t* index,
+ ulint* offsets);
+
+
+
+
+
+unsigned char*
+rec_get_nth_field_old(
+
+
+ rec_t* rec,
+ ulint n,
+ ulint* len);
+
+
+
+
+
+static inline
+ulint
+rec_get_nth_field_size(
+
+
+ rec_t* rec,
+ ulint n);
+
+
+
+static inline
+unsigned char*
+rec_get_nth_field(
+
+
+ rec_t* rec,
+ const ulint* offsets,
+ ulint n,
+ ulint* len);
+
+
+
+
+static inline
+ulint
+rec_offs_comp(
+
+
+ const ulint* offsets);
+
+
+static inline
+ulint
+rec_offs_nth_extern(
+
+
+ const ulint* offsets,
+ ulint n);
+
+
+static inline
+ulint
+rec_offs_nth_sql_null(
+
+
+ const ulint* offsets,
+ ulint n);
+
+
+static inline
+ulint
+rec_offs_nth_size(
+
+
+ const ulint* offsets,
+ ulint n);
+
+
+
+
+static inline
+ulint
+rec_offs_any_extern(
+
+
+ const ulint* offsets);
+
+
+static inline
+void
+rec_set_nth_field_extern_bit(
+
+ rec_t* rec,
+ dict_index_t* index,
+ ulint i,
+ ulint val,
+ mtr_t* mtr);
+
+
+
+
+
+void
+rec_set_field_extern_bits(
+
+ rec_t* rec,
+ dict_index_t* index,
+ const ulint* vec,
+ ulint n_fields,
+ mtr_t* mtr);
+# 374 "./include/rem0rec.h"
+static inline
+void
+rec_set_nth_field(
+
+ rec_t* rec,
+ const ulint* offsets,
+ ulint n,
+ const void* data,
+ ulint len);
+
+
+
+
+
+static inline
+ulint
+rec_get_data_size_old(
+
+
+ rec_t* rec);
+
+
+static inline
+ulint
+rec_offs_n_fields(
+
+
+ const ulint* offsets);
+
+
+
+
+
+static inline
+ulint
+rec_offs_data_size(
+
+
+ const ulint* offsets);
+
+
+
+
+static inline
+ulint
+rec_offs_extra_size(
+
+
+ const ulint* offsets);
+
+
+static inline
+ulint
+rec_offs_size(
+
+
+ const ulint* offsets);
+
+
+static inline
+unsigned char*
+rec_get_start(
+
+
+ rec_t* rec,
+ const ulint* offsets);
+
+
+static inline
+unsigned char*
+rec_get_end(
+
+
+ rec_t* rec,
+ const ulint* offsets);
+
+
+static inline
+rec_t*
+rec_copy(
+
+
+ void* buf,
+ const rec_t* rec,
+ const ulint* offsets);
+
+
+
+
+rec_t*
+rec_copy_prefix_to_buf(
+
+
+ rec_t* rec,
+ dict_index_t* index,
+ ulint n_fields,
+ unsigned char** buf,
+
+ ulint* buf_size);
+
+
+static inline
+ulint
+rec_fold(
+
+
+ rec_t* rec,
+ const ulint* offsets,
+
+ ulint n_fields,
+
+ ulint n_bytes,
+
+ dulint tree_id);
+
+
+
+
+rec_t*
+rec_convert_dtuple_to_rec(
+
+
+
+ unsigned char* buf,
+
+ dict_index_t* index,
+ dtuple_t* dtuple);
+
+
+
+static inline
+ulint
+rec_get_converted_extra_size(
+
+
+ ulint data_size,
+ ulint n_fields)
+ __attribute__((const));
+
+
+
+static inline
+ulint
+rec_get_converted_size(
+
+
+ dict_index_t* index,
+ dtuple_t* dtuple);
+
+
+
+
+void
+rec_copy_prefix_to_dtuple(
+
+ dtuple_t* tuple,
+ rec_t* rec,
+ dict_index_t* index,
+ ulint n_fields,
+ mem_heap_t* heap);
+
+
+
+ulint
+rec_validate(
+
+
+ rec_t* rec,
+ const ulint* offsets);
+
+
+
+void
+rec_print_old(
+
+ FILE* file,
+ rec_t* rec);
+
+
+
+void
+rec_print_new(
+
+ FILE* file,
+ rec_t* rec,
+ const ulint* offsets);
+
+
+
+void
+rec_print(
+
+ FILE* file,
+ rec_t* rec,
+ dict_index_t* index);
+# 582 "./include/rem0rec.h"
+# 1 "./include/rem0rec.ic" 1
+# 134 "./include/rem0rec.ic"
+void
+rec_set_nth_field_null_bit(
+
+ rec_t* rec,
+ ulint i,
+ ulint val);
+
+
+
+
+void
+rec_set_nth_field_sql_null(
+
+ rec_t* rec,
+ ulint n);
+
+
+
+
+void
+rec_set_nth_field_extern_bit_old(
+
+ rec_t* rec,
+ ulint i,
+ ulint val,
+ mtr_t* mtr);
+
+
+
+
+
+void
+rec_set_nth_field_extern_bit_new(
+
+ rec_t* rec,
+ dict_index_t* index,
+ ulint ith,
+ ulint val,
+ mtr_t* mtr);
+
+
+
+
+
+static inline
+ulint
+rec_get_bit_field_1(
+
+ rec_t* rec,
+ ulint offs,
+ ulint mask,
+ ulint shift)
+{
+ ;
+
+ return((mach_read_from_1(rec - offs) & mask) >> shift);
+}
+
+
+
+static inline
+void
+rec_set_bit_field_1(
+
+ rec_t* rec,
+ ulint val,
+ ulint offs,
+ ulint mask,
+ ulint shift)
+{
+ ;
+ ;
+ ;
+ ;
+ ;
+ ;
+
+ mach_write_to_1(rec - offs,
+ (mach_read_from_1(rec - offs) & ~mask)
+ | (val << shift));
+}
+
+
+
+static inline
+ulint
+rec_get_bit_field_2(
+
+ rec_t* rec,
+ ulint offs,
+ ulint mask,
+ ulint shift)
+{
+ ;
+
+ return((mach_read_from_2(rec - offs) & mask) >> shift);
+}
+
+
+
+static inline
+void
+rec_set_bit_field_2(
+
+ rec_t* rec,
+ ulint val,
+ ulint offs,
+ ulint mask,
+ ulint shift)
+{
+ ;
+ ;
+ ;
+ ;
+ ;
+ ;
+ ;
+ ;
+
+ mach_write_to_2(rec - offs,
+ (mach_read_from_2(rec - offs) & ~mask)
+ | (val << shift));
+}
+
+
+
+
+static inline
+ulint
+rec_get_next_offs(
+
+
+
+ rec_t* rec,
+ ulint comp)
+{
+ ulint field_value;
+
+ ;
+ ;
+
+ field_value = mach_read_from_2(rec - 2);
+
+ if (comp) {
+# 288 "./include/rem0rec.ic"
+ ;
+
+
+
+
+
+ if (field_value == 0) {
+
+ return(0);
+ }
+
+ return(ut_align_offset(rec + field_value, (2 * 8192)));
+ } else {
+ ;
+
+ return(field_value);
+ }
+}
+
+
+
+
+static inline
+void
+rec_set_next_offs(
+
+ rec_t* rec,
+ ulint comp,
+ ulint next)
+{
+ ;
+ ;
+ ;
+ ;
+
+ if (comp) {
+ ulint field_value;
+
+ if (next) {
+
+
+
+
+ field_value = (ulint)((lint)next
+ - (lint)ut_align_offset(rec, (2 * 8192)));
+ field_value &= 0xFFFFUL;
+ } else {
+ field_value = 0;
+ }
+
+ mach_write_to_2(rec - 2, field_value);
+ } else {
+ mach_write_to_2(rec - 2, next);
+ }
+}
+
+
+
+
+static inline
+ulint
+rec_get_n_fields_old(
+
+
+ rec_t* rec)
+{
+ ulint ret;
+
+ ;
+
+ ret = rec_get_bit_field_2(rec, 4,
+ 0x7FEUL, 1);
+ ;
+ ;
+
+ return(ret);
+}
+
+
+
+
+static inline
+void
+rec_set_n_fields_old(
+
+ rec_t* rec,
+ ulint n_fields)
+{
+ ;
+ ;
+ ;
+
+ rec_set_bit_field_2(rec, n_fields, 4,
+ 0x7FEUL, 1);
+}
+
+
+
+static inline
+ulint
+rec_get_status(
+
+
+ rec_t* rec)
+{
+ ulint ret;
+
+ ;
+
+ ret = rec_get_bit_field_1(rec, 3,
+ 0x7UL, 0);
+ ;
+
+ return(ret);
+}
+
+
+
+
+static inline
+ulint
+rec_get_n_fields(
+
+
+ rec_t* rec,
+ dict_index_t* index)
+{
+ ;
+ ;
+ if (__builtin_expect(!index->table->comp, (0))) {
+ return(rec_get_n_fields_old(rec));
+ }
+ switch (rec_get_status(rec)) {
+ case 0:
+ return(dict_index_get_n_fields(index));
+ case 1:
+ return(dict_index_get_n_unique_in_tree(index) + 1);
+ case 2:
+ case 3:
+ return(1);
+ default:
+ do { ut_dbg_assertion_failed(0, "./include/rem0rec.ic", (ulint) 429); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } while (0);
+ return(((ulint)(-1)));
+ }
+}
+
+
+
+
+static inline
+ulint
+rec_get_n_owned(
+
+
+ rec_t* rec,
+ ulint comp)
+{
+ ulint ret;
+
+ ;
+
+ ret = rec_get_bit_field_1(rec,
+ comp ? 5 : 6,
+ 0xFUL, 0);
+ ;
+
+ return(ret);
+}
+
+
+
+static inline
+void
+rec_set_n_owned(
+
+ rec_t* rec,
+ ulint comp,
+ ulint n_owned)
+{
+ ;
+ ;
+
+ rec_set_bit_field_1(rec, n_owned,
+ comp ? 5 : 6,
+ 0xFUL, 0);
+}
+
+
+
+static inline
+ulint
+rec_get_info_bits(
+
+
+ rec_t* rec,
+ ulint comp)
+{
+ ulint ret;
+
+ ;
+
+ ret = rec_get_bit_field_1(rec,
+ comp ? 5 : 6,
+ 0xF0UL, 0);
+ ;
+
+ return(ret);
+}
+
+
+
+static inline
+void
+rec_set_info_bits(
+
+ rec_t* rec,
+ ulint comp,
+ ulint bits)
+{
+ ;
+ ;
+
+ rec_set_bit_field_1(rec, bits,
+ comp ? 5 : 6,
+ 0xF0UL, 0);
+}
+
+
+
+static inline
+void
+rec_set_status(
+
+ rec_t* rec,
+ ulint bits)
+{
+ ;
+ ;
+
+ rec_set_bit_field_1(rec, bits, 3,
+ 0x7UL, 0);
+}
+
+
+
+
+static inline
+ulint
+rec_get_info_and_status_bits(
+
+
+ rec_t* rec,
+ ulint comp)
+{
+ ulint bits;
+
+
+
+
+ if (__builtin_expect(comp, ((ulint) 1 << 31))) {
+ bits = rec_get_info_bits(rec, (1)) | rec_get_status(rec);
+ } else {
+ bits = rec_get_info_bits(rec, (0));
+ ;
+ }
+ return(bits);
+}
+
+
+
+static inline
+void
+rec_set_info_and_status_bits(
+
+ rec_t* rec,
+ ulint comp,
+ ulint bits)
+{
+
+
+
+
+ if (comp) {
+ rec_set_status(rec, bits & 0x7UL);
+ } else {
+ ;
+ }
+ rec_set_info_bits(rec, comp, bits & ~0x7UL);
+}
+
+
+
+static inline
+ulint
+rec_get_deleted_flag(
+
+
+ rec_t* rec,
+ ulint comp)
+{
+ if (__builtin_expect(comp, ((ulint) 1 << 31))) {
+ return(__builtin_expect(rec_get_bit_field_1(rec, 5, 0x20UL, 0), (0)));
+
+
+ } else {
+ return(__builtin_expect(rec_get_bit_field_1(rec, 6, 0x20UL, 0), (0)));
+
+
+ }
+}
+
+
+
+static inline
+void
+rec_set_deleted_flag(
+
+ rec_t* rec,
+ ulint comp,
+ ulint flag)
+{
+ ulint val;
+
+ val = rec_get_info_bits(rec, comp);
+
+ if (flag) {
+ val |= 0x20UL;
+ } else {
+ val &= ~0x20UL;
+ }
+
+ rec_set_info_bits(rec, comp, val);
+}
+
+
+
+static inline
+ulint
+rec_get_node_ptr_flag(
+
+
+ rec_t* rec)
+{
+ return(1 == rec_get_status(rec));
+}
+
+
+
+
+static inline
+ulint
+rec_get_heap_no(
+
+
+ rec_t* rec,
+ ulint comp)
+{
+ ulint ret;
+
+ ;
+
+ ret = rec_get_bit_field_2(rec,
+ comp ? 4 : 5,
+ 0xFFF8UL, 3);
+ ;
+
+ return(ret);
+}
+
+
+
+static inline
+void
+rec_set_heap_no(
+
+ rec_t* rec,
+ ulint comp,
+ ulint heap_no)
+{
+ ;
+
+ rec_set_bit_field_2(rec, heap_no,
+ comp ? 4 : 5,
+ 0xFFF8UL, 3);
+}
+
+
+
+
+static inline
+ulint
+rec_get_1byte_offs_flag(
+
+
+ rec_t* rec)
+{
+
+
+
+
+ return(rec_get_bit_field_1(rec, 3, 0x1UL,
+ 0));
+}
+
+
+
+static inline
+void
+rec_set_1byte_offs_flag(
+
+ rec_t* rec,
+ ulint flag)
+{
+
+
+
+ ;
+
+ rec_set_bit_field_1(rec, flag, 3, 0x1UL,
+ 0);
+}
+
+
+
+
+
+static inline
+ulint
+rec_1_get_field_end_info(
+
+
+
+ rec_t* rec,
+ ulint n)
+{
+ ;
+ ;
+
+ return(mach_read_from_1(rec - (6 + n + 1)));
+}
+
+
+
+
+
+static inline
+ulint
+rec_2_get_field_end_info(
+
+
+
+ rec_t* rec,
+ ulint n)
+{
+ ;
+ ;
+
+ return(mach_read_from_2(rec - (6 + 2 * n + 2)));
+}
+# 764 "./include/rem0rec.ic"
+static inline
+ulint
+rec_offs_get_n_alloc(
+
+
+ const ulint* offsets)
+{
+ ulint n_alloc;
+ ;
+ n_alloc = offsets[0];
+ ;
+ return(n_alloc);
+}
+
+
+
+
+static inline
+void
+rec_offs_set_n_alloc(
+
+ ulint* offsets,
+ ulint n_alloc)
+{
+ ;
+ ;
+ offsets[0] = n_alloc;
+}
+
+
+
+static inline
+ulint
+rec_offs_n_fields(
+
+
+ const ulint* offsets)
+{
+ ulint n_fields;
+ ;
+ n_fields = offsets[1];
+ ;
+ ;
+ ;
+
+ return(n_fields);
+}
+
+
+
+static inline
+ulint
+rec_offs_validate(
+
+
+ rec_t* rec,
+ dict_index_t* index,
+ const ulint* offsets)
+{
+ ulint i = rec_offs_n_fields(offsets);
+ ulint last = ((ulint)(-2));
+ ulint comp = *(offsets + 2) & ((ulint) 1 << 31);
+
+ if (rec) {
+ ;
+ if (!comp) {
+ do { if (__builtin_expect(!((ulint)(rec_get_n_fields_old(rec) >= i)), (0))) { ut_dbg_assertion_failed("rec_get_n_fields_old(rec) >= i", "./include/rem0rec.ic", (ulint) 830); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("./include/rem0rec.ic", (ulint) 830); } while (0); } while (0);
+ }
+ }
+ if (index) {
+ ulint max_n_fields;
+ ;
+ max_n_fields = ut_max(
+ dict_index_get_n_fields(index),
+ dict_index_get_n_unique_in_tree(index) + 1);
+ if (comp && rec) {
+ switch (rec_get_status(rec)) {
+ case 0:
+ break;
+ case 1:
+ max_n_fields =
+ dict_index_get_n_unique_in_tree(index) + 1;
+ break;
+ case 2:
+ case 3:
+ max_n_fields = 1;
+ break;
+ default:
+ do { ut_dbg_assertion_failed(0, "./include/rem0rec.ic", (ulint) 852); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } while (0);
+ }
+ }
+
+ do { if (__builtin_expect(!((ulint)(!comp || index->n_def)), (0))) { ut_dbg_assertion_failed("!comp || index->n_def", "./include/rem0rec.ic", (ulint) 856); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("./include/rem0rec.ic", (ulint) 856); } while (0); } while (0);
+ do { if (__builtin_expect(!((ulint)(!index->n_def || i <= max_n_fields)), (0))) { ut_dbg_assertion_failed("!index->n_def || i <= max_n_fields", "./include/rem0rec.ic", (ulint) 857); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("./include/rem0rec.ic", (ulint) 857); } while (0); } while (0);
+ }
+ while (i--) {
+ ulint curr = (offsets + 2)[1 + i] & (((ulint) 1 << 30) - 1);
+ do { if (__builtin_expect(!((ulint)(curr <= last)), (0))) { ut_dbg_assertion_failed("curr <= last", "./include/rem0rec.ic", (ulint) 861); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("./include/rem0rec.ic", (ulint) 861); } while (0); } while (0);
+ last = curr;
+ }
+ return((1));
+}
+
+
+
+static inline
+void
+rec_offs_make_valid(
+
+ rec_t* rec __attribute__((unused)),
+
+ dict_index_t* index __attribute__((unused)),
+
+ ulint* offsets __attribute__((unused)))
+
+{
+
+
+
+
+
+}
+
+
+
+
+static inline
+unsigned char*
+rec_get_nth_field(
+
+
+ rec_t* rec,
+ const ulint* offsets,
+ ulint n,
+ ulint* len)
+
+{
+ unsigned char* field;
+ ulint length;
+ ;
+ ;
+ ;
+ ;
+
+ if (__builtin_expect(n == 0, (0))) {
+ field = rec;
+ } else {
+ field = rec + ((offsets + 2)[n] & (((ulint) 1 << 30) - 1));
+ }
+
+ length = (offsets + 2)[1 + n];
+
+ if (length & ((ulint) 1 << 31)) {
+ length = 0xFFFFFFFF;
+ } else {
+ length &= (((ulint) 1 << 30) - 1);
+ length -= field - rec;
+ }
+
+ *len = length;
+ return(field);
+}
+
+
+
+
+static inline
+ulint
+rec_offs_comp(
+
+
+ const ulint* offsets)
+{
+ ;
+ return(*(offsets + 2) & ((ulint) 1 << 31));
+}
+
+
+
+static inline
+ulint
+rec_offs_nth_extern(
+
+
+ const ulint* offsets,
+ ulint n)
+{
+ ;
+ ;
+ return(__builtin_expect((offsets + 2)[1 + n] & ((ulint) 1 << 30), (0)));
+
+}
+
+
+
+static inline
+ulint
+rec_offs_nth_sql_null(
+
+
+ const ulint* offsets,
+ ulint n)
+{
+ ;
+ ;
+ return(__builtin_expect((offsets + 2)[1 + n] & ((ulint) 1 << 31), (0)));
+
+}
+
+
+
+static inline
+ulint
+rec_offs_nth_size(
+
+
+ const ulint* offsets,
+ ulint n)
+{
+ ;
+ ;
+ if (!n) {
+ return((offsets + 2)[1 + n] & (((ulint) 1 << 30) - 1));
+ }
+ return(((offsets + 2)[1 + n] - (offsets + 2)[n])
+ & (((ulint) 1 << 30) - 1));
+}
+
+
+
+
+static inline
+ulint
+rec_offs_any_extern(
+
+
+ const ulint* offsets)
+{
+ ulint i;
+ for (i = rec_offs_n_fields(offsets); i--; ) {
+ if (rec_offs_nth_extern(offsets, i)) {
+ return((1));
+ }
+ }
+ return((0));
+}
+
+
+
+static inline
+void
+rec_set_nth_field_extern_bit(
+
+ rec_t* rec,
+ dict_index_t* index,
+ ulint i,
+ ulint val,
+ mtr_t* mtr)
+
+
+{
+ if (__builtin_expect(index->table->comp, (1))) {
+ rec_set_nth_field_extern_bit_new(rec, index, i, val, mtr);
+ } else {
+ rec_set_nth_field_extern_bit_old(rec, i, val, mtr);
+ }
+}
+
+
+
+
+
+
+
+static inline
+ulint
+rec_1_get_prev_field_end_info(
+
+
+
+ rec_t* rec,
+ ulint n)
+{
+ ;
+ ;
+
+ return(mach_read_from_1(rec - (6 + n)));
+}
+
+
+
+
+
+static inline
+ulint
+rec_2_get_prev_field_end_info(
+
+
+
+ rec_t* rec,
+ ulint n)
+{
+ ;
+ ;
+
+ return(mach_read_from_2(rec - (6 + 2 * n)));
+}
+
+
+
+
+static inline
+void
+rec_1_set_field_end_info(
+
+ rec_t* rec,
+ ulint n,
+ ulint info)
+{
+ ;
+ ;
+
+ mach_write_to_1(rec - (6 + n + 1), info);
+}
+
+
+
+
+static inline
+void
+rec_2_set_field_end_info(
+
+ rec_t* rec,
+ ulint n,
+ ulint info)
+{
+ ;
+ ;
+
+ mach_write_to_2(rec - (6 + 2 * n + 2), info);
+}
+
+
+
+
+static inline
+ulint
+rec_1_get_field_start_offs(
+
+
+ rec_t* rec,
+ ulint n)
+{
+ ;
+ ;
+
+ if (n == 0) {
+
+ return(0);
+ }
+
+ return(rec_1_get_prev_field_end_info(rec, n)
+ & ~0x80UL);
+}
+
+
+
+
+static inline
+ulint
+rec_2_get_field_start_offs(
+
+
+ rec_t* rec,
+ ulint n)
+{
+ ;
+ ;
+
+ if (n == 0) {
+
+ return(0);
+ }
+
+ return(rec_2_get_prev_field_end_info(rec, n)
+ & ~(0x8000UL | 0x4000UL));
+}
+
+
+
+
+
+
+static inline
+ulint
+rec_get_field_start_offs(
+
+
+ rec_t* rec,
+ ulint n)
+{
+ ;
+ ;
+
+ if (n == 0) {
+
+ return(0);
+ }
+
+ if (rec_get_1byte_offs_flag(rec)) {
+
+ return(rec_1_get_field_start_offs(rec, n));
+ }
+
+ return(rec_2_get_field_start_offs(rec, n));
+}
+
+
+
+
+
+static inline
+ulint
+rec_get_nth_field_size(
+
+
+ rec_t* rec,
+ ulint n)
+{
+ ulint os;
+ ulint next_os;
+
+ os = rec_get_field_start_offs(rec, n);
+ next_os = rec_get_field_start_offs(rec, n + 1);
+
+ ;
+
+ return(next_os - os);
+}
+
+
+
+
+
+
+
+static inline
+void
+rec_set_nth_field(
+
+ rec_t* rec,
+ const ulint* offsets,
+ ulint n,
+ const void* data,
+
+ ulint len)
+{
+ unsigned char* data2;
+ ulint len2;
+
+ ;
+ ;
+
+ if (__builtin_expect(len == 0xFFFFFFFF, (0))) {
+ if (!rec_offs_nth_sql_null(offsets, n)) {
+ do { if (__builtin_expect(!((ulint)(!rec_offs_comp(offsets))), (0))) { ut_dbg_assertion_failed("!rec_offs_comp(offsets)", "./include/rem0rec.ic", (ulint) 1229); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("./include/rem0rec.ic", (ulint) 1229); } while (0); } while (0);
+ rec_set_nth_field_sql_null(rec, n);
+ }
+
+ return;
+ }
+
+ data2 = rec_get_nth_field(rec, offsets, n, &len2);
+ if (len2 == 0xFFFFFFFF) {
+ ;
+ rec_set_nth_field_null_bit(rec, n, (0));
+ ;
+ } else {
+ ;
+ }
+
+ ut_memcpy(data2, data, len);
+}
+
+
+
+
+
+
+static inline
+ulint
+rec_get_data_size_old(
+
+
+ rec_t* rec)
+{
+ ;
+
+ return(rec_get_field_start_offs(rec, rec_get_n_fields_old(rec)));
+}
+
+
+
+static inline
+void
+rec_offs_set_n_fields(
+
+ ulint* offsets,
+ ulint n_fields)
+{
+ ;
+ ;
+ ;
+ ;
+
+ offsets[1] = n_fields;
+}
+
+
+
+
+
+
+static inline
+ulint
+rec_offs_data_size(
+
+
+ const ulint* offsets)
+{
+ ulint size;
+
+ ;
+ size = (offsets + 2)[rec_offs_n_fields(offsets)]
+ & (((ulint) 1 << 30) - 1);
+ ;
+ return(size);
+}
+
+
+
+
+
+static inline
+ulint
+rec_offs_extra_size(
+
+
+ const ulint* offsets)
+{
+ ulint size;
+ ;
+ size = *(offsets + 2) & ~((ulint) 1 << 31);
+ ;
+ return(size);
+}
+
+
+
+static inline
+ulint
+rec_offs_size(
+
+
+ const ulint* offsets)
+{
+ return(rec_offs_data_size(offsets) + rec_offs_extra_size(offsets));
+}
+
+
+
+static inline
+unsigned char*
+rec_get_end(
+
+
+ rec_t* rec,
+ const ulint* offsets)
+{
+ return(rec + rec_offs_data_size(offsets));
+}
+
+
+
+static inline
+unsigned char*
+rec_get_start(
+
+
+ rec_t* rec,
+ const ulint* offsets)
+{
+ return(rec - rec_offs_extra_size(offsets));
+}
+
+
+
+static inline
+rec_t*
+rec_copy(
+
+
+ void* buf,
+ const rec_t* rec,
+ const ulint* offsets)
+{
+ ulint extra_len;
+ ulint data_len;
+
+ ;
+ ;
+ ;
+
+ extra_len = rec_offs_extra_size(offsets);
+ data_len = rec_offs_data_size(offsets);
+
+ ut_memcpy(buf, rec - extra_len, extra_len + data_len);
+
+ return((unsigned char*)buf + extra_len);
+}
+
+
+
+
+static inline
+ulint
+rec_get_converted_extra_size(
+
+
+ ulint data_size,
+ ulint n_fields)
+{
+ if (data_size <= 0x7FUL) {
+
+ return(6 + n_fields);
+ }
+
+ return(6 + 2 * n_fields);
+}
+
+
+
+
+
+ulint
+rec_get_converted_size_new(
+
+
+ dict_index_t* index,
+ dtuple_t* dtuple);
+
+
+
+static inline
+ulint
+rec_get_converted_size(
+
+
+ dict_index_t* index,
+ dtuple_t* dtuple)
+{
+ ulint data_size;
+ ulint extra_size;
+
+ ;
+ ;
+ ;
+
+ ;
+
+
+
+
+
+
+ if (__builtin_expect(index->table->comp, (1))) {
+ return(rec_get_converted_size_new(index, dtuple));
+ }
+
+ data_size = dtuple_get_data_size(dtuple);
+
+ extra_size = rec_get_converted_extra_size(
+ data_size, dtuple_get_n_fields(dtuple));
+
+ return(data_size + extra_size);
+}
+
+
+
+
+static inline
+ulint
+rec_fold(
+
+
+ rec_t* rec,
+ const ulint* offsets,
+
+ ulint n_fields,
+
+ ulint n_bytes,
+
+ dulint tree_id)
+{
+ ulint i;
+ unsigned char* data;
+ ulint len;
+ ulint fold;
+ ulint n_fields_rec;
+
+ ;
+ ;
+ ;
+
+ n_fields_rec = rec_offs_n_fields(offsets);
+ ;
+ ;
+
+ if (n_fields > n_fields_rec) {
+ n_fields = n_fields_rec;
+ }
+
+ if (n_fields == n_fields_rec) {
+ n_bytes = 0;
+ }
+
+ fold = ut_fold_dulint(tree_id);
+
+ for (i = 0; i < n_fields; i++) {
+ data = rec_get_nth_field(rec, offsets, i, &len);
+
+ if (len != 0xFFFFFFFF) {
+ fold = ut_fold_ulint_pair(fold,
+ ut_fold_binary(data, len));
+ }
+ }
+
+ if (n_bytes > 0) {
+ data = rec_get_nth_field(rec, offsets, i, &len);
+
+ if (len != 0xFFFFFFFF) {
+ if (len > n_bytes) {
+ len = n_bytes;
+ }
+
+ fold = ut_fold_ulint_pair(fold,
+ ut_fold_binary(data, len));
+ }
+ }
+
+ return(fold);
+}
+# 583 "./include/rem0rec.h" 2
+# 20 "./include/page0page.h" 2
+# 33 "./include/page0page.h"
+typedef unsigned char page_header_t;
+# 114 "./include/page0page.h"
+typedef unsigned char page_dir_slot_t;
+typedef page_dir_slot_t page_dir_t;
+# 137 "./include/page0page.h"
+static inline
+dulint
+page_get_max_trx_id(
+
+ ib_page_t* page);
+
+
+
+void
+page_set_max_trx_id(
+
+ ib_page_t* page,
+ dulint trx_id);
+
+
+
+static inline
+void
+page_update_max_trx_id(
+
+ ib_page_t* page,
+ dulint trx_id);
+
+
+static inline
+ulint
+page_header_get_field(
+
+ ib_page_t* page,
+ ulint field);
+
+
+static inline
+void
+page_header_set_field(
+
+ ib_page_t* page,
+ ulint field,
+ ulint val);
+
+
+static inline
+unsigned char*
+page_header_get_ptr(
+
+
+ ib_page_t* page,
+ ulint field);
+
+
+static inline
+void
+page_header_set_ptr(
+
+ ib_page_t* page,
+ ulint field,
+ unsigned char* ptr);
+
+
+
+static inline
+void
+page_header_reset_last_insert(
+
+ ib_page_t* page,
+ mtr_t* mtr);
+
+
+static inline
+rec_t*
+page_get_infimum_rec(
+
+
+ ib_page_t* page);
+
+
+static inline
+rec_t*
+page_get_supremum_rec(
+
+
+ ib_page_t* page);
+
+
+
+
+rec_t*
+page_get_middle_rec(
+
+
+ ib_page_t* page);
+
+
+
+
+
+
+static inline
+int
+page_cmp_dtuple_rec_with_match(
+
+
+
+
+ dtuple_t* dtuple,
+ rec_t* rec,
+
+
+
+ const ulint* offsets,
+ ulint* matched_fields,
+
+
+ ulint* matched_bytes);
+
+
+
+
+
+
+static inline
+ulint
+page_get_n_recs(
+
+
+ ib_page_t* page);
+
+ulint
+page_get_n_recs_noninline(
+
+
+ ib_page_t* page);
+
+
+
+
+ulint
+page_rec_get_n_recs_before(
+
+
+ rec_t* rec);
+
+
+static inline
+ulint
+page_dir_get_n_heap(
+
+
+ ib_page_t* page);
+
+
+static inline
+void
+page_dir_set_n_heap(
+
+ ib_page_t* page,
+ ulint n_heap);
+
+
+static inline
+ulint
+page_dir_get_n_slots(
+
+
+ ib_page_t* page);
+
+
+static inline
+void
+page_dir_set_n_slots(
+
+
+ ib_page_t* page,
+ ulint n_slots);
+
+
+static inline
+page_dir_slot_t*
+page_dir_get_nth_slot(
+
+
+ ib_page_t* page,
+ ulint n);
+
+
+static inline
+ulint
+page_rec_check(
+
+
+ rec_t* rec);
+
+
+static inline
+rec_t*
+page_dir_slot_get_rec(
+
+
+ page_dir_slot_t* slot);
+
+
+static inline
+void
+page_dir_slot_set_rec(
+
+ page_dir_slot_t* slot,
+ rec_t* rec);
+
+
+static inline
+ulint
+page_dir_slot_get_n_owned(
+
+
+ page_dir_slot_t* slot);
+
+
+static inline
+void
+page_dir_slot_set_n_owned(
+
+ page_dir_slot_t* slot,
+ ulint n);
+
+
+
+
+
+
+static inline
+ulint
+page_dir_calc_reserved_space(
+
+ ulint n_recs);
+
+
+
+ulint
+page_dir_find_owner_slot(
+
+
+ rec_t* rec);
+
+
+static inline
+ulint
+page_is_comp(
+
+
+
+ ib_page_t* page);
+
+
+static inline
+ulint
+page_rec_is_comp(
+
+
+ const rec_t* rec);
+
+
+static inline
+rec_t*
+page_rec_get_next(
+
+
+ rec_t* rec);
+
+
+
+static inline
+void
+page_rec_set_next(
+
+ rec_t* rec,
+
+ rec_t* next);
+
+
+
+static inline
+rec_t*
+page_rec_get_prev(
+
+
+ rec_t* rec);
+
+
+
+static inline
+ulint
+page_rec_is_user_rec_low(
+
+
+ ulint offset);
+
+
+static inline
+ulint
+page_rec_is_supremum_low(
+
+
+ ulint offset);
+
+
+static inline
+ulint
+page_rec_is_infimum_low(
+
+
+ ulint offset);
+
+
+
+static inline
+ulint
+page_rec_is_user_rec(
+
+
+ const rec_t* rec);
+
+
+static inline
+ulint
+page_rec_is_supremum(
+
+
+ const rec_t* rec);
+
+
+static inline
+ulint
+page_rec_is_infimum(
+
+
+ const rec_t* rec);
+
+
+static inline
+rec_t*
+page_rec_find_owner_rec(
+
+
+ rec_t* rec);
+
+
+
+
+
+void
+page_rec_write_index_page_no(
+
+ rec_t* rec,
+ ulint i,
+ ulint page_no,
+ mtr_t* mtr);
+
+
+
+static inline
+ulint
+page_get_max_insert_size(
+
+
+ ib_page_t* page,
+ ulint n_recs);
+
+
+
+static inline
+ulint
+page_get_max_insert_size_after_reorganize(
+
+
+ ib_page_t* page,
+ ulint n_recs);
+
+
+static inline
+ulint
+page_get_free_space_of_empty(
+
+
+ ulint comp)
+ __attribute__((const));
+
+
+
+static inline
+ulint
+page_get_data_size(
+
+
+ ib_page_t* page);
+
+ulint
+page_get_data_size_noninline(
+
+
+ ib_page_t* page);
+
+
+
+unsigned char*
+page_mem_alloc(
+
+
+
+ ib_page_t* page,
+ ulint need,
+ dict_index_t* index,
+ ulint* heap_no);
+
+
+
+
+static inline
+void
+page_mem_free(
+
+ ib_page_t* page,
+ rec_t* rec,
+ const ulint* offsets);
+
+
+
+ib_page_t*
+page_create(
+
+
+ buf_frame_t* frame,
+
+ mtr_t* mtr,
+ ulint comp);
+
+
+
+
+void
+page_copy_rec_list_end_no_locks(
+
+ ib_page_t* new_page,
+ ib_page_t* page,
+ rec_t* rec,
+ dict_index_t* index,
+ mtr_t* mtr);
+
+
+
+
+
+void
+page_copy_rec_list_end(
+
+ ib_page_t* new_page,
+ ib_page_t* page,
+ rec_t* rec,
+ dict_index_t* index,
+ mtr_t* mtr);
+
+
+
+
+
+void
+page_copy_rec_list_start(
+
+ ib_page_t* new_page,
+ ib_page_t* page,
+ rec_t* rec,
+ dict_index_t* index,
+ mtr_t* mtr);
+
+
+
+
+void
+page_delete_rec_list_end(
+
+ ib_page_t* page,
+ rec_t* rec,
+ dict_index_t* index,
+ ulint n_recs,
+
+ ulint size,
+
+
+ mtr_t* mtr);
+
+
+
+
+void
+page_delete_rec_list_start(
+
+ ib_page_t* page,
+ rec_t* rec,
+ dict_index_t* index,
+ mtr_t* mtr);
+
+
+
+
+void
+page_move_rec_list_end(
+
+ ib_page_t* new_page,
+ ib_page_t* page,
+ rec_t* split_rec,
+ dict_index_t* index,
+ mtr_t* mtr);
+
+
+
+
+void
+page_move_rec_list_start(
+
+ ib_page_t* new_page,
+ ib_page_t* page,
+ rec_t* split_rec,
+ dict_index_t* index,
+ mtr_t* mtr);
+
+
+
+void
+page_dir_split_slot(
+
+ ib_page_t* page,
+ ulint slot_no);
+
+
+
+
+
+
+void
+page_dir_balance_slot(
+
+ ib_page_t* page,
+ ulint slot_no);
+
+
+
+unsigned char*
+page_parse_delete_rec_list(
+
+
+ unsigned char type,
+
+
+
+ unsigned char* ptr,
+ unsigned char* end_ptr,
+ dict_index_t* index,
+ ib_page_t* page,
+ mtr_t* mtr);
+
+
+
+unsigned char*
+page_parse_create(
+
+
+ unsigned char* ptr,
+ unsigned char* end_ptr,
+ ulint comp,
+ ib_page_t* page,
+ mtr_t* mtr);
+
+
+
+
+void
+page_rec_print(
+
+ rec_t* rec,
+ const ulint* offsets);
+
+
+
+
+void
+page_dir_print(
+
+ ib_page_t* page,
+ ulint pr_n);
+
+
+
+
+void
+page_print_list(
+
+ ib_page_t* page,
+ dict_index_t* index,
+ ulint pr_n);
+
+
+
+void
+page_header_print(
+
+ ib_page_t* page);
+
+
+
+
+void
+page_print(
+
+ ib_page_t* page,
+ dict_index_t* index,
+ ulint dn,
+
+ ulint rn);
+
+
+
+
+
+
+ulint
+page_rec_validate(
+
+
+ rec_t* rec,
+ const ulint* offsets);
+
+
+
+
+
+void
+page_check_dir(
+
+ ib_page_t* page);
+
+
+
+
+
+ulint
+page_simple_validate(
+
+
+ ib_page_t* page);
+
+
+
+ulint
+page_validate(
+
+
+ ib_page_t* page,
+ dict_index_t* index);
+
+
+
+
+rec_t*
+page_find_rec_with_heap_no(
+
+
+ ib_page_t* page,
+ ulint heap_no);
+
+
+
+
+
+
+
+# 1 "./include/page0page.ic" 1
+# 10 "./include/page0page.ic"
+# 1 "./include/rem0cmp.h" 1
+# 21 "./include/rem0cmp.h"
+ulint
+cmp_types_are_equal(
+
+
+
+ dtype_t* type1,
+ dtype_t* type2,
+ ulint check_charsets);
+
+
+
+static inline
+int
+cmp_data_data(
+
+
+
+ dtype_t* cur_type,
+ unsigned char* data1,
+
+ ulint len1,
+ unsigned char* data2,
+
+ ulint len2);
+
+
+
+
+int
+cmp_data_data_slow(
+
+
+
+ dtype_t* cur_type,
+ unsigned char* data1,
+
+ ulint len1,
+ unsigned char* data2,
+
+ ulint len2);
+
+
+
+static inline
+int
+cmp_dfield_dfield(
+
+
+
+ dfield_t* dfield1,
+ dfield_t* dfield2);
+# 81 "./include/rem0cmp.h"
+int
+cmp_dtuple_rec_with_match(
+
+
+
+
+
+
+ dtuple_t* dtuple,
+ rec_t* rec,
+
+
+
+ const ulint* offsets,
+ ulint* matched_fields,
+
+
+ ulint* matched_bytes);
+
+
+
+
+
+
+int
+cmp_dtuple_rec(
+
+
+
+
+ dtuple_t* dtuple,
+ rec_t* rec,
+ const ulint* offsets);
+
+
+
+
+ulint
+cmp_dtuple_is_prefix_of_rec(
+
+
+ dtuple_t* dtuple,
+ rec_t* rec,
+ const ulint* offsets);
+
+
+
+
+
+int
+cmp_rec_rec_with_match(
+
+
+
+
+ rec_t* rec1,
+ rec_t* rec2,
+ const ulint* offsets1,
+ const ulint* offsets2,
+ dict_index_t* index,
+ ulint* matched_fields,
+
+
+
+ ulint* matched_bytes);
+
+
+
+
+
+
+static inline
+int
+cmp_rec_rec(
+
+
+
+
+ rec_t* rec1,
+ rec_t* rec2,
+ const ulint* offsets1,
+ const ulint* offsets2,
+ dict_index_t* index);
+
+
+
+# 1 "./include/rem0cmp.ic" 1
+# 12 "./include/rem0cmp.ic"
+static inline
+int
+cmp_data_data(
+
+
+
+ dtype_t* cur_type,
+ unsigned char* data1,
+
+ ulint len1,
+ unsigned char* data2,
+
+ ulint len2)
+{
+ return(cmp_data_data_slow(cur_type, data1, len1, data2, len2));
+}
+
+
+
+
+static inline
+int
+cmp_dfield_dfield(
+
+
+
+ dfield_t* dfield1,
+ dfield_t* dfield2)
+{
+ ;
+
+ return(cmp_data_data(dfield_get_type(dfield1),
+ dfield_get_data(dfield1), dfield_get_len(dfield1),
+ dfield_get_data(dfield2), dfield_get_len(dfield2)));
+}
+
+
+
+
+static inline
+int
+cmp_rec_rec(
+
+
+
+
+ rec_t* rec1,
+ rec_t* rec2,
+ const ulint* offsets1,
+ const ulint* offsets2,
+ dict_index_t* index)
+{
+ ulint match_f = 0;
+ ulint match_b = 0;
+
+ return(cmp_rec_rec_with_match(rec1, rec2, offsets1, offsets2, index,
+ &match_f, &match_b));
+}
+# 168 "./include/rem0cmp.h" 2
+# 11 "./include/page0page.ic" 2
+# 20 "./include/page0page.ic"
+static inline
+dulint
+page_get_max_trx_id(
+
+ ib_page_t* page)
+{
+ ;
+
+ return(mach_read_from_8(page + 38 + 18));
+}
+
+
+
+
+static inline
+void
+page_update_max_trx_id(
+
+ ib_page_t* page,
+ dulint trx_id)
+{
+ ;
+
+ if (ut_dulint_cmp(page_get_max_trx_id(page), trx_id) < 0) {
+
+ page_set_max_trx_id(page, trx_id);
+ }
+}
+
+
+
+static inline
+ulint
+page_header_get_field(
+
+ ib_page_t* page,
+ ulint field)
+{
+ ;
+ ;
+
+ return(mach_read_from_2(page + 38 + field));
+}
+
+
+
+static inline
+void
+page_header_set_field(
+
+ ib_page_t* page,
+ ulint field,
+ ulint val)
+{
+ ;
+ ;
+ ;
+ ;
+
+ mach_write_to_2(page + 38 + field, val);
+}
+
+
+
+static inline
+unsigned char*
+page_header_get_ptr(
+
+
+ ib_page_t* page,
+ ulint field)
+{
+ ulint offs;
+
+ ;
+ ;
+
+
+
+ offs = page_header_get_field(page, field);
+
+ ;
+
+ if (offs == 0) {
+
+ return(((void *)0));
+ }
+
+ return(page + offs);
+}
+
+
+
+static inline
+void
+page_header_set_ptr(
+
+ ib_page_t* page,
+ ulint field,
+ unsigned char* ptr)
+{
+ ulint offs;
+
+ ;
+ ;
+
+
+
+ if (ptr == ((void *)0)) {
+ offs = 0;
+ } else {
+ offs = ptr - page;
+ }
+
+ ;
+
+ page_header_set_field(page, field, offs);
+}
+
+
+
+
+static inline
+void
+page_header_reset_last_insert(
+
+ ib_page_t* page,
+ mtr_t* mtr)
+{
+ ;
+
+ mlog_write_ulint(page + 38 + 10, 0,
+ ((unsigned char)2), mtr);
+}
+
+
+
+static inline
+ulint
+page_is_comp(
+
+
+
+ ib_page_t* page)
+{
+ return(__builtin_expect(page_header_get_field(page, 4) & 0x8000, 0x8000));
+
+}
+
+
+
+static inline
+ulint
+page_rec_is_comp(
+
+
+ const rec_t* rec)
+{
+ return(page_is_comp(ut_align_down((rec_t*) rec, (2 * 8192))));
+}
+
+
+
+static inline
+rec_t*
+page_get_infimum_rec(
+
+
+ ib_page_t* page)
+{
+ ;
+
+ if (page_is_comp(page)) {
+ return(page + ((38 + 36 + 2 * 10) + 5));
+ } else {
+ return(page + ((38 + 36 + 2 * 10) + 1 + 6));
+ }
+}
+
+
+
+static inline
+rec_t*
+page_get_supremum_rec(
+
+
+ ib_page_t* page)
+{
+ ;
+
+ if (page_is_comp(page)) {
+ return(page + ((38 + 36 + 2 * 10) + 2 * 5 + 8));
+ } else {
+ return(page + ((38 + 36 + 2 * 10) + 2 + 2 * 6 + 8));
+ }
+}
+
+
+
+static inline
+ulint
+page_rec_is_user_rec_low(
+
+
+ ulint offset)
+{
+ ;
+# 245 "./include/page0page.ic"
+ ;
+
+ return(__builtin_expect(offset != ((38 + 36 + 2 * 10) + 2 * 5 + 8), (1))
+ && __builtin_expect(offset != ((38 + 36 + 2 * 10) + 5), (1))
+ && __builtin_expect(offset != ((38 + 36 + 2 * 10) + 1 + 6), (1))
+ && __builtin_expect(offset != ((38 + 36 + 2 * 10) + 2 + 2 * 6 + 8), (1)));
+}
+
+
+
+static inline
+ulint
+page_rec_is_supremum_low(
+
+
+ ulint offset)
+{
+ ;
+ ;
+
+ return(__builtin_expect(offset == ((38 + 36 + 2 * 10) + 2 * 5 + 8), (0))
+ || __builtin_expect(offset == ((38 + 36 + 2 * 10) + 2 + 2 * 6 + 8), (0)));
+}
+
+
+
+static inline
+ulint
+page_rec_is_infimum_low(
+
+
+ ulint offset)
+{
+ ;
+ ;
+
+ return(__builtin_expect(offset == ((38 + 36 + 2 * 10) + 5), (0))
+ || __builtin_expect(offset == ((38 + 36 + 2 * 10) + 1 + 6), (0)));
+}
+
+
+
+static inline
+ulint
+page_rec_is_user_rec(
+
+
+ const rec_t* rec)
+{
+ return(page_rec_is_user_rec_low(
+ ut_align_offset(rec, (2 * 8192))));
+}
+
+
+
+static inline
+ulint
+page_rec_is_supremum(
+
+
+ const rec_t* rec)
+{
+ return(page_rec_is_supremum_low(
+ ut_align_offset(rec, (2 * 8192))));
+}
+
+
+
+static inline
+ulint
+page_rec_is_infimum(
+
+
+ const rec_t* rec)
+{
+ return(page_rec_is_infimum_low(
+ ut_align_offset(rec, (2 * 8192))));
+}
+
+
+
+
+
+
+
+static inline
+int
+page_cmp_dtuple_rec_with_match(
+
+
+
+
+ dtuple_t* dtuple,
+ rec_t* rec,
+
+
+
+ const ulint* offsets,
+ ulint* matched_fields,
+
+
+ ulint* matched_bytes)
+
+
+
+{
+ ulint rec_offset;
+
+ ;
+ ;
+ ;
+
+ rec_offset = ut_align_offset(rec, (2 * 8192));
+
+ if (__builtin_expect(rec_offset == ((38 + 36 + 2 * 10) + 5), (0))
+ || __builtin_expect(rec_offset == ((38 + 36 + 2 * 10) + 1 + 6), (0))) {
+ return(1);
+ }
+ if (__builtin_expect(rec_offset == ((38 + 36 + 2 * 10) + 2 * 5 + 8), (0))
+ || __builtin_expect(rec_offset == ((38 + 36 + 2 * 10) + 2 + 2 * 6 + 8), (0))) {
+ return(-1);
+ }
+
+ return(cmp_dtuple_rec_with_match(dtuple, rec, offsets,
+ matched_fields,
+ matched_bytes));
+}
+
+
+
+
+static inline
+ulint
+page_get_n_recs(
+
+
+ ib_page_t* page)
+{
+ return(page_header_get_field(page, 16));
+}
+
+
+
+static inline
+ulint
+page_dir_get_n_slots(
+
+
+ ib_page_t* page)
+{
+ return(page_header_get_field(page, 0));
+}
+
+
+static inline
+void
+page_dir_set_n_slots(
+
+
+ ib_page_t* page,
+ ulint n_slots)
+{
+ page_header_set_field(page, 0, n_slots);
+}
+
+
+
+static inline
+ulint
+page_dir_get_n_heap(
+
+
+ ib_page_t* page)
+{
+ return(page_header_get_field(page, 4) & 0x7fff);
+}
+
+
+
+static inline
+void
+page_dir_set_n_heap(
+
+ ib_page_t* page,
+ ulint n_heap)
+{
+ ;
+
+ page_header_set_field(page, 4, n_heap | (0x8000 &
+ page_header_get_field(page, 4)));
+}
+
+
+
+static inline
+page_dir_slot_t*
+page_dir_get_nth_slot(
+
+
+ ib_page_t* page,
+ ulint n)
+{
+ ;
+
+ return(page + (2 * 8192) - 8
+ - (n + 1) * 2);
+}
+
+
+
+static inline
+ulint
+page_rec_check(
+
+
+ rec_t* rec)
+{
+ ib_page_t* page;
+
+ do { if (__builtin_expect(!((ulint)(rec)), (0))) { ut_dbg_assertion_failed("rec", "./include/page0page.ic", (ulint) 464); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("./include/page0page.ic", (ulint) 464); } while (0); } while (0);
+
+ page = buf_frame_align(rec);
+
+ do { if (__builtin_expect(!((ulint)(rec <= page_header_get_ptr(page, 2))), (0))) { ut_dbg_assertion_failed("rec <= page_header_get_ptr(page, PAGE_HEAP_TOP)", "./include/page0page.ic", (ulint) 468); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("./include/page0page.ic", (ulint) 468); } while (0); } while (0);
+ do { if (__builtin_expect(!((ulint)(rec >= page + (38 + 36 + 2 * 10))), (0))) { ut_dbg_assertion_failed("rec >= page + PAGE_DATA", "./include/page0page.ic", (ulint) 469); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("./include/page0page.ic", (ulint) 469); } while (0); } while (0);
+
+ return((1));
+}
+
+
+
+static inline
+rec_t*
+page_dir_slot_get_rec(
+
+
+ page_dir_slot_t* slot)
+{
+ return(buf_frame_align(slot) + mach_read_from_2(slot));
+}
+
+
+
+static inline
+void
+page_dir_slot_set_rec(
+
+ page_dir_slot_t* slot,
+ rec_t* rec)
+{
+ ;
+
+ mach_write_to_2(slot, ut_align_offset(rec, (2 * 8192)));
+}
+
+
+
+static inline
+ulint
+page_dir_slot_get_n_owned(
+
+
+ page_dir_slot_t* slot)
+{
+ rec_t* rec = page_dir_slot_get_rec(slot);
+ return(rec_get_n_owned(rec, page_rec_is_comp(rec)));
+}
+
+
+
+static inline
+void
+page_dir_slot_set_n_owned(
+
+ page_dir_slot_t* slot,
+ ulint n)
+
+{
+ rec_t* rec = page_dir_slot_get_rec(slot);
+ rec_set_n_owned(rec, page_rec_is_comp(rec), n);
+}
+
+
+
+
+
+static inline
+ulint
+page_dir_calc_reserved_space(
+
+ ulint n_recs)
+{
+ return((2 * n_recs + 4 - 1)
+ / 4);
+}
+
+
+
+static inline
+rec_t*
+page_rec_get_next(
+
+
+ rec_t* rec)
+{
+ ulint offs;
+ ib_page_t* page;
+
+ ;
+
+ page = ut_align_down(rec, (2 * 8192));
+
+ offs = rec_get_next_offs(rec, page_is_comp(page));
+
+ if (__builtin_expect(offs >= (2 * 8192), (0))) {
+ fprintf(stderr,
+"InnoDB: Next record offset is nonsensical %lu in record at offset %lu\n"
+"InnoDB: rec address %p, first buffer frame %p\n"
+"InnoDB: buffer pool high end %p, buf fix count %lu\n",
+ (ulong)offs, (ulong)(rec - page),
+ rec, buf_pool->frame_zero,
+ buf_pool->high_end,
+ (ulong)buf_block_align(rec)->buf_fix_count);
+ buf_page_print(page);
+
+ do { ut_dbg_assertion_failed(0, "./include/page0page.ic", (ulint) 570); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } while (0);
+ }
+
+ if (__builtin_expect(offs == 0, (0))) {
+
+ return(((void *)0));
+ }
+
+ return(page + offs);
+}
+
+
+
+static inline
+void
+page_rec_set_next(
+
+ rec_t* rec,
+ rec_t* next)
+
+{
+ ib_page_t* page;
+ ulint offs;
+
+ ;
+ ;
+ page = ut_align_down(rec, (2 * 8192));
+
+ if (next) {
+ ;
+ ;
+ offs = (ulint) (next - page);
+ } else {
+ offs = 0;
+ }
+
+ rec_set_next_offs(rec, page_is_comp(page), offs);
+}
+
+
+
+static inline
+rec_t*
+page_rec_get_prev(
+
+
+ rec_t* rec)
+
+{
+ page_dir_slot_t* slot;
+ ulint slot_no;
+ rec_t* rec2;
+ rec_t* prev_rec = ((void *)0);
+ ib_page_t* page;
+
+ ;
+
+ page = ut_align_down(rec, (2 * 8192));
+
+ ;
+
+ slot_no = page_dir_find_owner_slot(rec);
+
+ do { if (__builtin_expect(!((ulint)(slot_no != 0)), (0))) { ut_dbg_assertion_failed("slot_no != 0", "./include/page0page.ic", (ulint) 633); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("./include/page0page.ic", (ulint) 633); } while (0); } while (0);
+
+ slot = page_dir_get_nth_slot(page, slot_no - 1);
+
+ rec2 = page_dir_slot_get_rec(slot);
+
+ while (rec != rec2) {
+ prev_rec = rec2;
+ rec2 = page_rec_get_next(rec2);
+ }
+
+ do { if (__builtin_expect(!((ulint)(prev_rec)), (0))) { ut_dbg_assertion_failed("prev_rec", "./include/page0page.ic", (ulint) 644); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("./include/page0page.ic", (ulint) 644); } while (0); } while (0);
+
+ return(prev_rec);
+}
+
+
+
+static inline
+rec_t*
+page_rec_find_owner_rec(
+
+
+ rec_t* rec)
+{
+ ;
+
+ if (page_rec_is_comp(rec)) {
+ while (rec_get_n_owned(rec, (1)) == 0) {
+ rec = page_rec_get_next(rec);
+ }
+ } else {
+ while (rec_get_n_owned(rec, (0)) == 0) {
+ rec = page_rec_get_next(rec);
+ }
+ }
+
+ return(rec);
+}
+
+
+
+
+static inline
+ulint
+page_get_data_size(
+
+
+ ib_page_t* page)
+{
+ ulint ret;
+
+ ret = (ulint)(page_header_get_field(page, 2)
+ - (page_is_comp(page)
+ ? (((38 + 36 + 2 * 10) + 2 * 5 + 8) + 8)
+ : (((38 + 36 + 2 * 10) + 2 + 2 * 6 + 8) + 9))
+ - page_header_get_field(page, 8));
+
+ ;
+
+ return(ret);
+}
+
+
+
+static inline
+ulint
+page_get_free_space_of_empty(
+
+
+ ulint comp)
+{
+ if (__builtin_expect(comp, (1))) {
+ return((ulint)((2 * 8192)
+ - (((38 + 36 + 2 * 10) + 2 * 5 + 8) + 8)
+ - 8
+ - 2 * 2));
+ }
+
+ return((ulint)((2 * 8192)
+ - (((38 + 36 + 2 * 10) + 2 + 2 * 6 + 8) + 9)
+ - 8
+ - 2 * 2));
+}
+# 725 "./include/page0page.ic"
+static inline
+ulint
+page_get_max_insert_size(
+
+
+ ib_page_t* page,
+ ulint n_recs)
+{
+ ulint occupied;
+ ulint free_space;
+
+ if (page_is_comp(page)) {
+ occupied = page_header_get_field(page, 2)
+ - (((38 + 36 + 2 * 10) + 2 * 5 + 8) + 8) + page_dir_calc_reserved_space(
+ n_recs + page_dir_get_n_heap(page) - 2);
+
+ free_space = page_get_free_space_of_empty((1));
+ } else {
+ occupied = page_header_get_field(page, 2)
+ - (((38 + 36 + 2 * 10) + 2 + 2 * 6 + 8) + 9) + page_dir_calc_reserved_space(
+ n_recs + page_dir_get_n_heap(page) - 2);
+
+ free_space = page_get_free_space_of_empty((0));
+ }
+
+
+
+
+
+ if (occupied > free_space) {
+
+ return(0);
+ }
+
+ return(free_space - occupied);
+}
+
+
+
+
+static inline
+ulint
+page_get_max_insert_size_after_reorganize(
+
+
+ ib_page_t* page,
+ ulint n_recs)
+{
+ ulint occupied;
+ ulint free_space;
+
+ occupied = page_get_data_size(page)
+ + page_dir_calc_reserved_space(n_recs + page_get_n_recs(page));
+
+ free_space = page_get_free_space_of_empty(page_is_comp(page));
+
+ if (occupied > free_space) {
+
+ return(0);
+ }
+
+ return(free_space - occupied);
+}
+
+
+
+static inline
+void
+page_mem_free(
+
+ ib_page_t* page,
+ rec_t* rec,
+ const ulint* offsets)
+{
+ rec_t* free;
+ ulint garbage;
+
+ ;
+ ;
+ free = page_header_get_ptr(page, 6);
+
+ page_rec_set_next(rec, free);
+ page_header_set_ptr(page, 6, rec);
+# 819 "./include/page0page.ic"
+ garbage = page_header_get_field(page, 8);
+
+ page_header_set_field(page, 8,
+ garbage + rec_offs_size(offsets));
+}
+# 812 "./include/page0page.h" 2
+# 16 "./include/page0cur.h" 2
+# 46 "./include/page0cur.h"
+static inline
+ib_page_t*
+page_cur_get_page(
+
+
+ page_cur_t* cur);
+
+
+static inline
+rec_t*
+page_cur_get_rec(
+
+
+ page_cur_t* cur);
+
+
+
+static inline
+void
+page_cur_set_before_first(
+
+ ib_page_t* page,
+ page_cur_t* cur);
+
+
+
+static inline
+void
+page_cur_set_after_last(
+
+ ib_page_t* page,
+ page_cur_t* cur);
+
+
+static inline
+ulint
+page_cur_is_before_first(
+
+
+ const page_cur_t* cur);
+
+
+static inline
+ulint
+page_cur_is_after_last(
+
+
+ const page_cur_t* cur);
+
+
+static inline
+void
+page_cur_position(
+
+ rec_t* rec,
+ page_cur_t* cur);
+
+
+static inline
+void
+page_cur_invalidate(
+
+ page_cur_t* cur);
+
+
+static inline
+void
+page_cur_move_to_next(
+
+ page_cur_t* cur);
+
+
+static inline
+void
+page_cur_move_to_prev(
+
+ page_cur_t* cur);
+
+
+
+
+static inline
+rec_t*
+page_cur_tuple_insert(
+
+
+
+ page_cur_t* cursor,
+ dtuple_t* tuple,
+ dict_index_t* index,
+ mtr_t* mtr);
+
+
+
+
+static inline
+rec_t*
+page_cur_rec_insert(
+
+
+
+ page_cur_t* cursor,
+ rec_t* rec,
+ dict_index_t* index,
+ ulint* offsets,
+ mtr_t* mtr);
+
+
+
+
+
+
+rec_t*
+page_cur_insert_rec_low(
+
+
+
+ page_cur_t* cursor,
+ dtuple_t* tuple,
+ dict_index_t* index,
+ rec_t* rec,
+ ulint* offsets,
+ mtr_t* mtr);
+
+
+
+
+void
+page_copy_rec_list_end_to_created_page(
+
+ ib_page_t* new_page,
+ ib_page_t* page,
+ rec_t* rec,
+ dict_index_t* index,
+ mtr_t* mtr);
+
+
+
+
+void
+page_cur_delete_rec(
+
+ page_cur_t* cursor,
+ dict_index_t* index,
+ const ulint* offsets,
+ mtr_t* mtr);
+
+
+static inline
+ulint
+page_cur_search(
+
+
+ ib_page_t* page,
+ dict_index_t* index,
+ dtuple_t* tuple,
+ ulint mode,
+
+ page_cur_t* cursor);
+
+
+
+void
+page_cur_search_with_match(
+
+ ib_page_t* page,
+ dict_index_t* index,
+ dtuple_t* tuple,
+ ulint mode,
+
+ ulint* iup_matched_fields,
+
+
+ ulint* iup_matched_bytes,
+
+
+ ulint* ilow_matched_fields,
+
+
+ ulint* ilow_matched_bytes,
+
+
+ page_cur_t* cursor);
+
+
+
+
+void
+page_cur_open_on_rnd_user_rec(
+
+ ib_page_t* page,
+ page_cur_t* cursor);
+
+
+
+unsigned char*
+page_cur_parse_insert_rec(
+
+
+ ulint is_short,
+ unsigned char* ptr,
+ unsigned char* end_ptr,
+ dict_index_t* index,
+ ib_page_t* page,
+ mtr_t* mtr);
+
+
+
+unsigned char*
+page_parse_copy_rec_list_to_created_page(
+
+
+ unsigned char* ptr,
+ unsigned char* end_ptr,
+ dict_index_t* index,
+ ib_page_t* page,
+ mtr_t* mtr);
+
+
+
+unsigned char*
+page_cur_parse_delete_rec(
+
+
+ unsigned char* ptr,
+ unsigned char* end_ptr,
+ dict_index_t* index,
+ ib_page_t* page,
+ mtr_t* mtr);
+
+
+
+struct page_cur_struct{
+ unsigned char* rec;
+};
+
+
+# 1 "./include/page0cur.ic" 1
+# 14 "./include/page0cur.ic"
+static inline
+ib_page_t*
+page_cur_get_page(
+
+
+ page_cur_t* cur)
+{
+ ;
+
+ return(buf_frame_align(cur->rec));
+}
+
+
+
+static inline
+rec_t*
+page_cur_get_rec(
+
+
+ page_cur_t* cur)
+{
+ ;
+
+ return(cur->rec);
+}
+
+
+
+
+static inline
+void
+page_cur_set_before_first(
+
+ ib_page_t* page,
+ page_cur_t* cur)
+{
+ cur->rec = page_get_infimum_rec(page);
+}
+
+
+
+
+static inline
+void
+page_cur_set_after_last(
+
+ ib_page_t* page,
+ page_cur_t* cur)
+{
+ cur->rec = page_get_supremum_rec(page);
+}
+
+
+
+static inline
+ulint
+page_cur_is_before_first(
+
+
+ const page_cur_t* cur)
+{
+ return(page_rec_is_infimum(cur->rec));
+}
+
+
+
+static inline
+ulint
+page_cur_is_after_last(
+
+
+ const page_cur_t* cur)
+{
+ return(page_rec_is_supremum(cur->rec));
+}
+
+
+
+static inline
+void
+page_cur_position(
+
+ rec_t* rec,
+ page_cur_t* cur)
+{
+ ;
+
+ cur->rec = rec;
+}
+
+
+
+static inline
+void
+page_cur_invalidate(
+
+ page_cur_t* cur)
+{
+ ;
+
+ cur->rec = ((void *)0);
+}
+
+
+
+static inline
+void
+page_cur_move_to_next(
+
+ page_cur_t* cur)
+{
+ ;
+
+ cur->rec = page_rec_get_next(cur->rec);
+}
+
+
+
+static inline
+void
+page_cur_move_to_prev(
+
+ page_cur_t* cur)
+{
+ ;
+
+ cur->rec = page_rec_get_prev(cur->rec);
+}
+
+
+
+static inline
+ulint
+page_cur_search(
+
+
+ ib_page_t* page,
+ dict_index_t* index,
+ dtuple_t* tuple,
+ ulint mode,
+
+ page_cur_t* cursor)
+{
+ ulint low_matched_fields = 0;
+ ulint low_matched_bytes = 0;
+ ulint up_matched_fields = 0;
+ ulint up_matched_bytes = 0;
+
+ ;
+
+ page_cur_search_with_match(page, index, tuple, mode,
+ &up_matched_fields,
+ &up_matched_bytes,
+ &low_matched_fields,
+ &low_matched_bytes,
+ cursor);
+ return(low_matched_fields);
+}
+
+
+
+
+
+static inline
+rec_t*
+page_cur_tuple_insert(
+
+
+
+ page_cur_t* cursor,
+ dtuple_t* tuple,
+ dict_index_t* index,
+ mtr_t* mtr)
+{
+ return(page_cur_insert_rec_low(cursor, tuple, index, ((void *)0), ((void *)0), mtr));
+}
+
+
+
+
+
+static inline
+rec_t*
+page_cur_rec_insert(
+
+
+
+ page_cur_t* cursor,
+ rec_t* rec,
+ dict_index_t* index,
+ ulint* offsets,
+ mtr_t* mtr)
+{
+ return(page_cur_insert_rec_low(cursor, ((void *)0), index, rec,
+ offsets, mtr));
+}
+# 284 "./include/page0cur.h" 2
+# 17 "./include/btr0btr.h" 2
+# 51 "./include/btr0btr.h"
+ib_page_t*
+btr_root_get(
+
+
+ dict_tree_t* tree,
+ mtr_t* mtr);
+
+
+static inline
+ib_page_t*
+btr_page_get(
+
+ ulint space,
+ ulint page_no,
+ ulint mode,
+ mtr_t* mtr);
+
+
+static inline
+dulint
+btr_page_get_index_id(
+
+
+ ib_page_t* page);
+
+dulint
+btr_page_get_index_id_noninline(
+
+
+ ib_page_t* page);
+
+
+static inline
+ulint
+btr_page_get_level_low(
+
+
+ ib_page_t* page);
+
+
+static inline
+ulint
+btr_page_get_level(
+
+
+ ib_page_t* page,
+ mtr_t* mtr);
+
+
+static inline
+ulint
+btr_page_get_next(
+
+
+ ib_page_t* page,
+ mtr_t* mtr);
+
+
+static inline
+ulint
+btr_page_get_prev(
+
+
+ ib_page_t* page,
+ mtr_t* mtr);
+
+
+
+
+rec_t*
+btr_get_prev_user_rec(
+
+
+ rec_t* rec,
+ mtr_t* mtr);
+
+
+
+
+
+rec_t*
+btr_get_next_user_rec(
+
+
+ rec_t* rec,
+ mtr_t* mtr);
+
+
+
+static inline
+void
+btr_leaf_page_release(
+
+ ib_page_t* page,
+ ulint latch_mode,
+ mtr_t* mtr);
+
+
+static inline
+ulint
+btr_node_ptr_get_child_page_no(
+
+
+ rec_t* rec,
+ const ulint* offsets);
+
+
+
+ulint
+btr_create(
+
+
+
+ ulint type,
+ ulint space,
+ dulint index_id,
+ ulint comp,
+ mtr_t* mtr);
+
+
+
+
+void
+btr_free_but_not_root(
+
+ ulint space,
+ ulint root_page_no);
+
+
+
+void
+btr_free_root(
+
+ ulint space,
+ ulint root_page_no,
+ mtr_t* mtr);
+# 195 "./include/btr0btr.h"
+rec_t*
+btr_root_raise_and_insert(
+
+
+ btr_cur_t* cursor,
+
+
+
+ dtuple_t* tuple,
+ mtr_t* mtr);
+
+
+
+void
+btr_page_reorganize(
+
+ ib_page_t* page,
+ dict_index_t* index,
+ mtr_t* mtr);
+
+
+
+
+ulint
+btr_page_get_split_rec_to_left(
+
+
+ btr_cur_t* cursor,
+ rec_t** split_rec);
+
+
+
+
+
+
+ulint
+btr_page_get_split_rec_to_right(
+
+
+ btr_cur_t* cursor,
+ rec_t** split_rec);
+# 246 "./include/btr0btr.h"
+rec_t*
+btr_page_split_and_insert(
+
+
+
+
+ btr_cur_t* cursor,
+
+
+ dtuple_t* tuple,
+ mtr_t* mtr);
+
+
+
+
+void
+btr_insert_on_non_leaf_level(
+
+ dict_tree_t* tree,
+ ulint level,
+ dtuple_t* tuple,
+ mtr_t* mtr);
+
+
+
+void
+btr_set_min_rec_mark(
+
+ rec_t* rec,
+ ulint comp,
+ mtr_t* mtr);
+
+
+
+void
+btr_node_ptr_delete(
+
+ dict_tree_t* tree,
+ ib_page_t* page,
+ mtr_t* mtr);
+
+
+
+ulint
+btr_check_node_ptr(
+
+
+ dict_tree_t* tree,
+ ib_page_t* page,
+ mtr_t* mtr);
+# 306 "./include/btr0btr.h"
+void
+btr_compress(
+
+ btr_cur_t* cursor,
+
+
+
+ mtr_t* mtr);
+
+
+
+
+
+void
+btr_discard_page(
+
+ btr_cur_t* cursor,
+
+ mtr_t* mtr);
+
+
+
+
+unsigned char*
+btr_parse_set_min_rec_mark(
+
+
+ unsigned char* ptr,
+ unsigned char* end_ptr,
+ ulint comp,
+ ib_page_t* page,
+ mtr_t* mtr);
+
+
+
+unsigned char*
+btr_parse_page_reorganize(
+
+
+ unsigned char* ptr,
+ unsigned char* end_ptr,
+ dict_index_t* index,
+ ib_page_t* page,
+ mtr_t* mtr);
+
+
+
+ulint
+btr_get_size(
+
+
+ dict_index_t* index,
+ ulint flag);
+
+
+
+
+ib_page_t*
+btr_page_alloc(
+
+
+
+ dict_tree_t* tree,
+ ulint hint_page_no,
+ unsigned char file_direction,
+
+ ulint level,
+
+ mtr_t* mtr);
+
+
+
+
+void
+btr_page_free(
+
+ dict_tree_t* tree,
+ ib_page_t* page,
+ mtr_t* mtr);
+
+
+
+
+
+void
+btr_page_free_low(
+
+ dict_tree_t* tree,
+ ib_page_t* page,
+ ulint level,
+ mtr_t* mtr);
+# 419 "./include/btr0btr.h"
+ulint
+btr_index_rec_validate(
+
+
+ rec_t* rec,
+ dict_index_t* index,
+ ulint dump_on_error);
+
+
+
+
+
+ulint
+btr_validate_tree(
+
+
+ dict_tree_t* tree,
+ trx_t* trx);
+
+
+
+
+
+# 1 "./include/btr0btr.ic" 1
+# 17 "./include/btr0btr.ic"
+static inline
+ib_page_t*
+btr_page_get(
+
+ ulint space,
+ ulint page_no,
+ ulint mode,
+ mtr_t* mtr)
+{
+ ib_page_t* page;
+
+ page = buf_page_get_gen( space, page_no, mode, ((void *)0), 10, "./include/btr0btr.ic", 28, mtr);
+
+
+
+
+
+
+ return(page);
+}
+
+
+
+static inline
+void
+btr_page_set_index_id(
+
+ ib_page_t* page,
+ dulint id,
+ mtr_t* mtr)
+{
+ mlog_write_dulint(page + 38 + 28, id, mtr);
+}
+
+
+
+static inline
+dulint
+btr_page_get_index_id(
+
+
+ ib_page_t* page)
+{
+ return(mach_read_from_8(page + 38 + 28));
+}
+
+
+
+static inline
+ulint
+btr_page_get_level_low(
+
+
+ ib_page_t* page)
+{
+ ulint level;
+
+ ;
+
+ level = mach_read_from_2(page + 38 + 26);
+
+ ;
+
+ return(level);
+}
+
+
+
+static inline
+ulint
+btr_page_get_level(
+
+
+ ib_page_t* page,
+ mtr_t* mtr __attribute__((unused)))
+{
+ ;
+
+ return(btr_page_get_level_low(page));
+}
+
+
+
+static inline
+void
+btr_page_set_level(
+
+ ib_page_t* page,
+ ulint level,
+ mtr_t* mtr)
+{
+ ;
+ ;
+
+ mlog_write_ulint(page + 38 + 26, level,
+ ((unsigned char)2), mtr);
+}
+
+
+
+static inline
+ulint
+btr_page_get_next(
+
+
+ ib_page_t* page,
+ mtr_t* mtr __attribute__((unused)))
+{
+ ;
+ ;
+
+
+
+
+ return(mach_read_from_4(page + 12));
+}
+
+
+
+static inline
+void
+btr_page_set_next(
+
+ ib_page_t* page,
+ ulint next,
+ mtr_t* mtr)
+{
+ ;
+
+ mlog_write_ulint(page + 12, next, ((unsigned char)4), mtr);
+}
+
+
+
+static inline
+ulint
+btr_page_get_prev(
+
+
+ ib_page_t* page,
+ mtr_t* mtr __attribute__((unused)))
+{
+ ;
+
+ return(mach_read_from_4(page + 8));
+}
+
+
+
+static inline
+void
+btr_page_set_prev(
+
+ ib_page_t* page,
+ ulint prev,
+ mtr_t* mtr)
+{
+ ;
+
+ mlog_write_ulint(page + 8, prev, ((unsigned char)4), mtr);
+}
+
+
+
+static inline
+ulint
+btr_node_ptr_get_child_page_no(
+
+
+ rec_t* rec,
+ const ulint* offsets)
+{
+ unsigned char* field;
+ ulint len;
+ ulint page_no;
+
+ ;
+
+
+ field = rec_get_nth_field(rec, offsets,
+ rec_offs_n_fields(offsets) - 1, &len);
+
+ ;
+
+ page_no = mach_read_from_4(field);
+
+ if (__builtin_expect(page_no == 0, (0))) {
+ fprintf(stderr,
+"InnoDB: a nonsensical page number 0 in a node ptr record at offset %lu\n",
+ (ulong) ut_align_offset(rec, (2 * 8192)));
+ buf_page_print(buf_frame_align(rec));
+ }
+
+ return(page_no);
+}
+
+
+
+static inline
+void
+btr_leaf_page_release(
+
+ ib_page_t* page,
+ ulint latch_mode,
+ mtr_t* mtr)
+{
+ ;
+
+ if (latch_mode == 1) {
+ mtr_memo_release(mtr, buf_block_align(page),
+ 1);
+ } else {
+ ;
+ mtr_memo_release(mtr, buf_block_align(page),
+ 2);
+ }
+}
+# 443 "./include/btr0btr.h" 2
+# 31 "buf/buf0buf.c" 2
+# 1 "./include/fil0fil.h" 1
+# 32 "buf/buf0buf.c" 2
+# 1 "./include/lock0lock.h" 1
+# 26 "./include/lock0lock.h"
+extern FILE* lock_latest_err_file;
+
+
+
+
+ulint
+lock_get_size(void);
+
+
+
+
+
+void
+lock_sys_create(
+
+ ulint n_cells);
+
+
+
+
+trx_t*
+lock_sec_rec_some_has_impl_off_kernel(
+
+
+
+ rec_t* rec,
+ dict_index_t* index,
+ const ulint* offsets);
+
+
+
+static inline
+trx_t*
+lock_clust_rec_some_has_impl(
+
+
+
+ rec_t* rec,
+ dict_index_t* index,
+ const ulint* offsets);
+
+
+
+
+
+void
+lock_rec_inherit_to_gap(
+
+ rec_t* heir,
+ rec_t* rec);
+
+
+
+
+
+
+
+void
+lock_move_reorganize_page(
+
+ ib_page_t* page,
+ ib_page_t* new_page);
+
+
+
+
+void
+lock_move_rec_list_end(
+
+ ib_page_t* new_page,
+ ib_page_t* page,
+ rec_t* rec);
+
+
+
+
+
+void
+lock_move_rec_list_start(
+
+ ib_page_t* new_page,
+ ib_page_t* page,
+ rec_t* rec,
+
+ rec_t* old_end);
+
+
+
+
+void
+lock_update_split_right(
+
+ ib_page_t* right_page,
+ ib_page_t* left_page);
+
+
+
+void
+lock_update_merge_right(
+
+ rec_t* orig_succ,
+
+ ib_page_t* left_page);
+# 138 "./include/lock0lock.h"
+void
+lock_update_root_raise(
+
+ ib_page_t* new_page,
+ ib_page_t* root);
+
+
+
+
+void
+lock_update_copy_and_discard(
+
+ ib_page_t* new_page,
+ ib_page_t* page);
+
+
+
+void
+lock_update_split_left(
+
+ ib_page_t* right_page,
+ ib_page_t* left_page);
+
+
+
+void
+lock_update_merge_left(
+
+ ib_page_t* left_page,
+ rec_t* orig_pred,
+
+ ib_page_t* right_page);
+
+
+
+
+
+void
+lock_rec_reset_and_inherit_gap_locks(
+
+ rec_t* heir,
+ rec_t* rec);
+
+
+
+void
+lock_update_discard(
+
+ rec_t* heir,
+ ib_page_t* page);
+
+
+
+void
+lock_update_insert(
+
+ rec_t* rec);
+
+
+
+void
+lock_update_delete(
+
+ rec_t* rec);
+# 210 "./include/lock0lock.h"
+void
+lock_rec_store_on_page_infimum(
+
+ ib_page_t* page,
+ rec_t* rec);
+
+
+
+
+
+
+void
+lock_rec_restore_from_page_infimum(
+
+ rec_t* rec,
+ ib_page_t* page);
+
+
+
+
+
+ulint
+lock_rec_expl_exist_on_page(
+
+
+
+ ulint space,
+ ulint page_no);
+
+
+
+
+
+
+
+ulint
+lock_rec_insert_check_and_lock(
+
+
+
+ ulint flags,
+
+ rec_t* rec,
+ dict_index_t* index,
+ que_thr_t* thr,
+ ulint* inherit);
+# 266 "./include/lock0lock.h"
+ulint
+lock_clust_rec_modify_check_and_lock(
+
+
+
+ ulint flags,
+
+ rec_t* rec,
+ dict_index_t* index,
+ const ulint* offsets,
+ que_thr_t* thr);
+
+
+
+
+ulint
+lock_sec_rec_modify_check_and_lock(
+
+
+
+ ulint flags,
+
+ rec_t* rec,
+
+
+
+ dict_index_t* index,
+ que_thr_t* thr);
+
+
+
+
+ulint
+lock_sec_rec_read_check_and_lock(
+
+
+
+ ulint flags,
+
+ rec_t* rec,
+
+
+ dict_index_t* index,
+ const ulint* offsets,
+ ulint mode,
+
+
+ ulint gap_mode,
+
+ que_thr_t* thr);
+# 324 "./include/lock0lock.h"
+ulint
+lock_clust_rec_read_check_and_lock(
+
+
+
+ ulint flags,
+
+ rec_t* rec,
+
+
+ dict_index_t* index,
+ const ulint* offsets,
+ ulint mode,
+
+
+ ulint gap_mode,
+
+ que_thr_t* thr);
+# 352 "./include/lock0lock.h"
+ulint
+lock_clust_rec_read_check_and_lock_alt(
+
+
+
+ ulint flags,
+
+ rec_t* rec,
+
+
+ dict_index_t* index,
+ ulint mode,
+
+
+ ulint gap_mode,
+
+ que_thr_t* thr);
+
+
+
+ulint
+lock_clust_rec_cons_read_sees(
+
+
+
+ rec_t* rec,
+
+ dict_index_t* index,
+ const ulint* offsets,
+ read_view_t* view);
+
+
+
+ulint
+lock_sec_rec_cons_read_sees(
+# 396 "./include/lock0lock.h"
+ rec_t* rec,
+
+ dict_index_t* index,
+ read_view_t* view);
+
+
+
+
+ulint
+lock_table(
+
+
+
+ ulint flags,
+
+ dict_table_t* table,
+ ulint mode,
+ que_thr_t* thr);
+
+
+
+ulint
+lock_is_on_table(
+
+
+ dict_table_t* table);
+
+
+
+
+
+void
+lock_rec_unlock(
+
+ trx_t* trx,
+
+ rec_t* rec,
+ ulint lock_mode);
+
+
+
+
+void
+lock_table_unlock(
+
+ ib_lock_t* lock);
+
+
+
+
+void
+lock_table_unlock_auto_inc(
+
+ trx_t* trx);
+
+
+
+
+void
+lock_release_off_kernel(
+
+ trx_t* trx);
+
+
+
+
+void
+lock_cancel_waiting_and_release(
+
+ ib_lock_t* lock);
+
+
+
+
+void
+lock_reset_all_on_table(
+
+ dict_table_t* table);
+
+
+
+static inline
+ulint
+lock_rec_fold(
+
+
+ ulint space,
+ ulint page_no);
+
+
+
+static inline
+ulint
+lock_rec_hash(
+
+
+ ulint space,
+ ulint page_no);
+
+
+
+
+dict_table_t*
+lock_get_src_table(
+
+
+
+
+
+
+ trx_t* trx,
+ dict_table_t* dest,
+ ulint* mode);
+
+
+
+
+
+ulint
+lock_is_table_exclusive(
+
+
+
+ dict_table_t* table,
+ trx_t* trx);
+
+
+
+ulint
+lock_check_trx_id_sanity(
+
+
+ dulint trx_id,
+ rec_t* rec,
+ dict_index_t* index,
+ const ulint* offsets,
+ ulint has_kernel_mutex);
+
+
+
+
+ulint
+lock_rec_queue_validate(
+
+
+ rec_t* rec,
+ dict_index_t* index,
+ const ulint* offsets);
+
+
+
+void
+lock_table_print(
+
+ FILE* file,
+ ib_lock_t* lock);
+
+
+
+void
+lock_rec_print(
+
+ FILE* file,
+ ib_lock_t* lock);
+
+
+
+void
+lock_print_info_summary(
+
+ FILE* file);
+
+
+
+void
+lock_print_info_all_transactions(
+
+ FILE* file);
+
+
+
+ulint
+lock_table_queue_validate(
+
+
+ dict_table_t* table);
+
+
+
+ulint
+lock_rec_validate_page(
+
+
+ ulint space,
+ ulint page_no);
+
+
+
+ulint
+lock_validate(void);
+
+
+
+
+extern lock_sys_t* lock_sys;
+# 659 "./include/lock0lock.h"
+typedef struct lock_op_struct lock_op_t;
+struct lock_op_struct{
+ dict_table_t* table;
+ ulint mode;
+};
+
+
+
+
+
+struct lock_sys_struct{
+ hash_table_t* rec_hash;
+};
+
+
+extern lock_sys_t* lock_sys;
+
+
+
+# 1 "./include/lock0lock.ic" 1
+# 12 "./include/lock0lock.ic"
+# 1 "./include/row0row.h" 1
+# 24 "./include/row0row.h"
+static inline
+dulint
+row_get_rec_trx_id(
+
+
+ rec_t* rec,
+ dict_index_t* index,
+ const ulint* offsets);
+
+
+static inline
+dulint
+row_get_rec_roll_ptr(
+
+
+ rec_t* rec,
+ dict_index_t* index,
+ const ulint* offsets);
+
+
+static inline
+void
+row_set_rec_trx_id(
+
+ rec_t* rec,
+ dict_index_t* index,
+ const ulint* offsets,
+ dulint trx_id);
+
+
+static inline
+void
+row_set_rec_roll_ptr(
+
+ rec_t* rec,
+ dict_index_t* index,
+ const ulint* offsets,
+ dulint roll_ptr);
+
+
+
+
+dtuple_t*
+row_build_index_entry(
+
+
+ dtuple_t* row,
+
+ dict_index_t* index,
+ mem_heap_t* heap);
+
+
+
+
+
+dtuple_t*
+row_build(
+
+
+ ulint type,
+
+
+
+
+
+ dict_index_t* index,
+ rec_t* rec,
+
+
+
+
+
+
+ const ulint* offsets,
+
+
+ mem_heap_t* heap);
+
+
+
+
+dtuple_t*
+row_rec_to_index_entry(
+
+
+
+ ulint type,
+
+
+
+ dict_index_t* index,
+ rec_t* rec,
+
+
+
+
+
+
+ mem_heap_t* heap);
+
+
+
+
+
+dtuple_t*
+row_build_row_ref(
+
+
+
+ ulint type,
+
+
+
+ dict_index_t* index,
+ rec_t* rec,
+
+
+
+
+
+
+ mem_heap_t* heap);
+
+
+
+
+
+void
+row_build_row_ref_in_tuple(
+
+ dtuple_t* ref,
+
+ dict_index_t* index,
+ rec_t* rec,
+
+
+
+
+
+ trx_t* trx);
+
+
+
+
+void
+row_build_row_ref_from_row(
+
+ dtuple_t* ref,
+
+
+ dict_table_t* table,
+ dtuple_t* row);
+
+
+
+
+
+static inline
+void
+row_build_row_ref_fast(
+
+ dtuple_t* ref,
+
+ const ulint* map,
+
+
+ rec_t* rec,
+
+
+ const ulint* offsets);
+
+
+
+
+ulint
+row_search_on_row_ref(
+
+
+ btr_pcur_t* pcur,
+
+ ulint mode,
+ dict_table_t* table,
+ dtuple_t* ref,
+ mtr_t* mtr);
+
+
+
+
+rec_t*
+row_get_clust_rec(
+
+
+ ulint mode,
+ rec_t* rec,
+ dict_index_t* index,
+ dict_index_t** clust_index,
+ mtr_t* mtr);
+
+
+
+ulint
+row_search_index_entry(
+
+
+ dict_index_t* index,
+ dtuple_t* entry,
+ ulint mode,
+ btr_pcur_t* pcur,
+
+ mtr_t* mtr);
+# 249 "./include/row0row.h"
+# 1 "./include/row0row.ic" 1
+# 17 "./include/row0row.ic"
+dulint
+row_get_rec_sys_field(
+
+
+ ulint type,
+ rec_t* rec,
+ dict_index_t* index,
+ const ulint* offsets);
+
+
+
+
+void
+row_set_rec_sys_field(
+
+
+ ulint type,
+ rec_t* rec,
+ dict_index_t* index,
+ const ulint* offsets,
+ dulint val);
+
+
+
+static inline
+dulint
+row_get_rec_trx_id(
+
+
+ rec_t* rec,
+ dict_index_t* index,
+ const ulint* offsets)
+{
+ ulint offset;
+
+ ;
+ ;
+
+ offset = index->trx_id_offset;
+
+ if (offset) {
+ return(trx_read_trx_id(rec + offset));
+ } else {
+ return(row_get_rec_sys_field(1,
+ rec, index, offsets));
+ }
+}
+
+
+
+static inline
+dulint
+row_get_rec_roll_ptr(
+
+
+ rec_t* rec,
+ dict_index_t* index,
+ const ulint* offsets)
+{
+ ulint offset;
+
+ ;
+ ;
+
+ offset = index->trx_id_offset;
+
+ if (offset) {
+ return(trx_read_roll_ptr(rec + offset + 6));
+ } else {
+ return(row_get_rec_sys_field(2,
+ rec, index, offsets));
+ }
+}
+
+
+
+static inline
+void
+row_set_rec_trx_id(
+
+ rec_t* rec,
+ dict_index_t* index,
+ const ulint* offsets,
+ dulint trx_id)
+{
+ ulint offset;
+
+ ;
+ ;
+
+ offset = index->trx_id_offset;
+
+ if (offset) {
+ trx_write_trx_id(rec + offset, trx_id);
+ } else {
+ row_set_rec_sys_field(1,
+ rec, index, offsets, trx_id);
+ }
+}
+
+
+
+static inline
+void
+row_set_rec_roll_ptr(
+
+ rec_t* rec,
+ dict_index_t* index,
+ const ulint* offsets,
+ dulint roll_ptr)
+{
+ ulint offset;
+
+ ;
+ ;
+
+ offset = index->trx_id_offset;
+
+ if (offset) {
+ trx_write_roll_ptr(rec + offset + 6, roll_ptr);
+ } else {
+ row_set_rec_sys_field(2,
+ rec, index, offsets, roll_ptr);
+ }
+}
+
+
+
+
+static inline
+void
+row_build_row_ref_fast(
+
+ dtuple_t* ref,
+
+ const ulint* map,
+
+
+ rec_t* rec,
+
+
+ const ulint* offsets)
+{
+ dfield_t* dfield;
+ unsigned char* field;
+ ulint len;
+ ulint ref_len;
+ ulint field_no;
+ ulint i;
+
+ ;
+ ref_len = dtuple_get_n_fields(ref);
+
+ for (i = 0; i < ref_len; i++) {
+ dfield = dtuple_get_nth_field(ref, i);
+
+ field_no = *(map + i);
+
+ if (field_no != ((ulint)(-1))) {
+
+ field = rec_get_nth_field(rec, offsets,
+ field_no, &len);
+ dfield_set_data(dfield, field, len);
+ }
+ }
+}
+# 250 "./include/row0row.h" 2
+# 13 "./include/lock0lock.ic" 2
+
+
+
+
+
+# 1 "./include/row0vers.h" 1
+# 26 "./include/row0vers.h"
+trx_t*
+row_vers_impl_x_locked_off_kernel(
+
+
+
+
+ rec_t* rec,
+ dict_index_t* index,
+ const ulint* offsets);
+
+
+
+
+ulint
+row_vers_must_preserve_del_marked(
+
+
+ dulint trx_id,
+ mtr_t* mtr);
+# 53 "./include/row0vers.h"
+ulint
+row_vers_old_has_index_entry(
+
+
+ ulint also_curr,
+
+
+ rec_t* rec,
+
+ mtr_t* mtr,
+
+ dict_index_t* index,
+ dtuple_t* ientry);
+
+
+
+
+
+ulint
+row_vers_build_for_consistent_read(
+
+
+ rec_t* rec,
+
+
+
+ mtr_t* mtr,
+
+ dict_index_t* index,
+ ulint** offsets,
+
+ read_view_t* view,
+ mem_heap_t** offset_heap,
+
+ mem_heap_t* in_heap,
+
+
+
+ rec_t** old_vers);
+
+
+
+
+
+# 1 "./include/row0vers.ic" 1
+# 11 "./include/row0vers.ic"
+# 1 "./include/read0read.h" 1
+# 24 "./include/read0read.h"
+read_view_t*
+read_view_open_now(
+
+
+ trx_t* cr_trx,
+ mem_heap_t* heap);
+
+
+
+
+read_view_t*
+read_view_oldest_copy_or_open_new(
+
+
+ trx_t* cr_trx,
+ mem_heap_t* heap);
+
+
+
+void
+read_view_close(
+
+ read_view_t* view);
+
+
+
+
+void
+read_view_close_for_mysql(
+
+ trx_t* trx);
+
+
+static inline
+ulint
+read_view_sees_trx_id(
+
+
+ read_view_t* view,
+ dulint trx_id);
+
+
+
+void
+read_view_print(
+
+ read_view_t* view);
+
+
+
+
+
+cursor_view_t*
+read_cursor_view_create_for_mysql(
+
+ trx_t* cr_trx);
+
+
+
+
+void
+read_cursor_view_close_for_mysql(
+
+ trx_t* trx,
+ cursor_view_t* curview);
+
+
+
+
+
+void
+read_cursor_set_for_mysql(
+
+ trx_t* trx,
+ cursor_view_t* curview);
+
+
+
+
+struct read_view_struct{
+ ulint can_be_too_old;
+
+
+
+ dulint low_limit_no;
+
+
+
+
+ dulint low_limit_id;
+
+ dulint up_limit_id;
+
+ ulint n_trx_ids;
+ dulint* trx_ids;
+
+
+
+
+
+ trx_t* creator;
+
+ struct { read_view_t * prev; read_view_t * next; } view_list;
+
+};
+
+
+
+
+
+struct cursor_view_struct{
+ mem_heap_t* heap;
+
+ read_view_t* read_view;
+
+ ulint n_mysql_tables_in_use;
+
+
+};
+
+
+# 1 "./include/read0read.ic" 1
+# 11 "./include/read0read.ic"
+static inline
+dulint
+read_view_get_nth_trx_id(
+
+
+ read_view_t* view,
+ ulint n)
+{
+ ;
+
+ return(*(view->trx_ids + n));
+}
+
+
+
+static inline
+void
+read_view_set_nth_trx_id(
+
+ read_view_t* view,
+ ulint n,
+ dulint trx_id)
+{
+ ;
+
+ *(view->trx_ids + n) = trx_id;
+}
+
+
+
+static inline
+ulint
+read_view_sees_trx_id(
+
+
+ read_view_t* view,
+ dulint trx_id)
+{
+ ulint n_ids;
+ int cmp;
+ ulint i;
+
+ if (ut_dulint_cmp(trx_id, view->up_limit_id) < 0) {
+
+ return((1));
+ }
+
+ if (ut_dulint_cmp(trx_id, view->low_limit_id) >= 0) {
+
+ return((0));
+ }
+
+
+
+
+
+
+ n_ids = view->n_trx_ids;
+
+ for (i = 0; i < n_ids; i++) {
+
+ cmp = ut_dulint_cmp(trx_id,
+ read_view_get_nth_trx_id(view, n_ids - i - 1));
+ if (cmp <= 0) {
+ return(cmp < 0);
+ }
+ }
+
+ return((1));
+}
+# 146 "./include/read0read.h" 2
+# 12 "./include/row0vers.ic" 2
+
+# 1 "./include/log0recv.h" 1
+# 16 "./include/log0recv.h"
+# 1 "./include/log0log.h" 1
+# 17 "./include/log0log.h"
+typedef struct log_struct log_t;
+typedef struct log_group_struct log_group_t;
+# 38 "./include/log0log.h"
+void
+log_fsp_current_free_limit_set_and_checkpoint(
+
+ ulint limit);
+
+
+
+ulint
+log_calc_where_lsn_is(
+
+
+ ib_longlong* log_file_offset,
+
+ dulint first_header_lsn,
+
+ dulint lsn,
+
+ ulint n_log_files,
+
+ ib_longlong log_file_size);
+
+
+
+
+static inline
+dulint
+log_reserve_and_write_fast(
+
+
+
+ unsigned char* str,
+ ulint len,
+ dulint* start_lsn,
+ ulint* success);
+
+
+static inline
+void
+log_release(void);
+
+
+
+
+
+
+static inline
+void
+log_free_check(void);
+
+
+
+
+
+dulint
+log_reserve_and_open(
+
+
+ ulint len);
+
+
+
+
+void
+log_write_low(
+
+ unsigned char* str,
+ ulint str_len);
+
+
+
+dulint
+log_close(void);
+
+
+
+
+static inline
+dulint
+log_get_lsn(void);
+
+
+
+
+
+void
+log_init(void);
+
+
+
+
+void
+log_group_init(
+
+ ulint id,
+ ulint n_files,
+ ulint file_size,
+ ulint space_id,
+
+
+ ulint archive_space_id);
+
+
+
+
+
+
+
+void
+log_io_complete(
+
+ log_group_t* group);
+
+
+
+
+typedef enum {
+ LOG_WRITE_FROM_DIRTY_BUFFER,
+ LOG_WRITE_FROM_BACKGROUND_SYNC,
+ LOG_WRITE_FROM_BACKGROUND_ASYNC,
+ LOG_WRITE_FROM_INTERNAL,
+ LOG_WRITE_FROM_CHECKPOINT_SYNC,
+ LOG_WRITE_FROM_CHECKPOINT_ASYNC,
+ LOG_WRITE_FROM_LOG_ARCHIVE,
+ LOG_WRITE_FROM_COMMIT_SYNC,
+ LOG_WRITE_FROM_COMMIT_ASYNC,
+ LOG_WRITE_FROM_NUMBER
+} log_sync_type;
+
+
+
+
+
+
+void
+log_write_up_to(
+
+ dulint lsn,
+
+ ulint wait,
+
+ ulint flush_to_disk,
+
+ log_sync_type caller);
+
+
+
+void
+log_buffer_flush_to_disk(void);
+
+
+
+
+
+void
+log_buffer_flush_maybe_sync(void);
+
+
+
+
+
+
+ulint
+log_preflush_pool_modified_pages(
+
+
+
+
+ dulint new_oldest,
+
+ ulint sync);
+
+
+
+
+
+
+
+ulint
+log_checkpoint(
+
+
+
+ ulint sync,
+
+ ulint write_always);
+# 231 "./include/log0log.h"
+void
+log_make_checkpoint_at(
+
+ dulint lsn,
+
+
+ ulint write_always);
+# 249 "./include/log0log.h"
+void
+logs_empty_and_mark_files_at_shutdown(void);
+
+
+
+
+void
+log_group_read_checkpoint_info(
+
+ log_group_t* group,
+ ulint field);
+
+
+
+void
+log_checkpoint_get_nth_group_info(
+
+ unsigned char* buf,
+ ulint n,
+ ulint* file_no,
+ ulint* offset);
+
+
+
+void
+log_groups_write_checkpoint_info(void);
+
+
+
+
+
+void
+log_reset_first_header_and_checkpoint(
+
+ unsigned char* hdr_buf,
+
+ dulint start);
+
+
+
+
+
+ulint
+log_archive_do(
+
+
+
+ ulint sync,
+ ulint* n_bytes);
+# 306 "./include/log0log.h"
+ulint
+log_archive_stop(void);
+
+
+
+
+
+ulint
+log_archive_start(void);
+
+
+
+
+
+ulint
+log_archive_noarchivelog(void);
+
+
+
+
+
+ulint
+log_archive_archivelog(void);
+
+
+
+
+
+void
+log_archived_file_name_gen(
+
+ char* buf,
+ ulint id,
+ ulint file_no);
+
+
+
+
+
+
+void
+log_check_margins(void);
+
+
+
+
+void
+log_group_read_log_seg(
+
+ ulint type,
+ unsigned char* buf,
+ log_group_t* group,
+ dulint start_lsn,
+ dulint end_lsn);
+
+
+
+void
+log_group_write_buf(
+
+ log_group_t* group,
+ unsigned char* buf,
+ ulint len,
+
+ dulint start_lsn,
+
+
+ ulint new_data_offset);
+# 382 "./include/log0log.h"
+void
+log_group_set_fields(
+
+ log_group_t* group,
+ dulint lsn);
+
+
+
+
+
+ulint
+log_group_get_capacity(
+
+
+ log_group_t* group);
+
+
+static inline
+ulint
+log_block_get_flush_bit(
+
+
+
+ unsigned char* log_block);
+
+
+static inline
+ulint
+log_block_get_hdr_no(
+
+
+
+ unsigned char* log_block);
+
+
+static inline
+ulint
+log_block_get_data_len(
+
+
+
+ unsigned char* log_block);
+
+
+static inline
+void
+log_block_set_data_len(
+
+ unsigned char* log_block,
+ ulint len);
+
+
+static inline
+ulint
+log_block_calc_checksum(
+
+
+ unsigned char* block);
+
+
+static inline
+ulint
+log_block_get_checksum(
+
+
+ unsigned char* log_block);
+
+
+static inline
+void
+log_block_set_checksum(
+
+ unsigned char* log_block,
+ ulint checksum);
+
+
+static inline
+ulint
+log_block_get_first_rec_group(
+
+
+
+ unsigned char* log_block);
+
+
+static inline
+void
+log_block_set_first_rec_group(
+
+ unsigned char* log_block,
+ ulint offset);
+
+
+static inline
+ulint
+log_block_get_checkpoint_no(
+
+
+ unsigned char* log_block);
+
+
+static inline
+void
+log_block_init(
+
+ unsigned char* log_block,
+ dulint lsn);
+
+
+
+static inline
+void
+log_block_init_in_old_format(
+
+ unsigned char* log_block,
+ dulint lsn);
+
+
+static inline
+ulint
+log_block_convert_lsn_to_no(
+
+
+ dulint lsn);
+
+
+
+void
+log_print(
+
+ FILE* file);
+
+
+
+ulint
+log_peek_lsn(
+
+
+
+ dulint* lsn);
+
+
+
+void
+log_refresh_stats(void);
+
+
+extern log_t* log_sys;
+# 661 "./include/log0log.h"
+struct log_group_struct{
+
+ ulint id;
+ ulint n_files;
+ ulint file_size;
+
+ ulint space_id;
+
+ ulint state;
+
+ dulint lsn;
+
+ ulint lsn_offset;
+ ulint n_pending_writes;
+
+ unsigned char** file_header_bufs;
+
+
+ unsigned char** archive_file_header_bufs;
+
+ ulint archive_space_id;
+
+ ulint archived_file_no;
+
+ ulint archived_offset;
+
+
+
+ ulint next_archived_file_no;
+
+
+
+
+
+ ulint next_archived_offset;
+
+ dulint scanned_lsn;
+
+
+ unsigned char* checkpoint_buf;
+
+ struct { log_group_t * prev; log_group_t * next; }
+ log_groups;
+};
+
+struct log_struct{
+ unsigned char pad[64];
+
+
+ dulint lsn;
+ ulint buf_free;
+
+ ib_mutex_t mutex;
+ unsigned char* buf;
+ ulint buf_size;
+ ulint max_buf_free;
+
+
+ ulint old_buf_free;
+
+
+ dulint old_lsn;
+
+ ulint check_flush_or_checkpoint;
+# 733 "./include/log0log.h"
+ struct { ulint count; log_group_t * start; log_group_t * end; }
+ log_groups;
+
+
+
+ ulint buf_next_to_write;
+
+
+
+
+
+
+ dulint written_to_some_lsn;
+
+
+
+
+
+ dulint written_to_all_lsn;
+
+
+
+
+
+ dulint write_lsn;
+
+ ulint write_end_offset;
+
+
+
+ dulint current_flush_lsn;
+
+ dulint flushed_to_disk_lsn;
+
+
+ ulint n_pending_writes;
+
+ ulint log_sync_callers[LOG_WRITE_FROM_NUMBER];
+
+ ulint log_sync_syncers[LOG_WRITE_FROM_NUMBER];
+
+ ulint n_syncs;
+ ulint n_checkpoints;
+
+
+
+
+ os_event_t no_flush_event;
+
+
+
+
+
+ ulint one_flushed;
+
+
+ os_event_t one_flushed_event;
+# 798 "./include/log0log.h"
+ ulint n_log_ios;
+
+ ulint n_log_ios_old;
+
+ time_t last_printout_time;
+
+
+
+ ulint log_group_capacity;
+
+
+
+
+ ulint max_modified_age_async;
+
+
+
+
+ ulint max_modified_age_sync;
+
+
+
+
+ ulint adm_checkpoint_interval;
+
+
+
+
+ ulint max_checkpoint_age_async;
+
+
+
+ ulint max_checkpoint_age;
+
+
+
+ dulint next_checkpoint_no;
+
+ dulint last_checkpoint_lsn;
+
+ dulint next_checkpoint_lsn;
+
+ ulint n_pending_checkpoint_writes;
+
+
+ rw_lock_t checkpoint_lock;
+
+
+
+ unsigned char* checkpoint_buf;
+
+
+ ulint archiving_state;
+
+ dulint archived_lsn;
+
+ ulint max_archived_lsn_age_async;
+
+
+
+ ulint max_archived_lsn_age;
+
+
+ dulint next_archived_lsn;
+
+
+
+
+
+ ulint archiving_phase;
+
+ ulint n_pending_archive_ios;
+
+
+ rw_lock_t archive_lock;
+
+
+
+ ulint archive_buf_size;
+ unsigned char* archive_buf;
+
+ os_event_t archiving_on;
+
+
+};
+# 891 "./include/log0log.h"
+# 1 "./include/log0log.ic" 1
+# 17 "./include/log0log.ic"
+ulint
+log_check_log_recs(
+
+ unsigned char* buf,
+
+ ulint len,
+ dulint buf_start_lsn);
+
+
+
+static inline
+ulint
+log_block_get_flush_bit(
+
+
+
+ unsigned char* log_block)
+{
+ if (0x80000000UL
+ & mach_read_from_4(log_block + 0)) {
+
+ return((1));
+ }
+
+ return((0));
+}
+
+
+
+static inline
+void
+log_block_set_flush_bit(
+
+ unsigned char* log_block,
+ ulint val)
+{
+ ulint field;
+
+ field = mach_read_from_4(log_block + 0);
+
+ if (val) {
+ field = field | 0x80000000UL;
+ } else {
+ field = field & ~0x80000000UL;
+ }
+
+ mach_write_to_4(log_block + 0, field);
+}
+
+
+
+static inline
+ulint
+log_block_get_hdr_no(
+
+
+
+ unsigned char* log_block)
+{
+ return(~0x80000000UL
+ & mach_read_from_4(log_block + 0));
+}
+
+
+
+
+static inline
+void
+log_block_set_hdr_no(
+
+ unsigned char* log_block,
+ ulint n)
+
+{
+ ;
+ ;
+
+ mach_write_to_4(log_block + 0, n);
+}
+
+
+
+static inline
+ulint
+log_block_get_data_len(
+
+
+
+ unsigned char* log_block)
+{
+ return(mach_read_from_2(log_block + 4));
+}
+
+
+
+static inline
+void
+log_block_set_data_len(
+
+ unsigned char* log_block,
+ ulint len)
+{
+ mach_write_to_2(log_block + 4, len);
+}
+
+
+
+static inline
+ulint
+log_block_get_first_rec_group(
+
+
+
+ unsigned char* log_block)
+{
+ return(mach_read_from_2(log_block + 6));
+}
+
+
+
+static inline
+void
+log_block_set_first_rec_group(
+
+ unsigned char* log_block,
+ ulint offset)
+{
+ mach_write_to_2(log_block + 6, offset);
+}
+
+
+
+static inline
+ulint
+log_block_get_checkpoint_no(
+
+
+ unsigned char* log_block)
+{
+ return(mach_read_from_4(log_block + 8));
+}
+
+
+
+static inline
+void
+log_block_set_checkpoint_no(
+
+ unsigned char* log_block,
+ dulint no)
+{
+ mach_write_to_4(log_block + 8,
+ ut_dulint_get_low(no));
+}
+
+
+
+static inline
+ulint
+log_block_convert_lsn_to_no(
+
+
+ dulint lsn)
+{
+ ulint no;
+
+ no = ut_dulint_get_low(lsn) / 512;
+ no += (ut_dulint_get_high(lsn) % 512)
+ * 2 * (0x80000000UL / 512);
+
+ no = no & 0x3FFFFFFFUL;
+
+ return(no + 1);
+}
+
+
+
+static inline
+ulint
+log_block_calc_checksum(
+
+
+ unsigned char* block)
+{
+ ulint sum;
+ ulint sh;
+ ulint i;
+
+ sum = 1;
+ sh = 0;
+
+ for (i = 0; i < 512 - 4; i++) {
+ sum = sum & 0x7FFFFFFFUL;
+ sum += (((ulint)(*(block + i))) << sh) + (ulint)(*(block + i));
+ sh++;
+ if (sh > 24) {
+ sh = 0;
+ }
+ }
+
+ return(sum);
+}
+
+
+
+static inline
+ulint
+log_block_get_checksum(
+
+
+ unsigned char* log_block)
+{
+ return(mach_read_from_4(log_block + 512
+ - 4));
+}
+
+
+
+static inline
+void
+log_block_set_checksum(
+
+ unsigned char* log_block,
+ ulint checksum)
+{
+ mach_write_to_4(log_block + 512
+ - 4,
+ checksum);
+}
+
+
+
+static inline
+void
+log_block_init(
+
+ unsigned char* log_block,
+ dulint lsn)
+{
+ ulint no;
+
+
+
+
+
+ no = log_block_convert_lsn_to_no(lsn);
+
+ log_block_set_hdr_no(log_block, no);
+
+ log_block_set_data_len(log_block, 12);
+ log_block_set_first_rec_group(log_block, 0);
+}
+
+
+
+
+static inline
+void
+log_block_init_in_old_format(
+
+ unsigned char* log_block,
+ dulint lsn)
+{
+ ulint no;
+
+
+
+
+
+ no = log_block_convert_lsn_to_no(lsn);
+
+ log_block_set_hdr_no(log_block, no);
+ mach_write_to_4(log_block + 512
+ - 4, no);
+ log_block_set_data_len(log_block, 12);
+ log_block_set_first_rec_group(log_block, 0);
+}
+
+
+
+
+static inline
+dulint
+log_reserve_and_write_fast(
+
+
+
+ unsigned char* str,
+ ulint len,
+ dulint* start_lsn,
+ ulint* success)
+{
+ log_t* log = log_sys;
+ ulint data_len;
+ dulint lsn;
+
+ *success = (1);
+
+ mutex_enter_func((&(log->mutex)), "./include/log0log.ic", 315);
+
+ data_len = len + log->buf_free % 512;
+
+ if (data_len >= 512 - 4) {
+
+
+
+
+ *success = (0);
+
+ mutex_exit(&(log->mutex));
+
+ return(ut_dulint_zero);
+ }
+
+ *start_lsn = log->lsn;
+
+ ut_memcpy(log->buf + log->buf_free, str, len);
+
+ log_block_set_data_len(ut_align_down(log->buf + log->buf_free,
+ 512),
+ data_len);
+
+
+
+
+ log->buf_free += len;
+
+ ;
+
+ lsn = ut_dulint_add(log->lsn, len);
+
+ log->lsn = lsn;
+
+
+
+
+
+ return(lsn);
+}
+
+
+
+static inline
+void
+log_release(void)
+
+{
+ mutex_exit(&(log_sys->mutex));
+}
+
+
+
+static inline
+dulint
+log_get_lsn(void)
+
+
+{
+ dulint lsn;
+
+ mutex_enter_func((&(log_sys->mutex)), "./include/log0log.ic", 377);
+
+ lsn = log_sys->lsn;
+
+ mutex_exit(&(log_sys->mutex));
+
+ return(lsn);
+}
+
+
+
+
+
+
+static inline
+void
+log_free_check(void)
+
+{
+
+
+ if (log_sys->check_flush_or_checkpoint) {
+
+ log_check_margins();
+ }
+}
+# 892 "./include/log0log.h" 2
+# 17 "./include/log0recv.h" 2
+# 25 "./include/log0recv.h"
+ulint
+recv_read_cp_info_for_backup(
+
+
+ unsigned char* hdr,
+ dulint* lsn,
+ ulint* offset,
+ ulint* fsp_limit,
+
+ dulint* cp_no,
+ dulint* first_header_lsn);
+
+
+
+
+
+void
+recv_scan_log_seg_for_backup(
+
+ unsigned char* buf,
+ ulint buf_len,
+ dulint* scanned_lsn,
+
+ ulint* scanned_checkpoint_no,
+
+
+
+ ulint* n_bytes_scanned);
+
+
+
+
+static inline
+ulint
+recv_recovery_is_on(void);
+
+
+
+static inline
+ulint
+recv_recovery_from_backup_is_on(void);
+
+
+
+
+
+
+void
+recv_recover_page(
+
+ ulint recover_backup,
+
+
+
+ ulint just_read_in,
+
+ ib_page_t* page,
+ ulint space,
+ ulint page_no);
+
+
+
+
+
+
+ulint
+recv_recovery_from_checkpoint_start(
+
+
+ ulint type,
+ dulint limit_lsn,
+ dulint min_flushed_lsn,
+ dulint max_flushed_lsn);
+
+
+
+void
+recv_recovery_from_checkpoint_finish(void);
+
+
+
+
+
+ulint
+recv_scan_log_recs(
+
+
+
+ ulint apply_automatically,
+
+
+
+
+ ulint available_memory,
+
+ ulint store_to_hash,
+
+
+ unsigned char* buf,
+
+ ulint len,
+ dulint start_lsn,
+ dulint* contiguous_lsn,
+
+ dulint* group_scanned_lsn);
+
+
+
+void
+recv_reset_logs(
+
+ dulint lsn,
+
+
+
+
+
+ ulint new_logs_created);
+# 161 "./include/log0recv.h"
+void
+recv_sys_create(void);
+
+
+
+
+void
+recv_sys_init(
+
+ ulint recover_from_backup,
+
+ ulint available_memory);
+
+
+
+
+void
+recv_apply_hashed_log_recs(
+
+ ulint allow_ibuf);
+# 220 "./include/log0recv.h"
+void
+recv_compare_spaces(
+
+ ulint space1,
+ ulint space2,
+ ulint n_pages);
+
+
+
+
+
+
+void
+recv_compare_spaces_low(
+
+ ulint space1,
+ ulint space2,
+ ulint n_pages);
+
+
+typedef struct recv_data_struct recv_data_t;
+struct recv_data_struct{
+ recv_data_t* next;
+
+
+
+};
+
+
+typedef struct recv_struct recv_t;
+struct recv_struct{
+ unsigned char type;
+ ulint len;
+ recv_data_t* data;
+
+ dulint start_lsn;
+
+
+
+ dulint end_lsn;
+
+
+
+ struct { recv_t * prev; recv_t * next; }
+ rec_list;
+};
+
+
+typedef struct recv_addr_struct recv_addr_t;
+struct recv_addr_struct{
+ ulint state;
+
+ ulint space;
+ ulint page_no;
+ struct { ulint count; recv_t * start; recv_t * end; }
+ rec_list;
+ hash_node_t addr_hash;
+};
+
+
+typedef struct recv_sys_struct recv_sys_t;
+struct recv_sys_struct{
+ ib_mutex_t mutex;
+
+
+ ulint apply_log_recs;
+
+
+
+
+ ulint apply_batch_on;
+
+
+ dulint lsn;
+ ulint last_log_buf_size;
+
+
+ unsigned char* last_block;
+
+
+ unsigned char* last_block_buf_start;
+
+
+ unsigned char* buf;
+ ulint len;
+ dulint parse_start_lsn;
+
+
+
+
+ dulint scanned_lsn;
+
+
+ ulint scanned_checkpoint_no;
+
+
+ ulint recovered_offset;
+
+
+ dulint recovered_lsn;
+
+
+ dulint limit_lsn;
+
+ ulint found_corrupt_log;
+
+
+
+
+ log_group_t* archive_group;
+
+
+ mem_heap_t* heap;
+
+ hash_table_t* addr_hash;
+ ulint n_addrs;
+
+};
+
+extern recv_sys_t* recv_sys;
+extern ulint recv_recovery_on;
+extern ulint recv_no_ibuf_operations;
+extern ulint recv_needed_recovery;
+
+extern ulint recv_lsn_checks_on;
+
+
+
+extern ulint recv_max_parsed_page_no;
+# 369 "./include/log0recv.h"
+extern ulint recv_n_pool_free_frames;
+
+
+# 1 "./include/log0recv.ic" 1
+# 14 "./include/log0recv.ic"
+extern ulint recv_recovery_from_backup_on;
+
+
+
+static inline
+ulint
+recv_recovery_is_on(void)
+
+{
+ return(recv_recovery_on);
+}
+
+
+
+static inline
+ulint
+recv_recovery_from_backup_is_on(void)
+
+{
+ return(recv_recovery_from_backup_on);
+}
+# 373 "./include/log0recv.h" 2
+# 13 "./include/row0vers.ic" 2
+# 98 "./include/row0vers.h" 2
+# 19 "./include/lock0lock.ic" 2
+# 1 "./include/que0que.h" 1
+# 19 "./include/que0que.h"
+# 1 "./include/row0types.h" 1
+# 12 "./include/row0types.h"
+typedef struct plan_struct plan_t;
+
+typedef struct upd_struct upd_t;
+
+typedef struct upd_field_struct upd_field_t;
+
+typedef struct upd_node_struct upd_node_t;
+
+typedef struct del_node_struct del_node_t;
+
+typedef struct ins_node_struct ins_node_t;
+
+typedef struct sel_node_struct sel_node_t;
+
+typedef struct open_node_struct open_node_t;
+
+typedef struct fetch_node_struct fetch_node_t;
+
+typedef struct row_printf_node_struct row_printf_node_t;
+typedef struct sel_buf_struct sel_buf_t;
+
+typedef struct undo_node_struct undo_node_t;
+
+typedef struct purge_node_struct purge_node_t;
+# 20 "./include/que0que.h" 2
+# 1 "./include/pars0types.h" 1
+# 12 "./include/pars0types.h"
+typedef struct sym_node_struct sym_node_t;
+typedef struct sym_tab_struct sym_tab_t;
+typedef struct pars_res_word_struct pars_res_word_t;
+typedef struct func_node_struct func_node_t;
+typedef struct order_node_struct order_node_t;
+typedef struct proc_node_struct proc_node_t;
+typedef struct elsif_node_struct elsif_node_t;
+typedef struct if_node_struct if_node_t;
+typedef struct while_node_struct while_node_t;
+typedef struct for_node_struct for_node_t;
+typedef struct return_node_struct return_node_t;
+typedef struct assign_node_struct assign_node_t;
+typedef struct col_assign_node_struct col_assign_node_t;
+
+typedef struct { ulint count; sym_node_t * start; sym_node_t * end; } sym_node_list_t;
+# 21 "./include/que0que.h" 2
+
+
+
+extern ulint que_trace_on;
+
+
+
+
+void
+que_graph_publish(
+
+ que_t* graph,
+ sess_t* sess);
+
+
+
+que_fork_t*
+que_fork_create(
+
+
+ que_t* graph,
+
+
+ que_node_t* parent,
+ ulint fork_type,
+ mem_heap_t* heap);
+
+
+static inline
+que_thr_t*
+que_fork_get_first_thr(
+
+ que_fork_t* fork);
+
+
+static inline
+que_node_t*
+que_fork_get_child(
+
+ que_fork_t* fork);
+
+
+static inline
+void
+que_node_set_parent(
+
+ que_node_t* node,
+ que_node_t* parent);
+
+
+
+que_thr_t*
+que_thr_create(
+
+
+ que_fork_t* parent,
+ mem_heap_t* heap);
+
+
+
+
+
+ulint
+que_graph_try_free(
+
+
+ que_t* graph);
+
+
+
+
+void
+que_graph_free_recursive(
+
+ que_node_t* node);
+
+
+
+void
+que_graph_free(
+
+ que_t* graph);
+# 112 "./include/que0que.h"
+ulint
+que_thr_stop(
+
+
+ que_thr_t* thr);
+
+
+
+
+void
+que_thr_move_to_run_state_for_mysql(
+
+ que_thr_t* thr,
+ trx_t* trx);
+
+
+
+
+void
+que_thr_stop_for_mysql_no_error(
+
+ que_thr_t* thr,
+ trx_t* trx);
+
+
+
+
+
+
+void
+que_thr_stop_for_mysql(
+
+ que_thr_t* thr);
+
+
+
+
+
+void
+que_run_threads(
+
+ que_thr_t* thr);
+
+
+
+
+
+void
+que_fork_error_handle(
+
+ trx_t* trx,
+ que_t* fork);
+
+
+
+
+
+void
+que_thr_handle_error(
+
+ que_thr_t* thr,
+ ulint err_no,
+ unsigned char* err_str,
+
+
+ ulint err_len);
+
+
+
+
+
+
+void
+que_thr_end_wait(
+
+ que_thr_t* thr,
+
+
+
+ que_thr_t** next_thr);
+
+
+
+
+
+
+
+void
+que_thr_end_wait_no_next_thr(
+
+ que_thr_t* thr);
+# 212 "./include/que0que.h"
+que_thr_t*
+que_fork_start_command(
+
+
+
+
+
+ que_fork_t* fork);
+
+
+static inline
+trx_t*
+thr_get_trx(
+
+ que_thr_t* thr);
+
+
+static inline
+ulint
+que_node_get_type(
+
+ que_node_t* node);
+
+
+static inline
+dtype_t*
+que_node_get_data_type(
+
+ que_node_t* node);
+
+
+static inline
+dfield_t*
+que_node_get_val(
+
+ que_node_t* node);
+
+
+static inline
+ulint
+que_node_get_val_buf_size(
+
+
+
+ que_node_t* node);
+
+
+static inline
+void
+que_node_set_val_buf_size(
+
+ que_node_t* node,
+ ulint size);
+
+
+static inline
+que_node_t*
+que_node_get_next(
+
+ que_node_t* node);
+
+
+static inline
+que_node_t*
+que_node_get_parent(
+
+
+ que_node_t* node);
+
+
+static inline
+que_node_t*
+que_node_list_add_last(
+
+
+ que_node_t* node_list,
+ que_node_t* node);
+
+
+static inline
+ulint
+que_node_list_get_len(
+
+
+ que_node_t* node_list);
+
+
+
+static inline
+ulint
+que_thr_peek_stop(
+
+
+
+
+
+
+ que_thr_t* thr);
+
+
+static inline
+ulint
+que_graph_is_select(
+
+
+ que_t* graph);
+
+
+
+void
+que_node_print_info(
+
+ que_node_t* node);
+
+
+
+
+
+struct que_thr_struct{
+ que_common_t common;
+ ulint magic_n;
+
+ que_node_t* child;
+ que_t* graph;
+ ulint is_active;
+
+
+
+
+ ulint state;
+ struct { que_thr_t * prev; que_thr_t * next; }
+ thrs;
+
+ struct { que_thr_t * prev; que_thr_t * next; }
+ trx_thrs;
+
+ struct { que_thr_t * prev; que_thr_t * next; }
+ queue;
+
+
+
+
+
+ que_node_t* run_node;
+
+
+ que_node_t* prev_node;
+
+ ulint resource;
+
+ ulint lock_state;
+
+};
+
+
+
+
+
+struct que_fork_struct{
+ que_common_t common;
+ que_t* graph;
+ ulint fork_type;
+ ulint n_active_thrs;
+
+
+
+
+ trx_t* trx;
+
+ ulint state;
+ que_thr_t* caller;
+
+ struct { ulint count; que_thr_t * start; que_thr_t * end; }
+ thrs;
+
+
+ sym_tab_t* sym_tab;
+
+
+
+
+ ulint cur_end;
+
+ ulint cur_pos;
+
+
+
+
+ ulint cur_on_row;
+
+
+ dulint n_inserts;
+ dulint n_updates;
+ dulint n_deletes;
+ sel_node_t* last_sel_node;
+
+ struct { que_fork_t * prev; que_fork_t * next; }
+ graphs;
+
+
+ mem_heap_t* heap;
+
+
+};
+# 499 "./include/que0que.h"
+# 1 "./include/que0que.ic" 1
+# 9 "./include/que0que.ic"
+# 1 "./include/usr0sess.h" 1
+# 25 "./include/usr0sess.h"
+sess_t*
+sess_open(void);
+
+
+
+
+
+
+ulint
+sess_try_close(
+
+
+ sess_t* sess);
+
+
+struct sess_struct{
+ ulint state;
+ trx_t* trx;
+
+
+
+
+ struct { ulint count; que_t * start; que_t * end; }
+ graphs;
+
+};
+
+
+
+
+
+
+
+# 1 "./include/usr0sess.ic" 1
+# 59 "./include/usr0sess.h" 2
+# 10 "./include/que0que.ic" 2
+
+
+
+static inline
+trx_t*
+thr_get_trx(
+
+ que_thr_t* thr)
+{
+ ;
+
+ return(thr->graph->trx);
+}
+
+
+
+static inline
+que_thr_t*
+que_fork_get_first_thr(
+
+ que_fork_t* fork)
+{
+ return((fork->thrs).start);
+}
+
+
+
+static inline
+que_node_t*
+que_fork_get_child(
+
+ que_fork_t* fork)
+{
+ que_thr_t* thr;
+
+ thr = (fork->thrs).start;
+
+ return(thr->child);
+}
+
+
+
+static inline
+ulint
+que_node_get_type(
+
+ que_node_t* node)
+{
+ ;
+
+ return(((que_common_t*)node)->type);
+}
+
+
+
+static inline
+dfield_t*
+que_node_get_val(
+
+ que_node_t* node)
+{
+ ;
+
+ return(&(((que_common_t*)node)->val));
+}
+
+
+
+static inline
+ulint
+que_node_get_val_buf_size(
+
+
+
+ que_node_t* node)
+{
+ ;
+
+ return(((que_common_t*)node)->val_buf_size);
+}
+
+
+
+static inline
+void
+que_node_set_val_buf_size(
+
+ que_node_t* node,
+ ulint size)
+{
+ ;
+
+ ((que_common_t*)node)->val_buf_size = size;
+}
+
+
+
+static inline
+void
+que_node_set_parent(
+
+ que_node_t* node,
+ que_node_t* parent)
+{
+ ;
+
+ ((que_common_t*)node)->parent = parent;
+}
+
+
+
+static inline
+dtype_t*
+que_node_get_data_type(
+
+ que_node_t* node)
+{
+ ;
+
+ return(&(((que_common_t*)node)->val.type));
+}
+
+
+
+static inline
+que_node_t*
+que_node_list_add_last(
+
+
+ que_node_t* node_list,
+ que_node_t* node)
+{
+ que_common_t* cnode;
+ que_common_t* cnode2;
+
+ cnode = node;
+
+ cnode->brother = ((void *)0);
+
+ if (node_list == ((void *)0)) {
+
+ return(node);
+ }
+
+ cnode2 = node_list;
+
+ while (cnode2->brother != ((void *)0)) {
+ cnode2 = cnode2->brother;
+ }
+
+ cnode2->brother = node;
+
+ return(node_list);
+}
+
+
+
+static inline
+que_node_t*
+que_node_get_next(
+
+
+ que_node_t* node)
+{
+ return(((que_common_t*)node)->brother);
+}
+
+
+
+static inline
+ulint
+que_node_list_get_len(
+
+
+ que_node_t* node_list)
+{
+ que_common_t* cnode;
+ ulint len;
+
+ cnode = node_list;
+ len = 0;
+
+ while (cnode != ((void *)0)) {
+ len++;
+ cnode = cnode->brother;
+ }
+
+ return(len);
+}
+
+
+
+static inline
+que_node_t*
+que_node_get_parent(
+
+
+ que_node_t* node)
+{
+ return(((que_common_t*)node)->parent);
+}
+
+
+
+
+static inline
+ulint
+que_thr_peek_stop(
+
+
+
+
+
+
+ que_thr_t* thr)
+{
+ trx_t* trx;
+ que_t* graph;
+
+ graph = thr->graph;
+ trx = graph->trx;
+
+ if (graph->state != 1
+ || trx->que_state == 2
+ || ((trx->signals).count > 0
+ && trx->que_state == 1)) {
+ return((1));
+ }
+
+ return((0));
+}
+
+
+
+static inline
+ulint
+que_graph_is_select(
+
+
+ que_t* graph)
+{
+ if (graph->fork_type == 2
+ || graph->fork_type == 1) {
+
+ return((1));
+ }
+
+ return((0));
+}
+# 500 "./include/que0que.h" 2
+# 20 "./include/lock0lock.ic" 2
+# 1 "./include/btr0cur.h" 1
+# 19 "./include/btr0cur.h"
+# 1 "./include/ha0ha.h" 1
+# 19 "./include/ha0ha.h"
+static inline
+void*
+ha_search_and_get_data(
+
+
+
+
+ hash_table_t* table,
+ ulint fold);
+
+
+
+
+void
+ha_search_and_update_if_found(
+
+ hash_table_t* table,
+ ulint fold,
+ void* data,
+ void* new_data);
+
+
+
+
+hash_table_t*
+ha_create(
+
+
+ ulint in_btr_search,
+
+ ulint n,
+ ulint n_mutexes,
+
+ ulint mutex_level);
+
+
+
+
+
+
+ulint
+ha_insert_for_fold(
+
+
+
+ hash_table_t* table,
+ ulint fold,
+
+
+
+ void* data);
+
+
+
+static inline
+ulint
+ha_insert_for_fold_mutex(
+
+
+
+ hash_table_t* table,
+ ulint fold,
+
+
+
+ void* data);
+
+
+
+void
+ha_delete(
+
+ hash_table_t* table,
+ ulint fold,
+ void* data);
+
+
+
+
+static inline
+ulint
+ha_search_and_delete_if_found(
+
+
+ hash_table_t* table,
+ ulint fold,
+ void* data);
+
+
+
+
+void
+ha_remove_all_nodes_to_page(
+
+ hash_table_t* table,
+ ulint fold,
+ ib_page_t* page);
+
+
+
+ulint
+ha_validate(
+
+
+ hash_table_t* table,
+ ulint start_index,
+ ulint end_index);
+
+
+
+void
+ha_print_info(
+
+ FILE* file,
+ hash_table_t* table);
+
+
+
+typedef struct ha_node_struct ha_node_t;
+struct ha_node_struct {
+ ha_node_t* next;
+ void* data;
+ ulint fold;
+};
+
+
+# 1 "./include/ha0ha.ic" 1
+# 15 "./include/ha0ha.ic"
+void
+ha_delete_hash_node(
+
+ hash_table_t* table,
+ ha_node_t* del_node);
+
+
+
+static inline
+void*
+ha_node_get_data(
+
+
+ ha_node_t* node)
+{
+ return(node->data);
+}
+
+
+
+static inline
+void
+ha_node_set_data(
+
+ ha_node_t* node,
+ void* data)
+{
+ node->data = data;
+}
+
+
+
+static inline
+ha_node_t*
+ha_chain_get_next(
+
+
+ ha_node_t* node)
+{
+ return(node->next);
+}
+
+
+
+static inline
+ha_node_t*
+ha_chain_get_first(
+
+
+ hash_table_t* table,
+ ulint fold)
+{
+ return(hash_get_nth_cell(table, hash_calc_hash(fold, table))->node);
+}
+
+
+
+static inline
+ha_node_t*
+ha_search(
+
+
+
+
+ hash_table_t* table,
+ ulint fold)
+{
+ ha_node_t* node;
+
+
+
+
+
+ node = ha_chain_get_first(table, fold);
+
+ while (node) {
+ if (node->fold == fold) {
+
+ return(node);
+ }
+
+ node = ha_chain_get_next(node);
+ }
+
+ return(((void *)0));
+}
+
+
+
+static inline
+void*
+ha_search_and_get_data(
+
+
+
+
+ hash_table_t* table,
+ ulint fold)
+{
+ ha_node_t* node;
+
+
+
+
+
+ node = ha_chain_get_first(table, fold);
+
+ while (node) {
+ if (node->fold == fold) {
+
+ return(node->data);
+ }
+
+ node = ha_chain_get_next(node);
+ }
+
+ return(((void *)0));
+}
+
+
+
+static inline
+ha_node_t*
+ha_search_with_data(
+
+
+
+ hash_table_t* table,
+ ulint fold,
+ void* data)
+{
+ ha_node_t* node;
+
+
+
+
+
+ node = ha_chain_get_first(table, fold);
+
+ while (node) {
+ if (node->data == data) {
+
+ return(node);
+ }
+
+ node = ha_chain_get_next(node);
+ }
+
+ return(((void *)0));
+}
+
+
+
+
+static inline
+ulint
+ha_search_and_delete_if_found(
+
+
+ hash_table_t* table,
+ ulint fold,
+ void* data)
+{
+ ha_node_t* node;
+
+
+
+
+
+ node = ha_search_with_data(table, fold, data);
+
+ if (node) {
+ ha_delete_hash_node(table, node);
+
+ return((1));
+ }
+
+ return((0));
+}
+
+
+
+
+static inline
+ulint
+ha_insert_for_fold_mutex(
+
+
+
+ hash_table_t* table,
+ ulint fold,
+
+
+
+ void* data)
+{
+ ulint ret;
+
+ hash_mutex_enter(table, fold);
+
+ ret = ha_insert_for_fold(table, fold, data);
+
+ hash_mutex_exit(table, fold);
+
+ return(ret);
+}
+# 146 "./include/ha0ha.h" 2
+# 20 "./include/btr0cur.h" 2
+# 32 "./include/btr0cur.h"
+static inline
+page_cur_t*
+btr_cur_get_page_cur(
+
+
+ btr_cur_t* cursor);
+
+
+static inline
+rec_t*
+btr_cur_get_rec(
+
+
+ btr_cur_t* cursor);
+
+
+static inline
+void
+btr_cur_invalidate(
+
+ btr_cur_t* cursor);
+
+
+static inline
+ib_page_t*
+btr_cur_get_page(
+
+
+ btr_cur_t* cursor);
+
+
+static inline
+dict_tree_t*
+btr_cur_get_tree(
+
+
+ btr_cur_t* cursor);
+
+
+static inline
+void
+btr_cur_position(
+
+ dict_index_t* index,
+ rec_t* rec,
+ btr_cur_t* cursor);
+# 86 "./include/btr0cur.h"
+void
+btr_cur_search_to_nth_level(
+
+ dict_index_t* index,
+ ulint level,
+ dtuple_t* tuple,
+
+
+ ulint mode,
+
+
+
+
+
+
+ ulint latch_mode,
+# 111 "./include/btr0cur.h"
+ btr_cur_t* cursor,
+
+ ulint has_search_latch,
+
+
+ mtr_t* mtr);
+
+
+
+void
+btr_cur_open_at_index_side(
+
+ ulint from_left,
+
+ dict_index_t* index,
+ ulint latch_mode,
+ btr_cur_t* cursor,
+ mtr_t* mtr);
+
+
+
+void
+btr_cur_open_at_rnd_pos(
+
+ dict_index_t* index,
+ ulint latch_mode,
+ btr_cur_t* cursor,
+ mtr_t* mtr);
+
+
+
+
+
+
+
+ulint
+btr_cur_optimistic_insert(
+
+
+
+ ulint flags,
+
+
+ btr_cur_t* cursor,
+
+ dtuple_t* entry,
+ rec_t** rec,
+
+ big_rec_t** big_rec,
+
+
+ que_thr_t* thr,
+ mtr_t* mtr);
+
+
+
+
+
+
+ulint
+btr_cur_pessimistic_insert(
+
+
+ ulint flags,
+
+
+
+
+
+ btr_cur_t* cursor,
+
+ dtuple_t* entry,
+ rec_t** rec,
+
+ big_rec_t** big_rec,
+
+
+ que_thr_t* thr,
+ mtr_t* mtr);
+
+
+
+ulint
+btr_cur_update_in_place(
+
+
+ ulint flags,
+ btr_cur_t* cursor,
+
+
+ upd_t* update,
+ ulint cmpl_info,
+
+ que_thr_t* thr,
+ mtr_t* mtr);
+
+
+
+
+
+
+ulint
+btr_cur_optimistic_update(
+
+
+
+
+ ulint flags,
+ btr_cur_t* cursor,
+
+
+ upd_t* update,
+
+ ulint cmpl_info,
+
+ que_thr_t* thr,
+ mtr_t* mtr);
+
+
+
+
+
+
+ulint
+btr_cur_pessimistic_update(
+
+
+ ulint flags,
+
+ btr_cur_t* cursor,
+ big_rec_t** big_rec,
+
+ upd_t* update,
+
+
+ ulint cmpl_info,
+
+ que_thr_t* thr,
+ mtr_t* mtr);
+
+
+
+
+
+
+ulint
+btr_cur_del_mark_set_clust_rec(
+
+
+
+ ulint flags,
+ btr_cur_t* cursor,
+ ulint val,
+ que_thr_t* thr,
+ mtr_t* mtr);
+
+
+
+ulint
+btr_cur_del_mark_set_sec_rec(
+
+
+
+ ulint flags,
+ btr_cur_t* cursor,
+ ulint val,
+ que_thr_t* thr,
+ mtr_t* mtr);
+
+
+
+
+void
+btr_cur_del_unmark_for_ibuf(
+
+ rec_t* rec,
+ mtr_t* mtr);
+
+
+
+
+
+
+
+void
+btr_cur_compress(
+
+ btr_cur_t* cursor,
+
+ mtr_t* mtr);
+
+
+
+
+
+
+
+ulint
+btr_cur_compress_if_useful(
+
+
+ btr_cur_t* cursor,
+
+
+ mtr_t* mtr);
+
+
+
+
+
+ulint
+btr_cur_optimistic_delete(
+
+
+
+ btr_cur_t* cursor,
+
+
+
+ mtr_t* mtr);
+# 339 "./include/btr0cur.h"
+ulint
+btr_cur_pessimistic_delete(
+
+
+ ulint* err,
+
+
+
+
+ ulint has_reserved_extents,
+
+
+
+ btr_cur_t* cursor,
+
+
+
+ ulint in_rollback,
+ mtr_t* mtr);
+
+
+
+unsigned char*
+btr_cur_parse_update_in_place(
+
+
+ unsigned char* ptr,
+ unsigned char* end_ptr,
+ ib_page_t* page,
+ dict_index_t* index);
+
+
+
+
+unsigned char*
+btr_cur_parse_del_mark_set_clust_rec(
+
+
+ unsigned char* ptr,
+ unsigned char* end_ptr,
+ dict_index_t* index,
+ ib_page_t* page);
+
+
+
+
+unsigned char*
+btr_cur_parse_del_mark_set_sec_rec(
+
+
+ unsigned char* ptr,
+ unsigned char* end_ptr,
+ ib_page_t* page);
+
+
+
+ib_longlong
+btr_estimate_n_rows_in_range(
+
+
+ dict_index_t* index,
+ dtuple_t* tuple1,
+ ulint mode1,
+ dtuple_t* tuple2,
+ ulint mode2);
+
+
+
+
+
+void
+btr_estimate_number_of_different_key_vals(
+
+ dict_index_t* index);
+
+
+
+
+
+
+void
+btr_cur_mark_extern_inherited_fields(
+
+ rec_t* rec,
+ const ulint* offsets,
+ upd_t* update,
+ mtr_t* mtr);
+
+
+
+
+
+void
+btr_cur_mark_dtuple_inherited_extern(
+
+ dtuple_t* entry,
+
+ ulint* ext_vec,
+
+ ulint n_ext_vec,
+ upd_t* update);
+
+
+
+void
+btr_cur_unmark_dtuple_extern_fields(
+
+ dtuple_t* entry,
+ ulint* ext_vec,
+
+ ulint n_ext_vec);
+
+
+
+
+
+ulint
+btr_store_big_rec_extern_fields(
+
+
+ dict_index_t* index,
+
+ rec_t* rec,
+ const ulint* offsets,
+
+
+
+ big_rec_t* big_rec_vec,
+
+ mtr_t* local_mtr);
+
+
+
+
+
+
+
+void
+btr_free_externally_stored_field(
+
+ dict_index_t* index,
+
+
+
+
+
+
+
+ unsigned char* data,
+
+
+ ulint local_len,
+ ulint do_not_free_inherited,
+
+
+ mtr_t* local_mtr);
+
+
+
+
+
+void
+btr_rec_free_externally_stored_fields(
+
+ dict_index_t* index,
+
+ rec_t* rec,
+ const ulint* offsets,
+ ulint do_not_free_inherited,
+
+
+ mtr_t* mtr);
+
+
+
+
+
+unsigned char*
+btr_rec_copy_externally_stored_field(
+
+
+ rec_t* rec,
+ const ulint* offsets,
+ ulint no,
+ ulint* len,
+ mem_heap_t* heap);
+
+
+
+
+
+
+unsigned char*
+btr_copy_externally_stored_field(
+
+
+ ulint* len,
+ unsigned char* data,
+
+
+ ulint local_len,
+ mem_heap_t* heap);
+
+
+
+
+
+
+
+ulint
+btr_push_update_extern_fields(
+
+
+ ulint* ext_vect,
+
+ const ulint* offsets,
+ upd_t* update);
+# 568 "./include/btr0cur.h"
+typedef struct btr_path_struct btr_path_t;
+struct btr_path_struct{
+ ulint nth_rec;
+
+
+
+
+ ulint n_recs;
+};
+
+
+
+
+
+
+struct btr_cur_struct {
+ dict_index_t* index;
+ page_cur_t page_cur;
+ ib_page_t* left_page;
+
+
+
+ que_thr_t* thr;
+
+
+
+
+
+
+
+ ulint flag;
+
+
+ ulint tree_height;
+
+
+ ulint up_match;
+# 618 "./include/btr0cur.h"
+ ulint up_bytes;
+
+
+
+ ulint low_match;
+
+
+
+
+
+
+
+ ulint low_bytes;
+
+
+
+ ulint n_fields;
+
+ ulint n_bytes;
+
+ ulint fold;
+
+
+ btr_path_t* path_arr;
+
+
+
+};
+# 695 "./include/btr0cur.h"
+extern ulint btr_cur_n_non_sea;
+extern ulint btr_cur_n_sea;
+extern ulint btr_cur_n_non_sea_old;
+extern ulint btr_cur_n_sea_old;
+
+
+
+void innobase_mysql_thd_init_innodb_scan_cont();
+void innobase_mysql_thd_increment_innodb_scan_cont(ulong length);
+void innobase_mysql_thd_init_innodb_scan_jump();
+void innobase_mysql_thd_increment_innodb_scan_jump(ulong length);
+void innobase_mysql_thd_init_innodb_scan_data();
+void innobase_mysql_thd_increment_innodb_scan_data(ulong length);
+void innobase_mysql_thd_init_innodb_scan_garbage();
+void innobase_mysql_thd_increment_innodb_scan_garbage(ulong length);
+
+
+# 1 "./include/btr0cur.ic" 1
+# 9 "./include/btr0cur.ic"
+# 1 "./include/btr0btr.h" 1
+# 10 "./include/btr0cur.ic" 2
+
+
+
+static inline
+page_cur_t*
+btr_cur_get_page_cur(
+
+
+ btr_cur_t* cursor)
+{
+ return(&(cursor->page_cur));
+}
+
+
+
+static inline
+rec_t*
+btr_cur_get_rec(
+
+
+ btr_cur_t* cursor)
+{
+ return(page_cur_get_rec(&(cursor->page_cur)));
+}
+
+
+
+static inline
+void
+btr_cur_invalidate(
+
+ btr_cur_t* cursor)
+{
+ page_cur_invalidate(&(cursor->page_cur));
+}
+
+
+
+static inline
+ib_page_t*
+btr_cur_get_page(
+
+
+ btr_cur_t* cursor)
+{
+ return(buf_frame_align(page_cur_get_rec(&(cursor->page_cur))));
+}
+
+
+
+static inline
+dict_tree_t*
+btr_cur_get_tree(
+
+
+ btr_cur_t* cursor)
+{
+ return((cursor->index)->tree);
+}
+
+
+
+static inline
+void
+btr_cur_position(
+
+ dict_index_t* index,
+ rec_t* rec,
+ btr_cur_t* cursor)
+{
+ page_cur_position(rec, btr_cur_get_page_cur(cursor));
+
+ cursor->index = index;
+}
+
+
+
+
+static inline
+ulint
+btr_cur_compress_recommendation(
+
+
+ btr_cur_t* cursor,
+ mtr_t* mtr)
+{
+ ib_page_t* page;
+
+ ;
+
+
+
+ page = btr_cur_get_page(cursor);
+
+ if ((page_get_data_size(page) < ((2 * 8192) / 2))
+ || ((btr_page_get_next(page, mtr) == 0xFFFFFFFF)
+ && (btr_page_get_prev(page, mtr) == 0xFFFFFFFF))) {
+
+
+
+
+
+
+ if (dict_tree_get_page((cursor->index)->tree)
+ == buf_frame_get_page_no(page)) {
+
+
+
+ return((0));
+ }
+
+ return((1));
+ }
+
+ return((0));
+}
+
+
+
+
+static inline
+ulint
+btr_cur_can_delete_without_compress(
+
+
+
+ btr_cur_t* cursor,
+ ulint rec_size,
+ mtr_t* mtr)
+{
+ ib_page_t* page;
+
+ ;
+
+
+
+ page = btr_cur_get_page(cursor);
+
+ if ((page_get_data_size(page) - rec_size < ((2 * 8192) / 2))
+ || ((btr_page_get_next(page, mtr) == 0xFFFFFFFF)
+ && (btr_page_get_prev(page, mtr) == 0xFFFFFFFF))
+ || (page_get_n_recs(page) < 2)) {
+
+
+
+
+
+
+ if (dict_tree_get_page((cursor->index)->tree)
+ == buf_frame_get_page_no(page)) {
+
+
+
+ return((1));
+ }
+
+ return((0));
+ }
+
+ return((1));
+}
+# 713 "./include/btr0cur.h" 2
+# 21 "./include/lock0lock.ic" 2
+
+
+
+
+
+
+static inline
+ulint
+lock_rec_fold(
+
+
+ ulint space,
+ ulint page_no)
+{
+ return(ut_fold_ulint_pair(space, page_no));
+}
+
+
+
+
+static inline
+ulint
+lock_rec_hash(
+
+
+ ulint space,
+ ulint page_no)
+{
+ return(hash_calc_hash(lock_rec_fold(space, page_no),
+ lock_sys->rec_hash));
+}
+
+
+
+
+static inline
+trx_t*
+lock_clust_rec_some_has_impl(
+
+
+
+ rec_t* rec,
+ dict_index_t* index,
+ const ulint* offsets)
+{
+ dulint trx_id;
+
+
+
+
+ ;
+ ;
+
+ trx_id = row_get_rec_trx_id(rec, index, offsets);
+
+ if (trx_is_active(trx_id)) {
+
+
+ return(trx_get_on_id(trx_id));
+ }
+
+ return(((void *)0));
+}
+# 679 "./include/lock0lock.h" 2
+# 33 "buf/buf0buf.c" 2
+# 1 "./include/btr0sea.h" 1
+# 23 "./include/btr0sea.h"
+void
+btr_search_sys_create(
+
+ ulint hash_size);
+
+
+static inline
+btr_search_t*
+btr_search_get_info(
+
+
+ dict_index_t* index);
+
+
+
+btr_search_t*
+btr_search_info_create(
+
+
+ mem_heap_t* heap);
+
+
+
+ulint
+btr_search_info_get_ref_count(
+
+
+ btr_search_t* info);
+
+
+static inline
+void
+btr_search_info_update(
+
+ dict_index_t* index,
+ btr_cur_t* cursor);
+
+
+
+
+
+
+ulint
+btr_search_guess_on_hash(
+
+
+ dict_index_t* index,
+ btr_search_t* info,
+ dtuple_t* tuple,
+ ulint mode,
+ ulint latch_mode,
+ btr_cur_t* cursor,
+ ulint has_search_latch,
+
+
+ mtr_t* mtr);
+
+
+
+
+
+
+void
+btr_search_move_or_delete_hash_entries(
+
+ ib_page_t* new_page,
+
+ ib_page_t* page,
+ dict_index_t* index);
+
+
+
+void
+btr_search_drop_page_hash_index(
+
+ ib_page_t* page);
+
+
+
+
+void
+btr_search_drop_page_hash_when_freed(
+
+ ulint space,
+ ulint page_no);
+
+
+
+void
+btr_search_update_hash_node_on_insert(
+
+ btr_cur_t* cursor);
+
+
+
+
+
+
+void
+btr_search_update_hash_on_insert(
+
+ btr_cur_t* cursor);
+
+
+
+
+
+
+void
+btr_search_update_hash_on_delete(
+
+ btr_cur_t* cursor);
+
+
+
+
+
+ulint
+btr_search_validate(void);
+# 153 "./include/btr0sea.h"
+struct btr_search_struct{
+ ulint magic_n;
+ ulint ref_count;
+
+
+
+
+
+
+
+ rec_t* last_search;
+
+ ulint n_direction;
+
+ ulint direction;
+
+
+ dulint modify_clock;
+
+
+
+
+
+ ib_page_t* root_guess;
+
+ ulint hash_analysis;
+
+
+ ulint last_hash_succ;
+
+
+
+
+ ulint n_hash_potential;
+
+
+
+ ulint n_fields;
+
+ ulint n_bytes;
+
+ ulint side;
+
+
+
+
+
+ ulint n_hash_succ;
+
+ ulint n_hash_fail;
+ ulint n_patt_succ;
+
+ ulint n_searches;
+};
+
+
+
+
+
+typedef struct btr_search_sys_struct btr_search_sys_t;
+
+struct btr_search_sys_struct{
+ hash_table_t* hash_index;
+};
+
+extern btr_search_sys_t* btr_search_sys;
+# 232 "./include/btr0sea.h"
+extern rw_lock_t* btr_search_latch_temp;
+
+
+
+
+
+
+extern ulint btr_search_n_hash_fail;
+# 267 "./include/btr0sea.h"
+# 1 "./include/btr0sea.ic" 1
+# 16 "./include/btr0sea.ic"
+void
+btr_search_info_update_slow(
+
+ btr_search_t* info,
+ btr_cur_t* cursor);
+
+
+
+static inline
+btr_search_t*
+btr_search_get_info(
+
+
+ dict_index_t* index)
+{
+ ;
+
+ return(index->search_info);
+}
+
+
+
+static inline
+void
+btr_search_info_update(
+
+ dict_index_t* index,
+ btr_cur_t* cursor)
+{
+ btr_search_t* info;
+
+
+
+
+
+
+ info = btr_search_get_info(index);
+
+ info->hash_analysis++;
+
+ if (info->hash_analysis < 17) {
+
+
+
+ return;
+
+ }
+
+ ;
+
+ btr_search_info_update_slow(info, cursor);
+}
+# 268 "./include/btr0sea.h" 2
+# 34 "buf/buf0buf.c" 2
+# 1 "./include/ibuf0ibuf.h" 1
+# 21 "./include/ibuf0ibuf.h"
+extern ibuf_t* ibuf;
+
+
+
+
+
+
+
+ibuf_data_t*
+ibuf_data_init_for_space(
+
+
+
+ ulint space);
+
+
+
+
+void
+ibuf_init_at_db_start(void);
+
+
+
+
+
+void
+ibuf_update_max_tablespace_id(void);
+
+
+
+
+void
+ibuf_bitmap_page_init(
+
+ ib_page_t* page,
+ mtr_t* mtr);
+
+
+
+
+
+
+void
+ibuf_reset_free_bits_with_type(
+
+ ulint type,
+ ib_page_t* page);
+# 76 "./include/ibuf0ibuf.h"
+void
+ibuf_reset_free_bits(
+
+ dict_index_t* index,
+ ib_page_t* page);
+
+
+
+
+
+
+
+static inline
+void
+ibuf_update_free_bits_if_full(
+
+ dict_index_t* index,
+ ib_page_t* page,
+
+
+
+
+ ulint max_ins_size,
+
+
+ ulint increase);
+
+
+
+
+
+
+
+void
+ibuf_update_free_bits_low(
+
+ dict_index_t* index,
+ ib_page_t* page,
+ ulint max_ins_size,
+
+
+ mtr_t* mtr);
+
+
+
+
+
+void
+ibuf_update_free_bits_for_two_pages_low(
+
+ dict_index_t* index,
+ ib_page_t* page1,
+ ib_page_t* page2,
+ mtr_t* mtr);
+
+
+
+static inline
+ulint
+ibuf_should_try(
+
+ dict_index_t* index,
+ ulint ignore_sec_unique);
+
+
+
+
+
+
+
+ulint
+ibuf_inside(void);
+
+
+
+
+
+static inline
+ulint
+ibuf_bitmap_page(
+
+
+ ulint page_no);
+
+
+
+ulint
+ibuf_page(
+
+
+ ulint space,
+ ulint page_no);
+
+
+
+ulint
+ibuf_page_low(
+
+
+ ulint space,
+ ulint page_no,
+ mtr_t* mtr);
+
+
+
+
+
+
+
+void
+ibuf_free_excess_pages(
+
+ ulint space);
+
+
+
+
+
+ulint
+ibuf_insert(
+
+
+ dtuple_t* entry,
+ dict_index_t* index,
+ ulint space,
+ ulint page_no,
+ que_thr_t* thr);
+# 211 "./include/ibuf0ibuf.h"
+void
+ibuf_merge_or_delete_for_page(
+
+ ib_page_t* page,
+
+ ulint space,
+ ulint page_no,
+ ulint update_ibuf_bitmap);
+# 228 "./include/ibuf0ibuf.h"
+void
+ibuf_delete_for_discarded_space(
+
+ ulint space);
+
+
+
+ulint
+ibuf_contract(
+
+
+
+
+ ulint sync);
+
+
+
+
+
+ulint
+ibuf_contract_for_n_pages(
+
+
+
+
+ ulint sync,
+
+
+ ulint n_pages);
+
+
+
+
+
+unsigned char*
+ibuf_parse_bitmap_init(
+
+
+ unsigned char* ptr,
+ unsigned char* end_ptr,
+ ib_page_t* page,
+ mtr_t* mtr);
+
+
+
+ulint
+ibuf_count_get(
+
+
+
+ ulint space,
+ ulint page_no);
+
+
+
+ulint
+ibuf_is_empty(void);
+
+
+
+
+
+void
+ibuf_print(
+
+ FILE* file);
+# 304 "./include/ibuf0ibuf.h"
+# 1 "./include/ibuf0ibuf.ic" 1
+# 12 "./include/ibuf0ibuf.ic"
+extern ulint ibuf_flush_count;
+# 21 "./include/ibuf0ibuf.ic"
+struct ibuf_data_struct{
+ ulint space;
+ ulint seg_size;
+
+ ulint size;
+ ulint empty;
+
+
+
+ ulint free_list_len;
+
+ ulint height;
+ dict_index_t* index;
+ struct { ibuf_data_t * prev; ibuf_data_t * next; } data_list;
+
+ ulint n_inserts;
+
+ ulint n_merges;
+ ulint n_merged_recs;
+};
+
+
+
+
+
+struct ibuf_struct{
+ ulint size;
+
+ ulint max_size;
+
+ ulint meter;
+
+
+
+ struct { ulint count; ibuf_data_t * start; ibuf_data_t * end; } data_list;
+
+
+};
+
+
+
+
+
+
+
+void
+ibuf_set_free_bits(
+
+ ulint type,
+ ib_page_t* page,
+
+ ulint val,
+ ulint max_val);
+
+
+
+
+
+
+static inline
+ulint
+ibuf_should_try(
+
+ dict_index_t* index,
+ ulint ignore_sec_unique)
+
+
+
+{
+ if (!(index->type & 1)
+ && (ignore_sec_unique || !(index->type & 2))
+ && ibuf->meter > 50) {
+
+ ibuf_flush_count++;
+
+ if (ibuf_flush_count % 8 == 0) {
+
+ buf_LRU_try_free_flushed_blocks();
+ }
+
+ return((1));
+ }
+
+ return((0));
+}
+
+
+
+static inline
+ulint
+ibuf_bitmap_page(
+
+
+ ulint page_no)
+{
+ if (page_no % (2 * 8192) == 1) {
+
+ return((1));
+ }
+
+ return((0));
+}
+
+
+
+static inline
+ulint
+ibuf_index_page_calc_free_bits(
+
+
+ ulint max_ins_size)
+
+{
+ ulint n;
+
+ n = max_ins_size / ((2 * 8192) / 32);
+
+ if (n == 3) {
+ n = 2;
+ }
+
+ if (n > 3) {
+ n = 3;
+ }
+
+ return(n);
+}
+
+
+
+static inline
+ulint
+ibuf_index_page_calc_free_from_bits(
+
+
+
+ ulint bits)
+{
+ ;
+
+ if (bits == 3) {
+ return(4 * (2 * 8192) / 32);
+ }
+
+ return(bits * (2 * 8192) / 32);
+}
+
+
+
+static inline
+ulint
+ibuf_index_page_calc_free(
+
+
+ ib_page_t* page)
+{
+ return(ibuf_index_page_calc_free_bits(
+ page_get_max_insert_size_after_reorganize(page, 1)));
+}
+
+
+
+
+
+
+static inline
+void
+ibuf_update_free_bits_if_full(
+
+ dict_index_t* index,
+ ib_page_t* page,
+
+
+
+
+ ulint max_ins_size,
+
+
+ ulint increase)
+
+
+{
+ ulint before;
+ ulint after;
+
+ before = ibuf_index_page_calc_free_bits(max_ins_size);
+
+ if (max_ins_size >= increase) {
+ ;
+
+ after = ibuf_index_page_calc_free_bits(max_ins_size
+ - increase);
+
+
+
+ } else {
+ after = ibuf_index_page_calc_free(page);
+ }
+
+ if (after == 0) {
+
+
+
+
+
+ buf_page_make_young(page);
+ }
+
+ if (before > after) {
+ ibuf_set_free_bits(index->type, page, after, before);
+ }
+}
+# 305 "./include/ibuf0ibuf.h" 2
+# 35 "buf/buf0buf.c" 2
+# 1 "./include/dict0dict.h" 1
+# 36 "buf/buf0buf.c" 2
+# 1 "./include/log0recv.h" 1
+# 37 "buf/buf0buf.c" 2
+# 1 "./include/log0log.h" 1
+# 38 "buf/buf0buf.c" 2
+# 1 "./include/trx0undo.h" 1
+# 39 "buf/buf0buf.c" 2
+# 1 "./include/srv0srv.h" 1
+# 40 "buf/buf0buf.c" 2
+# 1 "./include/trx0trx.h" 1
+# 41 "buf/buf0buf.c" 2
+
+
+trx_t* innobase_get_trx();
+# 229 "buf/buf0buf.c"
+static const int WAIT_FOR_READ = 20000;
+
+buf_pool_t* buf_pool = ((void *)0);
+# 246 "buf/buf0buf.c"
+ulint
+buf_calc_page_new_checksum(
+
+
+ unsigned char* page)
+{
+ ulint checksum;
+# 262 "buf/buf0buf.c"
+ checksum = ut_fold_binary(page + 4,
+ 26 - 4)
+ + ut_fold_binary(page + 38,
+ (2 * 8192) - 38
+ - 8);
+ checksum = checksum & 0xFFFFFFFFUL;
+
+ return(checksum);
+}
+# 280 "buf/buf0buf.c"
+ulint
+buf_calc_page_old_checksum(
+
+
+ unsigned char* page)
+{
+ ulint checksum;
+
+ checksum = ut_fold_binary(page, 26);
+
+ checksum = checksum & 0xFFFFFFFFUL;
+
+ return(checksum);
+}
+
+
+
+
+ulint
+buf_page_is_corrupted(
+
+
+ unsigned char* read_buf)
+{
+ ulint checksum;
+ ulint old_checksum;
+ ulint checksum_field;
+ ulint old_checksum_field;
+
+ dulint current_lsn;
+
+ if (mach_read_from_4(read_buf + 16 + 4)
+ != mach_read_from_4(read_buf + (2 * 8192)
+ - 8 + 4)) {
+
+
+
+
+ return((1));
+ }
+
+
+ if (recv_lsn_checks_on && log_peek_lsn(¤t_lsn)) {
+ if (ut_dulint_cmp(current_lsn,
+ mach_read_from_8(read_buf + 16))
+ < 0) {
+ ut_print_timestamp(stderr);
+
+ fprintf(stderr,
+" InnoDB: Error: page %lu log sequence number %lu %lu\n"
+"InnoDB: is in the future! Current system log sequence number %lu %lu.\n"
+"InnoDB: Your database may be corrupt or you may have copied the InnoDB\n"
+"InnoDB: tablespace but not the InnoDB log files. See\n"
+"InnoDB: http://dev.mysql.com/doc/refman/5.0/en/forcing-recovery.html\n"
+"InnoDB: for more information.\n",
+ (ulong) mach_read_from_4(read_buf + 4),
+ (ulong) ut_dulint_get_high(
+ mach_read_from_8(read_buf + 16)),
+ (ulong) ut_dulint_get_low(
+ mach_read_from_8(read_buf + 16)),
+ (ulong) ut_dulint_get_high(current_lsn),
+ (ulong) ut_dulint_get_low(current_lsn));
+ }
+ }
+
+
+
+
+
+
+
+ if (srv_use_checksums) {
+ old_checksum = buf_calc_page_old_checksum(read_buf);
+
+ old_checksum_field = mach_read_from_4(read_buf + (2 * 8192)
+ - 8);
+
+
+
+
+
+
+ if (old_checksum_field != mach_read_from_4(read_buf + 16)
+ && old_checksum_field != old_checksum
+ && old_checksum_field != 0xDEADBEEFUL) {
+
+ return((1));
+ }
+
+ checksum = buf_calc_page_new_checksum(read_buf);
+ checksum_field = mach_read_from_4(read_buf + 0);
+
+
+
+
+ if (checksum_field != 0 && checksum_field != checksum
+ && checksum_field != 0xDEADBEEFUL) {
+
+ return((1));
+ }
+ }
+
+ return((0));
+}
+
+
+
+
+void
+buf_page_print(
+
+ unsigned char* read_buf)
+{
+ dict_index_t* index;
+ ulint checksum;
+ ulint old_checksum;
+
+ ut_print_timestamp(stderr);
+ fprintf(stderr, " InnoDB: Page dump in ascii and hex (%lu bytes):\n",
+ (ulint)(2 * 8192));
+ ut_print_buf(stderr, read_buf, (2 * 8192));
+ fputs("InnoDB: End of page dump\n", stderr);
+
+ checksum = srv_use_checksums ?
+ buf_calc_page_new_checksum(read_buf) : 0xDEADBEEFUL;
+ old_checksum = srv_use_checksums ?
+ buf_calc_page_old_checksum(read_buf) : 0xDEADBEEFUL;
+
+ ut_print_timestamp(stderr);
+ fprintf(stderr,
+" InnoDB: Page checksum %lu, prior-to-4.0.14-form checksum %lu\n"
+"InnoDB: stored checksum %lu, prior-to-4.0.14-form stored checksum %lu\n",
+ (ulong) checksum, (ulong) old_checksum,
+ (ulong) mach_read_from_4(read_buf + 0),
+ (ulong) mach_read_from_4(read_buf + (2 * 8192)
+ - 8));
+ fprintf(stderr,
+"InnoDB: Page lsn %lu %lu, low 4 bytes of lsn at page end %lu\n"
+"InnoDB: Page number (if stored to page already) %lu,\n"
+"InnoDB: space id (if created with >= MySQL-4.1.1 and stored already) %lu\n",
+ (ulong) mach_read_from_4(read_buf + 16),
+ (ulong) mach_read_from_4(read_buf + 16 + 4),
+ (ulong) mach_read_from_4(read_buf + (2 * 8192)
+ - 8 + 4),
+ (ulong) mach_read_from_4(read_buf + 4),
+ (ulong) mach_read_from_4(read_buf + 34));
+
+ if (mach_read_from_2(read_buf + 38 + 0)
+ == 1) {
+ fprintf(stderr,
+ "InnoDB: Page may be an insert undo log page\n");
+ } else if (mach_read_from_2(read_buf + 38
+ + 0)
+ == 2) {
+ fprintf(stderr,
+ "InnoDB: Page may be an update undo log page\n");
+ }
+
+ if (fil_page_get_type(read_buf) == 17855) {
+ fprintf(stderr,
+"InnoDB: Page may be an index page where index id is %lu %lu\n",
+ (ulong) ut_dulint_get_high(btr_page_get_index_id(read_buf)),
+ (ulong) ut_dulint_get_low(btr_page_get_index_id(read_buf)));
+
+
+
+
+ if (dict_sys != ((void *)0)) {
+
+ index = dict_index_find_on_id_low(
+ btr_page_get_index_id(read_buf));
+ if (index) {
+ fputs("InnoDB: (", stderr);
+ dict_index_name_print(stderr, ((void *)0), index);
+ fputs(")\n", stderr);
+ }
+ }
+ } else if (fil_page_get_type(read_buf) == 3) {
+ fputs("InnoDB: Page may be an 'inode' page\n", stderr);
+ } else if (fil_page_get_type(read_buf) == 4) {
+ fputs("InnoDB: Page may be an insert buffer free list page\n",
+ stderr);
+ }
+}
+
+
+
+static
+void
+buf_block_init(
+
+ buf_block_t* block,
+ unsigned char* frame)
+
+{
+ block->magic_n = 0;
+
+ block->state = 211;
+
+ block->frame = frame;
+
+ block->awe_info = ((void *)0);
+
+ block->buf_fix_count = 0;
+ block->io_fix = 0;
+
+ block->modify_clock = ut_dulint_zero;
+
+ block->file_page_was_freed = (0);
+
+ block->check_index_page_at_flush = (0);
+ block->index = ((void *)0);
+
+ block->in_free_list = (0);
+ block->in_LRU_list = (0);
+
+ block->n_pointers = 0;
+
+ mutex_create_func((&block->mutex), "buf/buf0buf.c", 498);
+ mutex_set_level(&block->mutex, 149);
+
+ rw_lock_create_func((&(block->lock)), "buf/buf0buf.c", 501);
+ ;
+
+
+
+
+
+}
+
+
+
+
+buf_pool_t*
+buf_pool_init(
+
+
+
+ ulint max_size,
+
+ ulint curr_size,
+
+
+ ulint n_frames)
+
+
+
+
+{
+ unsigned char* frame;
+ ulint i;
+ buf_block_t* block;
+
+ do { if (__builtin_expect(!((ulint)(max_size == curr_size)), (0))) { ut_dbg_assertion_failed("max_size == curr_size", "buf/buf0buf.c", (ulint) 533); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("buf/buf0buf.c", (ulint) 533); } while (0); } while (0);
+ do { if (__builtin_expect(!((ulint)(srv_use_awe || n_frames == max_size)), (0))) { ut_dbg_assertion_failed("srv_use_awe || n_frames == max_size", "buf/buf0buf.c", (ulint) 534); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("buf/buf0buf.c", (ulint) 534); } while (0); } while (0);
+
+ if (n_frames > curr_size) {
+ fprintf(stderr,
+"InnoDB: AWE: Error: you must specify in my.cnf .._awe_mem_mb larger\n"
+"InnoDB: than .._buffer_pool_size. Now the former is %lu pages,\n"
+"InnoDB: the latter %lu pages.\n", (ulong) curr_size, (ulong) n_frames);
+
+ return(((void *)0));
+ }
+
+ buf_pool = mem_alloc_func((sizeof(buf_pool_t)), "buf/buf0buf.c", 545);
+
+
+
+ mutex_create_func((&(buf_pool->mutex)), "buf/buf0buf.c", 549);
+ mutex_set_level(&(buf_pool->mutex), 150);
+
+ mutex_create_func((&(buf_pool->flush_list_mutex)), "buf/buf0buf.c", 552);
+ mutex_create_func((&(buf_pool->LRU_mutex)), "buf/buf0buf.c", 553);
+ mutex_create_func((&(buf_pool->free_mutex)), "buf/buf0buf.c", 554);
+ rw_lock_create_func((&(buf_pool->hash_latch)), "buf/buf0buf.c", 555);
+ mutex_set_level(&(buf_pool->flush_list_mutex), 3000);
+ mutex_set_level(&(buf_pool->LRU_mutex), 3000);
+ mutex_set_level(&(buf_pool->free_mutex), 3000);
+ rw_lock_set_level(&(buf_pool->hash_latch), 3000);
+
+ mutex_enter_func((&(buf_pool->LRU_mutex)), "buf/buf0buf.c", 561);
+ mutex_enter_func((&(buf_pool->flush_list_mutex)), "buf/buf0buf.c", 562);
+ mutex_enter_func((&(buf_pool->free_mutex)), "buf/buf0buf.c", 563);
+ rw_lock_x_lock_func( (&(buf_pool->hash_latch)), 0, "buf/buf0buf.c", 564);
+ mutex_enter_func((&(buf_pool->mutex)), "buf/buf0buf.c", 565);
+
+ if (srv_use_awe) {
+
+
+
+
+ buf_pool->frame_mem = os_awe_allocate_virtual_mem_window(
+ (2 * 8192) * (n_frames + 1));
+
+
+
+
+ if ((curr_size % ((1024 * 1024) / (2 * 8192))) != 0) {
+
+ fprintf(stderr,
+"InnoDB: AWE: Error: physical memory must be allocated in full megabytes.\n"
+"InnoDB: Trying to allocate %lu database pages.\n",
+ (ulong) curr_size);
+
+ return(((void *)0));
+ }
+
+ if (!os_awe_allocate_physical_mem(&(buf_pool->awe_info),
+ curr_size / ((1024 * 1024) / (2 * 8192)))) {
+
+ return(((void *)0));
+ }
+
+ } else {
+ buf_pool->frame_mem = os_mem_alloc_large(
+ (2 * 8192) * (n_frames + 1),
+ (1), (0));
+ }
+
+ if (buf_pool->frame_mem == ((void *)0)) {
+
+ return(((void *)0));
+ }
+
+ buf_pool->blocks = ut_malloc(sizeof(buf_block_t) * max_size);
+
+ if (buf_pool->blocks == ((void *)0)) {
+
+ return(((void *)0));
+ }
+
+ buf_pool->max_size = max_size;
+ buf_pool->curr_size = curr_size;
+
+ buf_pool->n_frames = n_frames;
+
+
+
+ frame = ut_align(buf_pool->frame_mem, (2 * 8192));
+
+ buf_pool->frame_zero = frame;
+ buf_pool->high_end = frame + (2 * 8192) * n_frames;
+
+ if (srv_use_awe) {
+
+
+
+
+ os_awe_map_physical_mem_to_window(buf_pool->frame_zero,
+ n_frames *
+ ((2 * 8192) / 4096),
+ buf_pool->awe_info);
+
+ }
+
+ buf_pool->blocks_of_frames = ut_malloc(sizeof(void*) * n_frames);
+
+ if (buf_pool->blocks_of_frames == ((void *)0)) {
+
+ return(((void *)0));
+ }
+
+
+
+
+
+
+ for (i = 0; i < max_size; i++) {
+
+ block = buf_pool_get_nth_block(buf_pool, i);
+
+ if (i < n_frames) {
+ frame = buf_pool->frame_zero + i * (2 * 8192);
+ *(buf_pool->blocks_of_frames + i) = block;
+ } else {
+ frame = ((void *)0);
+ }
+
+ buf_block_init(block, frame);
+
+ if (srv_use_awe) {
+
+ block->awe_info = buf_pool->awe_info
+ + i * ((2 * 8192) / 4096);
+
+ }
+ }
+
+ buf_pool->page_hash = hash0_create(2 * max_size);
+ buf_pool->io_counter_hash = ((void *)0);
+ buf_pool->io_counter_heap = ((void *)0);
+ buf_pool->io_counters = 0;
+
+ buf_pool->n_pend_reads = 0;
+
+ buf_pool->last_printout_time = time(((void *)0));
+
+ buf_pool->n_pages_read = 0;
+ buf_pool->n_pages_written = 0;
+ buf_pool->n_pages_created = 0;
+ buf_pool->n_pages_awe_remapped = 0;
+
+ buf_pool->n_page_gets = 0;
+ buf_pool->n_page_gets_old = 0;
+ buf_pool->n_pages_read_old = 0;
+ buf_pool->n_pages_written_old = 0;
+ buf_pool->n_pages_created_old = 0;
+ buf_pool->n_pages_awe_remapped_old = 0;
+
+
+
+ { (buf_pool->flush_list).count = 0; (buf_pool->flush_list).start = ((void *)0); (buf_pool->flush_list).end = ((void *)0);};
+
+ for (i = 1; i <= 3; i++) {
+ buf_pool->n_flush[i] = 0;
+ buf_pool->init_flush[i] = (0);
+ buf_pool->no_flush[i] = os_event_create(((void *)0));
+ }
+
+ buf_pool->LRU_flush_ended = 0;
+
+ buf_pool->ulint_clock = 1;
+ buf_pool->freed_page_clock = 0;
+
+
+
+ { (buf_pool->LRU).count = 0; (buf_pool->LRU).start = ((void *)0); (buf_pool->LRU).end = ((void *)0);};
+
+ buf_pool->LRU_old = ((void *)0);
+
+ { (buf_pool->awe_LRU_free_mapped).count = 0; (buf_pool->awe_LRU_free_mapped).start = ((void *)0); (buf_pool->awe_LRU_free_mapped).end = ((void *)0);};
+
+
+ { (buf_pool->free).count = 0; (buf_pool->free).start = ((void *)0); (buf_pool->free).end = ((void *)0);};
+
+ for (i = 0; i < curr_size; i++) {
+
+ block = buf_pool_get_nth_block(buf_pool, i);
+
+ if (block->frame) {
+
+
+
+
+
+
+ if (srv_use_awe) {
+
+
+
+ { ; ((buf_pool->awe_LRU_free_mapped).count)++; ((block)->awe_LRU_free_mapped).prev = (buf_pool->awe_LRU_free_mapped).end; ((block)->awe_LRU_free_mapped).next = ((void *)0); if ((buf_pool->awe_LRU_free_mapped).end != ((void *)0)) { (((buf_pool->awe_LRU_free_mapped).end)->awe_LRU_free_mapped).next = (block); } (buf_pool->awe_LRU_free_mapped).end = (block); if ((buf_pool->awe_LRU_free_mapped).start == ((void *)0)) { (buf_pool->awe_LRU_free_mapped).start = (block); }};
+
+ }
+ }
+
+ { ; ((buf_pool->free).count)++; ((block)->free).prev = (buf_pool->free).end; ((block)->free).next = ((void *)0); if ((buf_pool->free).end != ((void *)0)) { (((buf_pool->free).end)->free).next = (block); } (buf_pool->free).end = (block); if ((buf_pool->free).start == ((void *)0)) { (buf_pool->free).start = (block); }};
+ block->in_free_list = (1);
+ }
+
+ mutex_exit(&(buf_pool->LRU_mutex));
+ mutex_exit(&(buf_pool->flush_list_mutex));
+ mutex_exit(&(buf_pool->free_mutex));
+ rw_lock_x_unlock_func(&(buf_pool->hash_latch));
+ mutex_exit(&(buf_pool->mutex));
+
+ if (srv_use_adaptive_hash_indexes) {
+ btr_search_sys_create(
+ curr_size * (2 * 8192) / sizeof(void*) / 64);
+ } else {
+
+ btr_search_sys_create(1000);
+ }
+
+ return(buf_pool);
+}
+
+
+
+
+
+void
+buf_awe_map_page_to_frame(
+
+ buf_block_t* block,
+
+ ulint add_to_mapped_list)
+
+
+
+{
+ buf_block_t* bck;
+
+
+
+
+ ;
+
+ if (block->frame) {
+
+ return;
+ }
+
+
+
+
+ bck = (buf_pool->awe_LRU_free_mapped).end;
+
+ while (bck) {
+ ulint skip;
+
+ mutex_enter_func((&bck->mutex), "buf/buf0buf.c", 791);
+
+ skip = (bck->state == 213
+ && (bck->buf_fix_count != 0 || bck->io_fix != 0));
+
+ if (skip) {
+ mutex_exit(&bck->mutex);
+
+
+ bck = (((bck)->awe_LRU_free_mapped).prev);
+ } else {
+
+
+ os_awe_map_physical_mem_to_window(
+ bck->frame,
+ (2 * 8192) / 4096,
+ block->awe_info);
+
+ block->frame = bck->frame;
+
+ *(buf_pool->blocks_of_frames
+ + (((ulint)(block->frame
+ - buf_pool->frame_zero))
+ >> 14))
+ = block;
+
+ bck->frame = ((void *)0);
+ { ; do { if (__builtin_expect(!((ulint)((buf_pool->awe_LRU_free_mapped).count > 0)), (0))) { ut_dbg_assertion_failed("(buf_pool->awe_LRU_free_mapped).count > 0", "buf/buf0buf.c", (ulint) 820); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("buf/buf0buf.c", (ulint) 820); } while (0); } while (0); ((buf_pool->awe_LRU_free_mapped).count)--; if (((bck)->awe_LRU_free_mapped).next != ((void *)0)) { ((((bck)->awe_LRU_free_mapped).next)->awe_LRU_free_mapped).prev = ((bck)->awe_LRU_free_mapped).prev; } else { (buf_pool->awe_LRU_free_mapped).end = ((bck)->awe_LRU_free_mapped).prev; } if (((bck)->awe_LRU_free_mapped).prev != ((void *)0)) { ((((bck)->awe_LRU_free_mapped).prev)->awe_LRU_free_mapped).next = ((bck)->awe_LRU_free_mapped).next; } else { (buf_pool->awe_LRU_free_mapped).start = ((bck)->awe_LRU_free_mapped).next; }};
+
+
+
+ if (add_to_mapped_list) {
+ { ; ((buf_pool->awe_LRU_free_mapped).count)++; ((block)->awe_LRU_free_mapped).next = (buf_pool->awe_LRU_free_mapped).start; ((block)->awe_LRU_free_mapped).prev = ((void *)0); if ((buf_pool->awe_LRU_free_mapped).start != ((void *)0)) { (((buf_pool->awe_LRU_free_mapped).start)->awe_LRU_free_mapped).prev = (block); } (buf_pool->awe_LRU_free_mapped).start = (block); if ((buf_pool->awe_LRU_free_mapped).end == ((void *)0)) { (buf_pool->awe_LRU_free_mapped).end = (block); }};
+
+
+ }
+
+ buf_pool->n_pages_awe_remapped++;
+
+ mutex_exit(&bck->mutex);
+
+ return;
+ }
+ }
+
+ fprintf(stderr,
+"InnoDB: AWE: Fatal error: cannot find a page to unmap\n"
+"InnoDB: awe_LRU_free_mapped list length %lu\n",
+ (ulong) (buf_pool->awe_LRU_free_mapped).count);
+
+ do { if (__builtin_expect(!((ulint)(0)), (0))) { ut_dbg_assertion_failed("0", "buf/buf0buf.c", (ulint) 841); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("buf/buf0buf.c", (ulint) 841); } while (0); } while (0);
+}
+
+
+
+static inline
+buf_block_t*
+buf_block_alloc(void)
+
+
+
+
+{
+ buf_block_t* block;
+
+ block = buf_LRU_get_free_block();
+
+ return(block);
+}
+
+
+
+
+static inline
+void
+buf_block_make_young(
+
+ buf_block_t* block)
+{
+
+
+
+
+
+
+
+ if (buf_pool->freed_page_clock >= block->freed_page_clock
+ + 1 + (buf_pool->curr_size / 4)) {
+
+ mutex_enter_func((&(buf_pool->LRU_mutex)), "buf/buf0buf.c", 880);
+
+
+
+ buf_LRU_make_block_young(block);
+ mutex_exit(&(buf_pool->LRU_mutex));
+ }
+}
+
+
+
+
+
+
+void
+buf_page_make_young(
+
+ buf_frame_t* frame)
+{
+ buf_block_t* block;
+
+ mutex_enter_func((&(buf_pool->LRU_mutex)), "buf/buf0buf.c", 901);
+
+ block = buf_block_align(frame);
+
+ do { if (__builtin_expect(!((ulint)(block->state == 213)), (0))) { ut_dbg_assertion_failed("block->state == BUF_BLOCK_FILE_PAGE", "buf/buf0buf.c", (ulint) 905); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("buf/buf0buf.c", (ulint) 905); } while (0); } while (0);
+
+ buf_LRU_make_block_young(block);
+
+ mutex_exit(&(buf_pool->LRU_mutex));
+}
+
+
+
+static inline
+void
+buf_block_free(
+
+ buf_block_t* block)
+{
+ mutex_enter_func((&(buf_pool->free_mutex)), "buf/buf0buf.c", 920);
+
+ mutex_enter_func((&block->mutex), "buf/buf0buf.c", 922);
+
+ do { if (__builtin_expect(!((ulint)(block->state != 213)), (0))) { ut_dbg_assertion_failed("block->state != BUF_BLOCK_FILE_PAGE", "buf/buf0buf.c", (ulint) 924); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("buf/buf0buf.c", (ulint) 924); } while (0); } while (0);
+
+ buf_LRU_block_free_non_file_page(block);
+
+ mutex_exit(&block->mutex);
+
+ mutex_exit(&(buf_pool->free_mutex));
+}
+
+
+
+
+buf_frame_t*
+buf_frame_alloc(void)
+
+
+{
+ return(buf_block_alloc()->frame);
+}
+
+
+
+
+void
+buf_frame_free(
+
+ buf_frame_t* frame)
+{
+ buf_block_free(buf_block_align(frame));
+}
+
+
+
+
+
+
+buf_block_t*
+buf_page_peek_block(
+
+
+
+
+ ulint space,
+ ulint offset)
+{
+ buf_block_t* block;
+
+ rw_lock_s_lock_func( (&(buf_pool->hash_latch)), 0, "buf/buf0buf.c", 971);
+
+ block = buf_page_hash_get(space, offset);
+
+ rw_lock_s_unlock_func(&(buf_pool->hash_latch));
+
+ return(block);
+}
+
+
+
+
+
+void
+buf_reset_check_index_page_at_flush(
+
+ ulint space,
+ ulint offset)
+{
+ buf_block_t* block;
+
+ rw_lock_s_lock_func( (&(buf_pool->hash_latch)), 0, "buf/buf0buf.c", 992);
+
+ block = buf_page_hash_get(space, offset);
+
+ if (block) {
+ block->check_index_page_at_flush = (0);
+ }
+
+ rw_lock_s_unlock_func(&(buf_pool->hash_latch));
+}
+
+
+
+
+
+
+ulint
+buf_page_peek_if_search_hashed(
+
+
+
+ ulint space,
+ ulint offset)
+{
+ buf_block_t* block;
+ ulint is_hashed;
+
+ rw_lock_s_lock_func( (&(buf_pool->hash_latch)), 0, "buf/buf0buf.c", 1019);
+
+ block = buf_page_hash_get(space, offset);
+
+ if (!block) {
+ is_hashed = (0);
+ } else {
+ is_hashed = block->is_hashed;
+ }
+
+ rw_lock_s_unlock_func(&(buf_pool->hash_latch));
+
+ return(is_hashed);
+}
+
+
+
+
+
+ulint
+buf_page_peek(
+
+
+
+
+ ulint space,
+ ulint offset)
+{
+ if (buf_page_peek_block(space, offset)) {
+
+ return((1));
+ }
+
+ return((0));
+}
+
+
+
+
+
+
+
+buf_block_t*
+buf_page_set_file_page_was_freed(
+
+
+
+ ulint space,
+ ulint offset)
+{
+ buf_block_t* block;
+
+ rw_lock_s_lock_func( (&(buf_pool->hash_latch)), 0, "buf/buf0buf.c", 1071);
+
+ block = buf_page_hash_get(space, offset);
+
+ if (block) {
+ block->file_page_was_freed = (1);
+ }
+
+ rw_lock_s_unlock_func(&(buf_pool->hash_latch));
+
+ return(block);
+}
+
+
+
+
+
+
+
+buf_block_t*
+buf_page_reset_file_page_was_freed(
+
+
+
+ ulint space,
+ ulint offset)
+{
+ buf_block_t* block;
+
+ rw_lock_s_lock_func( (&(buf_pool->hash_latch)), 0, "buf/buf0buf.c", 1100);
+
+ block = buf_page_hash_get(space, offset);
+
+ if (block) {
+ block->file_page_was_freed = (0);
+ }
+
+ rw_lock_s_unlock_func(&(buf_pool->hash_latch));
+
+ return(block);
+}
+
+inline void _increment_page_get_statistics(buf_block_t* block, trx_t* trx)
+{
+ ulint block_hash;
+ ulint block_hash_byte;
+ unsigned char block_hash_offset;
+
+ ;
+
+ if (!srv_slow_log || !trx || !trx->take_stats)
+ return;
+
+ if (!trx->distinct_page_access_hash) {
+ trx->distinct_page_access_hash = mem_alloc_func((8192), "buf/buf0buf.c", 1125);
+ memset(trx->distinct_page_access_hash, 0, 8192);
+ }
+
+ block_hash = ut_hash_ulint((block->space << 20) + block->space +
+ block->offset, 8192 << 3);
+ block_hash_byte = block_hash >> 3;
+ block_hash_offset = (unsigned char) block_hash & 0x07;
+ if (block_hash_byte < 0 || block_hash_byte >= 8192)
+ fprintf(stderr, "!!! block_hash_byte = %lu block_hash_offset = %lu !!!\n", block_hash_byte, block_hash_offset);
+ if (block_hash_offset < 0 || block_hash_offset > 7)
+ fprintf(stderr, "!!! block_hash_byte = %lu block_hash_offset = %lu !!!\n", block_hash_byte, block_hash_offset);
+ if ((trx->distinct_page_access_hash[block_hash_byte] & ((unsigned char) 0x01 << block_hash_offset)) == 0)
+ trx->distinct_page_access++;
+ trx->distinct_page_access_hash[block_hash_byte] |= (unsigned char) 0x01 << block_hash_offset;
+ return;
+}
+
+
+
+
+buf_frame_t*
+buf_page_get_gen(
+
+
+ ulint space,
+ ulint offset,
+ ulint rw_latch,
+ buf_frame_t* guess,
+ ulint mode,
+
+ const char* file,
+ ulint line,
+ mtr_t* mtr)
+{
+ buf_block_t* block;
+ ulint accessed;
+ ulint fix_type;
+ ulint success;
+ ulint must_read;
+ trx_t* trx = ((void *)0);
+ ulint sec;
+ ulint ms;
+ ib_longlong start_time;
+ ib_longlong finish_time;
+
+ ;
+ ;
+
+
+ ;
+ ;
+
+
+ ;
+
+ if (srv_slow_log) {
+ trx = innobase_get_trx();
+ }
+ buf_pool->n_page_gets++;
+loop:
+ block = ((void *)0);
+
+
+ if (guess) {
+ block = buf_block_align(guess);
+
+ mutex_enter_func((&block->mutex), "buf/buf0buf.c", 1192);
+ if ((offset != block->offset) || (space != block->space)
+ || (block->state != 213)) {
+
+ mutex_exit(&block->mutex);
+ block = ((void *)0);
+ }
+ }
+
+ if (block == ((void *)0)) {
+ rw_lock_s_lock_func( (&(buf_pool->hash_latch)), 0, "buf/buf0buf.c", 1202);
+ block = buf_page_hash_get(space, offset);
+ if(block) {
+ mutex_enter_func((&block->mutex), "buf/buf0buf.c", 1205);
+ }
+ rw_lock_s_unlock_func(&(buf_pool->hash_latch));
+ }
+
+ if (block == ((void *)0)) {
+
+
+
+
+ if (mode == 11) {
+
+ return(((void *)0));
+ }
+
+ buf_read_page(space, offset, trx);
+# 1229 "buf/buf0buf.c"
+ goto loop;
+ }
+
+
+
+ do { if (__builtin_expect(!((ulint)(block->state == 213)), (0))) { ut_dbg_assertion_failed("block->state == BUF_BLOCK_FILE_PAGE", "buf/buf0buf.c", (ulint) 1234); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("buf/buf0buf.c", (ulint) 1234); } while (0); } while (0);
+
+ must_read = (0);
+
+ if (block->io_fix == 561) {
+
+ must_read = (1);
+
+ if (mode == 11) {
+
+
+ mutex_exit(&block->mutex);
+
+ return(((void *)0));
+ }
+ }
+
+
+
+
+ if (block->frame == ((void *)0)) {
+ do { if (__builtin_expect(!((ulint)(srv_use_awe)), (0))) { ut_dbg_assertion_failed("srv_use_awe", "buf/buf0buf.c", (ulint) 1255); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("buf/buf0buf.c", (ulint) 1255); } while (0); } while (0);
+
+
+
+
+
+ mutex_enter_func((&(buf_pool->mutex)), "buf/buf0buf.c", 1261);
+ buf_awe_map_page_to_frame(block, (1));
+ mutex_exit(&buf_pool->mutex);
+ }
+
+
+
+
+ buf_block_buf_fix_inc(block);
+
+
+
+
+
+ accessed = block->accessed;
+
+ block->accessed = (1);
+
+ mutex_exit(&block->mutex);
+
+ buf_block_make_young(block);
+# 1295 "buf/buf0buf.c"
+ do { if (__builtin_expect(!((ulint)(block->buf_fix_count > 0)), (0))) { ut_dbg_assertion_failed("block->buf_fix_count > 0", "buf/buf0buf.c", (ulint) 1295); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("buf/buf0buf.c", (ulint) 1295); } while (0); } while (0);
+ ;
+
+ if (mode == 12) {
+ if (rw_latch == 1) {
+ success = rw_lock_s_lock_func_nowait(&(block->lock),
+ file, line);
+ fix_type = 1;
+ } else {
+ ;
+ success = rw_lock_x_lock_func_nowait(&(block->lock),
+ file, line);
+ fix_type = 2;
+ }
+
+ if (!success) {
+ mutex_enter_func((&block->mutex), "buf/buf0buf.c", 1311);
+
+
+
+ if (__builtin_expect(block->buf_fix_count == 0, (0))) {
+ buf_print_diagnostic(mtr, block);
+ do { ut_dbg_assertion_failed(0, "buf/buf0buf.c", (ulint) 1317); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } while (0);
+ }
+
+ block->buf_fix_count--;
+
+ mutex_exit(&block->mutex);
+
+
+
+
+ return(((void *)0));
+ }
+ } else if (rw_latch == 3) {
+
+ if (must_read) {
+
+
+
+ if (srv_slow_log && trx && trx->take_stats)
+ {
+ ut_usectime(&sec, &ms);
+ start_time = (ib_longlong)sec * 1000000 + ms;
+ }
+ for (;;) {
+ mutex_enter_func((&block->mutex), "buf/buf0buf.c", 1341);
+
+ if (block->io_fix == 561) {
+
+ mutex_exit(&block->mutex);
+
+ os_thread_sleep(WAIT_FOR_READ);
+ } else {
+
+ mutex_exit(&block->mutex);
+
+ break;
+ }
+ }
+ if (srv_slow_log && trx && trx->take_stats && start_time)
+ {
+ ut_usectime(&sec, &ms);
+ finish_time = (ib_longlong)sec * 1000000 + ms;
+ trx->io_reads_wait_timer += (ulint)(finish_time - start_time);
+ }
+ }
+
+ fix_type = 3;
+ } else if (rw_latch == 1) {
+
+ rw_lock_s_lock_func(&(block->lock), 0, file, line);
+
+ fix_type = 1;
+ } else {
+ rw_lock_x_lock_func(&(block->lock), 0, file, line);
+
+ fix_type = 2;
+ }
+
+ mtr_memo_push(mtr, block, fix_type);
+
+ if (!accessed) {
+
+
+
+ buf_read_ahead_linear(space, offset, trx);
+ }
+
+
+
+
+
+ if (srv_slow_log) {
+ _increment_page_get_statistics(block, trx);
+ }
+
+ return(block->frame);
+}
+
+
+
+
+
+ulint
+buf_page_optimistic_get_func(
+
+
+ ulint rw_latch,
+ buf_block_t* block,
+ buf_frame_t* guess,
+
+ dulint modify_clock,
+
+ const char* file,
+ ulint line,
+ mtr_t* mtr)
+{
+ ulint accessed;
+ ulint success;
+ ulint fix_type;
+ trx_t* trx = ((void *)0);
+
+ ;
+ ;
+
+
+
+ mutex_enter_func((&block->mutex), "buf/buf0buf.c", 1423);
+
+ if (__builtin_expect(block->state != 213, (0))
+ || __builtin_expect(block->frame != guess, (0))) {
+
+ mutex_exit(&block->mutex);
+
+ return((0));
+ }
+
+
+
+
+ buf_block_buf_fix_inc(block);
+
+ accessed = block->accessed;
+ block->accessed = (1);
+
+ mutex_exit(&block->mutex);
+
+ buf_block_make_young(block);
+
+
+
+ ;
+
+ if (rw_latch == 1) {
+ success = rw_lock_s_lock_func_nowait(&(block->lock),
+ file, line);
+ fix_type = 1;
+ } else {
+ success = rw_lock_x_lock_func_nowait(&(block->lock),
+ file, line);
+ fix_type = 2;
+ }
+
+ if (__builtin_expect(!success, (0))) {
+ mutex_enter_func((&block->mutex), "buf/buf0buf.c", 1460);
+
+
+
+ if (__builtin_expect(block->buf_fix_count == 0, (0))) {
+ buf_print_diagnostic(mtr, block);
+ do { ut_dbg_assertion_failed(0, "buf/buf0buf.c", (ulint) 1466); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } while (0);
+ }
+
+ block->buf_fix_count--;
+
+ mutex_exit(&block->mutex);
+
+
+
+
+ return((0));
+ }
+
+ if (__builtin_expect(!(((modify_clock).low == (block->modify_clock).low) && ((modify_clock).high == (block->modify_clock).high)), (0))) {
+
+
+
+ if (rw_latch == 1) {
+ rw_lock_s_unlock_func(&(block->lock));
+ } else {
+ rw_lock_x_unlock_func(&(block->lock));
+ }
+
+ mutex_enter_func((&block->mutex), "buf/buf0buf.c", 1489);
+
+
+
+ if (__builtin_expect(block->buf_fix_count == 0, (0))) {
+ buf_print_diagnostic(mtr, block);
+ do { ut_dbg_assertion_failed(0, "buf/buf0buf.c", (ulint) 1495); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } while (0);
+ }
+
+ block->buf_fix_count--;
+
+ mutex_exit(&block->mutex);
+
+
+
+
+ return((0));
+ }
+
+ mtr_memo_push(mtr, block, fix_type);
+# 1519 "buf/buf0buf.c"
+ do { if (__builtin_expect(!((ulint)(block->buf_fix_count > 0)), (0))) { ut_dbg_assertion_failed("block->buf_fix_count > 0", "buf/buf0buf.c", (ulint) 1519); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("buf/buf0buf.c", (ulint) 1519); } while (0); } while (0);
+
+ ;
+
+
+
+
+ if (__builtin_expect(!accessed, (0))) {
+
+
+
+ buf_read_ahead_linear(buf_frame_get_space_id(guess),
+ buf_frame_get_page_no(guess), trx);
+ }
+
+
+
+
+ buf_pool->n_page_gets++;
+
+ if (srv_slow_log) {
+ trx = innobase_get_trx();
+ _increment_page_get_statistics(block, trx);
+ }
+
+ return((1));
+}
+
+
+
+
+
+
+ulint
+buf_page_get_known_nowait(
+
+
+ ulint rw_latch,
+ buf_frame_t* guess,
+ ulint mode,
+ const char* file,
+ ulint line,
+ mtr_t* mtr)
+{
+ buf_block_t* block;
+ ulint success;
+ ulint fix_type;
+ trx_t* trx = ((void *)0);
+
+ ;
+ ;
+
+ block = buf_block_align(guess);
+
+ mutex_enter_func((&block->mutex), "buf/buf0buf.c", 1573);
+
+ if (block->state == 215) {
+
+
+
+
+
+
+
+ mutex_exit(&block->mutex);
+
+ return((0));
+ }
+
+ do { if (__builtin_expect(!((ulint)(block->state == 213)), (0))) { ut_dbg_assertion_failed("block->state == BUF_BLOCK_FILE_PAGE", "buf/buf0buf.c", (ulint) 1588); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("buf/buf0buf.c", (ulint) 1588); } while (0); } while (0);
+
+
+
+
+ buf_block_buf_fix_inc(block);
+
+ mutex_exit(&block->mutex);
+
+ if (mode == 51) {
+ buf_block_make_young(block);
+ }
+
+ ;
+
+ if (rw_latch == 1) {
+ success = rw_lock_s_lock_func_nowait(&(block->lock),
+ file, line);
+ fix_type = 1;
+ } else {
+ success = rw_lock_x_lock_func_nowait(&(block->lock),
+ file, line);
+ fix_type = 2;
+ }
+
+ if (!success) {
+ mutex_enter_func((&block->mutex), "buf/buf0buf.c", 1614);
+
+
+
+ if (__builtin_expect(block->buf_fix_count == 0, (0))) {
+ buf_print_diagnostic(mtr, block);
+ do { ut_dbg_assertion_failed(0, "buf/buf0buf.c", (ulint) 1620); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } while (0);
+ }
+
+ block->buf_fix_count--;
+
+ mutex_exit(&block->mutex);
+
+
+
+
+
+ return((0));
+ }
+
+ mtr_memo_push(mtr, block, fix_type);
+# 1644 "buf/buf0buf.c"
+ do { if (__builtin_expect(!((ulint)(block->buf_fix_count > 0)), (0))) { ut_dbg_assertion_failed("block->buf_fix_count > 0", "buf/buf0buf.c", (ulint) 1644); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("buf/buf0buf.c", (ulint) 1644); } while (0); } while (0);
+ ;
+# 1654 "buf/buf0buf.c"
+ buf_pool->n_page_gets++;
+
+ if (srv_slow_log) {
+ trx = innobase_get_trx();
+ _increment_page_get_statistics(block, trx);
+ }
+
+ return((1));
+}
+
+
+
+
+void
+buf_page_init_for_backup_restore(
+
+ ulint space,
+ ulint offset,
+
+ buf_block_t* block)
+{
+
+ block->magic_n = 41526563;
+
+ block->state = 213;
+ block->space = space;
+ block->offset = offset;
+
+ block->lock_hash_val = 0;
+
+ block->freed_page_clock = 0;
+
+ block->newest_modification = ut_dulint_zero;
+ block->oldest_modification = ut_dulint_zero;
+
+ block->accessed = (0);
+ block->buf_fix_count = 0;
+ block->io_fix = 0;
+
+ block->n_hash_helps = 0;
+ block->is_hashed = (0);
+ block->n_fields = 1;
+ block->n_bytes = 0;
+ block->side = 1;
+
+ block->file_page_was_freed = (0);
+}
+
+
+
+static
+void
+buf_page_init(
+
+ ulint space,
+ ulint offset,
+
+ buf_block_t* block)
+{
+
+
+
+
+ do { if (__builtin_expect(!((ulint)(block->state != 213)), (0))) { ut_dbg_assertion_failed("block->state != BUF_BLOCK_FILE_PAGE", "buf/buf0buf.c", (ulint) 1717); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("buf/buf0buf.c", (ulint) 1717); } while (0); } while (0);
+
+
+ block->magic_n = 41526563;
+
+ block->state = 213;
+ block->space = space;
+ block->offset = offset;
+
+ block->check_index_page_at_flush = (0);
+ block->index = ((void *)0);
+
+ block->lock_hash_val = lock_rec_hash(space, offset);
+
+
+
+ if (buf_page_hash_get(space, offset)) {
+ fprintf(stderr,
+"InnoDB: Error: page %lu %lu already found from the hash table\n",
+ (ulong) space,
+ (ulong) offset);
+
+
+
+
+
+
+ do { if (__builtin_expect(!((ulint)(0)), (0))) { ut_dbg_assertion_failed("0", "buf/buf0buf.c", (ulint) 1744); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("buf/buf0buf.c", (ulint) 1744); } while (0); } while (0);
+ }
+
+ do { hash_cell_t* cell3333; buf_block_t* struct3333; (block)->hash = ((void *)0); cell3333 = hash_get_nth_cell(buf_pool->page_hash, hash_calc_hash(buf_page_address_fold(space, offset), buf_pool->page_hash)); if (cell3333->node == ((void *)0)) { cell3333->node = block; } else { struct3333 = cell3333->node; while (struct3333->hash != ((void *)0)) { struct3333 = struct3333->hash; } struct3333->hash = block; }} while (0);
+
+
+ block->freed_page_clock = 0;
+
+ block->newest_modification = ut_dulint_zero;
+ block->oldest_modification = ut_dulint_zero;
+
+ block->accessed = (0);
+ block->buf_fix_count = 0;
+ block->io_fix = 0;
+
+ block->n_hash_helps = 0;
+ block->is_hashed = (0);
+ block->n_fields = 1;
+ block->n_bytes = 0;
+ block->side = 1;
+
+ block->file_page_was_freed = (0);
+}
+# 1780 "buf/buf0buf.c"
+buf_block_t*
+buf_page_init_for_read(
+
+
+ ulint* err,
+ ulint mode,
+ ulint space,
+ ib_longlong tablespace_version,
+
+
+ ulint offset)
+{
+ buf_block_t* block;
+ mtr_t mtr;
+
+ ;
+
+ *err = 10;
+
+ if (mode == 131) {
+
+
+ ;
+ ;
+
+ mtr_start(&mtr);
+
+ if (!ibuf_page_low(space, offset, &mtr)) {
+
+ mtr_commit(&mtr);
+
+ return(((void *)0));
+ }
+ } else {
+ ;
+ }
+
+ block = buf_block_alloc();
+
+ do { if (__builtin_expect(!((ulint)(block)), (0))) { ut_dbg_assertion_failed("block", "buf/buf0buf.c", (ulint) 1819); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("buf/buf0buf.c", (ulint) 1819); } while (0); } while (0);
+
+ mutex_enter_func((&(buf_pool->LRU_mutex)), "buf/buf0buf.c", 1821);
+ rw_lock_x_lock_func( (&(buf_pool->hash_latch)), 0, "buf/buf0buf.c", 1822);
+ mutex_enter_func((&block->mutex), "buf/buf0buf.c", 1823);
+
+ if (fil_tablespace_deleted_or_being_deleted_in_mem(space,
+ tablespace_version)) {
+ *err = 44;
+ }
+
+ if (*err == 44
+ || ((void *)0) != buf_page_hash_get(space, offset)) {
+
+
+
+
+ mutex_exit(&block->mutex);
+ mutex_exit(&(buf_pool->LRU_mutex));
+ rw_lock_x_unlock_func(&(buf_pool->hash_latch));
+
+ buf_block_free(block);
+
+ if (mode == 131) {
+
+ mtr_commit(&mtr);
+ }
+
+ return(((void *)0));
+ }
+
+ ;
+
+ buf_page_init(space, offset, block);
+ rw_lock_x_unlock_func(&(buf_pool->hash_latch));
+
+
+
+ buf_LRU_add_block(block, (1));
+ mutex_exit(&(buf_pool->LRU_mutex));
+
+ mutex_enter_func((&(buf_pool->mutex)), "buf/buf0buf.c", 1860);
+
+ block->io_fix = 561;
+
+ buf_pool->n_pend_reads++;
+# 1873 "buf/buf0buf.c"
+ rw_lock_x_lock_func( (&(block->lock)), (561), "buf/buf0buf.c", 1873);
+
+ mutex_exit(&block->mutex);
+ mutex_exit(&(buf_pool->mutex));
+
+ if (mode == 131) {
+
+ mtr_commit(&mtr);
+ }
+
+ return(block);
+}
+
+
+
+
+
+
+
+buf_frame_t*
+buf_page_create(
+
+
+ ulint space,
+ ulint offset,
+
+ mtr_t* mtr)
+{
+ buf_frame_t* frame;
+ buf_block_t* block;
+ buf_block_t* free_block = ((void *)0);
+
+ ;
+
+ free_block = buf_LRU_get_free_block();
+
+ mutex_enter_func((&(buf_pool->LRU_mutex)), "buf/buf0buf.c", 1909);
+ rw_lock_x_lock_func( (&(buf_pool->hash_latch)), 0, "buf/buf0buf.c", 1910);
+
+ block = buf_page_hash_get(space, offset);
+
+ if (block != ((void *)0)) {
+
+
+
+ block->file_page_was_freed = (0);
+
+
+ mutex_exit(&(buf_pool->LRU_mutex));
+ rw_lock_x_unlock_func(&(buf_pool->hash_latch));
+
+ buf_block_free(free_block);
+
+ frame = buf_page_get_gen( space, offset, 3, ((void *)0), 14, "buf/buf0buf.c", 1926, mtr);
+
+ return(frame);
+ }
+# 1940 "buf/buf0buf.c"
+ block = free_block;
+
+ mutex_enter_func((&block->mutex), "buf/buf0buf.c", 1942);
+
+ buf_page_init(space, offset, block);
+ rw_lock_x_unlock_func(&(buf_pool->hash_latch));
+
+
+ buf_LRU_add_block(block, (0));
+
+
+
+
+ buf_block_buf_fix_inc(block);
+
+ buf_pool->n_pages_created++;
+
+ mutex_exit(&(buf_pool->LRU_mutex));
+
+ mtr_memo_push(mtr, block, 3);
+
+ block->accessed = (1);
+
+ mutex_exit(&block->mutex);
+
+
+
+
+ ibuf_merge_or_delete_for_page(((void *)0), space, offset, (1));
+
+
+ buf_flush_free_margin((0));
+
+ frame = block->frame;
+
+
+
+
+
+
+
+ memset(frame + 26, 0, 8);
+# 1993 "buf/buf0buf.c"
+ return(frame);
+}
+
+
+
+
+
+void
+buf_page_io_complete(
+
+ buf_block_t* block)
+{
+ ulint io_type;
+ ulint read_page_no;
+ ulint flush_type;
+
+ buf_io_counter_t* io_counter;
+ ulint fold;
+
+ ;
+
+ do { if (__builtin_expect(!((ulint)(block->state == 213)), (0))) { ut_dbg_assertion_failed("block->state == BUF_BLOCK_FILE_PAGE", "buf/buf0buf.c", (ulint) 2014); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("buf/buf0buf.c", (ulint) 2014); } while (0); } while (0);
+
+
+
+
+
+
+
+ io_type = block->io_fix;
+
+ if (io_type == 561) {
+
+
+
+
+ read_page_no = mach_read_from_4((block->frame)
+ + 4);
+ if (read_page_no != 0
+ && !trx_doublewrite_page_inside(read_page_no)
+ && read_page_no != block->offset) {
+
+ fprintf(stderr,
+"InnoDB: Error: page n:o stored in the page read in is %lu, should be %lu!\n",
+ (ulong) read_page_no, (ulong) block->offset);
+ }
+
+
+
+ if (buf_page_is_corrupted(block->frame)) {
+ fprintf(stderr,
+ "InnoDB: Database page corruption on disk or a failed\n"
+ "InnoDB: file read of page %lu.\n", (ulong) block->offset);
+
+ fputs(
+ "InnoDB: You may have to recover from a backup.\n", stderr);
+
+ buf_page_print(block->frame);
+
+ fprintf(stderr,
+ "InnoDB: Database page corruption on disk or a failed\n"
+ "InnoDB: file read of page %lu.\n", (ulong) block->offset);
+ fputs(
+ "InnoDB: You may have to recover from a backup.\n", stderr);
+ fputs(
+ "InnoDB: It is also possible that your operating\n"
+ "InnoDB: system has corrupted its own file cache\n"
+ "InnoDB: and rebooting your computer removes the\n"
+ "InnoDB: error.\n"
+ "InnoDB: If the corrupt page is an index page\n"
+ "InnoDB: you can also try to fix the corruption\n"
+ "InnoDB: by dumping, dropping, and reimporting\n"
+ "InnoDB: the corrupt table. You can use CHECK\n"
+ "InnoDB: TABLE to scan your table for corruption.\n"
+ "InnoDB: See also "
+"InnoDB: http://dev.mysql.com/doc/refman/5.0/en/forcing-recovery.html\n"
+ "InnoDB: about forcing recovery.\n", stderr);
+
+ if (srv_force_recovery < 1) {
+ fputs(
+ "InnoDB: Ending processing because of a corrupt database page.\n",
+ stderr);
+ exit(1);
+ }
+ }
+
+ if (recv_recovery_is_on()) {
+ recv_recover_page((0), (1), block->frame,
+ block->space, block->offset);
+ }
+
+ if (!recv_no_ibuf_operations) {
+ ibuf_merge_or_delete_for_page(block->frame,
+ block->space, block->offset, (1));
+ }
+ }
+# 2098 "buf/buf0buf.c"
+ if (io_type == 561) {
+ mutex_enter_func((&block->mutex), "buf/buf0buf.c", 2099);
+ mutex_enter_func((&(buf_pool->mutex)), "buf/buf0buf.c", 2100);
+
+ block->io_fix = 0;
+
+
+
+
+
+ ;
+ buf_pool->n_pend_reads--;
+ buf_pool->n_pages_read++;
+
+ rw_lock_x_unlock_func(&(block->lock));
+
+ if (srv_io_pattern && srv_io_pattern_trace_running) {
+ fold = buf_page_address_fold(block->space, block->offset);
+ { (io_counter) = (hash_get_nth_cell(buf_pool->io_counter_hash, hash_calc_hash(fold, buf_pool->io_counter_hash))->node); while ((io_counter) != ((void *)0)) { if ((io_counter->space == block->space) && (io_counter->offset == block->offset)) { break; } else { (io_counter) = ((io_counter)->hash); } }};
+
+ if (io_counter == ((void *)0) && buf_pool->io_counters < srv_io_pattern_size_limit) {
+ io_counter = mem_heap_alloc(buf_pool->io_counter_heap,(sizeof(buf_io_counter_t)));
+ io_counter->space = block->space;
+ io_counter->offset = block->offset;
+ io_counter->n_read = 0;
+ io_counter->n_write = 0;
+ do { hash_cell_t* cell3333; buf_io_counter_t* struct3333; (io_counter)->hash = ((void *)0); cell3333 = hash_get_nth_cell(buf_pool->io_counter_hash, hash_calc_hash(buf_page_address_fold(block->space, block->offset), buf_pool->io_counter_hash)); if (cell3333->node == ((void *)0)) { cell3333->node = io_counter; } else { struct3333 = cell3333->node; while (struct3333->hash != ((void *)0)) { struct3333 = struct3333->hash; } struct3333->hash = io_counter; }} while (0);
+
+ buf_pool->io_counters++;
+ }
+ if (io_counter != ((void *)0)) {
+ io_counter->index_id = ut_dulint_get_low(btr_page_get_index_id(buf_block_get_frame(block)));
+ io_counter->n_read++;
+ }
+ }
+
+ mutex_exit(&(buf_pool->mutex));
+ mutex_exit(&block->mutex);
+
+
+
+
+
+ } else {
+ ;
+
+ flush_type = block->flush_type;
+ if (flush_type == 1) {
+ mutex_enter_func((&(buf_pool->LRU_mutex)), "buf/buf0buf.c", 2146);
+ }
+ mutex_enter_func((&(buf_pool->flush_list_mutex)), "buf/buf0buf.c", 2148);
+ mutex_enter_func((&block->mutex), "buf/buf0buf.c", 2149);
+ mutex_enter_func((&(buf_pool->mutex)), "buf/buf0buf.c", 2150);
+
+ block->io_fix = 0;
+
+
+
+
+ buf_flush_write_complete(block);
+
+ mutex_exit(&(buf_pool->flush_list_mutex));
+ if (flush_type == 1) {
+ mutex_exit(&(buf_pool->LRU_mutex));
+ }
+
+ rw_lock_s_unlock_func(&(block->lock));
+
+ if (srv_io_pattern && srv_io_pattern_trace_running) {
+ fold = buf_page_address_fold(block->space, block->offset);
+ { (io_counter) = (hash_get_nth_cell(buf_pool->io_counter_hash, hash_calc_hash(fold, buf_pool->io_counter_hash))->node); while ((io_counter) != ((void *)0)) { if ((io_counter->space == block->space) && (io_counter->offset == block->offset)) { break; } else { (io_counter) = ((io_counter)->hash); } }};
+
+ if (io_counter == ((void *)0) && buf_pool->io_counters < srv_io_pattern_size_limit) {
+ io_counter = mem_heap_alloc(buf_pool->io_counter_heap,(sizeof(buf_io_counter_t)));
+ io_counter->space = block->space;
+ io_counter->offset = block->offset;
+ io_counter->n_read = 0;
+ io_counter->n_write = 0;
+ do { hash_cell_t* cell3333; buf_io_counter_t* struct3333; (io_counter)->hash = ((void *)0); cell3333 = hash_get_nth_cell(buf_pool->io_counter_hash, hash_calc_hash(buf_page_address_fold(block->space, block->offset), buf_pool->io_counter_hash)); if (cell3333->node == ((void *)0)) { cell3333->node = io_counter; } else { struct3333 = cell3333->node; while (struct3333->hash != ((void *)0)) { struct3333 = struct3333->hash; } struct3333->hash = io_counter; }} while (0);
+
+ buf_pool->io_counters++;
+ }
+ if (io_counter != ((void *)0)) {
+ io_counter->index_id = ut_dulint_get_low(btr_page_get_index_id(buf_block_get_frame(block)));
+ io_counter->n_write++;
+ }
+ }
+
+ buf_pool->n_pages_written++;
+
+ mutex_exit(&(buf_pool->mutex));
+ mutex_exit(&block->mutex);
+
+
+
+
+
+
+ }
+
+
+
+
+
+
+
+}
+
+
+
+
+
+
+void
+buf_pool_invalidate(void)
+
+{
+ ulint freed;
+
+ ;
+
+ freed = (1);
+
+ while (freed) {
+ freed = buf_LRU_search_and_free_block(100);
+ }
+
+ mutex_enter_func((&(buf_pool->LRU_mutex)), "buf/buf0buf.c", 2225);
+
+ ;
+
+ mutex_exit(&(buf_pool->LRU_mutex));
+}
+
+
+
+
+ulint
+buf_validate(void)
+
+{
+ buf_block_t* block;
+ ulint i;
+ ulint n_single_flush = 0;
+ ulint n_lru_flush = 0;
+ ulint n_list_flush = 0;
+ ulint n_lru = 0;
+ ulint n_flush = 0;
+ ulint n_free = 0;
+ ulint n_page = 0;
+ ulint n_single_flush_tmp = 0;
+ ulint n_lru_flush_tmp = 0;
+ ulint n_list_flush_tmp = 0;
+
+ ;
+
+ mutex_enter_func((&(buf_pool->LRU_mutex)), "buf/buf0buf.c", 2254);
+ mutex_enter_func((&(buf_pool->flush_list_mutex)), "buf/buf0buf.c", 2255);
+ mutex_enter_func((&(buf_pool->free_mutex)), "buf/buf0buf.c", 2256);
+ rw_lock_x_lock_func( (&(buf_pool->hash_latch)), 0, "buf/buf0buf.c", 2257);
+
+ mutex_enter_func((&(buf_pool->mutex)), "buf/buf0buf.c", 2259);
+ n_single_flush_tmp = buf_pool->n_flush[2];
+ n_list_flush_tmp = buf_pool->n_flush[3];
+ n_lru_flush_tmp = buf_pool->n_flush[1];
+ mutex_exit(&(buf_pool->mutex));
+
+ for (i = 0; i < buf_pool->curr_size; i++) {
+
+ block = buf_pool_get_nth_block(buf_pool, i);
+
+ mutex_enter_func((&block->mutex), "buf/buf0buf.c", 2269);
+
+ if (block->state == 213) {
+
+ do { if (__builtin_expect(!((ulint)(buf_page_hash_get(block->space, block->offset) == block)), (0))) { ut_dbg_assertion_failed("buf_page_hash_get(block->space, block->offset) == block", "buf/buf0buf.c", (ulint) 2274); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("buf/buf0buf.c", (ulint) 2274); } while (0); } while (0);
+
+ n_page++;
+
+
+
+
+
+
+ if (block->io_fix == 562) {
+
+ if (block->flush_type == 1) {
+ n_lru_flush++;
+ do { if (__builtin_expect(!((ulint)(rw_lock_is_locked(&(block->lock), 352))), (0))) { ut_dbg_assertion_failed("rw_lock_is_locked(&(block->lock), RW_LOCK_SHARED)", "buf/buf0buf.c", (ulint) 2287); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("buf/buf0buf.c", (ulint) 2287); } while (0); } while (0);
+
+ } else if (block->flush_type ==
+ 3) {
+ n_list_flush++;
+ } else if (block->flush_type ==
+ 2) {
+ n_single_flush++;
+ } else {
+ do { ut_dbg_assertion_failed(0, "buf/buf0buf.c", (ulint) 2295); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } while (0);
+ }
+
+ } else if (block->io_fix == 561) {
+
+ do { if (__builtin_expect(!((ulint)(rw_lock_is_locked(&(block->lock), 351))), (0))) { ut_dbg_assertion_failed("rw_lock_is_locked(&(block->lock), RW_LOCK_EX)", "buf/buf0buf.c", (ulint) 2301); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("buf/buf0buf.c", (ulint) 2301); } while (0); } while (0);
+
+ }
+
+ n_lru++;
+
+ if (ut_dulint_cmp(block->oldest_modification,
+ ut_dulint_zero) > 0) {
+ n_flush++;
+ }
+
+ } else if (block->state == 211) {
+ n_free++;
+ }
+
+ mutex_exit(&block->mutex);
+ }
+
+ if (n_lru + n_free > buf_pool->curr_size) {
+ fprintf(stderr, "n LRU %lu, n free %lu\n", (ulong) n_lru, (ulong) n_free);
+ do { ut_dbg_assertion_failed(0, "buf/buf0buf.c", (ulint) 2320); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } while (0);
+ }
+
+ do { if (__builtin_expect(!((ulint)((buf_pool->LRU).count == n_lru)), (0))) { ut_dbg_assertion_failed("UT_LIST_GET_LEN(buf_pool->LRU) == n_lru", "buf/buf0buf.c", (ulint) 2323); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("buf/buf0buf.c", (ulint) 2323); } while (0); } while (0);
+ if ((buf_pool->free).count != n_free) {
+ fprintf(stderr, "Free list len %lu, free blocks %lu\n",
+ (ulong) (buf_pool->free).count, (ulong) n_free);
+ do { ut_dbg_assertion_failed(0, "buf/buf0buf.c", (ulint) 2327); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } while (0);
+ }
+ do { if (__builtin_expect(!((ulint)((buf_pool->flush_list).count == n_flush)), (0))) { ut_dbg_assertion_failed("UT_LIST_GET_LEN(buf_pool->flush_list) == n_flush", "buf/buf0buf.c", (ulint) 2329); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("buf/buf0buf.c", (ulint) 2329); } while (0); } while (0);
+
+ do { if (__builtin_expect(!((ulint)(n_single_flush_tmp == n_single_flush)), (0))) { ut_dbg_assertion_failed("n_single_flush_tmp == n_single_flush", "buf/buf0buf.c", (ulint) 2331); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("buf/buf0buf.c", (ulint) 2331); } while (0); } while (0);
+ do { if (__builtin_expect(!((ulint)(n_list_flush_tmp == n_list_flush)), (0))) { ut_dbg_assertion_failed("n_list_flush_tmp == n_list_flush", "buf/buf0buf.c", (ulint) 2332); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("buf/buf0buf.c", (ulint) 2332); } while (0); } while (0);
+ do { if (__builtin_expect(!((ulint)(n_lru_flush_tmp == n_lru_flush)), (0))) { ut_dbg_assertion_failed("n_lru_flush_tmp == n_lru_flush", "buf/buf0buf.c", (ulint) 2333); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("buf/buf0buf.c", (ulint) 2333); } while (0); } while (0);
+
+ mutex_exit(&(buf_pool->LRU_mutex));
+ mutex_exit(&(buf_pool->flush_list_mutex));
+ mutex_exit(&(buf_pool->free_mutex));
+ rw_lock_x_unlock_func(&(buf_pool->hash_latch));
+
+ do { if (__builtin_expect(!((ulint)(buf_LRU_validate())), (0))) { ut_dbg_assertion_failed("buf_LRU_validate()", "buf/buf0buf.c", (ulint) 2340); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("buf/buf0buf.c", (ulint) 2340); } while (0); } while (0);
+ do { if (__builtin_expect(!((ulint)(buf_flush_validate())), (0))) { ut_dbg_assertion_failed("buf_flush_validate()", "buf/buf0buf.c", (ulint) 2341); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("buf/buf0buf.c", (ulint) 2341); } while (0); } while (0);
+
+ return((1));
+}
+
+
+
+
+void
+buf_print(void)
+
+{
+ dulint* index_ids;
+ ulint* counts;
+ ulint size;
+ ulint i;
+ ulint j;
+ dulint id;
+ ulint n_found;
+ buf_frame_t* frame;
+ dict_index_t* index;
+
+ ;
+
+ size = buf_pool->curr_size;
+
+ index_ids = mem_alloc_func((sizeof(dulint) * size), "buf/buf0buf.c", 2367);
+ counts = mem_alloc_func((sizeof(ulint) * size), "buf/buf0buf.c", 2368);
+
+ mutex_enter_func((&(buf_pool->LRU_mutex)), "buf/buf0buf.c", 2370);
+ mutex_enter_func((&(buf_pool->flush_list_mutex)), "buf/buf0buf.c", 2371);
+ mutex_enter_func((&(buf_pool->free_mutex)), "buf/buf0buf.c", 2372);
+
+ fprintf(stderr,
+ "buf_pool size %lu\n"
+ "database pages %lu\n"
+ "free pages %lu\n"
+ "modified database pages %lu\n"
+ "n pending reads %lu\n"
+ "n pending flush LRU %lu list %lu single page %lu\n"
+ "pages read %lu, created %lu, written %lu\n",
+ (ulong) size,
+ (ulong) (buf_pool->LRU).count,
+ (ulong) (buf_pool->free).count,
+ (ulong) (buf_pool->flush_list).count,
+ (ulong) buf_pool->n_pend_reads,
+ (ulong) buf_pool->n_flush[1],
+ (ulong) buf_pool->n_flush[3],
+ (ulong) buf_pool->n_flush[2],
+ (ulong) buf_pool->n_pages_read, buf_pool->n_pages_created,
+ (ulong) buf_pool->n_pages_written);
+
+
+
+ n_found = 0;
+
+ for (i = 0; i < size; i++) {
+ frame = buf_pool_get_nth_block(buf_pool, i)->frame;
+
+ if (fil_page_get_type(frame) == 17855) {
+
+ id = btr_page_get_index_id(frame);
+
+
+ j = 0;
+
+ while (j < n_found) {
+
+ if (ut_dulint_cmp(index_ids[j], id) == 0) {
+ (counts[j])++;
+
+ break;
+ }
+ j++;
+ }
+
+ if (j == n_found) {
+ n_found++;
+ index_ids[j] = id;
+ counts[j] = 1;
+ }
+ }
+ }
+
+ mutex_exit(&(buf_pool->LRU_mutex));
+ mutex_exit(&(buf_pool->flush_list_mutex));
+ mutex_exit(&(buf_pool->free_mutex));
+
+ for (i = 0; i < n_found; i++) {
+ index = dict_index_get_if_in_cache(index_ids[i]);
+
+ fprintf(stderr,
+ "Block count for index %lu in buffer is about %lu",
+ (ulong) ut_dulint_get_low(index_ids[i]),
+ (ulong) counts[i]);
+
+ if (index) {
+ _IO_putc (' ', stderr);
+ dict_index_name_print(stderr, ((void *)0), index);
+ }
+
+ _IO_putc ('\n', stderr);
+ }
+
+ mem_free_func((index_ids), "buf/buf0buf.c", 2445);
+ mem_free_func((counts), "buf/buf0buf.c", 2446);
+
+ do { if (__builtin_expect(!((ulint)(buf_validate())), (0))) { ut_dbg_assertion_failed("buf_validate()", "buf/buf0buf.c", (ulint) 2448); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } do if (__builtin_expect(ut_dbg_stop_threads, (0))) { ut_dbg_stop_thread("buf/buf0buf.c", (ulint) 2448); } while (0); } while (0);
+}
+# 2484 "buf/buf0buf.c"
+ulint
+buf_get_n_pending_ios(void)
+
+{
+ return(buf_pool->n_pend_reads
+ + buf_pool->n_flush[1]
+ + buf_pool->n_flush[3]
+ + buf_pool->n_flush[2]);
+}
+
+
+
+
+
+ulint
+buf_get_modified_ratio_pct(void)
+
+{
+ ulint ratio;
+
+ mutex_enter_func((&(buf_pool->LRU_mutex)), "buf/buf0buf.c", 2504);
+ mutex_enter_func((&(buf_pool->flush_list_mutex)), "buf/buf0buf.c", 2505);
+ mutex_enter_func((&(buf_pool->free_mutex)), "buf/buf0buf.c", 2506);
+
+ ratio = (100 * (buf_pool->flush_list).count)
+ / (1 + (buf_pool->LRU).count
+ + (buf_pool->free).count);
+
+
+
+ mutex_exit(&(buf_pool->LRU_mutex));
+ mutex_exit(&(buf_pool->flush_list_mutex));
+ mutex_exit(&(buf_pool->free_mutex));
+
+ return(ratio);
+}
+
+
+
+
+void
+buf_print_io(
+
+ FILE* file)
+{
+ time_t current_time;
+ double time_elapsed;
+ ulint size;
+
+ ;
+ size = buf_pool->curr_size;
+
+ mutex_enter_func((&(buf_pool->LRU_mutex)), "buf/buf0buf.c", 2536);
+ mutex_enter_func((&(buf_pool->flush_list_mutex)), "buf/buf0buf.c", 2537);
+ mutex_enter_func((&(buf_pool->free_mutex)), "buf/buf0buf.c", 2538);
+ mutex_enter_func((&(buf_pool->mutex)), "buf/buf0buf.c", 2539);
+
+ if (srv_use_awe) {
+ fprintf(stderr,
+ "AWE: Buffer pool memory frames %lu\n",
+ (ulong) buf_pool->n_frames);
+
+ fprintf(stderr,
+ "AWE: Database pages and free buffers mapped in frames %lu\n",
+ (ulong) (buf_pool->awe_LRU_free_mapped).count);
+ }
+ fprintf(file,
+ "Buffer pool size %lu\n"
+ "Buffer pool size, bytes %lu\n"
+ "Free buffers %lu\n"
+ "Database pages %lu\n"
+ "Modified db pages %lu\n"
+ "Pending reads %lu\n"
+ "Pending writes: LRU %lu, flush list %lu, single page %lu\n",
+ (ulong) size,
+ (ulong) size * (2 * 8192),
+ (ulong) (buf_pool->free).count,
+ (ulong) (buf_pool->LRU).count,
+ (ulong) (buf_pool->flush_list).count,
+ (ulong) buf_pool->n_pend_reads,
+ (ulong) buf_pool->n_flush[1]
+ + buf_pool->init_flush[1],
+ (ulong) buf_pool->n_flush[3]
+ + buf_pool->init_flush[3],
+ (ulong) buf_pool->n_flush[2]);
+
+ current_time = time(((void *)0));
+ time_elapsed = 0.001 + difftime(current_time,
+ buf_pool->last_printout_time);
+ buf_pool->last_printout_time = current_time;
+
+ fprintf(file,
+ "Pages read %lu, created %lu, written %lu\n"
+ "%.2f reads/s, %.2f creates/s, %.2f writes/s\n",
+ (ulong) buf_pool->n_pages_read,
+ (ulong) buf_pool->n_pages_created,
+ (ulong) buf_pool->n_pages_written,
+ (buf_pool->n_pages_read - buf_pool->n_pages_read_old)
+ / time_elapsed,
+ (buf_pool->n_pages_created - buf_pool->n_pages_created_old)
+ / time_elapsed,
+ (buf_pool->n_pages_written - buf_pool->n_pages_written_old)
+ / time_elapsed);
+
+ if (srv_use_awe) {
+ fprintf(file, "AWE: %.2f page remaps/s\n",
+ (buf_pool->n_pages_awe_remapped
+ - buf_pool->n_pages_awe_remapped_old)
+ / time_elapsed);
+ }
+
+ if (buf_pool->n_page_gets > buf_pool->n_page_gets_old) {
+ fprintf(file, "Buffer pool hit rate %lu / 1000\n",
+ (ulong) (1000
+ - ((1000 *
+ (buf_pool->n_pages_read - buf_pool->n_pages_read_old))
+ / (buf_pool->n_page_gets - buf_pool->n_page_gets_old))));
+ } else {
+ fputs("No buffer pool page gets since the last printout\n",
+ file);
+ }
+
+ buf_pool->n_page_gets_old = buf_pool->n_page_gets;
+ buf_pool->n_pages_read_old = buf_pool->n_pages_read;
+ buf_pool->n_pages_created_old = buf_pool->n_pages_created;
+ buf_pool->n_pages_written_old = buf_pool->n_pages_written;
+ buf_pool->n_pages_awe_remapped_old = buf_pool->n_pages_awe_remapped;
+
+ mutex_exit(&(buf_pool->LRU_mutex));
+ mutex_exit(&(buf_pool->flush_list_mutex));
+ mutex_exit(&(buf_pool->free_mutex));
+ mutex_exit(&(buf_pool->mutex));
+}
+
+
+
+
+void
+buf_refresh_io_stats(void)
+
+{
+ buf_pool->last_printout_time = time(((void *)0));
+ buf_pool->n_page_gets_old = buf_pool->n_page_gets;
+ buf_pool->n_pages_read_old = buf_pool->n_pages_read;
+ buf_pool->n_pages_created_old = buf_pool->n_pages_created;
+ buf_pool->n_pages_written_old = buf_pool->n_pages_written;
+ buf_pool->n_pages_awe_remapped_old = buf_pool->n_pages_awe_remapped;
+}
+
+
+
+
+ulint
+buf_all_freed(void)
+
+{
+ buf_block_t* block;
+ ulint i;
+
+ ;
+
+ for (i = 0; i < buf_pool->curr_size; i++) {
+
+ block = buf_pool_get_nth_block(buf_pool, i);
+
+ mutex_enter_func((&block->mutex), "buf/buf0buf.c", 2649);
+
+ if (block->state == 213) {
+
+ if (!buf_flush_ready_for_replace(block)) {
+
+ fprintf(stderr,
+ "Page %lu %lu still fixed or dirty\n",
+ (ulong) block->space,
+ (ulong) block->offset);
+ do { ut_dbg_assertion_failed(0, "buf/buf0buf.c", (ulint) 2659); if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = ((void *)0); } while (0);
+ }
+ }
+
+ mutex_exit(&block->mutex);
+ }
+
+ return((1));
+}
+
+
+
+
+
+ulint
+buf_pool_check_no_pending_io(void)
+
+
+{
+ ulint ret;
+
+ mutex_enter_func((&(buf_pool->mutex)), "buf/buf0buf.c", 2680);
+
+ if (buf_pool->n_pend_reads + buf_pool->n_flush[1]
+ + buf_pool->n_flush[3]
+ + buf_pool->n_flush[2]) {
+ ret = (0);
+ } else {
+ ret = (1);
+ }
+
+ mutex_exit(&(buf_pool->mutex));
+
+ return(ret);
+}
+
+
+
+
+ulint
+buf_get_free_list_len(void)
+
+{
+ ulint len;
+
+ mutex_enter_func((&(buf_pool->free_mutex)), "buf/buf0buf.c", 2704);
+
+ len = (buf_pool->free).count;
+
+ mutex_exit(&(buf_pool->free_mutex));
+
+ return(len);
+}
+
+
+
+
+void
+buf_block_print(
+
+ const buf_block_t* block)
+{
+ fprintf(stderr,
+ "BLOCK fields\nmagic_n: 0x%lx\n"
+ "state: %lu frame: 0x%lx space:offset: 0x%lx:0x%lx\n"
+ "hash value: 0x%lx check_index_page_at_flush: %ld\n"
+ "newest_modification %lu:%lu oldest_modification %lu:%lu\n"
+ "flush_type: %lu in_free_list: %ld in_LRU_list: %ld\n"
+ "LRU_position: %ld freed_page_clock: %lu old: %ld\n"
+ "accessed: %ld buf_fix_count: %lu io_fix: %ld "
+ "modify_clock: %lu:%lu\n"
+ "n_hash_helps: %lu n_fields: %ld n_bytes: %lu side: %lu\n"
+ "is_hashed: %lu n_pointers: %lu curr_n_fields: %lu\n"
+ "curr_n_bytes: %lu curr_side: %lu index name: %s\n"
+ "file_page_was_freed: %lu\n",
+ block->magic_n, block->state, (ulint) block->frame,
+ block->space, block->offset, block->lock_hash_val,
+ block->check_index_page_at_flush,
+ ut_dulint_get_high(block->newest_modification),
+ ut_dulint_get_low(block->newest_modification),
+ ut_dulint_get_high(block->oldest_modification),
+ ut_dulint_get_low(block->oldest_modification),
+ block->flush_type, block->in_free_list, block->in_LRU_list,
+ block->LRU_position, block->freed_page_clock,
+ block->old, block->accessed, block->buf_fix_count,
+ block->io_fix,
+ ut_dulint_get_high(block->modify_clock),
+ ut_dulint_get_low(block->modify_clock),
+ block->n_hash_helps, block->n_fields, block->n_bytes,
+ block->side, block->is_hashed, block->n_pointers,
+ block->curr_n_fields, block->curr_n_bytes,
+ block->curr_side, block->index->name,
+ block->file_page_was_freed);
+}
+
+
+
+
+void
+buf_print_diagnostic(
+
+ mtr_t* mtr,
+ const buf_block_t* block)
+{
+ fprintf(stderr, "=== MTR ===\n");
+ mtr_print(mtr);
+ buf_LRU_print();
+ buf_print();
+ buf_LRU_validate();
+ buf_print_io(stderr);
+ fprintf(stderr, "=== BLOCK ===\n");
+ buf_block_print(block);
+}
+
+buf_block_t*
+buf_pool_get_nth_block_no_inline(
+
+
+ buf_pool_t* buf_pool,
+ ulint i) {
+
+return buf_pool_get_nth_block(buf_pool, i);
+
+}
+
+
+
+
+
+void
+buf_io_counter_control(void)
+
+{
+ ulint n;
+
+ mutex_enter_func((&(buf_pool->mutex)), "buf/buf0buf.c", 2794);
+ if (srv_io_pattern_trace) {
+ if (buf_pool->io_counter_hash == ((void *)0)) {
+
+ buf_pool->io_counter_hash = hash0_create(20 * buf_pool->max_size);
+ buf_pool->io_counter_heap = mem_heap_create_func( (4096 * 1024), ((void *)0), 0, "buf/buf0buf.c", 2799);
+ buf_pool->io_counters = 0;
+
+ srv_io_pattern = (1);
+ }
+ } else {
+ if (buf_pool->io_counter_hash != ((void *)0)) {
+ srv_io_pattern = (0);
+
+ for (n = 0; n < buf_pool->io_counter_hash->n_cells; n++) {
+ (buf_pool->io_counter_hash->array + n)->node = ((void *)0);
+ }
+ mem_heap_free_func( (buf_pool->io_counter_heap), "buf/buf0buf.c", 2811);
+ buf_pool->io_counter_heap = ((void *)0);
+ buf_pool->io_counters = 0;
+
+ hash_table_free(buf_pool->io_counter_hash);
+ buf_pool->io_counter_hash = ((void *)0);
+ }
+ }
+ mutex_exit(&(buf_pool->mutex));
+}
+
+void
+buf_io_counter_clear(void)
+
+{
+ ulint n;
+
+ mutex_enter_func((&(buf_pool->mutex)), "buf/buf0buf.c", 2828);
+ if (buf_pool->io_counter_hash != ((void *)0)) {
+ for (n = 0; n < buf_pool->io_counter_hash->n_cells; n++) {
+ (buf_pool->io_counter_hash->array + n)->node = ((void *)0);
+ }
+ mem_heap_empty(buf_pool->io_counter_heap);
+ buf_pool->io_counters = 0;
+ }
+ mutex_exit(&(buf_pool->mutex));
+}