~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin.h

Made the_query_id private. Thanks Jay.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#ifndef _my_plugin_h
21
 
#define _my_plugin_h
 
20
#ifndef DRIZZLED_PLUGIN_H
 
21
#define DRIZZLED_PLUGIN_H
22
22
 
23
23
#include <drizzled/global.h>
24
24
 
25
 
#ifdef __cplusplus
26
 
class THD;
 
25
class Session;
27
26
class Item;
28
 
#define DRIZZLE_THD THD*
29
 
#else
30
 
#define DRIZZLE_THD void*
31
 
#endif
32
27
 
33
28
#define DRIZZLE_XIDDATASIZE 128
34
29
/**
54
49
/*
55
50
  The allowable types of plugins
56
51
*/
57
 
#define DRIZZLE_DAEMON_PLUGIN          0  /* Daemon / Raw */
58
 
#define DRIZZLE_STORAGE_ENGINE_PLUGIN  1  /* Storage Engine */
59
 
#define DRIZZLE_INFORMATION_SCHEMA_PLUGIN  2  /* Information Schema */
60
 
#define DRIZZLE_UDF_PLUGIN             3  /* User-Defined Function */
61
 
#define DRIZZLE_UDA_PLUGIN             4  /* User-Defined Aggregate function */
62
 
#define DRIZZLE_AUDIT_PLUGIN           5  /* Audit */
63
 
#define DRIZZLE_LOGGER_PLUGIN          6  /* Logging */
64
 
#define DRIZZLE_AUTH_PLUGIN            7  /* Authorization */
 
52
enum drizzle_plugin_type {
 
53
  DRIZZLE_DAEMON_PLUGIN,                /* Daemon / Raw */
 
54
  DRIZZLE_STORAGE_ENGINE_PLUGIN,        /* Storage Engine */
 
55
  DRIZZLE_INFORMATION_SCHEMA_PLUGIN,    /* Information Schema */
 
56
  DRIZZLE_UDF_PLUGIN,                   /* User-Defined Function */
 
57
  DRIZZLE_UDA_PLUGIN,                   /* User-Defined Aggregate Function */
 
58
  DRIZZLE_AUDIT_PLUGIN,                 /* Audit */
 
59
  DRIZZLE_LOGGER_PLUGIN,                /* Query Logging */
 
60
  DRIZZLE_ERRMSG_PLUGIN,                /* Error Messages */
 
61
  DRIZZLE_AUTH_PLUGIN,                  /* Authorization */
 
62
  DRIZZLE_CONFIGVAR_PLUGIN,             /* Configuration Variables */
 
63
  DRIZZLE_QCACHE_PLUGIN,                /* Query Cache */
 
64
  DRIZZLE_PARSER_PLUGIN,                /* Language Parser */
 
65
  DRIZZLE_SCHEDULING_PLUGIN,            /* Thread and Session Scheduling */
 
66
  DRIZZLE_PLUGIN_MAX=DRIZZLE_SCHEDULING_PLUGIN
 
67
};
65
68
 
66
 
#define DRIZZLE_MAX_PLUGIN_TYPE_NUM    8  /* The number of plugin types */
 
69
/* The number of plugin types */
 
70
const uint32_t DRIZZLE_MAX_PLUGIN_TYPE_NUM=DRIZZLE_PLUGIN_MAX+1;
67
71
 
68
72
/* We use the following strings to define licenses for plugins */
69
 
#define PLUGIN_LICENSE_PROPRIETARY 0
70
 
#define PLUGIN_LICENSE_GPL 1
71
 
#define PLUGIN_LICENSE_BSD 2
 
73
enum plugin_license_type {
 
74
  PLUGIN_LICENSE_PROPRIETARY,
 
75
  PLUGIN_LICENSE_GPL,
 
76
  PLUGIN_LICENSE_BSD,
 
77
  PLUGIN_LICENSE_MAX=PLUGIN_LICENSE_BSD
 
78
};
72
79
 
73
 
#define PLUGIN_LICENSE_PROPRIETARY_STRING "PROPRIETARY"
74
 
#define PLUGIN_LICENSE_GPL_STRING "GPL"
75
 
#define PLUGIN_LICENSE_BSD_STRING "BSD"
 
80
const char * const PLUGIN_LICENSE_PROPRIETARY_STRING="PROPRIETARY";
 
