forked from mroonga/mroonga
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmrn_mysql_compat.h
68 lines (54 loc) · 2.42 KB
/
mrn_mysql_compat.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/* -*- c-basic-offset: 2 -*- */
/*
Copyright(C) 2011 Kouhei Sutou <[email protected]>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _mrn_mysql_compat_h
#define _mrn_mysql_compat_h
#if MYSQL_VERSION_ID >= 50500
# define my_free(PTR, FLAG) my_free(PTR)
#endif
#ifndef HA_INPLACE_ADD_INDEX_NO_READ_WRITE
# define HA_INPLACE_ADD_INDEX_NO_READ_WRITE HA_ONLINE_ADD_INDEX_NO_WRITES
# define HA_INPLACE_DROP_INDEX_NO_READ_WRITE HA_ONLINE_DROP_INDEX_NO_WRITES
# define HA_INPLACE_ADD_UNIQUE_INDEX_NO_READ_WRITE HA_ONLINE_ADD_UNIQUE_INDEX_NO_WRITES
# define HA_INPLACE_DROP_UNIQUE_INDEX_NO_READ_WRITE HA_ONLINE_DROP_UNIQUE_INDEX_NO_WRITES
# define HA_INPLACE_ADD_PK_INDEX_NO_READ_WRITE HA_ONLINE_ADD_PK_INDEX_NO_WRITES
# define HA_INPLACE_DROP_PK_INDEX_NO_READ_WRITE HA_ONLINE_DROP_PK_INDEX_NO_WRITES
# define HA_INPLACE_ADD_INDEX_NO_WRITE HA_ONLINE_ADD_INDEX
# define HA_INPLACE_DROP_INDEX_NO_WRITE HA_ONLINE_DROP_INDEX
# define HA_INPLACE_ADD_UNIQUE_INDEX_NO_WRITE HA_ONLINE_ADD_UNIQUE_INDEX
# define HA_INPLACE_DROP_UNIQUE_INDEX_NO_WRITE HA_ONLINE_DROP_UNIQUE_INDEX
# define HA_INPLACE_ADD_PK_INDEX_NO_WRITE HA_ONLINE_ADD_PK_INDEX
# define HA_INPLACE_DROP_PK_INDEX_NO_WRITE HA_ONLINE_DROP_PK_INDEX
#endif
#if MYSQL_VERSION_ID < 50600
typedef Item COND;
#endif
#if MYSQL_VERSION_ID < 50603
typedef MYSQL_ERROR Sql_condition;
#endif
#if (defined(MRN_MARIADB_P) && MYSQL_VERSION_ID >= 50302)
typedef COST_VECT Cost_estimate;
#endif
#if MYSQL_VERSION_ID >= 50516
# define MRN_PLUGIN_HAVE_FLAGS 1
#endif
// for MySQL < 5.5
#ifndef MY_ALL_CHARSETS_SIZE
# define MY_ALL_CHARSETS_SIZE 256
#endif
#ifndef MRN_MARIADB_P
typedef char *range_id_t;
#endif
#endif /* _mrn_mysql_compat_h */