diff options
author | Michael Widenius <monty@mysql.com> | 2008-10-10 18:28:41 +0300 |
---|---|---|
committer | Michael Widenius <monty@mysql.com> | 2008-10-10 18:28:41 +0300 |
commit | f47e003e1bfc56c2bf5d0f144a35517f526b538b (patch) | |
tree | e2bfb9834c6e558381465ed2f57a9d873a9b2c90 /include | |
parent | 51a92bbb03cc58ab8688fa9d8226afe32e6156ca (diff) | |
parent | 9daa56fd5ce3ccd33c32b5a505ac1d2b2c437460 (diff) | |
download | mariadb-git-f47e003e1bfc56c2bf5d0f144a35517f526b538b.tar.gz |
Merged 5.1 with maria 5.1
Diffstat (limited to 'include')
-rw-r--r-- | include/Makefile.am | 19 | ||||
-rw-r--r-- | include/errmsg.h | 3 | ||||
-rw-r--r-- | include/my_alloc.h | 4 | ||||
-rw-r--r-- | include/my_handler.h | 1 | ||||
-rw-r--r-- | include/my_stacktrace.h | 66 | ||||
-rw-r--r-- | include/my_sys.h | 7 | ||||
-rw-r--r-- | include/my_time.h | 2 | ||||
-rw-r--r-- | include/myisam.h | 5 | ||||
-rw-r--r-- | include/myisammrg.h | 1 | ||||
-rw-r--r-- | include/mysql.h.pp | 671 | ||||
-rw-r--r-- | include/mysql/plugin.h.pp | 140 | ||||
-rw-r--r-- | include/mysql_com.h | 24 | ||||
-rw-r--r-- | include/mysql_h.ic | 1166 |
13 files changed, 919 insertions, 1190 deletions
diff --git a/include/Makefile.am b/include/Makefile.am index b3338f4c5a4..8a4ba472530 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -36,13 +36,13 @@ noinst_HEADERS = config-win.h config-netware.h lf.h my_bit.h \ mysql_version.h.in my_handler.h my_time.h \ my_vle.h my_user.h my_atomic.h atomic/nolock.h \ atomic/rwlock.h atomic/x86-gcc.h atomic/generic-msvc.h \ - atomic/gcc_builtins.h my_libwrap.h wqueue.h \ - waiting_threads.h + atomic/gcc_builtins.h my_libwrap.h my_stacktrace.h \ + wqueue.h waiting_threads.h +EXTRA_DIST = mysql.h.pp mysql/plugin.h.pp # Remove built files and the symlinked directories CLEANFILES = $(BUILT_SOURCES) readline openssl -EXTRA_DIST = mysql_h.ic # Some include files that may be moved and patched by configure DISTCLEANFILES = sched.h $(CLEANFILES) @@ -64,18 +64,5 @@ my_config.h: config.h dist-hook: $(RM) -f $(distdir)/mysql_version.h $(distdir)/my_config.h -# -# Rules for checking that ABI has not changed -# - -# Create a icheck file and compare it to the reference -abi_check: $(HEADERS_ABI) mysql_version.h mysql_h.ic - @set -ex; \ - if [ @ICHECK@ != no ] ; then \ - @ICHECK@ --canonify --skip-from-re /usr/ -o $@ $(HEADERS_ABI); \ - @ICHECK@ --compare mysql_h.ic $@; \ - fi; \ - touch abi_check; - # Don't update the files from bitkeeper %::SCCS/s.% diff --git a/include/errmsg.h b/include/errmsg.h index e7b59ca8bd7..a6d8c770de8 100644 --- a/include/errmsg.h +++ b/include/errmsg.h @@ -96,6 +96,7 @@ extern const char *client_errors[]; /* Error messages */ #define CR_NOT_IMPLEMENTED 2054 #define CR_SERVER_LOST_EXTENDED 2055 #define CR_STMT_CLOSED 2056 -#define CR_ERROR_LAST /*Copy last error nr:*/ 2056 +#define CR_NEW_STMT_METADATA 2057 +#define CR_ERROR_LAST /*Copy last error nr:*/ 2057 /* Add error numbers before CR_ERROR_LAST and change it accordingly. */ diff --git a/include/my_alloc.h b/include/my_alloc.h index 02500865f80..6ade4d08980 100644 --- a/include/my_alloc.h +++ b/include/my_alloc.h @@ -39,12 +39,12 @@ typedef struct st_mem_root /* if block have less memory it will be put in 'used' list */ size_t min_malloc; size_t block_size; /* initial block size */ - unsigned long block_num; /* allocated blocks counter */ + unsigned int block_num; /* allocated blocks counter */ /* first free block in queue test counter (if it exceed MAX_BLOCK_USAGE_BEFORE_DROP block will be dropped in 'used' list) */ - unsigned long first_block_usage; + unsigned int first_block_usage; void (*error_handler)(void); } MEM_ROOT; diff --git a/include/my_handler.h b/include/my_handler.h index 09c7dd96c12..537cf68c150 100644 --- a/include/my_handler.h +++ b/include/my_handler.h @@ -45,6 +45,7 @@ extern "C" { #define HA_MAX_POSSIBLE_KEY_BUFF (HA_MAX_KEY_LENGTH + 24+ 6+6) #define HA_MAX_KEY_BUFF (HA_MAX_KEY_LENGTH+HA_MAX_KEY_SEG*6+8+8) +#define HA_MAX_MSG_BUF 1024 /* used in CHECK TABLE, REPAIR TABLE */ typedef struct st_HA_KEYSEG /* Key-portion */ { diff --git a/include/my_stacktrace.h b/include/my_stacktrace.h new file mode 100644 index 00000000000..e7ce42c1f4f --- /dev/null +++ b/include/my_stacktrace.h @@ -0,0 +1,66 @@ +/* Copyright (C) 2000 MySQL AB + + 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 */ + +#ifndef _my_stacktrace_h_ +#define _my_stacktrace_h_ + +#include <my_global.h> + +#ifdef TARGET_OS_LINUX +#if defined (__x86_64__) || defined (__i386__) || \ + (defined(__alpha__) && defined(__GNUC__)) +#define HAVE_STACKTRACE 1 +#endif +#elif defined(__WIN__) +#define HAVE_STACKTRACE 1 +#endif + +#if HAVE_BACKTRACE && (HAVE_BACKTRACE_SYMBOLS || HAVE_BACKTRACE_SYMBOLS_FD) +#undef HAVE_STACKTRACE +#define HAVE_STACKTRACE 1 +#endif + +#if !defined(__NETWARE__) +#define HAVE_WRITE_CORE +#endif + +#if HAVE_BACKTRACE && HAVE_BACKTRACE_SYMBOLS && \ + HAVE_CXXABI_H && HAVE_ABI_CXA_DEMANGLE && \ + HAVE_WEAK_SYMBOL +#define BACKTRACE_DEMANGLE 1 +#endif + +C_MODE_START + +#if defined(HAVE_STACKTRACE) || defined(HAVE_BACKTRACE) +void my_init_stacktrace(); +void my_print_stacktrace(uchar* stack_bottom, ulong thread_stack); +void my_safe_print_str(const char* name, const char* val, int max_len); +void my_write_core(int sig); +#if BACKTRACE_DEMANGLE +char *my_demangle(const char *mangled_name, int *status); +#endif +#ifdef __WIN__ +void my_set_exception_pointers(EXCEPTION_POINTERS *ep); +#endif +#endif + +#ifdef HAVE_WRITE_CORE +void my_write_core(int sig); +#endif + +C_MODE_END + +#endif /* _my_stacktrace_h_ */ diff --git a/include/my_sys.h b/include/my_sys.h index f8f941bbb0c..07e56f1c91f 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -94,6 +94,9 @@ extern int NEAR my_errno; /* Last error in mysys */ #define ME_COLOUR3 ((3 << ME_HIGHBYTE)) #define ME_JUST_INFO 1024 /**< not error but just info */ #define ME_JUST_WARNING 2048 /**< not error but just warning */ +#define ME_FATALERROR 4096 /* Fatal statement error */ +#define ME_NO_WARNING_FOR_ERROR 8192 /* Don't push a warning for error */ +#define ME_NO_SP_HANDLER 16384 /* Don't call stored routine error handlers */ /* Bits in last argument to fn_format */ #define MY_REPLACE_DIR 1 /* replace dir in name with 'dir' */ @@ -251,7 +254,7 @@ extern int NEAR my_umask, /* Default creation mask */ NEAR my_safe_to_handle_signal, /* Set when allowed to SIGTSTP */ NEAR my_dont_interrupt; /* call remember_intr when set */ extern my_bool NEAR mysys_uses_curses, my_use_symdir; -extern ulong sf_malloc_cur_memory, sf_malloc_max_memory; +extern size_t sf_malloc_cur_memory, sf_malloc_max_memory; extern ulong my_default_record_cache_size; extern my_bool NEAR my_disable_locking,NEAR my_disable_async_io, @@ -589,6 +592,7 @@ extern int my_close(File Filedes,myf MyFlags); extern File my_dup(File file, myf MyFlags); extern int my_mkdir(const char *dir, int Flags, myf MyFlags); extern int my_readlink(char *to, const char *filename, myf MyFlags); +extern int my_is_symlink(const char *filename); extern int my_realpath(char *to, const char *filename, myf MyFlags); extern File my_create_with_symlink(const char *linkname, const char *filename, int createflags, int access_flags, @@ -708,6 +712,7 @@ extern char * fn_format(char * to,const char *name,const char *dir, const char *form, uint flag); extern size_t strlength(const char *str); extern void pack_dirname(char * to,const char *from); +extern size_t normalize_dirname(char * to, const char *from); extern size_t unpack_dirname(char * to,const char *from); extern size_t cleanup_dirname(char * to,const char *from); extern size_t system_filename(char * to,const char *from); diff --git a/include/my_time.h b/include/my_time.h index af3fc103530..58995f1bf62 100644 --- a/include/my_time.h +++ b/include/my_time.h @@ -95,7 +95,7 @@ long calc_daynr(uint year,uint month,uint day); uint calc_days_in_year(uint year); uint year_2000_handling(uint year); -void init_time(void); +void my_init_time(void); /* diff --git a/include/myisam.h b/include/myisam.h index 3f756abdbee..86cbeaffd5d 100644 --- a/include/myisam.h +++ b/include/myisam.h @@ -46,7 +46,6 @@ extern "C" { #define MI_MAX_POSSIBLE_KEY_BUFF HA_MAX_POSSIBLE_KEY_BUFF -#define MI_MAX_MSG_BUF 1024 /* used in CHECK TABLE, REPAIR TABLE */ #define MI_NAME_IEXT ".MYI" #define MI_NAME_DEXT ".MYD" /* Max extra space to use when sorting keys */ @@ -249,6 +248,10 @@ extern my_bool myisam_flush,myisam_delay_key_write,myisam_single_user; extern my_off_t myisam_max_temp_length; extern ulong myisam_bulk_insert_tree_size, myisam_data_pointer_size; +/* usually used to check if a symlink points into the mysql data home */ +/* which is normally forbidden */ +extern int (*myisam_test_invalid_symlink)(const char *filename); + /* Prototypes for myisam-functions */ extern int mi_close(struct st_myisam_info *file); diff --git a/include/myisammrg.h b/include/myisammrg.h index cc6e6aac6cd..dafae157ee0 100644 --- a/include/myisammrg.h +++ b/include/myisammrg.h @@ -112,6 +112,7 @@ extern int myrg_reset(MYRG_INFO *info); extern void myrg_extrafunc(MYRG_INFO *info,invalidator_by_filename inv); extern ha_rows myrg_records_in_range(MYRG_INFO *info, int inx, key_range *min_key, key_range *max_key); +extern ha_rows myrg_records(MYRG_INFO *info); extern ulonglong myrg_position(MYRG_INFO *info); #ifdef __cplusplus diff --git a/include/mysql.h.pp b/include/mysql.h.pp new file mode 100644 index 00000000000..d9e9c7fa96d --- /dev/null +++ b/include/mysql.h.pp @@ -0,0 +1,671 @@ +#include <sys/types.h> +typedef char my_bool; +typedef int my_socket; +#include "mysql_version.h" +#include "mysql_com.h" +enum enum_server_command +{ + COM_SLEEP, COM_QUIT, COM_INIT_DB, COM_QUERY, COM_FIELD_LIST, + COM_CREATE_DB, COM_DROP_DB, COM_REFRESH, COM_SHUTDOWN, COM_STATISTICS, + COM_PROCESS_INFO, COM_CONNECT, COM_PROCESS_KILL, COM_DEBUG, COM_PING, + COM_TIME, COM_DELAYED_INSERT, COM_CHANGE_USER, COM_BINLOG_DUMP, + COM_TABLE_DUMP, COM_CONNECT_OUT, COM_REGISTER_SLAVE, + COM_STMT_PREPARE, COM_STMT_EXECUTE, COM_STMT_SEND_LONG_DATA, COM_STMT_CLOSE, + COM_STMT_RESET, COM_SET_OPTION, COM_STMT_FETCH, COM_DAEMON, + COM_END +}; +struct st_vio; +typedef struct st_vio Vio; +typedef struct st_net { + Vio *vio; + unsigned char *buff,*buff_end,*write_pos,*read_pos; + my_socket fd; + unsigned long remain_in_buf,length, buf_length, where_b; + unsigned long max_packet,max_packet_size; + unsigned int pkt_nr,compress_pkt_nr; + unsigned int write_timeout, read_timeout, retry_count; + int fcntl; + unsigned int *return_status; + unsigned char reading_or_writing; + char save_char; + my_bool unused0; + my_bool unused; + my_bool compress; + my_bool unused1; + unsigned char *query_cache_query; + unsigned int last_errno; + unsigned char error; + my_bool unused2; + my_bool return_errno; + char last_error[512]; + char sqlstate[5 +1]; + void *extension; +} NET; +enum enum_field_types { MYSQL_TYPE_DECIMAL, MYSQL_TYPE_TINY, + MYSQL_TYPE_SHORT, MYSQL_TYPE_LONG, + MYSQL_TYPE_FLOAT, MYSQL_TYPE_DOUBLE, + MYSQL_TYPE_NULL, MYSQL_TYPE_TIMESTAMP, + MYSQL_TYPE_LONGLONG,MYSQL_TYPE_INT24, + MYSQL_TYPE_DATE, MYSQL_TYPE_TIME, + MYSQL_TYPE_DATETIME, MYSQL_TYPE_YEAR, + MYSQL_TYPE_NEWDATE, MYSQL_TYPE_VARCHAR, + MYSQL_TYPE_BIT, + MYSQL_TYPE_NEWDECIMAL=246, + MYSQL_TYPE_ENUM=247, + MYSQL_TYPE_SET=248, + MYSQL_TYPE_TINY_BLOB=249, + MYSQL_TYPE_MEDIUM_BLOB=250, + MYSQL_TYPE_LONG_BLOB=251, + MYSQL_TYPE_BLOB=252, + MYSQL_TYPE_VAR_STRING=253, + MYSQL_TYPE_STRING=254, + MYSQL_TYPE_GEOMETRY=255 +}; +enum mysql_enum_shutdown_level { + SHUTDOWN_DEFAULT = 0, + SHUTDOWN_WAIT_CONNECTIONS= (unsigned char)(1 << 0), + SHUTDOWN_WAIT_TRANSACTIONS= (unsigned char)(1 << 1), + SHUTDOWN_WAIT_UPDATES= (unsigned char)(1 << 3), + SHUTDOWN_WAIT_ALL_BUFFERS= ((unsigned char)(1 << 3) << 1), + SHUTDOWN_WAIT_CRITICAL_BUFFERS= ((unsigned char)(1 << 3) << 1) + 1, + KILL_QUERY= 254, + KILL_CONNECTION= 255 +}; +enum enum_cursor_type +{ + CURSOR_TYPE_NO_CURSOR= 0, + CURSOR_TYPE_READ_ONLY= 1, + CURSOR_TYPE_FOR_UPDATE= 2, + CURSOR_TYPE_SCROLLABLE= 4 +}; +enum enum_mysql_set_option +{ + MYSQL_OPTION_MULTI_STATEMENTS_ON, + MYSQL_OPTION_MULTI_STATEMENTS_OFF +}; +my_bool my_net_init(NET *net, Vio* vio); +void my_net_local_init(NET *net); +void net_end(NET *net); + void net_clear(NET *net, my_bool clear_buffer); +my_bool net_realloc(NET *net, size_t length); +my_bool net_flush(NET *net); +my_bool my_net_write(NET *net,const unsigned char *packet, size_t len); +my_bool net_write_command(NET *net,unsigned char command, + const unsigned char *header, size_t head_len, + const unsigned char *packet, size_t len); +int net_real_write(NET *net,const unsigned char *packet, size_t len); +unsigned long my_net_read(NET *net); +struct sockaddr; +int my_connect(my_socket s, const struct sockaddr *name, unsigned int namelen, + unsigned int timeout); +struct my_rnd_struct; +enum Item_result +{ + STRING_RESULT=0, REAL_RESULT, INT_RESULT, ROW_RESULT, DECIMAL_RESULT +}; +typedef struct st_udf_args +{ + unsigned int arg_count; + enum Item_result *arg_type; + char **args; + unsigned long *lengths; + char *maybe_null; + char **attributes; + unsigned long *attribute_lengths; + void *extension; +} UDF_ARGS; +typedef struct st_udf_init +{ + my_bool maybe_null; + unsigned int decimals; + unsigned long max_length; + char *ptr; + my_bool const_item; + void *extension; +} UDF_INIT; +void create_random_string(char *to, unsigned int length, + struct my_rnd_struct *rand_st); +void hash_password(unsigned long *to, const char *password, unsigned int password_len); +void make_scrambled_password_323(char *to, const char *password); +void scramble_323(char *to, const char *message, const char *password); +my_bool check_scramble_323(const char *, const char *message, + unsigned long *salt); +void get_salt_from_password_323(unsigned long *res, const char *password); +void make_password_from_salt_323(char *to, const unsigned long *salt); +void make_scrambled_password(char *to, const char *password); +void scramble(char *to, const char *message, const char *password); +my_bool check_scramble(const char *reply, const char *message, + const unsigned char *hash_stage2); +void get_salt_from_password(unsigned char *res, const char *password); +void make_password_from_salt(char *to, const unsigned char *hash_stage2); +char *octet2hex(char *to, const char *str, unsigned int len); +char *get_tty_password(const char *opt_message); +const char *mysql_errno_to_sqlstate(unsigned int mysql_errno); +my_bool my_thread_init(void); +void my_thread_end(void); +#include "mysql_time.h" +enum enum_mysql_timestamp_type +{ + MYSQL_TIMESTAMP_NONE= -2, MYSQL_TIMESTAMP_ERROR= -1, + MYSQL_TIMESTAMP_DATE= 0, MYSQL_TIMESTAMP_DATETIME= 1, MYSQL_TIMESTAMP_TIME= 2 +}; +typedef struct st_mysql_time +{ + unsigned int year, month, day, hour, minute, second; + unsigned long second_part; + my_bool neg; + enum enum_mysql_timestamp_type time_type; +} MYSQL_TIME; +#include "my_list.h" +typedef struct st_list { + struct st_list *prev,*next; + void *data; +} LIST; +typedef int (*list_walk_action)(void *,void *); +extern LIST *list_add(LIST *root,LIST *element); +extern LIST *list_delete(LIST *root,LIST *element); +extern LIST *list_cons(void *data,LIST *root); +extern LIST *list_reverse(LIST *root); +extern void list_free(LIST *root,unsigned int free_data); +extern unsigned int list_length(LIST *); +extern int list_walk(LIST *,list_walk_action action,unsigned char * argument); +extern unsigned int mysql_port; +extern char *mysql_unix_port; +typedef struct st_mysql_field { + char *name; + char *org_name; + char *table; + char *org_table; + char *db; + char *catalog; + char *def; + unsigned long length; + unsigned long max_length; + unsigned int name_length; + unsigned int org_name_length; + unsigned int table_length; + unsigned int org_table_length; + unsigned int db_length; + unsigned int catalog_length; + unsigned int def_length; + unsigned int flags; + unsigned int decimals; + unsigned int charsetnr; + enum enum_field_types type; + void *extension; +} MYSQL_FIELD; +typedef char **MYSQL_ROW; +typedef unsigned int MYSQL_FIELD_OFFSET; +typedef unsigned long long my_ulonglong; +#include "typelib.h" +#include "my_alloc.h" +typedef struct st_used_mem +{ + struct st_used_mem *next; + size_t left; + size_t size; +} USED_MEM; +typedef struct st_mem_root +{ + USED_MEM *free; + USED_MEM *used; + USED_MEM *pre_alloc; + size_t min_malloc; + size_t block_size; + unsigned int block_num; + unsigned int first_block_usage; + void (*error_handler)(void); +} MEM_ROOT; +typedef struct st_typelib { + unsigned int count; + const char *name; + const char **type_names; + unsigned int *type_lengths; +} TYPELIB; +extern my_ulonglong find_typeset(char *x, TYPELIB *typelib,int *error_position); +extern int find_type_or_exit(const char *x, TYPELIB *typelib, + const char *option); +extern int find_type(char *x, const TYPELIB *typelib, unsigned int full_name); +extern void make_type(char *to,unsigned int nr,TYPELIB *typelib); +extern const char *get_type(TYPELIB *typelib,unsigned int nr); +extern TYPELIB *copy_typelib(MEM_ROOT *root, TYPELIB *from); +extern TYPELIB sql_protocol_typelib; +typedef struct st_mysql_rows { + struct st_mysql_rows *next; + MYSQL_ROW data; + unsigned long length; +} MYSQL_ROWS; +typedef MYSQL_ROWS *MYSQL_ROW_OFFSET; +#include "my_alloc.h" +typedef struct embedded_query_result EMBEDDED_QUERY_RESULT; +typedef struct st_mysql_data { + MYSQL_ROWS *data; + struct embedded_query_result *embedded_info; + MEM_ROOT alloc; + my_ulonglong rows; + unsigned int fields; + void *extension; +} MYSQL_DATA; +enum mysql_option +{ + MYSQL_OPT_CONNECT_TIMEOUT, MYSQL_OPT_COMPRESS, MYSQL_OPT_NAMED_PIPE, + MYSQL_INIT_COMMAND, MYSQL_READ_DEFAULT_FILE, MYSQL_READ_DEFAULT_GROUP, + MYSQL_SET_CHARSET_DIR, MYSQL_SET_CHARSET_NAME, MYSQL_OPT_LOCAL_INFILE, + MYSQL_OPT_PROTOCOL, MYSQL_SHARED_MEMORY_BASE_NAME, MYSQL_OPT_READ_TIMEOUT, + MYSQL_OPT_WRITE_TIMEOUT, MYSQL_OPT_USE_RESULT, + MYSQL_OPT_USE_REMOTE_CONNECTION, MYSQL_OPT_USE_EMBEDDED_CONNECTION, + MYSQL_OPT_GUESS_CONNECTION, MYSQL_SET_CLIENT_IP, MYSQL_SECURE_AUTH, + MYSQL_REPORT_DATA_TRUNCATION, MYSQL_OPT_RECONNECT, + MYSQL_OPT_SSL_VERIFY_SERVER_CERT +}; +struct st_mysql_options { + unsigned int connect_timeout, read_timeout, write_timeout; + unsigned int port, protocol; + unsigned long client_flag; + char *host,*user,*password,*unix_socket,*db; + struct st_dynamic_array *init_commands; + char *my_cnf_file,*my_cnf_group, *charset_dir, *charset_name; + char *ssl_key; + char *ssl_cert; + char *ssl_ca; + char *ssl_capath; + char *ssl_cipher; + char *shared_memory_base_name; + unsigned long max_allowed_packet; + my_bool use_ssl; + my_bool compress,named_pipe; + my_bool rpl_probe; + my_bool rpl_parse; + my_bool no_master_reads; + my_bool separate_thread; + enum mysql_option methods_to_use; + char *client_ip; + my_bool secure_auth; + my_bool report_data_truncation; + int (*local_infile_init)(void **, const char *, void *); + int (*local_infile_read)(void *, char *, unsigned int); + void (*local_infile_end)(void *); + int (*local_infile_error)(void *, char *, unsigned int); + void *local_infile_userdata; + void *extension; +}; +enum mysql_status +{ + MYSQL_STATUS_READY,MYSQL_STATUS_GET_RESULT,MYSQL_STATUS_USE_RESULT +}; +enum mysql_protocol_type +{ + MYSQL_PROTOCOL_DEFAULT, MYSQL_PROTOCOL_TCP, MYSQL_PROTOCOL_SOCKET, + MYSQL_PROTOCOL_PIPE, MYSQL_PROTOCOL_MEMORY +}; +enum mysql_rpl_type +{ + MYSQL_RPL_MASTER, MYSQL_RPL_SLAVE, MYSQL_RPL_ADMIN +}; +typedef struct character_set +{ + unsigned int number; + unsigned int state; + const char *csname; + const char *name; + const char *comment; + const char *dir; + unsigned int mbminlen; + unsigned int mbmaxlen; +} MY_CHARSET_INFO; +struct st_mysql_methods; +struct st_mysql_stmt; +typedef struct st_mysql +{ + NET net; + unsigned char *connector_fd; + char *host,*user,*passwd,*unix_socket,*server_version,*host_info; + char *info, *db; + struct charset_info_st *charset; + MYSQL_FIELD *fields; + MEM_ROOT field_alloc; + my_ulonglong affected_rows; + my_ulonglong insert_id; + my_ulonglong extra_info; + unsigned long thread_id; + unsigned long packet_length; + unsigned int port; + unsigned long client_flag,server_capabilities; + unsigned int protocol_version; + unsigned int field_count; + unsigned int server_status; + unsigned int server_language; + unsigned int warning_count; + struct st_mysql_options options; + enum mysql_status status; + my_bool free_me; + my_bool reconnect; + char scramble[20 +1]; + my_bool rpl_pivot; + struct st_mysql* master, *next_slave; + struct st_mysql* last_used_slave; + struct st_mysql* last_used_con; + LIST *stmts; + const struct st_mysql_methods *methods; + void *thd; + my_bool *unbuffered_fetch_owner; + char *info_buffer; + void *extension; +} MYSQL; +typedef struct st_mysql_res { + my_ulonglong row_count; + MYSQL_FIELD *fields; + MYSQL_DATA *data; + MYSQL_ROWS *data_cursor; + unsigned long *lengths; + MYSQL *handle; + const struct st_mysql_methods *methods; + MYSQL_ROW row; + MYSQL_ROW current_row; + MEM_ROOT field_alloc; + unsigned int field_count, current_field; + my_bool eof; + my_bool unbuffered_fetch_cancelled; + void *extension; +} MYSQL_RES; +typedef struct st_mysql_manager +{ + NET net; + char *host, *user, *passwd; + char *net_buf, *net_buf_pos, *net_data_end; + unsigned int port; + int cmd_status; + int last_errno; + int net_buf_size; + my_bool free_me; + my_bool eof; + char last_error[256]; + void *extension; +} MYSQL_MANAGER; +typedef struct st_mysql_parameters +{ + unsigned long *p_max_allowed_packet; + unsigned long *p_net_buffer_length; + void *extension; +} MYSQL_PARAMETERS; +int mysql_server_init(int argc, char **argv, char **groups); +void mysql_server_end(void); +MYSQL_PARAMETERS * mysql_get_parameters(void); +my_bool mysql_thread_init(void); +void mysql_thread_end(void); +my_ulonglong mysql_num_rows(MYSQL_RES *res); +unsigned int mysql_num_fields(MYSQL_RES *res); +my_bool mysql_eof(MYSQL_RES *res); +MYSQL_FIELD * mysql_fetch_field_direct(MYSQL_RES *res, + unsigned int fieldnr); +MYSQL_FIELD * mysql_fetch_fields(MYSQL_RES *res); +MYSQL_ROW_OFFSET mysql_row_tell(MYSQL_RES *res); +MYSQL_FIELD_OFFSET mysql_field_tell(MYSQL_RES *res); +unsigned int mysql_field_count(MYSQL *mysql); +my_ulonglong mysql_affected_rows(MYSQL *mysql); +my_ulonglong mysql_insert_id(MYSQL *mysql); +unsigned int mysql_errno(MYSQL *mysql); +const char * mysql_error(MYSQL *mysql); +const char * mysql_sqlstate(MYSQL *mysql); +unsigned int mysql_warning_count(MYSQL *mysql); +const char * mysql_info(MYSQL *mysql); +unsigned long mysql_thread_id(MYSQL *mysql); +const char * mysql_character_set_name(MYSQL *mysql); +int mysql_set_character_set(MYSQL *mysql, const char *csname); +MYSQL * mysql_init(MYSQL *mysql); +my_bool mysql_ssl_set(MYSQL *mysql, const char *key, + const char *cert, const char *ca, + const char *capath, const char *cipher); +const char * mysql_get_ssl_cipher(MYSQL *mysql); +my_bool mysql_change_user(MYSQL *mysql, const char *user, + const char *passwd, const char *db); +MYSQL * mysql_real_connect(MYSQL *mysql, const char *host, + const char *user, + const char *passwd, + const char *db, + unsigned int port, + const char *unix_socket, + unsigned long clientflag); +int mysql_select_db(MYSQL *mysql, const char *db); +int mysql_query(MYSQL *mysql, const char *q); +int mysql_send_query(MYSQL *mysql, const char *q, + unsigned long length); +int mysql_real_query(MYSQL *mysql, const char *q, + unsigned long length); +MYSQL_RES * mysql_store_result(MYSQL *mysql); +MYSQL_RES * mysql_use_result(MYSQL *mysql); +my_bool mysql_master_query(MYSQL *mysql, const char *q, + unsigned long length); +my_bool mysql_master_send_query(MYSQL *mysql, const char *q, + unsigned long length); +my_bool mysql_slave_query(MYSQL *mysql, const char *q, + unsigned long length); +my_bool mysql_slave_send_query(MYSQL *mysql, const char *q, + unsigned long length); +void mysql_get_character_set_info(MYSQL *mysql, + MY_CHARSET_INFO *charset); +void +mysql_set_local_infile_handler(MYSQL *mysql, + int (*local_infile_init)(void **, const char *, + void *), + int (*local_infile_read)(void *, char *, + unsigned int), + void (*local_infile_end)(void *), + int (*local_infile_error)(void *, char*, + unsigned int), + void *); +void +mysql_set_local_infile_default(MYSQL *mysql); +void mysql_enable_rpl_parse(MYSQL* mysql); +void mysql_disable_rpl_parse(MYSQL* mysql); +int mysql_rpl_parse_enabled(MYSQL* mysql); +void mysql_enable_reads_from_master(MYSQL* mysql); +void mysql_disable_reads_from_master(MYSQL* mysql); +my_bool mysql_reads_from_master_enabled(MYSQL* mysql); +enum mysql_rpl_type mysql_rpl_query_type(const char* q, int len); +my_bool mysql_rpl_probe(MYSQL* mysql); +int mysql_set_master(MYSQL* mysql, const char* host, + unsigned int port, + const char* user, + const char* passwd); +int mysql_add_slave(MYSQL* mysql, const char* host, + unsigned int port, + const char* user, + const char* passwd); +int mysql_shutdown(MYSQL *mysql, + enum mysql_enum_shutdown_level + shutdown_level); +int mysql_dump_debug_info(MYSQL *mysql); +int mysql_refresh(MYSQL *mysql, + unsigned int refresh_options); +int mysql_kill(MYSQL *mysql,unsigned long pid); +int mysql_set_server_option(MYSQL *mysql, + enum enum_mysql_set_option + option); +int mysql_ping(MYSQL *mysql); +const char * mysql_stat(MYSQL *mysql); +const char * mysql_get_server_info(MYSQL *mysql); +const char * mysql_get_client_info(void); +unsigned long mysql_get_client_version(void); +const char * mysql_get_host_info(MYSQL *mysql); +unsigned long mysql_get_server_version(MYSQL *mysql); +unsigned int mysql_get_proto_info(MYSQL *mysql); +MYSQL_RES * mysql_list_dbs(MYSQL *mysql,const char *wild); +MYSQL_RES * mysql_list_tables(MYSQL *mysql,const char *wild); +MYSQL_RES * mysql_list_processes(MYSQL *mysql); +int mysql_options(MYSQL *mysql,enum mysql_option option, + const void *arg); +void mysql_free_result(MYSQL_RES *result); +void mysql_data_seek(MYSQL_RES *result, + my_ulonglong offset); +MYSQL_ROW_OFFSET mysql_row_seek(MYSQL_RES *result, + MYSQL_ROW_OFFSET offset); +MYSQL_FIELD_OFFSET mysql_field_seek(MYSQL_RES *result, + MYSQL_FIELD_OFFSET offset); +MYSQL_ROW mysql_fetch_row(MYSQL_RES *result); +unsigned long * mysql_fetch_lengths(MYSQL_RES *result); +MYSQL_FIELD * mysql_fetch_field(MYSQL_RES *result); +MYSQL_RES * mysql_list_fields(MYSQL *mysql, const char *table, + const char *wild); +unsigned long mysql_escape_string(char *to,const char *from, + unsigned long from_length); +unsigned long mysql_hex_string(char *to,const char *from, + unsigned long from_length); +unsigned long mysql_real_escape_string(MYSQL *mysql, + char *to,const char *from, + unsigned long length); +void mysql_debug(const char *debug); +void myodbc_remove_escape(MYSQL *mysql,char *name); +unsigned int mysql_thread_safe(void); +my_bool mysql_embedded(void); +MYSQL_MANAGER* mysql_manager_init(MYSQL_MANAGER* con); +MYSQL_MANAGER* mysql_manager_connect(MYSQL_MANAGER* con, + const char* host, + const char* user, + const char* passwd, + unsigned int port); +void mysql_manager_close(MYSQL_MANAGER* con); +int mysql_manager_command(MYSQL_MANAGER* con, + const char* cmd, int cmd_len); +int mysql_manager_fetch_line(MYSQL_MANAGER* con, + char* res_buf, + int res_buf_size); +my_bool mysql_read_query_result(MYSQL *mysql); +enum enum_mysql_stmt_state +{ + MYSQL_STMT_INIT_DONE= 1, MYSQL_STMT_PREPARE_DONE, MYSQL_STMT_EXECUTE_DONE, + MYSQL_STMT_FETCH_DONE +}; +typedef struct st_mysql_bind +{ + unsigned long *length; + my_bool *is_null; + void *buffer; + my_bool *error; + unsigned char *row_ptr; + void (*store_param_func)(NET *net, struct st_mysql_bind *param); + void (*fetch_result)(struct st_mysql_bind *, MYSQL_FIELD *, + unsigned char **row); + void (*skip_result)(struct st_mysql_bind *, MYSQL_FIELD *, + unsigned char **row); + unsigned long buffer_length; + unsigned long offset; + unsigned long length_value; + unsigned int param_number; + unsigned int pack_length; + enum enum_field_types buffer_type; + my_bool error_value; + my_bool is_unsigned; + my_bool long_data_used; + my_bool is_null_value; + void *extension; +} MYSQL_BIND; +typedef struct st_mysql_stmt +{ + MEM_ROOT mem_root; + LIST list; + MYSQL *mysql; + MYSQL_BIND *params; + MYSQL_BIND *bind; + MYSQL_FIELD *fields; + MYSQL_DATA result; + MYSQL_ROWS *data_cursor; + int (*read_row_func)(struct st_mysql_stmt *stmt, + unsigned char **row); + my_ulonglong affected_rows; + my_ulonglong insert_id; + unsigned long stmt_id; + unsigned long flags; + unsigned long prefetch_rows; + unsigned int server_status; + unsigned int last_errno; + unsigned int param_count; + unsigned int field_count; + enum enum_mysql_stmt_state state; + char last_error[512]; + char sqlstate[5 +1]; + my_bool send_types_to_server; + my_bool bind_param_done; + unsigned char bind_result_done; + my_bool unbuffered_fetch_cancelled; + my_bool update_max_length; + void *extension; +} MYSQL_STMT; +enum enum_stmt_attr_type +{ + STMT_ATTR_UPDATE_MAX_LENGTH, + STMT_ATTR_CURSOR_TYPE, + STMT_ATTR_PREFETCH_ROWS +}; +typedef struct st_mysql_methods +{ + my_bool (*read_query_result)(MYSQL *mysql); + my_bool (*advanced_command)(MYSQL *mysql, + enum enum_server_command command, + const unsigned char *header, + unsigned long header_length, + const unsigned char *arg, + unsigned long arg_length, + my_bool skip_check, + MYSQL_STMT *stmt); + MYSQL_DATA *(*read_rows)(MYSQL *mysql,MYSQL_FIELD *mysql_fields, + unsigned int fields); + MYSQL_RES * (*use_result)(MYSQL *mysql); + void (*fetch_lengths)(unsigned long *to, + MYSQL_ROW column, unsigned int field_count); + void (*flush_use_result)(MYSQL *mysql); + MYSQL_FIELD * (*list_fields)(MYSQL *mysql); + my_bool (*read_prepare_result)(MYSQL *mysql, MYSQL_STMT *stmt); + int (*stmt_execute)(MYSQL_STMT *stmt); + int (*read_binary_rows)(MYSQL_STMT *stmt); + int (*unbuffered_fetch)(MYSQL *mysql, char **row); + void (*free_embedded_thd)(MYSQL *mysql); + const char *(*read_statistics)(MYSQL *mysql); + my_bool (*next_result)(MYSQL *mysql); + int (*read_change_user_result)(MYSQL *mysql, char *buff, const char *passwd); + int (*read_rows_from_cursor)(MYSQL_STMT *stmt); +} MYSQL_METHODS; +MYSQL_STMT * mysql_stmt_init(MYSQL *mysql); +int mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, + unsigned long length); +int mysql_stmt_execute(MYSQL_STMT *stmt); +int mysql_stmt_fetch(MYSQL_STMT *stmt); +int mysql_stmt_fetch_column(MYSQL_STMT *stmt, MYSQL_BIND *bind_arg, + unsigned int column, + unsigned long offset); +int mysql_stmt_store_result(MYSQL_STMT *stmt); +unsigned long mysql_stmt_param_count(MYSQL_STMT * stmt); +my_bool mysql_stmt_attr_set(MYSQL_STMT *stmt, + enum enum_stmt_attr_type attr_type, + const void *attr); +my_bool mysql_stmt_attr_get(MYSQL_STMT *stmt, + enum enum_stmt_attr_type attr_type, + void *attr); +my_bool mysql_stmt_bind_param(MYSQL_STMT * stmt, MYSQL_BIND * bnd); +my_bool mysql_stmt_bind_result(MYSQL_STMT * stmt, MYSQL_BIND * bnd); +my_bool mysql_stmt_close(MYSQL_STMT * stmt); +my_bool mysql_stmt_reset(MYSQL_STMT * stmt); +my_bool mysql_stmt_free_result(MYSQL_STMT *stmt); +my_bool mysql_stmt_send_long_data(MYSQL_STMT *stmt, + unsigned int param_number, + const char *data, + unsigned long length); +MYSQL_RES * mysql_stmt_result_metadata(MYSQL_STMT *stmt); +MYSQL_RES * mysql_stmt_param_metadata(MYSQL_STMT *stmt); +unsigned int mysql_stmt_errno(MYSQL_STMT * stmt); +const char * mysql_stmt_error(MYSQL_STMT * stmt); +const char * mysql_stmt_sqlstate(MYSQL_STMT * stmt); +MYSQL_ROW_OFFSET mysql_stmt_row_seek(MYSQL_STMT *stmt, + MYSQL_ROW_OFFSET offset); +MYSQL_ROW_OFFSET mysql_stmt_row_tell(MYSQL_STMT *stmt); +void mysql_stmt_data_seek(MYSQL_STMT *stmt, my_ulonglong offset); +my_ulonglong mysql_stmt_num_rows(MYSQL_STMT *stmt); +my_ulonglong mysql_stmt_affected_rows(MYSQL_STMT *stmt); +my_ulonglong mysql_stmt_insert_id(MYSQL_STMT *stmt); +unsigned int mysql_stmt_field_count(MYSQL_STMT *stmt); +my_bool mysql_commit(MYSQL * mysql); +my_bool mysql_rollback(MYSQL * mysql); +my_bool mysql_autocommit(MYSQL * mysql, my_bool auto_mode); +my_bool mysql_more_results(MYSQL *mysql); +int mysql_next_result(MYSQL *mysql); +void mysql_close(MYSQL *sock); diff --git a/include/mysql/plugin.h.pp b/include/mysql/plugin.h.pp new file mode 100644 index 00000000000..c781bae9a97 --- /dev/null +++ b/include/mysql/plugin.h.pp @@ -0,0 +1,140 @@ +struct st_mysql_lex_string +{ + char *str; + unsigned int length; +}; +typedef struct st_mysql_lex_string MYSQL_LEX_STRING; +struct st_mysql_xid { + long formatID; + long gtrid_length; + long bqual_length; + char data[128]; +}; +typedef struct st_mysql_xid MYSQL_XID; +enum enum_mysql_show_type +{ + SHOW_UNDEF, SHOW_BOOL, SHOW_INT, SHOW_LONG, + SHOW_LONGLONG, SHOW_CHAR, SHOW_CHAR_PTR, + SHOW_ARRAY, SHOW_FUNC, SHOW_DOUBLE +}; +struct st_mysql_show_var { + const char *name; + char *value; + enum enum_mysql_show_type type; +}; +typedef int (*mysql_show_var_func)(void*, struct st_mysql_show_var*, char *); +struct st_mysql_sys_var; +struct st_mysql_value; +typedef int (*mysql_var_check_func)(void* thd, + struct st_mysql_sys_var *var, + void *save, struct st_mysql_value *value); +typedef void (*mysql_var_update_func)(void* thd, + struct st_mysql_sys_var *var, + void *var_ptr, const void *save); +struct st_mysql_plugin +{ + int type; + void *info; + const char *name; + const char *author; + const char *descr; + int license; + int (*init)(void *); + int (*deinit)(void *); + unsigned int version; + struct st_mysql_show_var *status_vars; + struct st_mysql_sys_var **system_vars; + void * __reserved1; +}; +enum enum_ftparser_mode +{ + MYSQL_FTPARSER_SIMPLE_MODE= 0, + MYSQL_FTPARSER_WITH_STOPWORDS= 1, + MYSQL_FTPARSER_FULL_BOOLEAN_INFO= 2 +}; +enum enum_ft_token_type +{ + FT_TOKEN_EOF= 0, + FT_TOKEN_WORD= 1, + FT_TOKEN_LEFT_PAREN= 2, + FT_TOKEN_RIGHT_PAREN= 3, + FT_TOKEN_STOPWORD= 4 +}; +typedef struct st_mysql_ftparser_boolean_info +{ + enum enum_ft_token_type type; + int yesno; + int weight_adjust; + char wasign; + char trunc; + char prev; + char *quot; +} MYSQL_FTPARSER_BOOLEAN_INFO; +typedef struct st_mysql_ftparser_param +{ + int (*mysql_parse)(struct st_mysql_ftparser_param *, + char *doc, int doc_len); + int (*mysql_add_word)(struct st_mysql_ftparser_param *, + char *word, int word_len, + MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info); + void *ftparser_state; + void *mysql_ftparam; + struct charset_info_st *cs; + char *doc; + int length; + int flags; + enum enum_ftparser_mode mode; +} MYSQL_FTPARSER_PARAM; +struct st_mysql_ftparser +{ + int interface_version; + int (*parse)(MYSQL_FTPARSER_PARAM *param); + int (*init)(MYSQL_FTPARSER_PARAM *param); + int (*deinit)(MYSQL_FTPARSER_PARAM *param); +}; +struct st_mysql_storage_engine +{ + int interface_version; +}; +struct handlerton; +struct st_mysql_daemon +{ + int interface_version; +}; +struct st_mysql_information_schema +{ + int interface_version; +}; +struct st_mysql_value +{ + int (*value_type)(struct st_mysql_value *); + const char *(*val_str)(struct st_mysql_value *, char *buffer, int *length); + int (*val_real)(struct st_mysql_value *, double *realbuf); + int (*val_int)(struct st_mysql_value *, long long *intbuf); +}; +int thd_in_lock_tables(const void* thd); +int thd_tablespace_op(const void* thd); +long long thd_test_options(const void* thd, long long test_options); +int thd_sql_command(const void* thd); +void **thd_ha_data(const void* thd, const struct handlerton *hton); +int thd_tx_isolation(const void* thd); +char *thd_security_context(void* thd, char *buffer, unsigned int length, + unsigned int max_query_len); +void thd_inc_row_count(void* thd); +const char *set_thd_proc_info(void*, const char * info, const char *func, + const char *file, const unsigned int line); +int mysql_tmpfile(const char *prefix); +int thd_killed(const void* thd); +unsigned long thd_get_thread_id(const void* thd); +void *thd_alloc(void* thd, unsigned int size); +void *thd_calloc(void* thd, unsigned int size); +char *thd_strdup(void* thd, const char *str); +char *thd_strmake(void* thd, const char *str, unsigned int size); +void *thd_memdup(void* thd, const void* str, unsigned int size); +MYSQL_LEX_STRING *thd_make_lex_string(void* thd, MYSQL_LEX_STRING *lex_str, + const char *str, unsigned int size, + int allocate_lex_string); +void thd_get_xid(const void* thd, MYSQL_XID *xid); +void mysql_query_cache_invalidate4(void* thd, + const char *key, unsigned int key_length, + int using_trx); diff --git a/include/mysql_com.h b/include/mysql_com.h index e6e1a470469..41941d01fd2 100644 --- a/include/mysql_com.h +++ b/include/mysql_com.h @@ -184,19 +184,38 @@ enum enum_server_command #define SERVER_MORE_RESULTS_EXISTS 8 /* Multi query - next query exists */ #define SERVER_QUERY_NO_GOOD_INDEX_USED 16 #define SERVER_QUERY_NO_INDEX_USED 32 -/* +/** The server was able to fulfill the clients request and opened a read-only non-scrollable cursor for a query. This flag comes in reply to COM_STMT_EXECUTE and COM_STMT_FETCH commands. */ #define SERVER_STATUS_CURSOR_EXISTS 64 -/* +/** This flag is sent when a read-only cursor is exhausted, in reply to COM_STMT_FETCH command. */ #define SERVER_STATUS_LAST_ROW_SENT 128 #define SERVER_STATUS_DB_DROPPED 256 /* A database was dropped */ #define SERVER_STATUS_NO_BACKSLASH_ESCAPES 512 +/** + Sent to the client if after a prepared statement reprepare + we discovered that the new statement returns a different + number of result set columns. +*/ +#define SERVER_STATUS_METADATA_CHANGED 1024 + +/** + Server status flags that must be cleared when starting + execution of a new SQL statement. + Flags from this set are only added to the + current server status by the execution engine, but + never removed -- the execution engine expects them + to disappear automagically by the next command. +*/ +#define SERVER_STATUS_CLEAR_SET (SERVER_QUERY_NO_GOOD_INDEX_USED| \ + SERVER_QUERY_NO_INDEX_USED|\ + SERVER_MORE_RESULTS_EXISTS|\ + SERVER_STATUS_METADATA_CHANGED) #define MYSQL_ERRMSG_SIZE 512 #define NET_READ_TIMEOUT 30 /* Timeout on read */ @@ -205,6 +224,7 @@ enum enum_server_command #define ONLY_KILL_QUERY 1 + struct st_vio; /* Only C */ typedef struct st_vio Vio; diff --git a/include/mysql_h.ic b/include/mysql_h.ic deleted file mode 100644 index 832678a106b..00000000000 --- a/include/mysql_h.ic +++ /dev/null @@ -1,1166 +0,0 @@ -struct character_set; -struct rand_struct; -struct st_list; -struct st_mem_root; -struct st_mysql; -struct st_mysql_bind; -struct st_mysql_daemon; -struct st_mysql_data; -struct st_mysql_field; -struct st_mysql_ftparser; -struct st_mysql_ftparser_boolean_info; -struct st_mysql_ftparser_param; -struct st_mysql_information_schema; -struct st_mysql_lex_string; -struct st_mysql_manager; -struct st_mysql_methods; -struct st_mysql_options; -struct st_mysql_parameters; -struct st_mysql_plugin; -struct st_mysql_res; -struct st_mysql_rows; -struct st_mysql_show_var; -struct st_mysql_stmt; -struct st_mysql_storage_engine; -struct st_mysql_time; -struct st_mysql_value; -struct st_mysql_xid; -struct st_net; -struct st_typelib; -struct st_udf_args; -struct st_udf_init; -struct st_used_mem; -enum Item_result; -enum enum_cursor_type; -enum enum_field_types; -enum enum_ft_token_type; -enum enum_ftparser_mode; -enum enum_mysql_set_option; -enum enum_mysql_show_type; -enum enum_mysql_stmt_state; -enum enum_mysql_timestamp_type; -enum enum_server_command; -enum enum_stmt_attr_type; -enum mysql_enum_shutdown_level; -enum mysql_option; -enum mysql_protocol_type; -enum mysql_rpl_type; -enum mysql_status; -# 139 "mysql.h" -typedef struct st_mysql_rows MYSQL_ROWS; -# 23 "my_list.h" -typedef struct st_list LIST; -# 34 "my_alloc.h" -typedef struct st_mem_root MEM_ROOT; -# 258 "mysql.h" -typedef struct st_mysql MYSQL; -# 654 "mysql.h" -typedef struct st_mysql_bind MYSQL_BIND; -# 95 "mysql.h" -typedef struct st_mysql_field MYSQL_FIELD; -# 120 "mysql.h" -typedef unsigned int MYSQL_FIELD_OFFSET; -# 35 "mysql/plugin.h" -typedef struct st_mysql_lex_string MYSQL_LEX_STRING; -# 348 "mysql.h" -typedef struct st_mysql_manager MYSQL_MANAGER; -# 363 "mysql.h" -typedef struct st_mysql_parameters MYSQL_PARAMETERS; -# 316 "mysql.h" -typedef struct st_mysql_res MYSQL_RES; -# 119 "mysql.h" -typedef char * * MYSQL_ROW; -# 145 "mysql.h" -typedef MYSQL_ROWS * MYSQL_ROW_OFFSET; -# 683 "mysql.h" -typedef struct st_mysql_stmt MYSQL_STMT; -# 52 "mysql/plugin.h" -typedef struct st_mysql_xid MYSQL_XID; -# 243 "mysql.h" -typedef struct character_set MY_CHARSET_INFO; -# 188 "mysql_com.h" -typedef struct st_net NET; -# 22 "typelib.h" -typedef struct st_typelib TYPELIB; -# 178 "mysql_com.h" -typedef struct st_vio Vio; -# 28 "my_list.h" -typedef int (* list_walk_action)(void *, void *); -# 51 "mysql.h" -typedef char my_bool; -# 65 "mysql.h" -typedef int my_socket; -# 128 "mysql.h" -typedef unsigned long long int my_ulonglong; -# 214 "/usr/lib/gcc/i486-linux-gnu/4.1.3/include/stddef.h" -typedef unsigned int size_t; -# 149 "mysql.h" -typedef struct embedded_query_result EMBEDDED_QUERY_RESULT; -# 150 "mysql.h" -typedef struct st_mysql_data MYSQL_DATA; -# 495 "mysql/plugin.h" -typedef struct st_mysql_ftparser_boolean_info MYSQL_FTPARSER_BOOLEAN_INFO; -# 557 "mysql/plugin.h" -typedef struct st_mysql_ftparser_param MYSQL_FTPARSER_PARAM; -# 753 "mysql.h" -typedef struct st_mysql_methods MYSQL_METHODS; -# 47 "mysql_time.h" -typedef struct st_mysql_time MYSQL_TIME; -# 383 "mysql_com.h" -typedef struct st_udf_args UDF_ARGS; -# 397 "mysql_com.h" -typedef struct st_udf_init UDF_INIT; -# 26 "my_alloc.h" -typedef struct st_used_mem USED_MEM; -# 123 "mysql/plugin.h" -typedef int (* mysql_show_var_func)(void *, struct st_mysql_show_var *, char *); -# 170 "mysql/plugin.h" -typedef int (* mysql_var_check_func)(void * thd, struct st_mysql_sys_var * var, void * save, struct st_mysql_value * value); -# 188 "mysql/plugin.h" -typedef void (* mysql_var_update_func)(void * thd, struct st_mysql_sys_var * var, void * var_ptr, void * save); -# 243 "mysql.h" -struct __attribute__((aligned(__alignof__(unsigned int)), aligned(__alignof__(void *)))) character_set - { - unsigned int number; - unsigned int state; - char const * csname; - char const * name; - char const * comment; - char const * dir; - unsigned int mbminlen; - unsigned int mbmaxlen; - }; -# 369 "mysql_com.h" -struct __attribute__((aligned(__alignof__(unsigned long int)), aligned(__alignof__(double)))) rand_struct - { - unsigned long int seed1; - unsigned long int seed2; - unsigned long int max_value; - double max_value_dbl; - }; -# 23 "my_list.h" -struct __attribute__((aligned(__alignof__(void *)))) st_list - { - struct st_list * prev; - struct st_list * next; - void * data; - }; -# 34 "my_alloc.h" -struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned int)))) st_mem_root - { - USED_MEM * free; - USED_MEM * used; - USED_MEM * pre_alloc; - size_t min_malloc; - size_t block_size; - unsigned int block_num; - unsigned int first_block_usage; - void (* error_handler)(void); - }; -# 258 "mysql.h" -struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned long long int)))) st_mysql - { - NET net; - unsigned char * connector_fd; - char * host; - char * user; - char * passwd; - char * unix_socket; - char * server_version; - char * host_info; - char * info; - char * db; - struct charset_info_st * charset; - MYSQL_FIELD * fields; - MEM_ROOT field_alloc; - my_ulonglong affected_rows; - my_ulonglong insert_id; - my_ulonglong extra_info; - unsigned long int thread_id; - unsigned long int packet_length; - unsigned int port; - unsigned long int client_flag; - unsigned long int server_capabilities; - unsigned int protocol_version; - unsigned int field_count; - unsigned int server_status; - unsigned int server_language; - unsigned int warning_count; - struct st_mysql_options options; - enum mysql_status status; - my_bool free_me; - my_bool reconnect; - char scramble[(20 + 1)]; - my_bool rpl_pivot; - struct st_mysql * master; - struct st_mysql * next_slave; - struct st_mysql * last_used_slave; - struct st_mysql * last_used_con; - LIST * stmts; - struct st_mysql_methods const * methods; - void * thd; - my_bool * unbuffered_fetch_owner; - char * info_buffer; - void * extension; - }; -# 654 "mysql.h" -struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned long int)))) st_mysql_bind - { - unsigned long int * length; - my_bool * is_null; - void * buffer; - my_bool * error; - unsigned char * row_ptr; - void (* store_param_func)(NET * net, struct st_mysql_bind * param); - void (* fetch_result)(struct st_mysql_bind *, MYSQL_FIELD *, unsigned char * * row); - void (* skip_result)(struct st_mysql_bind *, MYSQL_FIELD *, unsigned char * * row); - unsigned long int buffer_length; - unsigned long int offset; - unsigned long int length_value; - unsigned int param_number; - unsigned int pack_length; - enum enum_field_types buffer_type; - my_bool error_value; - my_bool is_unsigned; - my_bool long_data_used; - my_bool is_null_value; - void * extension; - }; -# 628 "mysql/plugin.h" -struct __attribute__((aligned(__alignof__(int)))) st_mysql_daemon - { - int interface_version; - }; -# 150 "mysql.h" -struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned long long int)))) st_mysql_data - { - MYSQL_ROWS * data; - struct embedded_query_result * embedded_info; - MEM_ROOT alloc; - my_ulonglong rows; - unsigned int fields; - void * extension; - }; -# 95 "mysql.h" -struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned long int)))) st_mysql_field - { - char * name; - char * org_name; - char * table; - char * org_table; - char * db; - char * catalog; - char * def; - unsigned long int length; - unsigned long int max_length; - unsigned int name_length; - unsigned int org_name_length; - unsigned int table_length; - unsigned int org_table_length; - unsigned int db_length; - unsigned int catalog_length; - unsigned int def_length; - unsigned int flags; - unsigned int decimals; - unsigned int charsetnr; - enum enum_field_types type; - void * extension; - }; -# 581 "mysql/plugin.h" -struct __attribute__((aligned(__alignof__(int)), aligned(__alignof__(void *)))) st_mysql_ftparser - { - int interface_version; - int (* parse)(MYSQL_FTPARSER_PARAM * param); - int (* init)(MYSQL_FTPARSER_PARAM * param); - int (* deinit)(MYSQL_FTPARSER_PARAM * param); - }; -# 495 "mysql/plugin.h" -struct __attribute__((aligned(__alignof__(int)), aligned(__alignof__(void *)))) st_mysql_ftparser_boolean_info - { - enum enum_ft_token_type type; - int yesno; - int weight_adjust; - char wasign; - char trunc; - char prev; - char * quot; - }; -# 557 "mysql/plugin.h" -struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(int)))) st_mysql_ftparser_param - { - int (* mysql_parse)(struct st_mysql_ftparser_param *, char * doc, int); - int (* mysql_add_word)(struct st_mysql_ftparser_param *, char * word, int, MYSQL_FTPARSER_BOOLEAN_INFO * boolean_info); - void * ftparser_state; - void * mysql_ftparam; - struct charset_info_st * cs; - char * doc; - int length; - int flags; - enum enum_ftparser_mode mode; - }; -# 638 "mysql/plugin.h" -struct __attribute__((aligned(__alignof__(int)))) st_mysql_information_schema - { - int interface_version; - }; -# 29 "mysql/plugin.h" -struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned int)))) st_mysql_lex_string - { - char * str; - unsigned int length; - }; -# 348 "mysql.h" -struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned long int)))) st_mysql_manager - { - NET net; - char * host; - char * user; - char * passwd; - char * net_buf; - char * net_buf_pos; - char * net_data_end; - unsigned int port; - int cmd_status; - int last_errno; - int net_buf_size; - my_bool free_me; - my_bool eof; - char last_error[256]; - void * extension; - }; -# 753 "mysql.h" -struct __attribute__((aligned(__alignof__(void *)))) st_mysql_methods - { - my_bool (* read_query_result)(MYSQL * mysql); - my_bool (* advanced_command)(MYSQL * mysql, enum enum_server_command, unsigned char const * header, unsigned long int, unsigned char const * arg, unsigned long int, my_bool, MYSQL_STMT * stmt); - MYSQL_DATA * (* read_rows)(MYSQL * mysql, MYSQL_FIELD * mysql_fields, unsigned int); - MYSQL_RES * (* use_result)(MYSQL * mysql); - void (* fetch_lengths)(unsigned long int * to, MYSQL_ROW, unsigned int); - void (* flush_use_result)(MYSQL * mysql); - MYSQL_FIELD * (* list_fields)(MYSQL * mysql); - my_bool (* read_prepare_result)(MYSQL * mysql, MYSQL_STMT * stmt); - int (* stmt_execute)(MYSQL_STMT * stmt); - int (* read_binary_rows)(MYSQL_STMT * stmt); - int (* unbuffered_fetch)(MYSQL * mysql, char * * row); - void (* free_embedded_thd)(MYSQL * mysql); - char const * (* read_statistics)(MYSQL * mysql); - my_bool (* next_result)(MYSQL * mysql); - int (* read_change_user_result)(MYSQL * mysql, char * buff, char const * passwd); - int (* read_rows_from_cursor)(MYSQL_STMT * stmt); - }; -# 173 "mysql.h" -struct __attribute__((aligned(__alignof__(unsigned long int)), aligned(__alignof__(void *)))) st_mysql_options - { - unsigned int connect_timeout; - unsigned int read_timeout; - unsigned int write_timeout; - unsigned int port; - unsigned int protocol; - unsigned long int client_flag; - char * host; - char * user; - char * password; - char * unix_socket; - char * db; - struct st_dynamic_array * init_commands; - char * my_cnf_file; - char * my_cnf_group; - char * charset_dir; - char * charset_name; - char * ssl_key; - char * ssl_cert; - char * ssl_ca; - char * ssl_capath; - char * ssl_cipher; - char * shared_memory_base_name; - unsigned long int max_allowed_packet; - my_bool use_ssl; - my_bool compress; - my_bool named_pipe; - my_bool rpl_probe; - my_bool rpl_parse; - my_bool no_master_reads; - my_bool separate_thread; - enum mysql_option methods_to_use; - char * client_ip; - my_bool secure_auth; - my_bool report_data_truncation; - int (* local_infile_init)(void * *, char const *, void *); - int (* local_infile_read)(void *, char *, unsigned int); - void (* local_infile_end)(void); - int (* local_infile_error)(void *, char *, unsigned int); - void * local_infile_userdata; - void * extension; - }; -# 363 "mysql.h" -struct __attribute__((aligned(__alignof__(void *)))) st_mysql_parameters - { - unsigned long int * p_max_allowed_packet; - unsigned long int * p_net_buffer_length; - void * extension; - }; -# 384 "mysql/plugin.h" -struct __attribute__((aligned(__alignof__(int)), aligned(__alignof__(void *)))) st_mysql_plugin - { - int type; - void * info; - char const * name; - char const * author; - char const * descr; - int license; - int (* init)(void); - int (* deinit)(void); - unsigned int version; - struct st_mysql_show_var * status_vars; - struct st_mysql_sys_var * * system_vars; - void * __reserved1; - }; -# 316 "mysql.h" -struct __attribute__((aligned(__alignof__(unsigned long long int)), aligned(__alignof__(void *)))) st_mysql_res - { - my_ulonglong row_count; - MYSQL_FIELD * fields; - MYSQL_DATA * data; - MYSQL_ROWS * data_cursor; - unsigned long int * lengths; - MYSQL * handle; - struct st_mysql_methods const * methods; - MYSQL_ROW row; - MYSQL_ROW current_row; - MEM_ROOT field_alloc; - unsigned int field_count; - unsigned int current_field; - my_bool eof; - my_bool unbuffered_fetch_cancelled; - void * extension; - }; -# 139 "mysql.h" -struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned long int)))) st_mysql_rows - { - struct st_mysql_rows * next; - MYSQL_ROW data; - unsigned long int length; - }; -# 116 "mysql/plugin.h" -struct __attribute__((aligned(__alignof__(void *)))) st_mysql_show_var - { - char const * name; - char * value; - enum enum_mysql_show_type type; - }; -# 683 "mysql.h" -struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned long long int)))) st_mysql_stmt - { - MEM_ROOT mem_root; - LIST list; - MYSQL * mysql; - MYSQL_BIND * params; - MYSQL_BIND * bind; - MYSQL_FIELD * fields; - MYSQL_DATA result; - MYSQL_ROWS * data_cursor; - int (* read_row_func)(struct st_mysql_stmt * stmt, unsigned char * * row); - my_ulonglong affected_rows; - my_ulonglong insert_id; - unsigned long int stmt_id; - unsigned long int flags; - unsigned long int prefetch_rows; - unsigned int server_status; - unsigned int last_errno; - unsigned int param_count; - unsigned int field_count; - enum enum_mysql_stmt_state state; - char last_error[512]; - char sqlstate[(5 + 1)]; - my_bool send_types_to_server; - my_bool bind_param_done; - unsigned char bind_result_done; - my_bool unbuffered_fetch_cancelled; - my_bool update_max_length; - void * extension; - }; -# 616 "mysql/plugin.h" -struct __attribute__((aligned(__alignof__(int)))) st_mysql_storage_engine - { - int interface_version; - }; -# 47 "mysql_time.h" -struct __attribute__((aligned(__alignof__(unsigned long int)))) st_mysql_time - { - unsigned int year; - unsigned int month; - unsigned int day; - unsigned int hour; - unsigned int minute; - unsigned int second; - unsigned long int second_part; - my_bool neg; - enum enum_mysql_timestamp_type time_type; - }; -# 658 "mysql/plugin.h" -struct __attribute__((aligned(__alignof__(void *)))) st_mysql_value - { - int (* value_type)(struct st_mysql_value *); - char const * (* val_str)(struct st_mysql_value *, char * buffer, int * length); - int (* val_real)(struct st_mysql_value *, double * realbuf); - int (* val_int)(struct st_mysql_value *, long long int * intbuf); - }; -# 46 "mysql/plugin.h" -struct __attribute__((aligned(__alignof__(long int)))) st_mysql_xid - { - long int formatID; - long int gtrid_length; - long int bqual_length; - char data[128]; - }; -# 188 "mysql_com.h" -struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned long int)))) st_net - { - Vio * vio; - unsigned char * buff; - unsigned char * buff_end; - unsigned char * write_pos; - unsigned char * read_pos; - my_socket fd; - unsigned long int remain_in_buf; - unsigned long int length; - unsigned long int buf_length; - unsigned long int where_b; - unsigned long int max_packet; - unsigned long int max_packet_size; - unsigned int pkt_nr; - unsigned int compress_pkt_nr; - unsigned int write_timeout; - unsigned int read_timeout; - unsigned int retry_count; - int fcntl; - unsigned int * return_status; - unsigned char reading_or_writing; - char save_char; - my_bool unused0; - my_bool unused; - my_bool compress; - my_bool unused1; - unsigned char * query_cache_query; - unsigned int last_errno; - unsigned char error; - my_bool unused2; - my_bool return_errno; - char last_error[512]; - char sqlstate[(5 + 1)]; - void * extension; - }; -# 22 "typelib.h" -struct __attribute__((aligned(__alignof__(unsigned int)), aligned(__alignof__(void *)))) st_typelib - { - unsigned int count; - char const * name; - char const * * type_names; - unsigned int * type_lengths; - }; -# 383 "mysql_com.h" -struct __attribute__((aligned(__alignof__(unsigned int)), aligned(__alignof__(void *)))) st_udf_args - { - unsigned int arg_count; - enum Item_result * arg_type; - char * * args; - unsigned long int * lengths; - char * maybe_null; - char * * attributes; - unsigned long int * attribute_lengths; - void * extension; - }; -# 397 "mysql_com.h" -struct __attribute__((aligned(__alignof__(unsigned long int)), aligned(__alignof__(void *)))) st_udf_init - { - my_bool maybe_null; - unsigned int decimals; - unsigned long int max_length; - char * ptr; - my_bool const_item; - void * extension; - }; -# 26 "my_alloc.h" -struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned int)))) st_used_mem - { - struct st_used_mem * next; - unsigned int left; - unsigned int size; - }; -# 380 "mysql_com.h" -enum Item_result - { - STRING_RESULT = 0, - REAL_RESULT = 1, - INT_RESULT = 2, - ROW_RESULT = 3, - DECIMAL_RESULT = 4, - }; -# 321 "mysql_com.h" -enum enum_cursor_type - { - CURSOR_TYPE_NO_CURSOR = 0, - CURSOR_TYPE_READ_ONLY = 1, - CURSOR_TYPE_FOR_UPDATE = 2, - CURSOR_TYPE_SCROLLABLE = 4, - }; -# 234 "mysql_com.h" -enum enum_field_types - { - MYSQL_TYPE_DECIMAL = 0, - MYSQL_TYPE_TINY = 1, - MYSQL_TYPE_SHORT = 2, - MYSQL_TYPE_LONG = 3, - MYSQL_TYPE_FLOAT = 4, - MYSQL_TYPE_DOUBLE = 5, - MYSQL_TYPE_NULL = 6, - MYSQL_TYPE_TIMESTAMP = 7, - MYSQL_TYPE_LONGLONG = 8, - MYSQL_TYPE_INT24 = 9, - MYSQL_TYPE_DATE = 10, - MYSQL_TYPE_TIME = 11, - MYSQL_TYPE_DATETIME = 12, - MYSQL_TYPE_YEAR = 13, - MYSQL_TYPE_NEWDATE = 14, - MYSQL_TYPE_VARCHAR = 15, - MYSQL_TYPE_BIT = 16, - MYSQL_TYPE_NEWDECIMAL = 246, - MYSQL_TYPE_ENUM = 247, - MYSQL_TYPE_SET = 248, - MYSQL_TYPE_TINY_BLOB = 249, - MYSQL_TYPE_MEDIUM_BLOB = 250, - MYSQL_TYPE_LONG_BLOB = 251, - MYSQL_TYPE_BLOB = 252, - MYSQL_TYPE_VAR_STRING = 253, - MYSQL_TYPE_STRING = 254, - MYSQL_TYPE_GEOMETRY = 255, - }; -# 455 "mysql/plugin.h" -enum enum_ft_token_type - { - FT_TOKEN_EOF = 0, - FT_TOKEN_WORD = 1, - FT_TOKEN_LEFT_PAREN = 2, - FT_TOKEN_RIGHT_PAREN = 3, - FT_TOKEN_STOPWORD = 4, - }; -# 407 "mysql/plugin.h" -enum enum_ftparser_mode - { - MYSQL_FTPARSER_SIMPLE_MODE = 0, - MYSQL_FTPARSER_WITH_STOPWORDS = 1, - MYSQL_FTPARSER_FULL_BOOLEAN_INFO = 2, - }; -# 331 "mysql_com.h" -enum enum_mysql_set_option - { - MYSQL_OPTION_MULTI_STATEMENTS_ON = 0, - MYSQL_OPTION_MULTI_STATEMENTS_OFF = 1, - }; -# 109 "mysql/plugin.h" -enum enum_mysql_show_type - { - SHOW_UNDEF = 0, - SHOW_BOOL = 1, - SHOW_INT = 2, - SHOW_LONG = 3, - SHOW_LONGLONG = 4, - SHOW_CHAR = 5, - SHOW_CHAR_PTR = 6, - SHOW_ARRAY = 7, - SHOW_FUNC = 8, - SHOW_DOUBLE = 9, - }; -# 584 "mysql.h" -enum enum_mysql_stmt_state - { - MYSQL_STMT_INIT_DONE = 1, - MYSQL_STMT_PREPARE_DONE = 2, - MYSQL_STMT_EXECUTE_DONE = 3, - MYSQL_STMT_FETCH_DONE = 4, - }; -# 28 "mysql_time.h" -enum enum_mysql_timestamp_type - { - MYSQL_TIMESTAMP_NONE = -(2), - MYSQL_TIMESTAMP_ERROR = -(1), - MYSQL_TIMESTAMP_DATE = 0, - MYSQL_TIMESTAMP_DATETIME = 1, - MYSQL_TIMESTAMP_TIME = 2, - }; -# 55 "mysql_com.h" -enum enum_server_command - { - COM_SLEEP = 0, - COM_QUIT = 1, - COM_INIT_DB = 2, - COM_QUERY = 3, - COM_FIELD_LIST = 4, - COM_CREATE_DB = 5, - COM_DROP_DB = 6, - COM_REFRESH = 7, - COM_SHUTDOWN = 8, - COM_STATISTICS = 9, - COM_PROCESS_INFO = 10, - COM_CONNECT = 11, - COM_PROCESS_KILL = 12, - COM_DEBUG = 13, - COM_PING = 14, - COM_TIME = 15, - COM_DELAYED_INSERT = 16, - COM_CHANGE_USER = 17, - COM_BINLOG_DUMP = 18, - COM_TABLE_DUMP = 19, - COM_CONNECT_OUT = 20, - COM_REGISTER_SLAVE = 21, - COM_STMT_PREPARE = 22, - COM_STMT_EXECUTE = 23, - COM_STMT_SEND_LONG_DATA = 24, - COM_STMT_CLOSE = 25, - COM_STMT_RESET = 26, - COM_SET_OPTION = 27, - COM_STMT_FETCH = 28, - COM_DAEMON = 29, - COM_END = 30, - }; -# 730 "mysql.h" -enum enum_stmt_attr_type - { - STMT_ATTR_UPDATE_MAX_LENGTH = 0, - STMT_ATTR_CURSOR_TYPE = 1, - STMT_ATTR_PREFETCH_ROWS = 2, - }; -# 296 "mysql_com.h" -enum mysql_enum_shutdown_level - { - SHUTDOWN_DEFAULT = 0, - SHUTDOWN_WAIT_CONNECTIONS = (unsigned char)((1 << 0)), - SHUTDOWN_WAIT_TRANSACTIONS = (unsigned char)((1 << 1)), - SHUTDOWN_WAIT_UPDATES = (unsigned char)((1 << 3)), - SHUTDOWN_WAIT_ALL_BUFFERS = ((unsigned char)((1 << 3)) << 1), - SHUTDOWN_WAIT_CRITICAL_BUFFERS = (((unsigned char)((1 << 3)) << 1) + 1), - KILL_CONNECTION = 255, - }; -# 160 "mysql.h" -enum mysql_option - { - MYSQL_OPT_CONNECT_TIMEOUT = 0, - MYSQL_OPT_COMPRESS = 1, - MYSQL_OPT_NAMED_PIPE = 2, - MYSQL_INIT_COMMAND = 3, - MYSQL_READ_DEFAULT_FILE = 4, - MYSQL_READ_DEFAULT_GROUP = 5, - MYSQL_SET_CHARSET_DIR = 6, - MYSQL_SET_CHARSET_NAME = 7, - MYSQL_OPT_LOCAL_INFILE = 8, - MYSQL_OPT_PROTOCOL = 9, - MYSQL_SHARED_MEMORY_BASE_NAME = 10, - MYSQL_OPT_READ_TIMEOUT = 11, - MYSQL_OPT_WRITE_TIMEOUT = 12, - MYSQL_OPT_USE_RESULT = 13, - MYSQL_OPT_USE_REMOTE_CONNECTION = 14, - MYSQL_OPT_USE_EMBEDDED_CONNECTION = 15, - MYSQL_OPT_GUESS_CONNECTION = 16, - MYSQL_SET_CLIENT_IP = 17, - MYSQL_SECURE_AUTH = 18, - MYSQL_REPORT_DATA_TRUNCATION = 19, - MYSQL_OPT_RECONNECT = 20, - MYSQL_OPT_SSL_VERIFY_SERVER_CERT = 21, - }; -# 228 "mysql.h" -enum mysql_protocol_type - { - MYSQL_PROTOCOL_DEFAULT = 0, - MYSQL_PROTOCOL_TCP = 1, - MYSQL_PROTOCOL_SOCKET = 2, - MYSQL_PROTOCOL_PIPE = 3, - MYSQL_PROTOCOL_MEMORY = 4, - }; -# 238 "mysql.h" -enum mysql_rpl_type - { - MYSQL_RPL_MASTER = 0, - MYSQL_RPL_SLAVE = 1, - MYSQL_RPL_ADMIN = 2, - }; -# 223 "mysql.h" -enum mysql_status - { - MYSQL_STATUS_READY = 0, - MYSQL_STATUS_GET_RESULT = 1, - MYSQL_STATUS_USE_RESULT = 2, - }; -# 441 "mysql_com.h" -extern my_bool check_scramble(char const * reply, char const * message, unsigned char const * hash_stage2); -# 434 "mysql_com.h" -extern my_bool check_scramble_323(char const *, char const * message, unsigned long int * salt); -# 35 "typelib.h" -extern TYPELIB * copy_typelib(MEM_ROOT * root, TYPELIB * from); -# 429 "mysql_com.h" -extern void create_random_string(char * to, unsigned int, struct rand_struct * rand_st); -# 32 "typelib.h" -extern int find_type(char * x, TYPELIB const * typelib, unsigned int); -# 30 "typelib.h" -extern int find_type_or_exit(char const * x, TYPELIB * typelib, char const * option); -# 29 "typelib.h" -extern my_ulonglong find_typeset(char * x, TYPELIB * typelib, int * error_position); -# 443 "mysql_com.h" -extern void get_salt_from_password(unsigned char * res, char const * password); -# 436 "mysql_com.h" -extern void get_salt_from_password_323(unsigned long int * res, char const * password); -# 449 "mysql_com.h" -extern char * get_tty_password(char const * opt_message); -# 34 "typelib.h" -extern char const * get_type(TYPELIB * typelib, unsigned int); -# 431 "mysql_com.h" -extern void hash_password(unsigned long int * to, char const * password, unsigned int); -# 30 "my_list.h" -extern LIST * list_add(LIST * root, LIST * element); -# 32 "my_list.h" -extern LIST * list_cons(void * data, LIST * root); -# 31 "my_list.h" -extern LIST * list_delete(LIST * root, LIST * element); -# 34 "my_list.h" -extern void list_free(LIST * root, unsigned int); -# 35 "my_list.h" -extern unsigned int list_length(LIST *); -# 33 "my_list.h" -extern LIST * list_reverse(LIST * root); -# 36 "my_list.h" -extern int list_walk(LIST *, list_walk_action, unsigned char * argument); -# 444 "mysql_com.h" -extern void make_password_from_salt(char * to, unsigned char const * hash_stage2); -# 437 "mysql_com.h" -extern void make_password_from_salt_323(char * to, unsigned long int const * salt); -# 439 "mysql_com.h" -extern void make_scrambled_password(char * to, char const * password); -# 432 "mysql_com.h" -extern void make_scrambled_password_323(char * to, char const * password); -# 33 "typelib.h" -extern void make_type(char * to, unsigned int, TYPELIB * typelib); -# 366 "mysql_com.h" -extern int my_connect(my_socket, struct sockaddr const * name, unsigned int, unsigned int); -# 343 "mysql_com.h" -extern my_bool my_net_init(NET * net, Vio * vio); -# 344 "mysql_com.h" -extern void my_net_local_init(NET * net); -# 354 "mysql_com.h" -extern unsigned long int my_net_read(NET * net); -# 349 "mysql_com.h" -extern my_bool my_net_write(NET * net, unsigned char const * packet, size_t); -# 428 "mysql_com.h" -extern double my_rnd(struct rand_struct *); -# 455 "mysql_com.h" -extern void my_thread_end(void); -# 454 "mysql_com.h" -extern my_bool my_thread_init(void); -# 560 "mysql.h" -extern void myodbc_remove_escape(MYSQL * mysql, char * name); -# 512 "mysql.h" -extern int mysql_add_slave(MYSQL * mysql, char const * host, unsigned int, char const * user, char const * passwd); -# 421 "mysql.h" -extern my_ulonglong mysql_affected_rows(MYSQL * mysql); -# 826 "mysql.h" -extern my_bool mysql_autocommit(MYSQL * mysql, my_bool); -# 437 "mysql.h" -extern my_bool mysql_change_user(MYSQL * mysql, char const * user, char const * passwd, char const * db); -# 429 "mysql.h" -extern char const * mysql_character_set_name(MYSQL * mysql); -# 829 "mysql.h" -extern void mysql_close(MYSQL * sock); -# 824 "mysql.h" -extern my_bool mysql_commit(MYSQL * mysql); -# 541 "mysql.h" -extern void mysql_data_seek(MYSQL_RES * result, my_ulonglong); -# 559 "mysql.h" -extern void mysql_debug(char const * debug); -# 498 "mysql.h" -extern void mysql_disable_reads_from_master(MYSQL * mysql); -# 492 "mysql.h" -extern void mysql_disable_rpl_parse(MYSQL * mysql); -# 520 "mysql.h" -extern int mysql_dump_debug_info(MYSQL * mysql); -# 562 "mysql.h" -extern my_bool mysql_embedded(void); -# 497 "mysql.h" -extern void mysql_enable_reads_from_master(MYSQL * mysql); -# 491 "mysql.h" -extern void mysql_enable_rpl_parse(MYSQL * mysql); -# 413 "mysql.h" -extern my_bool mysql_eof(MYSQL_RES * res); -# 423 "mysql.h" -extern unsigned int mysql_errno(MYSQL * mysql); -# 450 "mysql_com.h" -extern char const * mysql_errno_to_sqlstate(unsigned int); -# 424 "mysql.h" -extern char const * mysql_error(MYSQL * mysql); -# 552 "mysql.h" -extern unsigned long int mysql_escape_string(char * to, char const * from, unsigned long int); -# 549 "mysql.h" -extern MYSQL_FIELD * mysql_fetch_field(MYSQL_RES * result); -# 414 "mysql.h" -extern MYSQL_FIELD * mysql_fetch_field_direct(MYSQL_RES * res, unsigned int); -# 416 "mysql.h" -extern MYSQL_FIELD * mysql_fetch_fields(MYSQL_RES * res); -# 548 "mysql.h" -extern unsigned long int * mysql_fetch_lengths(MYSQL_RES * result); -# 547 "mysql.h" -extern MYSQL_ROW mysql_fetch_row(MYSQL_RES * result); -# 420 "mysql.h" -extern unsigned int mysql_field_count(MYSQL * mysql); -# 545 "mysql.h" -extern MYSQL_FIELD_OFFSET mysql_field_seek(MYSQL_RES * result, MYSQL_FIELD_OFFSET); -# 418 "mysql.h" -extern MYSQL_FIELD_OFFSET mysql_field_tell(MYSQL_RES * res); -# 540 "mysql.h" -extern void mysql_free_result(MYSQL_RES * result); -# 465 "mysql.h" -extern void mysql_get_character_set_info(MYSQL * mysql, MY_CHARSET_INFO * charset); -# 530 "mysql.h" -extern char const * mysql_get_client_info(void); -# 531 "mysql.h" -extern unsigned long int mysql_get_client_version(void); -# 532 "mysql.h" -extern char const * mysql_get_host_info(MYSQL * mysql); -# 395 "mysql.h" -extern MYSQL_PARAMETERS * mysql_get_parameters(void); -# 534 "mysql.h" -extern unsigned int mysql_get_proto_info(MYSQL * mysql); -# 529 "mysql.h" -extern char const * mysql_get_server_info(MYSQL * mysql); -# 533 "mysql.h" -extern unsigned long int mysql_get_server_version(MYSQL * mysql); -# 436 "mysql.h" -extern char const * mysql_get_ssl_cipher(MYSQL * mysql); -# 554 "mysql.h" -extern unsigned long int mysql_hex_string(char * to, char const * from, unsigned long int); -# 427 "mysql.h" -extern char const * mysql_info(MYSQL * mysql); -# 432 "mysql.h" -extern MYSQL * mysql_init(MYSQL * mysql); -# 422 "mysql.h" -extern my_ulonglong mysql_insert_id(MYSQL * mysql); -# 523 "mysql.h" -extern int mysql_kill(MYSQL * mysql, unsigned long int); -# 535 "mysql.h" -extern MYSQL_RES * mysql_list_dbs(MYSQL * mysql, char const * wild); -# 550 "mysql.h" -extern MYSQL_RES * mysql_list_fields(MYSQL * mysql, char const * table, char const * wild); -# 537 "mysql.h" -extern MYSQL_RES * mysql_list_processes(MYSQL * mysql); -# 536 "mysql.h" -extern MYSQL_RES * mysql_list_tables(MYSQL * mysql, char const * wild); -# 569 "mysql.h" -extern void mysql_manager_close(MYSQL_MANAGER * con); -# 570 "mysql.h" -extern int mysql_manager_command(MYSQL_MANAGER * con, char const * cmd, int); -# 564 "mysql.h" -extern MYSQL_MANAGER * mysql_manager_connect(MYSQL_MANAGER * con, char const * host, char const * user, char const * passwd, unsigned int); -# 572 "mysql.h" -extern int mysql_manager_fetch_line(MYSQL_MANAGER * con, char * res_buf, int); -# 563 "mysql.h" -extern MYSQL_MANAGER * mysql_manager_init(MYSQL_MANAGER * con); -# 456 "mysql.h" -extern my_bool mysql_master_query(MYSQL * mysql, char const * q, unsigned long int); -# 458 "mysql.h" -extern my_bool mysql_master_send_query(MYSQL * mysql, char const * q, unsigned long int); -# 827 "mysql.h" -extern my_bool mysql_more_results(MYSQL * mysql); -# 828 "mysql.h" -extern int mysql_next_result(MYSQL * mysql); -# 412 "mysql.h" -extern unsigned int mysql_num_fields(MYSQL_RES * res); -# 411 "mysql.h" -extern my_ulonglong mysql_num_rows(MYSQL_RES * res); -# 538 "mysql.h" -extern int mysql_options(MYSQL * mysql, enum mysql_option, void const * arg); -# 527 "mysql.h" -extern int mysql_ping(MYSQL * mysql); -# 76 "mysql.h" -extern unsigned int mysql_port; -# 447 "mysql.h" -extern int mysql_query(MYSQL * mysql, char const * q); -# 780 "mysql/plugin.h" -extern void mysql_query_cache_invalidate4(void * thd, char const * key, unsigned int, int); -# 575 "mysql.h" -extern my_bool mysql_read_query_result(MYSQL * mysql); -# 500 "mysql.h" -extern my_bool mysql_reads_from_master_enabled(MYSQL * mysql); -# 439 "mysql.h" -extern MYSQL * mysql_real_connect(MYSQL * mysql, char const * host, char const * user, char const * passwd, char const * db, unsigned int, char const * unix_socket, unsigned long int); -# 556 "mysql.h" -extern unsigned long int mysql_real_escape_string(MYSQL * mysql, char * to, char const * from, unsigned long int); -# 450 "mysql.h" -extern int mysql_real_query(MYSQL * mysql, char const * q, unsigned long int); -# 521 "mysql.h" -extern int mysql_refresh(MYSQL * mysql, unsigned int); -# 825 "mysql.h" -extern my_bool mysql_rollback(MYSQL * mysql); -# 543 "mysql.h" -extern MYSQL_ROW_OFFSET mysql_row_seek(MYSQL_RES * result, MYSQL_ROW_OFFSET); -# 417 "mysql.h" -extern MYSQL_ROW_OFFSET mysql_row_tell(MYSQL_RES * res); -# 494 "mysql.h" -extern int mysql_rpl_parse_enabled(MYSQL * mysql); -# 505 "mysql.h" -extern my_bool mysql_rpl_probe(MYSQL * mysql); -# 502 "mysql.h" -extern enum mysql_rpl_type mysql_rpl_query_type(char const * q, int); -# 446 "mysql.h" -extern int mysql_select_db(MYSQL * mysql, char const * db); -# 448 "mysql.h" -extern int mysql_send_query(MYSQL * mysql, char const * q, unsigned long int); -# 381 "mysql.h" -extern void mysql_server_end(void); -# 380 "mysql.h" -extern int mysql_server_init(int, char * * argv, char * * groups); -# 430 "mysql.h" -extern int mysql_set_character_set(MYSQL * mysql, char const * csname); -# 483 "mysql.h" -extern void mysql_set_local_infile_default(MYSQL * mysql); -# 472 "mysql.h" -extern void mysql_set_local_infile_handler(MYSQL * mysql, int (* local_infile_init)(void * *, char const *, void *), int (* local_infile_read)(void *, char *, unsigned int), void (* local_infile_end)(void), int (* local_infile_error)(void *, char *, unsigned int), void *); -# 508 "mysql.h" -extern int mysql_set_master(MYSQL * mysql, char const * host, unsigned int, char const * user, char const * passwd); -# 524 "mysql.h" -extern int mysql_set_server_option(MYSQL * mysql, enum enum_mysql_set_option); -# 517 "mysql.h" -extern int mysql_shutdown(MYSQL * mysql, enum mysql_enum_shutdown_level); -# 461 "mysql.h" -extern my_bool mysql_slave_query(MYSQL * mysql, char const * q, unsigned long int); -# 463 "mysql.h" -extern my_bool mysql_slave_send_query(MYSQL * mysql, char const * q, unsigned long int); -# 425 "mysql.h" -extern char const * mysql_sqlstate(MYSQL * mysql); -# 433 "mysql.h" -extern my_bool mysql_ssl_set(MYSQL * mysql, char const * key, char const * cert, char const * ca, char const * capath, char const * cipher); -# 528 "mysql.h" -extern char const * mysql_stat(MYSQL * mysql); -# 820 "mysql.h" -extern my_ulonglong mysql_stmt_affected_rows(MYSQL_STMT * stmt); -# 798 "mysql.h" -extern my_bool mysql_stmt_attr_get(MYSQL_STMT * stmt, enum enum_stmt_attr_type, void * attr); -# 795 "mysql.h" -extern my_bool mysql_stmt_attr_set(MYSQL_STMT * stmt, enum enum_stmt_attr_type, void const * attr); -# 801 "mysql.h" -extern my_bool mysql_stmt_bind_param(MYSQL_STMT * stmt, MYSQL_BIND * bnd); -# 802 "mysql.h" -extern my_bool mysql_stmt_bind_result(MYSQL_STMT * stmt, MYSQL_BIND * bnd); -# 803 "mysql.h" -extern my_bool mysql_stmt_close(MYSQL_STMT * stmt); -# 818 "mysql.h" -extern void mysql_stmt_data_seek(MYSQL_STMT * stmt, my_ulonglong); -# 812 "mysql.h" -extern unsigned int mysql_stmt_errno(MYSQL_STMT * stmt); -# 813 "mysql.h" -extern char const * mysql_stmt_error(MYSQL_STMT * stmt); -# 788 "mysql.h" -extern int mysql_stmt_execute(MYSQL_STMT * stmt); -# 789 "mysql.h" -extern int mysql_stmt_fetch(MYSQL_STMT * stmt); -# 790 "mysql.h" -extern int mysql_stmt_fetch_column(MYSQL_STMT * stmt, MYSQL_BIND * bind_arg, unsigned int, unsigned long int); -# 822 "mysql.h" -extern unsigned int mysql_stmt_field_count(MYSQL_STMT * stmt); -# 805 "mysql.h" -extern my_bool mysql_stmt_free_result(MYSQL_STMT * stmt); -# 785 "mysql.h" -extern MYSQL_STMT * mysql_stmt_init(MYSQL * mysql); -# 821 "mysql.h" -extern my_ulonglong mysql_stmt_insert_id(MYSQL_STMT * stmt); -# 819 "mysql.h" -extern my_ulonglong mysql_stmt_num_rows(MYSQL_STMT * stmt); -# 794 "mysql.h" -extern unsigned long int mysql_stmt_param_count(MYSQL_STMT * stmt); -# 811 "mysql.h" -extern MYSQL_RES * mysql_stmt_param_metadata(MYSQL_STMT * stmt); -# 786 "mysql.h" -extern int mysql_stmt_prepare(MYSQL_STMT * stmt, char const * query, unsigned long int); -# 804 "mysql.h" -extern my_bool mysql_stmt_reset(MYSQL_STMT * stmt); -# 810 "mysql.h" -extern MYSQL_RES * mysql_stmt_result_metadata(MYSQL_STMT * stmt); -# 815 "mysql.h" -extern MYSQL_ROW_OFFSET mysql_stmt_row_seek(MYSQL_STMT * stmt, MYSQL_ROW_OFFSET); -# 817 "mysql.h" -extern MYSQL_ROW_OFFSET mysql_stmt_row_tell(MYSQL_STMT * stmt); -# 806 "mysql.h" -extern my_bool mysql_stmt_send_long_data(MYSQL_STMT * stmt, unsigned int, char const * data, unsigned long int); -# 814 "mysql.h" -extern char const * mysql_stmt_sqlstate(MYSQL_STMT * stmt); -# 793 "mysql.h" -extern int mysql_stmt_store_result(MYSQL_STMT * stmt); -# 452 "mysql.h" -extern MYSQL_RES * mysql_store_result(MYSQL * mysql); -# 404 "mysql.h" -extern void mysql_thread_end(void); -# 428 "mysql.h" -extern unsigned long int mysql_thread_id(MYSQL * mysql); -# 403 "mysql.h" -extern my_bool mysql_thread_init(void); -# 561 "mysql.h" -extern unsigned int mysql_thread_safe(void); -# 699 "mysql/plugin.h" -extern int mysql_tmpfile(char const * prefix); -# 77 "mysql.h" -extern char * mysql_unix_port; -# 453 "mysql.h" -extern MYSQL_RES * mysql_use_result(MYSQL * mysql); -# 426 "mysql.h" -extern unsigned int mysql_warning_count(MYSQL * mysql); -# 346 "mysql_com.h" -extern void net_clear(NET * net, my_bool); -# 345 "mysql_com.h" -extern void net_end(NET * net); -# 348 "mysql_com.h" -extern my_bool net_flush(NET * net); -# 353 "mysql_com.h" -extern int net_real_write(NET * net, unsigned char const * packet, size_t); -# 347 "mysql_com.h" -extern my_bool net_realloc(NET * net, size_t); -# 350 "mysql_com.h" -extern my_bool net_write_command(NET * net, unsigned char, unsigned char const * header, size_t, unsigned char const * packet, size_t); -# 445 "mysql_com.h" -extern char * octet2hex(char * to, char const * str, unsigned int); -# 426 "mysql_com.h" -extern void randominit(struct rand_struct *, unsigned long int, unsigned long int); -# 440 "mysql_com.h" -extern void scramble(char * to, char const * message, char const * password); -# 433 "mysql_com.h" -extern void scramble_323(char * to, char const * message, char const * password); -# 37 "typelib.h" -extern TYPELIB sql_protocol_typelib; -# 729 "mysql/plugin.h" -extern void * thd_alloc(void * thd, unsigned int); -# 733 "mysql/plugin.h" -extern void * thd_calloc(void * thd, unsigned int); -# 770 "mysql/plugin.h" -extern void thd_get_xid(void const * thd, MYSQL_XID * xid); -# 680 "mysql/plugin.h" -extern void * * thd_ha_data(void const * thd, struct handlerton const * hton); -# 675 "mysql/plugin.h" -extern int thd_in_lock_tables(void const * thd); -# 685 "mysql/plugin.h" -extern void thd_inc_row_count(void); -# 715 "mysql/plugin.h" -extern int thd_killed(void const * thd); -# 760 "mysql/plugin.h" -extern MYSQL_LEX_STRING * thd_make_lex_string(void * thd, MYSQL_LEX_STRING * lex_str, char const * str, unsigned int, int); -# 745 "mysql/plugin.h" -extern void * thd_memdup(void * thd, void const * str, unsigned int); -# 679 "mysql/plugin.h" -extern char const * thd_proc_info(void * thd, char const * info); -# 682 "mysql/plugin.h" -extern char * thd_security_context(void * thd, char * buffer, unsigned int, unsigned int); -# 678 "mysql/plugin.h" -extern int thd_sql_command(void const * thd); -# 737 "mysql/plugin.h" -extern char * thd_strdup(void * thd, char const * str); -# 741 "mysql/plugin.h" -extern char * thd_strmake(void * thd, char const * str, unsigned int); -# 676 "mysql/plugin.h" -extern int thd_tablespace_op(void const * thd); -# 677 "mysql/plugin.h" -extern long long int thd_test_options(void const * thd, long long int); -# 681 "mysql/plugin.h" -extern int thd_tx_isolation(void const * thd); |