| 1 |  | 
|---|
| 2 | // vim:sw=2:ai | 
|---|
| 3 |  | 
|---|
| 4 | /* | 
|---|
| 5 | * Copyright (C) 2010 DeNA Co.,Ltd.. All rights reserved. | 
|---|
| 6 | * See COPYRIGHT.txt for details. | 
|---|
| 7 | */ | 
|---|
| 8 |  | 
|---|
| 9 | #ifndef DENA_MYSQL_INCL_HPP | 
|---|
| 10 | #define DENA_MYSQL_INCL_HPP | 
|---|
| 11 |  | 
|---|
| 12 | #ifndef HAVE_CONFIG_H | 
|---|
| 13 | #define HAVE_CONFIG_H | 
|---|
| 14 | #endif | 
|---|
| 15 |  | 
|---|
| 16 | #ifndef MYSQL_DYNAMIC_PLUGIN | 
|---|
| 17 | #define MYSQL_DYNAMIC_PLUGIN | 
|---|
| 18 | #endif | 
|---|
| 19 |  | 
|---|
| 20 | #define MYSQL_SERVER 1 | 
|---|
| 21 |  | 
|---|
| 22 | #include <my_global.h> | 
|---|
| 23 | #include <mysql_version.h> | 
|---|
| 24 |  | 
|---|
| 25 | #if MYSQL_VERSION_ID >= 50505 | 
|---|
| 26 | #include <my_pthread.h> | 
|---|
| 27 | #include <sql_priv.h> | 
|---|
| 28 | #include "sql_class.h" | 
|---|
| 29 | #include "unireg.h" | 
|---|
| 30 | #include "lock.h" | 
|---|
| 31 | #include "key.h" // key_copy() | 
|---|
| 32 | #include <my_global.h> | 
|---|
| 33 | #include <mysql/plugin.h> | 
|---|
| 34 | #include <transaction.h> | 
|---|
| 35 | #include <sql_base.h> | 
|---|
| 36 | // FIXME FIXME FIXME | 
|---|
| 37 | #define safeFree(X) my_free(X) | 
|---|
| 38 | #undef pthread_cond_timedwait | 
|---|
| 39 | #undef pthread_mutex_lock | 
|---|
| 40 | #undef pthread_mutex_unlock | 
|---|
| 41 | #define pthread_cond_timedwait  mysql_cond_timedwait | 
|---|
| 42 | #define  pthread_mutex_lock  mysql_mutex_lock | 
|---|
| 43 | #define  pthread_mutex_unlock  mysql_mutex_unlock | 
|---|
| 44 | #define current_stmt_binlog_row_based  is_current_stmt_binlog_format_row | 
|---|
| 45 | #define clear_current_stmt_binlog_row_based  clear_current_stmt_binlog_format_row | 
|---|
| 46 |  | 
|---|
| 47 | #else | 
|---|
| 48 | #include "mysql_priv.h" | 
|---|
| 49 | #endif | 
|---|
| 50 |  | 
|---|
| 51 | #undef min | 
|---|
| 52 | #undef max | 
|---|
| 53 |  | 
|---|
| 54 | #endif | 
|---|
| 55 |  | 
|---|
| 56 |  | 
|---|