81
const char * const PLUGIN_LICENSE_GPL_STRING="GPL";
 
82
const char * const PLUGIN_LICENSE_BSD_STRING="BSD";
76
83
 
77
84
/*
78
85
  Macros for beginning and ending plugin declarations.  Between
113
120
 
114
121
 
115
122
#define SHOW_VAR_FUNC_BUFF_SIZE 1024
116
 
typedef int (*mysql_show_var_func)(DRIZZLE_THD, struct st_mysql_show_var*, char *);
 
123
typedef int (*mysql_show_var_func)(Session *, struct st_mysql_show_var *, char *);
117
124
 
118
125
struct st_show_var_func_container {
119
126
  mysql_show_var_func func;
131
138
#define PLUGIN_VAR_ENUM         0x0006
132
139
#define PLUGIN_VAR_SET          0x0007
133
140
#define PLUGIN_VAR_UNSIGNED     0x0080
134
 
#define PLUGIN_VAR_THDLOCAL     0x0100 /* Variable is per-connection */
 
141
#define PLUGIN_VAR_SessionLOCAL     0x0100 /* Variable is per-connection */
135
142
#define PLUGIN_VAR_READONLY     0x0200 /* Server variable is read only */
136
143
#define PLUGIN_VAR_NOSYSVAR     0x0400 /* Not a server variable */
137
144
#define PLUGIN_VAR_NOCMDOPT     0x0800 /* Not a command line option */
146
153
/*
147
154
  SYNOPSIS
148
155
    (*mysql_var_check_func)()
149
 
      thd               thread handle
 
156
      session               thread handle
150
157
      var               dynamic variable being altered
151
158
      save              pointer to temporary storage
152
159
      value             user provided value
162
169
  automatically at the end of the statement.
163
170
*/
164
171
 
165
 
typedef int (*mysql_var_check_func)(DRIZZLE_THD thd,
 
172
typedef int (*mysql_var_check_func)(Session *session,
166
173
                                    struct st_mysql_sys_var *var,
167
174
                                    void *save, struct st_mysql_value *value);
168
175
 
169
176
/*
170
177
  SYNOPSIS
171
178
    (*mysql_var_update_func)()
172
 
      thd               thread handle
 
179
      session               thread handle
173
180
      var               dynamic variable being altered
174
181
      var_ptr           pointer to dynamic variable
175
182
      save              pointer to temporary storage
180
187
   and persist it in the provided pointer to the dynamic variable.
181
188
   For example, strings may require memory to be allocated.
182
189
*/
183
 
typedef void (*mysql_var_update_func)(DRIZZLE_THD thd,
 
190
typedef void (*mysql_var_update_func)(Session *session,
184
191
                                      struct st_mysql_sys_var *var,
185
192
                                      void *var_ptr, const void *save);
186
193
 
231
238
  TYPELIB *typelib;             \
232
239
} DRIZZLE_SYSVAR_NAME(name)
233
240
 
234
 
#define DECLARE_THDVAR_FUNC(type) \
235
 
  type *(*resolve)(DRIZZLE_THD thd, int offset)
 
241
#define DECLARE_SessionVAR_FUNC(type) \
 
242
  type *(*resolve)(Session *session, int offset)
236
243
 
237
 
#define DECLARE_DRIZZLE_THDVAR_BASIC(name, type) struct { \
 
244
#define DECLARE_DRIZZLE_SessionVAR_BASIC(name, type) struct { \
238
245
  DRIZZLE_PLUGIN_VAR_HEADER;      \
239
246
  int offset;                   \
240
247
  const type def_val;           \
241
 
  DECLARE_THDVAR_FUNC(type);    \
 
248
  DECLARE_SessionVAR_FUNC(type);    \
242
249
} DRIZZLE_SYSVAR_NAME(name)
243
250
 
244
 
#define DECLARE_DRIZZLE_THDVAR_SIMPLE(name, type) struct { \
 
251
#define DECLARE_DRIZZLE_SessionVAR_SIMPLE(name, type) struct { \
245
252
  DRIZZLE_PLUGIN_VAR_HEADER;      \
246
253
  int offset;                   \
247
254
  type def_val; type min_val;   \
248
255
  type max_val; type blk_sz;    \
249
 
  DECLARE_THDVAR_FUNC(type);    \
 
256
  DECLARE_SessionVAR_FUNC(type);    \
