-
Notifications
You must be signed in to change notification settings - Fork 1
/
vp_environ.h
81 lines (68 loc) · 2.81 KB
/
vp_environ.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
69
70
71
72
73
74
75
76
77
78
79
80
81
/* Copyright (C) 2019-2020 Kentoku Shiba
Copyright (C) 2019-2020 MariaDB corp
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/*
Define functionality offered by MySQL or MariaDB
*/
#ifndef VP_ENVIRON_INCLUDED
#define VP_ENVIRON_INCLUDED
#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100000
#define VP_HANDLER_START_BULK_INSERT_HAS_FLAGS
#endif
#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100203
#define HANDLER_HAS_TOP_TABLE_FIELDS
#define PARTITION_HAS_EXTRA_ATTACH_CHILDREN
#define PARTITION_HAS_GET_CHILD_HANDLERS
#define HA_EXTRA_HAS_STARTING_ORDERED_INDEX_SCAN
#endif
#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100204
#define VP_FIELD_BLOB_GET_PTR_RETURNS_UCHAR_PTR
#define HANDLER_HAS_DIRECT_UPDATE_ROWS
#define HANDLER_HAS_NEED_INFO_FOR_AUTO_INC
#define HANDLER_HAS_PRUNE_PARTITIONS_FOR_CHILD
#define HANDLER_HAS_GET_NEXT_GLOBAL_FOR_CHILD
#define HANDLER_HAS_CHECK_AND_SET_BITMAP_FOR_UPDATE
#else
#ifdef HANDLER_HAS_DIRECT_UPDATE_ROWS
#define HANDLER_HAS_DIRECT_UPDATE_ROWS_WITH_HS
#endif
#endif
#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100211
#define HANDLER_HAS_DIRECT_AGGREGATE
#endif
#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100300
#define VP_UPDATE_ROW_HAS_CONST_NEW_DATA
#define VP_PARTITION_HAS_CONNECTION_STRING
#define VP_REGISTER_QUERY_CACHE_TABLE_HAS_CONST_TABLE_KEY
#define VP_END_BULK_UPDATE_RETURNS_INT
#endif
#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100309
#define VP_MDEV_16246
#define VP_alter_table_operations alter_table_operations
#else
#define VP_alter_table_operations uint
#endif
#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100500
#define VP_HANDER_HAS_2_RESTORE_AUTO_INCREMENT
#define VP_HANDER_WRITE_ROW_FIRST_ARGUMENT_TYPE const uchar
#define VP_field_is_equal(A,B) (A)->is_equal(B)
#define VP_item_ref_table_name_str(A) (A)->table_name.str
#define VP_item_ref_table_name_length(A) (A)->table_name.length
#else
#define VP_HANDER_WRITE_ROW_FIRST_ARGUMENT_TYPE uchar
#define VP_HTON_HAS_STATE
#define VP_field_is_equal(A,B) (A)->is_equal(&(B))
#define VP_HAS_FIELD_GEOM
#define VP_item_ref_table_name_str(A) (A)->table_name
#define VP_item_ref_table_name_length(A) strlen((A)->table_name)
#endif
#endif /* VP_ENVIRON_INCLUDED */