1
/* Copyright (C) 2005 MySQL AB
3
This program is free software; you can redistribute it and/or modify
4
it under the terms of the GNU General Public License as published by
5
the Free Software Foundation; version 2 of the License.
7
This program is distributed in the hope that it will be useful,
8
but WITHOUT ANY WARRANTY; without even the implied warranty of
9
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
GNU General Public License for more details.
12
You should have received a copy of the GNU General Public License
13
along with this program; if not, write to the Free Software
14
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
22
#define MYSQL_THD THD*
24
#define MYSQL_THD void*
28
/* This definition must match the one given in m_string.h */
29
struct st_mysql_lex_string
34
#endif /* _m_string_h */
35
typedef struct st_mysql_lex_string MYSQL_LEX_STRING;
37
#define MYSQL_XIDDATASIZE 128
39
struct st_mysql_xid is binary compatible with the XID structure as
40
in the X/Open CAE Specification, Distributed Transaction Processing:
41
The XA Specification, X/Open Company Ltd., 1991.
42
http://www.opengroup.org/bookstore/catalog/c193.htm
44
@see XID in sql/handler.h
50
char data[MYSQL_XIDDATASIZE]; /* Not \0-terminated */
52
typedef struct st_mysql_xid MYSQL_XID;
54
/*************************************************************************
55
Plugin API. Common for all plugin types.
58
#define MYSQL_PLUGIN_INTERFACE_VERSION 0x0100
61
The allowable types of plugins
63
#define MYSQL_UDF_PLUGIN 0 /* User-defined function */
64
#define MYSQL_STORAGE_ENGINE_PLUGIN 1 /* Storage Engine */
65
#define MYSQL_FTPARSER_PLUGIN 2 /* Full-text parser plugin */
66
#define MYSQL_DAEMON_PLUGIN 3 /* The daemon/raw plugin type */
67
#define MYSQL_INFORMATION_SCHEMA_PLUGIN 4 /* The I_S plugin type */
68
#define MYSQL_AUDIT_PLUGIN 5 /* The Audit plugin type */
69
#define MYSQL_MAX_PLUGIN_TYPE_NUM 6 /* The number of plugin types */
71
/* We use the following strings to define licenses for plugins */
72
#define PLUGIN_LICENSE_PROPRIETARY 0
73
#define PLUGIN_LICENSE_GPL 1
74
#define PLUGIN_LICENSE_BSD 2
76
#define PLUGIN_LICENSE_PROPRIETARY_STRING "PROPRIETARY"
77
#define PLUGIN_LICENSE_GPL_STRING "GPL"
78
#define PLUGIN_LICENSE_BSD_STRING "BSD"
81
Macros for beginning and ending plugin declarations. Between
82
mysql_declare_plugin and mysql_declare_plugin_end there should
83
be a st_mysql_plugin struct for each plugin to be declared.
87
#ifndef MYSQL_DYNAMIC_PLUGIN
88
#define __MYSQL_DECLARE_PLUGIN(NAME, VERSION, PSIZE, DECLS) \
89
int VERSION= MYSQL_PLUGIN_INTERFACE_VERSION; \
90
int PSIZE= sizeof(struct st_mysql_plugin); \
91
struct st_mysql_plugin DECLS[]= {
93
#define __MYSQL_DECLARE_PLUGIN(NAME, VERSION, PSIZE, DECLS) \
94
int _mysql_plugin_interface_version_= MYSQL_PLUGIN_INTERFACE_VERSION; \
95
int _mysql_sizeof_struct_st_plugin_= sizeof(struct st_mysql_plugin); \
96
struct st_mysql_plugin _mysql_plugin_declarations_[]= {
99
#define mysql_declare_plugin(NAME) \
100
__MYSQL_DECLARE_PLUGIN(NAME, \
101
builtin_ ## NAME ## _plugin_interface_version, \
102
builtin_ ## NAME ## _sizeof_struct_st_plugin, \
103
builtin_ ## NAME ## _plugin)
105
#define mysql_declare_plugin_end ,{0,0,0,0,0,0,0,0,0,0,0,0}}
108
declarations for SHOW STATUS support in plugins
110
enum enum_mysql_show_type
112
SHOW_UNDEF, SHOW_BOOL, SHOW_INT, SHOW_LONG,
113
SHOW_LONGLONG, SHOW_CHAR, SHOW_CHAR_PTR,
114
SHOW_ARRAY, SHOW_FUNC, SHOW_DOUBLE
117
struct st_mysql_show_var {
120
enum enum_mysql_show_type type;
123
#define SHOW_VAR_FUNC_BUFF_SIZE 1024
124
typedef int (*mysql_show_var_func)(MYSQL_THD, struct st_mysql_show_var*, char *);
128
declarations for server variables and command line options
132
#define PLUGIN_VAR_BOOL 0x0001
133
#define PLUGIN_VAR_INT 0x0002
134
#define PLUGIN_VAR_LONG 0x0003
135
#define PLUGIN_VAR_LONGLONG 0x0004
136
#define PLUGIN_VAR_STR 0x0005
137
#define PLUGIN_VAR_ENUM 0x0006
138
#define PLUGIN_VAR_SET 0x0007
139
#define PLUGIN_VAR_UNSIGNED 0x0080
140
#define PLUGIN_VAR_THDLOCAL 0x0100 /* Variable is per-connection */
141
#define PLUGIN_VAR_READONLY 0x0200 /* Server variable is read only */
142
#define PLUGIN_VAR_NOSYSVAR 0x0400 /* Not a server variable */
143
#define PLUGIN_VAR_NOCMDOPT 0x0800 /* Not a command line option */
144
#define PLUGIN_VAR_NOCMDARG 0x1000 /* No argument for cmd line */
145
#define PLUGIN_VAR_RQCMDARG 0x0000 /* Argument required for cmd line */
146
#define PLUGIN_VAR_OPCMDARG 0x2000 /* Argument optional for cmd line */
147
#define PLUGIN_VAR_MEMALLOC 0x8000 /* String needs memory allocated */
149
struct st_mysql_sys_var;
150
struct st_mysql_value;
154
(*mysql_var_check_func)()
156
var dynamic variable being altered
157
save pointer to temporary storage
158
value user provided value
160
0 user provided value is OK and the update func may be called.
161
any other value indicates error.
163
This function should parse the user provided value and store in the
164
provided temporary storage any data as required by the update func.
165
There is sufficient space in the temporary storage to store a double.
166
Note that the update func may not be called if any other error occurs
167
so any memory allocated should be thread-local so that it may be freed
168
automatically at the end of the statement.
171
typedef int (*mysql_var_check_func)(MYSQL_THD thd,
172
struct st_mysql_sys_var *var,
173
void *save, struct st_mysql_value *value);
177
(*mysql_var_update_func)()
179
var dynamic variable being altered
180
var_ptr pointer to dynamic variable
181
save pointer to temporary storage
185
This function should use the validated value stored in the temporary store
186
and persist it in the provided pointer to the dynamic variable.
187
For example, strings may require memory to be allocated.
189
typedef void (*mysql_var_update_func)(MYSQL_THD thd,
190
struct st_mysql_sys_var *var,
191
void *var_ptr, const void *save);
194
/* the following declarations are for internal use only */
197
#define PLUGIN_VAR_MASK \
198
(PLUGIN_VAR_READONLY | PLUGIN_VAR_NOSYSVAR | \
199
PLUGIN_VAR_NOCMDOPT | PLUGIN_VAR_NOCMDARG | \
200
PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_MEMALLOC)
202
#define MYSQL_PLUGIN_VAR_HEADER \
205
const char *comment; \
206
mysql_var_check_func check; \
207
mysql_var_update_func update
209
#define MYSQL_SYSVAR_NAME(name) mysql_sysvar_ ## name
210
#define MYSQL_SYSVAR(name) \
211
((struct st_mysql_sys_var *)&(MYSQL_SYSVAR_NAME(name)))
214
for global variables, the value pointer is the first
215
element after the header, the default value is the second.
216
for thread variables, the value offset is the first
217
element after the header, the default value is the second.
221
#define DECLARE_MYSQL_SYSVAR_BASIC(name, type) struct { \
222
MYSQL_PLUGIN_VAR_HEADER; \
224
const type def_val; \
225
} MYSQL_SYSVAR_NAME(name)
227
#define DECLARE_MYSQL_SYSVAR_SIMPLE(name, type) struct { \
228
MYSQL_PLUGIN_VAR_HEADER; \
229
type *value; type def_val; \
230
type min_val; type max_val; \
232
} MYSQL_SYSVAR_NAME(name)
234
#define DECLARE_MYSQL_SYSVAR_TYPELIB(name, type) struct { \
235
MYSQL_PLUGIN_VAR_HEADER; \
236
type *value; type def_val; \
238
} MYSQL_SYSVAR_NAME(name)
240
#define DECLARE_THDVAR_FUNC(type) \
241
type *(*resolve)(MYSQL_THD thd, int offset)
243
#define DECLARE_MYSQL_THDVAR_BASIC(name, type) struct { \
244
MYSQL_PLUGIN_VAR_HEADER; \
246
const type def_val; \
247
DECLARE_THDVAR_FUNC(type); \
248
} MYSQL_SYSVAR_NAME(name)
250
#define DECLARE_MYSQL_THDVAR_SIMPLE(name, type) struct { \
251
MYSQL_PLUGIN_VAR_HEADER; \
253
type def_val; type min_val; \
254
type max_val; type blk_sz; \
255
DECLARE_THDVAR_FUNC(type); \
256
} MYSQL_SYSVAR_NAME(name)
258
#define DECLARE_MYSQL_THDVAR_TYPELIB(name, type) struct { \
259
MYSQL_PLUGIN_VAR_HEADER; \
262
DECLARE_THDVAR_FUNC(type); \
264
} MYSQL_SYSVAR_NAME(name)
268
the following declarations are for use by plugin implementors
271
#define MYSQL_SYSVAR_BOOL(name, varname, opt, comment, check, update, def) \
272
DECLARE_MYSQL_SYSVAR_BASIC(name, char) = { \
273
PLUGIN_VAR_BOOL | ((opt) & PLUGIN_VAR_MASK), \
274
#name, comment, check, update, &varname, def}
276
#define MYSQL_SYSVAR_STR(name, varname, opt, comment, check, update, def) \
277
DECLARE_MYSQL_SYSVAR_BASIC(name, char *) = { \
278
PLUGIN_VAR_STR | ((opt) & PLUGIN_VAR_MASK), \
279
#name, comment, check, update, &varname, def}
281
#define MYSQL_SYSVAR_INT(name, varname, opt, comment, check, update, def, min, max, blk) \
282
DECLARE_MYSQL_SYSVAR_SIMPLE(name, int) = { \
283
PLUGIN_VAR_INT | ((opt) & PLUGIN_VAR_MASK), \
284
#name, comment, check, update, &varname, def, min, max, blk }
286
#define MYSQL_SYSVAR_UINT(name, varname, opt, comment, check, update, def, min, max, blk) \
287
DECLARE_MYSQL_SYSVAR_SIMPLE(name, unsigned int) = { \
288
PLUGIN_VAR_INT | PLUGIN_VAR_UNSIGNED | ((opt) & PLUGIN_VAR_MASK), \
289
#name, comment, check, update, &varname, def, min, max, blk }
291
#define MYSQL_SYSVAR_LONG(name, varname, opt, comment, check, update, def, min, max, blk) \
292
DECLARE_MYSQL_SYSVAR_SIMPLE(name, long) = { \
293
PLUGIN_VAR_LONG | ((opt) & PLUGIN_VAR_MASK), \
294
#name, comment, check, update, &varname, def, min, max, blk }
296
#define MYSQL_SYSVAR_ULONG(name, varname, opt, comment, check, update, def, min, max, blk) \
297
DECLARE_MYSQL_SYSVAR_SIMPLE(name, unsigned long) = { \
298
PLUGIN_VAR_LONG | PLUGIN_VAR_UNSIGNED | ((opt) & PLUGIN_VAR_MASK), \
299
#name, comment, check, update, &varname, def, min, max, blk }
301
#define MYSQL_SYSVAR_LONGLONG(name, varname, opt, comment, check, update, def, min, max, blk) \
302
DECLARE_MYSQL_SYSVAR_SIMPLE(name, long long) = { \
303
PLUGIN_VAR_LONGLONG | ((opt) & PLUGIN_VAR_MASK), \
304
#name, comment, check, update, &varname, def, min, max, blk }
306
#define MYSQL_SYSVAR_ULONGLONG(name, varname, opt, comment, check, update, def, min, max, blk) \
307
DECLARE_MYSQL_SYSVAR_SIMPLE(name, unsigned long long) = { \
308
PLUGIN_VAR_LONGLONG | PLUGIN_VAR_UNSIGNED | ((opt) & PLUGIN_VAR_MASK), \
309
#name, comment, check, update, &varname, def, min, max, blk }
311
#define MYSQL_SYSVAR_ENUM(name, varname, opt, comment, check, update, def, typelib) \
312
DECLARE_MYSQL_SYSVAR_TYPELIB(name, unsigned long) = { \
313
PLUGIN_VAR_ENUM | ((opt) & PLUGIN_VAR_MASK), \
314
#name, comment, check, update, &varname, def, typelib }
316
#define MYSQL_SYSVAR_SET(name, varname, opt, comment, check, update, def, typelib) \
317
DECLARE_MYSQL_SYSVAR_TYPELIB(name, unsigned long long) = { \
318
PLUGIN_VAR_SET | ((opt) & PLUGIN_VAR_MASK), \
319
#name, comment, check, update, &varname, def, typelib }
321
#define MYSQL_THDVAR_BOOL(name, opt, comment, check, update, def) \
322
DECLARE_MYSQL_THDVAR_BASIC(name, char) = { \
323
PLUGIN_VAR_BOOL | PLUGIN_VAR_THDLOCAL | ((opt) & PLUGIN_VAR_MASK), \
324
#name, comment, check, update, -1, def, NULL}
326
#define MYSQL_THDVAR_STR(name, opt, comment, check, update, def) \
327
DECLARE_MYSQL_THDVAR_BASIC(name, char *) = { \
328
PLUGIN_VAR_STR | PLUGIN_VAR_THDLOCAL | ((opt) & PLUGIN_VAR_MASK), \
329
#name, comment, check, update, -1, def, NULL}
331
#define MYSQL_THDVAR_INT(name, opt, comment, check, update, def, min, max, blk) \
332
DECLARE_MYSQL_THDVAR_SIMPLE(name, int) = { \
333
PLUGIN_VAR_INT | PLUGIN_VAR_THDLOCAL | ((opt) & PLUGIN_VAR_MASK), \
334
#name, comment, check, update, -1, def, min, max, blk, NULL }
336
#define MYSQL_THDVAR_UINT(name, opt, comment, check, update, def, min, max, blk) \
337
DECLARE_MYSQL_THDVAR_SIMPLE(name, unsigned int) = { \
338
PLUGIN_VAR_INT | PLUGIN_VAR_THDLOCAL | PLUGIN_VAR_UNSIGNED | ((opt) & PLUGIN_VAR_MASK), \
339
#name, comment, check, update, -1, def, min, max, blk, NULL }
341
#define MYSQL_THDVAR_LONG(name, opt, comment, check, update, def, min, max, blk) \
342
DECLARE_MYSQL_THDVAR_SIMPLE(name, long) = { \
343
PLUGIN_VAR_LONG | PLUGIN_VAR_THDLOCAL | ((opt) & PLUGIN_VAR_MASK), \
344
#name, comment, check, update, -1, def, min, max, blk, NULL }
346
#define MYSQL_THDVAR_ULONG(name, opt, comment, check, update, def, min, max, blk) \
347
DECLARE_MYSQL_THDVAR_SIMPLE(name, unsigned long) = { \
348
PLUGIN_VAR_LONG | PLUGIN_VAR_THDLOCAL | PLUGIN_VAR_UNSIGNED | ((opt) & PLUGIN_VAR_MASK), \
349
#name, comment, check, update, -1, def, min, max, blk, NULL }
351
#define MYSQL_THDVAR_LONGLONG(name, opt, comment, check, update, def, min, max, blk) \
352
DECLARE_MYSQL_THDVAR_SIMPLE(name, long long) = { \
353
PLUGIN_VAR_LONGLONG | PLUGIN_VAR_THDLOCAL | ((opt) & PLUGIN_VAR_MASK), \
354
#name, comment, check, update, -1, def, min, max, blk, NULL }
356
#define MYSQL_THDVAR_ULONGLONG(name, opt, comment, check, update, def, min, max, blk) \
357
DECLARE_MYSQL_THDVAR_SIMPLE(name, unsigned long long) = { \
358
PLUGIN_VAR_LONGLONG | PLUGIN_VAR_THDLOCAL | PLUGIN_VAR_UNSIGNED | ((opt) & PLUGIN_VAR_MASK), \
359
#name, comment, check, update, -1, def, min, max, blk, NULL }
361
#define MYSQL_THDVAR_ENUM(name, opt, comment, check, update, def, typelib) \
362
DECLARE_MYSQL_THDVAR_TYPELIB(name, unsigned long) = { \
363
PLUGIN_VAR_ENUM | PLUGIN_VAR_THDLOCAL | ((opt) & PLUGIN_VAR_MASK), \
364
#name, comment, check, update, -1, def, NULL, typelib }
366
#define MYSQL_THDVAR_SET(name, opt, comment, check, update, def, typelib) \
367
DECLARE_MYSQL_THDVAR_TYPELIB(name, unsigned long long) = { \
368
PLUGIN_VAR_SET | PLUGIN_VAR_THDLOCAL | ((opt) & PLUGIN_VAR_MASK), \
369
#name, comment, check, update, -1, def, NULL, typelib }
371
/* accessor macros */
373
#define SYSVAR(name) \
374
(*(MYSQL_SYSVAR_NAME(name).value))
376
/* when thd == null, result points to global value */
377
#define THDVAR(thd, name) \
378
(*(MYSQL_SYSVAR_NAME(name).resolve(thd, MYSQL_SYSVAR_NAME(name).offset)))
382
Plugin description structure.
385
struct st_mysql_plugin
387
int type; /* the plugin type (a MYSQL_XXX_PLUGIN value) */
388
void *info; /* pointer to type-specific plugin descriptor */
389
const char *name; /* plugin name */
390
const char *author; /* plugin author (for SHOW PLUGINS) */
391
const char *descr; /* general descriptive text (for SHOW PLUGINS ) */
392
int license; /* the plugin license (PLUGIN_LICENSE_XXX) */
393
int (*init)(void *); /* the function to invoke when plugin is loaded */
394
int (*deinit)(void *);/* the function to invoke when plugin is unloaded */
395
unsigned int version; /* plugin version (for SHOW PLUGINS) */
396
struct st_mysql_show_var *status_vars;
397
struct st_mysql_sys_var **system_vars;
398
void * __reserved1; /* reserved for dependency checking */
401
/*************************************************************************
402
API for Full-text parser plugin. (MYSQL_FTPARSER_PLUGIN)
404
#include "plugin_ftparser.h"
406
/*************************************************************************
407
API for Storage Engine plugin. (MYSQL_DAEMON_PLUGIN)
410
/* handlertons of different MySQL releases are incompatible */
411
#define MYSQL_DAEMON_INTERFACE_VERSION (MYSQL_VERSION_ID << 8)
414
Here we define only the descriptor structure, that is referred from
418
struct st_mysql_daemon
420
int interface_version;
424
/*************************************************************************
425
API for I_S plugin. (MYSQL_INFORMATION_SCHEMA_PLUGIN)
428
/* handlertons of different MySQL releases are incompatible */
429
#define MYSQL_INFORMATION_SCHEMA_INTERFACE_VERSION (MYSQL_VERSION_ID << 8)
432
Here we define only the descriptor structure, that is referred from
436
struct st_mysql_information_schema
438
int interface_version;
442
/*************************************************************************
443
API for Storage Engine plugin. (MYSQL_STORAGE_ENGINE_PLUGIN)
446
/* handlertons of different MySQL releases are incompatible */
447
#define MYSQL_HANDLERTON_INTERFACE_VERSION (MYSQL_VERSION_ID << 8)
450
The real API is in the sql/handler.h
451
Here we define only the descriptor structure, that is referred from
455
struct st_mysql_storage_engine
457
int interface_version;
463
/*************************************************************************
464
st_mysql_value struct for reading values from mysqld.
465
Used by server variables framework to parse user-provided values.
466
Will be used for arguments when implementing UDFs.
468
Note that val_str() returns a string in temporary memory
469
that will be freed at the end of statement. Copy the string
470
if you need it to persist.
473
#define MYSQL_VALUE_TYPE_STRING 0
474
#define MYSQL_VALUE_TYPE_REAL 1
475
#define MYSQL_VALUE_TYPE_INT 2
477
struct st_mysql_value
479
int (*value_type)(struct st_mysql_value *);
480
const char *(*val_str)(struct st_mysql_value *, char *buffer, int *length);
481
int (*val_real)(struct st_mysql_value *, double *realbuf);
482
int (*val_int)(struct st_mysql_value *, long long *intbuf);
486
/*************************************************************************
487
Miscellaneous functions for plugin implementors
494
int thd_in_lock_tables(const MYSQL_THD thd);
495
int thd_tablespace_op(const MYSQL_THD thd);
496
long long thd_test_options(const MYSQL_THD thd, long long test_options);
497
int thd_sql_command(const MYSQL_THD thd);
498
const char *thd_proc_info(MYSQL_THD thd, const char *info);
499
void **thd_ha_data(const MYSQL_THD thd, const struct handlerton *hton);
500
int thd_tx_isolation(const MYSQL_THD thd);
501
char *thd_security_context(MYSQL_THD thd, char *buffer, unsigned int length,
502
unsigned int max_query_len);
503
/* Increments the row counter, see THD::row_count */
504
void thd_inc_row_count(MYSQL_THD thd);
507
Create a temporary file.
510
The temporary file is created in a location specified by the mysql
511
server configuration (--tmpdir option). The caller does not need to
512
delete the file, it will be deleted automatically.
514
@param prefix prefix for temporary file name
516
@retval >= 0 a file handle that can be passed to dup or my_close
518
int mysql_tmpfile(const char *prefix);
521
Check the killed state of a connection
524
In MySQL support for the KILL statement is cooperative. The KILL
525
statement only sets a "killed" flag. This function returns the value
526
of that flag. A thread should check it often, especially inside
527
time-consuming loops, and gracefully abort the operation if it is
530
@param thd user thread connection handle
531
@retval 0 the connection is active
532
@retval 1 the connection has been killed
534
int thd_killed(const MYSQL_THD thd);
538
Return the thread id of a user thread
540
@param thd user thread connection handle
543
unsigned long thd_get_thread_id(const MYSQL_THD thd);
547
Allocate memory in the connection's local memory pool
550
When properly used in place of @c my_malloc(), this can significantly
551
improve concurrency. Don't use this or related functions to allocate
552
large chunks of memory. Use for temporary storage only. The memory
553
will be freed automatically at the end of the statement; no explicit
554
code is required to prevent memory leaks.
558
void *thd_alloc(MYSQL_THD thd, unsigned int size);
562
void *thd_calloc(MYSQL_THD thd, unsigned int size);
566
char *thd_strdup(MYSQL_THD thd, const char *str);
570
char *thd_strmake(MYSQL_THD thd, const char *str, unsigned int size);
574
void *thd_memdup(MYSQL_THD thd, const void* str, unsigned int size);
577
Create a LEX_STRING in this connection's local memory pool
579
@param thd user thread connection handle
580
@param lex_str pointer to LEX_STRING object to be initialized
581
@param str initializer to be copied into lex_str
582
@param size length of str, in bytes
583
@param allocate_lex_string flag: if TRUE, allocate new LEX_STRING object,
584
instead of using lex_str value
585
@return NULL on failure, or pointer to the LEX_STRING object
589
MYSQL_LEX_STRING *thd_make_lex_string(MYSQL_THD thd, MYSQL_LEX_STRING *lex_str,
590
const char *str, unsigned int size,
591
int allocate_lex_string);
594
Get the XID for this connection's transaction
596
@param thd user thread connection handle
597
@param xid location where identifier is stored
599
void thd_get_xid(const MYSQL_THD thd, MYSQL_XID *xid);
602
Invalidate the query cache for a given table.
604
@param thd user thread connection handle
605
@param key databasename\\0tablename\\0
606
@param key_length length of key in bytes, including the NUL bytes
607
@param using_trx flag: TRUE if using transactions, FALSE otherwise
609
void mysql_query_cache_invalidate4(MYSQL_THD thd,
610
const char *key, unsigned int key_length,
619
Provide a handler data getter to simplify coding
623
thd_get_ha_data(const MYSQL_THD thd, const struct handlerton *hton)
625
return *thd_ha_data(thd, hton);
629
Provide a handler data setter to simplify coding
633
thd_set_ha_data(const MYSQL_THD thd, const struct handlerton *hton,
636
*thd_ha_data(thd, hton)= (void*) ha_data;