summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/Makefile.am19
-rw-r--r--include/config-netware.h3
-rw-r--r--include/config-win.h4
-rw-r--r--include/heap.h5
-rw-r--r--include/keycache.h6
-rw-r--r--include/m_ctype.h38
-rw-r--r--include/m_string.h12
-rw-r--r--include/my_base.h3
-rw-r--r--include/my_bitmap.h1
-rw-r--r--include/my_getopt.h1
-rw-r--r--include/my_global.h35
-rw-r--r--include/my_md5.h (renamed from include/md5.h)0
-rw-r--r--include/my_pthread.h33
-rw-r--r--include/my_sys.h11
-rw-r--r--include/myisam.h2
-rw-r--r--include/mysql.h59
-rw-r--r--include/mysql/plugin.h149
-rw-r--r--include/mysql_com.h27
-rw-r--r--include/mysql_h.ic739
19 files changed, 778 insertions, 369 deletions
diff --git a/include/Makefile.am b/include/Makefile.am
index 9d9d5545bde..540fb9a54dd 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -15,25 +15,24 @@
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA
-# FIXME 'abi_check' should be in BUILT_SOURCES, disabled for now
BUILT_SOURCES = $(HEADERS_GEN) link_sources
HEADERS_GEN = mysql_version.h my_config.h
HEADERS_ABI = mysql.h mysql_com.h mysql_time.h \
- my_list.h my_alloc.h typelib.h
+ my_list.h my_alloc.h typelib.h mysql/plugin.h
pkginclude_HEADERS = $(HEADERS_ABI) my_dbug.h m_string.h my_sys.h \
my_xml.h mysql_embed.h \
my_pthread.h my_no_pthread.h \
decimal.h errmsg.h my_global.h my_net.h \
my_getopt.h sslopt-longopts.h my_dir.h \
sslopt-vars.h sslopt-case.h sql_common.h keycache.h \
- m_ctype.h mysql/plugin.h my_attribute.h $(HEADERS_GEN)
+ m_ctype.h my_attribute.h $(HEADERS_GEN)
noinst_HEADERS = config-win.h config-netware.h lf.h my_bit.h \
heap.h maria.h myisamchk.h my_bitmap.h my_uctype.h \
myisam.h myisampack.h myisammrg.h ft_global.h\
mysys_err.h my_base.h help_start.h help_end.h \
my_nosys.h my_alarm.h queues.h rijndael.h sha1.h \
my_aes.h my_tree.h my_trie.h hash.h thr_alarm.h \
- thr_lock.h t_ctype.h violite.h md5.h base64.h \
+ thr_lock.h t_ctype.h violite.h my_md5.h base64.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/x86-msvc.h \
@@ -53,8 +52,11 @@ link_sources:
@yassl_h_ln_cmd@
echo timestamp > link_sources
-my_config.h: ../config.h
- $(CP) ../config.h my_config.h
+# We want both "my_config.h" and "config.h" that are identical, as
+# MySQL sources assumes the name "my_config.h", and 3rd party sources
+# assumes the name "config.h".
+my_config.h: config.h
+ $(CP) config.h my_config.h
# These files should not be included in distributions since they are
# generated by configure from the .h.in files
@@ -69,9 +71,8 @@ dist-hook:
abi_check: $(HEADERS_ABI) mysql_version.h mysql_h.ic
@set -ex; \
if [ @ICHECK@ != no ] ; then \
- @ICHECK@ --canonify --skip-from-re /usr/ -o $@.ic mysql.h; \
- @ICHECK@ --compare mysql_h.ic $@.ic; \
- $(RM) -f $@.ic; \
+ @ICHECK@ --canonify --skip-from-re /usr/ -o $@ $(HEADERS_ABI); \
+ @ICHECK@ --compare mysql_h.ic $@; \
fi; \
touch abi_check;
diff --git a/include/config-netware.h b/include/config-netware.h
index f7f494b519c..e6bddee034e 100644
--- a/include/config-netware.h
+++ b/include/config-netware.h
@@ -112,6 +112,9 @@ extern "C" {
/* signal by closing the sockets */
#define SIGNAL_WITH_VIO_CLOSE 1
+/* On NetWare, stack grows towards lower address */
+#define STACK_DIRECTION -1
+
/* On NetWare, we need to set stack size for threads, otherwise default 16K is used */
#define NW_THD_STACKSIZE 65536
diff --git a/include/config-win.h b/include/config-win.h
index fa5c15b0668..2e64e165630 100644
--- a/include/config-win.h
+++ b/include/config-win.h
@@ -15,6 +15,8 @@
/* Defines for Win32 to make it compatible for MySQL */
+#define BIG_TABLES
+
#ifdef __WIN2000__
/* We have to do this define before including windows.h to get the AWE API
functions */
@@ -250,6 +252,8 @@ inline double ulonglong2double(ulonglong value)
#endif
+#define STACK_DIRECTION -1
+
/* Optimized store functions for Intel x86 */
#ifndef _WIN64
diff --git a/include/heap.h b/include/heap.h
index d309fb4f162..4a1c7d419ed 100644
--- a/include/heap.h
+++ b/include/heap.h
@@ -189,11 +189,14 @@ typedef struct st_heap_create_info
ulonglong max_table_size;
ulonglong auto_increment;
my_bool with_auto_increment;
+ my_bool internal_table;
} HP_CREATE_INFO;
/* Prototypes for heap-functions */
extern HP_INFO *heap_open(const char *name, int mode);
+extern HP_INFO *heap_open_from_share(HP_SHARE *share, int mode);
+extern HP_INFO *heap_open_from_share_and_register(HP_SHARE *share, int mode);
extern int heap_close(HP_INFO *info);
extern int heap_write(HP_INFO *info,const uchar *buff);
extern int heap_update(HP_INFO *info,const uchar *old,const uchar *newdata);
@@ -204,7 +207,7 @@ extern int heap_delete(HP_INFO *info,const uchar *buff);
extern int heap_info(HP_INFO *info,HEAPINFO *x,int flag);
extern int heap_create(const char *name, uint keys, HP_KEYDEF *keydef,
uint reclength, ulong max_records, ulong min_records,
- HP_CREATE_INFO *create_info);
+ HP_CREATE_INFO *create_info, HP_SHARE **share);
extern int heap_delete_table(const char *name);
extern void heap_drop_table(HP_INFO *info);
extern int heap_extra(HP_INFO *info,enum ha_extra_function function);
diff --git a/include/keycache.h b/include/keycache.h
index 14f11475641..8c4ee4afe81 100644
--- a/include/keycache.h
+++ b/include/keycache.h
@@ -47,7 +47,7 @@ typedef struct st_key_cache
my_bool in_resize; /* true during resize operation */
my_bool resize_in_flush; /* true during flush of resize operation */
my_bool can_be_used; /* usage of cache for read/write is allowed */
- ulong key_cache_mem_size; /* specified size of the cache memory */
+ size_t key_cache_mem_size; /* specified size of the cache memory */
uint key_cache_block_size; /* size of the page buffer of a cache block */
ulong min_warm_blocks; /* min number of warm blocks; */
ulong age_threshold; /* age threshold for hot blocks */
@@ -107,10 +107,10 @@ typedef struct st_key_cache
extern KEY_CACHE dflt_key_cache_var, *dflt_key_cache;
extern int init_key_cache(KEY_CACHE *keycache, uint key_cache_block_size,
- ulong use_mem, uint division_limit,
+ size_t use_mem, uint division_limit,
uint age_threshold);
extern int resize_key_cache(KEY_CACHE *keycache, uint key_cache_block_size,
- ulong use_mem, uint division_limit,
+ size_t use_mem, uint division_limit,
uint age_threshold);
extern void change_key_cache_param(KEY_CACHE *keycache, uint division_limit,
uint age_threshold);
diff --git a/include/m_ctype.h b/include/m_ctype.h
index cc6a3a4fb4e..9025507ce15 100644
--- a/include/m_ctype.h
+++ b/include/m_ctype.h
@@ -84,10 +84,16 @@ extern MY_UNI_CTYPE my_uni_ctype[256];
#define MY_CS_UNICODE 128 /* is a charset is full unicode */
#define MY_CS_READY 256 /* if a charset is initialized */
#define MY_CS_AVAILABLE 512 /* If either compiled-in or loaded*/
-#define MY_CS_CSSORT 1024 /* if case sensitive sort order */
+#define MY_CS_CSSORT 1024 /* if case sensitive sort order */
#define MY_CS_HIDDEN 2048 /* don't display in SHOW */
+#define MY_CS_PUREASCII 4096 /* if a charset is pure ascii */
#define MY_CHARSET_UNDEFINED 0
+/* Character repertoire flags */
+#define MY_REPERTOIRE_ASCII 1 /* Pure ASCII U+0000..U+007F */
+#define MY_REPERTOIRE_EXTENDED 2 /* Extended characters: U+0080..U+FFFF */
+#define MY_REPERTOIRE_UNICODE30 3 /* ASCII | EXTENDED: U+0000..U+FFFF */
+
typedef struct my_uni_idx_st
{
@@ -164,6 +170,14 @@ extern MY_COLLATION_HANDLER my_collation_8bit_bin_handler;
extern MY_COLLATION_HANDLER my_collation_8bit_simple_ci_handler;
extern MY_COLLATION_HANDLER my_collation_ucs2_uca_handler;
+/* Some typedef to make it easy for C++ to make function pointers */
+typedef int (*my_charset_conv_mb_wc)(struct charset_info_st *, my_wc_t *,
+ const uchar *, const uchar *);
+typedef int (*my_charset_conv_wc_mb)(struct charset_info_st *, my_wc_t,
+ uchar *, uchar *);
+typedef size_t (*my_charset_conv_case)(struct charset_info_st *,
+ char *, size_t, char *, size_t);
+
/* See strings/CHARSET_INFO.txt about information on this structure */
typedef struct my_charset_handler_st
@@ -182,11 +196,9 @@ typedef struct my_charset_handler_st
size_t (*numcells)(struct charset_info_st *, const char *b, const char *e);
/* Unicode conversion */
- int (*mb_wc)(struct charset_info_st *cs,my_wc_t *wc,
- const uchar *s,const uchar *e);
- int (*wc_mb)(struct charset_info_st *cs,my_wc_t wc,
- uchar *s,uchar *e);
-
+ my_charset_conv_mb_wc mb_wc;
+ my_charset_conv_wc_mb wc_mb;
+
/* CTYPE scanner */
int (*ctype)(struct charset_info_st *cs, int *ctype,
const uchar *s, const uchar *e);
@@ -194,11 +206,10 @@ typedef struct my_charset_handler_st
/* Functions for case and sort conversion */
size_t (*caseup_str)(struct charset_info_st *, char *);
size_t (*casedn_str)(struct charset_info_st *, char *);
- size_t (*caseup)(struct charset_info_st *, char *src, size_t srclen,
- char *dst, size_t dstlen);
- size_t (*casedn)(struct charset_info_st *, char *src, size_t srclen,
- char *dst, size_t dstlen);
-
+
+ my_charset_conv_case caseup;
+ my_charset_conv_case casedn;
+
/* Charset dependant snprintf() */
size_t (*snprintf)(struct charset_info_st *, char *to, size_t n,
const char *fmt,
@@ -457,6 +468,11 @@ my_bool my_propagate_simple(CHARSET_INFO *cs, const uchar *str, size_t len);
my_bool my_propagate_complex(CHARSET_INFO *cs, const uchar *str, size_t len);
+uint my_string_repertoire(CHARSET_INFO *cs, const char *str, ulong len);
+my_bool my_charset_is_ascii_based(CHARSET_INFO *cs);
+my_bool my_charset_is_8bit_pure_ascii(CHARSET_INFO *cs);
+
+
#define _MY_U 01 /* Upper case */
#define _MY_L 02 /* Lower case */
#define _MY_NMR 04 /* Numeral (digit) */
diff --git a/include/m_string.h b/include/m_string.h
index 814d88b6ead..036eb8fe4d6 100644
--- a/include/m_string.h
+++ b/include/m_string.h
@@ -249,17 +249,17 @@ extern size_t my_snprintf(char *to, size_t n, const char *fmt, ...)
/*
LEX_STRING -- a pair of a C-string and its length.
-
- NOTE: this exactly form of declaration is required for some C-compilers
- (for one, Sun C 5.7 2005/01/07). Unfortunately with such declaration
- LEX_STRING can not be forward declared.
*/
-typedef struct
+#ifndef _my_plugin_h
+/* This definition must match the one given in mysql/plugin.h */
+struct st_mysql_lex_string
{
char *str;
size_t length;
-} LEX_STRING;
+};
+#endif
+typedef struct st_mysql_lex_string LEX_STRING;
#define STRING_WITH_LEN(X) (X), ((size_t) (sizeof(X) - 1))
#define USTRING_WITH_LEN(X) ((uchar*) X), ((size_t) (sizeof(X) - 1))
diff --git a/include/my_base.h b/include/my_base.h
index 2ab1123ce76..8ec94e18f32 100644
--- a/include/my_base.h
+++ b/include/my_base.h
@@ -48,6 +48,8 @@
#define HA_OPEN_FROM_SQL_LAYER 64
#define HA_OPEN_MMAP 128 /* open memory mapped */
#define HA_OPEN_COPY 256 /* Open copy (for repair) */
+/* Internal temp table, used for temporary results */
+#define HA_OPEN_INTERNAL_TABLE 512
/* The following is parameter to ha_rkey() how to use key */
@@ -302,6 +304,7 @@ enum ha_base_keytype {
#define HA_PACK_RECORD 2 /* Request packed record format */
#define HA_CREATE_TMP_TABLE 4
#define HA_CREATE_CHECKSUM 8
+#define HA_CREATE_KEEP_FILES 16 /* don't overwrite .MYD and MYI */
#define HA_CREATE_DELAY_KEY_WRITE 64
#define HA_CREATE_RELIES_ON_SQL_LAYER 128
diff --git a/include/my_bitmap.h b/include/my_bitmap.h
index 0b12172946a..ab69b2d671d 100644
--- a/include/my_bitmap.h
+++ b/include/my_bitmap.h
@@ -41,6 +41,7 @@ typedef struct st_bitmap
#ifdef __cplusplus
extern "C" {
#endif
+extern void create_last_word_mask(MY_BITMAP *map);
extern my_bool bitmap_init(MY_BITMAP *map, my_bitmap_map *buf, uint n_bits,
my_bool thread_safe);
extern my_bool bitmap_is_clear_all(const MY_BITMAP *map);
diff --git a/include/my_getopt.h b/include/my_getopt.h
index 115abf00618..c74f3ed672e 100644
--- a/include/my_getopt.h
+++ b/include/my_getopt.h
@@ -31,6 +31,7 @@ C_MODE_START
#define GET_DISABLED 11
#define GET_ENUM 12
#define GET_SET 13
+#define GET_DOUBLE 14
#define GET_ASK_ADDR 128
#define GET_TYPE_MASK 127
diff --git a/include/my_global.h b/include/my_global.h
index ce74490ed38..c3f1db1b420 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -23,6 +23,17 @@
#define HAVE_EXTERNAL_CLIENT
#endif
+/*
+ InnoDB depends on some MySQL internals which other plugins should not
+ need. This is because of InnoDB's foreign key support, "safe" binlog
+ truncation, and other similar legacy features.
+
+ We define accessors for these internals unconditionally, but do not
+ expose them in mysql/plugin.h. They are declared in ha_innodb.h for
+ InnoDB's use.
+*/
+#define INNODB_COMPATIBILITY_HOOKS
+
#ifdef __CYGWIN__
/* We use a Unix API, so pretend it's not Windows */
#undef WIN
@@ -560,12 +571,6 @@ int __void__;
#define PURIFY_OR_LINT_INIT(var)
#endif
-/* Define some useful general macros */
-#if !defined(max)
-#define max(a, b) ((a) > (b) ? (a) : (b))
-#define min(a, b) ((a) < (b) ? (a) : (b))
-#endif
-
#if !defined(HAVE_UINT)
#undef HAVE_UINT
#define HAVE_UINT
@@ -802,6 +807,10 @@ typedef SOCKET_SIZE_TYPE size_socket;
#define ulong_to_double(X) ((double) (ulong) (X))
#define SET_STACK_SIZE(X) /* Not needed on real machines */
+#ifndef STACK_DIRECTION
+#error "please add -DSTACK_DIRECTION=1 or -1 to your CPPFLAGS"
+#endif
+
#if !defined(HAVE_STRTOK_R)
#define strtok_r(A,B,C) strtok((A),(B))
#endif
@@ -977,7 +986,12 @@ typedef unsigned long uint32;
typedef unsigned long ulong; /* Short for unsigned long */
#endif
#ifndef longlong_defined
-#if defined(HAVE_LONG_LONG) && SIZEOF_LONG != 8
+/*
+ Using [unsigned] long long is preferable as [u]longlong because we use
+ [unsigned] long long unconditionally in many places,
+ for example in constants with [U]LL suffix.
+*/
+#if defined(HAVE_LONG_LONG) && SIZEOF_LONG_LONG == 8
typedef unsigned long long int ulonglong; /* ulong or unsigned long long */
typedef long long int longlong;
#else
@@ -1499,7 +1513,12 @@ inline void operator delete[](void*, void*) { /* Do nothing */ }
/* Length of decimal number represented by INT64. */
#define MY_INT64_NUM_DECIMAL_DIGITS 21
-
+
+/* Define some useful general macros (should be done after all headers). */
+#if !defined(max)
+#define max(a, b) ((a) > (b) ? (a) : (b))
+#define min(a, b) ((a) < (b) ? (a) : (b))
+#endif
/*
Only Linux is known to need an explicit sync of the directory to make sure a
file creation/deletion/renaming in(from,to) this directory durable.
diff --git a/include/md5.h b/include/my_md5.h
index f92976b3beb..f92976b3beb 100644
--- a/include/md5.h
+++ b/include/my_md5.h
diff --git a/include/my_pthread.h b/include/my_pthread.h
index 27b621de925..eb390c2acc4 100644
--- a/include/my_pthread.h
+++ b/include/my_pthread.h
@@ -29,25 +29,6 @@ extern "C" {
#define EXTERNC
#endif /* __cplusplus */
-/*
- BUG#24507: Race conditions inside current NPTL pthread_exit() implementation.
-
- If macro NPTL_PTHREAD_EXIT_HACK is defined then a hack described in the bug
- report will be implemented inside my_thread_global_init() in my_thr_init.c.
-
- This amounts to spawning a dummy thread which does nothing but executes
- pthread_exit(0).
-
- This bug is fixed in version 2.5 of glibc library.
-
- TODO: Remove this code when fixed versions of glibc6 are in common use.
- */
-
-#if defined(TARGET_OS_LINUX) && defined(HAVE_NPTL) && \
- defined(__GLIBC__) && ( __GLIBC__ < 2 || __GLIBC__ == 2 && __GLIBC_MINOR__ < 5 )
-#define NPTL_PTHREAD_EXIT_BUG 1
-#endif
-
#if defined(__WIN__)
typedef CRITICAL_SECTION pthread_mutex_t;
typedef HANDLE pthread_t;
@@ -179,7 +160,7 @@ void pthread_exit(void *a); /* was #define pthread_exit(A) ExitThread(A)*/
#define pthread_mutex_unlock(A) LeaveCriticalSection(A)
#define pthread_mutex_destroy(A) DeleteCriticalSection(A)
#define my_pthread_setprio(A,B) SetThreadPriority(GetCurrentThread(), (B))
-#define pthread_kill(A,B) pthread_dummy(0)
+#define pthread_kill(A,B) pthread_dummy(ESRCH)
#define pthread_join(A,B) (WaitForSingleObject((A), INFINITE) != WAIT_OBJECT_0)
@@ -361,14 +342,14 @@ struct tm *gmtime_r(const time_t *clock, struct tm *res);
#define pthread_attr_setdetachstate(A,B) pthread_dummy(0)
#define pthread_create(A,B,C,D) pthread_create((A),*(B),(C),(D))
#define pthread_sigmask(A,B,C) sigprocmask((A),(B),(C))
-#define pthread_kill(A,B) pthread_dummy(0)
+#define pthread_kill(A,B) pthread_dummy(ESRCH)
#undef pthread_detach_this_thread
#define pthread_detach_this_thread() { pthread_t tmp=pthread_self() ; pthread_detach(&tmp); }
#endif
#ifdef HAVE_DARWIN5_THREADS
#define pthread_sigmask(A,B,C) sigprocmask((A),(B),(C))
-#define pthread_kill(A,B) pthread_dummy(0)
+#define pthread_kill(A,B) pthread_dummy(ESRCH)
#define pthread_condattr_init(A) pthread_dummy(0)
#define pthread_condattr_destroy(A) pthread_dummy(0)
#undef pthread_detach_this_thread
@@ -388,7 +369,7 @@ struct tm *gmtime_r(const time_t *clock, struct tm *res);
#ifndef pthread_sigmask
#define pthread_sigmask(A,B,C) sigprocmask((A),(B),(C))
#endif
-#define pthread_kill(A,B) pthread_dummy(0)
+#define pthread_kill(A,B) pthread_dummy(ESRCH)
#undef pthread_detach_this_thread
#define pthread_detach_this_thread() { pthread_t tmp=pthread_self() ; pthread_detach(&tmp); }
#elif !defined(__NETWARE__) /* HAVE_PTHREAD_ATTR_CREATE && !HAVE_SIGWAIT */
@@ -538,6 +519,7 @@ typedef struct st_my_pthread_fastmutex_t
pthread_mutex_t mutex;
uint spins;
} my_pthread_fastmutex_t;
+void fastmutex_global_init(void);
int my_pthread_fastmutex_init(my_pthread_fastmutex_t *mp,
const pthread_mutexattr_t *attr);
@@ -646,6 +628,11 @@ extern pthread_mutexattr_t my_errorcheck_mutexattr;
#define MY_MUTEX_INIT_ERRCHK NULL
#endif
+#ifndef ESRCH
+/* Define it to something */
+#define ESRCH 1
+#endif
+
typedef ulong my_thread_id;
extern my_bool my_thread_global_init(void);
diff --git a/include/my_sys.h b/include/my_sys.h
index ca44f9ed39b..c24b4cdf0e5 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -151,7 +151,7 @@ extern ulonglong sf_malloc_mem_limit;
#else
#define my_checkmalloc()
#undef TERMINATE
-#define TERMINATE(A) {}
+#define TERMINATE(A,B) {}
#define QUICK_SAFEMALLOC
#define NORMAL_SAFEMALLOC
extern void *my_malloc(size_t Size,myf MyFlags);
@@ -227,6 +227,7 @@ extern CHARSET_INFO compiled_charsets[];
/* statistics */
extern ulong my_file_opened,my_stream_opened, my_tmp_file_created;
+extern ulong my_file_total_opened;
extern uint mysys_usage_id;
extern my_bool my_init_done;
@@ -625,7 +626,7 @@ extern int nt_share_delete(const char *name,myf MyFlags);
#endif
#ifndef TERMINATE
-extern void TERMINATE(FILE *file);
+extern void TERMINATE(FILE *file, uint flag);
#endif
extern void init_glob_errs(void);
extern FILE *my_fopen(const char *FileName,int Flags,myf MyFlags);
@@ -843,7 +844,7 @@ extern my_bool my_compress(uchar *, size_t *, size_t *);
extern my_bool my_uncompress(uchar *, size_t , size_t *);
extern uchar *my_compress_alloc(const uchar *packet, size_t *len,
size_t *complen);
-extern int packfrm(const uchar *, size_t, uchar **, size_t *);
+extern int packfrm(uchar *, size_t, uchar **, size_t *);
extern int unpackfrm(uchar **, size_t *, const uchar *);
extern ha_checksum my_checksum(ha_checksum crc, const uchar *mem,
@@ -853,7 +854,11 @@ extern ulong crc32(ulong crc, const uchar *buf, uint len);
extern uint my_set_max_open_files(uint files);
void my_free_open_file_info(void);
+extern time_t my_time(myf flags);
extern ulonglong my_getsystime(void);
+extern ulonglong my_micro_time();
+extern ulonglong my_micro_time_and_time(time_t *time_arg);
+time_t my_time_possible_from_micro(ulonglong microtime);
extern my_bool my_gethwaddr(uchar *to);
extern int my_getncpus();
diff --git a/include/myisam.h b/include/myisam.h
index 75c56e100c9..ee0bf43782b 100644
--- a/include/myisam.h
+++ b/include/myisam.h
@@ -316,7 +316,7 @@ typedef struct st_sort_info
#endif
MI_INFO *info;
HA_CHECK *param;
- char *buff;
+ uchar *buff;
SORT_KEY_BLOCKS *key_block, *key_block_end;
SORT_FT_BUF *ft_buf;
my_off_t filelength, dupp, buff_length;
diff --git a/include/mysql.h b/include/mysql.h
index 489813bc154..68cce3196a0 100644
--- a/include/mysql.h
+++ b/include/mysql.h
@@ -27,6 +27,10 @@
#ifndef _mysql_h
#define _mysql_h
+#ifdef _AIX /* large-file support will break without this */
+#include <standards.h>
+#endif
+
#ifdef __CYGWIN__ /* CYGWIN implements a UNIX API */
#undef WIN
#undef _WIN
@@ -109,6 +113,7 @@ typedef struct st_mysql_field {
unsigned int decimals; /* Number of decimals in field */
unsigned int charsetnr; /* Character set */
enum enum_field_types type; /* Type of field. See mysql_com.h for types */
+ void *extension;
} MYSQL_FIELD;
typedef char **MYSQL_ROW; /* return data as array of strings */
@@ -143,12 +148,13 @@ typedef MYSQL_ROWS *MYSQL_ROW_OFFSET; /* offset to current row */
typedef struct embedded_query_result EMBEDDED_QUERY_RESULT;
typedef struct st_mysql_data {
- my_ulonglong rows;
- unsigned int fields;
MYSQL_ROWS *data;
+ struct embedded_query_result *embedded_info;
MEM_ROOT alloc;
+ my_ulonglong rows;
+ unsigned int fields;
/* extra info for embedded library */
- struct embedded_query_result *embedded_info;
+ void *extension;
} MYSQL_DATA;
enum mysql_option
@@ -211,6 +217,7 @@ struct st_mysql_options {
void (*local_infile_end)(void *);
int (*local_infile_error)(void *, char *, unsigned int);
void *local_infile_userdata;
+ void *extension;
};
enum mysql_status
@@ -300,27 +307,28 @@ typedef struct st_mysql
from mysql_stmt_close if close had to cancel result set of this object.
*/
my_bool *unbuffered_fetch_owner;
-#if defined(EMBEDDED_LIBRARY) || defined(EMBEDDED_LIBRARY_COMPATIBLE) || MYSQL_VERSION_ID >= 50100
/* needed for embedded server - no net buffer to store the 'info' */
char *info_buffer;
-#endif
+ void *extension;
} MYSQL;
+
typedef struct st_mysql_res {
- my_ulonglong row_count;
+ my_ulonglong row_count;
MYSQL_FIELD *fields;
MYSQL_DATA *data;
MYSQL_ROWS *data_cursor;
unsigned long *lengths; /* column lengths of current row */
MYSQL *handle; /* for unbuffered reads */
- MEM_ROOT field_alloc;
- unsigned int field_count, current_field;
+ const struct st_mysql_methods *methods;
MYSQL_ROW row; /* If unbuffered read */
MYSQL_ROW current_row; /* buffer to current row */
+ MEM_ROOT field_alloc;
+ unsigned int field_count, current_field;
my_bool eof; /* Used by mysql_fetch_row */
/* mysql_stmt_close() had to cancel this result */
my_bool unbuffered_fetch_cancelled;
- const struct st_mysql_methods *methods;
+ void *extension;
} MYSQL_RES;
#define MAX_MYSQL_MANAGER_ERR 256
@@ -340,21 +348,23 @@ typedef struct st_mysql_res {
typedef struct st_mysql_manager
{
NET net;
- char *host,*user,*passwd;
+ char *host, *user, *passwd;
+ char *net_buf, *net_buf_pos, *net_data_end;
unsigned int port;
- my_bool free_me;
- my_bool eof;
int cmd_status;
int last_errno;
- char* net_buf,*net_buf_pos,*net_data_end;
int net_buf_size;
+ my_bool free_me;
+ my_bool eof;
char last_error[MAX_MYSQL_MANAGER_ERR];
+ 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;
#if !defined(MYSQL_SERVER) && !defined(EMBEDDED_LIBRARY)
@@ -369,6 +379,7 @@ typedef struct st_mysql_parameters
*/
int STDCALL mysql_server_init(int argc, char **argv, char **groups);
void STDCALL mysql_server_end(void);
+
/*
mysql_server_init/end need to be called when using libmysqld or
libmysqlclient (exactly, mysql_server_init() is called by mysql_init() so
@@ -657,23 +668,24 @@ typedef struct st_mysql_bind
void *buffer; /* buffer to get/put data */
/* set this if you want to track data truncations happened during fetch */
my_bool *error;
- enum enum_field_types buffer_type; /* buffer type */
+ unsigned char *row_ptr; /* for the current data position */
+ 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);
/* output buffer length, must be set when fetching str/binary */
unsigned long buffer_length;
- unsigned char *row_ptr; /* for the current data position */
unsigned long offset; /* offset position for char/binary fetch */
unsigned long length_value; /* Used if length is 0 */
unsigned int param_number; /* For null count and error messages */
unsigned int pack_length; /* Internal length for packed data */
+ enum enum_field_types buffer_type; /* buffer type */
my_bool error_value; /* used if error is 0 */
my_bool is_unsigned; /* set if integer type is unsigned */
my_bool long_data_used; /* If used with mysql_send_long_data */
my_bool is_null_value; /* Used if is_null is 0 */
- 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);
+ void *extension;
} MYSQL_BIND;
@@ -688,15 +700,15 @@ typedef struct st_mysql_stmt
MYSQL_FIELD *fields; /* result set metadata */
MYSQL_DATA result; /* cached result set */
MYSQL_ROWS *data_cursor; /* current row in cached result */
- /* copy of mysql->affected_rows after statement execution */
- my_ulonglong affected_rows;
- my_ulonglong insert_id; /* copy of mysql->insert_id */
/*
mysql_stmt_fetch() calls this function to fetch one row (it's different
for buffered, unbuffered and cursor fetch).
*/
int (*read_row_func)(struct st_mysql_stmt *stmt,
unsigned char **row);
+ /* copy of mysql->affected_rows after statement execution */
+ my_ulonglong affected_rows;
+ my_ulonglong insert_id; /* copy of mysql->insert_id */
unsigned long stmt_id; /* Id for prepared statement */
unsigned long flags; /* i.e. type of cursor to open */
unsigned long prefetch_rows; /* number of rows per one COM_FETCH */
@@ -722,6 +734,7 @@ typedef struct st_mysql_stmt
metadata fields when doing mysql_stmt_store_result.
*/
my_bool update_max_length;
+ void *extension;
} MYSQL_STMT;
enum enum_stmt_attr_type
diff --git a/include/mysql/plugin.h b/include/mysql/plugin.h
index 7b224695324..50ec051d111 100644
--- a/include/mysql/plugin.h
+++ b/include/mysql/plugin.h
@@ -24,6 +24,32 @@ class Item;
#define MYSQL_THD void*
#endif
+#ifndef _m_string_h
+/* This definition must match the one given in m_string.h */
+struct st_mysql_lex_string
+{
+ char *str;
+ unsigned int length;
+};
+#endif /* _m_string_h */
+typedef struct st_mysql_lex_string MYSQL_LEX_STRING;
+
+#define MYSQL_XIDDATASIZE 128
+/**
+ struct st_mysql_xid is binary compatible with the XID structure as
+ in the X/Open CAE Specification, Distributed Transaction Processing:
+ The XA Specification, X/Open Company Ltd., 1991.
+ http://www.opengroup.org/bookstore/catalog/c193.htm
+
+ @see XID in sql/handler.h
+*/
+struct st_mysql_xid {
+ long formatID;
+ long gtrid_length;
+ long bqual_length;
+ char data[MYSQL_XIDDATASIZE]; /* Not \0-terminated */
+};
+typedef struct st_mysql_xid MYSQL_XID;
/*************************************************************************
Plugin API. Common for all plugin types.
@@ -84,7 +110,7 @@ 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_ARRAY, SHOW_FUNC, SHOW_DOUBLE
};
struct st_mysql_show_var {
@@ -655,11 +681,132 @@ void **thd_ha_data(const MYSQL_THD thd, const struct handlerton *hton);
int thd_tx_isolation(const MYSQL_THD thd);
char *thd_security_context(MYSQL_THD thd, char *buffer, unsigned int length,
unsigned int max_query_len);
+/* Increments the row counter, see THD::row_count */
+void thd_inc_row_count(MYSQL_THD thd);
+
+/**
+ Create a temporary file.
+
+ @details
+ The temporary file is created in a location specified by the mysql
+ server configuration (--tmpdir option). The caller does not need to
+ delete the file, it will be deleted automatically.
+
+ @param prefix prefix for temporary file name
+ @retval -1 error
+ @retval >= 0 a file handle that can be passed to dup or my_close
+*/
+int mysql_tmpfile(const char *prefix);
+
+/**
+ Check the killed state of a connection
+ @details
+ In MySQL support for the KILL statement is cooperative. The KILL
+ statement only sets a "killed" flag. This function returns the value
+ of that flag. A thread should check it often, especially inside
+ time-consuming loops, and gracefully abort the operation if it is
+ non-zero.
+
+ @param thd user thread connection handle
+ @retval 0 the connection is active
+ @retval 1 the connection has been killed
+*/
+int thd_killed(const MYSQL_THD thd);
+
+/**
+ Allocate memory in the connection's local memory pool
+
+ @details
+ When properly used in place of @c my_malloc(), this can significantly
+ improve concurrency. Don't use this or related functions to allocate
+ large chunks of memory. Use for temporary storage only. The memory
+ will be freed automatically at the end of the statement; no explicit
+ code is required to prevent memory leaks.
+
+ @see alloc_root()
+*/
+void *thd_alloc(MYSQL_THD thd, unsigned int size);
+/**
+ @see thd_alloc()
+*/
+void *thd_calloc(MYSQL_THD thd, unsigned int size);
+/**
+ @see thd_alloc()
+*/
+char *thd_strdup(MYSQL_THD thd, const char *str);
+/**
+ @see thd_alloc()
+*/
+char *thd_strmake(MYSQL_THD thd, const char *str, unsigned int size);
+/**
+ @see thd_alloc()
+*/
+void *thd_memdup(MYSQL_THD thd, const void* str, unsigned int size);
+
+/**
+ Create a LEX_STRING in this connection's local memory pool
+
+ @param thd user thread connection handle
+ @param lex_str pointer to LEX_STRING object to be initialized
+ @param str initializer to be copied into lex_str
+ @param size length of str, in bytes
+ @param allocate_lex_string flag: if TRUE, allocate new LEX_STRING object,
+ instead of using lex_str value
+ @return NULL on failure, or pointer to the LEX_STRING object
+
+ @see thd_alloc()
+*/
+MYSQL_LEX_STRING *thd_make_lex_string(MYSQL_THD thd, MYSQL_LEX_STRING *lex_str,
+ const char *str, unsigned int size,
+ int allocate_lex_string);
+
+/**
+ Get the XID for this connection's transaction
+
+ @param thd user thread connection handle
+ @param xid location where identifier is stored
+*/
+void thd_get_xid(const MYSQL_THD thd, MYSQL_XID *xid);
+
+/**
+ Invalidate the query cache for a given table.
+
+ @param thd user thread connection handle
+ @param key databasename\\0tablename\\0
+ @param key_length length of key in bytes, including the NUL bytes
+ @param using_trx flag: TRUE if using transactions, FALSE otherwise
+*/
+void mysql_query_cache_invalidate4(MYSQL_THD thd,
+ const char *key, unsigned int key_length,
+ int using_trx);
#ifdef __cplusplus
}
#endif
+#ifdef __cplusplus
+/**
+ Provide a handler data getter to simplify coding
+*/
+inline
+void *
+thd_get_ha_data(const MYSQL_THD thd, const struct handlerton *hton)
+{
+ return *thd_ha_data(thd, hton);
+}
+
+/**
+ Provide a handler data setter to simplify coding
+*/
+inline
+void
+thd_set_ha_data(const MYSQL_THD thd, const struct handlerton *hton,
+ const void *ha_data)
+{
+ *thd_ha_data(thd, hton)= (void*) ha_data;
+}
+#endif
+
#endif
diff --git a/include/mysql_com.h b/include/mysql_com.h
index ae57e84a696..5850d48fbf5 100644
--- a/include/mysql_com.h
+++ b/include/mysql_com.h
@@ -186,25 +186,25 @@ typedef struct st_vio Vio;
typedef struct st_net {
#if !defined(CHECK_EMBEDDED_DIFFERENCES) || !defined(EMBEDDED_LIBRARY)
- Vio* vio;
+ Vio *vio;
unsigned char *buff,*buff_end,*write_pos,*read_pos;
my_socket fd; /* For Perl DBI/dbd */
- unsigned long max_packet,max_packet_size;
- unsigned int pkt_nr,compress_pkt_nr;
- unsigned int write_timeout, read_timeout, retry_count;
- int fcntl;
- my_bool compress;
/*
The following variable is set if we are doing several queries in one
command ( as in LOAD TABLE ... FROM MASTER ),
and do not want to confuse the client with OK at the wrong time
*/
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 no_send_ok; /* For SPs and other things that do multiple stmts */
my_bool no_send_eof; /* For SPs' first version read-only cursors */
+ my_bool compress;
/*
Set if OK packet is already sent, and we do not need to send error
messages
@@ -215,20 +215,20 @@ typedef struct st_net {
queries in cache that have not stored its results yet
*/
#endif
- char last_error[MYSQL_ERRMSG_SIZE], sqlstate[SQLSTATE_LENGTH+1];
- unsigned int last_errno;
- unsigned char error;
-
/*
'query_cache_query' should be accessed only via query cache
functions and methods to maintain proper locking.
*/
unsigned char *query_cache_query;
-
+ unsigned int last_errno;
+ unsigned char error;
my_bool report_error; /* We should report error (we have unreported error) */
my_bool return_errno;
+ char last_error[MYSQL_ERRMSG_SIZE], sqlstate[SQLSTATE_LENGTH+1];
+ void *extension;
} NET;
+
#define packet_error (~(unsigned long) 0)
enum enum_field_types { MYSQL_TYPE_DECIMAL, MYSQL_TYPE_TINY,
@@ -389,6 +389,7 @@ typedef struct st_udf_args
char *maybe_null; /* Set to 1 for all maybe_null args */
char **attributes; /* Pointer to attribute name */
unsigned long *attribute_lengths; /* Length of attribute arguments */
+ void *extension;
} UDF_ARGS;
/* This holds information about the result */
@@ -399,7 +400,9 @@ typedef struct st_udf_init
unsigned int decimals; /* for real functions */
unsigned long max_length; /* For string functions */
char *ptr; /* free pointer for function data */
- my_bool const_item; /* 0 if result is independent of arguments */
+ /* 0 if result is independent of arguments */
+ my_bool const_item;
+ void *extension;
} UDF_INIT;
/* Constants when using compression */
diff --git a/include/mysql_h.ic b/include/mysql_h.ic
index 7d16a886fd8..8b1c36fdaab 100644
--- a/include/mysql_h.ic
+++ b/include/mysql_h.ic
@@ -4,16 +4,27 @@ 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;
@@ -22,7 +33,10 @@ 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;
@@ -32,65 +46,79 @@ enum mysql_option;
enum mysql_protocol_type;
enum mysql_rpl_type;
enum mysql_status;
-# 134 "mysql.h"
+# 139 "mysql.h"
typedef struct st_mysql_rows MYSQL_ROWS;
-# 24 "my_list.h"
+# 23 "my_list.h"
typedef struct st_list LIST;
-# 35 "my_alloc.h"
+# 34 "my_alloc.h"
typedef struct st_mem_root MEM_ROOT;
-# 251 "mysql.h"
+# 258 "mysql.h"
typedef struct st_mysql MYSQL;
-# 653 "mysql.h"
+# 664 "mysql.h"
typedef struct st_mysql_bind MYSQL_BIND;
-# 93 "mysql.h"
+# 95 "mysql.h"
typedef struct st_mysql_field MYSQL_FIELD;
-# 117 "mysql.h"
+# 120 "mysql.h"
typedef unsigned int MYSQL_FIELD_OFFSET;
-# 340 "mysql.h"
+# 35 "mysql/plugin.h"
+typedef struct st_mysql_lex_string MYSQL_LEX_STRING;
+# 348 "mysql.h"
typedef struct st_mysql_manager MYSQL_MANAGER;
-# 354 "mysql.h"
+# 363 "mysql.h"
typedef struct st_mysql_parameters MYSQL_PARAMETERS;
-# 309 "mysql.h"
+# 316 "mysql.h"
typedef struct st_mysql_res MYSQL_RES;
-# 116 "mysql.h"
+# 119 "mysql.h"
typedef char * * MYSQL_ROW;
-# 140 "mysql.h"
+# 145 "mysql.h"
typedef MYSQL_ROWS * MYSQL_ROW_OFFSET;
-# 681 "mysql.h"
+# 693 "mysql.h"
typedef struct st_mysql_stmt MYSQL_STMT;
-# 236 "mysql.h"
+# 52 "mysql/plugin.h"
+typedef struct st_mysql_xid MYSQL_XID;
+# 243 "mysql.h"
typedef struct character_set MY_CHARSET_INFO;
-# 184 "mysql_com.h"
+# 187 "mysql_com.h"
typedef struct st_net NET;
-# 23 "typelib.h"
+# 22 "typelib.h"
typedef struct st_typelib TYPELIB;
-# 174 "mysql_com.h"
+# 177 "mysql_com.h"
typedef struct st_vio Vio;
-# 57 "mysql.h"
-typedef char * gptr;
-# 29 "my_list.h"
+# 28 "my_list.h"
typedef int (* list_walk_action)(void *, void *);
-# 48 "mysql.h"
+# 51 "mysql.h"
typedef char my_bool;
-# 63 "mysql.h"
+# 65 "mysql.h"
typedef int my_socket;
-# 125 "mysql.h"
+# 128 "mysql.h"
typedef unsigned long long int my_ulonglong;
-# 144 "mysql.h"
+# 214 "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stddef.h"
+typedef unsigned int size_t;
+# 149 "mysql.h"
typedef struct embedded_query_result EMBEDDED_QUERY_RESULT;
-# 145 "mysql.h"
+# 150 "mysql.h"
typedef struct st_mysql_data MYSQL_DATA;
-# 750 "mysql.h"
+# 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;
+# 763 "mysql.h"
typedef struct st_mysql_methods MYSQL_METHODS;
-# 48 "mysql_time.h"
+# 47 "mysql_time.h"
typedef struct st_mysql_time MYSQL_TIME;
-# 375 "mysql_com.h"
+# 383 "mysql_com.h"
typedef struct st_udf_args UDF_ARGS;
-# 388 "mysql_com.h"
+# 397 "mysql_com.h"
typedef struct st_udf_init UDF_INIT;
-# 27 "my_alloc.h"
+# 26 "my_alloc.h"
typedef struct st_used_mem USED_MEM;
-# 236 "mysql.h"
+# 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;
@@ -102,7 +130,7 @@ struct __attribute__((aligned(__alignof__(unsigned int)), aligned(__alignof__(vo
unsigned int mbminlen;
unsigned int mbmaxlen;
};
-# 361 "mysql_com.h"
+# 369 "mysql_com.h"
struct __attribute__((aligned(__alignof__(unsigned long int)), aligned(__alignof__(double)))) rand_struct
{
unsigned long int seed1;
@@ -110,30 +138,30 @@ struct __attribute__((aligned(__alignof__(unsigned long int)), aligned(__alignof
unsigned long int max_value;
double max_value_dbl;
};
-# 24 "my_list.h"
+# 23 "my_list.h"
struct __attribute__((aligned(__alignof__(void *)))) st_list
{
struct st_list * prev;
struct st_list * next;
void * data;
};
-# 35 "my_alloc.h"
+# 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;
- unsigned int min_malloc;
- unsigned int block_size;
+ size_t min_malloc;
+ size_t block_size;
unsigned int block_num;
unsigned int first_block_usage;
void (* error_handler)(void);
};
-# 251 "mysql.h"
+# 258 "mysql.h"
struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned long long int)))) st_mysql
{
NET net;
- gptr connector_fd;
+ unsigned char * connector_fd;
char * host;
char * user;
char * passwd;
@@ -173,39 +201,47 @@ struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned
void * thd;
my_bool * unbuffered_fetch_owner;
char * info_buffer;
+ void * extension;
};
-# 653 "mysql.h"
+# 664 "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;
- enum enum_field_types buffer_type;
- unsigned long int buffer_length;
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 (* 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);
+ void * extension;
};
-# 145 "mysql.h"
-struct __attribute__((aligned(__alignof__(unsigned long long int)), aligned(__alignof__(void *)))) st_mysql_data
+# 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
{
- my_ulonglong rows;
- unsigned int fields;
MYSQL_ROWS * data;
- MEM_ROOT alloc;
struct embedded_query_result * embedded_info;
+ MEM_ROOT alloc;
+ my_ulonglong rows;
+ unsigned int fields;
+ void * extension;
};
-# 93 "mysql.h"
+# 95 "mysql.h"
struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned long int)))) st_mysql_field
{
char * name;
@@ -228,30 +264,75 @@ struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned
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;
};
-# 340 "mysql.h"
+# 348 "mysql.h"
struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned long int)))) st_mysql_manager
{
NET net;
char * host;
char * user;
char * passwd;
- unsigned int port;
- my_bool free_me;
- my_bool eof;
- int cmd_status;
- int last_errno;
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;
};
-# 750 "mysql.h"
+# 763 "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, char const * header, unsigned long int, char const * arg, unsigned long int, my_bool, MYSQL_STMT * stmt);
+ 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);
@@ -267,7 +348,7 @@ struct __attribute__((aligned(__alignof__(void *)))) st_mysql_methods
int (* read_change_user_result)(MYSQL * mysql, char * buff, char const * passwd);
int (* read_rows_from_cursor)(MYSQL_STMT * stmt);
};
-# 167 "mysql.h"
+# 173 "mysql.h"
struct __attribute__((aligned(__alignof__(unsigned long int)), aligned(__alignof__(void *)))) st_mysql_options
{
unsigned int connect_timeout;
@@ -309,14 +390,32 @@ struct __attribute__((aligned(__alignof__(unsigned long int)), aligned(__alignof
void (* local_infile_end)(void);
int (* local_infile_error)(void *, char *, unsigned int);
void * local_infile_userdata;
+ void * extension;
};
-# 354 "mysql.h"
+# 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;
};
-# 309 "mysql.h"
+# 316 "mysql.h"
struct __attribute__((aligned(__alignof__(unsigned long long int)), aligned(__alignof__(void *)))) st_mysql_res
{
my_ulonglong row_count;
@@ -325,23 +424,31 @@ struct __attribute__((aligned(__alignof__(unsigned long long int)), aligned(__al
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;
- MYSQL_ROW row;
- MYSQL_ROW current_row;
my_bool eof;
my_bool unbuffered_fetch_cancelled;
- struct st_mysql_methods const * methods;
+ void * extension;
};
-# 134 "mysql.h"
+# 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;
};
-# 681 "mysql.h"
+# 116 "mysql/plugin.h"
+struct __attribute__((aligned(__alignof__(void *)))) st_mysql_show_var
+ {
+ char const * name;
+ char * value;
+ enum enum_mysql_show_type type;
+ };
+# 693 "mysql.h"
struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned long long int)))) st_mysql_stmt
{
MEM_ROOT mem_root;
@@ -352,9 +459,9 @@ struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned
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;
- int (* read_row_func)(struct st_mysql_stmt * stmt, unsigned char * * row);
unsigned long int stmt_id;
unsigned long int flags;
unsigned long int prefetch_rows;
@@ -370,8 +477,14 @@ struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned
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;
};
-# 48 "mysql_time.h"
+# 47 "mysql_time.h"
struct __attribute__((aligned(__alignof__(unsigned long int)))) st_mysql_time
{
unsigned int year;
@@ -384,7 +497,23 @@ struct __attribute__((aligned(__alignof__(unsigned long int)))) st_mysql_time
my_bool neg;
enum enum_mysql_timestamp_type time_type;
};
-# 184 "mysql_com.h"
+# 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];
+ };
+# 187 "mysql_com.h"
struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned long int)))) st_net
{
Vio * vio;
@@ -393,6 +522,10 @@ struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned
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;
@@ -401,26 +534,23 @@ struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned
unsigned int read_timeout;
unsigned int retry_count;
int fcntl;
- my_bool compress;
- unsigned long int remain_in_buf;
- unsigned long int length;
- unsigned long int buf_length;
- unsigned long int where_b;
unsigned int * return_status;
unsigned char reading_or_writing;
char save_char;
my_bool no_send_ok;
my_bool no_send_eof;
+ my_bool compress;
my_bool no_send_error;
- char last_error[512];
- char sqlstate[(5 + 1)];
+ unsigned char * query_cache_query;
unsigned int last_errno;
unsigned char error;
- gptr query_cache_query;
my_bool report_error;
my_bool return_errno;
+ char last_error[512];
+ char sqlstate[(5 + 1)];
+ void * extension;
};
-# 23 "typelib.h"
+# 22 "typelib.h"
struct __attribute__((aligned(__alignof__(unsigned int)), aligned(__alignof__(void *)))) st_typelib
{
unsigned int count;
@@ -428,7 +558,7 @@ struct __attribute__((aligned(__alignof__(unsigned int)), aligned(__alignof__(vo
char const * * type_names;
unsigned int * type_lengths;
};
-# 375 "mysql_com.h"
+# 383 "mysql_com.h"
struct __attribute__((aligned(__alignof__(unsigned int)), aligned(__alignof__(void *)))) st_udf_args
{
unsigned int arg_count;
@@ -438,8 +568,9 @@ struct __attribute__((aligned(__alignof__(unsigned int)), aligned(__alignof__(vo
char * maybe_null;
char * * attributes;
unsigned long int * attribute_lengths;
+ void * extension;
};
-# 388 "mysql_com.h"
+# 397 "mysql_com.h"
struct __attribute__((aligned(__alignof__(unsigned long int)), aligned(__alignof__(void *)))) st_udf_init
{
my_bool maybe_null;
@@ -447,15 +578,16 @@ struct __attribute__((aligned(__alignof__(unsigned long int)), aligned(__alignof
unsigned long int max_length;
char * ptr;
my_bool const_item;
+ void * extension;
};
-# 27 "my_alloc.h"
+# 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;
};
-# 372 "mysql_com.h"
+# 380 "mysql_com.h"
enum Item_result
{
STRING_RESULT = 0,
@@ -464,7 +596,7 @@ enum Item_result
ROW_RESULT = 3,
DECIMAL_RESULT = 4,
};
-# 318 "mysql_com.h"
+# 321 "mysql_com.h"
enum enum_cursor_type
{
CURSOR_TYPE_NO_CURSOR = 0,
@@ -472,7 +604,7 @@ enum enum_cursor_type
CURSOR_TYPE_FOR_UPDATE = 2,
CURSOR_TYPE_SCROLLABLE = 4,
};
-# 231 "mysql_com.h"
+# 234 "mysql_com.h"
enum enum_field_types
{
MYSQL_TYPE_DECIMAL = 0,
@@ -503,13 +635,43 @@ enum enum_field_types
MYSQL_TYPE_STRING = 254,
MYSQL_TYPE_GEOMETRY = 255,
};
-# 328 "mysql_com.h"
+# 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,
};
-# 583 "mysql.h"
+# 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,
+ };
+# 594 "mysql.h"
enum enum_mysql_stmt_state
{
MYSQL_STMT_INIT_DONE = 1,
@@ -517,7 +679,7 @@ enum enum_mysql_stmt_state
MYSQL_STMT_EXECUTE_DONE = 3,
MYSQL_STMT_FETCH_DONE = 4,
};
-# 29 "mysql_time.h"
+# 28 "mysql_time.h"
enum enum_mysql_timestamp_type
{
MYSQL_TIMESTAMP_NONE = -(2),
@@ -526,7 +688,7 @@ enum enum_mysql_timestamp_type
MYSQL_TIMESTAMP_DATETIME = 1,
MYSQL_TIMESTAMP_TIME = 2,
};
-# 52 "mysql_com.h"
+# 55 "mysql_com.h"
enum enum_server_command
{
COM_SLEEP = 0,
@@ -561,14 +723,14 @@ enum enum_server_command
COM_DAEMON = 29,
COM_END = 30,
};
-# 727 "mysql.h"
+# 740 "mysql.h"
enum enum_stmt_attr_type
{
STMT_ATTR_UPDATE_MAX_LENGTH = 0,
STMT_ATTR_CURSOR_TYPE = 1,
STMT_ATTR_PREFETCH_ROWS = 2,
};
-# 293 "mysql_com.h"
+# 296 "mysql_com.h"
enum mysql_enum_shutdown_level
{
SHUTDOWN_DEFAULT = 0,
@@ -577,10 +739,9 @@ enum mysql_enum_shutdown_level
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,
};
-# 154 "mysql.h"
+# 160 "mysql.h"
enum mysql_option
{
MYSQL_OPT_CONNECT_TIMEOUT = 0,
@@ -606,7 +767,7 @@ enum mysql_option
MYSQL_OPT_RECONNECT = 20,
MYSQL_OPT_SSL_VERIFY_SERVER_CERT = 21,
};
-# 221 "mysql.h"
+# 228 "mysql.h"
enum mysql_protocol_type
{
MYSQL_PROTOCOL_DEFAULT = 0,
@@ -615,351 +776,393 @@ enum mysql_protocol_type
MYSQL_PROTOCOL_PIPE = 3,
MYSQL_PROTOCOL_MEMORY = 4,
};
-# 231 "mysql.h"
+# 238 "mysql.h"
enum mysql_rpl_type
{
MYSQL_RPL_MASTER = 0,
MYSQL_RPL_SLAVE = 1,
MYSQL_RPL_ADMIN = 2,
};
-# 216 "mysql.h"
+# 223 "mysql.h"
enum mysql_status
{
MYSQL_STATUS_READY = 0,
MYSQL_STATUS_GET_RESULT = 1,
MYSQL_STATUS_USE_RESULT = 2,
};
-# 427 "mysql_com.h"
+# 438 "mysql_com.h"
extern my_bool check_scramble(char const * reply, char const * message, unsigned char const * hash_stage2);
-# 420 "mysql_com.h"
+# 431 "mysql_com.h"
extern my_bool check_scramble_323(char const *, char const * message, unsigned long int * salt);
-# 33 "typelib.h"
+# 35 "typelib.h"
extern TYPELIB * copy_typelib(MEM_ROOT * root, TYPELIB * from);
-# 415 "mysql_com.h"
+# 426 "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(char * x, const TYPELIB * typelib, unsigned int);
-# 429 "mysql_com.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);
+# 440 "mysql_com.h"
extern void get_salt_from_password(unsigned char * res, char const * password);
-# 422 "mysql_com.h"
+# 433 "mysql_com.h"
extern void get_salt_from_password_323(unsigned long int * res, char const * password);
-# 435 "mysql_com.h"
+# 446 "mysql_com.h"
extern char * get_tty_password(char const * opt_message);
-# 32 "typelib.h"
+# 34 "typelib.h"
extern char const * get_type(TYPELIB * typelib, unsigned int);
-# 417 "mysql_com.h"
+# 428 "mysql_com.h"
extern void hash_password(unsigned long int * to, char const * password, unsigned int);
-# 31 "my_list.h"
+# 30 "my_list.h"
extern LIST * list_add(LIST * root, LIST * element);
-# 33 "my_list.h"
-extern LIST * list_cons(void * data, LIST * root);
# 32 "my_list.h"
+extern LIST * list_cons(void * data, LIST * root);
+# 31 "my_list.h"
extern LIST * list_delete(LIST * root, LIST * element);
-# 35 "my_list.h"
+# 34 "my_list.h"
extern void list_free(LIST * root, unsigned int);
-# 36 "my_list.h"
+# 35 "my_list.h"
extern unsigned int list_length(LIST *);
-# 34 "my_list.h"
+# 33 "my_list.h"
extern LIST * list_reverse(LIST * root);
-# 37 "my_list.h"
-extern int list_walk(LIST *, list_walk_action, gptr);
-# 430 "mysql_com.h"
+# 36 "my_list.h"
+extern int list_walk(LIST *, list_walk_action, unsigned char * argument);
+# 441 "mysql_com.h"
extern void make_password_from_salt(char * to, unsigned char const * hash_stage2);
-# 423 "mysql_com.h"
+# 434 "mysql_com.h"
extern void make_password_from_salt_323(char * to, unsigned long int const * salt);
-# 425 "mysql_com.h"
+# 436 "mysql_com.h"
extern void make_scrambled_password(char * to, char const * password);
-# 418 "mysql_com.h"
+# 429 "mysql_com.h"
extern void make_scrambled_password_323(char * to, char const * password);
-# 31 "typelib.h"
+# 33 "typelib.h"
extern void make_type(char * to, unsigned int, TYPELIB * typelib);
-# 358 "mysql_com.h"
+# 366 "mysql_com.h"
extern int my_connect(my_socket, struct sockaddr const * name, unsigned int, unsigned int);
-# 340 "mysql_com.h"
+# 343 "mysql_com.h"
extern my_bool my_net_init(NET * net, Vio * vio);
-# 341 "mysql_com.h"
+# 344 "mysql_com.h"
extern void my_net_local_init(NET * net);
-# 351 "mysql_com.h"
+# 354 "mysql_com.h"
extern unsigned long int my_net_read(NET * net);
-# 346 "mysql_com.h"
-extern my_bool my_net_write(NET * net, char const * packet, unsigned long int);
-# 414 "mysql_com.h"
+# 349 "mysql_com.h"
+extern my_bool my_net_write(NET * net, unsigned char const * packet, size_t);
+# 425 "mysql_com.h"
extern double my_rnd(struct rand_struct *);
-# 441 "mysql_com.h"
+# 452 "mysql_com.h"
extern void my_thread_end(void);
-# 440 "mysql_com.h"
+# 451 "mysql_com.h"
extern my_bool my_thread_init(void);
-# 559 "mysql.h"
+# 570 "mysql.h"
extern void myodbc_remove_escape(MYSQL * mysql, char * name);
-# 501 "mysql.h"
+# 512 "mysql.h"
extern int mysql_add_slave(MYSQL * mysql, char const * host, unsigned int, char const * user, char const * passwd);
-# 410 "mysql.h"
+# 421 "mysql.h"
extern my_ulonglong mysql_affected_rows(MYSQL * mysql);
-# 823 "mysql.h"
+# 836 "mysql.h"
extern my_bool mysql_autocommit(MYSQL * mysql, my_bool);
-# 426 "mysql.h"
+# 437 "mysql.h"
extern my_bool mysql_change_user(MYSQL * mysql, char const * user, char const * passwd, char const * db);
-# 418 "mysql.h"
+# 429 "mysql.h"
extern char const * mysql_character_set_name(MYSQL * mysql);
-# 826 "mysql.h"
+# 839 "mysql.h"
extern void mysql_close(MYSQL * sock);
-# 821 "mysql.h"
+# 834 "mysql.h"
extern my_bool mysql_commit(MYSQL * mysql);
-# 530 "mysql.h"
+# 541 "mysql.h"
extern void mysql_data_seek(MYSQL_RES * result, my_ulonglong);
-# 548 "mysql.h"
+# 559 "mysql.h"
extern void mysql_debug(char const * debug);
-# 487 "mysql.h"
+# 498 "mysql.h"
extern void mysql_disable_reads_from_master(MYSQL * mysql);
-# 481 "mysql.h"
+# 492 "mysql.h"
extern void mysql_disable_rpl_parse(MYSQL * mysql);
-# 509 "mysql.h"
+# 520 "mysql.h"
extern int mysql_dump_debug_info(MYSQL * mysql);
-# 561 "mysql.h"
+# 572 "mysql.h"
extern my_bool mysql_embedded(void);
-# 486 "mysql.h"
+# 497 "mysql.h"
extern void mysql_enable_reads_from_master(MYSQL * mysql);
-# 480 "mysql.h"
+# 491 "mysql.h"
extern void mysql_enable_rpl_parse(MYSQL * mysql);
-# 402 "mysql.h"
+# 413 "mysql.h"
extern my_bool mysql_eof(MYSQL_RES * res);
-# 412 "mysql.h"
+# 423 "mysql.h"
extern unsigned int mysql_errno(MYSQL * mysql);
-# 436 "mysql_com.h"
+# 447 "mysql_com.h"
extern char const * mysql_errno_to_sqlstate(unsigned int);
-# 413 "mysql.h"
+# 424 "mysql.h"
extern char const * mysql_error(MYSQL * mysql);
-# 541 "mysql.h"
+# 552 "mysql.h"
extern unsigned long int mysql_escape_string(char * to, char const * from, unsigned long int);
-# 538 "mysql.h"
+# 549 "mysql.h"
extern MYSQL_FIELD * mysql_fetch_field(MYSQL_RES * result);
-# 403 "mysql.h"
+# 414 "mysql.h"
extern MYSQL_FIELD * mysql_fetch_field_direct(MYSQL_RES * res, unsigned int);
-# 405 "mysql.h"
+# 416 "mysql.h"
extern MYSQL_FIELD * mysql_fetch_fields(MYSQL_RES * res);
-# 537 "mysql.h"
+# 548 "mysql.h"
extern unsigned long int * mysql_fetch_lengths(MYSQL_RES * result);
-# 536 "mysql.h"
+# 547 "mysql.h"
extern MYSQL_ROW mysql_fetch_row(MYSQL_RES * result);
-# 409 "mysql.h"
+# 420 "mysql.h"
extern unsigned int mysql_field_count(MYSQL * mysql);
-# 534 "mysql.h"
+# 545 "mysql.h"
extern MYSQL_FIELD_OFFSET mysql_field_seek(MYSQL_RES * result, MYSQL_FIELD_OFFSET);
-# 407 "mysql.h"
+# 418 "mysql.h"
extern MYSQL_FIELD_OFFSET mysql_field_tell(MYSQL_RES * res);
-# 529 "mysql.h"
+# 540 "mysql.h"
extern void mysql_free_result(MYSQL_RES * result);
-# 454 "mysql.h"
+# 465 "mysql.h"
extern void mysql_get_character_set_info(MYSQL * mysql, MY_CHARSET_INFO * charset);
-# 519 "mysql.h"
+# 530 "mysql.h"
extern char const * mysql_get_client_info(void);
-# 520 "mysql.h"
+# 531 "mysql.h"
extern unsigned long int mysql_get_client_version(void);
-# 521 "mysql.h"
+# 532 "mysql.h"
extern char const * mysql_get_host_info(MYSQL * mysql);
-# 384 "mysql.h"
+# 395 "mysql.h"
extern MYSQL_PARAMETERS * mysql_get_parameters(void);
-# 523 "mysql.h"
+# 534 "mysql.h"
extern unsigned int mysql_get_proto_info(MYSQL * mysql);
-# 518 "mysql.h"
+# 529 "mysql.h"
extern char const * mysql_get_server_info(MYSQL * mysql);
-# 522 "mysql.h"
+# 533 "mysql.h"
extern unsigned long int mysql_get_server_version(MYSQL * mysql);
-# 425 "mysql.h"
+# 436 "mysql.h"
extern char const * mysql_get_ssl_cipher(MYSQL * mysql);
-# 543 "mysql.h"
+# 554 "mysql.h"
extern unsigned long int mysql_hex_string(char * to, char const * from, unsigned long int);
-# 416 "mysql.h"
+# 427 "mysql.h"
extern char const * mysql_info(MYSQL * mysql);
-# 421 "mysql.h"
+# 432 "mysql.h"
extern MYSQL * mysql_init(MYSQL * mysql);
-# 411 "mysql.h"
+# 422 "mysql.h"
extern my_ulonglong mysql_insert_id(MYSQL * mysql);
-# 512 "mysql.h"
+# 523 "mysql.h"
extern int mysql_kill(MYSQL * mysql, unsigned long int);
-# 524 "mysql.h"
+# 535 "mysql.h"
extern MYSQL_RES * mysql_list_dbs(MYSQL * mysql, char const * wild);
-# 539 "mysql.h"
+# 550 "mysql.h"
extern MYSQL_RES * mysql_list_fields(MYSQL * mysql, char const * table, char const * wild);
-# 526 "mysql.h"
+# 537 "mysql.h"
extern MYSQL_RES * mysql_list_processes(MYSQL * mysql);
-# 525 "mysql.h"
+# 536 "mysql.h"
extern MYSQL_RES * mysql_list_tables(MYSQL * mysql, char const * wild);
-# 568 "mysql.h"
+# 579 "mysql.h"
extern void mysql_manager_close(MYSQL_MANAGER * con);
-# 569 "mysql.h"
+# 580 "mysql.h"
extern int mysql_manager_command(MYSQL_MANAGER * con, char const * cmd, int);
-# 563 "mysql.h"
+# 574 "mysql.h"
extern MYSQL_MANAGER * mysql_manager_connect(MYSQL_MANAGER * con, char const * host, char const * user, char const * passwd, unsigned int);
-# 571 "mysql.h"
+# 582 "mysql.h"
extern int mysql_manager_fetch_line(MYSQL_MANAGER * con, char * res_buf, int);
-# 562 "mysql.h"
+# 573 "mysql.h"
extern MYSQL_MANAGER * mysql_manager_init(MYSQL_MANAGER * con);
-# 445 "mysql.h"
+# 456 "mysql.h"
extern my_bool mysql_master_query(MYSQL * mysql, char const * q, unsigned long int);
-# 447 "mysql.h"
+# 458 "mysql.h"
extern my_bool mysql_master_send_query(MYSQL * mysql, char const * q, unsigned long int);
-# 824 "mysql.h"
+# 837 "mysql.h"
extern my_bool mysql_more_results(MYSQL * mysql);
-# 825 "mysql.h"
+# 838 "mysql.h"
extern int mysql_next_result(MYSQL * mysql);
-# 401 "mysql.h"
+# 412 "mysql.h"
extern unsigned int mysql_num_fields(MYSQL_RES * res);
-# 400 "mysql.h"
+# 411 "mysql.h"
extern my_ulonglong mysql_num_rows(MYSQL_RES * res);
-# 549 "mysql.h"
+# 560 "mysql.h"
extern char * mysql_odbc_escape_string(MYSQL * mysql, char * to, unsigned long int, char const * from, unsigned long int, void * param, char * (* extend_buffer)(void *, char * to, unsigned long int * length));
+# 538 "mysql.h"
+extern int mysql_options(MYSQL * mysql, enum mysql_option, void const * arg);
# 527 "mysql.h"
-extern int mysql_options(MYSQL * mysql, enum mysql_option, char const * arg);
-# 516 "mysql.h"
extern int mysql_ping(MYSQL * mysql);
-# 75 "mysql.h"
+# 76 "mysql.h"
extern unsigned int mysql_port;
-# 436 "mysql.h"
+# 447 "mysql.h"
extern int mysql_query(MYSQL * mysql, char const * q);
-# 574 "mysql.h"
+# 780 "mysql/plugin.h"
+extern void mysql_query_cache_invalidate4(void * thd, char const * key, unsigned int, int);
+# 585 "mysql.h"
extern my_bool mysql_read_query_result(MYSQL * mysql);
-# 489 "mysql.h"
+# 500 "mysql.h"
extern my_bool mysql_reads_from_master_enabled(MYSQL * mysql);
-# 428 "mysql.h"
+# 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);
-# 545 "mysql.h"
+# 556 "mysql.h"
extern unsigned long int mysql_real_escape_string(MYSQL * mysql, char * to, char const * from, unsigned long int);
-# 439 "mysql.h"
+# 450 "mysql.h"
extern int mysql_real_query(MYSQL * mysql, char const * q, unsigned long int);
-# 510 "mysql.h"
+# 521 "mysql.h"
extern int mysql_refresh(MYSQL * mysql, unsigned int);
-# 822 "mysql.h"
+# 835 "mysql.h"
extern my_bool mysql_rollback(MYSQL * mysql);
-# 532 "mysql.h"
+# 543 "mysql.h"
extern MYSQL_ROW_OFFSET mysql_row_seek(MYSQL_RES * result, MYSQL_ROW_OFFSET);
-# 406 "mysql.h"
+# 417 "mysql.h"
extern MYSQL_ROW_OFFSET mysql_row_tell(MYSQL_RES * res);
-# 483 "mysql.h"
-extern int mysql_rpl_parse_enabled(MYSQL * mysql);
# 494 "mysql.h"
+extern int mysql_rpl_parse_enabled(MYSQL * mysql);
+# 505 "mysql.h"
extern my_bool mysql_rpl_probe(MYSQL * mysql);
-# 491 "mysql.h"
+# 502 "mysql.h"
extern enum mysql_rpl_type mysql_rpl_query_type(char const * q, int);
-# 435 "mysql.h"
+# 446 "mysql.h"
extern int mysql_select_db(MYSQL * mysql, char const * db);
-# 437 "mysql.h"
+# 448 "mysql.h"
extern int mysql_send_query(MYSQL * mysql, char const * q, unsigned long int);
-# 371 "mysql.h"
+# 381 "mysql.h"
extern void mysql_server_end(void);
-# 370 "mysql.h"
+# 380 "mysql.h"
extern int mysql_server_init(int, char * * argv, char * * groups);
-# 419 "mysql.h"
+# 430 "mysql.h"
extern int mysql_set_character_set(MYSQL * mysql, char const * csname);
-# 472 "mysql.h"
+# 483 "mysql.h"
extern void mysql_set_local_infile_default(MYSQL * mysql);
-# 461 "mysql.h"
+# 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 *);
-# 497 "mysql.h"
+# 508 "mysql.h"
extern int mysql_set_master(MYSQL * mysql, char const * host, unsigned int, char const * user, char const * passwd);
-# 513 "mysql.h"
+# 524 "mysql.h"
extern int mysql_set_server_option(MYSQL * mysql, enum enum_mysql_set_option);
-# 506 "mysql.h"
+# 517 "mysql.h"
extern int mysql_shutdown(MYSQL * mysql, enum mysql_enum_shutdown_level);
-# 450 "mysql.h"
+# 461 "mysql.h"
extern my_bool mysql_slave_query(MYSQL * mysql, char const * q, unsigned long int);
-# 452 "mysql.h"
+# 463 "mysql.h"
extern my_bool mysql_slave_send_query(MYSQL * mysql, char const * q, unsigned long int);
-# 414 "mysql.h"
+# 425 "mysql.h"
extern char const * mysql_sqlstate(MYSQL * mysql);
-# 422 "mysql.h"
+# 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);
-# 517 "mysql.h"
+# 528 "mysql.h"
extern char const * mysql_stat(MYSQL * mysql);
-# 817 "mysql.h"
+# 830 "mysql.h"
extern my_ulonglong mysql_stmt_affected_rows(MYSQL_STMT * stmt);
-# 795 "mysql.h"
+# 808 "mysql.h"
extern my_bool mysql_stmt_attr_get(MYSQL_STMT * stmt, enum enum_stmt_attr_type, void * attr);
-# 792 "mysql.h"
+# 805 "mysql.h"
extern my_bool mysql_stmt_attr_set(MYSQL_STMT * stmt, enum enum_stmt_attr_type, void const * attr);
-# 798 "mysql.h"
+# 811 "mysql.h"
extern my_bool mysql_stmt_bind_param(MYSQL_STMT * stmt, MYSQL_BIND * bnd);
-# 799 "mysql.h"
+# 812 "mysql.h"
extern my_bool mysql_stmt_bind_result(MYSQL_STMT * stmt, MYSQL_BIND * bnd);
-# 800 "mysql.h"
+# 813 "mysql.h"
extern my_bool mysql_stmt_close(MYSQL_STMT * stmt);
-# 815 "mysql.h"
+# 828 "mysql.h"
extern void mysql_stmt_data_seek(MYSQL_STMT * stmt, my_ulonglong);
-# 809 "mysql.h"
+# 822 "mysql.h"
extern unsigned int mysql_stmt_errno(MYSQL_STMT * stmt);
-# 810 "mysql.h"
+# 823 "mysql.h"
extern char const * mysql_stmt_error(MYSQL_STMT * stmt);
-# 785 "mysql.h"
+# 798 "mysql.h"
extern int mysql_stmt_execute(MYSQL_STMT * stmt);
-# 786 "mysql.h"
+# 799 "mysql.h"
extern int mysql_stmt_fetch(MYSQL_STMT * stmt);
-# 787 "mysql.h"
-extern int mysql_stmt_fetch_column(MYSQL_STMT * stmt, MYSQL_BIND * bind, unsigned int, unsigned long int);
-# 819 "mysql.h"
+# 800 "mysql.h"
+extern int mysql_stmt_fetch_column(MYSQL_STMT * stmt, MYSQL_BIND * bind_arg, unsigned int, unsigned long int);
+# 832 "mysql.h"
extern unsigned int mysql_stmt_field_count(MYSQL_STMT * stmt);
-# 802 "mysql.h"
+# 815 "mysql.h"
extern my_bool mysql_stmt_free_result(MYSQL_STMT * stmt);
-# 782 "mysql.h"
+# 795 "mysql.h"
extern MYSQL_STMT * mysql_stmt_init(MYSQL * mysql);
-# 818 "mysql.h"
+# 831 "mysql.h"
extern my_ulonglong mysql_stmt_insert_id(MYSQL_STMT * stmt);
-# 816 "mysql.h"
+# 829 "mysql.h"
extern my_ulonglong mysql_stmt_num_rows(MYSQL_STMT * stmt);
-# 791 "mysql.h"
+# 804 "mysql.h"
extern unsigned long int mysql_stmt_param_count(MYSQL_STMT * stmt);
-# 808 "mysql.h"
+# 821 "mysql.h"
extern MYSQL_RES * mysql_stmt_param_metadata(MYSQL_STMT * stmt);
-# 783 "mysql.h"
+# 796 "mysql.h"
extern int mysql_stmt_prepare(MYSQL_STMT * stmt, char const * query, unsigned long int);
-# 801 "mysql.h"
+# 814 "mysql.h"
extern my_bool mysql_stmt_reset(MYSQL_STMT * stmt);
-# 807 "mysql.h"
+# 820 "mysql.h"
extern MYSQL_RES * mysql_stmt_result_metadata(MYSQL_STMT * stmt);
-# 812 "mysql.h"
+# 825 "mysql.h"
extern MYSQL_ROW_OFFSET mysql_stmt_row_seek(MYSQL_STMT * stmt, MYSQL_ROW_OFFSET);
-# 814 "mysql.h"
+# 827 "mysql.h"
extern MYSQL_ROW_OFFSET mysql_stmt_row_tell(MYSQL_STMT * stmt);
-# 803 "mysql.h"
+# 816 "mysql.h"
extern my_bool mysql_stmt_send_long_data(MYSQL_STMT * stmt, unsigned int, char const * data, unsigned long int);
-# 811 "mysql.h"
+# 824 "mysql.h"
extern char const * mysql_stmt_sqlstate(MYSQL_STMT * stmt);
-# 790 "mysql.h"
+# 803 "mysql.h"
extern int mysql_stmt_store_result(MYSQL_STMT * stmt);
-# 441 "mysql.h"
+# 452 "mysql.h"
extern MYSQL_RES * mysql_store_result(MYSQL * mysql);
-# 393 "mysql.h"
+# 404 "mysql.h"
extern void mysql_thread_end(void);
-# 417 "mysql.h"
+# 428 "mysql.h"
extern unsigned long int mysql_thread_id(MYSQL * mysql);
-# 392 "mysql.h"
+# 403 "mysql.h"
extern my_bool mysql_thread_init(void);
-# 560 "mysql.h"
+# 571 "mysql.h"
extern unsigned int mysql_thread_safe(void);
-# 76 "mysql.h"
+# 699 "mysql/plugin.h"
+extern int mysql_tmpfile(char const * prefix);
+# 77 "mysql.h"
extern char * mysql_unix_port;
-# 442 "mysql.h"
+# 453 "mysql.h"
extern MYSQL_RES * mysql_use_result(MYSQL * mysql);
-# 415 "mysql.h"
+# 426 "mysql.h"
extern unsigned int mysql_warning_count(MYSQL * mysql);
-# 343 "mysql_com.h"
-extern void net_clear(NET * net);
-# 342 "mysql_com.h"
-extern void net_end(NET * net);
+# 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);
-# 350 "mysql_com.h"
-extern int net_real_write(NET * net, char const * packet, unsigned long int);
-# 344 "mysql_com.h"
-extern my_bool net_realloc(NET * net, unsigned long int);
+# 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_write_command(NET * net, unsigned char, char const * header, unsigned long int, char const * packet, unsigned long int);
-# 431 "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);
+# 442 "mysql_com.h"
extern char * octet2hex(char * to, char const * str, unsigned int);
-# 412 "mysql_com.h"
+# 423 "mysql_com.h"
extern void randominit(struct rand_struct *, unsigned long int, unsigned long int);
-# 426 "mysql_com.h"
+# 437 "mysql_com.h"
extern void scramble(char * to, char const * message, char const * password);
-# 419 "mysql_com.h"
+# 430 "mysql_com.h"
extern void scramble_323(char * to, char const * message, char const * password);
-# 35 "typelib.h"
+# 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);