250
257
} DRIZZLE_SYSVAR_NAME(name)
251
258
 
252
 
#define DECLARE_DRIZZLE_THDVAR_TYPELIB(name, type) struct { \
 
259
#define DECLARE_DRIZZLE_SessionVAR_TYPELIB(name, type) struct { \
253
260
  DRIZZLE_PLUGIN_VAR_HEADER;      \
254
261
  int offset;                   \
255
262
  type def_val;                 \
256
 
  DECLARE_THDVAR_FUNC(type);    \
 
263
  DECLARE_SessionVAR_FUNC(type);    \
257
264
  TYPELIB *typelib;             \
258
265
} DRIZZLE_SYSVAR_NAME(name)
259
266
 
312
319
  PLUGIN_VAR_SET | ((opt) & PLUGIN_VAR_MASK), \
313
320
  #name, comment, check, update, &varname, def, typelib }
314
321
 
315
 
#define DRIZZLE_THDVAR_BOOL(name, opt, comment, check, update, def) \
316
 
DECLARE_DRIZZLE_THDVAR_BASIC(name, char) = { \
317
 
  PLUGIN_VAR_BOOL | PLUGIN_VAR_THDLOCAL | ((opt) & PLUGIN_VAR_MASK), \
318
 
  #name, comment, check, update, -1, def, NULL}
319
 
 
320
 
#define DRIZZLE_THDVAR_STR(name, opt, comment, check, update, def) \
321
 
DECLARE_DRIZZLE_THDVAR_BASIC(name, char *) = { \
322
 
  PLUGIN_VAR_STR | PLUGIN_VAR_THDLOCAL | ((opt) & PLUGIN_VAR_MASK), \
323
 
  #name, comment, check, update, -1, def, NULL}
324
 
 
325
 
#define DRIZZLE_THDVAR_INT(name, opt, comment, check, update, def, min, max, blk) \
326
 
DECLARE_DRIZZLE_THDVAR_SIMPLE(name, int) = { \
327
 
  PLUGIN_VAR_INT | PLUGIN_VAR_THDLOCAL | ((opt) & PLUGIN_VAR_MASK), \
328
 
  #name, comment, check, update, -1, def, min, max, blk, NULL }
329
 
 
330
 
#define DRIZZLE_THDVAR_UINT(name, opt, comment, check, update, def, min, max, blk) \
331
 
DECLARE_DRIZZLE_THDVAR_SIMPLE(name, unsigned int) = { \
332
 
  PLUGIN_VAR_INT | PLUGIN_VAR_THDLOCAL | PLUGIN_VAR_UNSIGNED | ((opt) & PLUGIN_VAR_MASK), \
333
 
  #name, comment, check, update, -1, def, min, max, blk, NULL }
334
 
 
335
 
#define DRIZZLE_THDVAR_LONG(name, opt, comment, check, update, def, min, max, blk) \
336
 
DECLARE_DRIZZLE_THDVAR_SIMPLE(name, long) = { \
337
 
  PLUGIN_VAR_LONG | PLUGIN_VAR_THDLOCAL | ((opt) & PLUGIN_VAR_MASK), \
338
 
  #name, comment, check, update, -1, def, min, max, blk, NULL }
339
 
 
340
 
#define DRIZZLE_THDVAR_ULONG(name, opt, comment, check, update, def, min, max, blk) \
341
 
DECLARE_DRIZZLE_THDVAR_SIMPLE(name, unsigned long) = { \
342
 
  PLUGIN_VAR_LONG | PLUGIN_VAR_THDLOCAL | PLUGIN_VAR_UNSIGNED | ((opt) & PLUGIN_VAR_MASK), \
343
 
  #name, comment, check, update, -1, def, min, max, blk, NULL }
344
 
 
345
 
#define DRIZZLE_THDVAR_LONGLONG(name, opt, comment, check, update, def, min, max, blk) \
346
 
DECLARE_DRIZZLE_THDVAR_SIMPLE(name, int64_t) = { \
347
 
  PLUGIN_VAR_LONGLONG | PLUGIN_VAR_THDLOCAL | ((opt) & PLUGIN_VAR_MASK), \
348
 
  #name, comment, check, update, -1, def, min, max, blk, NULL }
349
 
 
350
 
#define DRIZZLE_THDVAR_ULONGLONG(name, opt, comment, check, update, def, min, max, blk) \
351
 
DECLARE_DRIZZLE_THDVAR_SIMPLE(name, uint64_t) = { \
352
 
  PLUGIN_VAR_LONGLONG | PLUGIN_VAR_THDLOCAL | PLUGIN_VAR_UNSIGNED | ((opt) & PLUGIN_VAR_MASK), \
353
 
  #name, comment, check, update, -1, def, min, max, blk, NULL }
354
 
 
355
 
#define DRIZZLE_THDVAR_ENUM(name, opt, comment, check, update, def, typelib) \
356
 
DECLARE_DRIZZLE_THDVAR_TYPELIB(name, unsigned long) = { \
357
 
  PLUGIN_VAR_ENUM | PLUGIN_VAR_THDLOCAL | ((opt) & PLUGIN_VAR_MASK), \
 
322
#define DRIZZLE_SessionVAR_BOOL(name, opt, comment, check, update, def) \
 
323
DECLARE_DRIZZLE_SessionVAR_BASIC(name, char) = { \
 
324
  PLUGIN_VAR_BOOL | PLUGIN_VAR_SessionLOCAL | ((opt) & PLUGIN_VAR_MASK), \
 
325
  #name, comment, check, update, -1, def, NULL}
 
326
 
 
327
#define DRIZZLE_SessionVAR_STR(name, opt, comment, check, update, def) \
 
328
DECLARE_DRIZZLE_SessionVAR_BASIC(name, char *) = { \
 
329
  PLUGIN_VAR_STR | PLUGIN_VAR_SessionLOCAL | ((opt) & PLUGIN_VAR_MASK), \
 
330
  #name, comment, check, update, -1, def, NULL}
 
331
 
 
332
#define DRIZZLE_SessionVAR_INT(name, opt, comment, check, update, def, min, max, blk) \
 
333
DECLARE_DRIZZLE_SessionVAR_SIMPLE(name, int) = { \
 
334
  PLUGIN_VAR_INT | PLUGIN_VAR_SessionLOCAL | ((opt) & PLUGIN_VAR_MASK), \
 
335
  #name, comment, check, update, -1, def, min, max, blk, NULL }
 
336
 
 
337
#define DRIZZLE_SessionVAR_UINT(name, opt, comment, check, update, def, min, max, blk) \
 
338
DECLARE_DRIZZLE_SessionVAR_SIMPLE(name, unsigned int) = { \
 
339
  PLUGIN_VAR_INT | PLUGIN_VAR_SessionLOCAL | PLUGIN_VAR_UNSIGNED | ((opt) & PLUGIN_VAR_MASK), \
 
340
  #name, comment, check, update, -1, def, min, max, blk, NULL }
 
341
 
 
342
#define DRIZZLE_SessionVAR_LONG(name, opt, comment, check, update, def, min, max, blk) \
 
343
DECLARE_DRIZZLE_SessionVAR_SIMPLE(name, long) = { \
 
344
  PLUGIN_VAR_LONG | PLUGIN_VAR_SessionLOCAL | ((opt) & PLUGIN_VAR_MASK), \
 
345
  #name, comment, check, update, -1, def, min, max, blk, NULL }
 
346
 
 
347
#define DRIZZLE_SessionVAR_ULONG(name, opt, comment, check, update, def, min, max, blk) \
 
348
DECLARE_DRIZZLE_SessionVAR_SIMPLE(name, unsigned long) = { \
 
349
  PLUGIN_VAR_LONG | PLUGIN_VAR_SessionLOCAL | PLUGIN_VAR_UNSIGNED | ((opt) & PLUGIN_VAR_MASK), \
 
350
  #name, comment, check, update, -1, def, min, max, blk, NULL }
 
351
 
 
352
#define DRIZZLE_SessionVAR_LONGLONG(name, opt, comment, check, update, def, min, max, blk) \
 
353
DECLARE_DRIZZLE_SessionVAR_SIMPLE(name, int64_t) = { \
 
354
  PLUGIN_VAR_LONGLONG | PLUGIN_VAR_SessionLOCAL | ((opt) & PLUGIN_VAR_MASK), \
 
355
  #name, comment, check, update, -1, def, min, max, blk, NULL }
 
356
 
 
357
#define DRIZZLE_SessionVAR_ULONGLONG(name, opt, comment, check, update, def, min, max, blk) \
 
358
DECLARE_DRIZZLE_SessionVAR_SIMPLE(name, uint64_t) = { \
 
359
  PLUGIN_VAR_LONGLONG | PLUGIN_VAR_SessionLOCAL | PLUGIN_VAR_UNSIGNED | ((opt) & PLUGIN_VAR_MASK), \
 
360
  #name, comment, check, update, -1, def, min, max, blk, NULL }
 
361
 
 
362
#define DRIZZLE_SessionVAR_ENUM(name, opt, comment, check, update, def, typelib) \
 
363
DECLARE_DRIZZLE_SessionVAR_TYPELIB(name, unsigned long) = { \
 
364
  PLUGIN_VAR_ENUM | PLUGIN_VAR_SessionLOCAL | ((opt) & PLUGIN_VAR_MASK), \
358
365
  #name, comment, check, update, -1, def, NULL, typelib }
359
366
 
360
 
#define DRIZZLE_THDVAR_SET(name, opt, comment, check, update, def, typelib) \
361
 
DECLARE_DRIZZLE_THDVAR_TYPELIB(name, uint64_t) = { \
362
 
  PLUGIN_VAR_SET | PLUGIN_VAR_THDLOCAL | ((opt) & PLUGIN_VAR_MASK), \
 
367
#define DRIZZLE_SessionVAR_SET(name, opt, comment, check, update, def, typelib) \
 
368
DECLARE_DRIZZLE_SessionVAR_TYPELIB(name, uint64_t) = { \
 
369
  PLUGIN_VAR_SET | PLUGIN_VAR_SessionLOCAL | ((opt) & PLUGIN_VAR_MASK), \
363
370
  #name, comment, check, update, -1, def, NULL, typelib }
364
371
 
365
372
/* accessor macros */
367
374
#define SYSVAR(name) \
368
375
  (*(DRIZZLE_SYSVAR_NAME(name).value))
369
376
 
370
 
/* when thd == null, result points to global value */
371
 
#define THDVAR(thd, name) \
372
 
  (*(DRIZZLE_SYSVAR_NAME(name).resolve(thd, DRIZZLE_SYSVAR_NAME(name).offset)))
 
377
/* when session == null, result points to global value */
 
378
#define SessionVAR(session, name) \
 
379
  (*(DRIZZLE_SYSVAR_NAME(name).resolve(session, DRIZZLE_SYSVAR_NAME(name).offset)))
373
380
 
374
381
 
375
382
/*
378
385
 
379
386
struct st_mysql_plugin
380
387
{
381
 
  int type;             /* the plugin type (a DRIZZLE_XXX_PLUGIN value)   */
 
388
  uint32_t type;        /* the plugin type (a DRIZZLE_XXX_PLUGIN value)   */
382
389
  const char *name;     /* plugin name (for SHOW PLUGINS)               */
383
390
  const char *version;  /* plugin version (for SHOW PLUGINS)            */
384
391
  const char *author;   /* plugin author (for SHOW PLUGINS)             */
425
432
extern "C" {
426
433
#endif
427
434
 
428
 
int thd_in_lock_tables(const DRIZZLE_THD thd);
429
 
int thd_tablespace_op(const DRIZZLE_THD thd);
430
 
int64_t thd_test_options(const DRIZZLE_THD thd, int64_t test_options);
431
 
int thd_sql_command(const DRIZZLE_THD thd);
432
 
const char *thd_proc_info(DRIZZLE_THD thd, const char *info);
433
 
void **thd_ha_data(const DRIZZLE_THD thd, const struct handlerton *hton);
434
 
int thd_tx_isolation(const DRIZZLE_THD thd);
435
 
/* Increments the row counter, see THD::row_count */
436
 
void thd_inc_row_count(DRIZZLE_THD thd);
 
435
int session_in_lock_tables(const Session *session);
 
436
int session_tablespace_op(const Session *session);
 
437
int64_t session_test_options(const Session *session, int64_t test_options);
 
438
int session_sql_command(const Session *session);
 
439
void **session_ha_data(const Session *session, const struct handlerton *hton);
 
440
int session_tx_isolation(const Session *session);
 
441
/* Increments the row counter, see Session::row_count */
 
442
void session_inc_row_count(Session *session);
437
443
 
438
444
/**
439
445
  Create a temporary file.
459
465
  time-consuming loops, and gracefully abort the operation if it is
460
466
  non-zero.
461
467
 
462
 
  @param thd  user thread connection handle
 
468
  @param session  user thread connection handle
463
469
  @retval 0  the connection is active
464
470
  @retval 1  the connection has been killed
465
471
*/
466
 
int thd_killed(const DRIZZLE_THD thd);
 
472
int session_killed(const Session *session);
467
473
 
468
474
 
469
475
/**
470
476
  Return the thread id of a user thread
471
477
 
472
 
  @param thd  user thread connection handle
 
478
  @param session  user thread connection handle
473
479
  @return  thread id
474
480
*/
475
 
unsigned long thd_get_thread_id(const DRIZZLE_THD thd);
 
481
unsigned long session_get_thread_id(const Session *session);
476
482
 
477
483
 
478
484
/**
487
493
 
488
494
  @see alloc_root()
489
495
*/
490
 
void *thd_alloc(DRIZZLE_THD thd, unsigned int size);
491
 
/**
492
 
  @see thd_alloc()
493
 
*/
494
 
void *thd_calloc(DRIZZLE_THD thd, unsigned int size);
495
 
/**
496
 
  @see thd_alloc()
497
 
*/
498
 
char *thd_strdup(DRIZZLE_THD thd, const char *str);
499
 
/**
500
 
  @see thd_alloc()
501
 
*/
502
 
char *thd_strmake(DRIZZLE_THD thd, const char *str, unsigned int size);
503
 
/**
504
 
  @see thd_alloc()
505
 
*/
506
 
void *thd_memdup(DRIZZLE_THD thd, const void* str, unsigned int size);
 
496
void *session_alloc(Session *session, unsigned int size);
 
497
/**
 
498
  @see session_alloc()
 
499
*/
 
500
void *session_calloc(Session *session, unsigned int size);
 
501
/**
 
502
  @see session_alloc()
 
503
*/
 
504
char *session_strdup(Session *session, const char *str);
 
505
/**
 
506
  @see session_alloc()
 
507
*/
 
508
char *session_strmake(Session *session, const char *str, unsigned int size);
 
509
/**
 
510
  @see session_alloc()
 
511
*/
 
512
void *session_memdup(Session *session, const void* str, unsigned int size);
507
513
 
508
514
/**
509
515
  Get the XID for this connection's transaction
510
516
 
511
 
  @param thd  user thread connection handle
 
517
  @param session  user thread connection handle
512
518
  @param xid  location where identifier is stored
513
519
*/
514
 
void thd_get_xid(const DRIZZLE_THD thd, DRIZZLE_XID *xid);
 
520
void session_get_xid(const Session *session, DRIZZLE_XID *xid);
515
521
 
516
522
/**
517
523
  Invalidate the query cache for a given table.
518
524
 
519
 
  @param thd         user thread connection handle
 
525
  @param session         user thread connection handle
520
526
  @param key         databasename\\0tablename\\0
521
527
  @param key_length  length of key in bytes, including the NUL bytes
522
528
  @param using_trx   flag: TRUE if using transactions, FALSE otherwise
523
529
*/
524
 
void mysql_query_cache_invalidate4(DRIZZLE_THD thd,
 
530
void mysql_query_cache_invalidate4(Session *session,
525
531
                                   const char *key, unsigned int key_length,
526
532
                                   int using_trx);
527
533
 
535
541
*/
536
542
inline
537
543
void *
538
 
thd_get_ha_data(const DRIZZLE_THD thd, const struct handlerton *hton)
 
544
session_get_ha_data(const Session *session, const struct handlerton *hton)
539
545
{
540
 
  return *thd_ha_data(thd, hton);
 
546
  return *session_ha_data(session, hton);
541
547
}
542
548
 
543
549
/**
545
551
*/
546
552
inline
547
553
void
548
 
thd_set_ha_data(const DRIZZLE_THD thd, const struct handlerton *hton,
 
554
session_set_ha_data(const Session *session, const struct handlerton *hton,
549
555
                const void *ha_data)
550
556
{
551
 
  *thd_ha_data(thd, hton)= (void*) ha_data;
 
557
  *session_ha_data(session, hton)= (void*) ha_data;
552
558
}
553
559
#endif
554
560
 
555
 
#endif
 
561
#endif /* _my_plugin_h */
556
562