plugin_audit.h.pp 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514
  1. #include "plugin.h"
  2. typedef void * MYSQL_PLUGIN;
  3. struct st_mysql_xid {
  4. long formatID;
  5. long gtrid_length;
  6. long bqual_length;
  7. char data[128];
  8. };
  9. typedef struct st_mysql_xid MYSQL_XID;
  10. enum enum_mysql_show_type
  11. {
  12. SHOW_UNDEF, SHOW_BOOL,
  13. SHOW_INT,
  14. SHOW_LONG,
  15. SHOW_LONGLONG,
  16. SHOW_CHAR, SHOW_CHAR_PTR,
  17. SHOW_ARRAY, SHOW_FUNC, SHOW_DOUBLE
  18. };
  19. enum enum_mysql_show_scope
  20. {
  21. SHOW_SCOPE_UNDEF,
  22. SHOW_SCOPE_GLOBAL
  23. };
  24. struct st_mysql_show_var
  25. {
  26. const char *name;
  27. char *value;
  28. enum enum_mysql_show_type type;
  29. enum enum_mysql_show_scope scope;
  30. };
  31. typedef int (*mysql_show_var_func)(void*, struct st_mysql_show_var*, char *);
  32. struct st_mysql_sys_var;
  33. struct st_mysql_value;
  34. typedef int (*mysql_var_check_func)(void* thd,
  35. struct st_mysql_sys_var *var,
  36. void *save, struct st_mysql_value *value);
  37. typedef void (*mysql_var_update_func)(void* thd,
  38. struct st_mysql_sys_var *var,
  39. void *var_ptr, const void *save);
  40. struct st_mysql_plugin
  41. {
  42. int type;
  43. void *info;
  44. const char *name;
  45. const char *author;
  46. const char *descr;
  47. int license;
  48. int (*init)(MYSQL_PLUGIN);
  49. int (*deinit)(MYSQL_PLUGIN);
  50. unsigned int version;
  51. struct st_mysql_show_var *status_vars;
  52. struct st_mysql_sys_var **system_vars;
  53. void * __reserved1;
  54. unsigned long flags;
  55. };
  56. struct st_mysql_daemon
  57. {
  58. int interface_version;
  59. };
  60. struct st_mysql_information_schema
  61. {
  62. int interface_version;
  63. };
  64. struct st_mysql_storage_engine
  65. {
  66. int interface_version;
  67. };
  68. struct handlerton;
  69. struct Mysql_replication {
  70. int interface_version;
  71. };
  72. struct st_mysql_value
  73. {
  74. int (*value_type)(struct st_mysql_value *);
  75. const char *(*val_str)(struct st_mysql_value *, char *buffer, int *length);
  76. int (*val_real)(struct st_mysql_value *, double *realbuf);
  77. int (*val_int)(struct st_mysql_value *, long long *intbuf);
  78. int (*is_unsigned)(struct st_mysql_value *);
  79. };
  80. int thd_in_lock_tables(const void* thd);
  81. int thd_tablespace_op(const void* thd);
  82. long long thd_test_options(const void* thd, long long test_options);
  83. int thd_sql_command(const void* thd);
  84. const char *set_thd_proc_info(void* thd, const char *info,
  85. const char *calling_func,
  86. const char *calling_file,
  87. const unsigned int calling_line);
  88. void **thd_ha_data(const void* thd, const struct handlerton *hton);
  89. void thd_storage_lock_wait(void* thd, long long value);
  90. int thd_tx_isolation(const void* thd);
  91. int thd_tx_is_read_only(const void* thd);
  92. void* thd_tx_arbitrate(void* requestor, void* holder);
  93. int thd_tx_priority(const void* thd);
  94. int thd_tx_is_dd_trx(const void* thd);
  95. char *thd_security_context(void* thd, char *buffer, size_t length,
  96. size_t max_query_len);
  97. void thd_inc_row_count(void* thd);
  98. int thd_allow_batch(void* thd);
  99. void thd_mark_transaction_to_rollback(void* thd, int all);
  100. int mysql_tmpfile(const char *prefix);
  101. int thd_killed(const void* thd);
  102. void thd_set_kill_status(const void* thd);
  103. void thd_binlog_pos(const void* thd,
  104. const char **file_var,
  105. unsigned long long *pos_var);
  106. unsigned long thd_get_thread_id(const void* thd);
  107. void thd_get_xid(const void* thd, MYSQL_XID *xid);
  108. void mysql_query_cache_invalidate4(void* thd,
  109. const char *key, unsigned int key_length,
  110. int using_trx);
  111. void *thd_get_ha_data(const void* thd, const struct handlerton *hton);
  112. void thd_set_ha_data(void* thd, const struct handlerton *hton,
  113. const void *ha_data);
  114. #include "mysql/mysql_lex_string.h"
  115. struct st_mysql_lex_string
  116. {
  117. char *str;
  118. size_t length;
  119. };
  120. typedef struct st_mysql_lex_string MYSQL_LEX_STRING;
  121. struct st_mysql_const_lex_string
  122. {
  123. const char *str;
  124. size_t length;
  125. };
  126. typedef struct st_mysql_const_lex_string MYSQL_LEX_CSTRING;
  127. #include "my_command.h"
  128. enum enum_server_command
  129. {
  130. COM_SLEEP,
  131. COM_QUIT,
  132. COM_INIT_DB,
  133. COM_QUERY,
  134. COM_FIELD_LIST,
  135. COM_CREATE_DB,
  136. COM_DROP_DB,
  137. COM_REFRESH,
  138. COM_SHUTDOWN,
  139. COM_STATISTICS,
  140. COM_PROCESS_INFO,
  141. COM_CONNECT,
  142. COM_PROCESS_KILL,
  143. COM_DEBUG,
  144. COM_PING,
  145. COM_TIME,
  146. COM_DELAYED_INSERT,
  147. COM_CHANGE_USER,
  148. COM_BINLOG_DUMP,
  149. COM_TABLE_DUMP,
  150. COM_CONNECT_OUT,
  151. COM_REGISTER_SLAVE,
  152. COM_STMT_PREPARE,
  153. COM_STMT_EXECUTE,
  154. COM_STMT_SEND_LONG_DATA,
  155. COM_STMT_CLOSE,
  156. COM_STMT_RESET,
  157. COM_SET_OPTION,
  158. COM_STMT_FETCH,
  159. COM_DAEMON,
  160. COM_BINLOG_DUMP_GTID,
  161. COM_RESET_CONNECTION,
  162. COM_END
  163. };
  164. #include "my_sqlcommand.h"
  165. enum enum_sql_command {
  166. SQLCOM_SELECT,
  167. SQLCOM_CREATE_TABLE,
  168. SQLCOM_CREATE_INDEX,
  169. SQLCOM_ALTER_TABLE,
  170. SQLCOM_UPDATE,
  171. SQLCOM_INSERT,
  172. SQLCOM_INSERT_SELECT,
  173. SQLCOM_DELETE,
  174. SQLCOM_TRUNCATE,
  175. SQLCOM_DROP_TABLE,
  176. SQLCOM_DROP_INDEX,
  177. SQLCOM_SHOW_DATABASES,
  178. SQLCOM_SHOW_TABLES,
  179. SQLCOM_SHOW_FIELDS,
  180. SQLCOM_SHOW_KEYS,
  181. SQLCOM_SHOW_VARIABLES,
  182. SQLCOM_SHOW_STATUS,
  183. SQLCOM_SHOW_ENGINE_LOGS,
  184. SQLCOM_SHOW_ENGINE_STATUS,
  185. SQLCOM_SHOW_ENGINE_MUTEX,
  186. SQLCOM_SHOW_PROCESSLIST,
  187. SQLCOM_SHOW_MASTER_STAT,
  188. SQLCOM_SHOW_SLAVE_STAT,
  189. SQLCOM_SHOW_GRANTS,
  190. SQLCOM_SHOW_CREATE,
  191. SQLCOM_SHOW_CHARSETS,
  192. SQLCOM_SHOW_COLLATIONS,
  193. SQLCOM_SHOW_CREATE_DB,
  194. SQLCOM_SHOW_TABLE_STATUS,
  195. SQLCOM_SHOW_TRIGGERS,
  196. SQLCOM_LOAD,
  197. SQLCOM_SET_OPTION,
  198. SQLCOM_LOCK_TABLES,
  199. SQLCOM_UNLOCK_TABLES,
  200. SQLCOM_GRANT,
  201. SQLCOM_CHANGE_DB,
  202. SQLCOM_CREATE_DB,
  203. SQLCOM_DROP_DB,
  204. SQLCOM_ALTER_DB,
  205. SQLCOM_REPAIR,
  206. SQLCOM_REPLACE,
  207. SQLCOM_REPLACE_SELECT,
  208. SQLCOM_CREATE_FUNCTION,
  209. SQLCOM_DROP_FUNCTION,
  210. SQLCOM_REVOKE,
  211. SQLCOM_OPTIMIZE,
  212. SQLCOM_CHECK,
  213. SQLCOM_ASSIGN_TO_KEYCACHE,
  214. SQLCOM_PRELOAD_KEYS,
  215. SQLCOM_FLUSH,
  216. SQLCOM_KILL,
  217. SQLCOM_ANALYZE,
  218. SQLCOM_ROLLBACK,
  219. SQLCOM_ROLLBACK_TO_SAVEPOINT,
  220. SQLCOM_COMMIT,
  221. SQLCOM_SAVEPOINT,
  222. SQLCOM_RELEASE_SAVEPOINT,
  223. SQLCOM_SLAVE_START,
  224. SQLCOM_SLAVE_STOP,
  225. SQLCOM_START_GROUP_REPLICATION,
  226. SQLCOM_STOP_GROUP_REPLICATION,
  227. SQLCOM_BEGIN,
  228. SQLCOM_CHANGE_MASTER,
  229. SQLCOM_CHANGE_REPLICATION_FILTER,
  230. SQLCOM_RENAME_TABLE,
  231. SQLCOM_RESET,
  232. SQLCOM_PURGE,
  233. SQLCOM_PURGE_BEFORE,
  234. SQLCOM_SHOW_BINLOGS,
  235. SQLCOM_SHOW_OPEN_TABLES,
  236. SQLCOM_HA_OPEN,
  237. SQLCOM_HA_CLOSE,
  238. SQLCOM_HA_READ,
  239. SQLCOM_SHOW_SLAVE_HOSTS,
  240. SQLCOM_DELETE_MULTI,
  241. SQLCOM_UPDATE_MULTI,
  242. SQLCOM_SHOW_BINLOG_EVENTS,
  243. SQLCOM_DO,
  244. SQLCOM_SHOW_WARNS,
  245. SQLCOM_EMPTY_QUERY,
  246. SQLCOM_SHOW_ERRORS,
  247. SQLCOM_SHOW_STORAGE_ENGINES,
  248. SQLCOM_SHOW_PRIVILEGES,
  249. SQLCOM_HELP,
  250. SQLCOM_CREATE_USER,
  251. SQLCOM_DROP_USER,
  252. SQLCOM_RENAME_USER,
  253. SQLCOM_REVOKE_ALL,
  254. SQLCOM_CHECKSUM,
  255. SQLCOM_CREATE_PROCEDURE,
  256. SQLCOM_CREATE_SPFUNCTION,
  257. SQLCOM_CALL,
  258. SQLCOM_DROP_PROCEDURE,
  259. SQLCOM_ALTER_PROCEDURE,
  260. SQLCOM_ALTER_FUNCTION,
  261. SQLCOM_SHOW_CREATE_PROC,
  262. SQLCOM_SHOW_CREATE_FUNC,
  263. SQLCOM_SHOW_STATUS_PROC,
  264. SQLCOM_SHOW_STATUS_FUNC,
  265. SQLCOM_PREPARE,
  266. SQLCOM_EXECUTE,
  267. SQLCOM_DEALLOCATE_PREPARE,
  268. SQLCOM_CREATE_VIEW,
  269. SQLCOM_DROP_VIEW,
  270. SQLCOM_CREATE_TRIGGER,
  271. SQLCOM_DROP_TRIGGER,
  272. SQLCOM_XA_START,
  273. SQLCOM_XA_END,
  274. SQLCOM_XA_PREPARE,
  275. SQLCOM_XA_COMMIT,
  276. SQLCOM_XA_ROLLBACK,
  277. SQLCOM_XA_RECOVER,
  278. SQLCOM_SHOW_PROC_CODE,
  279. SQLCOM_SHOW_FUNC_CODE,
  280. SQLCOM_ALTER_TABLESPACE,
  281. SQLCOM_INSTALL_PLUGIN,
  282. SQLCOM_UNINSTALL_PLUGIN,
  283. SQLCOM_BINLOG_BASE64_EVENT,
  284. SQLCOM_SHOW_PLUGINS,
  285. SQLCOM_CREATE_SERVER,
  286. SQLCOM_DROP_SERVER,
  287. SQLCOM_ALTER_SERVER,
  288. SQLCOM_CREATE_EVENT,
  289. SQLCOM_ALTER_EVENT,
  290. SQLCOM_DROP_EVENT,
  291. SQLCOM_SHOW_CREATE_EVENT,
  292. SQLCOM_SHOW_EVENTS,
  293. SQLCOM_SHOW_CREATE_TRIGGER,
  294. SQLCOM_ALTER_DB_UPGRADE,
  295. SQLCOM_SHOW_PROFILE,
  296. SQLCOM_SHOW_PROFILES,
  297. SQLCOM_SIGNAL,
  298. SQLCOM_RESIGNAL,
  299. SQLCOM_SHOW_RELAYLOG_EVENTS,
  300. SQLCOM_GET_DIAGNOSTICS,
  301. SQLCOM_ALTER_USER,
  302. SQLCOM_EXPLAIN_OTHER,
  303. SQLCOM_SHOW_CREATE_USER,
  304. SQLCOM_SHUTDOWN,
  305. SQLCOM_ALTER_INSTANCE,
  306. SQLCOM_END
  307. };
  308. typedef enum
  309. {
  310. MYSQL_AUDIT_GENERAL_CLASS = 0,
  311. MYSQL_AUDIT_CONNECTION_CLASS = 1,
  312. MYSQL_AUDIT_PARSE_CLASS = 2,
  313. MYSQL_AUDIT_AUTHORIZATION_CLASS = 3,
  314. MYSQL_AUDIT_TABLE_ACCESS_CLASS = 4,
  315. MYSQL_AUDIT_GLOBAL_VARIABLE_CLASS = 5,
  316. MYSQL_AUDIT_SERVER_STARTUP_CLASS = 6,
  317. MYSQL_AUDIT_SERVER_SHUTDOWN_CLASS = 7,
  318. MYSQL_AUDIT_COMMAND_CLASS = 8,
  319. MYSQL_AUDIT_QUERY_CLASS = 9,
  320. MYSQL_AUDIT_STORED_PROGRAM_CLASS = 10,
  321. MYSQL_AUDIT_CLASS_MASK_SIZE
  322. } mysql_event_class_t;
  323. struct st_mysql_audit
  324. {
  325. int interface_version;
  326. void (*release_thd)(void*);
  327. int (*event_notify)(void*, mysql_event_class_t, const void *);
  328. unsigned long class_mask[MYSQL_AUDIT_CLASS_MASK_SIZE];
  329. };
  330. typedef enum enum_sql_command enum_sql_command_t;
  331. typedef enum
  332. {
  333. MYSQL_AUDIT_GENERAL_LOG = 1 << 0,
  334. MYSQL_AUDIT_GENERAL_ERROR = 1 << 1,
  335. MYSQL_AUDIT_GENERAL_RESULT = 1 << 2,
  336. MYSQL_AUDIT_GENERAL_STATUS = 1 << 3
  337. } mysql_event_general_subclass_t;
  338. struct mysql_event_general
  339. {
  340. mysql_event_general_subclass_t event_subclass;
  341. int general_error_code;
  342. unsigned long general_thread_id;
  343. MYSQL_LEX_CSTRING general_user;
  344. MYSQL_LEX_CSTRING general_command;
  345. MYSQL_LEX_CSTRING general_query;
  346. struct charset_info_st *general_charset;
  347. unsigned long long general_time;
  348. unsigned long long general_rows;
  349. MYSQL_LEX_CSTRING general_host;
  350. MYSQL_LEX_CSTRING general_sql_command;
  351. MYSQL_LEX_CSTRING general_external_user;
  352. MYSQL_LEX_CSTRING general_ip;
  353. };
  354. typedef enum
  355. {
  356. MYSQL_AUDIT_CONNECTION_CONNECT = 1 << 0,
  357. MYSQL_AUDIT_CONNECTION_DISCONNECT = 1 << 1,
  358. MYSQL_AUDIT_CONNECTION_CHANGE_USER = 1 << 2,
  359. MYSQL_AUDIT_CONNECTION_PRE_AUTHENTICATE = 1 << 3
  360. } mysql_event_connection_subclass_t;
  361. struct mysql_event_connection
  362. {
  363. mysql_event_connection_subclass_t event_subclass;
  364. int status;
  365. unsigned long connection_id;
  366. MYSQL_LEX_CSTRING user;
  367. MYSQL_LEX_CSTRING priv_user;
  368. MYSQL_LEX_CSTRING external_user;
  369. MYSQL_LEX_CSTRING proxy_user;
  370. MYSQL_LEX_CSTRING host;
  371. MYSQL_LEX_CSTRING ip;
  372. MYSQL_LEX_CSTRING database;
  373. int connection_type;
  374. };
  375. typedef enum
  376. {
  377. MYSQL_AUDIT_PARSE_PREPARSE = 1 << 0,
  378. MYSQL_AUDIT_PARSE_POSTPARSE = 1 << 1
  379. } mysql_event_parse_subclass_t;
  380. typedef enum
  381. {
  382. MYSQL_AUDIT_PARSE_REWRITE_PLUGIN_NONE = 0,
  383. MYSQL_AUDIT_PARSE_REWRITE_PLUGIN_QUERY_REWRITTEN = 1 << 0,
  384. MYSQL_AUDIT_PARSE_REWRITE_PLUGIN_IS_PREPARED_STATEMENT = 1 << 1
  385. } mysql_event_parse_rewrite_plugin_flag;
  386. struct mysql_event_parse
  387. {
  388. mysql_event_parse_subclass_t event_subclass;
  389. mysql_event_parse_rewrite_plugin_flag *flags;
  390. MYSQL_LEX_CSTRING query;
  391. MYSQL_LEX_CSTRING *rewritten_query;
  392. };
  393. typedef enum
  394. {
  395. MYSQL_AUDIT_AUTHORIZATION_USER = 1 << 0,
  396. MYSQL_AUDIT_AUTHORIZATION_DB = 1 << 1,
  397. MYSQL_AUDIT_AUTHORIZATION_TABLE = 1 << 2,
  398. MYSQL_AUDIT_AUTHORIZATION_COLUMN = 1 << 3,
  399. MYSQL_AUDIT_AUTHORIZATION_PROCEDURE = 1 << 4,
  400. MYSQL_AUDIT_AUTHORIZATION_PROXY = 1 << 5
  401. } mysql_event_authorization_subclass_t;
  402. struct mysql_event_authorization
  403. {
  404. mysql_event_authorization_subclass_t event_subclass;
  405. int status;
  406. unsigned int connection_id;
  407. enum_sql_command_t sql_command_id;
  408. MYSQL_LEX_CSTRING query;
  409. const struct charset_info_st *query_charset;
  410. MYSQL_LEX_CSTRING database;
  411. MYSQL_LEX_CSTRING table;
  412. MYSQL_LEX_CSTRING object;
  413. unsigned long requested_privilege;
  414. unsigned long granted_privilege;
  415. };
  416. typedef enum
  417. {
  418. MYSQL_AUDIT_TABLE_ACCESS_READ = 1 << 0,
  419. MYSQL_AUDIT_TABLE_ACCESS_INSERT = 1 << 1,
  420. MYSQL_AUDIT_TABLE_ACCESS_UPDATE = 1 << 2,
  421. MYSQL_AUDIT_TABLE_ACCESS_DELETE = 1 << 3
  422. } mysql_event_table_access_subclass_t;
  423. struct mysql_event_table_access
  424. {
  425. mysql_event_table_access_subclass_t event_subclass;
  426. unsigned long connection_id;
  427. enum_sql_command_t sql_command_id;
  428. MYSQL_LEX_CSTRING query;
  429. const struct charset_info_st *query_charset;
  430. MYSQL_LEX_CSTRING table_database;
  431. MYSQL_LEX_CSTRING table_name;
  432. };
  433. typedef enum
  434. {
  435. MYSQL_AUDIT_GLOBAL_VARIABLE_GET = 1 << 0,
  436. MYSQL_AUDIT_GLOBAL_VARIABLE_SET = 1 << 1
  437. } mysql_event_global_variable_subclass_t;
  438. struct mysql_event_global_variable
  439. {
  440. mysql_event_global_variable_subclass_t event_subclass;
  441. unsigned long connection_id;
  442. enum_sql_command_t sql_command_id;
  443. MYSQL_LEX_CSTRING variable_name;
  444. MYSQL_LEX_CSTRING variable_value;
  445. };
  446. typedef enum
  447. {
  448. MYSQL_AUDIT_SERVER_STARTUP_STARTUP = 1 << 0
  449. } mysql_event_server_startup_subclass_t;
  450. struct mysql_event_server_startup
  451. {
  452. mysql_event_server_startup_subclass_t event_subclass;
  453. const char **argv;
  454. unsigned int argc;
  455. };
  456. typedef enum
  457. {
  458. MYSQL_AUDIT_SERVER_SHUTDOWN_SHUTDOWN = 1 << 0
  459. } mysql_event_server_shutdown_subclass_t;
  460. typedef enum
  461. {
  462. MYSQL_AUDIT_SERVER_SHUTDOWN_REASON_SHUTDOWN,
  463. MYSQL_AUDIT_SERVER_SHUTDOWN_REASON_ABORT
  464. } mysql_server_shutdown_reason_t;
  465. struct mysql_event_server_shutdown
  466. {
  467. mysql_event_server_shutdown_subclass_t event_subclass;
  468. int exit_code;
  469. mysql_server_shutdown_reason_t reason;
  470. };
  471. typedef enum
  472. {
  473. MYSQL_AUDIT_COMMAND_START = 1 << 0,
  474. MYSQL_AUDIT_COMMAND_END = 1 << 1
  475. } mysql_event_command_subclass_t;
  476. typedef enum enum_server_command enum_server_command_t;
  477. struct mysql_event_command
  478. {
  479. mysql_event_command_subclass_t event_subclass;
  480. int status;
  481. unsigned long connection_id;
  482. enum_server_command_t command_id;
  483. };
  484. typedef enum
  485. {
  486. MYSQL_AUDIT_QUERY_START = 1 << 0,
  487. MYSQL_AUDIT_QUERY_NESTED_START = 1 << 1,
  488. MYSQL_AUDIT_QUERY_STATUS_END = 1 << 2,
  489. MYSQL_AUDIT_QUERY_NESTED_STATUS_END = 1 << 3
  490. } mysql_event_query_subclass_t;
  491. struct mysql_event_query
  492. {
  493. mysql_event_query_subclass_t event_subclass;
  494. int status;
  495. unsigned long connection_id;
  496. enum_sql_command_t sql_command_id;
  497. MYSQL_LEX_CSTRING query;
  498. const struct charset_info_st *query_charset;
  499. };
  500. typedef enum
  501. {
  502. MYSQL_AUDIT_STORED_PROGRAM_EXECUTE = 1 << 0
  503. } mysql_event_stored_program_subclass_t;
  504. struct mysql_event_stored_program
  505. {
  506. mysql_event_stored_program_subclass_t event_subclass;
  507. unsigned long connection_id;
  508. enum_sql_command_t sql_command_id;
  509. MYSQL_LEX_CSTRING query;
  510. const struct charset_info_st *query_charset;
  511. MYSQL_LEX_CSTRING database;
  512. MYSQL_LEX_CSTRING name;
  513. void *parameters;
  514. };