|
1 | 1 | #include <mysql/plugin.h>
|
| 2 | +typedef void* MYSQL_ITEM; |
2 | 3 | typedef void * MYSQL_PLUGIN;
|
3 | 4 | #include <mysql/services.h>
|
4 | 5 | #include <mysql/service_my_snprintf.h>
|
|
133 | 134 | extern void * my_memdup(PSI_memory_key key, const void *from, size_t length, myf_t flags);
|
134 | 135 | extern char * my_strdup(PSI_memory_key key, const char *from, myf_t flags);
|
135 | 136 | extern char * my_strndup(PSI_memory_key key, const char *from, size_t length, myf_t flags);
|
| 137 | +#include <mysql/service_parser.h> |
| 138 | +#include "my_md5_size.h" |
| 139 | +#include <mysql/plugin.h> |
| 140 | +typedef |
| 141 | +int (*parse_node_visit_function)(MYSQL_ITEM item, unsigned char* arg); |
| 142 | +typedef |
| 143 | +int (*sql_condition_handler_function)(int sql_errno, |
| 144 | + const char* sqlstate, |
| 145 | + const char* msg, |
| 146 | + void *state); |
| 147 | +struct st_my_thread_handle; |
| 148 | +extern struct mysql_parser_service_st { |
| 149 | + void* (*mysql_current_session)(); |
| 150 | + void* (*mysql_open_session)(); |
| 151 | + void (*mysql_start_thread)(void* thd, void *(*callback_fun)(void*), |
| 152 | + void *arg, |
| 153 | + struct st_my_thread_handle *thread_handle); |
| 154 | + void (*mysql_join_thread)(struct st_my_thread_handle *thread_handle); |
| 155 | + void (*mysql_set_current_database)(void* thd, const MYSQL_LEX_STRING db); |
| 156 | + int (*mysql_parse)(void* thd, const MYSQL_LEX_STRING query, |
| 157 | + unsigned char is_prepared, |
| 158 | + sql_condition_handler_function handle_condition, |
| 159 | + void *condition_handler_state); |
| 160 | + int (*mysql_get_statement_digest)(void* thd, unsigned char *digest); |
| 161 | + int (*mysql_parser_get_number_params)(void* thd); |
| 162 | + int (*mysql_parser_extract_prepared_params)(void* thd, int *positions); |
| 163 | + int (*mysql_parser_visit_tree)(void* thd, |
| 164 | + parse_node_visit_function processor, |
| 165 | + unsigned char* arg); |
| 166 | + MYSQL_LEX_STRING (*mysql_parser_item_string)(MYSQL_ITEM item); |
| 167 | + void (*mysql_parser_free_string)(MYSQL_LEX_STRING string); |
| 168 | + MYSQL_LEX_STRING (*mysql_parser_get_query)(void* thd); |
| 169 | + MYSQL_LEX_STRING (*mysql_parser_get_normalized_query)(void* thd); |
| 170 | +} *mysql_parser_service; |
| 171 | +typedef void *(*callback_function)(void*); |
| 172 | +void* mysql_parser_current_session(); |
| 173 | +void* mysql_parser_open_session(); |
| 174 | +void mysql_parser_start_thread(void* thd, callback_function fun, void *arg, |
| 175 | + struct st_my_thread_handle *thread_handle); |
| 176 | +void mysql_parser_join_thread(struct st_my_thread_handle *thread_handle); |
| 177 | +void mysql_parser_set_current_database(void* thd, |
| 178 | + const MYSQL_LEX_STRING db); |
| 179 | +int mysql_parser_parse(void* thd, const MYSQL_LEX_STRING query, |
| 180 | + unsigned char is_prepared, |
| 181 | + sql_condition_handler_function handle_condition, |
| 182 | + void *condition_handler_state); |
| 183 | +int mysql_parser_get_statement_type(void* thd); |
| 184 | +int mysql_parser_get_statement_digest(void* thd, unsigned char *digest); |
| 185 | +int mysql_parser_get_number_params(void* thd); |
| 186 | +int mysql_parser_extract_prepared_params(void* thd, int *positions); |
| 187 | +int mysql_parser_visit_tree(void* thd, |
| 188 | + parse_node_visit_function processor, |
| 189 | + unsigned char* arg); |
| 190 | +MYSQL_LEX_STRING mysql_parser_item_string(MYSQL_ITEM item); |
| 191 | +void mysql_parser_free_string(MYSQL_LEX_STRING string); |
| 192 | +MYSQL_LEX_STRING mysql_parser_get_query(void* thd); |
| 193 | +MYSQL_LEX_STRING mysql_parser_get_normalized_query(void* thd); |
136 | 194 | struct st_mysql_xid {
|
137 | 195 | long formatID;
|
138 | 196 | long gtrid_length;
|
|
0 commit comments