errmsg.h   errmsg.h 
#ifndef ERRMSG_INCLUDED
#define ERRMSG_INCLUDED
/* Copyright (C) 2000 MySQL AB /* Copyright (C) 2000 MySQL AB
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License. the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
skipping to change at line 106 skipping to change at line 103
#define CR_NO_DATA 2051 #define CR_NO_DATA 2051
#define CR_NO_STMT_METADATA 2052 #define CR_NO_STMT_METADATA 2052
#define CR_NO_RESULT_SET 2053 #define CR_NO_RESULT_SET 2053
#define CR_NOT_IMPLEMENTED 2054 #define CR_NOT_IMPLEMENTED 2054
#define CR_SERVER_LOST_EXTENDED 2055 #define CR_SERVER_LOST_EXTENDED 2055
#define CR_STMT_CLOSED 2056 #define CR_STMT_CLOSED 2056
#define CR_NEW_STMT_METADATA 2057 #define CR_NEW_STMT_METADATA 2057
#define CR_ALREADY_CONNECTED 2058 #define CR_ALREADY_CONNECTED 2058
#define CR_ERROR_LAST /*Copy last error nr:*/ 2058 #define CR_ERROR_LAST /*Copy last error nr:*/ 2058
/* Add error numbers before CR_ERROR_LAST and change it accordingly. */ /* Add error numbers before CR_ERROR_LAST and change it accordingly. */
#endif /* ERRMSG_INCLUDED */
 End of changes. 2 change blocks. 
3 lines changed or deleted 0 lines changed or added


 keycache.h   keycache.h 
/* Copyright (C) 2003 MySQL AB, 2009 Sun Microsystems, Inc /* Copyright (C) 2003 MySQL AB
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License. the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A */ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A */
/* Key cache variable structures */ /**
@file
Key cache API
*/
#ifndef _keycache_h #ifndef _keycache_h
#define _keycache_h #define _keycache_h
#include "my_sys.h" /* flush_type */
C_MODE_START C_MODE_START
/* declare structures that is used by st_key_cache */ /* declare structures that is used by st_key_cache */
struct st_block_link; struct st_block_link;
typedef struct st_block_link BLOCK_LINK; typedef struct st_block_link BLOCK_LINK;
struct st_keycache_page; struct st_keycache_page;
typedef struct st_keycache_page KEYCACHE_PAGE; typedef struct st_keycache_page KEYCACHE_PAGE;
struct st_hash_link; struct st_hash_link;
typedef struct st_hash_link HASH_LINK; typedef struct st_hash_link HASH_LINK;
/* info about requests in a waiting queue */ /* info about requests in a waiting queue */
typedef struct st_keycache_wqueue typedef struct st_keycache_wqueue
{ {
struct st_my_thread_var *last_thread; /* circular list of waiting thread s */ struct st_my_thread_var *last_thread; /* circular list of waiting thread s */
} KEYCACHE_WQUEUE; } KEYCACHE_WQUEUE;
/** Callback called when any block is flushed */
typedef int (*KEYCACHE_POST_WRITE_CALLBACK)(void *arg, const uchar *buffert
,
uint length, my_off_t filepos);
#define CHANGED_BLOCKS_HASH 128 /* must be power of 2 */ #define CHANGED_BLOCKS_HASH 128 /* must be power of 2 */
/* /*
The key cache structure The key cache structure
It also contains read-only statistics parameters. It also contains read-only statistics parameters.
*/ */
typedef struct st_key_cache typedef struct st_key_cache
{ {
my_bool key_cache_inited; my_bool key_cache_inited;
skipping to change at line 73 skipping to change at line 77
ulong blocks_unused; /* number of currently unused blocks */ ulong blocks_unused; /* number of currently unused blocks */
ulong blocks_changed; /* number of currently dirty blocks */ ulong blocks_changed; /* number of currently dirty blocks */
ulong warm_blocks; /* number of blocks in warm sub-chain */ ulong warm_blocks; /* number of blocks in warm sub-chain */
ulong cnt_for_resize_op; /* counter to block resize operation */ ulong cnt_for_resize_op; /* counter to block resize operation */
long blocks_available; /* number of blocks available in the LRU chai n */ long blocks_available; /* number of blocks available in the LRU chai n */
HASH_LINK **hash_root; /* arr. of entries into hash table buckets */ HASH_LINK **hash_root; /* arr. of entries into hash table buckets */
HASH_LINK *hash_link_root; /* memory for hash table links */ HASH_LINK *hash_link_root; /* memory for hash table links */
HASH_LINK *free_hash_list; /* list of free hash links */ HASH_LINK *free_hash_list; /* list of free hash links */
BLOCK_LINK *free_block_list; /* list of free blocks */ BLOCK_LINK *free_block_list; /* list of free blocks */
BLOCK_LINK *block_root; /* memory for block links */ BLOCK_LINK *block_root; /* memory for block links */
uchar *block_mem; /* memory for block buffers */ uchar HUGE_PTR *block_mem; /* memory for block buffers */
BLOCK_LINK *used_last; /* ptr to the last block of the LRU chain */ BLOCK_LINK *used_last; /* ptr to the last block of the LRU chain */
BLOCK_LINK *used_ins; /* ptr to the insertion block in LRU chain */ BLOCK_LINK *used_ins; /* ptr to the insertion block in LRU chain */
mysql_mutex_t cache_lock; /* to lock access to the cache structure */ pthread_mutex_t cache_lock; /* to lock access to the cache structure */
KEYCACHE_WQUEUE resize_queue; /* threads waiting during resize operation */ KEYCACHE_WQUEUE resize_queue; /* threads waiting during resize operation */
/* /*
Waiting for a zero resize count. Using a queue for symmetry though Waiting for a zero resize count. Using a queue for symmetry though
only one thread can wait here. only one thread can wait here.
*/ */
KEYCACHE_WQUEUE waiting_for_resize_cnt; KEYCACHE_WQUEUE waiting_for_resize_cnt;
KEYCACHE_WQUEUE waiting_for_hash_link; /* waiting for a free hash link */ KEYCACHE_WQUEUE waiting_for_hash_link; /* waiting for a free hash link */
KEYCACHE_WQUEUE waiting_for_block; /* requests waiting for a free bloc k */ KEYCACHE_WQUEUE waiting_for_block; /* requests waiting for a free bloc k */
BLOCK_LINK *changed_blocks[CHANGED_BLOCKS_HASH]; /* hash for dirty file b l.*/ BLOCK_LINK *changed_blocks[CHANGED_BLOCKS_HASH]; /* hash for dirty file b l.*/
BLOCK_LINK *file_blocks[CHANGED_BLOCKS_HASH]; /* hash for other file b l.*/ BLOCK_LINK *file_blocks[CHANGED_BLOCKS_HASH]; /* hash for other file b l.*/
KEYCACHE_POST_WRITE_CALLBACK post_write;/**< Called when flushing any blo ck*/
/* /*
The following variables are and variables used to hold parameters for The following variables are and variables used to hold parameters for
initializing the key cache. initializing the key cache.
*/ */
ulonglong param_buff_size; /* size the memory allocated for the cach ulonglong param_buff_size; /* size the memory allocated for the cache
e */ */
ulonglong param_block_size; /* size of the blocks in the key cache ulong param_block_size; /* size of the blocks in the key cache
*/ */
ulonglong param_division_limit; /* min. percentage of warm blocks ulong param_division_limit; /* min. percentage of warm blocks
*/ */
ulonglong param_age_threshold; /* determines when hot block is downgrade ulong param_age_threshold; /* determines when hot block is downgraded
d */ */
/* Statistics variables. These are reset in reset_key_cache_counters(). * / /* Statistics variables. These are reset in reset_key_cache_counters(). * /
ulong global_blocks_changed; /* number of currently dirty blocks */ ulong global_blocks_changed; /* number of currently dirty blocks */
ulonglong global_cache_w_requests;/* number of write requests (write hits ) */ ulonglong global_cache_w_requests;/* number of write requests (write hits ) */
ulonglong global_cache_write; /* number of writes from cache to files */ ulonglong global_cache_write; /* number of writes from cache to files */
ulonglong global_cache_r_requests;/* number of read requests (read hits) */ ulonglong global_cache_r_requests;/* number of read requests (read hits) */
ulonglong global_cache_read; /* number of reads from files to cache */ ulonglong global_cache_read; /* number of reads from files to cache */
int blocks; /* max number of blocks in the cache */ int blocks; /* max number of blocks in the cache */
my_bool in_init; /* Set to 1 in MySQL during init/resize */ my_bool in_init; /* Set to 1 in MySQL during init/resize */
skipping to change at line 130 skipping to change at line 135
extern uchar *key_cache_read(KEY_CACHE *keycache, extern uchar *key_cache_read(KEY_CACHE *keycache,
File file, my_off_t filepos, int level, File file, my_off_t filepos, int level,
uchar *buff, uint length, uchar *buff, uint length,
uint block_length,int return_buffer); uint block_length,int return_buffer);
extern int key_cache_insert(KEY_CACHE *keycache, extern int key_cache_insert(KEY_CACHE *keycache,
File file, my_off_t filepos, int level, File file, my_off_t filepos, int level,
uchar *buff, uint length); uchar *buff, uint length);
extern int key_cache_write(KEY_CACHE *keycache, extern int key_cache_write(KEY_CACHE *keycache,
File file, my_off_t filepos, int level, File file, my_off_t filepos, int level,
uchar *buff, uint length, uchar *buff, uint length,
uint block_length,int force_write); uint block_length, int force_write,
void *post_write_arg);
extern int flush_key_blocks(KEY_CACHE *keycache, extern int flush_key_blocks(KEY_CACHE *keycache,
int file, enum flush_type type); int file, enum flush_type type);
extern void end_key_cache(KEY_CACHE *keycache, my_bool cleanup); extern void end_key_cache(KEY_CACHE *keycache, my_bool cleanup);
/* Functions to handle multiple key caches */ /* Functions to handle multiple key caches */
extern my_bool multi_keycache_init(void); extern my_bool multi_keycache_init(void);
extern void multi_keycache_free(void); extern void multi_keycache_free(void);
extern KEY_CACHE *multi_key_cache_search(uchar *key, uint length); extern KEY_CACHE *multi_key_cache_search(uchar *key, uint length,
KEY_CACHE *def);
extern my_bool multi_key_cache_set(const uchar *key, uint length, extern my_bool multi_key_cache_set(const uchar *key, uint length,
KEY_CACHE *key_cache); KEY_CACHE *key_cache);
extern void multi_key_cache_change(KEY_CACHE *old_data, extern void multi_key_cache_change(KEY_CACHE *old_data,
KEY_CACHE *new_data); KEY_CACHE *new_data);
extern int reset_key_cache_counters(const char *name, extern int reset_key_cache_counters(const char *name,
KEY_CACHE *key_cache); KEY_CACHE *key_cache);
C_MODE_END C_MODE_END
#endif /* _keycache_h */ #endif /* _keycache_h */
 End of changes. 10 change blocks. 
17 lines changed or deleted 25 lines changed or added


 m_ctype.h   m_ctype.h 
skipping to change at line 18 skipping to change at line 18
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A */ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A */
/* /*
A better inplementation of the UNIX ctype(3) library. A better inplementation of the UNIX ctype(3) library.
Notes: my_global.h should be included before ctype.h
*/ */
#ifndef _m_ctype_h #ifndef _m_ctype_h
#define _m_ctype_h #define _m_ctype_h
#include <my_attribute.h> #include <my_attribute.h>
#include "my_global.h" /* uint16, uchar */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#define MY_CS_NAME_SIZE 32 #define MY_CS_NAME_SIZE 32
#define MY_CS_CTYPE_TABLE_SIZE 257 #define MY_CS_CTYPE_TABLE_SIZE 257
#define MY_CS_TO_LOWER_TABLE_SIZE 256 #define MY_CS_TO_LOWER_TABLE_SIZE 256
#define MY_CS_TO_UPPER_TABLE_SIZE 256 #define MY_CS_TO_UPPER_TABLE_SIZE 256
#define MY_CS_SORT_ORDER_TABLE_SIZE 256 #define MY_CS_SORT_ORDER_TABLE_SIZE 256
#define MY_CS_TO_UNI_TABLE_SIZE 256 #define MY_CS_TO_UNI_TABLE_SIZE 256
#define CHARSET_DIR "charsets/" #define CHARSET_DIR "charsets/"
#define my_wc_t ulong #define my_wc_t ulong
#define MY_CS_REPLACEMENT_CHARACTER 0xFFFD
/*
On i386 we store Unicode->CS conversion tables for
some character sets using Big-endian order,
to copy two bytes at onces.
This gives some performance improvement.
*/
#ifdef __i386__
#define MB2(x) (((x) >> 8) + (((x) & 0xFF) << 8))
#define MY_PUT_MB2(s, code) { *((uint16*)(s))= (code); }
#else
#define MB2(x) (x)
#define MY_PUT_MB2(s, code) { (s)[0]= code >> 8; (s)[1]= code & 0xFF; }
#endif
typedef struct unicase_info_char_st
{
uint32 toupper;
uint32 tolower;
uint32 sort;
} MY_UNICASE_CHARACTER;
typedef struct unicase_info_st typedef struct unicase_info_st
{ {
my_wc_t maxchar; uint16 toupper;
MY_UNICASE_CHARACTER **page; uint16 tolower;
uint16 sort;
} MY_UNICASE_INFO; } MY_UNICASE_INFO;
extern MY_UNICASE_INFO my_unicase_default; extern MY_UNICASE_INFO *my_unicase_default[256];
extern MY_UNICASE_INFO my_unicase_turkish; extern MY_UNICASE_INFO *my_unicase_turkish[256];
extern MY_UNICASE_INFO my_unicase_unicode520;
#define MY_UCA_MAX_CONTRACTION 4
#define MY_UCA_MAX_WEIGHT_SIZE 8
typedef struct my_contraction_t
{
my_wc_t ch[MY_UCA_MAX_CONTRACTION]; /* Character sequence
*/
uint16 weight[MY_UCA_MAX_WEIGHT_SIZE];/* Its weight string, 0-terminated
*/
} MY_CONTRACTION;
typedef struct my_contraction_list_t
{
size_t nitems; /* Number of items in the list */
MY_CONTRACTION *item; /* List of contractions */
char *flags; /* Character flags, e.g. "is contraction head") */
} MY_CONTRACTIONS;
typedef struct uca_info_st
{
my_wc_t maxchar;
uchar *lengths;
uint16 **weights;
MY_CONTRACTIONS contractions;
} MY_UCA_INFO;
my_bool my_uca_have_contractions(MY_UCA_INFO *uca);
my_bool my_uca_can_be_contraction_head(MY_UCA_INFO *uca, my_wc_t wc);
my_bool my_uca_can_be_contraction_tail(MY_UCA_INFO *uca, my_wc_t wc);
uint16 *my_uca_contraction2_weight(MY_UCA_INFO *uca, my_wc_t wc1, my_wc_t w
c2);
extern MY_UCA_INFO my_uca_v400;
typedef struct uni_ctype_st typedef struct uni_ctype_st
{ {
uchar pctype; uchar pctype;
uchar *ctype; uchar *ctype;
} MY_UNI_CTYPE; } MY_UNI_CTYPE;
extern MY_UNI_CTYPE my_uni_ctype[256]; extern MY_UNI_CTYPE my_uni_ctype[256];
/* wm_wc and wc_mb return codes */ /* wm_wc and wc_mb return codes */
skipping to change at line 137 skipping to change at line 83
#define MY_SEQ_SPACES 2 #define MY_SEQ_SPACES 2
/* My charsets_list flags */ /* My charsets_list flags */
#define MY_CS_COMPILED 1 /* compiled-in sets */ #define MY_CS_COMPILED 1 /* compiled-in sets */
#define MY_CS_CONFIG 2 /* sets that have a *.conf file */ #define MY_CS_CONFIG 2 /* sets that have a *.conf file */
#define MY_CS_INDEX 4 /* sets listed in the Index file */ #define MY_CS_INDEX 4 /* sets listed in the Index file */
#define MY_CS_LOADED 8 /* sets that are currently loaded */ #define MY_CS_LOADED 8 /* sets that are currently loaded */
#define MY_CS_BINSORT 16 /* if binary sort order */ #define MY_CS_BINSORT 16 /* if binary sort order */
#define MY_CS_PRIMARY 32 /* if primary collation */ #define MY_CS_PRIMARY 32 /* if primary collation */
#define MY_CS_STRNXFRM 64 /* if strnxfrm is used for sort */ #define MY_CS_STRNXFRM 64 /* if strnxfrm is used for sort */
#define MY_CS_UNICODE 128 /* is a charset is BMP Unicode */ #define MY_CS_UNICODE 128 /* is a charset is full unicode */
#define MY_CS_READY 256 /* if a charset is initialized */ #define MY_CS_READY 256 /* if a charset is initialized */
#define MY_CS_AVAILABLE 512 /* If either compiled-in or loaded*/ #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_HIDDEN 2048 /* don't display in SHOW */
#define MY_CS_PUREASCII 4096 /* if a charset is pure ascii */ #define MY_CS_PUREASCII 4096 /* if a charset is pure ascii */
#define MY_CS_NONASCII 8192 /* if not ASCII-compatible */ #define MY_CS_NONASCII 8192 /* if not ASCII-compatible */
#define MY_CS_UNICODE_SUPPLEMENT 16384 /* Non-BMP Unicode characters */
#define MY_CHARSET_UNDEFINED 0 #define MY_CHARSET_UNDEFINED 0
/* Character repertoire flags */ /* Character repertoire flags */
#define MY_REPERTOIRE_ASCII 1 /* Pure ASCII U+0000..U+007F */ #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_EXTENDED 2 /* Extended characters: U+0080..U+FFFF */
#define MY_REPERTOIRE_UNICODE30 3 /* ASCII | EXTENDED: U+0000..U+FFFF */ #define MY_REPERTOIRE_UNICODE30 3 /* ASCII | EXTENDED: U+0000..U+FFFF */
/* Flags for strxfrm */ /* Flags for strxfrm */
#define MY_STRXFRM_LEVEL1 0x00000001 /* for primary weights */ #define MY_STRXFRM_LEVEL1 0x00000001 /* for primary weights */
#define MY_STRXFRM_LEVEL2 0x00000002 /* for secondary weights */ #define MY_STRXFRM_LEVEL2 0x00000002 /* for secondary weights */
skipping to change at line 219 skipping to change at line 164
MY_LEX_IDENT_OR_KEYWORD, MY_LEX_IDENT_OR_KEYWORD,
MY_LEX_IDENT_OR_HEX, MY_LEX_IDENT_OR_BIN, MY_LEX_IDENT_OR_NCHAR, MY_LEX_IDENT_OR_HEX, MY_LEX_IDENT_OR_BIN, MY_LEX_IDENT_OR_NCHAR,
MY_LEX_STRING_OR_DELIMITER MY_LEX_STRING_OR_DELIMITER
}; };
struct charset_info_st; struct charset_info_st;
/* See strings/CHARSET_INFO.txt for information about this structure */ /* See strings/CHARSET_INFO.txt for information about this structure */
typedef struct my_collation_handler_st typedef struct my_collation_handler_st
{ {
my_bool (*init)(struct charset_info_st *, void *(*alloc)(size_t), my_bool (*init)(struct charset_info_st *, void *(*alloc)(size_t));
char *error, size_t errsize);
/* Collation routines */ /* Collation routines */
int (*strnncoll)(struct charset_info_st *, int (*strnncoll)(struct charset_info_st *,
const uchar *, size_t, const uchar *, size_t, my_bool ); const uchar *, size_t, const uchar *, size_t, my_bool );
int (*strnncollsp)(struct charset_info_st *, int (*strnncollsp)(struct charset_info_st *,
const uchar *, size_t, const uchar *, size_t, const uchar *, size_t, const uchar *, size_t,
my_bool diff_if_only_endspace_difference); my_bool diff_if_only_endspace_difference);
size_t (*strnxfrm)(struct charset_info_st *, size_t (*strnxfrm)(struct charset_info_st *,
uchar *dst, size_t dstlen, uint nweights, uchar *dst, size_t dstlen, uint nweights,
const uchar *src, size_t srclen, uint flags); const uchar *src, size_t srclen, uint flags);
size_t (*strnxfrmlen)(struct charset_info_st *, size_t); size_t (*strnxfrmlen)(struct charset_info_st *, size_t);
skipping to change at line 271 skipping to change at line 215
typedef int (*my_charset_conv_mb_wc)(struct charset_info_st *, my_wc_t *, typedef int (*my_charset_conv_mb_wc)(struct charset_info_st *, my_wc_t *,
const uchar *, const uchar *); const uchar *, const uchar *);
typedef int (*my_charset_conv_wc_mb)(struct charset_info_st *, my_wc_t, typedef int (*my_charset_conv_wc_mb)(struct charset_info_st *, my_wc_t,
uchar *, uchar *); uchar *, uchar *);
typedef size_t (*my_charset_conv_case)(struct charset_info_st *, typedef size_t (*my_charset_conv_case)(struct charset_info_st *,
char *, size_t, char *, size_t); char *, size_t, char *, size_t);
/* See strings/CHARSET_INFO.txt about information on this structure */ /* See strings/CHARSET_INFO.txt about information on this structure */
typedef struct my_charset_handler_st typedef struct my_charset_handler_st
{ {
my_bool (*init)(struct charset_info_st *, void *(*alloc)(size_t), my_bool (*init)(struct charset_info_st *, void *(*alloc)(size_t));
char *error, size_t errsize);
/* Multibyte routines */ /* Multibyte routines */
uint (*ismbchar)(struct charset_info_st *, const char *, const char *) ; uint (*ismbchar)(struct charset_info_st *, const char *, const char *) ;
uint (*mbcharlen)(struct charset_info_st *, uint c); uint (*mbcharlen)(struct charset_info_st *, uint c);
size_t (*numchars)(struct charset_info_st *, const char *b, const char * e); size_t (*numchars)(struct charset_info_st *, const char *b, const char * e);
size_t (*charpos)(struct charset_info_st *, const char *b, const char *e , size_t (*charpos)(struct charset_info_st *, const char *b, const char *e ,
size_t pos); size_t pos);
size_t (*well_formed_len)(struct charset_info_st *, size_t (*well_formed_len)(struct charset_info_st *,
const char *b,const char *e, const char *b,const char *e,
size_t nchars, int *error); size_t nchars, int *error);
size_t (*lengthsp)(struct charset_info_st *, const char *ptr, size_t len gth); size_t (*lengthsp)(struct charset_info_st *, const char *ptr, size_t len gth);
skipping to change at line 335 skipping to change at line 278
const char *str, size_t length, const char *str, size_t length,
int unsigned_fl, int unsigned_fl,
char **endptr, int *error); char **endptr, int *error);
size_t (*scan)(struct charset_info_st *, const char *b, const char *e, size_t (*scan)(struct charset_info_st *, const char *b, const char *e,
int sq); int sq);
} MY_CHARSET_HANDLER; } MY_CHARSET_HANDLER;
extern MY_CHARSET_HANDLER my_charset_8bit_handler; extern MY_CHARSET_HANDLER my_charset_8bit_handler;
extern MY_CHARSET_HANDLER my_charset_ucs2_handler; extern MY_CHARSET_HANDLER my_charset_ucs2_handler;
/*
We define this CHARSET_INFO_DEFINED here to prevent a repeat of the
typedef in hash.c, which will cause a compiler error.
*/
#define CHARSET_INFO_DEFINED
/* See strings/CHARSET_INFO.txt about information on this structure */ /* See strings/CHARSET_INFO.txt about information on this structure */
typedef struct charset_info_st typedef struct charset_info_st
{ {
uint number; uint number;
uint primary_number; uint primary_number;
uint binary_number; uint binary_number;
uint state; uint state;
const char *csname; const char *csname;
const char *name; const char *name;
const char *comment; const char *comment;
const char *tailoring; const char *tailoring;
uchar *ctype; uchar *ctype;
uchar *to_lower; uchar *to_lower;
uchar *to_upper; uchar *to_upper;
uchar *sort_order; uchar *sort_order;
MY_UCA_INFO *uca; uint16 *contractions;
uint16 **sort_order_big;
uint16 *tab_to_uni; uint16 *tab_to_uni;
MY_UNI_IDX *tab_from_uni; MY_UNI_IDX *tab_from_uni;
MY_UNICASE_INFO *caseinfo; MY_UNICASE_INFO **caseinfo;
uchar *state_map; uchar *state_map;
uchar *ident_map; uchar *ident_map;
uint strxfrm_multiply; uint strxfrm_multiply;
uchar caseup_multiply; uchar caseup_multiply;
uchar casedn_multiply; uchar casedn_multiply;
uint mbminlen; uint mbminlen;
uint mbmaxlen; uint mbmaxlen;
my_wc_t min_sort_char; uint16 min_sort_char;
my_wc_t max_sort_char; /* For LIKE optimization */ uint16 max_sort_char; /* For LIKE optimization */
uchar pad_char; uchar pad_char;
my_bool escape_with_backslash_is_dangerous; my_bool escape_with_backslash_is_dangerous;
uchar levels_for_compare; uchar levels_for_compare;
uchar levels_for_order; uchar levels_for_order;
MY_CHARSET_HANDLER *cset; MY_CHARSET_HANDLER *cset;
MY_COLLATION_HANDLER *coll; MY_COLLATION_HANDLER *coll;
} CHARSET_INFO; } CHARSET_INFO;
#define ILLEGAL_CHARSET_INFO_NUMBER (~0U) #define ILLEGAL_CHARSET_INFO_NUMBER (~0U)
extern MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_bin; extern MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_bin;
extern MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_latin1;
extern MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_filename;
extern CHARSET_INFO my_charset_big5_chinese_ci; extern CHARSET_INFO my_charset_big5_chinese_ci;
extern CHARSET_INFO my_charset_big5_bin; extern CHARSET_INFO my_charset_big5_bin;
extern CHARSET_INFO my_charset_cp932_japanese_ci; extern CHARSET_INFO my_charset_cp932_japanese_ci;
extern CHARSET_INFO my_charset_cp932_bin; extern CHARSET_INFO my_charset_cp932_bin;
extern CHARSET_INFO my_charset_cp1250_czech_ci; extern CHARSET_INFO my_charset_cp1250_czech_ci;
extern CHARSET_INFO my_charset_eucjpms_japanese_ci; extern CHARSET_INFO my_charset_eucjpms_japanese_ci;
extern CHARSET_INFO my_charset_eucjpms_bin; extern CHARSET_INFO my_charset_eucjpms_bin;
extern CHARSET_INFO my_charset_euckr_korean_ci; extern CHARSET_INFO my_charset_euckr_korean_ci;
extern CHARSET_INFO my_charset_euckr_bin; extern CHARSET_INFO my_charset_euckr_bin;
extern MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_filename;
extern CHARSET_INFO my_charset_gb2312_chinese_ci; extern CHARSET_INFO my_charset_gb2312_chinese_ci;
extern CHARSET_INFO my_charset_gb2312_bin; extern CHARSET_INFO my_charset_gb2312_bin;
extern CHARSET_INFO my_charset_gbk_chinese_ci; extern CHARSET_INFO my_charset_gbk_chinese_ci;
extern CHARSET_INFO my_charset_gbk_bin; extern CHARSET_INFO my_charset_gbk_bin;
extern MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_latin1;
extern CHARSET_INFO my_charset_latin1_german2_ci; extern CHARSET_INFO my_charset_latin1_german2_ci;
extern CHARSET_INFO my_charset_latin1_bin; extern CHARSET_INFO my_charset_latin1_bin;
extern CHARSET_INFO my_charset_latin2_czech_ci; extern CHARSET_INFO my_charset_latin2_czech_ci;
extern CHARSET_INFO my_charset_sjis_japanese_ci; extern CHARSET_INFO my_charset_sjis_japanese_ci;
extern CHARSET_INFO my_charset_sjis_bin; extern CHARSET_INFO my_charset_sjis_bin;
extern CHARSET_INFO my_charset_tis620_thai_ci; extern CHARSET_INFO my_charset_tis620_thai_ci;
extern CHARSET_INFO my_charset_tis620_bin; extern CHARSET_INFO my_charset_tis620_bin;
extern CHARSET_INFO my_charset_ucs2_general_ci; extern CHARSET_INFO my_charset_ucs2_general_ci;
extern CHARSET_INFO my_charset_ucs2_bin; extern CHARSET_INFO my_charset_ucs2_bin;
extern CHARSET_INFO my_charset_ucs2_unicode_ci; extern CHARSET_INFO my_charset_ucs2_unicode_ci;
extern CHARSET_INFO my_charset_ujis_japanese_ci; extern CHARSET_INFO my_charset_ujis_japanese_ci;
extern CHARSET_INFO my_charset_ujis_bin; extern CHARSET_INFO my_charset_ujis_bin;
extern CHARSET_INFO my_charset_utf16_bin; extern CHARSET_INFO my_charset_utf16_bin;
extern CHARSET_INFO my_charset_utf16_general_ci; extern CHARSET_INFO my_charset_utf16_general_ci;
extern CHARSET_INFO my_charset_utf16_unicode_ci; extern CHARSET_INFO my_charset_utf16_unicode_ci;
extern CHARSET_INFO my_charset_utf32_bin; extern CHARSET_INFO my_charset_utf32_bin;
extern CHARSET_INFO my_charset_utf32_general_ci; extern CHARSET_INFO my_charset_utf32_general_ci;
extern CHARSET_INFO my_charset_utf32_unicode_ci; extern CHARSET_INFO my_charset_utf32_unicode_ci;
extern CHARSET_INFO my_charset_utf8mb3_bin;
extern CHARSET_INFO my_charset_utf8_general_ci; extern CHARSET_INFO my_charset_utf8mb3_general_ci;
extern CHARSET_INFO my_charset_utf8_unicode_ci; extern CHARSET_INFO my_charset_utf8mb3_unicode_ci;
extern CHARSET_INFO my_charset_utf8_bin;
extern CHARSET_INFO my_charset_utf8mb4_bin; extern CHARSET_INFO my_charset_utf8mb4_bin;
extern CHARSET_INFO my_charset_utf8mb4_general_ci; extern MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_utf8mb4_general_ci;
extern CHARSET_INFO my_charset_utf8mb4_unicode_ci; extern CHARSET_INFO my_charset_utf8mb4_unicode_ci;
#define MY_UTF8MB3 "utf8"
#define MY_UTF8MB4 "utf8mb4" #define MY_UTF8MB3 "utf8mb3"
#define MY_UTF8MB4 "utf8"
#define my_charset_utf8_general_ci my_charset_utf8mb4_general_ci
#define my_charset_utf8_bin my_charset_utf8mb4_bin
/* declarations for simple charsets */ /* declarations for simple charsets */
extern size_t my_strnxfrm_simple(CHARSET_INFO *, extern size_t my_strnxfrm_simple(CHARSET_INFO *,
uchar *dst, size_t dstlen, uint nweights, uchar *dst, size_t dstlen, uint nweights,
const uchar *src, size_t srclen, uint flag s); const uchar *src, size_t srclen, uint flag s);
size_t my_strnxfrmlen_simple(CHARSET_INFO *, size_t); size_t my_strnxfrmlen_simple(CHARSET_INFO *, size_t);
extern int my_strnncoll_simple(CHARSET_INFO *, const uchar *, size_t, extern int my_strnncoll_simple(CHARSET_INFO *, const uchar *, size_t,
const uchar *, size_t, my_bool); const uchar *, size_t, my_bool);
extern int my_strnncollsp_simple(CHARSET_INFO *, const uchar *, size_t, extern int my_strnncollsp_simple(CHARSET_INFO *, const uchar *, size_t,
const uchar *, size_t, const uchar *, size_t,
my_bool diff_if_only_endspace_difference) ; my_bool diff_if_only_endspace_difference) ;
extern void my_hash_sort_simple(CHARSET_INFO *cs, extern void my_hash_sort_simple(CHARSET_INFO *cs,
const uchar *key, size_t len, const uchar *key, size_t len,
ulong *nr1, ulong *nr2); ulong *nr1, ulong *nr2);
skipping to change at line 558 skipping to change at line 497
size_t pos, int *error); size_t pos, int *error);
uint my_mbcharlen_8bit(CHARSET_INFO *, uint c); uint my_mbcharlen_8bit(CHARSET_INFO *, uint c);
/* Functions for multibyte charsets */ /* Functions for multibyte charsets */
extern size_t my_caseup_str_mb(CHARSET_INFO *, char *); extern size_t my_caseup_str_mb(CHARSET_INFO *, char *);
extern size_t my_casedn_str_mb(CHARSET_INFO *, char *); extern size_t my_casedn_str_mb(CHARSET_INFO *, char *);
extern size_t my_caseup_mb(CHARSET_INFO *, char *src, size_t srclen, extern size_t my_caseup_mb(CHARSET_INFO *, char *src, size_t srclen,
char *dst, size_t dstlen); char *dst, size_t dstlen);
extern size_t my_casedn_mb(CHARSET_INFO *, char *src, size_t srclen, extern size_t my_casedn_mb(CHARSET_INFO *, char *src, size_t srclen,
char *dst, size_t dstlen); char *dst, size_t dstlen);
extern size_t my_caseup_mb_varlen(CHARSET_INFO *, char *src, size_t srclen,
char *dst, size_t dstlen);
extern size_t my_casedn_mb_varlen(CHARSET_INFO *, char *src, size_t srclen,
char *dst, size_t dstlen);
extern size_t my_caseup_ujis(CHARSET_INFO *, char *src, size_t srclen,
char *dst, size_t dstlen);
extern size_t my_casedn_ujis(CHARSET_INFO *, char *src, size_t srclen,
char *dst, size_t dstlen);
extern int my_strcasecmp_mb(CHARSET_INFO * cs,const char *, const char *); extern int my_strcasecmp_mb(CHARSET_INFO * cs,const char *, const char *);
int my_wildcmp_mb(CHARSET_INFO *, int my_wildcmp_mb(CHARSET_INFO *,
const char *str,const char *str_end, const char *str,const char *str_end,
const char *wildstr,const char *wildend, const char *wildstr,const char *wildend,
int escape, int w_one, int w_many); int escape, int w_one, int w_many);
size_t my_numchars_mb(CHARSET_INFO *, const char *b, const char *e); size_t my_numchars_mb(CHARSET_INFO *, const char *b, const char *e);
size_t my_numcells_mb(CHARSET_INFO *, const char *b, const char *e); size_t my_numcells_mb(CHARSET_INFO *, const char *b, const char *e);
size_t my_charpos_mb(CHARSET_INFO *, const char *b, const char *e, size_t p os); size_t my_charpos_mb(CHARSET_INFO *, const char *b, const char *e, size_t p os);
size_t my_well_formed_len_mb(CHARSET_INFO *, const char *b, const char *e, size_t my_well_formed_len_mb(CHARSET_INFO *, const char *b, const char *e,
skipping to change at line 615 skipping to change at line 546
const uchar *src, size_t srclen, uint flags); const uchar *src, size_t srclen, uint flags);
size_t my_strnxfrm_unicode(CHARSET_INFO *, size_t my_strnxfrm_unicode(CHARSET_INFO *,
uchar *dst, size_t dstlen, uint nweights, uchar *dst, size_t dstlen, uint nweights,
const uchar *src, size_t srclen, uint flags); const uchar *src, size_t srclen, uint flags);
int my_wildcmp_unicode(CHARSET_INFO *cs, int my_wildcmp_unicode(CHARSET_INFO *cs,
const char *str, const char *str_end, const char *str, const char *str_end,
const char *wildstr, const char *wildend, const char *wildstr, const char *wildend,
int escape, int w_one, int w_many, int escape, int w_one, int w_many,
MY_UNICASE_INFO *weights); MY_UNICASE_INFO **weights);
extern my_bool my_parse_charset_xml(const char *bug, size_t len, extern my_bool my_parse_charset_xml(const char *bug, size_t len,
int (*add)(CHARSET_INFO *cs), int (*add)(CHARSET_INFO *cs));
char *error, size_t errsize);
extern char *my_strchr(CHARSET_INFO *cs, const char *str, const char *end, extern char *my_strchr(CHARSET_INFO *cs, const char *str, const char *end,
pchar c); pchar c);
my_bool my_propagate_simple(CHARSET_INFO *cs, const uchar *str, size_t len) ; 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 ); 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); 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_ascii_based(CHARSET_INFO *cs);
my_bool my_charset_is_8bit_pure_ascii(CHARSET_INFO *cs); my_bool my_charset_is_8bit_pure_ascii(CHARSET_INFO *cs);
uint my_charset_repertoire(CHARSET_INFO *cs); uint my_charset_repertoire(CHARSET_INFO *cs);
uint my_strxfrm_flag_normalize(uint flags, uint nlevels); uint my_strxfrm_flag_normalize(uint flags, uint nlevels);
void my_strxfrm_desc_and_reverse(uchar *str, uchar *strend, void my_strxfrm_desc_and_reverse(uchar *str, uchar *strend,
uint flags, uint level); uint flags, uint level);
size_t my_strxfrm_pad_desc_and_reverse(CHARSET_INFO *cs, size_t my_strxfrm_pad_desc_and_reverse(CHARSET_INFO *cs,
uchar *str, uchar *frmend, uchar *st rend, uchar *str, uchar *frmend, uchar *st rend,
uint nweights, uint flags, uint leve l); uint nweights, uint flags, uint leve l);
my_bool my_charset_is_ascii_compatible(CHARSET_INFO *cs); my_bool my_charset_is_ascii_compatible(CHARSET_INFO *cs);
extern size_t my_vsnprintf_ex(CHARSET_INFO *cs, char *to, size_t n,
const char* fmt, va_list ap);
#define _MY_U 01 /* Upper case */ #define _MY_U 01 /* Upper case */
#define _MY_L 02 /* Lower case */ #define _MY_L 02 /* Lower case */
#define _MY_NMR 04 /* Numeral (digit) */ #define _MY_NMR 04 /* Numeral (digit) */
#define _MY_SPC 010 /* Spacing character */ #define _MY_SPC 010 /* Spacing character */
#define _MY_PNT 020 /* Punctuation */ #define _MY_PNT 020 /* Punctuation */
#define _MY_CTR 040 /* Control character */ #define _MY_CTR 040 /* Control character */
#define _MY_B 0100 /* Blank */ #define _MY_B 0100 /* Blank */
#define _MY_X 0200 /* heXadecimal digit */ #define _MY_X 0200 /* heXadecimal digit */
#define my_isascii(c) (!((c) & ~0177)) #define my_isascii(c) (!((c) & ~0177))
 End of changes. 24 change blocks. 
104 lines changed or deleted 28 lines changed or added


 m_string.h   m_string.h 
skipping to change at line 23 skipping to change at line 23
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A */ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A */
/* There may be prolems include all of theese. Try to test in /* There may be prolems include all of theese. Try to test in
configure with ones are needed? */ configure with ones are needed? */
/* This is needed for the definitions of strchr... on solaris */ /* This is needed for the definitions of strchr... on solaris */
#ifndef _m_string_h #ifndef _m_string_h
#define _m_string_h #define _m_string_h
#include "my_global.h" /* HAVE_* */
#ifndef __USE_GNU #ifndef __USE_GNU
#define __USE_GNU /* We want to use stpcpy */ #define __USE_GNU /* We want to use stpcpy */
#endif #endif
#if defined(HAVE_STRINGS_H) #if defined(HAVE_STRINGS_H)
#include <strings.h> #include <strings.h>
#endif #endif
#if defined(HAVE_STRING_H) #if defined(HAVE_STRING_H)
#include <string.h> #include <string.h>
#endif #endif
/* need by my_vsnprintf */ /* need by my_vsnprintf */
#include <stdarg.h> #include <stdarg.h>
#ifdef _AIX
#undef HAVE_BCMP
#endif
/* This is needed for the definitions of bzero... on solaris */ /* This is needed for the definitions of bzero... on solaris */
#if defined(HAVE_STRINGS_H) #if defined(HAVE_STRINGS_H)
#include <strings.h> #include <strings.h>
#endif #endif
/* This is needed for the definitions of memcpy... on solaris */ /* This is needed for the definitions of memcpy... on solaris */
#if defined(HAVE_MEMORY_H) && !defined(__cplusplus) #if defined(HAVE_MEMORY_H) && !defined(__cplusplus)
#include <memory.h> #include <memory.h>
#endif #endif
skipping to change at line 62 skipping to change at line 63
# define memmove(d, s, n) bmove ((d), (s), (n)) # define memmove(d, s, n) bmove ((d), (s), (n))
#elif defined(HAVE_MEMMOVE) #elif defined(HAVE_MEMMOVE)
# define bmove(d, s, n) memmove((d), (s), (n)) # define bmove(d, s, n) memmove((d), (s), (n))
#else #else
# define memmove(d, s, n) bmove((d), (s), (n)) /* our bmove */ # define memmove(d, s, n) bmove((d), (s), (n)) /* our bmove */
#endif #endif
/* Unixware 7 */ /* Unixware 7 */
#if !defined(HAVE_BFILL) #if !defined(HAVE_BFILL)
# define bfill(A,B,C) memset((A),(C),(B)) # define bfill(A,B,C) memset((A),(C),(B))
# define bmove_align(A,B,C) memcpy((A),(B),(C))
#endif #endif
#if !defined(bzero) && !defined(HAVE_BZERO) #if !defined(HAVE_BCMP)
# define bzero(A,B) memset((A),0,(B)) # define bcopy(s, d, n) memcpy((d), (s), (n))
# define bcmp(A,B,C) memcmp((A),(B),(C))
# define bzero(A,B) memset((A),0,(B))
# define bmove_align(A,B,C) memcpy((A),(B),(C))
#endif #endif
#if defined(__cplusplus) #if defined(__cplusplus)
extern "C" { extern "C" {
#endif #endif
/* /*
my_str_malloc() and my_str_free() are assigned to implementations in my_str_malloc() and my_str_free() are assigned to implementations in
strings/alloc.c, but can be overridden in the calling program. strings/alloc.c, but can be overridden in the calling program.
*/ */
skipping to change at line 87 skipping to change at line 92
extern void (*my_str_free)(void *); extern void (*my_str_free)(void *);
#if defined(HAVE_STPCPY) #if defined(HAVE_STPCPY)
#define strmov(A,B) stpcpy((A),(B)) #define strmov(A,B) stpcpy((A),(B))
#ifndef stpcpy #ifndef stpcpy
extern char *stpcpy(char *, const char *); /* For AIX with gcc 2.95.3 * / extern char *stpcpy(char *, const char *); /* For AIX with gcc 2.95.3 * /
#endif #endif
#endif #endif
/* Declared in int2str() */ /* Declared in int2str() */
extern char _dig_vec_upper[]; extern char NEAR _dig_vec_upper[];
extern char _dig_vec_lower[]; extern char NEAR _dig_vec_lower[];
#ifndef strmov #ifdef BAD_STRING_COMPILER
#define strmov(A,B) (memccpy(A,B,0,INT_MAX)-1)
#else
#define strmov_overlapp(A,B) strmov(A,B) #define strmov_overlapp(A,B) strmov(A,B)
#define strmake_overlapp(A,B,C) strmake(A,B,C) #define strmake_overlapp(A,B,C) strmake(A,B,C)
#endif #endif
#ifdef BAD_MEMCPY /* Problem with gcc on Alpha */
#define memcpy_fixed(A,B,C) bmove((A),(B),(C))
#else
#define memcpy_fixed(A,B,C) memcpy((A),(B),(C))
#endif
#if (!defined(USE_BMOVE512) || defined(HAVE_purify)) && !defined(bmove512)
#define bmove512(A,B,C) memcpy(A,B,C)
#endif
/* Prototypes for string functions */ /* Prototypes for string functions */
#if !defined(bfill) && !defined(HAVE_BFILL) #if !defined(bfill) && !defined(HAVE_BFILL)
extern void bfill(uchar *dst,size_t len,pchar fill); extern void bfill(uchar *dst,size_t len,pchar fill);
#endif #endif
#if !defined(bzero) && !defined(HAVE_BZERO)
extern void bzero(uchar * dst,size_t len);
#endif
#if !defined(bcmp) && !defined(HAVE_BCMP)
extern size_t bcmp(const uchar *s1,const uchar *s2,size_t len);
#endif
#ifdef HAVE_purify
extern size_t my_bcmp(const uchar *s1,const uchar *s2,size_t len);
#undef bcmp
#define bcmp(A,B,C) my_bcmp((A),(B),(C))
#define bzero_if_purify(A,B) bzero(A,B)
#else
#define bzero_if_purify(A,B)
#endif /* HAVE_purify */
#if defined(_lint) || defined(FORCE_INIT_OF_VARS)
#define LINT_INIT_STRUCT(var) bzero(&var, sizeof(var)) /* No uninitialize-w
arning */
#else
#define LINT_INIT_STRUCT(var)
#endif
#ifndef bmove512
extern void bmove512(uchar *dst,const uchar *src,size_t len);
#endif
#if !defined(HAVE_BMOVE) && !defined(bmove) #if !defined(HAVE_BMOVE) && !defined(bmove)
extern void bmove(uuchar *dst, const uchar *src,size_t len); extern void bmove(uuchar *dst, const uchar *src,size_t len);
#endif #endif
extern void bmove_upp(uchar *dst,const uchar *src,size_t len); extern void bmove_upp(uchar *dst,const uchar *src,size_t len);
extern void bchange(uchar *dst,size_t old_len,const uchar *src, extern void bchange(uchar *dst,size_t old_len,const uchar *src,
size_t new_len,size_t tot_len); size_t new_len,size_t tot_len);
extern void strappend(char *s,size_t len,pchar fill); extern void strappend(char *s,size_t len,pchar fill);
extern char *strend(const char *s); extern char *strend(const char *s);
extern char *strcend(const char *, pchar); extern char *strcend(const char *, pchar);
extern char *strfield(char *src,int fields,int chars,int blanks,
int tabch);
extern char *strfill(char * s,size_t len,pchar fill); extern char *strfill(char * s,size_t len,pchar fill);
extern size_t strinstr(const char *str,const char *search);
extern size_t r_strinstr(const char *str, size_t from, const char *search)
;
extern char *strkey(char *dst,char *head,char *tail,char *flags);
extern char *strmake(char *dst,const char *src,size_t length); extern char *strmake(char *dst,const char *src,size_t length);
#ifndef strmake_overlapp
extern char *strmake_overlapp(char *dst,const char *src, size_t length);
#endif
#ifndef strmov #ifndef strmov
extern char *strmov(char *dst,const char *src); extern char *strmov(char *dst,const char *src);
#else
extern char *strmov_overlapp(char *dst,const char *src);
#endif #endif
extern char *strnmov(char *dst, const char *src, size_t n); extern char *strnmov(char *dst,const char *src,size_t n);
extern char *strcont(const char *src, const char *set); extern char *strsuff(const char *src,const char *suffix);
extern char *strxmov(char *dst, const char *src, ...); extern char *strcont(const char *src,const char *set);
extern char *strxnmov(char *dst, size_t len, const char *src, ...); extern char *strxcat _VARARGS((char *dst,const char *src, ...));
extern char *strxmov _VARARGS((char *dst,const char *src, ...));
extern char *strxcpy _VARARGS((char *dst,const char *src, ...));
extern char *strxncat _VARARGS((char *dst,size_t len, const char *src, ...)
);
extern char *strxnmov _VARARGS((char *dst,size_t len, const char *src, ...)
);
extern char *strxncpy _VARARGS((char *dst,size_t len, const char *src, ...)
);
/* Prototypes of normal stringfunctions (with may ours) */ /* Prototypes of normal stringfunctions (with may ours) */
#ifdef WANT_STRING_PROTOTYPES
extern char *strcat(char *, const char *);
extern char *strchr(const char *, pchar);
extern char *strrchr(const char *, pchar);
extern char *strcpy(char *, const char *);
extern int strcmp(const char *, const char *);
#ifndef __GNUC__
extern size_t strlen(const char *);
#endif
#endif
#ifndef HAVE_STRNLEN #ifndef HAVE_STRNLEN
extern size_t strnlen(const char *s, size_t n); extern size_t strnlen(const char *s, size_t n);
#endif #endif
#if !defined(__cplusplus) #if !defined(__cplusplus)
#ifndef HAVE_STRPBRK
extern char *strpbrk(const char *, const char *);
#endif
#ifndef HAVE_STRSTR #ifndef HAVE_STRSTR
extern char *strstr(const char *, const char *); extern char *strstr(const char *, const char *);
#endif #endif
#endif #endif
extern int is_prefix(const char *, const char *); extern int is_prefix(const char *, const char *);
/* Conversion routines */ /* Conversion routines */
typedef enum { typedef enum {
MY_GCVT_ARG_FLOAT, MY_GCVT_ARG_FLOAT,
MY_GCVT_ARG_DOUBLE MY_GCVT_ARG_DOUBLE
skipping to change at line 172 skipping to change at line 240
it to be integer and be <= 10^DBL_DIG for the 'f' format to be used. it to be integer and be <= 10^DBL_DIG for the 'f' format to be used.
We don't lose precision, but make cases like "1e200" or "0.00001" look ni cer. We don't lose precision, but make cases like "1e200" or "0.00001" look ni cer.
*/ */
#define MAX_DECPT_FOR_F_FORMAT DBL_DIG #define MAX_DECPT_FOR_F_FORMAT DBL_DIG
/* /*
The maximum possible field width for my_gcvt() conversion. The maximum possible field width for my_gcvt() conversion.
(DBL_DIG + 2) significant digits + sign + "." + ("e-NNN" or (DBL_DIG + 2) significant digits + sign + "." + ("e-NNN" or
MAX_DECPT_FOR_F_FORMAT zeros for cases when |x|<1 and the 'f' format is u sed). MAX_DECPT_FOR_F_FORMAT zeros for cases when |x|<1 and the 'f' format is u sed).
*/ */
#define MY_GCVT_MAX_FIELD_WIDTH (DBL_DIG + 4 + max(5, MAX_DECPT_FOR_F_FORMA T)) \ #define MY_GCVT_MAX_FIELD_WIDTH (DBL_DIG + 4 + max(5, MAX_DECPT_FOR_F_FORMA T))
extern char *llstr(longlong value,char *buff); extern char *llstr(longlong value,char *buff);
extern char *ullstr(longlong value,char *buff); extern char *ullstr(longlong value,char *buff);
#ifndef HAVE_STRTOUL #ifndef HAVE_STRTOUL
extern long strtol(const char *str, char **ptr, int base); extern long strtol(const char *str, char **ptr, int base);
extern ulong strtoul(const char *str, char **ptr, int base); extern ulong strtoul(const char *str, char **ptr, int base);
#endif #endif
extern char *int2str(long val, char *dst, int radix, int upcase); extern char *int2str(long val, char *dst, int radix, int upcase);
extern char *int10_to_str(long val,char *dst,int radix); extern char *int10_to_str(long val,char *dst,int radix);
extern char *str2int(const char *src,int radix,long lower,long upper, extern char *str2int(const char *src,int radix,long lower,long upper,
long *val); long *val);
longlong my_strtoll10(const char *nptr, char **endptr, int *error); longlong my_strtoll10(const char *nptr, char **endptr, int *error);
#if SIZEOF_LONG == SIZEOF_LONG_LONG #if SIZEOF_LONG == SIZEOF_LONG_LONG
#define ll2str(A,B,C,D) int2str((A),(B),(C),(D)) #define ll2str(A,B,C,D) int2str((A),(B),(C),(D))
#define longlong2str(A,B,C) int2str((A),(B),(C),1)
#define longlong10_to_str(A,B,C) int10_to_str((A),(B),(C)) #define longlong10_to_str(A,B,C) int10_to_str((A),(B),(C))
#undef strtoll #undef strtoll
#define strtoll(A,B,C) strtol((A),(B),(C)) #define strtoll(A,B,C) strtol((A),(B),(C))
#define strtoull(A,B,C) strtoul((A),(B),(C)) #define strtoull(A,B,C) strtoul((A),(B),(C))
#ifndef HAVE_STRTOULL #ifndef HAVE_STRTOULL
#define HAVE_STRTOULL #define HAVE_STRTOULL
#endif #endif
#ifndef HAVE_STRTOLL #ifndef HAVE_STRTOLL
#define HAVE_STRTOLL #define HAVE_STRTOLL
#endif #endif
#else #else
#ifdef HAVE_LONG_LONG #ifdef HAVE_LONG_LONG
extern char *ll2str(longlong val,char *dst,int radix, int upcase); extern char *ll2str(longlong val,char *dst,int radix, int upcase);
#define longlong2str(A,B,C) ll2str((A),(B),(C),1)
extern char *longlong10_to_str(longlong val,char *dst,int radix); extern char *longlong10_to_str(longlong val,char *dst,int radix);
#if (!defined(HAVE_STRTOULL) || defined(NO_STRTOLL_PROTO)) #if (!defined(HAVE_STRTOULL) || defined(NO_STRTOLL_PROTO))
extern longlong strtoll(const char *str, char **ptr, int base); extern longlong strtoll(const char *str, char **ptr, int base);
extern ulonglong strtoull(const char *str, char **ptr, int base); extern ulonglong strtoull(const char *str, char **ptr, int base);
#endif #endif
#endif #endif
#endif #endif
#define longlong2str(A,B,C) ll2str((A),(B),(C),1)
/* my_vsnprintf.c */
extern size_t my_vsnprintf(char *str, size_t n,
const char *format, va_list ap);
extern size_t my_snprintf(char *to, size_t n, const char *fmt, ...)
ATTRIBUTE_FORMAT(printf, 3, 4);
#if defined(__cplusplus) #if defined(__cplusplus)
} }
#endif #endif
/* /*
LEX_STRING -- a pair of a C-string and its length. LEX_STRING -- a pair of a C-string and its length.
(it's part of the plugin API as a MYSQL_LEX_STRING)
*/ */
#include <mysql/plugin.h> #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;
};
#endif
typedef struct st_mysql_lex_string LEX_STRING; typedef struct st_mysql_lex_string LEX_STRING;
#define STRING_WITH_LEN(X) (X), ((size_t) (sizeof(X) - 1)) #define STRING_WITH_LEN(X) (X), ((size_t) (sizeof(X) - 1))
#define USTRING_WITH_LEN(X) ((uchar*) X), ((size_t) (sizeof(X) - 1)) #define USTRING_WITH_LEN(X) ((uchar*) X), ((size_t) (sizeof(X) - 1))
#define C_STRING_WITH_LEN(X) ((char *) (X)), ((size_t) (sizeof(X) - 1)) #define C_STRING_WITH_LEN(X) ((char *) (X)), ((size_t) (sizeof(X) - 1))
/* A variant with const */
struct st_mysql_const_lex_string struct st_mysql_const_lex_string
{ {
const char *str; const char *str;
size_t length; size_t length;
}; };
typedef struct st_mysql_const_lex_string LEX_CSTRING; typedef struct st_mysql_const_lex_string LEX_CSTRING;
/* A variant with const and unsigned */
struct st_mysql_const_unsigned_lex_string
{
const uchar *str;
size_t length;
};
typedef struct st_mysql_const_unsigned_lex_string LEX_CUSTRING;
/* SPACE_INT is a word that contains only spaces */ /* SPACE_INT is a word that contains only spaces */
#if SIZEOF_INT == 4 #if SIZEOF_INT == 4
#define SPACE_INT 0x20202020 #define SPACE_INT 0x20202020
#elif SIZEOF_INT == 8 #elif SIZEOF_INT == 8
#define SPACE_INT 0x2020202020202020 #define SPACE_INT 0x2020202020202020
#else #else
#error define the appropriate constant for a word full of spaces #error define the appropriate constant for a word full of spaces
#endif #endif
/** /**
skipping to change at line 302 skipping to change at line 393
if (end[-1] == 0x20 && start_words < end_words) if (end[-1] == 0x20 && start_words < end_words)
while (end > start_words && ((unsigned *)end)[-1] == SPACE_INT) while (end > start_words && ((unsigned *)end)[-1] == SPACE_INT)
end -= SIZEOF_INT; end -= SIZEOF_INT;
} }
} }
while (end > ptr && end[-1] == 0x20) while (end > ptr && end[-1] == 0x20)
end--; end--;
return (end); return (end);
} }
static inline void lex_string_set(LEX_STRING *lex_str, const char *c_str) #ifdef SAFEMALLOC
{ #define TRASH(A,B) bfill(A, B, 0x8F)
lex_str->str= (char *) c_str; #else
lex_str->length= strlen(c_str); #define TRASH(A,B) /* nothing */
} #endif /* SAFEMALLOC */
#endif #endif /* _m_string_h */
 End of changes. 25 change blocks. 
23 lines changed or deleted 119 lines changed or added


 my_alloc.h   my_alloc.h 
skipping to change at line 26 skipping to change at line 26
/* /*
Data structures for mysys/my_alloc.c (root memory allocator) Data structures for mysys/my_alloc.c (root memory allocator)
*/ */
#ifndef _my_alloc_h #ifndef _my_alloc_h
#define _my_alloc_h #define _my_alloc_h
#define ALLOC_MAX_BLOCK_TO_DROP 4096 #define ALLOC_MAX_BLOCK_TO_DROP 4096
#define ALLOC_MAX_BLOCK_USAGE_BEFORE_DROP 10 #define ALLOC_MAX_BLOCK_USAGE_BEFORE_DROP 10
#ifdef __cplusplus
extern "C" {
#endif
typedef struct st_used_mem typedef struct st_used_mem
{ /* struct for once_alloc (block) */ { /* struct for once_alloc (block) */
struct st_used_mem *next; /* Next block in use */ struct st_used_mem *next; /* Next block in use */
unsigned int left; /* memory left in block */ size_t left; /* memory left in block */
unsigned int size; /* size of block */ size_t size; /* size of block */
} USED_MEM; } USED_MEM;
typedef struct st_mem_root typedef struct st_mem_root
{ {
USED_MEM *free; /* blocks with free memory in it */ USED_MEM *free; /* blocks with free memory in it */
USED_MEM *used; /* blocks almost without free memory */ USED_MEM *used; /* blocks almost without free memory */
USED_MEM *pre_alloc; /* preallocated block */ USED_MEM *pre_alloc; /* preallocated block */
/* if block have less memory it will be put in 'used' list */ /* if block have less memory it will be put in 'used' list */
size_t min_malloc; size_t min_malloc;
size_t block_size; /* initial block size */ size_t block_size; /* initial block size */
unsigned int block_num; /* allocated blocks counter */ unsigned int block_num; /* allocated blocks counter */
/* /*
first free block in queue test counter (if it exceed first free block in queue test counter (if it exceed
MAX_BLOCK_USAGE_BEFORE_DROP block will be dropped in 'used' list) MAX_BLOCK_USAGE_BEFORE_DROP block will be dropped in 'used' list)
*/ */
unsigned int first_block_usage; unsigned int first_block_usage;
void (*error_handler)(void); void (*error_handler)(void);
} MEM_ROOT; } MEM_ROOT;
#ifdef __cplusplus
}
#endif
#endif #endif
 End of changes. 3 change blocks. 
11 lines changed or deleted 2 lines changed or added


 my_attribute.h   my_attribute.h 
skipping to change at line 24 skipping to change at line 24
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A */ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A */
/* /*
Helper macros used for setting different __attributes__ Helper macros used for setting different __attributes__
on functions in a portable fashion on functions in a portable fashion
*/ */
#ifndef _my_attribute_h #ifndef _my_attribute_h
#define _my_attribute_h #define _my_attribute_h
#if defined(__GNUC__)
# ifndef GCC_VERSION
# define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
# endif
#endif
/* /*
Disable __attribute__() on gcc < 2.7, g++ < 3.4, and non-gcc compilers. Disable __attribute__() on gcc < 2.7, g++ < 3.4, and non-gcc compilers.
Some forms of __attribute__ are actually supported in earlier versions of Some forms of __attribute__ are actually supported in earlier versions of
g++, but we just disable them all because we only use them to generate g++, but we just disable them all because we only use them to generate
compilation warnings. compilation warnings.
*/ */
#ifndef __attribute__ #ifndef __attribute__
# if !defined(__GNUC__) # if !defined(__GNUC__)
# define __attribute__(A) # define __attribute__(A)
# elif GCC_VERSION < 2008 # elif GCC_VERSION < 2008
 End of changes. 1 change blocks. 
6 lines changed or deleted 0 lines changed or added


 my_config.h   my_config.h 
/* Copyright (C) 2009 Sun Microsystems, Inc /* include/config.h. Generated from config.h.in by configure. */
/* include/config.h.in. Generated from configure.in by autoheader. */
This program is free software; you can redistribute it and/or modify /* Define if building universal (internal helper macro) */
it under the terms of the GNU General Public License as published by /* #undef AC_APPLE_UNIVERSAL_BUILD */
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef MY_CONFIG_H /* Support big tables */
#define MY_CONFIG_H /* #undef BIG_TABLES */
/* Whether features provided by the user community should be included */
/* #undef COMMUNITY_SERVER */
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
systems. This function is required for `alloca.c' support on those syste
ms.
*/
/* #undef CRAY_STACKSEG_END */
/* Define to 1 if using `alloca.c'. */
/* #undef C_ALLOCA */
/* Don't use libdbug */
#define DBUG_OFF 1
/* Use libdbug */
/* #undef DBUG_ON */
/* all charsets are available */
/* #undef DEFINE_ALL_CHARACTER_SETS */
/* Disables the use of --init-file, --skip-grant-tables and --bootstrap
options */
/* #undef DISABLE_GRANT_OPTIONS */
/* Define if clock_gettime is available in libc */
/* #undef DNS_USE_CPU_CLOCK_FOR_ID */
/* Define is no secure id variant is available */
/* #undef DNS_USE_GETTIMEOFDAY_FOR_ID */
/* Version of .frm files */
#define DOT_FRM_VERSION 6 #define DOT_FRM_VERSION 6
/* Headers we may want to use. */
#define STDC_HEADERS 1
#define _GNU_SOURCE 1
#define HAVE_ALLOCA_H 1
#define HAVE_AIO_H 1
#define HAVE_ARPA_INET_H 1
#define HAVE_ASM_MSR_H 1
#define HAVE_ASM_TERMBITS_H 1
#define HAVE_BSEARCH 1
#define HAVE_CRYPT_H 1
#define HAVE_CURSES_H 1
/* #undef HAVE_CXXABI_H */
/* #undef HAVE_NCURSES_H */
/* #undef HAVE_NDIR_H */
#define HAVE_DIRENT_H 1
#define HAVE_DLFCN_H 1
#define HAVE_EXECINFO_H 1
#define HAVE_FCNTL_H 1
#define HAVE_FENV_H 1
#define HAVE_FLOAT_H 1
/* #undef HAVE_FLOATINGPOINT_H */
#define HAVE_FNMATCH_H 1
#define HAVE_FPU_CONTROL_H 1
#define HAVE_GRP_H 1
#define HAVE_EXPLICIT_TEMPLATE_INSTANTIATION 1
/* #undef HAVE_IA64INTRIN_H */
/* #undef HAVE_IEEEFP_H */
#define HAVE_INTTYPES_H 1
#define HAVE_LIMITS_H 1
#define HAVE_LOCALE_H 1
#define HAVE_MALLOC_H 1
#define HAVE_MEMORY_H 1
#define HAVE_NETINET_IN_H 1
#define HAVE_PATHS_H 1
#define HAVE_POLL_H 1
/* #undef HAVE_PORT_H */
#define HAVE_PWD_H 1
#define HAVE_SCHED_H 1
/* #undef HAVE_SELECT_H */
/* #undef HAVE_SOLARIS_LARGE_PAGES */
#define HAVE_STDDEF_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STDARG_H 1
#define HAVE_STRINGS_H 1
#define HAVE_STRING_H 1
#define HAVE_STDINT_H 1
#define HAVE_SEMAPHORE_H 1
/* #undef HAVE_SYNCH_H */
/* #undef HAVE_SYSENT_H */
#define HAVE_SYS_DIR_H 1
#define HAVE_SYS_CDEFS_H 1
#define HAVE_SYS_FILE_H 1
/* #undef HAVE_SYS_FPU_H */
#define HAVE_SYS_IOCTL_H 1
#define HAVE_SYS_IPC_H 1
/* #undef HAVE_SYS_MALLOC_H */
#define HAVE_SYS_MMAN_H 1
/* #undef HAVE_SYS_NDIR_H */
/* #undef HAVE_SYS_PTE_H */
/* #undef HAVE_SYS_PTEM_H */
#define HAVE_SYS_PRCTL_H 1
#define HAVE_SYS_RESOURCE_H 1
#define HAVE_SYS_SELECT_H 1
#define HAVE_SYS_SHM_H 1
#define HAVE_SYS_SOCKET_H 1
#define HAVE_SYS_STAT_H 1
/* #undef HAVE_SYS_STREAM_H */
/* #undef HAVE_SYS_TERMCAP_H */
#define HAVE_SYS_TIMEB_H 1
#define HAVE_SYS_TIMES_H 1
#define HAVE_SYS_TIME_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_UN_H 1
/* #undef HAVE_SYS_VADVISE_H */
#define HAVE_TERM_H 1
/* #undef HAVE_TERMBITS_H */
#define HAVE_TERMIOS_H 1
#define HAVE_TERMIO_H 1
#define HAVE_TERMCAP_H 1
#define HAVE_TIME_H 1
#define HAVE_UNISTD_H 1
#define HAVE_UTIME_H 1
/* #undef HAVE_VARARGS_H */
/* #undef HAVE_VIS_H */
/* #undef HAVE_SYS_UTIME_H */
#define HAVE_SYS_WAIT_H 1
#define HAVE_SYS_PARAM_H 1
/* Libraries */ /* If Debug Sync Facility should be enabled */
/* #undef HAVE_LIBPTHREAD */ /* #undef ENABLED_DEBUG_SYNC */
#define HAVE_LIBM 1
#define HAVE_LIBDL 1
#define HAVE_LIBRT 1
/* #undef HAVE_LIBSOCKET */
/* #undef HAVE_LIBNSL */
#define HAVE_LIBCRYPT 1
/* #undef HAVE_LIBMTMALLOC */
/* #undef HAVE_LIBWRAP */
/* Does "struct timespec" have a "sec" and "nsec" field? */
/* #undef HAVE_TIMESPEC_TS_SEC */
/* Readline */ /* If LOAD DATA LOCAL INFILE should be enabled by default */
#define HAVE_HIST_ENTRY 1 /* #undef ENABLED_LOCAL_INFILE */
#define USE_LIBEDIT_INTERFACE 1
/* #undef USE_NEW_READLINE_INTERFACE */
/* If SHOW PROFILE should be enabled */
#define ENABLED_PROFILING 1
/* Enable error injection in MySQL Server */
/* #undef ERROR_INJECT_SUPPORT */
/* Do we have FIONREAD */
#define FIONREAD_IN_SYS_IOCTL 1 #define FIONREAD_IN_SYS_IOCTL 1
/* READLINE: your system defines TIOCGWINSZ in sys/ioctl.h. */
#define GWINSZ_IN_SYS_IOCTL 1 #define GWINSZ_IN_SYS_IOCTL 1
/* #undef TIOCSTAT_IN_SYS_IOCTL */
/* Functions we may want to use. */ /* Define to 1 if you have the `abi::__cxa_demangle' function. */
/* #undef HAVE_AIOWAIT */ #define HAVE_ABI_CXA_DEMANGLE 1
/* Define to 1 if you have the <aio.h> header file. */
#define HAVE_AIO_H 1
/* Define to 1 if you have the `alarm' function. */
#define HAVE_ALARM 1 #define HAVE_ALARM 1
/* Define to 1 if you have `alloca', as a function or macro. */
#define HAVE_ALLOCA 1 #define HAVE_ALLOCA 1
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix)
.
*/
#define HAVE_ALLOCA_H 1
/* Define to 1 if you have the <arpa/inet.h> header file. */
#define HAVE_ARPA_INET_H 1
/* Define to 1 if you have the <asm/termbits.h> header file. */
#define HAVE_ASM_TERMBITS_H 1
/* Define to 1 if you have the `backtrace' function. */
#define HAVE_BACKTRACE 1
/* Define to 1 if you have the `backtrace_symbols' function. */
#define HAVE_BACKTRACE_SYMBOLS 1
/* Define to 1 if you have the `backtrace_symbols_fd' function. */
#define HAVE_BACKTRACE_SYMBOLS_FD 1
/* Define to 1 if you have the `bcmp' function. */
#define HAVE_BCMP 1
/* Define to 1 if you have the `bfill' function. */
/* #undef HAVE_BFILL */ /* #undef HAVE_BFILL */
/* Define to 1 if you have the `bmove' function. */
/* #undef HAVE_BMOVE */ /* #undef HAVE_BMOVE */
/* bool is not defined by all C++ compilators */
#define HAVE_BOOL 1
/* Can netinet be included */
/* #undef HAVE_BROKEN_NETINET_INCLUDES */
/* BSD style signals */
/* #undef HAVE_BSD_SIGNALS */
/* Define to 1 if you have the `bsearch' function. */
#define HAVE_BSEARCH 1
/* Define to 1 if compiler defines __bss_start. */
#define HAVE_BSS_START 1
/* Define to 1 if you have the `bzero' function. */
#define HAVE_BZERO 1 #define HAVE_BZERO 1
#define HAVE_INDEX 1
#define HAVE_CHOWN 1 /* Define to enable charset armscii8 */
/* #undef HAVE_CHARSET_armscii8 */
/* Define to enable ascii character set */
/* #undef HAVE_CHARSET_ascii */
/* Define to enable charset big5 */
/* #undef HAVE_CHARSET_big5 */
/* Define to enable cp1250 */
/* #undef HAVE_CHARSET_cp1250 */
/* Define to enable charset cp1251 */
/* #undef HAVE_CHARSET_cp1251 */
/* Define to enable charset cp1256 */
/* #undef HAVE_CHARSET_cp1256 */
/* Define to enable charset cp1257 */
/* #undef HAVE_CHARSET_cp1257 */
/* Define to enable charset cp850 */
/* #undef HAVE_CHARSET_cp850 */
/* Define to enable charset cp852 */
/* #undef HAVE_CHARSET_cp852 */
/* Define to enable charset cp866 */
/* #undef HAVE_CHARSET_cp866 */
/* Define to enable charset cp932 */
/* #undef HAVE_CHARSET_cp932 */
/* Define to enable charset dec8 */
/* #undef HAVE_CHARSET_dec8 */
/* Define to enable charset eucjpms */
/* #undef HAVE_CHARSET_eucjpms */
/* Define to enable charset euckr */
/* #undef HAVE_CHARSET_euckr */
/* Define to enable charset gb2312 */
/* #undef HAVE_CHARSET_gb2312 */
/* Define to enable charset gbk */
/* #undef HAVE_CHARSET_gbk */
/* Define to enable charset geostd8 */
/* #undef HAVE_CHARSET_geostd8 */
/* Define to enable charset greek */
/* #undef HAVE_CHARSET_greek */
/* Define to enable charset hebrew */
/* #undef HAVE_CHARSET_hebrew */
/* Define to enable charset hp8 */
/* #undef HAVE_CHARSET_hp8 */
/* Define to enable charset keybcs2 */
/* #undef HAVE_CHARSET_keybcs2 */
/* Define to enable charset koi8r */
/* #undef HAVE_CHARSET_koi8r */
/* Define to enable charset koi8u */
/* #undef HAVE_CHARSET_koi8u */
/* Define to enable charset latin1 */
#define HAVE_CHARSET_latin1 1
/* Define to enable charset latin2 */
/* #undef HAVE_CHARSET_latin2 */
/* Define to enable charset latin5 */
/* #undef HAVE_CHARSET_latin5 */
/* Define to enable charset latin7 */
/* #undef HAVE_CHARSET_latin7 */
/* Define to enable charset macce */
/* #undef HAVE_CHARSET_macce */
/* Define to enable charset macroman */
/* #undef HAVE_CHARSET_macroman */
/* Define to enable charset sjis */
/* #undef HAVE_CHARSET_sjis */
/* Define to enable charset swe7 */
/* #undef HAVE_CHARSET_swe7 */
/* Define to enable charset tis620 */
/* #undef HAVE_CHARSET_tis620 */
/* Define to enable charset ucs2 */
/* #undef HAVE_CHARSET_ucs2 */
/* Define to enable charset ujis */
/* #undef HAVE_CHARSET_ujis */
/* Define to enable utf16 */
/* #undef HAVE_CHARSET_utf16 */
/* Define to enable utf32 */
/* #undef HAVE_CHARSET_utf32 */
/* Define to enable ut8 */
#define HAVE_CHARSET_utf8mb3 1
/* Define to enable ut8 */
#define HAVE_CHARSET_utf8mb4 1
/* Define to 1 if you have the `chsize' function. */
/* #undef HAVE_CHSIZE */
/* Define to 1 if you have the `clock_gettime' function. */
#define HAVE_CLOCK_GETTIME 1 #define HAVE_CLOCK_GETTIME 1
/* Define to enable compression support */
#define HAVE_COMPRESS 1
/* crypt */
#define HAVE_CRYPT 1 #define HAVE_CRYPT 1
/* Define to 1 if you have the <crypt.h> header file. */
#define HAVE_CRYPT_H 1
/* Define to 1 if you have the <curses.h> header file. */
#define HAVE_CURSES_H 1
/* Define to 1 if you have the `cuserid' function. */
#define HAVE_CUSERID 1 #define HAVE_CUSERID 1
#define HAVE_CXX_NEW 1
/* Define to 1 if you have the <cxxabi.h> header file. */
#define HAVE_CXXABI_H 1
/* Define to 1 if you have the declaration of `madvise', and to 0 if you
don't. */
#define HAVE_DECL_MADVISE 1
/* Define to 1 if you have the declaration of `SHM_HUGETLB', and to 0 if yo
u
don't. */
#define HAVE_DECL_SHM_HUGETLB 1
/* Define to 1 if you have the declaration of `tgoto', and to 0 if you don'
t.
*/
#define HAVE_DECL_TGOTO 1
/* Whether we are using DEC threads */
/* #undef HAVE_DEC_THREADS */
/* Define if /dev/poll is available */
/* #undef HAVE_DEVPOLL */
/* Define to 1 if you have the `directio' function. */
/* #undef HAVE_DIRECTIO */ /* #undef HAVE_DIRECTIO */
/* Define to 1 if you have the <dirent.h> header file. */
#define HAVE_DIRENT_H 1
/* Define to 1 if you have the `dlerror' function. */
#define HAVE_DLERROR 1 #define HAVE_DLERROR 1
/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
/* Define to 1 if you have the `dlopen' function. */
#define HAVE_DLOPEN 1 #define HAVE_DLOPEN 1
/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
/* #undef HAVE_DOPRNT */ /* #undef HAVE_DOPRNT */
/* Enables DTRACE Support */
/* #undef HAVE_DTRACE */
/* Access checks in embedded library */
/* #undef HAVE_EMBEDDED_PRIVILEGE_CONTROL */
/* Define if your system supports the epoll system calls */
/* #undef HAVE_EPOLL */
/* Define to 1 if you have the `epoll_ctl' function. */
/* #undef HAVE_EPOLL_CTL */
/* Define if your system supports event ports */
/* #undef HAVE_EVENT_PORTS */
/* Define to 1 if you have the <execinfo.h> header file. */
#define HAVE_EXECINFO_H 1
/* Defined by configure. Use explicit template instantiation. */
#define HAVE_EXPLICIT_TEMPLATE_INSTANTIATION 1
/* Define to 1 if you have the `fchmod' function. */
#define HAVE_FCHMOD 1 #define HAVE_FCHMOD 1
/* Define to 1 if you have the `fcntl' function. */
#define HAVE_FCNTL 1 #define HAVE_FCNTL 1
/* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
/* Define to 1 if you have the `fconvert' function. */
/* #undef HAVE_FCONVERT */ /* #undef HAVE_FCONVERT */
/* Define to 1 if you have the `fdatasync' function. */
#define HAVE_FDATASYNC 1 #define HAVE_FDATASYNC 1
/* Define to 1 if you have the <fenv.h> header file. */
#define HAVE_FENV_H 1
/* Define to 1 if you have the `fesetround' function. */
#define HAVE_FESETROUND 1 #define HAVE_FESETROUND 1
/* Define to 1 if you have the `fgetln' function. */
/* #undef HAVE_FGETLN */
/* Define to 1 if you have the `finite' function. */
#define HAVE_FINITE 1 #define HAVE_FINITE 1
/* #undef HAVE_FP_EXCEPT */
/* Define to 1 if you have the <floatingpoint.h> header file. */
/* #undef HAVE_FLOATINGPOINT_H */
/* Define to 1 if you have the <float.h> header file. */
#define HAVE_FLOAT_H 1
/* Define to 1 if you have the `flockfile' function. */
#define HAVE_FLOCKFILE 1
/* Define to 1 if you have the <fnmatch.h> header file. */
#define HAVE_FNMATCH_H 1
/* Define to 1 if you have the `fpresetsticky' function. */
/* #undef HAVE_FPRESETSTICKY */
/* Define to 1 if you have the `fpsetmask' function. */
/* #undef HAVE_FPSETMASK */ /* #undef HAVE_FPSETMASK */
#define HAVE_FSEEKO 1
/* Define to 1 if you have the <fpu_control.h> header file. */
#define HAVE_FPU_CONTROL_H 1
/* Define to 1 if the system has the type `fp_except'. */
/* #undef HAVE_FP_EXCEPT */
/* Define to 1 if you have the `fsync' function. */
#define HAVE_FSYNC 1 #define HAVE_FSYNC 1
#define HAVE_FTIME 1
#define HAVE_GETADDRINFO 1 /* Define to 1 if you have the `ftruncate' function. */
#define HAVE_FTRUNCATE 1
/* Define to 1 if compiler provides atomic builtins. */
/* #undef HAVE_GCC_ATOMIC_BUILTINS */
/* Define to 1 if you have the `getaddrinfo' function. */
/* #undef HAVE_GETADDRINFO */
/* Define to 1 if you have the `getcwd' function. */
#define HAVE_GETCWD 1 #define HAVE_GETCWD 1
/* Define to 1 if you have the `gethostbyaddr_r' function. */
#define HAVE_GETHOSTBYADDR_R 1 #define HAVE_GETHOSTBYADDR_R 1
/* Define to 1 if you have the `gethostbyname_r' function. */
#define HAVE_GETHOSTBYNAME_R 1 #define HAVE_GETHOSTBYNAME_R 1
/* Solaris define gethostbyname_r with 5 arguments. glibc2 defines this wit
h 6
arguments */
#define HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE 1
/* In OSF 4.0f the 3'd argument to gethostbyname_r is hostent_data * */
/* #undef HAVE_GETHOSTBYNAME_R_RETURN_INT */
/* Define to 1 if you have the `gethrtime' function. */
/* #undef HAVE_GETHRTIME */ /* #undef HAVE_GETHRTIME */
/* Define to 1 if you have the `getline' function. */
#define HAVE_GETLINE 1 #define HAVE_GETLINE 1
#define HAVE_GETNAMEINFO 1
/* Define to 1 if you have the `getnameinfo' function. */
/* #undef HAVE_GETNAMEINFO */
/* Define to 1 if you have the `getpagesize' function. */
#define HAVE_GETPAGESIZE 1 #define HAVE_GETPAGESIZE 1
/* Define to 1 if you have the `getpass' function. */
#define HAVE_GETPASS 1 #define HAVE_GETPASS 1
/* Define to 1 if you have the `getpassphrase' function. */
/* #undef HAVE_GETPASSPHRASE */ /* #undef HAVE_GETPASSPHRASE */
/* Define to 1 if you have the `getpwnam' function. */
#define HAVE_GETPWNAM 1 #define HAVE_GETPWNAM 1
/* Define to 1 if you have the `getpwuid' function. */
#define HAVE_GETPWUID 1 #define HAVE_GETPWUID 1
/* getpwent() declaration present */
/* #undef HAVE_GETPW_DECLS */
/* Define to 1 if you have the `getrlimit' function. */
#define HAVE_GETRLIMIT 1 #define HAVE_GETRLIMIT 1
/* Define to 1 if you have the `getrusage' function. */
#define HAVE_GETRUSAGE 1 #define HAVE_GETRUSAGE 1
#define HAVE_GETTIMEOFDAY 1
/* Define to 1 if you have the `gettimeofday' function. */
/* #undef HAVE_GETTIMEOFDAY */
/* Define to 1 if you have the `getwd' function. */
#define HAVE_GETWD 1 #define HAVE_GETWD 1
/* Define to 1 if you have the `gmtime_r' function. */
#define HAVE_GMTIME_R 1 #define HAVE_GMTIME_R 1
/* #undef gmtime_r */
/* Define to 1 if you have the <grp.h> header file. */
#define HAVE_GRP_H 1
/* HIST_ENTRY is defined in the outer libeditreadline */
#define HAVE_HIST_ENTRY 1
/* Define to 1 if you have the <ieeefp.h> header file. */
/* #undef HAVE_IEEEFP_H */
/* Define to 1 if you have the `index' function. */
#define HAVE_INDEX 1
/* Define to 1 if you have the `inet_ntop' function. */
/* #undef HAVE_INET_NTOP */
/* Define to 1 if you have the `initgroups' function. */
#define HAVE_INITGROUPS 1 #define HAVE_INITGROUPS 1
/* #undef HAVE_ISSETUGID */
#define HAVE_ISNAN 1 /* Define to 1 if the system has the type `int16'. */
/* #undef HAVE_INT16 */
/* Define to 1 if the system has the type `int32'. */
/* #undef HAVE_INT32 */
/* Define to 1 if the system has the type `int64'. */
/* #undef HAVE_INT64 */
/* Define to 1 if the system has the type `int8'. */
/* #undef HAVE_INT8 */
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* isinf() macro or function */
#define HAVE_ISINF 1 #define HAVE_ISINF 1
#define HAVE_LARGE_PAGE_OPTION 1
#define HAVE_LDIV 1 /* Define to 1 if you have the `isnan' function. */
#define HAVE_LRAND48 1 #define HAVE_ISNAN 1
/* Define to 1 if you have the `issetugid' function. */
/* #undef HAVE_ISSETUGID */
/* Define to 1 if you have the `kqueue' function. */
/* #undef HAVE_KQUEUE */
/* Define if mysql_cv_langinfo_codeset=yes */
#define HAVE_LANGINFO_CODESET /**/
/* Define to 1 if you have the <langinfo.h> header file. */
#define HAVE_LANGINFO_H 1
/* Define if you have large pages support */
#define HAVE_LARGE_PAGES 1
/* Define to 1 if you have the `c_r' library (-lc_r). */
/* #undef HAVE_LIBC_R */
/* Define to 1 if you have the `dl' library (-ldl). */
#define HAVE_LIBDL 1
/* If we want to use libevent and have connection pooling */
/* #undef HAVE_LIBEVENT */
/* Define to 1 if you have the `m' library (-lm). */
#define HAVE_LIBM 1
/* Define to 1 if you have the `mtmalloc' library (-lmtmalloc). */
/* #undef HAVE_LIBMTMALLOC */
/* Define to 1 if you have the `nsl' library (-lnsl). */
#define HAVE_LIBNSL 1
/* Define to 1 if you have the `nsl_r' library (-lnsl_r). */
/* #undef HAVE_LIBNSL_R */
/* Define to 1 if you have the `pthread' library (-lpthread). */
#define HAVE_LIBPTHREAD 1
/* Define to 1 if you have the `resolv' library (-lresolv). */
/* #undef HAVE_LIBRESOLV */
/* Define to 1 if you have the `rt' library (-lrt). */
#define HAVE_LIBRT 1
/* Define to 1 if you have the `socket' library (-lsocket). */
/* #undef HAVE_LIBSOCKET */
/* Define if have -lwrap */
/* #undef HAVE_LIBWRAP */
/* Define to 1 if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
/* Whether we are using Xavier Leroy's LinuxThreads */
/* #undef HAVE_LINUXTHREADS */
/* Define to 1 if you have the <linux/config.h> header file. */
/* #undef HAVE_LINUX_CONFIG_H */
/* Define to 1 if you have the <locale.h> header file. */
#define HAVE_LOCALE_H 1
/* Define to 1 if you have the `localtime_r' function. */
#define HAVE_LOCALTIME_R 1 #define HAVE_LOCALTIME_R 1
/* Define to 1 if you have the `locking' function. */
/* #undef HAVE_LOCKING */
/* Define to 1 if you have the `log2' function. */
#define HAVE_LOG2 1 #define HAVE_LOG2 1
/* Define to 1 if you have the `longjmp' function. */
#define HAVE_LONGJMP 1 #define HAVE_LONGJMP 1
/* Define to 1 if you have the `lrand48' function. */
#define HAVE_LRAND48 1
/* Define to 1 if you have the `lstat' function. */
#define HAVE_LSTAT 1 #define HAVE_LSTAT 1
#define HAVE_MEMALIGN 1
/* #define HAVE_MLOCK 1 see Bug#54662 */ /* Define to 1 if you have the `madvise' function. */
#define HAVE_NPTL 1
#define HAVE_NL_LANGINFO 1
#define HAVE_MADVISE 1 #define HAVE_MADVISE 1
#define HAVE_DECL_MADVISE 1
#define HAVE_DECL_TGOTO 1 /* Define to 1 if you have the `mallinfo' function. */
/* #undef HAVE_DECL_MHA_MAPSIZE_VA */
#define HAVE_MALLINFO 1 #define HAVE_MALLINFO 1
/* Define to 1 if you have the <malloc.h> header file. */
#define HAVE_MALLOC_H 1
/* Define if you have mbrlen */
#define HAVE_MBRLEN /**/
/* Define if you have mbrtowc */
#define HAVE_MBRTOWC /**/
/* Define if you have mbsrtowcs */
#define HAVE_MBSRTOWCS /**/
/* Define if mysql_cv_have_mbstate_t=yes */
#define HAVE_MBSTATE_T /**/
/* Define to 1 if you have the `memcpy' function. */
#define HAVE_MEMCPY 1 #define HAVE_MEMCPY 1
/* Define to 1 if you have the `memmove' function. */
#define HAVE_MEMMOVE 1 #define HAVE_MEMMOVE 1
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the `mkstemp' function. */
#define HAVE_MKSTEMP 1 #define HAVE_MKSTEMP 1
/* Define to 1 if you have the `mlockall' function. */
#define HAVE_MLOCKALL 1 #define HAVE_MLOCKALL 1
/* Define to 1 if you have the `mmap' function. */
#define HAVE_MMAP 1 #define HAVE_MMAP 1
/* Define to 1 if you have the `mmap64' function. */
#define HAVE_MMAP64 1 #define HAVE_MMAP64 1
/* Define to 1 if you have the <ndir.h> header file. */
/* #undef HAVE_NDIR_H */
/* Define to 1 if you have the <netinet/in6.h> header file. */
/* #undef HAVE_NETINET_IN6_H */
/* Define to 1 if you have the <netinet/in.h> header file. */
#define HAVE_NETINET_IN_H 1
/* For some non posix threads */
/* #undef HAVE_NONPOSIX_PTHREAD_GETSPECIFIC */
/* For some non posix threads */
/* #undef HAVE_NONPOSIX_PTHREAD_MUTEX_INIT */
/* sigwait with one argument */
/* #undef HAVE_NONPOSIX_SIGWAIT */
/* NPTL threads implementation */
#define HAVE_NPTL 1
/* Define to 1 if the system has the type `off_t'. */
#define HAVE_OFF_T 1
/* OpenSSL */
/* #undef HAVE_OPENSSL */
/* Define to 1 if you have the <paths.h> header file. */
#define HAVE_PATHS_H 1
/* Define to 1 if you have the `perror' function. */
#define HAVE_PERROR 1 #define HAVE_PERROR 1
/* Define to 1 if you have the `poll' function. */
#define HAVE_POLL 1 #define HAVE_POLL 1
/* Define to 1 if you have the <poll.h> header file. */
/* #undef HAVE_POLL_H */
/* Define to 1 if you have the `port_create' function. */
/* #undef HAVE_PORT_CREATE */ /* #undef HAVE_PORT_CREATE */
/* Define to 1 if you have the <port.h> header file. */
/* #undef HAVE_PORT_H */
/* Define to 1 if you have the `posix_fallocate' function. */
#define HAVE_POSIX_FALLOCATE 1 #define HAVE_POSIX_FALLOCATE 1
/* Signal handling is POSIX (sigset/sighold, etc) */
#define HAVE_POSIX_SIGNALS 1
/* Define to 1 if you have the `pread' function. */
#define HAVE_PREAD 1 #define HAVE_PREAD 1
#define HAVE_PAUSE_INSTRUCTION 1
/* #undef HAVE_FAKE_PAUSE_INSTRUCTION */ /* Define to 1 if you have the `pthread_attr_create' function. */
/* #undef HAVE_RDTSCLL */
/* #undef HAVE_READ_REAL_TIME */
/* #undef HAVE_PTHREAD_ATTR_CREATE */ /* #undef HAVE_PTHREAD_ATTR_CREATE */
/* Define to 1 if you have the `pthread_attr_getstacksize' function. */
#define HAVE_PTHREAD_ATTR_GETSTACKSIZE 1 #define HAVE_PTHREAD_ATTR_GETSTACKSIZE 1
/* #undef HAVE_PTHREAD_ATTR_SETPRIO */
/* #undef HAVE_PTHREAD_ATTR_SETSCHEDPARAM */ /* pthread_attr_setscope */
#define HAVE_PTHREAD_ATTR_SETSCOPE 1 #define HAVE_PTHREAD_ATTR_SETSCOPE 1
/* Define to 1 if you have the `pthread_attr_setstacksize' function. */
#define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1 #define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1
/* Define to 1 if you have the `pthread_condattr_create' function. */
/* #undef HAVE_PTHREAD_CONDATTR_CREATE */ /* #undef HAVE_PTHREAD_CONDATTR_CREATE */
/* Define to 1 if you have the `pthread_condattr_setclock' function. */
#define HAVE_PTHREAD_CONDATTR_SETCLOCK 1 #define HAVE_PTHREAD_CONDATTR_SETCLOCK 1
/* Define to 1 if you have the `pthread_getsequence_np' function. */
/* #undef HAVE_PTHREAD_GETSEQUENCE_NP */
/* Define to 1 if you have the `pthread_init' function. */
/* #undef HAVE_PTHREAD_INIT */ /* #undef HAVE_PTHREAD_INIT */
/* Define to 1 if you have the `pthread_key_delete' function. */
#define HAVE_PTHREAD_KEY_DELETE 1 #define HAVE_PTHREAD_KEY_DELETE 1
#define HAVE_PTHREAD_KEY_DELETE 1
/* #undef HAVE_PTHREAD_KILL */ /* Define to 1 if you have the `pthread_rwlock_rdlock' function. */
#define HAVE_PTHREAD_RWLOCK_RDLOCK 1 #define HAVE_PTHREAD_RWLOCK_RDLOCK 1
#define HAVE_PTHREAD_RWLOCKATTR_SETKIND_NP 1
/* #undef HAVE_PTHREAD_SETPRIO_NP */ /* Define to 1 if you have the `pthread_setschedprio' function. */
/* #undef HAVE_PTHREAD_SETSCHEDPARAM */ #define HAVE_PTHREAD_SETSCHEDPRIO 1
/* Define to 1 if you have the `pthread_sigmask' function. */
#define HAVE_PTHREAD_SIGMASK 1 #define HAVE_PTHREAD_SIGMASK 1
/* #undef HAVE_PTHREAD_THREADMASK */
/* Define to 1 if you have the `pthread_yield_np' function. */
/* #undef HAVE_PTHREAD_YIELD_NP */ /* #undef HAVE_PTHREAD_YIELD_NP */
/* pthread_yield function with one argument */
/* #undef HAVE_PTHREAD_YIELD_ONE_ARG */
/* pthread_yield that doesn't take any arguments */
#define HAVE_PTHREAD_YIELD_ZERO_ARG 1 #define HAVE_PTHREAD_YIELD_ZERO_ARG 1
/* Define to 1 if you have the `putenv' function. */
#define HAVE_PUTENV 1 #define HAVE_PUTENV 1
#define HAVE_RE_COMP 1
#define HAVE_REGCOMP 1 /* Define to 1 if you have the <pwd.h> header file. */
#define HAVE_PWD_H 1
/* If we want to have query cache */
#define HAVE_QUERY_CACHE 1
/* POSIX readdir_r */
#define HAVE_READDIR_R 1 #define HAVE_READDIR_R 1
/* Define to 1 if you have the `readlink' function. */
#define HAVE_READLINK 1 #define HAVE_READLINK 1
/* Define to 1 if you have the `realpath' function. */
#define HAVE_REALPATH 1 #define HAVE_REALPATH 1
/* Define to 1 if you have the `regcomp' function. */
#define HAVE_REGCOMP 1
/* Define to 1 if you have the `rename' function. */
#define HAVE_RENAME 1 #define HAVE_RENAME 1
/* Define to 1 if you have the `re_comp' function. */
#define HAVE_RE_COMP 1
/* Define to 1 if you have the `rint' function. */
#define HAVE_RINT 1 #define HAVE_RINT 1
/* RTree keys */
#define HAVE_RTREE_KEYS 1
/* Define to 1 if you have the `rwlock_init' function. */
/* #undef HAVE_RWLOCK_INIT */ /* #undef HAVE_RWLOCK_INIT */
/* Define to 1 if you have the <sched.h> header file. */
#define HAVE_SCHED_H 1
/* Define to 1 if you have the `sched_yield' function. */
#define HAVE_SCHED_YIELD 1 #define HAVE_SCHED_YIELD 1
/* Define to 1 if you have the `select' function. */
#define HAVE_SELECT 1 #define HAVE_SELECT 1
/* #undef HAVE_SETFD */
/* Define to 1 if you have the <select.h> header file. */
/* #undef HAVE_SELECT_H */
/* Define to 1 if you have the <semaphore.h> header file. */
#define HAVE_SEMAPHORE_H 1
/* Define to 1 if you have the `setenv' function. */
#define HAVE_SETENV 1 #define HAVE_SETENV 1
/* Define if F_SETFD is defined in <fcntl.h> */
/* #undef HAVE_SETFD */
/* Define to 1 if you have the `setlocale' function. */
#define HAVE_SETLOCALE 1 #define HAVE_SETLOCALE 1
/* Define to 1 if you have the `setupterm' function. */
/* #undef HAVE_SETUPTERM */
/* Define to 1 if you have the `shmat' function. */
#define HAVE_SHMAT 1
/* Define to 1 if you have the `shmctl' function. */
#define HAVE_SHMCTL 1
/* Define to 1 if you have the `shmdt' function. */
#define HAVE_SHMDT 1
/* Define to 1 if you have the `shmget' function. */
#define HAVE_SHMGET 1
/* Define to 1 if you have the `sigaction' function. */
#define HAVE_SIGACTION 1
/* Define to 1 if you have the `sigaddset' function. */
#define HAVE_SIGADDSET 1 #define HAVE_SIGADDSET 1
/* Define to 1 if you have the `sigemptyset' function. */
#define HAVE_SIGEMPTYSET 1 #define HAVE_SIGEMPTYSET 1
/* Define to 1 if you have the `sighold' function. */
#define HAVE_SIGHOLD 1 #define HAVE_SIGHOLD 1
/* Define to 1 if you have the `signal' function. */
/* #undef HAVE_SIGNAL */
/* Define to 1 if you have the <signal.h> header file. */
/* #undef HAVE_SIGNAL_H */
/* Define to 1 if you have the `sigset' function. */
#define HAVE_SIGSET 1 #define HAVE_SIGSET 1
/* Define to 1 if the system has the type `sigset_t'. */
#define HAVE_SIGSET_T 1 #define HAVE_SIGSET_T 1
#define HAVE_SIGACTION 1
/* Define to 1 if you have the `sigthreadmask' function. */
/* #undef HAVE_SIGTHREADMASK */ /* #undef HAVE_SIGTHREADMASK */
/* POSIX sigwait */
#define HAVE_SIGWAIT 1 #define HAVE_SIGWAIT 1
/* Define to 1 if the system has the type `size_t'. */
#define HAVE_SIZE_T 1
/* Define to 1 if you have the `sleep' function. */
#define HAVE_SLEEP 1 #define HAVE_SLEEP 1
/* Define to 1 if you have the `snprintf' function. */
#define HAVE_SNPRINTF 1 #define HAVE_SNPRINTF 1
/* Define to 1 if you have the `socket' function. */
#define HAVE_SOCKET 1
/* Define to 1 if Solaris support atomic functions. */
/* #undef HAVE_SOLARIS_ATOMIC */
/* Solaris define gethostbyaddr_r with 7 arguments. glibc2 defines this wit
h 8
arguments */
/* #undef HAVE_SOLARIS_STYLE_GETHOST */
/* Spatial extentions */
#define HAVE_SPATIAL 1
/* Define to 1 if you have the <stdarg.h> header file. */
#define HAVE_STDARG_H 1
/* Define to 1 if you have the <stddef.h> header file. */
#define HAVE_STDDEF_H 1
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the `stpcpy' function. */
#define HAVE_STPCPY 1 #define HAVE_STPCPY 1
#define HAVE_STRERROR 1
/* Define to 1 if you have the `strcasecmp' function. */
#define HAVE_STRCASECMP 1
/* Define to 1 if you have the `strcoll' function. */
#define HAVE_STRCOLL 1 #define HAVE_STRCOLL 1
#define HAVE_STRSIGNAL 1
/* #undef HAVE_STRLCPY */ /* Define to 1 if you have the `strdup' function. */
#define HAVE_STRDUP 1
/* Define to 1 if you have the `strerror' function. */
#define HAVE_STRERROR 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the `strlcat' function. */
/* #undef HAVE_STRLCAT */ /* #undef HAVE_STRLCAT */
/* #undef HAVE_FGETLN */
/* Define to 1 if you have the `strlcpy' function. */
/* #undef HAVE_STRLCPY */
/* Define to 1 if you have the `strnlen' function. */
#define HAVE_STRNLEN 1 #define HAVE_STRNLEN 1
/* Define to 1 if you have the `strpbrk' function. */
#define HAVE_STRPBRK 1 #define HAVE_STRPBRK 1
#define HAVE_STRSEP 1
/* Define to 1 if you have the `strsep' function. */
/* #undef HAVE_STRSEP */
/* Define to 1 if you have the `strsignal' function. */
#define HAVE_STRSIGNAL 1
/* Define to 1 if you have the `strstr' function. */
#define HAVE_STRSTR 1 #define HAVE_STRSTR 1
/* Define to 1 if you have the `strtok_r' function. */
#define HAVE_STRTOK_R 1 #define HAVE_STRTOK_R 1
/* Define to 1 if you have the `strtol' function. */
#define HAVE_STRTOL 1 #define HAVE_STRTOL 1
/* Define to 1 if you have the `strtoll' function. */
#define HAVE_STRTOLL 1 #define HAVE_STRTOLL 1
/* Define to 1 if you have the `strtoul' function. */
#define HAVE_STRTOUL 1 #define HAVE_STRTOUL 1
/* Define to 1 if you have the `strtoull' function. */
#define HAVE_STRTOULL 1 #define HAVE_STRTOULL 1
#define HAVE_SHMAT 1
#define HAVE_SHMCTL 1 /* Define to 1 if the system has the type `struct in6_addr'. */
#define HAVE_SHMDT 1 /* #undef HAVE_STRUCT_IN6_ADDR */
#define HAVE_SHMGET 1
/* Define to 1 if you have the <synch.h> header file. */
/* #undef HAVE_SYNCH_H */
/* Define to 1 if you have the <sys/cdefs.h> header file. */
#define HAVE_SYS_CDEFS_H 1
/* Define to 1 if you have the <sys/devpoll.h> header file. */
/* #undef HAVE_SYS_DEVPOLL_H */
/* Define to 1 if you have the <sys/dir.h> header file. */
#define HAVE_SYS_DIR_H 1
/* Define to 1 if you have the <sys/epoll.h> header file. */
/* #undef HAVE_SYS_EPOLL_H */
/* Define to 1 if you have the <sys/event.h> header file. */
/* #undef HAVE_SYS_EVENT_H */
/* Define to 1 if you have the <sys/file.h> header file. */
#define HAVE_SYS_FILE_H 1
/* Define to 1 if you have the <sys/fpu.h> header file. */
/* #undef HAVE_SYS_FPU_H */
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#define HAVE_SYS_IOCTL_H 1
/* Define to 1 if you have the <sys/ipc.h> header file. */
#define HAVE_SYS_IPC_H 1
/* Define to 1 if you have the <sys/malloc.h> header file. */
/* #undef HAVE_SYS_MALLOC_H */
/* Define to 1 if you have the <sys/mman.h> header file. */
#define HAVE_SYS_MMAN_H 1
/* Define to 1 if you have the <sys/ndir.h> header file. */
/* #undef HAVE_SYS_NDIR_H */
/* Define to 1 if you have the <sys/param.h> header file. */
#define HAVE_SYS_PARAM_H 1
/* Define to 1 if you have the <sys/prctl.h> header file. */
#define HAVE_SYS_PRCTL_H 1
/* Define to 1 if you have the <sys/ptem.h> header file. */
/* #undef HAVE_SYS_PTEM_H */
/* Define to 1 if you have the <sys/pte.h> header file. */
/* #undef HAVE_SYS_PTE_H */
/* Define to 1 if you have the <sys/queue.h> header file. */
/* #undef HAVE_SYS_QUEUE_H */
/* Define to 1 if you have the <sys/resource.h> header file. */
#define HAVE_SYS_RESOURCE_H 1
/* Define to 1 if you have the <sys/select.h> header file. */
#define HAVE_SYS_SELECT_H 1
/* Define to 1 if you have the <sys/shm.h> header file. */
#define HAVE_SYS_SHM_H 1
/* Define to 1 if you have the <sys/socket.h> header file. */
#define HAVE_SYS_SOCKET_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/stream.h> header file. */
/* #undef HAVE_SYS_STREAM_H */
/* Define to 1 if you have the <sys/timeb.h> header file. */
#define HAVE_SYS_TIMEB_H 1
/* Define to 1 if you have the <sys/time.h> header file. */
/* #undef HAVE_SYS_TIME_H */
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <sys/un.h> header file. */
#define HAVE_SYS_UN_H 1
/* Define to 1 if you have the <sys/utime.h> header file. */
/* #undef HAVE_SYS_UTIME_H */
/* Define to 1 if you have the <sys/vadvise.h> header file. */
/* #undef HAVE_SYS_VADVISE_H */
/* Define to 1 if you have the <sys/wait.h> header file. */
#define HAVE_SYS_WAIT_H 1
/* Define if TAILQ_FOREACH is defined in <sys/queue.h> */
/* #undef HAVE_TAILQFOREACH */
/* Define to 1 if you have the `tcgetattr' function. */
#define HAVE_TCGETATTR 1
/* Define to 1 if you have the `tell' function. */
/* #undef HAVE_TELL */ /* #undef HAVE_TELL */
/* Define to 1 if you have the `tempnam' function. */
#define HAVE_TEMPNAM 1 #define HAVE_TEMPNAM 1
/* Define to 1 if you have the <termbits.h> header file. */
/* #undef HAVE_TERMBITS_H */
/* Define to 1 if you have the <termcap.h> header file. */
#define HAVE_TERMCAP_H 1
/* Define to 1 if you have the <termios.h> header file. */
#define HAVE_TERMIOS_H 1
/* Define to 1 if you have the <termio.h> header file. */
#define HAVE_TERMIO_H 1
/* Define to 1 if you have the <term.h> header file. */
#define HAVE_TERM_H 1
/* Define to 1 if you have the `thr_setconcurrency' function. */
/* #undef HAVE_THR_SETCONCURRENCY */ /* #undef HAVE_THR_SETCONCURRENCY */
/* Define to 1 if you have the `thr_yield' function. */
/* #undef HAVE_THR_YIELD */ /* #undef HAVE_THR_YIELD */
#define HAVE_TIME 1
#define HAVE_TIMES 1
#define HAVE_VALLOC 1
#define HAVE_VIO_READ_BUFF 1
#define HAVE_VASPRINTF 1
#define HAVE_VPRINTF 1
#define HAVE_VSNPRINTF 1
#define HAVE_FTRUNCATE 1
#define HAVE_TZNAME 1
#define HAVE_AIO_READ 1
/* Symbols we may use */
#define HAVE_SYS_ERRLIST 1
/* used by stacktrace functions */
#define HAVE_BSS_START 1
#define HAVE_BACKTRACE 1
#define HAVE_BACKTRACE_SYMBOLS 1
#define HAVE_BACKTRACE_SYMBOLS_FD 1
/* #undef HAVE_PRINTSTACK */
#define HAVE_STRUCT_SOCKADDR_IN6 1
#define HAVE_STRUCT_IN6_ADDR 1
/* #undef HAVE_NETINET_IN6_H */
#define HAVE_IPV6 1
/* #undef ss_family */
/* #undef HAVE_SOCKADDR_IN_SIN_LEN */
/* #undef HAVE_SOCKADDR_IN6_SIN6_LEN */
/* #undef HAVE_TIMESPEC_TS_SEC */
#define STRUCT_DIRENT_HAS_D_INO 1
/* #undef STRUCT_DIRENT_HAS_D_NAMLEN */
#define SPRINTF_RETURNS_INT 1
#define USE_MB 1 /* Define if timeradd is defined in <sys/time.h> */
#define USE_MB_IDENT 1 /* #undef HAVE_TIMERADD */
/* #undef HAVE_VALGRIND */ /* Define if timerclear is defined in <sys/time.h> */
/* #undef HAVE_TIMERCLEAR */
/* Types we may use */ /* Define if timercmp is defined in <sys/time.h> */
#ifdef __APPLE__ /* #undef HAVE_TIMERCMP */
/*
Special handling required for OSX to support universal binaries that
mix 32 and 64 bit architectures.
*/
#if(__LP64__)
#define SIZEOF_LONG 8
#else
#define SIZEOF_LONG 4
#endif
#define SIZEOF_VOIDP SIZEOF_LONG
#define SIZEOF_CHARP SIZEOF_LONG
#define SIZEOF_SIZE_T SIZEOF_LONG
#else
/* No indentation, to fetch the lines from verification scripts */
#define SIZEOF_LONG 4
#define SIZEOF_VOIDP 4
#define SIZEOF_CHARP 4
#define SIZEOF_SIZE_T 4
#endif
#define SIZEOF_CHAR 1 /* Define if timerisset is defined in <sys/time.h> */
#define HAVE_CHAR 1 /* #undef HAVE_TIMERISSET */
#define HAVE_LONG 1
#define HAVE_CHARP 1 /* Timespec has a ts_sec instead of tv_sev */
#define SIZEOF_SHORT 2 /* #undef HAVE_TIMESPEC_TS_SEC */
#define HAVE_SHORT 1
#define SIZEOF_INT 4 /* Have the tzname variable */
#define HAVE_INT 1 #define HAVE_TZNAME 1
#define SIZEOF_LONG_LONG 8
#define HAVE_LONG_LONG 1 /* national Unicode collations */
#define SIZEOF_OFF_T 8 #define HAVE_UCA_COLLATIONS 1
#define HAVE_OFF_T 1
#define SIZEOF_SIGSET_T 128 /* Define to 1 if the system has the type `uchar'. */
#define HAVE_SIGSET_T 1
#define HAVE_SIZE_T 1
/* #undef SIZEOF_UCHAR */
/* #undef HAVE_UCHAR */ /* #undef HAVE_UCHAR */
#define SIZEOF_UINT 4
/* Define to 1 if the system has the type `uint'. */
#define HAVE_UINT 1 #define HAVE_UINT 1
#define SIZEOF_ULONG 4
#define HAVE_ULONG 1 /* Define to 1 if the system has the type `uint16'. */
/* #undef SIZEOF_INT8 */
/* #undef HAVE_INT8 */
/* #undef SIZEOF_UINT8 */
/* #undef HAVE_UINT8 */
/* #undef SIZEOF_INT16 */
/* #undef HAVE_INT16 */
/* #undef SIZEOF_UINT16 */
/* #undef HAVE_UINT16 */ /* #undef HAVE_UINT16 */
/* #undef SIZEOF_INT32 */
/* #undef HAVE_INT32 */ /* Define to 1 if the system has the type `uint16_t'. */
/* #undef SIZEOF_UINT32 */ /* #undef HAVE_UINT16_T */
/* Define to 1 if the system has the type `uint32'. */
/* #undef HAVE_UINT32 */ /* #undef HAVE_UINT32 */
#define SIZEOF_U_INT32_T 4
#define HAVE_U_INT32_T 1 /* Define to 1 if the system has the type `uint32_t'. */
/* #undef SIZEOF_INT64 */ /* #undef HAVE_UINT32_T */
/* #undef HAVE_INT64 */
/* #undef SIZEOF_UINT64 */ /* Define to 1 if the system has the type `uint64'. */
/* #undef HAVE_UINT64 */ /* #undef HAVE_UINT64 */
/* #undef SIZEOF_BOOL */
/* #undef HAVE_BOOL */
#define SOCKET_SIZE_TYPE socklen_t /* Define to 1 if the system has the type `uint64_t'. */
/* #undef HAVE_UINT64_T */
#define HAVE_MBSTATE_T /* Define to 1 if the system has the type `uint8'. */
/* #undef HAVE_UINT8 */
#define MAX_INDEXES 64 /* Define to 1 if the system has the type `uint8_t'. */
/* #undef HAVE_UINT8_T */
#define QSORT_TYPE_IS_VOID 1 /* Define to 1 if the system has the type `ulong'. */
#define RETQSORTTYPE void #define HAVE_ULONG 1
#define SIGNAL_RETURN_TYPE_IS_VOID 1 /* Define to 1 if you have the <unistd.h> header file. */
#define RETSIGTYPE void #define HAVE_UNISTD_H 1
#define VOID_SIGHANDLER 1
#define STRUCT_RLIMIT struct rlimit
#ifdef __APPLE__ /* Have UnixWare 7 (or similar) almost-POSIX threading library */
#if __BIG_ENDIAN /* #undef HAVE_UNIXWARE7_THREADS */
#define WORDS_BIGENDIAN 1
#endif
#else
/* #undef WORDS_BIGENDIAN */
#endif
/* Define to `__inline__' or `__inline' if that's what the C compiler calls /* sighold() is present and usable */
it, or to nothing if 'inline' is not supported under any name. */ /* #undef HAVE_USG_SIGHOLD */
#define C_HAS_inline 1
#if !(C_HAS_inline)
#ifndef __cplusplus
# define inline
#endif
#endif
#define TARGET_OS_LINUX 1 /* certain Japanese customer */
/* #undef TARGET_OS_SOLARIS */ /* #undef HAVE_UTF8_GENERAL_CS */
#define HAVE_WCTYPE_H 1 /* Define to 1 if you have the <utime.h> header file. */
#define HAVE_UTIME_H 1
/* Define to 1 if `utime(file, NULL)' sets file's timestamp to the present.
*/
#define HAVE_UTIME_NULL 1
/* Define to 1 if the system has the type `u_int32_t'. */
#define HAVE_U_INT32_T 1
/* Define to 1 if you have the <valgrind/memcheck.h> header file. */
/* #undef HAVE_VALGRIND_MEMCHECK_H */
/* Define to 1 if you have the <varargs.h> header file. */
/* #undef HAVE_VARARGS_H */
/* Define to 1 if you have the `vasprintf' function. */
/* #undef HAVE_VASPRINTF */
/* Define to 1 if you have the `vidattr' function. */
/* #undef HAVE_VIDATTR */
/* Define to enable buffered read. This works only if syscalls read/recv
return as soon as there is some data in the kernel buffer, no matter how
big the given buffer is. */
#define HAVE_VIO_READ_BUFF 1
/* Found vis.h and the strvis() function */
/* #undef HAVE_VIS_H */
/* Define to 1 if you have the `vprintf' function. */
#define HAVE_VPRINTF 1
/* Define to 1 if you have the <wchar.h> header file. */
#define HAVE_WCHAR_H 1 #define HAVE_WCHAR_H 1
#define HAVE_LANGINFO_H 1
#define HAVE_MBRLEN
/* #undef HAVE_MBSCMP */
#define HAVE_MBSRTOWCS
#define HAVE_WCRTOMB
#define HAVE_MBRTOWC
#define HAVE_WCSCOLL
#define HAVE_WCSDUP
#define HAVE_WCWIDTH
#define HAVE_WCTYPE
#define HAVE_ISWLOWER 1
#define HAVE_ISWUPPER 1
#define HAVE_TOWLOWER 1
#define HAVE_TOWUPPER 1
#define HAVE_ISWCTYPE 1
#define HAVE_WCHAR_T 1
#define HAVE_WCTYPE_T 1
#define HAVE_WINT_T 1
#define HAVE_STRCASECMP 1 /* Define if you check wcsdup */
#define HAVE_STRNCASECMP 1 #define HAVE_WCSDUP /**/
#define HAVE_STRDUP 1
#define HAVE_LANGINFO_CODESET /* Define if you have wctomb */
#define HAVE_TCGETATTR 1 #define HAVE_WCTOMB /**/
#define HAVE_FLOCKFILE 1
/* Define to 1 if you have the <wctype.h> header file. */
#define HAVE_WCTYPE_H 1
/* Define if you have wcwidth */
#define HAVE_WCWIDTH /**/
/* Define to 1 if compiler supports weak symbol attribute. */
#define HAVE_WEAK_SYMBOL 1 #define HAVE_WEAK_SYMBOL 1
/* #undef HAVE_ABI_CXA_DEMANGLE */
#define HAVE_POSIX_SIGNALS 1 /* Define if kqueue works correctly with pipes */
/* #undef HAVE_BSD_SIGNALS */ /* #undef HAVE_WORKING_KQUEUE */
/* #undef HAVE_SVR3_SIGNALS */
/* #undef HAVE_V7_SIGNALS */
/* #undef HAVE_SOLARIS_STYLE_GETHOST */ /* Define to 1 if you have the <xfs/xfs.h> header file. */
#define HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE 1 /* #undef HAVE_XFS_XFS_H */
/* #undef HAVE_GETHOSTBYNAME_R_RETURN_INT */
/* Defined by configure. Using yaSSL for SSL. */
/* #undef HAVE_YASSL */
/* Define if /proc/meminfo shows the huge page size (Linux only) */
#define HUGETLB_USE_PROC_MEMINFO 1
/* Define to the sub-directory in which libtool stores uninstalled librarie
s.
*/
#define LT_OBJDIR ".libs/"
/* Machine type name, eg sparc */
#define MACHINE_TYPE "i686"
/* Maximum number of indexes per table */
#define MAX_INDEXES 64
/* Define the default charset name */
#define MYSQL_DEFAULT_CHARSET_NAME "latin1"
/* Define the default charset name */
#define MYSQL_DEFAULT_COLLATION_NAME "latin1_swedish_ci"
/* Assume single-CPU mode, no concurrency */
/* #undef MY_ATOMIC_MODE_DUMMY */ /* #undef MY_ATOMIC_MODE_DUMMY */
/* Use pthread rwlocks for atomic ops */
/* #undef MY_ATOMIC_MODE_RWLOCKS */ /* #undef MY_ATOMIC_MODE_RWLOCKS */
#define HAVE_GCC_ATOMIC_BUILTINS 1
/* #undef HAVE_SOLARIS_ATOMIC */
#define HAVE_DECL_SHM_HUGETLB 1
#define HAVE_LARGE_PAGES 1
#define HUGETLB_USE_PROC_MEMINFO 1
/* #undef NO_FCNTL_NONBLOCK */
#define NO_ALARM 1
/* #undef _LARGE_FILES */ /* Define to 1 if you want to use fast mutexes */
#define _LARGEFILE_SOURCE 1 /* #undef MY_PTHREAD_FASTMUTEX */
/* #undef _LARGEFILE64_SOURCE */
#define _FILE_OFFSET_BITS 64
#define TIME_WITH_SYS_TIME 1 /* MySQL build version */
/* #undef NDB_MYSQL_VERSION_BUILD */
/* MySQL major version */
/* #undef NDB_MYSQL_VERSION_MAJOR */
/* MySQL minor version */
/* #undef NDB_MYSQL_VERSION_MINOR */
/* Including Ndb Cluster DB sci transporter */
/* #undef NDB_SCI_TRANSPORTER */
/* Including Ndb Cluster DB shared memory transporter */
/* #undef NDB_SHM_TRANSPORTER */
/* NDB build version */
/* #undef NDB_VERSION_BUILD */
/* NDB major version */
/* #undef NDB_VERSION_MAJOR */
/* NDB minor version */
/* #undef NDB_VERSION_MINOR */
/* NDB status version */
/* #undef NDB_VERSION_STATUS */
/* Name of package */
#define PACKAGE "mysql"
/* Define to the address where bug reports for this package should be sent.
*/
#define PACKAGE_BUGREPORT ""
/* Define to the full name of this package. */
#define PACKAGE_NAME "MySQL Server"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "MySQL Server 6.0.11-alpha"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "mysql"
/* Define to the version of this package. */
#define PACKAGE_VERSION "6.0.11-alpha"
/* mysql client protocol version */
#define PROTOCOL_VERSION 10
/* qsort returns void */
#define QSORT_TYPE_IS_VOID 1
/* The return type of qsort (int or void). */
#define RETQSORTTYPE void
/* The size of `char', as computed by sizeof. */
#define SIZEOF_CHAR 1
/* The size of `char*', as computed by sizeof. */
#define SIZEOF_CHARP 4
/* The size of `int', as computed by sizeof. */
#define SIZEOF_INT 4
/* The size of `long', as computed by sizeof. */
#define SIZEOF_LONG 4
/* The size of `long long', as computed by sizeof. */
#define SIZEOF_LONG_LONG 8
/* The size of `off_t', as computed by sizeof. */
#define SIZEOF_OFF_T 8
/* The size of `short', as computed by sizeof. */
#define SIZEOF_SHORT 2
/* The size of `void*', as computed by sizeof. */
#define SIZEOF_VOIDP 4
/* The base type of the last arg to accept */
#define SOCKET_SIZE_TYPE socklen_t
/* Last argument to get/setsockopt */
/* #undef SOCKOPT_OPTLEN_TYPE */
/* Broken sprintf */
/* #undef SPRINTF_RETURNS_GARBAGE */
/* POSIX sprintf */
#define SPRINTF_RETURNS_INT 1
/* Broken sprintf */
/* #undef SPRINTF_RETURNS_PTR */
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at runtime.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
#define STACK_DIRECTION -1 #define STACK_DIRECTION -1
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* d_ino member present in struct dirent */
#define STRUCT_DIRENT_HAS_D_INO 1
/* d_namlen member present in struct dirent */
/* #undef STRUCT_DIRENT_HAS_D_NAMLEN */
/* The struct rlimit type to use with setrlimit */
#define STRUCT_RLIMIT struct rlimit
/* Name of system, eg sun-solaris */
#define SYSTEM_TYPE "pc-linux-gnu"
/* Whether we build for Linux */
#define TARGET_OS_LINUX 1
/* Whether we are building for Solaris */
/* #undef TARGET_OS_SOLARIS */
/* Define if you want to have threaded code. This may be undef on client co
de
*/
#define THREAD 1 #define THREAD 1
/* Should the client be thread safe */
#define THREAD_SAFE_CLIENT 1 #define THREAD_SAFE_CLIENT 1
#define SYSTEM_TYPE "Linux" /* Define to 1 if time_t is unsigned */
#define MACHINE_TYPE "i686" /* #undef TIME_T_UNSIGNED */
/* #undef HAVE_DTRACE */
#define SIGNAL_WITH_VIO_CLOSE 1 /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#define TIME_WITH_SYS_TIME 1
/* Windows stuff, mostly functions, that have Posix analogs but named diffe /* declaration of TIOCSTAT in sys/ioctl.h */
rently */ /* #undef TIOCSTAT_IN_SYS_IOCTL */
/* #undef S_IROTH */
/* #undef S_IFIFO */
/* #undef IPPROTO_IPV6 */
/* #undef IPV6_V6ONLY */
/* #undef sigset_t */
/* #undef mode_t */
/* #undef SIGQUIT */
/* #undef SIGPIPE */
/* #undef isnan */
/* #undef finite */
/* #undef popen */
/* #undef pclose */
/* #undef ssize_t */
/* #undef strcasecmp */
/* #undef strncasecmp */
/* #undef snprintf */
/* #undef strtok_r */
/* #undef strtoll */
/* #undef strtoull */
/* #undef vsnprintf */
#if (_MSC_VER > 1310)
# define HAVE_SETENV
#define setenv(a,b,c) _putenv_s(a,b)
#endif
/* /* Define to 1 if your <sys/time.h> declares `struct tm'. */
MySQL features /* #undef TM_IN_SYS_TIME */
*/
/* #undef ENABLED_LOCAL_INFILE */
#define ENABLED_PROFILING 1
/* #undef EXTRA_DEBUG */
/* #undef BACKUP_TEST */
/* #undef CYBOZU */
/* Character sets and collations */ /* used libedit interface (can we dereference result of
#define MYSQL_DEFAULT_CHARSET_NAME "latin1" rl_completion_entry_function) */
#define MYSQL_DEFAULT_COLLATION_NAME "latin1_swedish_ci" #define USE_LIBEDIT_INTERFACE 1
/* Maria is used for internal temporary tables */
#define USE_MARIA_FOR_TMP_TABLES 1
/* Use multi-byte character routines */
#define USE_MB 1 #define USE_MB 1
/* */
#define USE_MB_IDENT 1 #define USE_MB_IDENT 1
/* #undef USE_STRCOLL */
/* This should mean case insensitive file system */ /* Needs to use mysys_new helpers */
/* #undef FN_NO_CASE_SENSE */ /* #undef USE_MYSYS_NEW */
#define HAVE_CHARSET_armscii8 1 /* used new readline interface (are rl_completion_func_t and
#define HAVE_CHARSET_ascii 1 rl_compentry_func_t defined) */
#define HAVE_CHARSET_big5 1 /* #undef USE_NEW_READLINE_INTERFACE */
#define HAVE_CHARSET_cp1250 1
#define HAVE_CHARSET_cp1251 1
#define HAVE_CHARSET_cp1256 1
#define HAVE_CHARSET_cp1257 1
#define HAVE_CHARSET_cp850 1
#define HAVE_CHARSET_cp852 1
#define HAVE_CHARSET_cp866 1
#define HAVE_CHARSET_cp932 1
#define HAVE_CHARSET_dec8 1
#define HAVE_CHARSET_eucjpms 1
#define HAVE_CHARSET_euckr 1
#define HAVE_CHARSET_gb2312 1
#define HAVE_CHARSET_gbk 1
#define HAVE_CHARSET_geostd8 1
#define HAVE_CHARSET_greek 1
#define HAVE_CHARSET_hebrew 1
#define HAVE_CHARSET_hp8 1
#define HAVE_CHARSET_keybcs2 1
#define HAVE_CHARSET_koi8r 1
#define HAVE_CHARSET_koi8u 1
#define HAVE_CHARSET_latin1 1
#define HAVE_CHARSET_latin2 1
#define HAVE_CHARSET_latin5 1
#define HAVE_CHARSET_latin7 1
#define HAVE_CHARSET_macce 1
#define HAVE_CHARSET_macroman 1
#define HAVE_CHARSET_sjis 1
#define HAVE_CHARSET_swe7 1
#define HAVE_CHARSET_tis620 1
#define HAVE_CHARSET_ucs2 1
#define HAVE_CHARSET_ujis 1
#define HAVE_CHARSET_utf8mb4 1
/* #undef HAVE_CHARSET_utf8mb3 */
#define HAVE_CHARSET_utf8 1
#define HAVE_CHARSET_utf16 1
#define HAVE_CHARSET_utf32 1
#define HAVE_UCA_COLLATIONS 1
#define HAVE_COMPRESS 1
/* /* the pstack backtrace library */
Stuff that always need to be defined (compile breaks without it) /* #undef USE_PSTACK */
*/
#define HAVE_SPATIAL 1
#define HAVE_RTREE_KEYS 1
#define HAVE_QUERY_CACHE 1
#define BIG_TABLES 1
/* /* Version number of package */
Important storage engines (those that really need define #define VERSION "6.0.11-alpha"
WITH_<ENGINE>_STORAGE_ENGINE for the whole server)
*/ /* sighandler type is void (*signal ()) (); */
#define WITH_MYISAM_STORAGE_ENGINE 1 #define VOID_SIGHANDLER 1
#define WITH_MYISAMMRG_STORAGE_ENGINE 1
#define WITH_HEAP_STORAGE_ENGINE 1 /* Include Archive Storage Engine into mysqld */
/* #undef WITH_ARCHIVE_STORAGE_ENGINE */
/* Include Basic Write-only Read-never tables into mysqld */
/* #undef WITH_BLACKHOLE_STORAGE_ENGINE */
/* Include Stores tables in text CSV format into mysqld */
#define WITH_CSV_STORAGE_ENGINE 1 #define WITH_CSV_STORAGE_ENGINE 1
#define WITH_PARTITION_STORAGE_ENGINE 1
#define WITH_PERFSCHEMA_STORAGE_ENGINE 1 /* Include Example for Storage Engines for developers into mysqld */
/* #undef WITH_EXAMPLE_STORAGE_ENGINE */
/* Include Transactional tables using Falcon into mysqld */
/* #undef WITH_FALCON_STORAGE_ENGINE */
/* Include Connects to tables on remote MySQL servers into mysqld */
/* #undef WITH_FEDERATED_STORAGE_ENGINE */
/* Include Volatile memory based tables into mysqld */
#define WITH_HEAP_STORAGE_ENGINE 1
/* Include IBM DB2 for i Storage Engine into mysqld */
/* #undef WITH_IBMDB2I_STORAGE_ENGINE */
/* Include Transactional Tables using InnoDB into mysqld */
/* #undef WITH_INNOBASE_STORAGE_ENGINE */
/* Include Crash-safe tables with MyISAM heritage into mysqld */
#define WITH_MARIA_STORAGE_ENGINE 1
/* Include Merge multiple MySQL tables into one into mysqld */
#define WITH_MYISAMMRG_STORAGE_ENGINE 1
/* Include Traditional non-transactional MySQL tables into mysqld */
#define WITH_MYISAM_STORAGE_ENGINE 1
/* Include High Availability Clustered tables into mysqld */
/* #undef WITH_NDBCLUSTER_STORAGE_ENGINE */ /* #undef WITH_NDBCLUSTER_STORAGE_ENGINE */
#if (WITH_NDBCLUSTER_STORAGE_ENGINE) && !defined(EMBEDDED_LIBRARY)
# define HAVE_NDB_BINLOG 1 /* Including Ndb Cluster Binlog */
/* #undef WITH_NDB_BINLOG */
/* Include MySQL Partitioning Support into mysqld */
/* #undef WITH_PARTITION_STORAGE_ENGINE */
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD
# if defined __BIG_ENDIAN__
# define WORDS_BIGENDIAN 1
# endif
#else
# ifndef WORDS_BIGENDIAN
/* # undef WORDS_BIGENDIAN */
# endif
#endif #endif
#define DEFAULT_MYSQL_HOME "/usr/local/mysql" /* Number of bits in a file offset, on hosts where this is settable. */
#define SHAREDIR "/usr/local/mysql/share" #define _FILE_OFFSET_BITS 64
#define DEFAULT_BASEDIR "/usr/local/mysql"
#define MYSQL_DATADIR "/usr/local/mysql/data"
#define DEFAULT_CHARSET_HOME "/usr/local/mysql"
#define PLUGINDIR "/usr/local/mysql/lib/plugin"
#define DEFAULT_SYSCONFDIR "/usr/local/mysql/etc"
#define PACKAGE "mysql" /* makes fseeko etc. visible, on some hosts. */
#define PACKAGE_BUGREPORT "" #define _LARGEFILE_SOURCE 1
#define PACKAGE_NAME "MySQL Server"
#define PACKAGE_STRING "MySQL Server 5.6.0-m4" /* Large files support on AIX-style hosts. */
#define PACKAGE_TARNAME "mysql" /* #undef _LARGE_FILES */
#define PACKAGE_VERSION "5.6.0-m4"
#define VERSION "5.6.0-m4" /* Define to appropriate substitue if compiler doesnt have __func__ */
#define PROTOCOL_VERSION 10 /* #undef __func__ */
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
/* #undef inline */
#endif #endif
/* Define to `long int' if <sys/types.h> does not define. */
/* #undef off_t */
/* Define to `int' if <sys/types.h> does not define. */
/* #undef pid_t */
/* Define to `unsigned int' if <sys/types.h> does not define. */
/* #undef size_t */
/* Define to unsigned int if you dont have it */
/* #undef socklen_t */
 End of changes. 160 change blocks. 
447 lines changed or deleted 1268 lines changed or added


 my_dbug.h   my_dbug.h 
skipping to change at line 48 skipping to change at line 48
extern void _db_longjmp_(void); extern void _db_longjmp_(void);
extern void _db_process_(const char *name); extern void _db_process_(const char *name);
extern void _db_push_(const char *control); extern void _db_push_(const char *control);
extern void _db_pop_(void); extern void _db_pop_(void);
extern void _db_set_(const char *control); extern void _db_set_(const char *control);
extern void _db_set_init_(const char *control); extern void _db_set_init_(const char *control);
extern void _db_enter_(const char *_func_, const char *_file_, uint _line_, extern void _db_enter_(const char *_func_, const char *_file_, uint _line_,
struct _db_stack_frame_ *_stack_frame_); struct _db_stack_frame_ *_stack_frame_);
extern void _db_return_(uint _line_, struct _db_stack_frame_ *_stack_frame _); extern void _db_return_(uint _line_, struct _db_stack_frame_ *_stack_frame _);
extern void _db_pargs_(uint _line_,const char *keyword); extern void _db_pargs_(uint _line_,const char *keyword);
extern void _db_doprnt_(const char *format,...) extern void _db_doprnt_ _VARARGS((const char *format,...))
ATTRIBUTE_FORMAT(printf, 1, 2); ATTRIBUTE_FORMAT(printf, 1, 2);
extern void _db_dump_(uint _line_,const char *keyword, extern void _db_dump_(uint _line_,const char *keyword,
const unsigned char *memory, size_t length); const unsigned char *memory, size_t length);
extern void _db_end_(void); extern void _db_end_(void);
extern void _db_lock_file_(void); extern void _db_lock_file_(void);
extern void _db_unlock_file_(void); extern void _db_unlock_file_(void);
extern FILE *_db_fp_(void); extern FILE *_db_fp_(void);
extern void _db_flush_(); extern void _db_flush_();
extern const char* _db_get_func_(void);
#define DBUG_ENTER(a) struct _db_stack_frame_ _db_stack_frame_; \ #define DBUG_ENTER(a) struct _db_stack_frame_ _db_stack_frame_; \
_db_enter_ (a,__FILE__,__LINE__,&_db_stack_frame_) _db_enter_ (a,__FILE__,__LINE__,&_db_stack_frame_)
#define DBUG_LEAVE _db_return_ (__LINE__, &_db_stack_frame_) #define DBUG_LEAVE _db_return_ (__LINE__, &_db_stack_frame_)
#define DBUG_RETURN(a1) do {DBUG_LEAVE; return(a1);} while(0) #define DBUG_RETURN(a1) do {DBUG_LEAVE; return(a1);} while(0)
#define DBUG_VOID_RETURN do {DBUG_LEAVE; return;} while(0) #define DBUG_VOID_RETURN do {DBUG_LEAVE; return;} while(0)
#define DBUG_EXECUTE(keyword,a1) \ #define DBUG_EXECUTE(keyword,a1) \
do {if (_db_keyword_(0, (keyword), 0)) { a1 }} while(0) do {if (_db_keyword_(0, (keyword), 0)) { a1 }} while(0)
#define DBUG_EXECUTE_IF(keyword,a1) \ #define DBUG_EXECUTE_IF(keyword,a1) \
do {if (_db_keyword_(0, (keyword), 1)) { a1 }} while(0) do {if (_db_keyword_(0, (keyword), 1)) { a1 }} while(0)
skipping to change at line 91 skipping to change at line 90
#define DBUG_LONGJMP(a1,a2) (_db_longjmp_ (), longjmp (a1, a2)) #define DBUG_LONGJMP(a1,a2) (_db_longjmp_ (), longjmp (a1, a2))
#define DBUG_DUMP(keyword,a1,a2) _db_dump_(__LINE__,keyword,a1,a2) #define DBUG_DUMP(keyword,a1,a2) _db_dump_(__LINE__,keyword,a1,a2)
#define DBUG_END() _db_end_ () #define DBUG_END() _db_end_ ()
#define DBUG_LOCK_FILE _db_lock_file_() #define DBUG_LOCK_FILE _db_lock_file_()
#define DBUG_UNLOCK_FILE _db_unlock_file_() #define DBUG_UNLOCK_FILE _db_unlock_file_()
#define DBUG_ASSERT(A) assert(A) #define DBUG_ASSERT(A) assert(A)
#define DBUG_EXPLAIN(buf,len) _db_explain_(0, (buf),(len)) #define DBUG_EXPLAIN(buf,len) _db_explain_(0, (buf),(len))
#define DBUG_EXPLAIN_INITIAL(buf,len) _db_explain_init_((buf),(len)) #define DBUG_EXPLAIN_INITIAL(buf,len) _db_explain_init_((buf),(len))
#define DEBUGGER_OFF do { _dbug_on_= 0; } while(0) #define DEBUGGER_OFF do { _dbug_on_= 0; } while(0)
#define DEBUGGER_ON do { _dbug_on_= 1; } while(0) #define DEBUGGER_ON do { _dbug_on_= 1; } while(0)
#define IF_DBUG(A) A
#ifndef __WIN__ #ifndef __WIN__
#define DBUG_ABORT() (_db_flush_(), abort()) #define DBUG_ABORT() (_db_flush_(), abort())
#else #else
/* /*
Avoid popup with abort/retry/ignore buttons. When BUG#31745 is fixed we c an Avoid popup with abort/retry/ignore buttons. When BUG#31745 is fixed we c an
call abort() instead of _exit(3) (now it would cause a "test signal" popu p). call abort() instead of _exit(3) (now it would cause a "test signal" popu p).
*/ */
#include <crtdbg.h> #include <crtdbg.h>
#define DBUG_ABORT() (_db_flush_(),\ #define DBUG_ABORT() (_db_flush_(),\
(void)_CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE) ,\ (void)_CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE) ,\
(void)_CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDER R),\ (void)_CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDER R),\
_exit(3)) _exit(3))
#endif #endif
#define DBUG_CHECK_CRASH(func, op) \
do { char _dbuf_[255]; strxnmov(_dbuf_, sizeof(_dbuf_)-1, (func), (op));
\
DBUG_EXECUTE_IF(_dbuf_, DBUG_ABORT()); } while(0)
#define DBUG_CRASH_ENTER(func) \
DBUG_ENTER(func); DBUG_CHECK_CRASH(func, "_crash_enter")
#define DBUG_CRASH_RETURN(val) \
DBUG_CHECK_CRASH(_db_get_func_(), "_crash_return")
#define DBUG_CRASH_VOID_RETURN \
DBUG_CHECK_CRASH (_db_get_func_(), "_crash_return")
#else /* No debugger */ #else /* No debugger */
#define DBUG_ENTER(a1) #define DBUG_ENTER(a1)
#define DBUG_LEAVE #define DBUG_LEAVE
#define DBUG_RETURN(a1) do { return(a1); } while(0) #define DBUG_RETURN(a1) do { return(a1); } while(0)
#define DBUG_VOID_RETURN do { return; } while(0) #define DBUG_VOID_RETURN do { return; } while(0)
#define DBUG_EXECUTE(keyword,a1) do { } while(0) #define DBUG_EXECUTE(keyword,a1) do { } while(0)
#define DBUG_EXECUTE_IF(keyword,a1) do { } while(0) #define DBUG_EXECUTE_IF(keyword,a1) do { } while(0)
#define DBUG_EVALUATE(keyword,a1,a2) (a2) #define DBUG_EVALUATE(keyword,a1,a2) (a2)
skipping to change at line 142 skipping to change at line 133
#define DBUG_DUMP(keyword,a1,a2) do { } while(0) #define DBUG_DUMP(keyword,a1,a2) do { } while(0)
#define DBUG_END() do { } while(0) #define DBUG_END() do { } while(0)
#define DBUG_ASSERT(A) do { } while(0) #define DBUG_ASSERT(A) do { } while(0)
#define DBUG_LOCK_FILE do { } while(0) #define DBUG_LOCK_FILE do { } while(0)
#define DBUG_FILE (stderr) #define DBUG_FILE (stderr)
#define DBUG_UNLOCK_FILE do { } while(0) #define DBUG_UNLOCK_FILE do { } while(0)
#define DBUG_EXPLAIN(buf,len) #define DBUG_EXPLAIN(buf,len)
#define DBUG_EXPLAIN_INITIAL(buf,len) #define DBUG_EXPLAIN_INITIAL(buf,len)
#define DEBUGGER_OFF do { } while(0) #define DEBUGGER_OFF do { } while(0)
#define DEBUGGER_ON do { } while(0) #define DEBUGGER_ON do { } while(0)
#define IF_DBUG(A)
#define DBUG_ABORT() abort() #define DBUG_ABORT() abort()
#define DBUG_CRASH_ENTER(func)
#define DBUG_CRASH_RETURN(val) do { return(val); } while(0)
#define DBUG_CRASH_VOID_RETURN do { return; } while(0)
#endif #endif
#ifdef __cplusplus
#ifdef EXTRA_DEBUG
/**
Sync points allow us to force the server to reach a certain line of code
and block there until the client tells the server it is ok to go on.
The client tells the server to block with SELECT GET_LOCK()
and unblocks it with SELECT RELEASE_LOCK(). Used for debugging difficult
concurrency problems
*/
#define DBUG_SYNC_POINT(lock_name,lock_timeout) \
debug_sync_point(lock_name,lock_timeout)
void debug_sync_point(const char* lock_name, uint lock_timeout);
#else
#define DBUG_SYNC_POINT(lock_name,lock_timeout)
#endif /* EXTRA_DEBUG */
#ifdef __cplusplus
} }
#endif #endif
#endif #endif
 End of changes. 7 change blocks. 
32 lines changed or deleted 4 lines changed or added


 my_dir.h   my_dir.h 
skipping to change at line 16 skipping to change at line 16
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A */ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A */
#ifndef _my_dir_h
#define _my_dir_h
#ifdef __cplusplus
extern "C" {
#endif
#ifndef MY_DIR_H #ifndef MY_DIR_H
#define MY_DIR_H #define MY_DIR_H
#include "my_global.h"
#include <sys/stat.h> #include <sys/stat.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Defines for my_dir and my_stat */ /* Defines for my_dir and my_stat */
#define MY_S_IFMT S_IFMT /* type of file */ #define MY_S_IFMT S_IFMT /* type of file */
#define MY_S_IFDIR S_IFDIR /* directory */ #define MY_S_IFDIR S_IFDIR /* directory */
#define MY_S_IFCHR S_IFCHR /* character special */ #define MY_S_IFCHR S_IFCHR /* character special */
#define MY_S_IFBLK S_IFBLK /* block special */ #define MY_S_IFBLK S_IFBLK /* block special */
#define MY_S_IFREG S_IFREG /* regular */ #define MY_S_IFREG S_IFREG /* regular */
#define MY_S_IFIFO S_IFIFO /* fifo */ #define MY_S_IFIFO S_IFIFO /* fifo */
#define MY_S_ISUID S_ISUID /* set user id on execution */ #define MY_S_ISUID S_ISUID /* set user id on execution */
#define MY_S_ISGID S_ISGID /* set group id on execution */ #define MY_S_ISGID S_ISGID /* set group id on execution */
skipping to change at line 104 skipping to change at line 104
*/ */
struct fileinfo *dir_entry; struct fileinfo *dir_entry;
uint number_off_files; uint number_off_files;
} MY_DIR; } MY_DIR;
extern MY_DIR *my_dir(const char *path,myf MyFlags); extern MY_DIR *my_dir(const char *path,myf MyFlags);
extern void my_dirend(MY_DIR *buffer); extern void my_dirend(MY_DIR *buffer);
extern MY_STAT *my_stat(const char *path, MY_STAT *stat_area, myf my_flags) ; extern MY_STAT *my_stat(const char *path, MY_STAT *stat_area, myf my_flags) ;
extern int my_fstat(int filenr, MY_STAT *stat_area, myf MyFlags); extern int my_fstat(int filenr, MY_STAT *stat_area, myf MyFlags);
#endif /* MY_DIR_H */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif
#endif /* MY_DIR_H */
 End of changes. 5 change blocks. 
6 lines changed or deleted 8 lines changed or added


 my_getopt.h   my_getopt.h 
skipping to change at line 19 skipping to change at line 19
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A */ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A */
#ifndef _my_getopt_h #ifndef _my_getopt_h
#define _my_getopt_h #define _my_getopt_h
#include "my_sys.h" /* loglevel */
C_MODE_START C_MODE_START
#define GET_NO_ARG 1 #define GET_NO_ARG 1
#define GET_BOOL 2 #define GET_BOOL 2
#define GET_INT 3 #define GET_INT 3
#define GET_UINT 4 #define GET_UINT 4
#define GET_LONG 5 #define GET_LONG 5
#define GET_ULONG 6 #define GET_ULONG 6
#define GET_LL 7 #define GET_LL 7
#define GET_ULL 8 #define GET_ULL 8
#define GET_STR 9 #define GET_STR 9
#define GET_STR_ALLOC 10 #define GET_STR_ALLOC 10
#define GET_DISABLED 11 #define GET_DISABLED 11
#define GET_ENUM 12 #define GET_ENUM 12
#define GET_SET 13 #define GET_SET 13
#define GET_DOUBLE 14 #define GET_DOUBLE 14
#define GET_FLAGSET 15
#define GET_ASK_ADDR 128 #define GET_ASK_ADDR 128
#define GET_TYPE_MASK 127 #define GET_TYPE_MASK 127
enum get_opt_arg_type { NO_ARG, OPT_ARG, REQUIRED_ARG }; enum get_opt_arg_type { NO_ARG, OPT_ARG, REQUIRED_ARG };
struct st_typelib; struct st_typelib;
struct my_option struct my_option
{ {
const char *name; /**< Name of the option. name=NULL const char *name; /* Name of the option */
marks the end of the my_option[] int id; /* unique id or short option */
array. const char *comment; /* option comment, for autom. --hel
*/ p */
int id; /**< For 0<id<255 it's means one uchar **value; /* The variable value */
character for a short option uchar **u_max_value; /* The user def. max variable value
(like -A), if >255 no short opti */
on struct st_typelib *typelib; /* Pointer to possible values */
is created, but a long option st ulong var_type;
ill enum get_opt_arg_type arg_type;
can be identified uniquely in th longlong def_value; /* Default value */
e longlong min_value; /* Min allowed value */
my_get_one_option() callback. longlong max_value; /* Max allowed value */
If an opton needs neither specia longlong sub_size; /* Subtract this from given value *
l /
treatment in the my_get_one_opti long block_size; /* Value should be a mult. of this
on() */
nor one-letter short equivalent void *app_type; /* To be used by an application */
use id=0
*/
const char *comment; /**< option comment, for autom. --h
elp.
if it's NULL the option is not
visible in --help.
*/
void *value; /**< A pointer to the variable valu
e */
void *u_max_value; /**< The user def. max variable val
ue */
struct st_typelib *typelib; /**< Pointer to possible values */
ulong var_type; /**< GET_BOOL, GET_ULL, etc */
enum get_opt_arg_type arg_type; /**< e.g. REQUIRED_ARG or OPT_ARG *
/
longlong def_value; /**< Default value */
longlong min_value; /**< Min allowed value (for numbers
) */
longlong max_value; /**< Max allowed value (for numbers
) */
longlong sub_size; /**< Unused
*/
long block_size; /**< Value should be a mult. of thi
s (for numbers) */
void *app_type; /**< To be used by an application *
/
}; };
typedef my_bool (*my_get_one_option)(int, const struct my_option *, char *) typedef my_bool (* my_get_one_option) (int, const struct my_option *, char
; * );
typedef void (*my_error_reporter)(enum loglevel level, const char *format, typedef void (* my_error_reporter) (enum loglevel level, const char *format
...); , ... );
/**
Used to retrieve a reference to the object (variable) that holds the valu
e
for the given option. For example, if var_type is GET_UINT, the function
must return a pointer to a variable of type uint. A argument is stored in
the location pointed to by the returned pointer.
*/
typedef void *(*my_getopt_value)(const char *, uint, const struct my_option
*,
int *);
extern char *disabled_my_option; extern char *disabled_my_option;
extern my_bool my_getopt_print_errors; extern my_bool my_getopt_print_errors;
extern my_bool my_getopt_skip_unknown; extern my_bool my_getopt_skip_unknown;
extern my_error_reporter my_getopt_error_reporter; extern my_error_reporter my_getopt_error_reporter;
extern int handle_options (int *argc, char ***argv, extern int handle_options (int *argc, char ***argv,
const struct my_option *longopts, my_get_one_opti on); const struct my_option *longopts, my_get_one_opti on);
extern void my_cleanup_options(const struct my_option *options); extern void my_cleanup_options(const struct my_option *options);
extern void my_print_help(const struct my_option *options); extern void my_print_help(const struct my_option *options);
extern void my_print_variables(const struct my_option *options); extern void my_print_variables(const struct my_option *options);
extern void my_getopt_register_get_addr(my_getopt_value); extern void my_getopt_register_get_addr(uchar ** (*func_addr)(const char *,
uint,
const struct my_option *, int *));
ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *opt p, ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *opt p,
my_bool *fix); my_bool *fix);
longlong getopt_ll_limit_value(longlong, const struct my_option *, longlong getopt_ll_limit_value(longlong, const struct my_option *,
my_bool *fix); my_bool *fix);
double getopt_double_limit_value(double num, const struct my_option *optp,
my_bool *fix);
my_bool getopt_compare_strings(const char *s, const char *t, uint length); my_bool getopt_compare_strings(const char *s, const char *t, uint length);
C_MODE_END C_MODE_END
#endif /* _my_getopt_h */ #endif /* _my_getopt_h */
 End of changes. 6 change blocks. 
64 lines changed or deleted 25 lines changed or added


 my_global.h   my_global.h 
/* Copyright (C) 2000-2003 MySQL AB, 2009 Sun Microsystems, Inc /* Copyright (C) 2000-2003 MySQL AB
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License. the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A */ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A */
/* This is the include file that should be included 'first' in every C file . */ /* This is the include file that should be included 'first' in every C file . */
#ifndef _global_h #ifndef _global_h
#define _global_h #define _global_h
/* Client library users on Windows need this macro defined here. */
#if !defined(__WIN__) && defined(_WIN32)
#define __WIN__
#endif
/* /*
InnoDB depends on some MySQL internals which other plugins should not InnoDB depends on some MySQL internals which other plugins should not
need. This is because of InnoDB's foreign key support, "safe" binlog need. This is because of InnoDB's foreign key support, "safe" binlog
truncation, and other similar legacy features. truncation, and other similar legacy features.
We define accessors for these internals unconditionally, but do not We define accessors for these internals unconditionally, but do not
expose them in mysql/plugin.h. They are declared in ha_innodb.h for expose them in mysql/plugin.h. They are declared in ha_innodb.h for
InnoDB's use. InnoDB's use.
*/ */
#define INNODB_COMPATIBILITY_HOOKS #define INNODB_COMPATIBILITY_HOOKS
skipping to change at line 49 skipping to change at line 44
#undef WIN #undef WIN
#undef WIN32 #undef WIN32
#undef _WIN #undef _WIN
#undef _WIN32 #undef _WIN32
#undef _WIN64 #undef _WIN64
#undef __WIN__ #undef __WIN__
#undef __WIN32__ #undef __WIN32__
#define HAVE_ERRNO_AS_DEFINE #define HAVE_ERRNO_AS_DEFINE
#endif /* __CYGWIN__ */ #endif /* __CYGWIN__ */
#if defined(__QNXNTO__) && !defined(FD_SETSIZE)
#define FD_SETSIZE 1024 /* Max number of file descriptor bits in
fd_set, used when calling 'select'
Must be defined before including
"sys/select.h" and "sys/time.h"
*/
#endif
/* to make command line shorter we'll define USE_PRAGMA_INTERFACE here */ /* to make command line shorter we'll define USE_PRAGMA_INTERFACE here */
#ifdef USE_PRAGMA_IMPLEMENTATION #ifdef USE_PRAGMA_IMPLEMENTATION
#define USE_PRAGMA_INTERFACE #define USE_PRAGMA_INTERFACE
#endif #endif
#if defined(__OpenBSD__) && (OpenBSD >= 200411)
#define HAVE_ERRNO_AS_DEFINE
#endif
#if defined(i386) && !defined(__i386__) #if defined(i386) && !defined(__i386__)
#define __i386__ #define __i386__
#endif #endif
/* Macros to make switching between C and C++ mode easier */ /* Macros to make switching between C and C++ mode easier */
#ifdef __cplusplus #ifdef __cplusplus
#define C_MODE_START extern "C" { #define C_MODE_START extern "C" {
#define C_MODE_END } #define C_MODE_END }
#define STATIC_CAST(TYPE) static_cast<TYPE>
#else #else
#define C_MODE_START #define C_MODE_START
#define C_MODE_END #define C_MODE_END
#define STATIC_CAST(TYPE) (TYPE)
#endif #endif
#ifdef __cplusplus #if defined(_WIN32) || defined(_WIN64) || defined(__WIN32__) || defined(WIN
#define CPP_UNNAMED_NS_START namespace { 32)
#define CPP_UNNAMED_NS_END } #include <config-win.h>
#endif #elif defined(__NETWARE__)
#include <my_config.h> #include <my_config.h>
#include <config-netware.h>
#ifdef WITH_PERFSCHEMA_STORAGE_ENGINE #if defined(__cplusplus) && defined(inline)
#define HAVE_PSI_INTERFACE #undef inline /* fix configure problem */
#endif /* WITH_PERFSCHEMA_STORAGE_ENGINE */ #endif
/* Make it easier to add conditional code in _expressions_ */
#ifdef __WIN__
#define IF_WIN(A,B) A
#else #else
#define IF_WIN(A,B) B #include <my_config.h>
#if defined(__cplusplus) && defined(inline)
#undef inline /* fix configure problem */
#endif #endif
#endif /* _WIN32... */
#ifdef HAVE_purify /* Make it easier to add conditionl code for windows */
#define IF_PURIFY(A,B) A #ifdef __WIN__
#define IF_WIN(A,B) (A)
#else #else
#define IF_PURIFY(A,B) B #define IF_WIN(A,B) (B)
#endif #endif
#ifndef EMBEDDED_LIBRARY #ifndef EMBEDDED_LIBRARY
#ifdef WITH_NDB_BINLOG #ifdef WITH_NDB_BINLOG
#define HAVE_NDB_BINLOG 1 #define HAVE_NDB_BINLOG 1
#endif #endif
#endif /* !EMBEDDED_LIBRARY */ #endif /* !EMBEDDED_LIBRARY */
#ifndef EMBEDDED_LIBRARY #ifndef EMBEDDED_LIBRARY
#define HAVE_REPLICATION #define HAVE_REPLICATION
#define HAVE_EXTERNAL_CLIENT #define HAVE_EXTERNAL_CLIENT
#endif #endif
#if defined (_WIN32) /* Some defines to avoid ifdefs in the code */
/* #ifndef NETWARE_YIELD
off_t is 32 bit long. We do not use C runtime functions #define NETWARE_YIELD
with off_t but native Win32 file IO APIs, that work with #define NETWARE_SET_SCREEN_MODE(A)
64 bit offsets.
*/
#undef SIZEOF_OFF_T
#define SIZEOF_OFF_T 8
/*
Prevent inclusion of Windows GDI headers - they define symbol
ERROR that conflicts with mysql headers.
*/
#ifndef NOGDI
#define NOGDI
#endif #endif
/* Include common headers.*/
#include <winsock2.h>
#include <ws2tcpip.h> /* SOCKET */
#include <io.h> /* access(), chmod() */
#include <process.h> /* getpid() */
#define sleep(a) Sleep((a)*1000)
/* Define missing access() modes. */
#define F_OK 0
#define W_OK 2
/* Define missing file locking constants. */
#define F_RDLCK 1
#define F_WRLCK 2
#define F_UNLCK 3
#define F_TO_EOF 0x3FFFFFFF
/* Shared memory and named pipe connections are supported. */
#define HAVE_SMEM 1
#define HAVE_NAMED_PIPE 1
#define shared_memory_buffer_length 16000
#define default_shared_memory_base_name "MYSQL"
#endif /* _WIN32*/
/* Workaround for _LARGE_FILES and _LARGE_FILE_API incompatibility on AIX * / /* Workaround for _LARGE_FILES and _LARGE_FILE_API incompatibility on AIX * /
#if defined(_AIX) && defined(_LARGE_FILE_API) #if defined(_AIX) && defined(_LARGE_FILE_API)
#undef _LARGE_FILE_API #undef _LARGE_FILE_API
#endif #endif
/* /*
The macros below are used to allow build of Universal/fat binaries of The macros below are used to allow build of Universal/fat binaries of
MySQL and MySQL applications under darwin. MySQL and MySQL applications under darwin.
*/ */
#if defined(__APPLE__) && defined(__MACH__) #if defined(__APPLE__) && defined(__MACH__)
skipping to change at line 196 skipping to change at line 159
of a condition. This serves two purposes - newer versions of gcc will be of a condition. This serves two purposes - newer versions of gcc will be
able to optimize for branch predication, which could yield siginficant able to optimize for branch predication, which could yield siginficant
performance gains in frequently executed sections of the code, and the performance gains in frequently executed sections of the code, and the
other reason to use them is for documentation other reason to use them is for documentation
*/ */
#if !defined(__GNUC__) || (__GNUC__ == 2 && __GNUC_MINOR__ < 96) #if !defined(__GNUC__) || (__GNUC__ == 2 && __GNUC_MINOR__ < 96)
#define __builtin_expect(x, expected_value) (x) #define __builtin_expect(x, expected_value) (x)
#endif #endif
#define likely(x) __builtin_expect((x),1) /**
#define unlikely(x) __builtin_expect((x),0) The semantics of builtin_expect() are that
1) its two arguments are long
2) it's likely that they are ==
Those of our likely(x) are that x can be bool/int/longlong/pointer.
*/
#define likely(x) __builtin_expect(((x) != 0),1)
#define unlikely(x) __builtin_expect(((x) != 0),0)
/*
The macros below are useful in optimising places where it has been
discovered that cache misses stall the process and where a prefetch
of the cache line can improve matters. This is available in GCC 3.1.1
and later versions.
PREFETCH_READ says that addr is going to be used for reading and that
it is to be kept in caches if possible for a while
PREFETCH_WRITE also says that the item to be cached is likely to be
updated.
The *LOCALITY scripts are also available for experimentation purposes
mostly and should only be used if they are verified to improve matters.
For more input see GCC manual (available in GCC 3.1.1 and later)
*/
#if (__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR > 10)
#define PREFETCH_READ(addr) __builtin_prefetch(addr, 0, 3)
#define PREFETCH_WRITE(addr) \
__builtin_prefetch(addr, 1, 3)
#define PREFETCH_READ_LOCALITY(addr, locality) \
__builtin_prefetch(addr, 0, locality)
#define PREFETCH_WRITE_LOCALITY(addr, locality) \
__builtin_prefetch(addr, 1, locality)
#else
#define PREFETCH_READ(addr)
#define PREFETCH_READ_LOCALITY(addr, locality)
#define PREFETCH_WRITE(addr)
#define PREFETCH_WRITE_LOCALITY(addr, locality)
#endif
/*
The following macro is used to ensure that code often used in most
SQL statements and definitely for parts of the SQL processing are
kept in a code segment by itself. This has the advantage that the
risk of common code being overlapping in caches of the CPU is less.
This can be a cause of big performance problems.
Routines should be put in this category with care and when they are
put there one should also strive to make as much of the error handling
as possible (or uncommon code of the routine) to execute in a
separate method to avoid moving to much code to this code segment.
It is very easy to use, simply add HOT_METHOD at the end of the
function declaration.
For more input see GCC manual (available in GCC 2.95 and later)
*/
#if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR > 94)
#define HOT_METHOD \
__attribute__ ((section ("hot_code_section")))
#else
#define HOT_METHOD
#endif
/*
The following macro is used to ensure that popular global variables
are located next to each other to avoid that they contend for the
same cache lines.
It is very easy to use, simply add HOT_DATA at the end of the declaration
of the variable, the variable must be initialised because of the way
that linker works so a declaration using HOT_DATA should look like:
uint global_hot_data HOT_DATA = 0;
For more input see GCC manual (available in GCC 2.95 and later)
*/
#if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR > 94)
#define HOT_DATA \
__attribute__ ((section ("hot_data_section")))
#else
#define HOT_DATA
#endif
/*
now let's figure out if inline functions are supported
autoconf defines 'inline' to be empty, if not
*/
#define inline_test_1(X) X ## 1
#define inline_test_2(X) inline_test_1(X)
#if inline_test_2(inline) != 1
#define HAVE_INLINE
#endif
#undef inline_test_2
#undef inline_test_1
/* helper macro for "instantiating" inline functions */
#define STATIC_INLINE static inline
/*
The following macros are used to control inlining a bit more than
usual. These macros are used to ensure that inlining always or
never occurs (independent of compilation mode).
For more input see GCC manual (available in GCC 3.1.1 and later)
*/
#if (__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR > 10)
#define ALWAYS_INLINE __attribute__ ((always_inline))
#define NEVER_INLINE __attribute__ ((noinline))
#else
#define ALWAYS_INLINE
#define NEVER_INLINE
#endif
/* Fix problem with S_ISLNK() on Linux */ /* Fix problem with S_ISLNK() on Linux */
#if defined(TARGET_OS_LINUX) || defined(__GLIBC__) #if defined(TARGET_OS_LINUX) || defined(__GLIBC__)
#undef _GNU_SOURCE #undef _GNU_SOURCE
#define _GNU_SOURCE 1 #define _GNU_SOURCE 1
#endif #endif
/* /*
Temporary solution to solve bug#7156. Include "sys/types.h" before Temporary solution to solve bug#7156. Include "sys/types.h" before
the thread headers, else the function madvise() will not be defined the thread headers, else the function madvise() will not be defined
*/ */
#if defined(HAVE_SYS_TYPES_H) && ( defined(sun) || defined(__sun) ) #if defined(HAVE_SYS_TYPES_H) && ( defined(sun) || defined(__sun) )
#include <sys/types.h> #include <sys/types.h>
#endif #endif
/* The client defines this to avoid all thread code */ /* The client defines this to avoid all thread code */
#if defined(MYSQL_CLIENT_NO_THREADS) || defined(UNDEF_THREADS_HACK) #if defined(UNDEF_THREADS_HACK)
#undef THREAD #undef THREAD
#undef HAVE_LINUXTHREADS #undef HAVE_LINUXTHREADS
#undef HAVE_NPTL #undef HAVE_NPTL
#endif #endif
#ifdef HAVE_THREADS_WITHOUT_SOCKETS #ifdef HAVE_THREADS_WITHOUT_SOCKETS
/* MIT pthreads does not work with unix sockets */ /* MIT pthreads does not work with unix sockets */
#undef HAVE_SYS_UN_H #undef HAVE_SYS_UN_H
#endif #endif
skipping to change at line 308 skipping to change at line 377
#undef HAVE_SNPRINTF #undef HAVE_SNPRINTF
#endif #endif
#ifdef HAVE_BROKEN_PREAD #ifdef HAVE_BROKEN_PREAD
/* /*
pread()/pwrite() are not 64 bit safe on HP-UX 11.0 without pread()/pwrite() are not 64 bit safe on HP-UX 11.0 without
installing the kernel patch PHKL_20349 or greater installing the kernel patch PHKL_20349 or greater
*/ */
#undef HAVE_PREAD #undef HAVE_PREAD
#undef HAVE_PWRITE #undef HAVE_PWRITE
#endif #endif
#if defined(HAVE_BROKEN_INLINE) && !defined(__cplusplus)
#undef inline
#define inline
#endif
#ifdef UNDEF_HAVE_GETHOSTBYNAME_R /* For OSF4.x */ #ifdef UNDEF_HAVE_GETHOSTBYNAME_R /* For OSF4.x */
#undef HAVE_GETHOSTBYNAME_R #undef HAVE_GETHOSTBYNAME_R
#endif #endif
#ifdef UNDEF_HAVE_INITGROUPS /* For AIX 4.3 */ #ifdef UNDEF_HAVE_INITGROUPS /* For AIX 4.3 */
#undef HAVE_INITGROUPS #undef HAVE_INITGROUPS
#endif #endif
/* gcc/egcs issues */ /* gcc/egcs issues */
#if defined(__GNUC) && defined(__EXCEPTIONS) #if defined(__GNUC) && defined(__EXCEPTIONS)
#error "Please add -fno-exceptions to CXXFLAGS and reconfigure/recompile" #error "Please add -fno-exceptions to CXXFLAGS and reconfigure/recompile"
#endif #endif
/* Fix a bug in gcc 2.8.0 on IRIX 6.2 */
#if SIZEOF_LONG == 4 && defined(__LONG_MAX__) && (__GNUC__ == 2 && __GNUC_M
INOR__ == 8)
#undef __LONG_MAX__ /* Is a longlong value in gcc 2.8.0 ??? */
#define __LONG_MAX__ 2147483647
#endif
/* egcs 1.1.2 has a problem with memcpy on Alpha */
#if defined(__GNUC__) && defined(__alpha__) && ! (__GNUC__ > 2 || (__GNUC__
== 2 && __GNUC_MINOR__ >= 95))
#define BAD_MEMCPY
#endif
#if defined(_lint) && !defined(lint) #if defined(_lint) && !defined(lint)
#define lint #define lint
#endif #endif
#if SIZEOF_LONG_LONG > 4 && !defined(_LONG_LONG) #if SIZEOF_LONG_LONG > 4 && !defined(_LONG_LONG)
#define _LONG_LONG 1 /* For AIX string library */ #define _LONG_LONG 1 /* For AIX string library */
#endif #endif
#ifndef stdin #ifndef stdin
#include <stdio.h> #include <stdio.h>
#endif #endif
skipping to change at line 357 skipping to change at line 441
#ifdef HAVE_FENV_H #ifdef HAVE_FENV_H
#include <fenv.h> /* For fesetround() */ #include <fenv.h> /* For fesetround() */
#endif #endif
#ifdef HAVE_SYS_TYPES_H #ifdef HAVE_SYS_TYPES_H
#include <sys/types.h> #include <sys/types.h>
#endif #endif
#ifdef HAVE_FCNTL_H #ifdef HAVE_FCNTL_H
#include <fcntl.h> #include <fcntl.h>
#endif #endif
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
#ifdef HAVE_SYS_TIMEB_H #ifdef HAVE_SYS_TIMEB_H
#include <sys/timeb.h> /* Avoid warnings on SCO */ #include <sys/timeb.h> /* Avoid warnings on SCO */
#endif #endif
#if TIME_WITH_SYS_TIME #if TIME_WITH_SYS_TIME
# include <sys/time.h> # include <sys/time.h>
# include <time.h> # include <time.h>
#else #else
# if HAVE_SYS_TIME_H # if HAVE_SYS_TIME_H
# include <sys/time.h> # include <sys/time.h>
# else # else
skipping to change at line 407 skipping to change at line 494
#else #else
#define compile_time_assert(X) \ #define compile_time_assert(X) \
do \ do \
{ \ { \
typedef char compile_time_assert[(X) ? 1 : -1]; \ typedef char compile_time_assert[(X) ? 1 : -1]; \
} while(0) } while(0)
#endif #endif
/* Go around some bugs in different OS and compilers */ /* Go around some bugs in different OS and compilers */
#if defined (HPUX11) && defined(_LARGEFILE_SOURCE) #if defined (HPUX11) && defined(_LARGEFILE_SOURCE)
#ifndef _LARGEFILE64_SOURCE
#define _LARGEFILE64_SOURCE #define _LARGEFILE64_SOURCE
#endif #endif
#endif
#if defined(_HPUX_SOURCE) && defined(HAVE_SYS_STREAM_H) #if defined(_HPUX_SOURCE) && defined(HAVE_SYS_STREAM_H)
#include <sys/stream.h> /* HPUX 10.20 defines ulong here. UG LY !!! */ #include <sys/stream.h> /* HPUX 10.20 defines ulong here. UG LY !!! */
#define HAVE_ULONG #define HAVE_ULONG
#endif #endif
#if defined(HPUX10) && defined(_LARGEFILE64_SOURCE) && defined(THREAD) #if defined(HPUX10) && defined(_LARGEFILE64_SOURCE) && defined(THREAD)
/* Fix bug in setrlimit */ /* Fix bug in setrlimit */
#undef setrlimit #undef setrlimit
#define setrlimit cma_setrlimit64 #define setrlimit cma_setrlimit64
#endif #endif
/* Declare madvise where it is not declared for C++, like Solaris */ /* Declare madvise where it is not declared for C++, like Solaris */
#if HAVE_MADVISE && !HAVE_DECL_MADVISE && defined(__cplusplus) #if HAVE_MADVISE && !HAVE_DECL_MADVISE && defined(__cplusplus)
extern "C" int madvise(void *addr, size_t len, int behav); extern "C" int madvise(void *addr, size_t len, int behav);
#endif #endif
#ifdef __QNXNTO__
/* This has to be after include limits.h */
#define HAVE_ERRNO_AS_DEFINE
#define HAVE_FCNTL_LOCK
#undef HAVE_FINITE
#undef LONGLONG_MIN /* These get wrongly defined in QNX 6.2 */
#undef LONGLONG_MAX /* standard system library 'limits.h' */
#ifdef __cplusplus
#ifndef HAVE_RINT
#define HAVE_RINT
#endif /* rint() and isnan() functions are not */
#define rint(a) std::rint(a) /* visible in C++ scope due to an error */
#define isnan(a) std::isnan(a) /* in the usr/include/math.h on QNX */
#endif
#endif
/* We can not live without the following defines */
#define USE_MYFUNC 1 /* Must use syscall indirection */
#define MASTER 1 /* Compile without unireg */
#define ENGLISH 1 /* Messages in English */
#define POSIX_MISTAKE 1 /* regexp: Fix stupid spec error */
#define USE_REGEX 1 /* We want the use the regex library */
/* Do not define for ultra sparcs */
#define USE_BMOVE512 1 /* Use this unless system bmove is faster */
#define QUOTE_ARG(x) #x /* Quote argument (before cpp) */ #define QUOTE_ARG(x) #x /* Quote argument (before cpp) */
#define STRINGIFY_ARG(x) QUOTE_ARG(x) /* Quote argument, after cpp */ #define STRINGIFY_ARG(x) QUOTE_ARG(x) /* Quote argument, after cpp */
/* Paranoid settings. Define I_AM_PARANOID if you are paranoid */ /* Paranoid settings. Define I_AM_PARANOID if you are paranoid */
#ifdef I_AM_PARANOID #ifdef I_AM_PARANOID
#define DONT_ALLOW_USER_CHANGE 1 #define DONT_ALLOW_USER_CHANGE 1
#define DONT_USE_MYSQL_PWD 1 #define DONT_USE_MYSQL_PWD 1
#endif #endif
/* Does the system remember a signal handler after a signal ? */ /* Does the system remember a signal handler after a signal ? */
#if !defined(HAVE_BSD_SIGNALS) && !defined(HAVE_SIGACTION) #ifndef HAVE_BSD_SIGNALS
#define SIGNAL_HANDLER_RESET_ON_DELIVERY #define DONT_REMEMBER_SIGNAL
#endif #endif
/* #if defined(_lint) || defined(FORCE_INIT_OF_VARS)
Deprecated workaround for false-positive uninitialized variables #define LINT_INIT(var) var=0 /* No uninitialize-warning *
warnings. Those should be silenced using tool-specific heuristics. /
Enabled by default for g++ due to the bug referenced below.
*/
#if defined(_lint) || defined(FORCE_INIT_OF_VARS) || \
(defined(__GNUC__) && defined(__cplusplus))
#define LINT_INIT(var) var= 0
#else #else
#define LINT_INIT(var) #define LINT_INIT(var)
#endif #endif
/* #if defined(_lint) || defined(FORCE_INIT_OF_VARS) || defined(HAVE_purify)
Suppress uninitialized variable warning without generating code. #define PURIFY_OR_LINT_INIT(var) var=0
The _cplusplus is a temporary workaround for C++ code pending a fix
for a g++ bug (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34772).
*/
#if defined(_lint) || defined(FORCE_INIT_OF_VARS) || \
defined(__cplusplus) || !defined(__GNUC__)
#define UNINIT_VAR(x) x= 0
#else #else
/* GCC specific self-initialization which inhibits the warning. */ #define PURIFY_OR_LINT_INIT(var)
#define UNINIT_VAR(x) x= x
#endif #endif
#if !defined(HAVE_UINT) #if !defined(HAVE_UINT)
#undef HAVE_UINT #undef HAVE_UINT
#define HAVE_UINT #define HAVE_UINT
typedef unsigned int uint; typedef unsigned int uint;
typedef unsigned short ushort; typedef unsigned short ushort;
#endif #endif
#define swap_variables(t, a, b) { t dummy; dummy= a; a= b; b= dummy; } #define CMP_NUM(a,b) (((a) < (b)) ? -1 : ((a) == (b)) ? 0 : 1)
#define sgn(a) (((a) < 0) ? -1 : ((a) > 0) ? 1 : 0)
#define swap_variables(t, a, b) { t swap_dummy; swap_dummy= a; a= b; b= swa
p_dummy; }
#define test(a) ((a) ? 1 : 0) #define test(a) ((a) ? 1 : 0)
#define set_if_bigger(a,b) do { if ((a) < (b)) (a)=(b); } while(0) #define set_if_bigger(a,b) do { if ((a) < (b)) (a)=(b); } while(0)
#define set_if_smaller(a,b) do { if ((a) > (b)) (a)=(b); } while(0) #define set_if_smaller(a,b) do { if ((a) > (b)) (a)=(b); } while(0)
#define test_all_bits(a,b) (((a) & (b)) == (b)) #define test_all_bits(a,b) (((a) & (b)) == (b))
#define set_bits(type, bit_count) (sizeof(type)*8 <= (bit_count) ? ~(type) 0 : ((((type) 1) << (bit_count)) - (type) 1))
#define array_elements(A) ((uint) (sizeof(A)/sizeof(A[0]))) #define array_elements(A) ((uint) (sizeof(A)/sizeof(A[0])))
#ifndef HAVE_RINT
/**
All integers up to this number can be represented exactly as double preci
sion
values (DBL_MANT_DIG == 53 for IEEE 754 hardware).
*/
#define MAX_EXACT_INTEGER ((1LL << DBL_MANT_DIG) - 1)
/**
rint(3) implementation for platforms that do not have it.
Always rounds to the nearest integer with ties being rounded to the neare
st
even integer to mimic glibc's rint() behavior in the "round-to-nearest"
FPU mode. Hardware-specific optimizations are possible (frndint on x86).
Unlike this implementation, hardware will also honor the FPU rounding mod
e.
*/
static inline double rint(double x)
{
double f, i;
f = modf(x, &i);
/*
All doubles with absolute values > MAX_EXACT_INTEGER are even anyway,
no need to check it.
*/
if (x > 0.0)
i += (double) ((f > 0.5) || (f == 0.5 &&
i <= (double) MAX_EXACT_INTEGER &&
(longlong) i % 2));
else
i -= (double) ((f < -0.5) || (f == -0.5 &&
i >= (double) -MAX_EXACT_INTEGER &&
(longlong) i % 2));
return i;
}
#endif /* HAVE_RINT */
/* Define some general constants */ /* Define some general constants */
#ifndef TRUE #ifndef TRUE
#define TRUE (1) /* Logical true */ #define TRUE (1) /* Logical true */
#define FALSE (0) /* Logical false */ #define FALSE (0) /* Logical false */
#endif #endif
#include <my_compiler.h> #if defined(__GNUC__)
#define function_volatile volatile
#define my_reinterpret_cast(A) reinterpret_cast<A>
#define my_const_cast(A) const_cast<A>
# ifndef GCC_VERSION
# define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
# endif
#elif !defined(my_reinterpret_cast)
#define my_reinterpret_cast(A) (A)
#define my_const_cast(A) (A)
#endif
#include <my_attribute.h>
/* /*
Wen using the embedded library, users might run into link problems, Wen using the embedded library, users might run into link problems,
duplicate declaration of __cxa_pure_virtual, solved by declaring it a duplicate declaration of __cxa_pure_virtual, solved by declaring it a
weak symbol. weak symbol.
*/ */
#if defined(USE_MYSYS_NEW) && ! defined(DONT_DECLARE_CXA_PURE_VIRTUAL) #if defined(USE_MYSYS_NEW) && ! defined(DONT_DECLARE_CXA_PURE_VIRTUAL)
C_MODE_START C_MODE_START
int __cxa_pure_virtual () __attribute__ ((weak)); int __cxa_pure_virtual () __attribute__ ((weak));
C_MODE_END C_MODE_END
#endif #endif
/* From old s-system.h */
/*
Support macros for non ansi & other old compilers. Since such
things are no longer supported we do nothing. We keep then since
some of our code may still be needed to upgrade old customers.
*/
#define _VARARGS(X) X
#define _STATIC_VARARGS(X) X
/* The DBUG_ON flag always takes precedence over default DBUG_OFF */ /* The DBUG_ON flag always takes precedence over default DBUG_OFF */
#if defined(DBUG_ON) && defined(DBUG_OFF) #if defined(DBUG_ON) && defined(DBUG_OFF)
#undef DBUG_OFF #undef DBUG_OFF
#endif #endif
/* We might be forced to turn debug off, if not turned off already */ /* We might be forced to turn debug off, if not turned off already */
#if (defined(FORCE_DBUG_OFF) || defined(_lint)) && !defined(DBUG_OFF) #if (defined(FORCE_DBUG_OFF) || defined(_lint)) && !defined(DBUG_OFF)
# define DBUG_OFF # define DBUG_OFF
# ifdef DBUG_ON # ifdef DBUG_ON
# undef DBUG_ON # undef DBUG_ON
# endif # endif
#endif #endif
typedef char my_bool; /* Small bool */
#include <my_dbug.h>
#define MIN_ARRAY_SIZE 0 /* Zero or One. Gcc allows zero*/
#define ASCII_BITS_USED 8 /* Bit char used */
#define NEAR_F /* No near function handling */
/* Some types that is different between systems */ /* Some types that is different between systems */
typedef int File; /* File descriptor */ typedef int File; /* File descriptor */
#ifdef _WIN32 #ifndef Socket_defined
typedef SOCKET my_socket;
#else
typedef int my_socket; /* File descriptor for sockets */ typedef int my_socket; /* File descriptor for sockets */
#define INVALID_SOCKET -1 #define INVALID_SOCKET -1
#endif #endif
/* Type for fuctions that handles signals */ /* Type for fuctions that handles signals */
#define sig_handler RETSIGTYPE #define sig_handler void
C_MODE_START C_MODE_START
typedef void (*sig_return)();/* Returns type from signal */ typedef void (*sig_return)();/* Returns type from signal */
C_MODE_END C_MODE_END
#if defined(__GNUC__) && !defined(_lint) #if defined(__GNUC__) && !defined(_lint)
typedef char pchar; /* Mixed prototypes can take char */ typedef char pchar; /* Mixed prototypes can take char */
typedef char puchar; /* Mixed prototypes can take char */ typedef char puchar; /* Mixed prototypes can take char */
typedef char pbool; /* Mixed prototypes can take char */ typedef char pbool; /* Mixed prototypes can take char */
typedef short pshort; /* Mixed prototypes can take short int */ typedef short pshort; /* Mixed prototypes can take short int */
typedef float pfloat; /* Mixed prototypes can take float */ typedef float pfloat; /* Mixed prototypes can take float */
#else #else
skipping to change at line 588 skipping to change at line 749
#endif #endif
/* additional file share flags for win32 */ /* additional file share flags for win32 */
#ifdef __WIN__ #ifdef __WIN__
#define _SH_DENYRWD 0x110 /* deny read/write mode & delete */ #define _SH_DENYRWD 0x110 /* deny read/write mode & delete */
#define _SH_DENYWRD 0x120 /* deny write mode & delete */ #define _SH_DENYWRD 0x120 /* deny write mode & delete */
#define _SH_DENYRDD 0x130 /* deny read mode & delete */ #define _SH_DENYRDD 0x130 /* deny read mode & delete */
#define _SH_DENYDEL 0x140 /* deny delete only */ #define _SH_DENYDEL 0x140 /* deny delete only */
#endif /* __WIN__ */ #endif /* __WIN__ */
/* General constants */ /* #define USE_RECORD_LOCK */
/* Unsigned types supported by the compiler */
#define UNSINT8 /* unsigned int8 (char) */
#define UNSINT16 /* unsigned int16 */
#define UNSINT32 /* unsigned int32 */
/* General constants */
#define FN_LEN 256 /* Max file name len */ #define FN_LEN 256 /* Max file name len */
#define FN_HEADLEN 253 /* Max length of filepart of file name */ #define FN_HEADLEN 253 /* Max length of filepart of file name */
#define FN_EXTLEN 20 /* Max length of extension (part of FN_LEN) */ #define FN_EXTLEN 20 /* Max length of extension (part of FN_LEN) */
#define FN_REFLEN 512 /* Max length of full path-name */ #define FN_REFLEN 512 /* Max length of full path-name */
#define FN_EXTCHAR '.' #define FN_EXTCHAR '.'
#define FN_HOMELIB '~' /* ~/ is used as abbrev for home dir */ #define FN_HOMELIB '~' /* ~/ is used as abbrev for home dir */
#define FN_CURLIB '.' /* ./ is used as abbrev for current dir */ #define FN_CURLIB '.' /* ./ is used as abbrev for current dir */
#define FN_PARENTDIR ".." /* Parent directory; Must be a string */ #define FN_PARENTDIR ".." /* Parent directory; Must be a string */
#ifdef _WIN32 #ifndef FN_LIBCHAR
#define FN_LIBCHAR '\\'
#define FN_LIBCHAR2 '/'
#define FN_ROOTDIR "\\"
#define FN_DEVCHAR ':'
#define FN_NETWORK_DRIVES /* Uses \\ to indicate network drives */
#define FN_NO_CASE_SENCE /* Files are not case-sensitive */
#else
#define FN_LIBCHAR '/' #define FN_LIBCHAR '/'
#define FN_LIBCHAR2 '/'
#define FN_ROOTDIR "/" #define FN_ROOTDIR "/"
#endif #endif
/* /*
MY_FILE_MIN is Windows speciality and is used to quickly detect MY_FILE_MIN is Windows speciality and is used to quickly detect
the mismatch of CRT and mysys file IO usage on Windows at runtime. the mismatch of CRT and mysys file IO usage on Windows at runtime.
CRT file descriptors can be in the range 0-2047, whereas descriptors retu rned CRT file descriptors can be in the range 0-2047, whereas descriptors retu rned
by my_open() will start with 2048. If a file descriptor with value less t hen by my_open() will start with 2048. If a file descriptor with value less t hen
MY_FILE_MIN is passed to mysys IO function, chances are it stemms from MY_FILE_MIN is passed to mysys IO function, chances are it stemms from
open()/fileno() and not my_open()/my_fileno. open()/fileno() and not my_open()/my_fileno.
skipping to change at line 646 skipping to change at line 806
For Posix , my_file_info array is only used to store filenames for For Posix , my_file_info array is only used to store filenames for
error reporting and its size is not a limitation for number of open files . error reporting and its size is not a limitation for number of open files .
*/ */
#ifdef _WIN32 #ifdef _WIN32
#define MY_NFILE (16384 + MY_FILE_MIN) #define MY_NFILE (16384 + MY_FILE_MIN)
#else #else
#define MY_NFILE 64 #define MY_NFILE 64
#endif #endif
#ifndef OS_FILE_LIMIT #ifndef OS_FILE_LIMIT
#define OS_FILE_LIMIT UINT_MAX #define OS_FILE_LIMIT 65535
#endif #endif
/* #define EXT_IN_LIBNAME */
/* #define FN_NO_CASE_SENCE */
/* #define FN_UPPER_CASE TRUE */
/* /*
Io buffer size; Must be a power of 2 and a multiple of 512. May be Io buffer size; Must be a power of 2 and a multiple of 512. May be
smaller what the disk page size. This influences the speed of the smaller what the disk page size. This influences the speed of the
isam btree library. eg to big to slow. isam btree library. eg to big to slow.
*/ */
#define IO_SIZE 4096 #define IO_SIZE 4096
/* /*
How much overhead does malloc have. The code often allocates How much overhead does malloc have. The code often allocates
something like 1024-MALLOC_OVERHEAD bytes something like 1024-MALLOC_OVERHEAD bytes
*/ */
#ifdef SAFEMALLOC
#define MALLOC_OVERHEAD (8+24+4)
#else
#define MALLOC_OVERHEAD 8 #define MALLOC_OVERHEAD 8
#endif
/* get memory in huncs */ /* get memory in huncs */
#define ONCE_ALLOC_INIT (uint) (4096-MALLOC_OVERHEAD) #define ONCE_ALLOC_INIT (uint) (4096-MALLOC_OVERHEAD)
/* Typical record cash */ /* Typical record cash */
#define RECORD_CACHE_SIZE (uint) (64*1024-MALLOC_OVERHEAD) #define RECORD_CACHE_SIZE (uint) (64*1024-MALLOC_OVERHEAD)
/* Typical key cash */ /* Typical key cash */
#define KEY_CACHE_SIZE (uint) (8*1024*1024) #define KEY_CACHE_SIZE (uint) (8*1024*1024-MALLOC_OVERHEAD)
/* Default size of a key cache block */ /* Default size of a key cache block */
#define KEY_CACHE_BLOCK_SIZE (uint) 1024 #define KEY_CACHE_BLOCK_SIZE (uint) 1024
/* Some things that this system doesn't have */ /* Some things that this system doesn't have */
#define NO_HASH /* Not needed anymore */
#ifdef _WIN32 #ifdef _WIN32
#define NO_DIR_LIBRARY /* Not standard dir-library */ #define NO_DIR_LIBRARY /* Not standard dir-library */
#endif #endif
/* Some defines of functions for portability */ /* Some defines of functions for portability */
#undef remove /* Crashes MySQL on SCO 5.0.0 */ #undef remove /* Crashes MySQL on SCO 5.0.0 */
#ifndef __WIN__ #ifndef __WIN__
#define closesocket(A) close(A) #define closesocket(A) close(A)
#endif
#if (_MSC_VER)
#if !defined(_WIN64)
inline double my_ulonglong2double(unsigned long long value)
{
long long nr=(long long) value;
if (nr >= 0)
return (double) nr;
return (18446744073709551616.0 + (double) nr);
}
#define ulonglong2double my_ulonglong2double
#define my_off_t2double my_ulonglong2double
#endif /* _WIN64 */
inline unsigned long long my_double2ulonglong(double d)
{
double t= d - (double) 0x8000000000000000ULL;
if (t >= 0)
return ((unsigned long long) t) + 0x8000000000000000ULL;
return (unsigned long long) d;
}
#define double2ulonglong my_double2ulonglong
#endif
#ifndef ulonglong2double #ifndef ulonglong2double
#define ulonglong2double(A) ((double) (ulonglong) (A)) #define ulonglong2double(A) ((double) (ulonglong) (A))
#define my_off_t2double(A) ((double) (my_off_t) (A)) #define my_off_t2double(A) ((double) (my_off_t) (A))
#endif #endif
#ifndef double2ulonglong #ifndef double2ulonglong
#define double2ulonglong(A) ((ulonglong) (double) (A)) #define double2ulonglong(A) ((ulonglong) (double) (A))
#endif #endif
#endif
#ifndef offsetof #ifndef offsetof
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
#endif #endif
#define ulong_to_double(X) ((double) (ulong) (X)) #define ulong_to_double(X) ((double) (ulong) (X))
#define SET_STACK_SIZE(X) /* Not needed on real machines */
#ifndef STACK_DIRECTION #ifndef STACK_DIRECTION
#error "please add -DSTACK_DIRECTION=1 or -1 to your CPPFLAGS" #error "please add -DSTACK_DIRECTION=1 or -1 to your CPPFLAGS"
#endif #endif
#if !defined(HAVE_STRTOK_R) #if !defined(HAVE_STRTOK_R)
#define strtok_r(A,B,C) strtok((A),(B)) inline char *strtok_r(char *str, const char *delim, char **saveptr)
{
return strtok(str,delim);
}
#endif #endif
/* This is from the old m-machine.h file */ /* This is from the old m-machine.h file */
#if SIZEOF_LONG_LONG > 4 #if SIZEOF_LONG_LONG > 4
#define HAVE_LONG_LONG 1 #define HAVE_LONG_LONG 1
#endif #endif
/* /*
Some pre-ANSI-C99 systems like AIX 5.1 and Linux/GCC 2.95 define Some pre-ANSI-C99 systems like AIX 5.1 and Linux/GCC 2.95 define
ULONGLONG_MAX, LONGLONG_MIN, LONGLONG_MAX; we use them if they're defined . ULONGLONG_MAX, LONGLONG_MIN, LONGLONG_MAX; we use them if they're defined .
Also on Windows we define these constants by hand in config-win.h.
*/ */
#if defined(HAVE_LONG_LONG) && !defined(LONGLONG_MIN) #if defined(HAVE_LONG_LONG) && !defined(LONGLONG_MIN)
#define LONGLONG_MIN ((long long) 0x8000000000000000LL) #define LONGLONG_MIN ((long long) 0x8000000000000000LL)
#define LONGLONG_MAX ((long long) 0x7FFFFFFFFFFFFFFFLL) #define LONGLONG_MAX ((long long) 0x7FFFFFFFFFFFFFFFLL)
#endif #endif
#if defined(HAVE_LONG_LONG) && !defined(ULONGLONG_MAX) #if defined(HAVE_LONG_LONG) && !defined(ULONGLONG_MAX)
/* First check for ANSI C99 definition: */ /* First check for ANSI C99 definition: */
#ifdef ULLONG_MAX #ifdef ULLONG_MAX
#define ULONGLONG_MAX ULLONG_MAX #define ULONGLONG_MAX ULLONG_MAX
#else #else
#define ULONGLONG_MAX ((unsigned long long)(~0ULL)) #define ULONGLONG_MAX ((unsigned long long)(~0ULL))
#endif #endif
#endif /* defined (HAVE_LONG_LONG) && !defined(ULONGLONG_MAX)*/ #endif /* defined (HAVE_LONG_LONG) && !defined(ULONGLONG_MAX)*/
#define INT_MIN64 (~0x7FFFFFFFFFFFFFFFLL)
#define INT_MAX64 0x7FFFFFFFFFFFFFFFLL
#define INT_MIN32 (~0x7FFFFFFFL) #define INT_MIN32 (~0x7FFFFFFFL)
#define INT_MAX32 0x7FFFFFFFL #define INT_MAX32 0x7FFFFFFFL
#define UINT_MAX32 0xFFFFFFFFL #define UINT_MAX32 0xFFFFFFFFL
#define INT_MIN24 (~0x007FFFFF) #define INT_MIN24 (~0x007FFFFF)
#define INT_MAX24 0x007FFFFF #define INT_MAX24 0x007FFFFF
#define UINT_MAX24 0x00FFFFFF #define UINT_MAX24 0x00FFFFFF
#define INT_MIN16 (~0x7FFF) #define INT_MIN16 (~0x7FFF)
#define INT_MAX16 0x7FFF #define INT_MAX16 0x7FFF
#define UINT_MAX16 0xFFFF #define UINT_MAX16 0xFFFF
#define INT_MIN8 (~0x7F) #define INT_MIN8 (~0x7F)
skipping to change at line 777 skipping to change at line 924
/* From limits.h instead */ /* From limits.h instead */
#ifndef DBL_MIN #ifndef DBL_MIN
#define DBL_MIN 4.94065645841246544e-324 #define DBL_MIN 4.94065645841246544e-324
#define FLT_MIN ((float)1.40129846432481707e-45) #define FLT_MIN ((float)1.40129846432481707e-45)
#endif #endif
#ifndef DBL_MAX #ifndef DBL_MAX
#define DBL_MAX 1.79769313486231470e+308 #define DBL_MAX 1.79769313486231470e+308
#define FLT_MAX ((float)3.40282346638528860e+38) #define FLT_MAX ((float)3.40282346638528860e+38)
#endif #endif
#ifndef SIZE_T_MAX #ifndef SIZE_T_MAX
#define SIZE_T_MAX (~((size_t) 0)) #define SIZE_T_MAX ~((size_t) 0)
#endif #endif
#ifndef isfinite #ifndef isfinite
#ifdef HAVE_FINITE #ifdef HAVE_FINITE
#define isfinite(x) finite(x) #define isfinite(x) finite(x)
#else #else
#define finite(x) (1.0 / fabs(x) > 0.0) #define finite(x) (1.0 / fabs(x) > 0.0)
#endif /* HAVE_FINITE */ #endif /* HAVE_FINITE */
#endif /* isfinite */ #endif /* isfinite */
#ifndef HAVE_ISNAN #ifndef HAVE_ISNAN
#define isnan(x) ((x) != (x)) #define isnan(x) ((x) != (x))
#endif #endif
#ifdef HAVE_ISINF #ifdef HAVE_ISINF
/* Check if C compiler is affected by GCC bug #39228 */ /* isinf() can be used in both C and C++ code */
#if !defined(__cplusplus) && defined(HAVE_BROKEN_ISINF)
/* Force store/reload of the argument to/from a 64-bit double */
static inline double my_isinf(double x)
{
volatile double t= x;
return isinf(t);
}
#else
/* System-provided isinf() is available and safe to use */
#define my_isinf(X) isinf(X) #define my_isinf(X) isinf(X)
#endif #else
#else /* !HAVE_ISINF */ #define my_isinf(X) (!isfinite(X) && !isnan(X))
#define my_isinf(X) (!finite(X) && !isnan(X))
#endif #endif
/* Define missing math constants. */ /* Define missing math constants. */
#ifndef M_PI #ifndef M_PI
#define M_PI 3.14159265358979323846 #define M_PI 3.14159265358979323846
#endif #endif
#ifndef M_E #ifndef M_E
#define M_E 2.7182818284590452354 #define M_E 2.7182818284590452354
#endif #endif
#ifndef M_LN2 #ifndef M_LN2
skipping to change at line 833 skipping to change at line 970
*/ */
#if SIZEOF_CHARP == 4 #if SIZEOF_CHARP == 4
typedef long my_ptrdiff_t; typedef long my_ptrdiff_t;
#else #else
typedef long long my_ptrdiff_t; typedef long long my_ptrdiff_t;
#endif #endif
#define MY_ALIGN(A,L) (((A) + (L) - 1) & ~((L) - 1)) #define MY_ALIGN(A,L) (((A) + (L) - 1) & ~((L) - 1))
#define ALIGN_SIZE(A) MY_ALIGN((A),sizeof(double)) #define ALIGN_SIZE(A) MY_ALIGN((A),sizeof(double))
/* Size to make adressable obj. */ /* Size to make adressable obj. */
#define ALIGN_PTR(A, t) ((t*) MY_ALIGN((A),sizeof(t)))
/* Offset of field f in structure t */
#define OFFSET(t, f) ((size_t)(char *)&((t *)0)->f)
#define ADD_TO_PTR(ptr,size,type) (type) ((uchar*) (ptr)+size) #define ADD_TO_PTR(ptr,size,type) (type) ((uchar*) (ptr)+size)
#define PTR_BYTE_DIFF(A,B) (my_ptrdiff_t) ((uchar*) (A) - (uchar*) (B)) #define PTR_BYTE_DIFF(A,B) (my_ptrdiff_t) ((uchar*) (A) - (uchar*) (B))
#define MY_DIV_UP(A, B) (((A) + (B) - 1) / (B))
#define MY_ALIGNED_BYTE_ARRAY(N, S, T) T N[MY_DIV_UP(S, sizeof(T))]
/* /*
Custom version of standard offsetof() macro which can be used to get Custom version of standard offsetof() macro which can be used to get
offsets of members in class for non-POD types (according to the current offsets of members in class for non-POD types (according to the current
version of C++ standard offsetof() macro can't be used in such cases and version of C++ standard offsetof() macro can't be used in such cases and
attempt to do so causes warnings to be emitted, OTOH in many cases it is attempt to do so causes warnings to be emitted, OTOH in many cases it is
still OK to assume that all instances of the class has the same offsets still OK to assume that all instances of the class has the same offsets
for the same members). for the same members).
This is temporary solution which should be removed once File_parser class This is temporary solution which should be removed once File_parser class
and related routines are refactored. and related routines are refactored.
*/ */
#define my_offsetof(TYPE, MEMBER) \ #define my_offsetof(TYPE, MEMBER) \
((size_t)((char *)&(((TYPE *)0x10)->MEMBER) - (char*)0x10)) ((size_t)((char *)&(((TYPE *)0x10)->MEMBER) - (char*)0x10))
#define NullS (char *) 0 #define NullS STATIC_CAST(char *)(0)
/* Nowdays we do not support MessyDos */
#ifdef STDCALL #ifndef NEAR
#undef STDCALL #define NEAR /* Who needs segments ? */
#define FAR /* On a good machine */
#ifndef HUGE_PTR
#define HUGE_PTR
#endif #endif
#endif
#ifdef _WIN32 #if defined(__IBMC__) || defined(__IBMCPP__)
#define STDCALL __stdcall /* This was _System _Export but caused a lot of warnings on _AIX43 */
#else #define STDCALL
#elif !defined( STDCALL)
#define STDCALL #define STDCALL
#endif #endif
/* Typdefs for easyier portability */ /* Typdefs for easyier portability */
#ifndef HAVE_UCHAR #ifndef HAVE_UCHAR
typedef unsigned char uchar; /* Short for unsigned char */ typedef unsigned char uchar; /* Short for unsigned char */
#endif #endif
#ifndef HAVE_INT8 #ifndef HAVE_INT8
skipping to change at line 943 skipping to change at line 1090
#elif SIZEOF_CHARP == SIZEOF_LONG #elif SIZEOF_CHARP == SIZEOF_LONG
typedef long intptr; typedef long intptr;
#elif SIZEOF_CHARP == SIZEOF_LONG_LONG #elif SIZEOF_CHARP == SIZEOF_LONG_LONG
typedef long long intptr; typedef long long intptr;
#else #else
#error sizeof(void *) is neither sizeof(int) nor sizeof(long) nor sizeof(lo ng long) #error sizeof(void *) is neither sizeof(int) nor sizeof(long) nor sizeof(lo ng long)
#endif #endif
#define MY_ERRPTR ((void*)(intptr)1) #define MY_ERRPTR ((void*)(intptr)1)
#if defined(_WIN32) #ifdef USE_RAID
typedef unsigned long long my_off_t; /*
typedef unsigned long long os_off_t; The following is done with a if to not get problems with pre-processors
with late define evaluation
*/
#if SIZEOF_OFF_T == 4
#define SYSTEM_SIZEOF_OFF_T 4
#else #else
typedef off_t os_off_t; #define SYSTEM_SIZEOF_OFF_T 8
#endif
#undef SIZEOF_OFF_T
#define SIZEOF_OFF_T 8
#else
#define SYSTEM_SIZEOF_OFF_T SIZEOF_OFF_T
#endif /* USE_RAID */
#if SIZEOF_OFF_T > 4 #if SIZEOF_OFF_T > 4
typedef ulonglong my_off_t; typedef ulonglong my_off_t;
#else #else
typedef unsigned long my_off_t; typedef unsigned long my_off_t;
#endif #endif
#endif /*_WIN32*/ #define MY_FILEPOS_ERROR (~STATIC_CAST(my_off_t)(0))
#define MY_FILEPOS_ERROR (~(my_off_t) 0) #if !defined(__WIN__)
typedef off_t os_off_t;
/* #endif
TODO Convert these to use Bitmap class.
*/
typedef ulonglong table_map; /* Used for table bits in join */
typedef ulong nesting_map; /* Used for flags of nesting constructs */
#if defined(__WIN__) #if defined(__WIN__)
#define socket_errno WSAGetLastError() #define socket_errno WSAGetLastError()
#define SOCKET_EINTR WSAEINTR #define SOCKET_EINTR WSAEINTR
#define SOCKET_EAGAIN WSAEINPROGRESS #define SOCKET_EAGAIN WSAEINPROGRESS
#define SOCKET_ETIMEDOUT WSAETIMEDOUT #define SOCKET_ETIMEDOUT WSAETIMEDOUT
#define SOCKET_EWOULDBLOCK WSAEWOULDBLOCK #define SOCKET_EWOULDBLOCK WSAEWOULDBLOCK
#define SOCKET_EADDRINUSE WSAEADDRINUSE #define SOCKET_EADDRINUSE WSAEADDRINUSE
#define SOCKET_ENFILE ENFILE #define SOCKET_ENFILE ENFILE
#define SOCKET_EMFILE EMFILE #define SOCKET_EMFILE EMFILE
skipping to change at line 983 skipping to change at line 1137
#define closesocket(A) close(A) #define closesocket(A) close(A)
#define SOCKET_EINTR EINTR #define SOCKET_EINTR EINTR
#define SOCKET_EAGAIN EAGAIN #define SOCKET_EAGAIN EAGAIN
#define SOCKET_ETIMEDOUT SOCKET_EINTR #define SOCKET_ETIMEDOUT SOCKET_EINTR
#define SOCKET_EWOULDBLOCK EWOULDBLOCK #define SOCKET_EWOULDBLOCK EWOULDBLOCK
#define SOCKET_EADDRINUSE EADDRINUSE #define SOCKET_EADDRINUSE EADDRINUSE
#define SOCKET_ENFILE ENFILE #define SOCKET_ENFILE ENFILE
#define SOCKET_EMFILE EMFILE #define SOCKET_EMFILE EMFILE
#endif #endif
typedef uint8 int7; /* Most effective integer 0 <= x <= 127 */
typedef short int15; /* Most effective integer 0 <= x <= 32767 */
typedef int myf; /* Type of MyFlags in my_funcs */ typedef int myf; /* Type of MyFlags in my_funcs */
typedef char my_bool; /* Small bool */ #if !defined(bool) && (!defined(HAVE_BOOL) || !defined(__cplusplus))
typedef char bool; /* Ordinary boolean values 0 1 */
/* Macros for converting *constants* to the right type */ #endif
#define MYF(v) (myf) (v) /* Macros for converting *constants* to the right type */
#define INT8(v) (int8) (v)
#define INT16(v) (int16) (v)
#define INT32(v) (int32) (v)
#define MYF(v) STATIC_CAST(myf)(v)
#ifndef LL #ifndef LL
#ifdef HAVE_LONG_LONG #ifdef HAVE_LONG_LONG
#define LL(A) A ## LL #define LL(A) A ## LL
#else #else
#define LL(A) A ## L #define LL(A) A ## L
#endif #endif
#endif #endif
#ifndef ULL #ifndef ULL
skipping to change at line 1028 skipping to change at line 1188
#define reg9 register #define reg9 register
#define reg10 register #define reg10 register
#define reg11 register #define reg11 register
#define reg12 register #define reg12 register
#define reg13 register #define reg13 register
#define reg14 register #define reg14 register
#define reg15 register #define reg15 register
#define reg16 register #define reg16 register
#endif #endif
#include <my_dbug.h> /*
Sometimes we want to make sure that the variable is not put into
a register in debugging mode so we can see its value in the core
*/
#ifndef DBUG_OFF
#define dbug_volatile volatile
#else
#define dbug_volatile
#endif
/* Some helper macros */ /* Some helper macros */
#define YESNO(X) ((X) ? "yes" : "no") #define YESNO(X) ((X) ? "yes" : "no")
/* Defines for time function */
#define SCALE_SEC 100
#define SCALE_USEC 10000
#define MY_HOW_OFTEN_TO_ALARM 2 /* How often we want info on screen */ #define MY_HOW_OFTEN_TO_ALARM 2 /* How often we want info on screen */
#define MY_HOW_OFTEN_TO_WRITE 1000 /* How often we want info on screen */ #define MY_HOW_OFTEN_TO_WRITE 10000 /* How often we want info on screen */
/* /*
Define-funktions for reading and storing in machine independent format Define-funktions for reading and storing in machine independent format
(low byte first) (low byte first)
*/ */
/* Optimized store functions for Intel x86 */ /* Optimized store functions for Intel x86 */
#if defined(__i386__) || defined(_WIN32) #if defined(__i386__) || defined(_WIN32)
#define sint2korr(A) (*((int16 *) (A))) #define sint2korr(A) (*((const int16 *) (A)))
#define sint3korr(A) ((int32) ((((uchar) (A)[2]) & 128) ? \ #define sint3korr(A) ((int32) ((((uchar) (A)[2]) & 128) ? \
(((uint32) 255L << 24) | \ (((uint32) 255L << 24) | \
(((uint32) (uchar) (A)[2]) << 16) |\ (((uint32) (uchar) (A)[2]) << 16) |\
(((uint32) (uchar) (A)[1]) << 8) | \ (((uint32) (uchar) (A)[1]) << 8) | \
((uint32) (uchar) (A)[0])) : \ ((uint32) (uchar) (A)[0])) : \
(((uint32) (uchar) (A)[2]) << 16) |\ (((uint32) (uchar) (A)[2]) << 16) |\
(((uint32) (uchar) (A)[1]) << 8) | \ (((uint32) (uchar) (A)[1]) << 8) | \
((uint32) (uchar) (A)[0]))) ((uint32) (uchar) (A)[0])))
#define sint4korr(A) (*((long *) (A))) #define sint4korr(A) (*((const long *) (A)))
#define uint2korr(A) (*((uint16 *) (A))) #define uint2korr(A) (*((const uint16 *) (A)))
#if defined(HAVE_purify) && !defined(_WIN32) #if defined(HAVE_purify) && !defined(_WIN32)
#define uint3korr(A) (uint32) (((uint32) ((uchar) (A)[0])) +\ #define uint3korr(A) (uint32) (((uint32) ((uchar) (A)[0])) +\
(((uint32) ((uchar) (A)[1])) << 8) +\ (((uint32) ((uchar) (A)[1])) << 8) +\
(((uint32) ((uchar) (A)[2])) << 16)) (((uint32) ((uchar) (A)[2])) << 16))
#else #else
/* /*
ATTENTION ! ATTENTION !
Please, note, uint3korr reads 4 bytes (not 3) ! Please, note, uint3korr reads 4 bytes (not 3) !
It means, that you have to provide enough allocated space ! It means, that you have to provide enough allocated space !
*/ */
#define uint3korr(A) (long) (*((unsigned int *) (A)) & 0xFFFFFF) #define uint3korr(A) (long) (*((const unsigned int *) (A)) & 0xFFFFFF)
#endif /* HAVE_purify && !_WIN32 */ #endif /* HAVE_purify && !_WIN32 */
#define uint4korr(A) (*((uint32 *) (A))) #define uint4korr(A) (*((const uint32 *) (A)))
#define uint5korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) +\ #define uint5korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) +\
(((uint32) ((uchar) (A)[1])) << 8) +\ (((uint32) ((uchar) (A)[1])) << 8) +\
(((uint32) ((uchar) (A)[2])) << 16) +\ (((uint32) ((uchar) (A)[2])) << 16) +\
(((uint32) ((uchar) (A)[3])) << 24)) +\ (((uint32) ((uchar) (A)[3])) << 24)) +\
(((ulonglong) ((uchar) (A)[4])) << 32)) (((ulonglong) ((uchar) (A)[4])) << 32))
#define uint6korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) + \ #define uint6korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) + \
(((uint32) ((uchar) (A)[1])) << 8) + \ (((uint32) ((uchar) (A)[1])) << 8) + \
(((uint32) ((uchar) (A)[2])) << 16) + \ (((uint32) ((uchar) (A)[2])) << 16) + \
(((uint32) ((uchar) (A)[3])) << 24) ) + \ (((uint32) ((uchar) (A)[3])) << 24) ) + \
(((ulonglong) ((uchar) (A)[4])) << 32) + \ (((ulonglong) ((uchar) (A)[4])) << 32) + \
(((ulonglong) ((uchar) (A)[5])) << 40)) (((ulonglong) ((uchar) (A)[5])) << 40))
#define uint8korr(A) (*((ulonglong *) (A))) #define uint8korr(A) (*((const ulonglong *) (A)))
#define sint8korr(A) (*((longlong *) (A))) #define sint8korr(A) (*((const longlong *) (A)))
#define int2store(T,A) *((uint16*) (T))= (uint16) (A) #define int2store(T,A) *((uint16*) (T))= (uint16) (A)
#define int3store(T,A) do { *(T)= (uchar) ((A));\ #define int3store(T,A) do { *(T)= (uchar) ((A));\
*(T+1)=(uchar) (((uint) (A) >> 8));\ *(T+1)=(uchar) (((uint) (A) >> 8));\
*(T+2)=(uchar) (((A) >> 16)); } while (0) *(T+2)=(uchar) (((A) >> 16)); } while (0)
#define int4store(T,A) *((long *) (T))= (long) (A) #define int4store(T,A) *((long *) (T))= (long) (A)
#define int5store(T,A) do { *(T)= (uchar)((A));\ #define int5store(T,A) do { *(T)= (uchar)((A));\
*((T)+1)=(uchar) (((A) >> 8));\ *((T)+1)=(uchar) (((A) >> 8));\
*((T)+2)=(uchar) (((A) >> 16));\ *((T)+2)=(uchar) (((A) >> 16));\
*((T)+3)=(uchar) (((A) >> 24)); \ *((T)+3)=(uchar) (((A) >> 24)); \
*((T)+4)=(uchar) (((A) >> 32)); } while(0) *((T)+4)=(uchar) (((A) >> 32)); } while(0)
skipping to change at line 1105 skipping to change at line 1277
*((T)+4)=(uchar) (((A) >> 32)); \ *((T)+4)=(uchar) (((A) >> 32)); \
*((T)+5)=(uchar) (((A) >> 40)); } while(0) *((T)+5)=(uchar) (((A) >> 40)); } while(0)
#define int8store(T,A) *((ulonglong *) (T))= (ulonglong) (A) #define int8store(T,A) *((ulonglong *) (T))= (ulonglong) (A)
typedef union { typedef union {
double v; double v;
long m[2]; long m[2];
} doubleget_union; } doubleget_union;
#define doubleget(V,M) \ #define doubleget(V,M) \
do { doubleget_union _tmp; \ do { doubleget_union _tmp; \
_tmp.m[0] = *((long*)(M)); \ _tmp.m[0] = *((const long*)(M)); \
_tmp.m[1] = *(((long*) (M))+1); \ _tmp.m[1] = *(((const long*) (M))+1); \
(V) = _tmp.v; } while(0) (V) = _tmp.v; } while(0)
#define doublestore(T,V) do { *((long *) T) = ((doubleget_union *)&V)->m[0] #define doublestore(T,V) do { *((long *) T) = ((const doubleget_union *)&V)
; \ ->m[0]; \
*(((long *) T)+1) = ((doubleget_union *)&V)->m[ *(((long *) T)+1) = ((const doubleget_union *)&
1]; \ V)->m[1]; \
} while (0) } while (0)
#define float4get(V,M) do { *((float *) &(V)) = *((float*) (M)); } while( 0) #define float4get(V,M) do { *((float *) &(V)) = *((const float*) (M)); } while(0)
#define float8get(V,M) doubleget((V),(M)) #define float8get(V,M) doubleget((V),(M))
#define float4store(V,M) memcpy((uchar*) V,(uchar*) (&M),sizeof(float)) #define float4store(V,M) memcpy((uchar*) V,(const uchar*) (&M),sizeof(float
#define floatstore(T,V) memcpy((uchar*)(T), (uchar*)(&V),sizeof(float)) ))
#define floatget(V,M) memcpy((uchar*) &V,(uchar*) (M),sizeof(float)) #define floatstore(T,V) memcpy((uchar*)(T), (const uchar*)(&V),sizeof(floa
t))
#define floatget(V,M) memcpy((uchar*) &V,(const uchar*) (M),sizeof(float
))
#define float8store(V,M) doublestore((V),(M)) #define float8store(V,M) doublestore((V),(M))
#else #else
/* /*
We're here if it's not a IA-32 architecture (Win32 and UNIX IA-32 defines We're here if it's not a IA-32 architecture (Win32 and UNIX IA-32 defines
were done before) were done before)
*/ */
#define sint2korr(A) (int16) (((int16) ((uchar) (A)[0])) +\ #define sint2korr(A) (int16) (((int16) ((uchar) (A)[0])) +\
((int16) ((int16) (A)[1]) << 8)) ((int16) ((int16) (A)[1]) << 8))
#define sint3korr(A) ((int32) ((((uchar) (A)[2]) & 128) ? \ #define sint3korr(A) ((int32) ((((uchar) (A)[2]) & 128) ? \
skipping to change at line 1228 skipping to change at line 1400
((uchar*) &def_temp)[0]=(M)[7];\ ((uchar*) &def_temp)[0]=(M)[7];\
((uchar*) &def_temp)[1]=(M)[6];\ ((uchar*) &def_temp)[1]=(M)[6];\
((uchar*) &def_temp)[2]=(M)[5];\ ((uchar*) &def_temp)[2]=(M)[5];\
((uchar*) &def_temp)[3]=(M)[4];\ ((uchar*) &def_temp)[3]=(M)[4];\
((uchar*) &def_temp)[4]=(M)[3];\ ((uchar*) &def_temp)[4]=(M)[3];\
((uchar*) &def_temp)[5]=(M)[2];\ ((uchar*) &def_temp)[5]=(M)[2];\
((uchar*) &def_temp)[6]=(M)[1];\ ((uchar*) &def_temp)[6]=(M)[1];\
((uchar*) &def_temp)[7]=(M)[0];\ ((uchar*) &def_temp)[7]=(M)[0];\
(V) = def_temp; } while(0) (V) = def_temp; } while(0)
#else #else
#define float4get(V,M) memcpy(&V, (M), sizeof(float)) #define float4get(V,M) memcpy_fixed((uchar*) &V,(uchar*) (M),sizeof(float
#define float4store(V,M) memcpy(V, (&M), sizeof(float)) ))
#define float4store(V,M) memcpy_fixed((uchar*) V,(uchar*) (&M),sizeof(float
))
#if defined(__FLOAT_WORD_ORDER) && (__FLOAT_WORD_ORDER == __BIG_ENDIAN) #if defined(__FLOAT_WORD_ORDER) && (__FLOAT_WORD_ORDER == __BIG_ENDIAN)
#define doublestore(T,V) do { *(((char*)T)+0)=(char) ((uchar *) &V)[4];\ #define doublestore(T,V) do { *(((char*)T)+0)=(char) ((uchar *) &V)[4];\
*(((char*)T)+1)=(char) ((uchar *) &V)[5];\ *(((char*)T)+1)=(char) ((uchar *) &V)[5];\
*(((char*)T)+2)=(char) ((uchar *) &V)[6];\ *(((char*)T)+2)=(char) ((uchar *) &V)[6];\
*(((char*)T)+3)=(char) ((uchar *) &V)[7];\ *(((char*)T)+3)=(char) ((uchar *) &V)[7];\
*(((char*)T)+4)=(char) ((uchar *) &V)[0];\ *(((char*)T)+4)=(char) ((uchar *) &V)[0];\
*(((char*)T)+5)=(char) ((uchar *) &V)[1];\ *(((char*)T)+5)=(char) ((uchar *) &V)[1];\
*(((char*)T)+6)=(char) ((uchar *) &V)[2];\ *(((char*)T)+6)=(char) ((uchar *) &V)[2];\
*(((char*)T)+7)=(char) ((uchar *) &V)[3]; }\ *(((char*)T)+7)=(char) ((uchar *) &V)[3]; }\
skipping to change at line 1299 skipping to change at line 1471
((uchar*) &def_temp)[3]=(M)[3];\ ((uchar*) &def_temp)[3]=(M)[3];\
(V)=def_temp; } while(0) (V)=def_temp; } while(0)
#define shortstore(T,A) do { uint def_temp=(uint) (A) ;\ #define shortstore(T,A) do { uint def_temp=(uint) (A) ;\
*(((char*)T)+1)=(char)(def_temp); \ *(((char*)T)+1)=(char)(def_temp); \
*(((char*)T)+0)=(char)(def_temp >> 8); } while (0) *(((char*)T)+0)=(char)(def_temp >> 8); } while (0)
#define longstore(T,A) do { *(((char*)T)+3)=((A));\ #define longstore(T,A) do { *(((char*)T)+3)=((A));\
*(((char*)T)+2)=(((A) >> 8));\ *(((char*)T)+2)=(((A) >> 8));\
*(((char*)T)+1)=(((A) >> 16));\ *(((char*)T)+1)=(((A) >> 16));\
*(((char*)T)+0)=(((A) >> 24)); } while(0) *(((char*)T)+0)=(((A) >> 24)); } while(0)
#define floatget(V,M) memcpy(&V, (M), sizeof(float)) #define floatget(V,M) memcpy_fixed((uchar*) &V,(uchar*) (M),sizeof(float
#define floatstore(T,V) memcpy((T), (void*) (&V), sizeof(float)) ))
#define doubleget(V,M) memcpy(&V, (M), sizeof(double)) #define floatstore(T,V) memcpy_fixed((uchar*) (T),(uchar*)(&V),sizeof(floa
#define doublestore(T,V) memcpy((T), (void *) &V, sizeof(double)) t))
#define longlongget(V,M) memcpy(&V, (M), sizeof(ulonglong)) #define doubleget(V,M) memcpy_fixed((uchar*) &V,(uchar*) (M),sizeof(double
#define longlongstore(T,V) memcpy((T), &V, sizeof(ulonglong)) ))
#define doublestore(T,V) memcpy_fixed((uchar*) (T),(uchar*) &V,sizeof(doubl
e))
#define longlongget(V,M) memcpy_fixed((uchar*) &V,(uchar*) (M),sizeof(ulong
long))
#define longlongstore(T,V) memcpy_fixed((uchar*) (T),(uchar*) &V,sizeof(ulo
nglong))
#else #else
#define ushortget(V,M) do { V = uint2korr(M); } while(0) #define ushortget(V,M) do { V = uint2korr(M); } while(0)
#define shortget(V,M) do { V = sint2korr(M); } while(0) #define shortget(V,M) do { V = sint2korr(M); } while(0)
#define longget(V,M) do { V = sint4korr(M); } while(0) #define longget(V,M) do { V = sint4korr(M); } while(0)
#define ulongget(V,M) do { V = uint4korr(M); } while(0) #define ulongget(V,M) do { V = uint4korr(M); } while(0)
#define shortstore(T,V) int2store(T,V) #define shortstore(T,V) int2store(T,V)
#define longstore(T,V) int4store(T,V) #define longstore(T,V) int4store(T,V)
#ifndef floatstore #ifndef floatstore
#define floatstore(T,V) memcpy((T), (void *) (&V), sizeof(float)) #define floatstore(T,V) memcpy_fixed((uchar*) (T),(uchar*) (&V),sizeof(flo
#define floatget(V,M) memcpy(&V, (M), sizeof(float)) at))
#define floatget(V,M) memcpy_fixed((uchar*) &V, (uchar*) (M), sizeof(flo
at))
#endif #endif
#ifndef doubleget #ifndef doubleget
#define doubleget(V,M) memcpy(&V, (M), sizeof(double)) #define doubleget(V,M) memcpy_fixed((uchar*) &V,(uchar*) (M),sizeof(double
#define doublestore(T,V) memcpy((T), (void *) &V, sizeof(double)) ))
#define doublestore(T,V) memcpy_fixed((uchar*) (T),(uchar*) &V,sizeof(doubl
e))
#endif /* doubleget */ #endif /* doubleget */
#define longlongget(V,M) memcpy(&V, (M), sizeof(ulonglong)) #define longlongget(V,M) memcpy_fixed((uchar*) &V,(uchar*) (M),sizeof(ulong
#define longlongstore(T,V) memcpy((T), &V, sizeof(ulonglong)) long))
#define longlongstore(T,V) memcpy_fixed((uchar*) (T),(uchar*) &V,sizeof(ulo
nglong))
#endif /* WORDS_BIGENDIAN */ #endif /* WORDS_BIGENDIAN */
/* sprintf does not always return the number of bytes :- */
#ifdef SPRINTF_RETURNS_INT
#define my_sprintf(buff,args) sprintf args
#else
#ifdef SPRINTF_RETURNS_PTR
#define my_sprintf(buff,args) ((int)(sprintf args - buff))
#else
#define my_sprintf(buff,args) ((ulong) sprintf args, (ulong) strlen(buff))
#endif
#endif
#ifndef THREAD #ifndef THREAD
#define thread_safe_increment(V,L) (V)++ #define thread_safe_increment(V,L) (V)++
#define thread_safe_decrement(V,L) (V)-- #define thread_safe_decrement(V,L) (V)--
#define thread_safe_add(V,C,L) (V)+=(C) #define thread_safe_add(V,C,L) (V)+=(C)
#define thread_safe_sub(V,C,L) (V)-=(C) #define thread_safe_sub(V,C,L) (V)-=(C)
#define statistic_increment(V,L) (V)++ #define statistic_increment(V,L) (V)++
#define statistic_decrement(V,L) (V)-- #define statistic_decrement(V,L) (V)--
#define statistic_add(V,C,L) (V)+=(C) #define statistic_add(V,C,L) (V)+=(C)
#define statistic_sub(V,C,L) (V)-=(C) #define statistic_sub(V,C,L) (V)-=(C)
#endif #endif
#ifdef HAVE_CHARSET_utf8 #if defined(HAVE_CHARSET_utf8mb3) || defined(HAVE_CHARSET_utf8mb4)
#define MYSQL_UNIVERSAL_CLIENT_CHARSET "utf8" #define MYSQL_UNIVERSAL_CLIENT_CHARSET "utf8"
#else #else
#define MYSQL_UNIVERSAL_CLIENT_CHARSET MYSQL_DEFAULT_CHARSET_NAME #define MYSQL_UNIVERSAL_CLIENT_CHARSET MYSQL_DEFAULT_CHARSET_NAME
#endif #endif
#if defined(EMBEDDED_LIBRARY) && !defined(HAVE_EMBEDDED_PRIVILEGE_CONTROL) #if defined(EMBEDDED_LIBRARY) && !defined(HAVE_EMBEDDED_PRIVILEGE_CONTROL)
#define NO_EMBEDDED_ACCESS_CHECKS #define NO_EMBEDDED_ACCESS_CHECKS
#endif #endif
#if defined(_WIN32) #ifdef HAVE_DLOPEN
#define dlsym(lib, name) (void*)GetProcAddress((HMODULE)lib, name) #if defined(__WIN__)
#define dlsym(lib, name) GetProcAddress((HMODULE)lib, name)
#define dlopen(libname, unused) LoadLibraryEx(libname, NULL, 0) #define dlopen(libname, unused) LoadLibraryEx(libname, NULL, 0)
#define dlclose(lib) FreeLibrary((HMODULE)lib) #define dlclose(lib) FreeLibrary((HMODULE)lib)
#define HAVE_DLOPEN #elif defined(HAVE_DLFCN_H)
#endif
#ifdef HAVE_DLOPEN
#if defined(HAVE_DLFCN_H)
#include <dlfcn.h> #include <dlfcn.h>
#endif #endif
#endif #endif
/* FreeBSD 2.2.2 does not define RTLD_NOW) */
#ifndef RTLD_NOW
#define RTLD_NOW 1
#endif
#ifndef HAVE_DLERROR #ifndef HAVE_DLERROR
#define dlerror() "" #define dlerror() ""
#endif #endif
#ifndef __NETWARE__
/* /*
* Include standard definitions of operator new and delete. * Include standard definitions of operator new and delete.
*/ */
#ifdef __cplusplus #ifdef __cplusplus
#include <new> #include <new>
#endif #endif
#else
/*
* Define placement versions of operator new and operator delete since
* we don't have <new> when building for Netware.
*/
#ifdef __cplusplus
inline void *operator new(size_t, void *ptr) { return ptr; }
inline void *operator new[](size_t, void *ptr) { return ptr; }
inline void operator delete(void*, void*) { /* Do nothing */ }
inline void operator delete[](void*, void*) { /* Do nothing */ }
#endif
#endif
/* Length of decimal number represented by INT32. */ /* Length of decimal number represented by INT32. */
#define MY_INT32_NUM_DECIMAL_DIGITS 11 #define MY_INT32_NUM_DECIMAL_DIGITS 11
/* Length of decimal number represented by INT64. */ /* Length of decimal number represented by INT64. */
#define MY_INT64_NUM_DECIMAL_DIGITS 21 #define MY_INT64_NUM_DECIMAL_DIGITS 21
/* Define some useful general macros (should be done after all headers). */ /* Define some useful general macros (should be done after all headers). */
#if !defined(max) #if !defined(max)
#define max(a, b) ((a) > (b) ? (a) : (b)) #define max(a, b) ((a) > (b) ? (a) : (b))
#define min(a, b) ((a) < (b) ? (a) : (b)) #define min(a, b) ((a) < (b) ? (a) : (b))
#endif #endif
/* /*
Only Linux is known to need an explicit sync of the directory to make sur e a Only Linux is known to need an explicit sync of the directory to make sur e a
file creation/deletion/renaming in(from,to) this directory durable. file creation/deletion/renaming in(from,to) this directory durable.
*/ */
#ifdef TARGET_OS_LINUX #ifdef TARGET_OS_LINUX
#define NEED_EXPLICIT_SYNC_DIR 1 #define NEED_EXPLICIT_SYNC_DIR 1
#else #else
/* /*
On linux default rwlock scheduling policy is good enough for On linux default rwlock scheduling policy is good enough for
waiting_threads.c, on other systems use our special implementation waiting_threads.c, on other systems use our special implementation
skipping to change at line 1406 skipping to change at line 1603
QQ perhaps this should be tested in configure ? how ? QQ perhaps this should be tested in configure ? how ?
*/ */
#define WT_RWLOCKS_USE_MUTEXES 1 #define WT_RWLOCKS_USE_MUTEXES 1
#endif #endif
#if !defined(__cplusplus) && !defined(bool) #if !defined(__cplusplus) && !defined(bool)
#define bool In_C_you_should_use_my_bool_instead() #define bool In_C_you_should_use_my_bool_instead()
#endif #endif
/* Provide __func__ macro definition for platforms that miss it. */ /* Provide __func__ macro definition for platforms that miss it. */
#if __STDC_VERSION__ < 199901L #ifndef __func__
# if __GNUC__ >= 2 # if __STDC_VERSION__ < 199901L
# define __func__ __FUNCTION__ # if __GNUC__ >= 2
# define __func__ __FUNCTION__
# else
# define __func__ "<unknown>"
# endif
# elif defined(_MSC_VER)
# if _MSC_VER < 1300
# define __func__ "<unknown>"
# else
# define __func__ __FUNCTION__
# endif
# elif defined(__BORLANDC__)
# define __func__ __FUNC__
# else # else
# define __func__ "<unknown>" # define __func__ "<unknown>"
# endif # endif
#elif defined(_MSC_VER)
# if _MSC_VER < 1300
# define __func__ "<unknown>"
# else
# define __func__ __FUNCTION__
# endif
#elif defined(__BORLANDC__)
# define __func__ __FUNC__
#else
# define __func__ "<unknown>"
#endif #endif
#ifndef HAVE_RINT
/**
All integers up to this number can be represented exactly as double prec
ision
values (DBL_MANT_DIG == 53 for IEEE 754 hardware).
*/
#define MAX_EXACT_INTEGER ((1LL << DBL_MANT_DIG) - 1)
/**
rint(3) implementation for platforms that do not have it.
Always rounds to the nearest integer with ties being rounded to the near
est
even integer to mimic glibc's rint() behavior in the "round-to-nearest"
FPU mode. Hardware-specific optimizations are possible (frndint on x86).
Unlike this implementation, hardware will also honor the FPU rounding mo
de.
*/
static inline double rint(double x)
{
double f, i;
f = modf(x, &i);
/*
All doubles with absolute values > MAX_EXACT_INTEGER are even anyway,
no need to check it.
*/
if (x > 0.0)
i += (double) ((f > 0.5) || (f == 0.5 &&
i <= (double) MAX_EXACT_INTEGER &&
(longlong) i % 2));
else
i -= (double) ((f < -0.5) || (f == -0.5 &&
i >= (double) -MAX_EXACT_INTEGER &&
(longlong) i % 2));
return i;
}
#endif /* HAVE_RINT */
/* /*
MYSQL_PLUGIN_IMPORT macro is used to export mysqld data MYSQL_PLUGIN_IMPORT macro is used to export mysqld data
(i.e variables) for usage in storage engine loadable plugins. (i.e variables) for usage in storage engine loadable plugins.
Outside of Windows, it is dummy. Outside of Windows, it is dummy.
*/ */
#ifndef MYSQL_PLUGIN_IMPORT #ifndef MYSQL_PLUGIN_IMPORT
#if (defined(_WIN32) && defined(MYSQL_DYNAMIC_PLUGIN)) #if (defined(_WIN32) && defined(MYSQL_DYNAMIC_PLUGIN))
#define MYSQL_PLUGIN_IMPORT __declspec(dllimport) #define MYSQL_PLUGIN_IMPORT __declspec(dllimport)
#else #else
#define MYSQL_PLUGIN_IMPORT #define MYSQL_PLUGIN_IMPORT
#endif #endif
#endif #endif
/* Defines that are unique to the embedded version of MySQL */
#ifdef EMBEDDED_LIBRARY
/* Things we don't need in the embedded version of MySQL */
/* TODO HF add #undef HAVE_VIO if we don't want client in embedded library
*/
#undef HAVE_PSTACK /* No stacktrace */
#undef HAVE_OPENSSL
#undef HAVE_SMEM /* No shared memory */
#undef HAVE_NDBCLUSTER_DB /* No NDB cluster */
#endif /* EMBEDDED_LIBRARY */
#endif /* my_global_h */ #endif /* my_global_h */
 End of changes. 90 change blocks. 
288 lines changed or deleted 459 lines changed or added


 my_list.h   my_list.h 
skipping to change at line 40 skipping to change at line 40
extern LIST *list_add(LIST *root,LIST *element); extern LIST *list_add(LIST *root,LIST *element);
extern LIST *list_delete(LIST *root,LIST *element); extern LIST *list_delete(LIST *root,LIST *element);
extern LIST *list_cons(void *data,LIST *root); extern LIST *list_cons(void *data,LIST *root);
extern LIST *list_reverse(LIST *root); extern LIST *list_reverse(LIST *root);
extern void list_free(LIST *root,unsigned int free_data); extern void list_free(LIST *root,unsigned int free_data);
extern unsigned int list_length(LIST *); extern unsigned int list_length(LIST *);
extern int list_walk(LIST *,list_walk_action action,unsigned char * argumen t); extern int list_walk(LIST *,list_walk_action action,unsigned char * argumen t);
#define list_rest(a) ((a)->next) #define list_rest(a) ((a)->next)
#define list_push(a,b) (a)=list_cons((b),(a)) #define list_push(a,b) (a)=list_cons((b),(a))
#define list_pop(A) {LIST *old=(A); (A)=list_delete(old,old); my_free(old); } #define list_pop(A) {LIST *old=(A); (A)=list_delete(old,old) ; my_free((uns igned char *) old,MYF(MY_FAE)); }
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 my_net.h   my_net.h 
skipping to change at line 17 skipping to change at line 17
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A */ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A */
/* /*
thread safe version of some common functions:
my_inet_ntoa
This file is also used to make handling of sockets and ioctl() This file is also used to make handling of sockets and ioctl()
portable accross systems. portable accross systems.
*/ */
#ifndef _my_net_h #ifndef _my_net_h
#define _my_net_h #define _my_net_h
#include "my_global.h" /* C_MODE_START, C_MODE_END */
C_MODE_START C_MODE_START
#include <errno.h> #include <errno.h>
#ifdef HAVE_SYS_SOCKET_H #ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h> #include <sys/socket.h>
#endif #endif
#ifdef HAVE_NETINET_IN_H #ifdef HAVE_NETINET_IN_H
#include <netinet/in.h> #include <netinet/in.h>
#endif #endif
#ifdef HAVE_ARPA_INET_H #ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h> #include <arpa/inet.h>
#endif #endif
#ifdef HAVE_POLL #ifdef HAVE_POLL
#include <sys/poll.h> #include <sys/poll.h>
#endif #endif
#ifdef HAVE_SYS_IOCTL_H #ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h> #include <sys/ioctl.h>
#endif #endif
#if !defined(__WIN__) && !defined(HAVE_BROKEN_NETINET_INCLUDES) #if !defined(__WIN__) && !defined(HAVE_BROKEN_NETINET_INCLUDES) && !defined (__NETWARE__)
#include <netinet/in_systm.h> #include <netinet/in_systm.h>
#include <netinet/in.h> #include <netinet/in.h>
#include <netinet/ip.h> #include <netinet/ip.h>
#if !defined(alpha_linux_port) #if !defined(alpha_linux_port)
#include <netinet/tcp.h> #include <netinet/tcp.h>
#endif #endif
#endif #endif
#if defined(__WIN__) #if defined(__WIN__)
#define O_NONBLOCK 1 /* For emulation of fcntl() */ #define O_NONBLOCK 1 /* For emulation of fcntl() */
skipping to change at line 76 skipping to change at line 76
/* /*
On OSes which don't have the in_addr_t, we guess that using uint32 is the best On OSes which don't have the in_addr_t, we guess that using uint32 is the best
possible choice. We guess this from the fact that on HP-UX64bit & FreeBSD 64bit possible choice. We guess this from the fact that on HP-UX64bit & FreeBSD 64bit
& Solaris64bit, in_addr_t is equivalent to uint32. And on Linux32bit too. & Solaris64bit, in_addr_t is equivalent to uint32. And on Linux32bit too.
*/ */
#ifndef HAVE_IN_ADDR_T #ifndef HAVE_IN_ADDR_T
#define in_addr_t uint32 #define in_addr_t uint32
#endif #endif
/* Thread safe or portable version of some functions */
void my_inet_ntoa(struct in_addr in, char *buf);
/* /*
Handling of gethostbyname_r() Handling of gethostbyname_r()
*/ */
#if !defined(HAVE_GETHOSTBYNAME_R) #if !defined(HAVE_GETHOSTBYNAME_R)
struct hostent *my_gethostbyname_r(const char *name, struct hostent *my_gethostbyname_r(const char *name,
struct hostent *result, char *buffer, struct hostent *result, char *buffer,
int buflen, int *h_errnop); int buflen, int *h_errnop);
void my_gethostbyname_r_free(); void my_gethostbyname_r_free();
#elif defined(HAVE_PTHREAD_ATTR_CREATE) || defined(_AIX) || defined(HAVE_GE THOSTBYNAME_R_GLIBC2_STYLE) #elif defined(HAVE_PTHREAD_ATTR_CREATE) || defined(_AIX) || defined(HAVE_GE THOSTBYNAME_R_GLIBC2_STYLE)
 End of changes. 4 change blocks. 
4 lines changed or deleted 8 lines changed or added


 my_no_pthread.h   my_no_pthread.h 
#ifndef MY_NO_PTHREAD_INCLUDED /* Copyright (C) 2000 MySQL AB
#define MY_NO_PTHREAD_INCLUDED
/* Copyright (C) 2000 MySQL AB, 2008-2009 Sun Microsystems, Inc
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License. the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A */ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A */
#ifndef THREAD #if !defined(_my_no_pthread_h) && !defined(THREAD)
#define _my_no_pthread_h
/* /*
This block is to access some thread-related type definitions This block is to access some thread-related type definitions
even in builds which do not need thread functions, even in builds which do not need thread functions,
as some variables (based on these types) are declared as some variables (based on these types) are declared
even in non-threaded builds. even in non-threaded builds.
Case in point: 'mf_keycache.c' Case in point: 'mf_keycache.c'
*/ */
#if defined(__WIN__) #if defined(__WIN__)
#else /* Normal threads */ #else /* Normal threads */
skipping to change at line 49 skipping to change at line 47
#define pthread_mutex_init(A,B) #define pthread_mutex_init(A,B)
#define pthread_mutex_lock(A) #define pthread_mutex_lock(A)
#define pthread_mutex_unlock(A) #define pthread_mutex_unlock(A)
#define pthread_mutex_destroy(A) #define pthread_mutex_destroy(A)
#define my_rwlock_init(A,B) #define my_rwlock_init(A,B)
#define rw_rdlock(A) #define rw_rdlock(A)
#define rw_wrlock(A) #define rw_wrlock(A)
#define rw_unlock(A) #define rw_unlock(A)
#define rwlock_destroy(A) #define rwlock_destroy(A)
#define mysql_mutex_init(A, B, C) do {} while (0)
#define mysql_mutex_lock(A) do {} while (0)
#define mysql_mutex_unlock(A) do {} while (0)
#define mysql_mutex_destroy(A) do {} while (0)
#define mysql_rwlock_init(A, B, C) do {} while (0)
#define mysql_rwlock_rdlock(A) do {} while (0)
#define mysql_rwlock_wrlock(A) do {} while (0)
#define mysql_rwlock_unlock(A) do {} while (0)
#define mysql_rwlock_destroy(A) do {} while (0)
typedef int my_pthread_once_t;
#define MY_PTHREAD_ONCE_INIT 0
#define MY_PTHREAD_ONCE_DONE 1
#define my_pthread_once(C,F) do { \
if (*(C) != MY_PTHREAD_ONCE_DONE) { F(); *(C)= MY_PTHREAD_ONCE_DONE; }
\
} while(0)
#endif #endif
#endif /* MY_NO_PTHREAD_INCLUDED */
 End of changes. 4 change blocks. 
25 lines changed or deleted 3 lines changed or added


 my_pthread.h   my_pthread.h 
skipping to change at line 21 skipping to change at line 21
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A */ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A */
/* Defines to make different thread packages compatible */ /* Defines to make different thread packages compatible */
#ifndef _my_pthread_h #ifndef _my_pthread_h
#define _my_pthread_h #define _my_pthread_h
#include "my_global.h" /* myf */
#ifndef ETIME #ifndef ETIME
#define ETIME ETIMEDOUT /* For FreeBSD */ #define ETIME ETIMEDOUT /* For FreeBSD */
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
#define EXTERNC extern "C" #define EXTERNC extern "C"
extern "C" { extern "C" {
#else #else
#define EXTERNC #define EXTERNC
#endif /* __cplusplus */ #endif /* __cplusplus */
skipping to change at line 71 skipping to change at line 69
HANDLE events[MAX_EVENTS]; HANDLE events[MAX_EVENTS];
HANDLE broadcast_block_event; HANDLE broadcast_block_event;
} pthread_cond_t; } pthread_cond_t;
typedef int pthread_mutexattr_t; typedef int pthread_mutexattr_t;
#define pthread_self() GetCurrentThreadId() #define pthread_self() GetCurrentThreadId()
#define pthread_handler_t EXTERNC void * __cdecl #define pthread_handler_t EXTERNC void * __cdecl
typedef void * (__cdecl *pthread_handler)(void *); typedef void * (__cdecl *pthread_handler)(void *);
typedef volatile LONG my_pthread_once_t;
#define MY_PTHREAD_ONCE_INIT 0
#define MY_PTHREAD_ONCE_INPROGRESS 1
#define MY_PTHREAD_ONCE_DONE 2
/* /*
Struct and macros to be used in combination with the Struct and macros to be used in combination with the
windows implementation of pthread_cond_timedwait windows implementation of pthread_cond_timedwait
*/ */
/* /*
Declare a union to make sure FILETIME is properly aligned Declare a union to make sure FILETIME is properly aligned
so it can be used directly as a 64 bit value. The value so it can be used directly as a 64 bit value. The value
stored is in 100ns units. stored is in 100ns units.
*/ */
union ft64 { union ft64 {
FILETIME ft; FILETIME ft;
__int64 i64; __int64 i64;
}; };
struct timespec { struct timespec {
union ft64 tv; union ft64 tv;
/* The max timeout value in millisecond for pthread_cond_timedwait */ /* The max timeout value in millisecond for pthread_cond_timedwait */
long max_timeout_msec; long max_timeout_msec;
}; };
#define set_timespec_time_nsec(ABSTIME,TIME,NSEC) do { \ #define set_timespec_time_nsec(ABSTIME,TIME,NSEC) do { \
(ABSTIME).tv.i64= (TIME)+(__int64)(NSEC)/100; \ (ABSTIME).tv.i64= (TIME)+(__int64)(NSEC)/100; \
(ABSTIME).max_timeout_msec= (long)((NSEC)/1000000); \ (ABSTIME).max_timeout_msec= (long)((NSEC)/1000000); \
} while(0) } while(0)
#define set_timespec_nsec(ABSTIME,NSEC) do { \ #define set_timespec_nsec(ABSTIME,NSEC) do { \
union ft64 tv; \ union ft64 tv; \
GetSystemTimeAsFileTime(&tv.ft); \ GetSystemTimeAsFileTime(&tv.ft); \
set_timespec_time_nsec((ABSTIME), tv.i64, (NSEC)); \ set_timespec_time_nsec((ABSTIME), tv.i64, (NSEC)); \
} while(0) } while(0)
/**
Compare two timespec structs.
@retval 1 If TS1 ends after TS2.
@retval 0 If TS1 is equal to TS2.
@retval -1 If TS1 ends before TS2.
*/
#define cmp_timespec(TS1, TS2) \
((TS1.tv.i64 > TS2.tv.i64) ? 1 : \
((TS1.tv.i64 < TS2.tv.i64) ? -1 : 0))
int win_pthread_mutex_trylock(pthread_mutex_t *mutex); int win_pthread_mutex_trylock(pthread_mutex_t *mutex);
int pthread_create(pthread_t *, const pthread_attr_t *, pthread_handler, vo id *); int pthread_create(pthread_t *,pthread_attr_t *,pthread_handler,void *);
int pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr) ; int pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr) ;
int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex); int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex);
int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
struct timespec *abstime); struct timespec *abstime);
int pthread_cond_signal(pthread_cond_t *cond); int pthread_cond_signal(pthread_cond_t *cond);
int pthread_cond_broadcast(pthread_cond_t *cond); int pthread_cond_broadcast(pthread_cond_t *cond);
int pthread_cond_destroy(pthread_cond_t *cond); int pthread_cond_destroy(pthread_cond_t *cond);
int pthread_attr_init(pthread_attr_t *connect_att); int pthread_attr_init(pthread_attr_t *connect_att);
int pthread_attr_setstacksize(pthread_attr_t *connect_att,DWORD stack); int pthread_attr_setstacksize(pthread_attr_t *connect_att,DWORD stack);
int pthread_attr_destroy(pthread_attr_t *connect_att); int pthread_attr_destroy(pthread_attr_t *connect_att);
int my_pthread_once(my_pthread_once_t *once_control,void (*init_routine)(vo id));
struct tm *localtime_r(const time_t *timep,struct tm *tmp); struct tm *localtime_r(const time_t *timep,struct tm *tmp);
struct tm *gmtime_r(const time_t *timep,struct tm *tmp); struct tm *gmtime_r(const time_t *timep,struct tm *tmp);
void pthread_exit(void *a); void pthread_exit(void *a);
int pthread_join(pthread_t thread, void **value_ptr); int pthread_join(pthread_t thread, void **value_ptr);
int pthread_cancel(pthread_t thread);
#ifndef ETIMEDOUT
#define ETIMEDOUT 145 /* Win32 doesn't have this */ #define ETIMEDOUT 145 /* Win32 doesn't have this */
#endif
#define HAVE_LOCALTIME_R 1 #define HAVE_LOCALTIME_R 1
#define _REENTRANT 1 #define _REENTRANT 1
#define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1 #define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1
#undef SAFE_MUTEX /* This will cause conflicts */ #undef SAFE_MUTEX /* This will cause conflicts */
#define pthread_key(T,V) DWORD V #define pthread_key(T,V) DWORD V
#define pthread_key_create(A,B) ((*A=TlsAlloc())==0xFFFFFFFF) #define pthread_key_create(A,B) ((*A=TlsAlloc())==0xFFFFFFFF)
#define pthread_key_delete(A) TlsFree(A) #define pthread_key_delete(A) TlsFree(A)
#define my_pthread_setspecific_ptr(T,V) (!TlsSetValue((T),(V))) #define my_pthread_setspecific_ptr(T,V) (!TlsSetValue((T),(V)))
#define pthread_setspecific(A,B) (!TlsSetValue((A),(B))) #define pthread_setspecific(A,B) (!TlsSetValue((A),(B)))
#define pthread_getspecific(A) (TlsGetValue(A)) #define pthread_getspecific(A) (TlsGetValue(A))
#define my_pthread_getspecific(T,A) ((T) TlsGetValue(A)) #define my_pthread_getspecific(T,A) ((T) TlsGetValue(A))
#define my_pthread_getspecific_ptr(T,V) ((T) TlsGetValue(V)) #define my_pthread_getspecific_ptr(T,V) ((T) TlsGetValue(V))
#define pthread_equal(A,B) ((A) == (B)) #define pthread_equal(A,B) ((A) == (B))
#define pthread_mutex_init(A,B) (InitializeCriticalSection(A),0) #define pthread_mutex_init(A,B) (InitializeCriticalSection(A),0)
#define pthread_mutex_lock(A) (EnterCriticalSection(A),0) #define pthread_mutex_lock(A) (EnterCriticalSection(A),0)
#define pthread_mutex_trylock(A) win_pthread_mutex_trylock((A)) #define pthread_mutex_trylock(A) win_pthread_mutex_trylock((A))
#define pthread_mutex_unlock(A) (LeaveCriticalSection(A), 0) #define pthread_mutex_unlock(A) (LeaveCriticalSection(A),0)
#define pthread_mutex_destroy(A) (DeleteCriticalSection(A), 0) #define pthread_mutex_destroy(A) DeleteCriticalSection(A)
#define pthread_kill(A,B) pthread_dummy((A) ? 0 : ESRCH) #define pthread_kill(A,B) pthread_dummy((A) ? 0 : ESRCH)
/* Dummy defines for easier code */ /* Dummy defines for easier code */
#define pthread_attr_setdetachstate(A,B) pthread_dummy(0) #define pthread_attr_setdetachstate(A,B) pthread_dummy(0)
#define pthread_attr_setscope(A,B) #define pthread_attr_setscope(A,B)
#define pthread_detach_this_thread() #define pthread_detach_this_thread()
#define pthread_condattr_init(A) #define pthread_condattr_init(A)
#define pthread_condattr_destroy(A) #define pthread_condattr_destroy(A)
#define pthread_yield() SwitchToThread() #define pthread_yield() SwitchToThread()
#define my_sigset(A,B) signal(A,B)
#else /* Normal threads */ #else /* Normal threads */
#ifdef HAVE_rts_threads #ifdef HAVE_rts_threads
#define sigwait org_sigwait #define sigwait org_sigwait
#include <signal.h> #include <signal.h>
#undef sigwait #undef sigwait
#endif #endif
#include <pthread.h> #include <pthread.h>
#ifndef _REENTRANT #ifndef _REENTRANT
skipping to change at line 194 skipping to change at line 171
#ifdef HAVE_THR_SETCONCURRENCY #ifdef HAVE_THR_SETCONCURRENCY
#include <thread.h> /* Probably solaris */ #include <thread.h> /* Probably solaris */
#endif #endif
#ifdef HAVE_SCHED_H #ifdef HAVE_SCHED_H
#include <sched.h> #include <sched.h>
#endif #endif
#ifdef HAVE_SYNCH_H #ifdef HAVE_SYNCH_H
#include <synch.h> #include <synch.h>
#endif #endif
#ifdef __NETWARE__
void my_pthread_exit(void *status);
#define pthread_exit(A) my_pthread_exit(A)
#endif
#define pthread_key(T,V) pthread_key_t V #define pthread_key(T,V) pthread_key_t V
#define my_pthread_getspecific_ptr(T,V) my_pthread_getspecific(T,(V)) #define my_pthread_getspecific_ptr(T,V) my_pthread_getspecific(T,(V))
#define my_pthread_setspecific_ptr(T,V) pthread_setspecific(T,(void*) (V)) #define my_pthread_setspecific_ptr(T,V) pthread_setspecific(T,(void*) (V))
#define pthread_detach_this_thread() #define pthread_detach_this_thread()
#define pthread_handler_t EXTERNC void * #define pthread_handler_t EXTERNC void *
typedef void *(* pthread_handler)(void *); typedef void *(* pthread_handler)(void *);
#define my_pthread_once_t pthread_once_t
#define MY_PTHREAD_ONCE_INIT PTHREAD_ONCE_INIT
#define my_pthread_once(C,F) pthread_once(C,F)
/* Test first for RTS or FSU threads */ /* Test first for RTS or FSU threads */
#if defined(PTHREAD_SCOPE_GLOBAL) && !defined(PTHREAD_SCOPE_SYSTEM) #if defined(PTHREAD_SCOPE_GLOBAL) && !defined(PTHREAD_SCOPE_SYSTEM)
#define HAVE_rts_threads #define HAVE_rts_threads
extern int my_pthread_create_detached; extern int my_pthread_create_detached;
#define pthread_sigmask(A,B,C) sigprocmask((A),(B),(C)) #define pthread_sigmask(A,B,C) sigprocmask((A),(B),(C))
#define PTHREAD_CREATE_DETACHED &my_pthread_create_detached #define PTHREAD_CREATE_DETACHED &my_pthread_create_detached
#define PTHREAD_SCOPE_SYSTEM PTHREAD_SCOPE_GLOBAL #define PTHREAD_SCOPE_SYSTEM PTHREAD_SCOPE_GLOBAL
#define PTHREAD_SCOPE_PROCESS PTHREAD_SCOPE_LOCAL #define PTHREAD_SCOPE_PROCESS PTHREAD_SCOPE_LOCAL
#define USE_ALARM_THREAD #define USE_ALARM_THREAD
skipping to change at line 229 skipping to change at line 207
#endif #endif
#ifndef HAVE_NONPOSIX_SIGWAIT #ifndef HAVE_NONPOSIX_SIGWAIT
#define my_sigwait(A,B) sigwait((A),(B)) #define my_sigwait(A,B) sigwait((A),(B))
#else #else
int my_sigwait(const sigset_t *set,int *sig); int my_sigwait(const sigset_t *set,int *sig);
#endif #endif
#ifdef HAVE_NONPOSIX_PTHREAD_MUTEX_INIT #ifdef HAVE_NONPOSIX_PTHREAD_MUTEX_INIT
#ifndef SAFE_MUTEX #ifndef SAFE_MUTEX
#define pthread_mutex_init(a,b) my_pthread_mutex_init((a),(b)) #define pthread_mutex_init(a,b) my_pthread_mutex_noposix_init((a),(b))
extern int my_pthread_mutex_init(pthread_mutex_t *mp, extern int my_pthread_mutex_noposix_init(pthread_mutex_t *mp,
const pthread_mutexattr_t *attr); const pthread_mutexattr_t *attr);
#endif /* SAFE_MUTEX */ #endif /* SAFE_MUTEX */
#define pthread_cond_init(a,b) my_pthread_cond_init((a),(b)) #define pthread_cond_init(a,b) my_pthread_cond_noposix_init((a),(b))
extern int my_pthread_cond_init(pthread_cond_t *mp, extern int my_pthread_cond_noposix_init(pthread_cond_t *mp,
const pthread_condattr_t *attr); const pthread_condattr_t *attr);
#endif /* HAVE_NONPOSIX_PTHREAD_MUTEX_INIT */ #endif /* HAVE_NONPOSIX_PTHREAD_MUTEX_INIT */
#if defined(HAVE_SIGTHREADMASK) && !defined(HAVE_PTHREAD_SIGMASK) #if defined(HAVE_SIGTHREADMASK) && !defined(HAVE_PTHREAD_SIGMASK)
#define pthread_sigmask(A,B,C) sigthreadmask((A),(B),(C)) #define pthread_sigmask(A,B,C) sigthreadmask((A),(B),(C))
#endif #endif
#if !defined(HAVE_SIGWAIT) && !defined(HAVE_rts_threads) && !defined(sigwai t) && !defined(alpha_linux_port) && !defined(HAVE_NONPOSIX_SIGWAIT) && !def ined(HAVE_DEC_3_2_THREADS) && !defined(_AIX) #if !defined(HAVE_SIGWAIT) && !defined(HAVE_rts_threads) && !defined(sigwai t) && !defined(alpha_linux_port) && !defined(HAVE_NONPOSIX_SIGWAIT) && !def ined(HAVE_DEC_3_2_THREADS) && !defined(_AIX)
int sigwait(sigset_t *setp, int *sigp); /* Use our implement ion */ int sigwait(sigset_t *setp, int *sigp); /* Use our implement ion */
#endif #endif
/* /*
We define my_sigset() and use that instead of the system sigset() so that We define my_sigset() and use that instead of the system sigset() so that
we can favor an implementation based on sigaction(). On some systems, suc h we can favor an implementation based on sigaction(). On some systems, suc h
as Mac OS X, sigset() results in flags such as SA_RESTART being set, and as Mac OS X, sigset() results in flags such as SA_RESTART being set, and
we want to make sure that no such flags are set. we want to make sure that no such flags are set.
*/ */
#if defined(HAVE_SIGACTION) && !defined(my_sigset) #if defined(HAVE_SIGACTION) && !defined(my_sigset)
#define my_sigset(A,B) do { struct sigaction l_s; sigset_t l_set; \ #define my_sigset(A,B) do { struct sigaction l_s; sigset_t l_set; int l_rc; \
DBUG_ASSERT((A) != 0); \ DBUG_ASSERT((A) != 0); \
sigemptyset(&l_set); \ sigemptyset(&l_set); \
l_s.sa_handler = (B); \ l_s.sa_handler = (B); \
l_s.sa_mask = l_set; \ l_s.sa_mask = l_set; \
l_s.sa_flags = 0; \ l_s.sa_flags = 0; \
sigaction((A), &l_s, NULL); l_rc= sigaction((A), &l_s, (struct sigaction *)
\ NULL);\
DBUG_ASSERT(l_rc == 0);
\
} while (0) } while (0)
#elif defined(HAVE_SIGSET) && !defined(my_sigset) #elif defined(HAVE_SIGSET) && !defined(my_sigset)
#define my_sigset(A,B) sigset((A),(B)) #define my_sigset(A,B) sigset((A),(B))
#elif !defined(my_sigset) #elif !defined(my_sigset)
#define my_sigset(A,B) signal((A),(B)) #define my_sigset(A,B) signal((A),(B))
#endif #endif
#if !defined(HAVE_PTHREAD_ATTR_SETSCOPE) || defined(HAVE_DEC_3_2_THREADS) #if !defined(HAVE_PTHREAD_ATTR_SETSCOPE) || defined(HAVE_DEC_3_2_THREADS)
#define pthread_attr_setscope(A,B) #define pthread_attr_setscope(A,B)
#undef HAVE_GETHOSTBYADDR_R /* No definition */ #undef HAVE_GETHOSTBYADDR_R /* No definition */
skipping to change at line 348 skipping to change at line 327
#define pthread_attr_init(A) pthread_attr_create(A) #define pthread_attr_init(A) pthread_attr_create(A)
#define pthread_attr_destroy(A) pthread_attr_delete(A) #define pthread_attr_destroy(A) pthread_attr_delete(A)
#define pthread_attr_setdetachstate(A,B) pthread_dummy(0) #define pthread_attr_setdetachstate(A,B) pthread_dummy(0)
#define pthread_create(A,B,C,D) pthread_create((A),*(B),(C),(D)) #define pthread_create(A,B,C,D) pthread_create((A),*(B),(C),(D))
#ifndef pthread_sigmask #ifndef pthread_sigmask
#define pthread_sigmask(A,B,C) sigprocmask((A),(B),(C)) #define pthread_sigmask(A,B,C) sigprocmask((A),(B),(C))
#endif #endif
#define pthread_kill(A,B) pthread_dummy((A) ? 0 : ESRCH) #define pthread_kill(A,B) pthread_dummy((A) ? 0 : ESRCH)
#undef pthread_detach_this_thread #undef pthread_detach_this_thread
#define pthread_detach_this_thread() { pthread_t tmp=pthread_self() ; pthre ad_detach(&tmp); } #define pthread_detach_this_thread() { pthread_t tmp=pthread_self() ; pthre ad_detach(&tmp); }
#else /* HAVE_PTHREAD_ATTR_CREATE && !HAVE_SIGWAIT */ #elif !defined(__NETWARE__) /* HAVE_PTHREAD_ATTR_CREATE && !HAVE_SIGWAIT */
#define HAVE_PTHREAD_KILL #define HAVE_PTHREAD_KILL
#endif #endif
#endif /* defined(__WIN__) */ #endif /* defined(__WIN__) */
#if defined(HPUX10) && !defined(DONT_REMAP_PTHREAD_FUNCTIONS) #if defined(HPUX10) && !defined(DONT_REMAP_PTHREAD_FUNCTIONS)
#undef pthread_cond_timedwait #undef pthread_cond_timedwait
#define pthread_cond_timedwait(a,b,c) my_pthread_cond_timedwait((a),(b),(c) ) #define pthread_cond_timedwait(a,b,c) my_pthread_cond_timedwait((a),(b),(c) )
int my_pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, int my_pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
struct timespec *abstime); struct timespec *abstime);
skipping to change at line 388 skipping to change at line 367
#elif defined(HAVE_THR_YIELD) #elif defined(HAVE_THR_YIELD)
#define pthread_yield() thr_yield() #define pthread_yield() thr_yield()
#endif #endif
#endif #endif
/* /*
The defines set_timespec and set_timespec_nsec should be used The defines set_timespec and set_timespec_nsec should be used
for calculating an absolute time at which for calculating an absolute time at which
pthread_cond_timedwait should timeout pthread_cond_timedwait should timeout
*/ */
#define set_timespec(ABSTIME,SEC) set_timespec_nsec((ABSTIME),(SEC)*1000000 000ULL) #define set_timespec(ABSTIME,SEC) set_timespec_nsec((ABSTIME),(SEC)*1000000 000ULL)
#ifndef set_timespec_nsec #ifndef set_timespec_nsec
#define set_timespec_nsec(ABSTIME,NSEC) \ #define set_timespec_nsec(ABSTIME,NSEC) \
set_timespec_time_nsec((ABSTIME),my_getsystime(),(NSEC)) set_timespec_time_nsec((ABSTIME),my_getsystime(),(NSEC))
#endif /* !set_timespec_nsec */ #endif /* !set_timespec_nsec */
/* adapt for two different flavors of struct timespec */ /* adapt for two different flavors of struct timespec */
#ifdef HAVE_TIMESPEC_TS_SEC #ifdef HAVE_TIMESPEC_TS_SEC
#define MY_tv_sec ts_sec #define MY_tv_sec ts_sec
#define MY_tv_nsec ts_nsec #define MY_tv_nsec ts_nsec
#else #else
#define MY_tv_sec tv_sec #define MY_tv_sec tv_sec
#define MY_tv_nsec tv_nsec #define MY_tv_nsec tv_nsec
#endif /* HAVE_TIMESPEC_TS_SEC */ #endif /* HAVE_TIMESPEC_TS_SEC */
#ifndef set_timespec_time_nsec #ifndef set_timespec_time_nsec
#define set_timespec_time_nsec(ABSTIME,TIME,NSEC) do { \ #define set_timespec_time_nsec(ABSTIME,TIME,NSEC) do { \
ulonglong nsec= (NSEC); \ ulonglong nsec= (NSEC); \
ulonglong now= (TIME) + (nsec/100); \ ulonglong now= (TIME) + (nsec/100); \
(ABSTIME).MY_tv_sec= (now / 10000000ULL); \ (ABSTIME).MY_tv_sec= (now / ULL(10000000)); \
(ABSTIME).MY_tv_nsec= (now % 10000000ULL * 100 + (nsec % 100)); \ (ABSTIME).MY_tv_nsec= (now % ULL(10000000) * 100 + (nsec % 100)); \
} while(0) } while(0)
#endif /* !set_timespec_time_nsec */ #endif /* !set_timespec_time_nsec */
/** /* safe_mutex adds checking to mutex for easier debugging */
Compare two timespec structs.
@retval 1 If TS1 ends after TS2. #if defined(__NETWARE__) && !defined(SAFE_MUTEX_DETECT_DESTROY)
#define SAFE_MUTEX_DETECT_DESTROY
@retval 0 If TS1 is equal to TS2. #endif
struct st_hash;
@retval -1 If TS1 ends before TS2.
*/
#ifdef HAVE_TIMESPEC_TS_SEC
#ifndef cmp_timespec
#define cmp_timespec(TS1, TS2) \
((TS1.ts_sec > TS2.ts_sec || \
(TS1.ts_sec == TS2.ts_sec && TS1.ts_nsec > TS2.ts_nsec)) ? 1 : \
((TS1.ts_sec < TS2.ts_sec || \
(TS1.ts_sec == TS2.ts_sec && TS1.ts_nsec < TS2.ts_nsec)) ? -1 : 0))
#endif /* !cmp_timespec */
#else
#ifndef cmp_timespec
#define cmp_timespec(TS1, TS2) \
((TS1.tv_sec > TS2.tv_sec || \
(TS1.tv_sec == TS2.tv_sec && TS1.tv_nsec > TS2.tv_nsec)) ? 1 : \
((TS1.tv_sec < TS2.tv_sec || \
(TS1.tv_sec == TS2.tv_sec && TS1.tv_nsec < TS2.tv_nsec)) ? -1 : 0))
#endif /* !cmp_timespec */
#endif /* HAVE_TIMESPEC_TS_SEC */
/* safe_mutex adds checking to mutex for easier debugging */
typedef struct st_safe_mutex_t typedef struct st_safe_mutex_t
{ {
pthread_mutex_t global,mutex; pthread_mutex_t global,mutex;
const char *file; const char *file, *name;
uint line,count; uint line,count;
myf create_flags, active_flags;
ulong id;
pthread_t thread; pthread_t thread;
struct st_hash *locked_mutex, *used_mutex;
struct st_safe_mutex_t *prev, *next;
#ifdef SAFE_MUTEX_DETECT_DESTROY #ifdef SAFE_MUTEX_DETECT_DESTROY
struct st_safe_mutex_info_t *info; /* to track destroying of mutexes */ struct st_safe_mutex_info_t *info; /* to track destroying of mutexes */
#endif #endif
} safe_mutex_t; } safe_mutex_t;
typedef struct st_safe_mutex_deadlock_t
{
const char *file, *name;
safe_mutex_t *mutex;
uint line;
ulong count;
ulong id;
my_bool warning_only;
} safe_mutex_deadlock_t;
#ifdef SAFE_MUTEX_DETECT_DESTROY #ifdef SAFE_MUTEX_DETECT_DESTROY
/* /*
Used to track the destroying of mutexes. This needs to be a seperate Used to track the destroying of mutexes. This needs to be a seperate
structure because the safe_mutex_t structure could be freed before structure because the safe_mutex_t structure could be freed before
the mutexes are destroyed. the mutexes are destroyed.
*/ */
typedef struct st_safe_mutex_info_t typedef struct st_safe_mutex_info_t
{ {
struct st_safe_mutex_info_t *next; struct st_safe_mutex_info_t *next;
struct st_safe_mutex_info_t *prev; struct st_safe_mutex_info_t *prev;
const char *init_file; const char *init_file;
uint32 init_line; uint32 init_line;
} safe_mutex_info_t; } safe_mutex_info_t;
#endif /* SAFE_MUTEX_DETECT_DESTROY */ #endif /* SAFE_MUTEX_DETECT_DESTROY */
int safe_mutex_init(safe_mutex_t *mp, const pthread_mutexattr_t *attr, int safe_mutex_init(safe_mutex_t *mp, const pthread_mutexattr_t *attr,
const char *name, myf my_flags,
const char *file, uint line); const char *file, uint line);
int safe_mutex_lock(safe_mutex_t *mp, my_bool try_lock, const char *file, u int safe_mutex_lock(safe_mutex_t *mp, myf my_flags, const char *file,
int line); uint line);
int safe_mutex_unlock(safe_mutex_t *mp,const char *file, uint line); int safe_mutex_unlock(safe_mutex_t *mp,const char *file, uint line);
int safe_mutex_destroy(safe_mutex_t *mp,const char *file, uint line); int safe_mutex_destroy(safe_mutex_t *mp,const char *file, uint line);
int safe_cond_wait(pthread_cond_t *cond, safe_mutex_t *mp,const char *file, int safe_cond_wait(pthread_cond_t *cond, safe_mutex_t *mp,const char *file,
uint line); uint line);
int safe_cond_timedwait(pthread_cond_t *cond, safe_mutex_t *mp, int safe_cond_timedwait(pthread_cond_t *cond, safe_mutex_t *mp,
struct timespec *abstime, const char *file, uint lin e); struct timespec *abstime, const char *file, uint lin e);
void safe_mutex_global_init(void); void safe_mutex_global_init(void);
void safe_mutex_end(FILE *file); void safe_mutex_end(FILE *file);
void safe_mutex_free_deadlock_data(safe_mutex_t *mp);
/* Wrappers if safe mutex is actually used */ /* Wrappers if safe mutex is actually used */
#define MYF_TRY_LOCK 1
#define MYF_NO_DEADLOCK_DETECTION 2
#ifdef SAFE_MUTEX #ifdef SAFE_MUTEX
#undef pthread_mutex_init #undef pthread_mutex_init
#undef pthread_mutex_lock #undef pthread_mutex_lock
#undef pthread_mutex_unlock #undef pthread_mutex_unlock
#undef pthread_mutex_destroy #undef pthread_mutex_destroy
#undef pthread_mutex_wait #undef pthread_mutex_wait
#undef pthread_mutex_timedwait #undef pthread_mutex_timedwait
#undef pthread_mutex_t #undef pthread_mutex_t
#undef pthread_cond_wait #undef pthread_cond_wait
#undef pthread_cond_timedwait #undef pthread_cond_timedwait
#undef pthread_mutex_trylock #undef pthread_mutex_trylock
#define pthread_mutex_init(A,B) safe_mutex_init((A),(B),__FILE__,__LINE__) #define my_pthread_mutex_init(A,B,C,D) safe_mutex_init((A),(B),(C),(D),__FI
#define pthread_mutex_lock(A) safe_mutex_lock((A), FALSE, __FILE__, __LINE_ LE__,__LINE__)
_) #define pthread_mutex_init(A,B) safe_mutex_init((A),(B),#A,0,__FILE__,__LIN
E__)
#define pthread_mutex_lock(A) safe_mutex_lock((A), 0, __FILE__, __LINE__)
#define my_pthread_mutex_lock(A,B) safe_mutex_lock((A), (B), __FILE__, __LI
NE__)
#define pthread_mutex_unlock(A) safe_mutex_unlock((A),__FILE__,__LINE__) #define pthread_mutex_unlock(A) safe_mutex_unlock((A),__FILE__,__LINE__)
#define pthread_mutex_destroy(A) safe_mutex_destroy((A),__FILE__,__LINE__) #define pthread_mutex_destroy(A) safe_mutex_destroy((A),__FILE__,__LINE__)
#define pthread_cond_wait(A,B) safe_cond_wait((A),(B),__FILE__,__LINE__) #define pthread_cond_wait(A,B) safe_cond_wait((A),(B),__FILE__,__LINE__)
#define pthread_cond_timedwait(A,B,C) safe_cond_timedwait((A),(B),(C),__FIL E__,__LINE__) #define pthread_cond_timedwait(A,B,C) safe_cond_timedwait((A),(B),(C),__FIL E__,__LINE__)
#define pthread_mutex_trylock(A) safe_mutex_lock((A), TRUE, __FILE__, __LIN E__) #define pthread_mutex_trylock(A) safe_mutex_lock((A), MYF_TRY_LOCK, __FILE_ _, __LINE__)
#define pthread_mutex_t safe_mutex_t #define pthread_mutex_t safe_mutex_t
#define safe_mutex_assert_owner(mp) \ #define safe_mutex_assert_owner(mp) \
DBUG_ASSERT((mp)->count > 0 && \ DBUG_ASSERT((mp)->count > 0 && \
pthread_equal(pthread_self(), (mp)->thread)) pthread_equal(pthread_self(), (mp)->thread))
#define safe_mutex_assert_not_owner(mp) \ #define safe_mutex_assert_not_owner(mp) \
DBUG_ASSERT(! (mp)->count || \ DBUG_ASSERT(! (mp)->count || \
! pthread_equal(pthread_self(), (mp)->thread)) ! pthread_equal(pthread_self(), (mp)->thread))
#else #else
#define my_pthread_mutex_init(A,B,C,D) pthread_mutex_init((A),(B))
#define my_pthread_mutex_lock(A,B) pthread_mutex_lock(A)
#define safe_mutex_assert_owner(mp) #define safe_mutex_assert_owner(mp)
#define safe_mutex_assert_not_owner(mp) #define safe_mutex_assert_not_owner(mp)
#endif /* SAFE_MUTEX */ #endif /* SAFE_MUTEX */
#if defined(MY_PTHREAD_FASTMUTEX) && !defined(SAFE_MUTEX) #if defined(MY_PTHREAD_FASTMUTEX) && !defined(SAFE_MUTEX)
typedef struct st_my_pthread_fastmutex_t typedef struct st_my_pthread_fastmutex_t
{ {
pthread_mutex_t mutex; pthread_mutex_t mutex;
uint spins; uint spins;
uint rng_state; uint rng_state;
skipping to change at line 579 skipping to change at line 561
#define rw_trywrlock(A) pthread_rwlock_trywrlock((A)) #define rw_trywrlock(A) pthread_rwlock_trywrlock((A))
#define rw_unlock(A) pthread_rwlock_unlock(A) #define rw_unlock(A) pthread_rwlock_unlock(A)
#define rwlock_destroy(A) pthread_rwlock_destroy(A) #define rwlock_destroy(A) pthread_rwlock_destroy(A)
#elif defined(HAVE_RWLOCK_INIT) #elif defined(HAVE_RWLOCK_INIT)
#ifdef HAVE_RWLOCK_T /* For example Solaris 2.6-> */ #ifdef HAVE_RWLOCK_T /* For example Solaris 2.6-> */
#define rw_lock_t rwlock_t #define rw_lock_t rwlock_t
#endif #endif
#define my_rwlock_init(A,B) rwlock_init((A),USYNC_THREAD,0) #define my_rwlock_init(A,B) rwlock_init((A),USYNC_THREAD,0)
#else #else
/* Use our own version of read/write locks */ /* Use our own version of read/write locks */
#define NEED_MY_RW_LOCK 1 typedef struct _my_rw_lock_t {
pthread_mutex_t lock; /* lock for structure */
pthread_cond_t readers; /* waiting readers */
pthread_cond_t writers; /* waiting writers */
int state; /* -1:writer,0:free,>0:readers */
int waiters; /* number of waiting writers */
} my_rw_lock_t;
#define rw_lock_t my_rw_lock_t #define rw_lock_t my_rw_lock_t
#define my_rwlock_init(A,B) my_rw_init((A), 0)
#define rw_rdlock(A) my_rw_rdlock((A)) #define rw_rdlock(A) my_rw_rdlock((A))
#define rw_wrlock(A) my_rw_wrlock((A)) #define rw_wrlock(A) my_rw_wrlock((A))
#define rw_tryrdlock(A) my_rw_tryrdlock((A)) #define rw_tryrdlock(A) my_rw_tryrdlock((A))
#define rw_trywrlock(A) my_rw_trywrlock((A)) #define rw_trywrlock(A) my_rw_trywrlock((A))
#define rw_unlock(A) my_rw_unlock((A)) #define rw_unlock(A) my_rw_unlock((A))
#define rwlock_destroy(A) my_rw_destroy((A)) #define rwlock_destroy(A) my_rwlock_destroy((A))
#endif /* USE_MUTEX_INSTEAD_OF_RW_LOCKS */
/*
Portable read-write locks which prefer readers.
Required by some algorithms in order to provide correctness.
*/
#if defined(HAVE_PTHREAD_RWLOCK_RDLOCK) && defined(HAVE_PTHREAD_RWLOCKATTR_
SETKIND_NP)
/*
On systems which have a way to specify that readers should
be preferred through attribute mechanism (e.g. Linux) we use
system implementation of read/write locks.
*/
#define rw_pr_lock_t pthread_rwlock_t
extern int rw_pr_init(rw_pr_lock_t *);
#define rw_pr_rdlock(A) pthread_rwlock_rdlock(A)
#define rw_pr_wrlock(A) pthread_rwlock_wrlock(A)
#define rw_pr_tryrdlock(A) pthread_rwlock_tryrdlock(A)
#define rw_pr_trywrlock(A) pthread_rwlock_trywrlock(A)
#define rw_pr_unlock(A) pthread_rwlock_unlock(A)
#define rw_pr_destroy(A) pthread_rwlock_destroy(A)
#else
/* Otherwise we have to use our own implementation of read/write locks. */
#define NEED_MY_RW_LOCK 1
struct st_my_rw_lock_t;
#define rw_pr_lock_t my_rw_lock_t
extern int rw_pr_init(struct st_my_rw_lock_t *);
#define rw_pr_rdlock(A) my_rw_rdlock((A))
#define rw_pr_wrlock(A) my_rw_wrlock((A))
#define rw_pr_tryrdlock(A) my_rw_tryrdlock((A))
#define rw_pr_trywrlock(A) my_rw_trywrlock((A))
#define rw_pr_unlock(A) my_rw_unlock((A))
#define rw_pr_destroy(A) my_rw_destroy((A))
#endif /* defined(HAVE_PTHREAD_RWLOCK_RDLOCK) && defined(HAVE_PTHREAD_RWLOC
KATTR_SETKIND_NP) */
#ifdef NEED_MY_RW_LOCK
/*
On systems which don't support native read/write locks, or don't support
read/write locks which prefer readers we have to use own implementation.
*/
typedef struct st_my_rw_lock_t {
pthread_mutex_t lock; /* lock for structure */
pthread_cond_t readers; /* waiting readers */
pthread_cond_t writers; /* waiting writers */
int state; /* -1:writer,0:free,>0:readers */
int waiters; /* number of waiting writers */
my_bool prefer_readers;
} my_rw_lock_t;
extern int my_rw_init(my_rw_lock_t *, my_bool *); extern int my_rwlock_init(my_rw_lock_t *, void *);
extern int my_rw_destroy(my_rw_lock_t *); extern int my_rwlock_destroy(my_rw_lock_t *);
extern int my_rw_rdlock(my_rw_lock_t *); extern int my_rw_rdlock(my_rw_lock_t *);
extern int my_rw_wrlock(my_rw_lock_t *); extern int my_rw_wrlock(my_rw_lock_t *);
extern int my_rw_unlock(my_rw_lock_t *); extern int my_rw_unlock(my_rw_lock_t *);
extern int my_rw_tryrdlock(my_rw_lock_t *); extern int my_rw_tryrdlock(my_rw_lock_t *);
extern int my_rw_trywrlock(my_rw_lock_t *); extern int my_rw_trywrlock(my_rw_lock_t *);
#endif /* NEED_MY_RW_LOCK */ #endif /* USE_MUTEX_INSTEAD_OF_RW_LOCKS */
#define GETHOSTBYADDR_BUFF_SIZE 2048 #define GETHOSTBYADDR_BUFF_SIZE 2048
#ifndef HAVE_THR_SETCONCURRENCY #ifndef HAVE_THR_SETCONCURRENCY
#define thr_setconcurrency(A) pthread_dummy(0) #define thr_setconcurrency(A) pthread_dummy(0)
#endif #endif
#if !defined(HAVE_PTHREAD_ATTR_SETSTACKSIZE) && ! defined(pthread_attr_sets tacksize) #if !defined(HAVE_PTHREAD_ATTR_SETSTACKSIZE) && ! defined(pthread_attr_sets tacksize)
#define pthread_attr_setstacksize(A,B) pthread_dummy(0) #define pthread_attr_setstacksize(A,B) pthread_dummy(0)
#endif #endif
skipping to change at line 678 skipping to change at line 617
#define MY_MUTEX_INIT_ERRCHK NULL #define MY_MUTEX_INIT_ERRCHK NULL
#endif #endif
#ifndef ESRCH #ifndef ESRCH
/* Define it to something */ /* Define it to something */
#define ESRCH 1 #define ESRCH 1
#endif #endif
typedef ulong my_thread_id; typedef ulong my_thread_id;
extern void my_threadattr_global_init(void);
extern my_bool my_thread_global_init(void); extern my_bool my_thread_global_init(void);
extern my_bool my_thread_basic_global_init(void);
extern void my_thread_basic_global_reinit(void);
extern void my_thread_global_end(void); extern void my_thread_global_end(void);
extern my_bool my_thread_init(void); extern my_bool my_thread_init(void);
extern void my_thread_end(void); extern void my_thread_end(void);
extern const char *my_thread_name(void); extern const char *my_thread_name(void);
extern my_thread_id my_thread_dbug_id(void); extern my_thread_id my_thread_dbug_id(void);
extern int pthread_no_free(void *);
extern int pthread_dummy(int); extern int pthread_dummy(int);
/* All thread specific variables are in the following struct */ /* All thread specific variables are in the following struct */
#define THREAD_NAME_SIZE 10 #define THREAD_NAME_SIZE 10
#ifndef DEFAULT_THREAD_STACK #ifndef DEFAULT_THREAD_STACK
#if SIZEOF_CHARP > 4 #if SIZEOF_CHARP > 4
/* /*
MySQL can survive with 32K, but some glibc libraries require > 128K stack MySQL can survive with 32K, but some glibc libraries require > 128K stack
To resolve hostnames. Also recursive stored procedures needs stack. To resolve hostnames. Also recursive stored procedures needs stack.
*/ */
#define DEFAULT_THREAD_STACK (256*1024L) #define DEFAULT_THREAD_STACK (256*1024L)
#else #else
#define DEFAULT_THREAD_STACK (192*1024) #define DEFAULT_THREAD_STACK (195*1024)
#endif #endif
#endif #endif
#include <mysql/psi/mysql_thread.h> #define MY_PTHREAD_LOCK_READ 0
#define MY_PTHREAD_LOCK_WRITE 1
#define INSTRUMENT_ME 0
struct st_my_thread_var struct st_my_thread_var
{ {
int thr_errno; int thr_errno;
mysql_cond_t suspend; pthread_cond_t suspend;
mysql_mutex_t mutex; pthread_mutex_t mutex;
mysql_mutex_t * volatile current_mutex; pthread_mutex_t * volatile current_mutex;
mysql_cond_t * volatile current_cond; pthread_cond_t * volatile current_cond;
pthread_t pthread_self; pthread_t pthread_self;
my_thread_id id; my_thread_id id;
int cmp_length; int cmp_length;
int volatile abort; int volatile abort;
my_bool init; my_bool init;
struct st_my_thread_var *next,**prev; struct st_my_thread_var *next,**prev;
void *opt_info; void *opt_info;
uint lock_type; /* used by conditional release the queue */
void *stack_ends_here; void *stack_ends_here;
safe_mutex_t *mutex_in_use;
#ifndef DBUG_OFF #ifndef DBUG_OFF
void *dbug; void *dbug;
char name[THREAD_NAME_SIZE+1]; char name[THREAD_NAME_SIZE+1];
#endif #endif
}; };
extern struct st_my_thread_var *_my_thread_var(void) __attribute__ ((const) ); extern struct st_my_thread_var *_my_thread_var(void) __attribute__ ((const) );
extern void **my_thread_var_dbug(); extern void **my_thread_var_dbug();
extern safe_mutex_t **my_thread_var_mutex_in_use();
extern uint my_thread_end_wait_time; extern uint my_thread_end_wait_time;
extern my_bool safe_mutex_deadlock_detector;
#define my_thread_var (_my_thread_var()) #define my_thread_var (_my_thread_var())
#define my_errno my_thread_var->thr_errno #define my_errno my_thread_var->thr_errno
/* /*
Keep track of shutdown,signal, and main threads so that my_end() will not Keep track of shutdown,signal, and main threads so that my_end() will not
report errors with them report errors with them
*/ */
/* Which kind of thread library is in use */ /* Which kind of thread library is in use */
#define THD_LIB_OTHER 1 #define THD_LIB_OTHER 1
skipping to change at line 758 skipping to change at line 700
The implementation is guaranteed to be thread safe, on all platforms. The implementation is guaranteed to be thread safe, on all platforms.
Note that the calling code should *not* assume the counter is protected Note that the calling code should *not* assume the counter is protected
by the mutex given, as the implementation of these helpers may change by the mutex given, as the implementation of these helpers may change
to use my_atomic operations instead. to use my_atomic operations instead.
*/ */
/* /*
Warning: Warning:
When compiling without threads, this file is not included. When compiling without threads, this file is not included.
See the *other* declarations of thread_safe_xxx in include/my_global.h See the *other* declarations of thread_safe_xxx in include/my_global.h
Second warning:
See include/config-win.h, for yet another implementation.
*/ */
#ifdef THREAD #ifdef THREAD
#ifndef thread_safe_increment #ifndef thread_safe_increment
#ifdef _WIN32
#define thread_safe_increment(V,L) InterlockedIncrement((long*) &(V))
#define thread_safe_decrement(V,L) InterlockedDecrement((long*) &(V))
#else
#define thread_safe_increment(V,L) \ #define thread_safe_increment(V,L) \
(mysql_mutex_lock((L)), (V)++, mysql_mutex_unlock((L))) (pthread_mutex_lock((L)), (V)++, pthread_mutex_unlock((L)))
#define thread_safe_decrement(V,L) \ #define thread_safe_decrement(V,L) \
(mysql_mutex_lock((L)), (V)--, mysql_mutex_unlock((L))) (pthread_mutex_lock((L)), (V)--, pthread_mutex_unlock((L)))
#endif
#endif #endif
#ifndef thread_safe_add #ifndef thread_safe_add
#ifdef _WIN32
#define thread_safe_add(V,C,L) InterlockedExchangeAdd((long*) &(V),(C))
#define thread_safe_sub(V,C,L) InterlockedExchangeAdd((long*) &(V),-(long)
(C))
#else
#define thread_safe_add(V,C,L) \ #define thread_safe_add(V,C,L) \
(mysql_mutex_lock((L)), (V)+=(C), mysql_mutex_unlock((L))) (pthread_mutex_lock((L)), (V)+=(C), pthread_mutex_unlock((L)))
#define thread_safe_sub(V,C,L) \ #define thread_safe_sub(V,C,L) \
(mysql_mutex_lock((L)), (V)-=(C), mysql_mutex_unlock((L))) (pthread_mutex_lock((L)), (V)-=(C), pthread_mutex_unlock((L)))
#endif
#endif #endif
#endif #endif
/* /*
statistics_xxx functions are for non critical statistic, statistics_xxx functions are for non critical statistic,
maintained in global variables. maintained in global variables.
When compiling with SAFE_STATISTICS: When compiling with SAFE_STATISTICS:
- race conditions can not occur. - race conditions can not occur.
- some locking occurs, which may cause performance degradation. - some locking occurs, which may cause performance degradation.
 End of changes. 57 change blocks. 
162 lines changed or deleted 96 lines changed or added


 my_sys.h   my_sys.h 
/* Copyright (C) 2000-2003 MySQL AB, 2008-2009 Sun Microsystems, Inc /* Copyright (C) 2000-2003 MySQL AB
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License. the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A */ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A */
/**
@file
mysys library API
*/
#ifndef _my_sys_h #ifndef _my_sys_h
#define _my_sys_h #define _my_sys_h
#include "my_global.h" /* C_MODE_START, C_MODE_END */
C_MODE_START C_MODE_START
#ifdef HAVE_AIOWAIT #ifdef HAVE_AIOWAIT
#include <sys/asynch.h> /* Used by record-cache */ #include <sys/asynch.h> /* Used by record-cache */
typedef struct my_aio_result { typedef struct my_aio_result {
aio_result_t result; aio_result_t result;
int pending; int pending;
} my_aio_result; } my_aio_result;
#endif #endif
#ifdef HAVE_VALGRIND
# include <valgrind/memcheck.h>
# define MEM_UNDEFINED(a,len) VALGRIND_MAKE_MEM_UNDEFINED(a,len)
# define MEM_NOACCESS(a,len) VALGRIND_MAKE_MEM_NOACCESS(a,len)
# define MEM_CHECK_ADDRESSABLE(a,len) VALGRIND_CHECK_MEM_IS_ADDRESSABLE(a,l
en)
# define MEM_CHECK_DEFINED(a,len) VALGRIND_CHECK_MEM_IS_DEFINED(a,len)
#else /* HAVE_VALGRIND */
# define MEM_UNDEFINED(a,len) ((void) 0)
# define MEM_NOACCESS(a,len) ((void) 0)
# define MEM_CHECK_ADDRESSABLE(a,len) ((void) 0)
# define MEM_CHECK_DEFINED(a,len) ((void) 0)
#endif /* HAVE_VALGRIND */
#ifndef THREAD #ifndef THREAD
extern int my_errno; /* Last error in mysys */ extern int NEAR my_errno; /* Last error in mysys */
#else #else
#include <my_pthread.h> #include <my_pthread.h>
#endif #endif
#include <m_ctype.h> /* for CHARSET_INFO */ #include <m_ctype.h> /* for CHARSET_INFO */
#include <stdarg.h> #include <stdarg.h>
#include <typelib.h> #include <typelib.h>
#ifdef _WIN32
#include <malloc.h> /*for alloca*/
#endif
#define MY_INIT(name) { my_progname= name; my_init(); } #define MYSYS_PROGRAM_DONT_USE_CURSES() { error_handler_hook = my_message_
no_curses; mysys_uses_curses=0;}
#define MY_INIT(name); { my_progname= name; my_init(); }
/** /**
Max length of an error message generated by mysys utilities. Max length of an error message generated by mysys utilities.
Some mysys functions produce error messages. These mostly go Some mysys functions produce error messages. These mostly go
to stderr. to stderr.
This constant defines the size of the buffer used to format This constant defines the size of the buffer used to format
the message. It should be kept in sync with MYSQL_ERRMSG_SIZE, the message. It should be kept in sync with MYSQL_ERRMSG_SIZE,
since sometimes mysys errors are stored in the server diagnostics since sometimes mysys errors are stored in the server diagnostics
area, and we would like to avoid unexpected truncation. area, and we would like to avoid unexpected truncation.
*/ */
skipping to change at line 80 skipping to change at line 67
#define MY_FILE_ERROR ((size_t) -1) #define MY_FILE_ERROR ((size_t) -1)
/* General bitmaps for my_func's */ /* General bitmaps for my_func's */
#define MY_FFNF 1 /* Fatal if file not found */ #define MY_FFNF 1 /* Fatal if file not found */
#define MY_FNABP 2 /* Fatal if not all bytes read/writen */ #define MY_FNABP 2 /* Fatal if not all bytes read/writen */
#define MY_NABP 4 /* Error if not all bytes read/write n */ #define MY_NABP 4 /* Error if not all bytes read/write n */
#define MY_FAE 8 /* Fatal if any error */ #define MY_FAE 8 /* Fatal if any error */
#define MY_WME 16 /* Write message on error */ #define MY_WME 16 /* Write message on error */
#define MY_WAIT_IF_FULL 32 /* Wait and try again if disk full error */ #define MY_WAIT_IF_FULL 32 /* Wait and try again if disk full error */
#define MY_IGNORE_BADFD 32 /* my_sync: ignore 'bad descriptor' errors */ #define MY_IGNORE_BADFD 32 /* my_sync: ignore 'bad descriptor' errors */
#define MY_SYNC_DIR 8192 /* my_create/delete/rename: sync directory #define MY_SYNC_DIR 1024 /* my_create/delete/rename: sync directory
*/ */
#define MY_UNUSED 64 /* Unused (was support for RAID) */ #define MY_RAID 64 /* Support for RAID */
#define MY_FULL_IO 512 /* For my_read - loop intil I/O is complete */ #define MY_FULL_IO 512 /* For my_read - loop intil I/O is complete */
#define MY_DONT_CHECK_FILESIZE 128 /* Option to init_io_cache() */ #define MY_DONT_CHECK_FILESIZE 128 /* Option to init_io_cache() */
#define MY_LINK_WARNING 32 /* my_redel() gives warning if links */ #define MY_LINK_WARNING 32 /* my_redel() gives warning if links */
#define MY_COPYTIME 64 /* my_redel() copys time */ #define MY_COPYTIME 64 /* my_redel() copys time */
#define MY_DELETE_OLD 256 /* my_create_with_symlink() */ #define MY_DELETE_OLD 256 /* my_create_with_symlink() */
#define MY_RESOLVE_LINK 128 /* my_realpath(); Only resolve links */ #define MY_RESOLVE_LINK 128 /* my_realpath(); Only resolve links */
#define MY_HOLD_ORIGINAL_MODES 128 /* my_copy() holds to file modes */ #define MY_HOLD_ORIGINAL_MODES 128 /* my_copy() holds to file modes */
#define MY_REDEL_MAKE_BACKUP 256 #define MY_REDEL_MAKE_BACKUP 256
#define MY_SEEK_NOT_DONE 32 /* my_lock may have to do a seek */ #define MY_SEEK_NOT_DONE 32 /* my_lock may have to do a seek */
#define MY_DONT_WAIT 64 /* my_lock() don't wait if can't lock */ #define MY_SHORT_WAIT 64 /* my_lock() don't wait if can't lock */
#define MY_FORCE_LOCK 128 /* use my_lock() even if disable_locking */
#define MY_NO_WAIT 256 /* my_lock() don't wait at all */
#define MY_ZEROFILL 32 /* my_malloc(), fill array with zero */ #define MY_ZEROFILL 32 /* my_malloc(), fill array with zero */
#define MY_ALLOW_ZERO_PTR 64 /* my_realloc() ; zero ptr -> malloc */ #define MY_ALLOW_ZERO_PTR 64 /* my_realloc() ; zero ptr -> malloc */
#define MY_FREE_ON_ERROR 128 /* my_realloc() ; Free old ptr on error */ #define MY_FREE_ON_ERROR 128 /* my_realloc() ; Free old ptr on error */
#define MY_HOLD_ON_ERROR 256 /* my_realloc() ; Return old ptr on error */ #define MY_HOLD_ON_ERROR 256 /* my_realloc() ; Return old ptr on error */
#define MY_DONT_OVERWRITE_FILE 1024 /* my_copy: Don't overwrite file */ #define MY_DONT_OVERWRITE_FILE 2048 /* my_copy: Don't overwrite file */
#define MY_THREADSAFE 2048 /* my_seek(): lock fd mutex */ #define MY_THREADSAFE 2048 /* my_seek(): lock fd mutex */
#define MY_SYNC 4096 /* my_copy(): sync dst file */
#define MY_CHECK_ERROR 1 /* Params to my_end; Check open-close */ #define MY_CHECK_ERROR 1 /* Params to my_end; Check open-close */
#define MY_GIVE_INFO 2 /* Give time info about process*/ #define MY_GIVE_INFO 2 /* Give time info about process*/
#define MY_DONT_FREE_DBUG 4 /* Do not call DBUG_END() in my_end() */ #define MY_DONT_FREE_DBUG 4 /* Do not call DBUG_END() in my_end() */
#define MY_REMOVE_NONE 0 /* Params for modify_defaults_file */
#define MY_REMOVE_OPTION 1
#define MY_REMOVE_SECTION 2
#define ME_HIGHBYTE 8 /* Shift for colours */ #define ME_HIGHBYTE 8 /* Shift for colours */
#define ME_NOCUR 1 /* Don't use curses message */ #define ME_NOCUR 1 /* Don't use curses message */
#define ME_OLDWIN 2 /* Use old window */ #define ME_OLDWIN 2 /* Use old window */
#define ME_BELL 4 /* Ring bell then printing message * / #define ME_BELL 4 /* Ring bell then printing message * /
#define ME_HOLDTANG 8 /* Don't delete last keys */ #define ME_HOLDTANG 8 /* Don't delete last keys */
#define ME_WAITTOT 16 /* Wait for errtime secs of for a action */ #define ME_WAITTOT 16 /* Wait for errtime secs of for a action */
#define ME_WAITTANG 32 /* Wait for a user action */ #define ME_WAITTANG 32 /* Wait for a user action */
#define ME_NOREFRESH 64 /* Dont refresh screen */ #define ME_NOREFRESH 64 /* Dont refresh screen */
#define ME_NOINPUT 128 /* Dont use the input libary */ #define ME_NOINPUT 128 /* Dont use the input libary */
#define ME_COLOUR1 ((1 << ME_HIGHBYTE)) /* Possibly error-colours */ #define ME_COLOUR1 ((1 << ME_HIGHBYTE)) /* Possibly error-colours */
#define ME_COLOUR2 ((2 << ME_HIGHBYTE)) #define ME_COLOUR2 ((2 << ME_HIGHBYTE))
#define ME_COLOUR3 ((3 << ME_HIGHBYTE)) #define ME_COLOUR3 ((3 << ME_HIGHBYTE))
#define ME_FATALERROR 1024 /* Fatal statement error */ #define ME_FATALERROR 1024 /* Fatal statement error */
#define ME_JUST_INFO 8192 /**< not error but just info */
#define ME_JUST_WARNING 16384 /**< not error but just warning */
/* Bits in last argument to fn_format */ /* Bits in last argument to fn_format */
#define MY_REPLACE_DIR 1 /* replace dir in name with 'dir' */ #define MY_REPLACE_DIR 1 /* replace dir in name with 'dir' */
#define MY_REPLACE_EXT 2 /* replace extension with 'ext' */ #define MY_REPLACE_EXT 2 /* replace extension with 'ext' */
#define MY_UNPACK_FILENAME 4 /* Unpack name (~ -> home) */ #define MY_UNPACK_FILENAME 4 /* Unpack name (~ -> home) */
#define MY_PACK_FILENAME 8 /* Pack name (home -> ~) */ #define MY_PACK_FILENAME 8 /* Pack name (home -> ~) */
#define MY_RESOLVE_SYMLINKS 16 /* Resolve all symbolic links */ #define MY_RESOLVE_SYMLINKS 16 /* Resolve all symbolic links */
#define MY_RETURN_REAL_PATH 32 /* return full path for file */ #define MY_RETURN_REAL_PATH 32 /* return full path for file */
#define MY_SAFE_PATH 64 /* Return NULL if too long path */ #define MY_SAFE_PATH 64 /* Return NULL if too long path */
#define MY_RELATIVE_PATH 128 /* name is relative to 'dir' */ #define MY_RELATIVE_PATH 128 /* name is relative to 'dir' */
skipping to change at line 156 skipping to change at line 150
#define MY_ERRNO_ERANGE 34 #define MY_ERRNO_ERANGE 34
/* Bits for get_date timeflag */ /* Bits for get_date timeflag */
#define GETDATE_DATE_TIME 1 #define GETDATE_DATE_TIME 1
#define GETDATE_SHORT_DATE 2 #define GETDATE_SHORT_DATE 2
#define GETDATE_HHMMSSTIME 4 #define GETDATE_HHMMSSTIME 4
#define GETDATE_GMT 8 #define GETDATE_GMT 8
#define GETDATE_FIXEDLENGTH 16 #define GETDATE_FIXEDLENGTH 16
/* defines when allocating data */ /* defines when allocating data */
#ifdef SAFEMALLOC
#define my_malloc(SZ,FLAG) _mymalloc((SZ), __FILE__, __LINE__, FLAG )
#define my_malloc_ci(SZ,FLAG) _mymalloc((SZ), sFile, uLine, FLAG )
#define my_realloc(PTR,SZ,FLAG) _myrealloc((PTR), (SZ), __FILE__, __LINE__,
FLAG )
#define my_checkmalloc() _sanity( __FILE__, __LINE__ )
#define my_free(PTR,FLAG) _myfree((PTR), __FILE__, __LINE__,FLAG)
#define my_memdup(A,B,C) _my_memdup((A),(B), __FILE__,__LINE__,C)
#define my_strdup(A,C) _my_strdup((A), __FILE__,__LINE__,C)
#define my_strndup(A,B,C) _my_strndup((A),(B),__FILE__,__LINE__,C)
#define QUICK_SAFEMALLOC sf_malloc_quick=1
#define NORMAL_SAFEMALLOC sf_malloc_quick=0
extern uint sf_malloc_prehunc,sf_malloc_endhunc,sf_malloc_quick;
extern ulonglong sf_malloc_mem_limit;
#define CALLER_INFO_PROTO , const char *sFile, uint uLine
#define CALLER_INFO , __FILE__, __LINE__
#define ORIG_CALLER_INFO , sFile, uLine
#else
#define my_checkmalloc()
#undef TERMINATE
#define TERMINATE(A,B) {}
#define QUICK_SAFEMALLOC
#define NORMAL_SAFEMALLOC
extern void *my_malloc(size_t Size,myf MyFlags); extern void *my_malloc(size_t Size,myf MyFlags);
extern void *my_multi_malloc(myf MyFlags, ...); #define my_malloc_ci(SZ,FLAG) my_malloc( SZ, FLAG )
extern void *my_realloc(void *oldpoint, size_t Size, myf MyFlags); extern void *my_realloc(void *oldpoint, size_t Size, myf MyFlags);
extern void my_free(void *ptr); extern void my_no_flags_free(void *ptr);
extern void *my_memdup(const void *from,size_t length,myf MyFlags); extern void *my_memdup(const void *from,size_t length,myf MyFlags);
extern char *my_strdup(const char *from,myf MyFlags); extern char *my_strdup(const char *from,myf MyFlags);
extern char *my_strndup(const char *from, size_t length, extern char *my_strndup(const char *from, size_t length,
myf MyFlags); myf MyFlags);
#define TRASH(A,B) do{MEM_CHECK_ADDRESSABLE(A,B);MEM_UNDEFINED(A,B);} while /* we do use FG (as a no-op) in below so that a typo on FG is caught */
(0) #define my_free(PTR,FG) ((void)FG,my_no_flags_free(PTR))
#if defined(ENABLED_DEBUG_SYNC) #define CALLER_INFO_PROTO /* nothing */
extern void (*debug_sync_C_callback_ptr)(const char *, size_t); #define CALLER_INFO /* nothing */
#define DEBUG_SYNC_C(_sync_point_name_) do { \ #define ORIG_CALLER_INFO /* nothing */
if (debug_sync_C_callback_ptr != NULL) \ #endif
(*debug_sync_C_callback_ptr)(STRING_WITH_LEN(_sync_point_name_)); } \
while(0) /*
#else ERROR INJECTION: Non-thread-safe global variable to request error inject.
#define DEBUG_SYNC_C(_sync_point_name_) Set this variable to non-zero to request the next my_malloc() to fail.
#endif /* defined(ENABLED_DEBUG_SYNC) */ This works with my_malloc.c:my_malloc() and safemalloc.c:_mymalloc().
If using this in tests, note that the error messages produced by
my_malloc and safemalloc are different. You may need to modify the
results with --replace_regex. You may find examples in
client/backup_stream.c and backup_client_coverage.test.
The global variable is defined in my_static.c.
*/
IF_DBUG(extern int my_malloc_error_inject);
#ifdef HAVE_LARGE_PAGES #ifdef HAVE_LARGE_PAGES
extern uint my_get_large_page_size(void); extern uint my_get_large_page_size(void);
extern uchar * my_large_malloc(size_t size, myf my_flags); extern uchar * my_large_malloc(size_t size, myf my_flags);
extern void my_large_free(uchar *ptr); extern void my_large_free(uchar * ptr, myf my_flags);
#else #else
#define my_get_large_page_size() (0) #define my_get_large_page_size() (0)
#define my_large_malloc(A,B) my_malloc_lock((A),(B)) #define my_large_malloc(A,B) my_malloc_lock((A),(B))
#define my_large_free(A) my_free_lock((A)) #define my_large_free(A,B) my_free_lock((A),(B))
#endif /* HAVE_LARGE_PAGES */ #endif /* HAVE_LARGE_PAGES */
#ifdef HAVE_ALLOCA #ifdef HAVE_ALLOCA
#if defined(_AIX) && !defined(__GNUC__) && !defined(_AIX43) #if defined(_AIX) && !defined(__GNUC__) && !defined(_AIX43)
#pragma alloca #pragma alloca
#endif /* _AIX */ #endif /* _AIX */
#if defined(__MWERKS__) #if defined(__MWERKS__)
#undef alloca #undef alloca
#define alloca _alloca #define alloca _alloca
#endif /* __MWERKS__ */ #endif /* __MWERKS__ */
#if defined(__GNUC__) && !defined(HAVE_ALLOCA_H) && ! defined(alloca) #if defined(__GNUC__) && !defined(HAVE_ALLOCA_H) && ! defined(alloca)
#define alloca __builtin_alloca #define alloca __builtin_alloca
#endif /* GNUC */ #endif /* GNUC */
#define my_alloca(SZ) alloca((size_t) (SZ)) #define my_alloca(SZ) alloca((size_t) (SZ))
#define my_afree(PTR) {} #define my_afree(PTR) {}
#else #else
#define my_alloca(SZ) my_malloc(SZ,MYF(0)) #define my_alloca(SZ) my_malloc(SZ,MYF(0))
#define my_afree(PTR) my_free(PTR) #define my_afree(PTR) my_free(PTR,MYF(MY_WME))
#endif /* HAVE_ALLOCA */ #endif /* HAVE_ALLOCA */
#ifndef errno /* did we already get it? */ #ifndef errno /* did we already get it? */
#ifdef HAVE_ERRNO_AS_DEFINE #ifdef HAVE_ERRNO_AS_DEFINE
#include <errno.h> /* errno is a define */ #include <errno.h> /* errno is a define */
#else #else
extern int errno; /* declare errno */ extern int errno; /* declare errno */
#endif #endif
#endif /* #ifndef errno */ #endif /* #ifndef errno */
extern char *home_dir; /* Home directory for user */ extern char *home_dir; /* Home directory for user */
extern const char *my_progname; /* program-name (printed in errors) */ extern const char *my_progname; /* program-name (printed in errors) */
extern char curr_dir[]; /* Current directory for user */ extern const char *my_progname_short; /* like above but without directory
*/
extern char NEAR curr_dir[]; /* Current directory for user */
extern void (*error_handler_hook)(uint my_err, const char *str,myf MyFlags) ; extern void (*error_handler_hook)(uint my_err, const char *str,myf MyFlags) ;
extern void (*fatal_error_handler_hook)(uint my_err, const char *str, extern void (*fatal_error_handler_hook)(uint my_err, const char *str,
myf MyFlags); myf MyFlags);
extern uint my_file_limit; extern uint my_file_limit;
extern ulong my_thread_stack_size; extern ulong my_thread_stack_size;
extern const char *(*proc_info_hook)(void *, const char *, const char *, extern const char *(*proc_info_hook)(void *, const char *, const char *,
const char *, const unsigned int); const char *, const unsigned int);
#if defined(ENABLED_DEBUG_SYNC)
extern void (*debug_sync_C_callback_ptr)(const char *, size_t);
#define DEBUG_SYNC_C(_sync_point_name_) do { \
if (debug_sync_C_callback_ptr != NULL) \
(*debug_sync_C_callback_ptr)(STRING_WITH_LEN(_sync_point_name_)); } \
while(0)
#else
#define DEBUG_SYNC_C(_sync_point_name_)
#endif /* defined(ENABLED_DEBUG_SYNC) */
#ifdef HAVE_LARGE_PAGES #ifdef HAVE_LARGE_PAGES
extern my_bool my_use_large_pages; extern my_bool my_use_large_pages;
extern uint my_large_page_size; extern uint my_large_page_size;
#endif #endif
/* charsets */ /* charsets */
#define MY_ALL_CHARSETS_SIZE 2048 #define MY_ALL_CHARSETS_SIZE 2048
extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *default_charset_info; extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *default_charset_info;
extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *all_charsets[MY_ALL_CHARSETS_SIZE] ; extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *all_charsets[MY_ALL_CHARSETS_SIZE] ;
extern CHARSET_INFO compiled_charsets[]; extern CHARSET_INFO compiled_charsets[];
skipping to change at line 245 skipping to change at line 281
extern ulong my_file_total_opened; extern ulong my_file_total_opened;
extern uint mysys_usage_id; extern uint mysys_usage_id;
extern my_bool my_init_done; extern my_bool my_init_done;
/* Point to current my_message() */ /* Point to current my_message() */
extern void (*my_sigtstp_cleanup)(void), extern void (*my_sigtstp_cleanup)(void),
/* Executed before jump to shell */ /* Executed before jump to shell */
(*my_sigtstp_restart)(void), (*my_sigtstp_restart)(void),
(*my_abort_hook)(int); (*my_abort_hook)(int);
/* Executed when comming from shell */ /* Executed when comming from shell */
extern MYSQL_PLUGIN_IMPORT int my_umask; /* Default creation extern MYSQL_PLUGIN_IMPORT int NEAR my_umask; /* Default creation
mask */ mask */
extern int my_umask_dir, extern int NEAR my_umask_dir,
my_recived_signals, /* Signals we have got */ NEAR my_recived_signals, /* Signals we have got */
my_safe_to_handle_signal, /* Set when allowed to SIGTSTP */ NEAR my_safe_to_handle_signal, /* Set when allowed to SIGTSTP */
my_dont_interrupt; /* call remember_intr when set */ NEAR my_dont_interrupt; /* call remember_intr when set */
extern my_bool my_use_symdir; extern my_bool NEAR mysys_uses_curses, my_use_symdir;
extern size_t sf_malloc_cur_memory, sf_malloc_max_memory;
extern ulong my_default_record_cache_size; extern ulong my_default_record_cache_size;
extern my_bool my_disable_locking, my_disable_async_io, extern my_bool NEAR my_disable_locking,NEAR my_disable_async_io,
my_disable_flush_key_blocks, my_disable_symlinks; NEAR my_disable_flush_key_blocks, NEAR my_disable_symlinks;
extern char wild_many,wild_one,wild_prefix; extern char wild_many,wild_one,wild_prefix;
extern const char *charsets_dir; extern const char *charsets_dir;
/* from default.c */ /* from default.c */
extern char *my_defaults_extra_file; extern char *my_defaults_extra_file;
extern const char *my_defaults_group_suffix; extern const char *my_defaults_group_suffix;
extern const char *my_defaults_file; extern const char *my_defaults_file;
extern my_bool timed_mutexes; extern my_bool timed_mutexes;
typedef struct wild_file_pack /* Struct to hold info when selecting files
*/
{
uint wilds; /* How many wildcards */
uint not_pos; /* Start of not-theese-files */
char * *wild; /* Pointer to wildcards */
} WF_PACK;
enum loglevel { enum loglevel {
ERROR_LEVEL, ERROR_LEVEL,
WARNING_LEVEL, WARNING_LEVEL,
INFORMATION_LEVEL INFORMATION_LEVEL
}; };
enum cache_type enum cache_type
{ {
TYPE_NOT_SET= 0, READ_CACHE, WRITE_CACHE, TYPE_NOT_SET= 0, READ_CACHE, WRITE_CACHE,
SEQ_READ_APPEND /* sequential read or append */, SEQ_READ_APPEND /* sequential read or append */,
skipping to change at line 285 skipping to change at line 329
enum flush_type enum flush_type
{ {
FLUSH_KEEP, /* flush block and keep it in the cache */ FLUSH_KEEP, /* flush block and keep it in the cache */
FLUSH_RELEASE, /* flush block and remove it from the cache */ FLUSH_RELEASE, /* flush block and remove it from the cache */
FLUSH_IGNORE_CHANGED, /* remove block from the cache */ FLUSH_IGNORE_CHANGED, /* remove block from the cache */
/* /*
As my_disable_flush_pagecache_blocks is always 0, the following option As my_disable_flush_pagecache_blocks is always 0, the following option
is strictly equivalent to FLUSH_KEEP is strictly equivalent to FLUSH_KEEP
*/ */
FLUSH_FORCE_WRITE FLUSH_FORCE_WRITE,
/**
@brief like FLUSH_KEEP but return immediately if file is already being
flushed (even partially) by another thread; only for page cache,
forbidden for key cache.
*/
FLUSH_KEEP_LAZY
}; };
typedef struct st_record_cache /* Used when cacheing records */ typedef struct st_record_cache /* Used when cacheing records */
{ {
File file; File file;
int rc_seek,error,inited; int rc_seek,error,inited;
uint rc_length,read_length,reclength; uint rc_length,read_length,reclength;
my_off_t rc_record_pos,end_of_file; my_off_t rc_record_pos,end_of_file;
uchar *rc_buff,*rc_buff2,*rc_pos,*rc_end,*rc_request_pos; uchar *rc_buff,*rc_buff2,*rc_pos,*rc_end,*rc_request_pos;
#ifdef HAVE_AIOWAIT #ifdef HAVE_AIOWAIT
skipping to change at line 317 skipping to change at line 367
struct st_my_file_info struct st_my_file_info
{ {
char *name; char *name;
#ifdef _WIN32 #ifdef _WIN32
HANDLE fhandle; /* win32 file handle */ HANDLE fhandle; /* win32 file handle */
int oflag; /* open flags, e.g O_APPEND */ int oflag; /* open flags, e.g O_APPEND */
#endif #endif
enum file_type type; enum file_type type;
#if defined(THREAD) && !defined(HAVE_PREAD) && !defined(_WIN32) #if defined(THREAD) && !defined(HAVE_PREAD) && !defined(_WIN32)
mysql_mutex_t mutex; pthread_mutex_t mutex;
#endif #endif
}; };
extern struct st_my_file_info *my_file_info; extern struct st_my_file_info *my_file_info;
typedef struct st_dynamic_array typedef struct st_dynamic_array
{ {
uchar *buffer; uchar *buffer;
uint elements,max_element; uint elements,max_element;
uint alloc_increment; uint alloc_increment;
uint size_of_element; uint size_of_element;
} DYNAMIC_ARRAY; } DYNAMIC_ARRAY;
typedef struct st_my_tmpdir typedef struct st_my_tmpdir
{ {
DYNAMIC_ARRAY full_list; DYNAMIC_ARRAY full_list;
char **list; char **list;
uint cur, max; uint cur, max;
#ifdef THREAD #ifdef THREAD
mysql_mutex_t mutex; pthread_mutex_t mutex;
#endif #endif
} MY_TMPDIR; } MY_TMPDIR;
typedef struct st_dynamic_string typedef struct st_dynamic_string
{ {
char *str; char *str;
size_t length,max_length,alloc_increment; size_t length,max_length,alloc_increment;
} DYNAMIC_STRING; } DYNAMIC_STRING;
struct st_io_cache; struct st_io_cache;
typedef int (*IO_CACHE_CALLBACK)(struct st_io_cache*); /** Function called when certain events happen to an IO_CACHE */
typedef int (*IO_CACHE_CALLBACK)(struct st_io_cache *cache,
const uchar *buffert, uint length,
my_off_t filepos);
#ifdef THREAD #ifdef THREAD
typedef struct st_io_cache_share typedef struct st_io_cache_share
{ {
mysql_mutex_t mutex; /* To sync on reads into buffer. */ pthread_mutex_t mutex; /* To sync on reads into buffer. *
mysql_cond_t cond; /* To wait for signals. */ /
mysql_cond_t cond_writer; /* For a synchronized writer. */ pthread_cond_t cond; /* To wait for signals. */
pthread_cond_t cond_writer; /* For a synchronized writer. */
/* Offset in file corresponding to the first byte of buffer. */ /* Offset in file corresponding to the first byte of buffer. */
my_off_t pos_in_file; my_off_t pos_in_file;
/* If a synchronized write cache is the source of the data. */ /* If a synchronized write cache is the source of the data. */
struct st_io_cache *source_cache; struct st_io_cache *source_cache;
uchar *buffer; /* The read buffer. */ uchar *buffer; /* The read buffer. */
uchar *read_end; /* Behind last valid byte of buffe r. */ uchar *read_end; /* Behind last valid byte of buffe r. */
int running_threads; /* threads not in lock. */ int running_threads; /* threads not in lock. */
int total_threads; /* threads sharing the cache. */ int total_threads; /* threads sharing the cache. */
int error; /* Last error. */ int error; /* Last error. */
#ifdef NOT_YET_IMPLEMENTED #ifdef NOT_YET_IMPLEMENTED
skipping to change at line 416 skipping to change at line 469
my_b_tell() and other routines that need to know the current offset my_b_tell() and other routines that need to know the current offset
current_pos points to &write_pos, and current_end to &write_end in a current_pos points to &write_pos, and current_end to &write_end in a
WRITE_CACHE, and &read_pos and &read_end respectively otherwise WRITE_CACHE, and &read_pos and &read_end respectively otherwise
*/ */
uchar **current_pos, **current_end; uchar **current_pos, **current_end;
#ifdef THREAD #ifdef THREAD
/* /*
The lock is for append buffer used in SEQ_READ_APPEND cache The lock is for append buffer used in SEQ_READ_APPEND cache
need mutex copying from append buffer to read buffer. need mutex copying from append buffer to read buffer.
*/ */
mysql_mutex_t append_buffer_lock; pthread_mutex_t append_buffer_lock;
/* /*
The following is used when several threads are reading the The following is used when several threads are reading the
same file in parallel. They are synchronized on disk same file in parallel. They are synchronized on disk
accesses reading the cached part of the file asynchronously. accesses reading the cached part of the file asynchronously.
It should be set to NULL to disable the feature. Only It should be set to NULL to disable the feature. Only
READ_CACHE mode is supported. READ_CACHE mode is supported.
*/ */
IO_CACHE_SHARE *share; IO_CACHE_SHARE *share;
#endif #endif
/* /*
skipping to change at line 447 skipping to change at line 500
be replaced with my_b_append() for a SEQ_READ_APPEND cache be replaced with my_b_append() for a SEQ_READ_APPEND cache
*/ */
int (*write_function)(struct st_io_cache *,const uchar *,size_t); int (*write_function)(struct st_io_cache *,const uchar *,size_t);
/* /*
Specifies the type of the cache. Depending on the type of the cache Specifies the type of the cache. Depending on the type of the cache
certain operations might not be available and yield unpredicatable certain operations might not be available and yield unpredicatable
results. Details to be documented later results. Details to be documented later
*/ */
enum cache_type type; enum cache_type type;
/* /*
Callbacks when the actual read I/O happens. These were added and Callbacks were added and are currently used for binary logging of LOAD
are currently used for binary logging of LOAD DATA INFILE - when a DATA INFILE - when a block is read from the file, we create a block
block is read from the file, we create a block create/append event, and create/append event, and when IO_CACHE is closed, we create an end even
when IO_CACHE is closed, we create an end event. These functions could, t;
of course be used for other things also used to write the MyISAM WRITE_CACHE blocks to the MyISAM physical
*/ log. These functions could, of course be used for other things. Note: s
IO_CACHE_CALLBACK pre_read; ome
IO_CACHE_CALLBACK post_read; callbacks share the same argument ("arg").
IO_CACHE_CALLBACK pre_close; */
IO_CACHE_CALLBACK pre_read; /**< called before reading from disk */
IO_CACHE_CALLBACK post_read; /**< called after reading from disk */
IO_CACHE_CALLBACK pre_close; /**< called before ending the cache */
/** Called _after_ writing to disk; not honoured by SEQ_READ_APPEND */
IO_CACHE_CALLBACK post_write;
/* /*
Counts the number of times, when we were forced to use disk. We use it to Counts the number of times, when we were forced to use disk. We use it to
increase the binlog_cache_disk_use status variable. increase the binlog_cache_disk_use status variable.
*/ */
ulong disk_writes; ulong disk_writes;
void* arg; /* for use by pre/post_read */ void *arg; /**< used by pre/post_read,post_write * /
char *file_name; /* if used with 'open_cached_file' * / char *file_name; /* if used with 'open_cached_file' * /
char *dir,*prefix; char *dir,*prefix;
File file; /* file descriptor */ File file; /* file descriptor */
/* /*
seek_not_done is set by my_b_seek() to inform the upcoming read/write seek_not_done is set by my_b_seek() to inform the upcoming read/write
operation that a seek needs to be preformed prior to the actual I/O operation that a seek needs to be preformed prior to the actual I/O
error is 0 if the cache operation was successful, -1 if there was a error is 0 if the cache operation was successful, -1 if there was a
"hard" error, and the actual number of I/O-ed bytes if the read/write w as "hard" error, and the actual number of I/O-ed bytes if the read/write w as
partial. partial.
*/ */
int seek_not_done,error; int seek_not_done,error;
/**
Cumulative 'error' since last [re]init_io_cache(). Useful if cache's u
ser
polls for errors only once in a while.
*/
int hard_write_error_in_the_past;
/* buffer_length is memory size allocated for buffer or write_buffer */ /* buffer_length is memory size allocated for buffer or write_buffer */
size_t buffer_length; size_t buffer_length;
/* read_length is the same as buffer_length except when we use async io * / /* read_length is the same as buffer_length except when we use async io * /
size_t read_length; size_t read_length;
myf myflags; /* Flags used to my_read/my_write */ myf myflags; /* Flags used to my_read/my_write */
/* /*
alloced_buffer is 1 if the buffer was allocated by init_io_cache() and alloced_buffer is 1 if the buffer was allocated by init_io_cache() and
0 if it was supplied by the user. 0 if it was supplied by the user.
Currently READ_NET is the only one that will use a buffer allocated Currently READ_NET is the only one that will use a buffer allocated
somewhere else somewhere else
skipping to change at line 515 skipping to change at line 576
#define my_b_read(info,Buffer,Count) \ #define my_b_read(info,Buffer,Count) \
((info)->read_pos + (Count) <= (info)->read_end ?\ ((info)->read_pos + (Count) <= (info)->read_end ?\
(memcpy(Buffer,(info)->read_pos,(size_t) (Count)), \ (memcpy(Buffer,(info)->read_pos,(size_t) (Count)), \
((info)->read_pos+=(Count)),0) :\ ((info)->read_pos+=(Count)),0) :\
(*(info)->read_function)((info),Buffer,Count)) (*(info)->read_function)((info),Buffer,Count))
#define my_b_write(info,Buffer,Count) \ #define my_b_write(info,Buffer,Count) \
((info)->write_pos + (Count) <=(info)->write_end ?\ ((info)->write_pos + (Count) <=(info)->write_end ?\
(memcpy((info)->write_pos, (Buffer), (size_t)(Count)),\ (memcpy((info)->write_pos, (Buffer), (size_t)(Count)),\
((info)->write_pos+=(Count)),0) : \ ((info)->write_pos+=(Count)),0) : \
(*(info)->write_function)((info),(uchar *)(Buffer),(Count))) (*(info)->write_function)((info),(Buffer),(Count)))
#define my_b_get(info) \ #define my_b_get(info) \
((info)->read_pos != (info)->read_end ?\ ((info)->read_pos != (info)->read_end ?\
((info)->read_pos++, (int) (uchar) (info)->read_pos[-1]) :\ ((info)->read_pos++, (int) (uchar) (info)->read_pos[-1]) :\
_my_b_get(info)) _my_b_get(info))
/* my_b_write_byte dosn't have any err-check */ /* my_b_write_byte dosn't have any err-check */
#define my_b_write_byte(info,chr) \ #define my_b_write_byte(info,chr) \
(((info)->write_pos < (info)->write_end) ?\ (((info)->write_pos < (info)->write_end) ?\
((*(info)->write_pos++)=(chr)) :\ ((*(info)->write_pos++)=(chr)) :\
skipping to change at line 548 skipping to change at line 609
/* tell write offset in the SEQ_APPEND cache */ /* tell write offset in the SEQ_APPEND cache */
int my_b_copy_to_file(IO_CACHE *cache, FILE *file); int my_b_copy_to_file(IO_CACHE *cache, FILE *file);
my_off_t my_b_append_tell(IO_CACHE* info); my_off_t my_b_append_tell(IO_CACHE* info);
my_off_t my_b_safe_tell(IO_CACHE* info); /* picks the correct tell() */ my_off_t my_b_safe_tell(IO_CACHE* info); /* picks the correct tell() */
#define my_b_bytes_in_cache(info) (size_t) (*(info)->current_end - \ #define my_b_bytes_in_cache(info) (size_t) (*(info)->current_end - \
*(info)->current_pos) *(info)->current_pos)
typedef uint32 ha_checksum; typedef uint32 ha_checksum;
extern ha_checksum my_crc_dbug_check;
/* Define the type of function to be passed to process_default_option_files */ /* Define the type of function to be passed to process_default_option_files */
typedef int (*Process_option_func)(void *ctx, const char *group_name, typedef int (*Process_option_func)(void *ctx, const char *group_name,
const char *option); const char *option);
#include <my_alloc.h> #include <my_alloc.h>
/* Prototypes for mysys and my_func functions */ /* Prototypes for mysys and my_func functions */
extern int my_copy(const char *from,const char *to,myf MyFlags); extern int my_copy(const char *from,const char *to,myf MyFlags);
extern int my_append(const char *from,const char *to,myf MyFlags);
extern int my_delete(const char *name,myf MyFlags); extern int my_delete(const char *name,myf MyFlags);
extern int my_getwd(char * buf,size_t size,myf MyFlags); extern int my_getwd(char * buf,size_t size,myf MyFlags);
extern int my_setwd(const char *dir,myf MyFlags); extern int my_setwd(const char *dir,myf MyFlags);
extern int my_lock(File fd,int op,my_off_t start, my_off_t length,myf MyFla gs); extern int my_lock(File fd,int op,my_off_t start, my_off_t length,myf MyFla gs);
extern void *my_once_alloc(size_t Size,myf MyFlags); extern void *my_once_alloc(size_t Size,myf MyFlags);
extern void my_once_free(void); extern void my_once_free(void);
extern char *my_once_strdup(const char *src,myf myflags); extern char *my_once_strdup(const char *src,myf myflags);
extern void *my_once_memdup(const void *src, size_t len, myf myflags); extern void *my_once_memdup(const void *src, size_t len, myf myflags);
extern File my_open(const char *FileName,int Flags,myf MyFlags); extern File my_open(const char *FileName,int Flags,myf MyFlags);
extern File my_register_filename(File fd, const char *FileName, extern File my_register_filename(File fd, const char *FileName,
enum file_type type_of_file, enum file_type type_of_file,
uint error_message_number, myf MyFlags); uint error_message_number, myf MyFlags);
extern File my_create(const char *FileName,int CreateFlags, extern File my_create(const char *FileName,int CreateFlags,
int AccessFlags, myf MyFlags); int AccessFlags, myf MyFlags);
extern int my_close(File Filedes,myf MyFlags); 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_mkdir(const char *dir, int Flags, myf MyFlags);
extern int my_readlink(char *to, const char *filename, myf MyFlags); extern int my_readlink(char *to, const char *filename, myf MyFlags);
extern int my_is_symlink(const char *filename); extern int my_is_symlink(const char *filename);
extern int my_realpath(char *to, const char *filename, myf MyFlags); extern int my_realpath(char *to, const char *filename, myf MyFlags);
extern File my_create_with_symlink(const char *linkname, const char *filena me, extern File my_create_with_symlink(const char *linkname, const char *filena me,
int createflags, int access_flags, int createflags, int access_flags,
myf MyFlags); myf MyFlags);
extern int my_delete_with_symlink(const char *name, myf MyFlags); extern int my_delete_with_symlink(const char *name, myf MyFlags);
extern int my_rename_with_symlink(const char *from,const char *to,myf MyFla gs); extern int my_rename_with_symlink(const char *from,const char *to,myf MyFla gs);
extern int my_symlink(const char *content, const char *linkname, myf MyFlag s); extern int my_symlink(const char *content, const char *linkname, myf MyFlag s);
skipping to change at line 598 skipping to change at line 662
extern my_off_t my_tell(File fd,myf MyFlags); extern my_off_t my_tell(File fd,myf MyFlags);
extern size_t my_write(File Filedes,const uchar *Buffer,size_t Count, extern size_t my_write(File Filedes,const uchar *Buffer,size_t Count,
myf MyFlags); myf MyFlags);
extern size_t my_pwrite(File Filedes,const uchar *Buffer,size_t Count, extern size_t my_pwrite(File Filedes,const uchar *Buffer,size_t Count,
my_off_t offset,myf MyFlags); my_off_t offset,myf MyFlags);
extern size_t my_fread(FILE *stream,uchar *Buffer,size_t Count,myf MyFlags) ; extern size_t my_fread(FILE *stream,uchar *Buffer,size_t Count,myf MyFlags) ;
extern size_t my_fwrite(FILE *stream,const uchar *Buffer,size_t Count, extern size_t my_fwrite(FILE *stream,const uchar *Buffer,size_t Count,
myf MyFlags); myf MyFlags);
extern my_off_t my_fseek(FILE *stream,my_off_t pos,int whence,myf MyFlags); extern my_off_t my_fseek(FILE *stream,my_off_t pos,int whence,myf MyFlags);
extern my_off_t my_ftell(FILE *stream,myf MyFlags); extern my_off_t my_ftell(FILE *stream,myf MyFlags);
extern void *_mymalloc(size_t uSize,const char *sFile,
uint uLine, myf MyFlag);
extern void *_myrealloc(void *pPtr,size_t uSize,const char *sFile,
uint uLine, myf MyFlag);
extern void * my_multi_malloc _VARARGS((myf MyFlags, ...));
extern void _myfree(void *pPtr,const char *sFile,uint uLine, myf MyFlag);
extern int _sanity(const char *sFile, uint uLine);
extern void *_my_memdup(const void *from, size_t length,
const char *sFile, uint uLine,myf MyFlag);
extern char * _my_strdup(const char *from, const char *sFile, uint uLine,
myf MyFlag);
extern char *_my_strndup(const char *from, size_t length,
const char *sFile, uint uLine,
myf MyFlag);
/* implemented in my_memmem.c */ /* implemented in my_memmem.c */
extern void *my_memmem(const void *haystack, size_t haystacklen, extern void *my_memmem(const void *haystack, size_t haystacklen,
const void *needle, size_t needlelen); const void *needle, size_t needlelen);
#ifdef _WIN32 #ifdef _WIN32
extern int my_access(const char *path, int amode); extern int my_access(const char *path, int amode);
#else #else
#define my_access access #define my_access access
#endif #endif
skipping to change at line 621 skipping to change at line 699
#ifdef _WIN32 #ifdef _WIN32
extern int nt_share_delete(const char *name,myf MyFlags); extern int nt_share_delete(const char *name,myf MyFlags);
#define my_delete_allow_opened(fname,flags) nt_share_delete((fname),(flags )) #define my_delete_allow_opened(fname,flags) nt_share_delete((fname),(flags ))
#else #else
#define my_delete_allow_opened(fname,flags) my_delete((fname),(flags)) #define my_delete_allow_opened(fname,flags) my_delete((fname),(flags))
#endif #endif
#ifdef _WIN32 #ifdef _WIN32
/* Windows-only functions (CRT equivalents)*/ /* Windows-only functions (CRT equivalents)*/
extern File my_sopen(const char *path, int oflag, int shflag, int pmode );
extern HANDLE my_get_osfhandle(File fd); extern HANDLE my_get_osfhandle(File fd);
extern void my_osmaperr(unsigned long last_error); extern void my_osmaperr(unsigned long last_error);
#endif #endif
#ifndef TERMINATE
extern void TERMINATE(FILE *file, uint flag);
#endif
extern void init_glob_errs(void); extern void init_glob_errs(void);
extern const char** get_global_errmsgs();
extern void wait_for_free_space(const char *filename, int errors); extern void wait_for_free_space(const char *filename, int errors);
extern FILE *my_fopen(const char *FileName,int Flags,myf MyFlags); extern FILE *my_fopen(const char *FileName,int Flags,myf MyFlags);
extern FILE *my_fdopen(File Filedes,const char *name, int Flags,myf MyFlags ); extern FILE *my_fdopen(File Filedes,const char *name, int Flags,myf MyFlags );
extern int my_fclose(FILE *fd,myf MyFlags); extern int my_fclose(FILE *fd,myf MyFlags);
extern File my_fileno(FILE *fd); extern File my_fileno(FILE *fd);
extern int my_chsize(File fd,my_off_t newlength, int filler, myf MyFlags); extern int my_chsize(File fd,my_off_t newlength, int filler, myf MyFlags);
extern int my_chmod(const char *name, mode_t mode, myf my_flags);
extern int my_sync(File fd, myf my_flags); extern int my_sync(File fd, myf my_flags);
extern int my_sync_dir(const char *dir_name, myf my_flags); extern int my_sync_dir(const char *dir_name, myf my_flags);
extern int my_sync_dir_by_file(const char *file_name, myf my_flags); extern int my_sync_dir_by_file(const char *file_name, myf my_flags);
extern void my_error(int nr,myf MyFlags, ...); extern void my_error _VARARGS((int nr,myf MyFlags, ...));
extern void my_printf_error(uint my_err, const char *format, extern void my_printf_error _VARARGS((uint my_err, const char *format,
myf MyFlags, ...) myf MyFlags, ...))
ATTRIBUTE_FORMAT(printf, 2, 4); ATTRIBUTE_FORMAT(printf, 2, 4);
extern void my_printv_error(uint error, const char *format, myf MyFlags, extern void my_printv_error(uint error, const char *format, myf MyFlags,
va_list ap); va_list ap);
extern int my_error_register(const char** (*get_errmsgs) (), extern int my_error_register(const char **errmsgs, int first, int last);
int first, int last);
extern const char **my_error_unregister(int first, int last); extern const char **my_error_unregister(int first, int last);
extern void my_message(uint my_err, const char *str,myf MyFlags); extern void my_message(uint my_err, const char *str,myf MyFlags);
extern void my_message_stderr(uint my_err, const char *str, myf MyFlags); extern void my_message_no_curses(uint my_err, const char *str,myf MyFlags);
extern my_bool my_basic_init(void);
extern my_bool my_init(void); extern my_bool my_init(void);
extern void my_end(int infoflag); extern void my_end(int infoflag);
extern int my_redel(const char *from, const char *to, int MyFlags); extern int my_redel(const char *from, const char *to, int MyFlags);
extern int my_copystat(const char *from, const char *to, int MyFlags); extern int my_copystat(const char *from, const char *to, int MyFlags);
extern char * my_filename(File fd); extern char * my_filename(File fd);
#ifndef THREAD #ifndef THREAD
extern void dont_break(void); extern void dont_break(void);
extern void allow_break(void); extern void allow_break(void);
#else #else
skipping to change at line 700 skipping to change at line 780
extern size_t unpack_filename(char * to,const char *from); extern size_t unpack_filename(char * to,const char *from);
extern char * intern_filename(char * to,const char *from); extern char * intern_filename(char * to,const char *from);
extern char * directory_file_name(char * dst, const char *src); extern char * directory_file_name(char * dst, const char *src);
extern int pack_filename(char * to, const char *name, size_t max_length); extern int pack_filename(char * to, const char *name, size_t max_length);
extern char * my_path(char * to,const char *progname, extern char * my_path(char * to,const char *progname,
const char *own_pathname_part); const char *own_pathname_part);
extern char * my_load_path(char * to, const char *path, extern char * my_load_path(char * to, const char *path,
const char *own_path_prefix); const char *own_path_prefix);
extern int wild_compare(const char *str,const char *wildstr, extern int wild_compare(const char *str,const char *wildstr,
pbool str_is_pattern); pbool str_is_pattern);
extern WF_PACK *wf_comp(char * str);
extern int wf_test(struct wild_file_pack *wf_pack,const char *name);
extern void wf_end(struct wild_file_pack *buffer);
extern size_t strip_sp(char * str);
extern my_bool array_append_string_unique(const char *str, extern my_bool array_append_string_unique(const char *str,
const char **array, size_t size); const char **array, size_t size);
extern void get_date(char * to,int timeflag,time_t use_time); extern void get_date(char * to,int timeflag,time_t use_time);
extern void soundex(CHARSET_INFO *, char * out_pntr, char * in_pntr, extern void soundex(CHARSET_INFO *, char * out_pntr, char * in_pntr,
pbool remove_garbage); pbool remove_garbage);
extern int init_record_cache(RECORD_CACHE *info,size_t cachesize,File file, extern int init_record_cache(RECORD_CACHE *info,size_t cachesize,File file,
size_t reclength,enum cache_type type, size_t reclength,enum cache_type type,
pbool use_async_io); pbool use_async_io);
extern int read_cache_record(RECORD_CACHE *info,uchar *to); extern int read_cache_record(RECORD_CACHE *info,uchar *to);
extern int end_record_cache(RECORD_CACHE *info); extern int end_record_cache(RECORD_CACHE *info);
extern int write_cache_record(RECORD_CACHE *info,my_off_t filepos, extern int write_cache_record(RECORD_CACHE *info,my_off_t filepos,
const uchar *record,size_t length); const uchar *record,size_t length);
extern int flush_write_cache(RECORD_CACHE *info); extern int flush_write_cache(RECORD_CACHE *info);
extern long my_clock(void);
extern sig_handler sigtstp_handler(int signal_number);
extern void handle_recived_signals(void); extern void handle_recived_signals(void);
extern sig_handler my_set_alarm_variable(int signo); extern sig_handler my_set_alarm_variable(int signo);
extern void my_string_ptr_sort(uchar *base,uint items,size_t size); extern void my_string_ptr_sort(uchar *base,uint items,size_t size);
extern void radixsort_for_str_ptr(uchar* base[], uint number_of_elements, extern void radixsort_for_str_ptr(uchar* base[], uint number_of_elements,
size_t size_of_element,uchar *buffer[]); size_t size_of_element,uchar *buffer[]);
extern qsort_t my_qsort(void *base_ptr, size_t total_elems, size_t size, extern qsort_t my_qsort(void *base_ptr, size_t total_elems, size_t size,
qsort_cmp cmp); qsort_cmp cmp);
extern qsort_t my_qsort2(void *base_ptr, size_t total_elems, size_t size, extern qsort_t my_qsort2(void *base_ptr, size_t total_elems, size_t size,
qsort2_cmp cmp, void *cmp_argument); qsort2_cmp cmp, void *cmp_argument);
skipping to change at line 768 skipping to change at line 854
extern my_off_t my_b_filelength(IO_CACHE *info); extern my_off_t my_b_filelength(IO_CACHE *info);
extern size_t my_b_printf(IO_CACHE *info, const char* fmt, ...); extern size_t my_b_printf(IO_CACHE *info, const char* fmt, ...);
extern size_t my_b_vprintf(IO_CACHE *info, const char* fmt, va_list ap); extern size_t my_b_vprintf(IO_CACHE *info, const char* fmt, va_list ap);
extern my_bool open_cached_file(IO_CACHE *cache,const char *dir, extern my_bool open_cached_file(IO_CACHE *cache,const char *dir,
const char *prefix, size_t cache_size, const char *prefix, size_t cache_size,
myf cache_myflags); myf cache_myflags);
extern my_bool real_open_cached_file(IO_CACHE *cache); extern my_bool real_open_cached_file(IO_CACHE *cache);
extern void close_cached_file(IO_CACHE *cache); extern void close_cached_file(IO_CACHE *cache);
File create_temp_file(char *to, const char *dir, const char *pfx, File create_temp_file(char *to, const char *dir, const char *pfx,
int mode, myf MyFlags); int mode, myf MyFlags);
#define my_init_dynamic_array(A,B,C,D) init_dynamic_array2(A,B,NULL,C,D) #define my_init_dynamic_array(A,B,C,D) init_dynamic_array2(A,B,NULL,C,D CAL
#define my_init_dynamic_array_ci(A,B,C,D) init_dynamic_array2(A,B,NULL,C,D) LER_INFO)
#define my_init_dynamic_array2(A,B,C,D,E) init_dynamic_array2(A,B,C,D,E) #define my_init_dynamic_array_ci(A,B,C,D) init_dynamic_array2(A,B,NULL,C,D
#define my_init_dynamic_array2_ci(A,B,C,D,E) init_dynamic_array2(A,B,C,D,E) ORIG_CALLER_INFO)
extern my_bool init_dynamic_array2(DYNAMIC_ARRAY *array, uint element_size, #define my_init_dynamic_array2(A,B,C,D,E) init_dynamic_array2(A,B,C,D,E CAL
LER_INFO)
#define my_init_dynamic_array2_ci(A,B,C,D,E) init_dynamic_array2(A,B,C,D,E
ORIG_CALLER_INFO)
extern my_bool init_dynamic_array2(DYNAMIC_ARRAY *array,uint element_size,
void *init_buffer, uint init_alloc, void *init_buffer, uint init_alloc,
uint alloc_increment); uint alloc_increment
CALLER_INFO_PROTO);
/* init_dynamic_array() function is deprecated */ /* init_dynamic_array() function is deprecated */
extern my_bool init_dynamic_array(DYNAMIC_ARRAY *array, uint element_size, extern my_bool init_dynamic_array(DYNAMIC_ARRAY *array,uint element_size,
uint init_alloc, uint alloc_increment); uint init_alloc,uint alloc_increment
extern my_bool insert_dynamic(DYNAMIC_ARRAY *array,uchar * element); CALLER_INFO_PROTO);
extern my_bool insert_dynamic(DYNAMIC_ARRAY *array, const uchar * element);
extern uchar *alloc_dynamic(DYNAMIC_ARRAY *array); extern uchar *alloc_dynamic(DYNAMIC_ARRAY *array);
extern uchar *pop_dynamic(DYNAMIC_ARRAY*); extern uchar *pop_dynamic(DYNAMIC_ARRAY*);
extern my_bool set_dynamic(DYNAMIC_ARRAY *array,uchar * element,uint array_ index); extern my_bool set_dynamic(DYNAMIC_ARRAY *array,uchar * element,uint array_ index);
extern my_bool allocate_dynamic(DYNAMIC_ARRAY *array, uint max_elements); extern my_bool allocate_dynamic(DYNAMIC_ARRAY *array, uint max_elements);
extern void get_dynamic(DYNAMIC_ARRAY *array,uchar * element,uint array_ind ex); extern void get_dynamic(DYNAMIC_ARRAY *array,uchar * element,uint array_ind ex);
extern void delete_dynamic(DYNAMIC_ARRAY *array); extern void delete_dynamic(DYNAMIC_ARRAY *array);
extern void delete_dynamic_element(DYNAMIC_ARRAY *array, uint array_index); extern void delete_dynamic_element(DYNAMIC_ARRAY *array, uint array_index);
extern void freeze_size(DYNAMIC_ARRAY *array); extern void freeze_size(DYNAMIC_ARRAY *array);
extern int get_index_dynamic(DYNAMIC_ARRAY *array, uchar * element); extern int get_index_dynamic(DYNAMIC_ARRAY *array, uchar * element);
#define dynamic_array_ptr(array,array_index) ((array)->buffer+(array_index) *(array)->size_of_element) #define dynamic_array_ptr(array,array_index) ((array)->buffer+(array_index) *(array)->size_of_element)
skipping to change at line 807 skipping to change at line 895
my_bool dynstr_append_mem(DYNAMIC_STRING *str, const char *append, my_bool dynstr_append_mem(DYNAMIC_STRING *str, const char *append,
size_t length); size_t length);
extern my_bool dynstr_append_os_quoted(DYNAMIC_STRING *str, const char *app end, extern my_bool dynstr_append_os_quoted(DYNAMIC_STRING *str, const char *app end,
...); ...);
extern my_bool dynstr_set(DYNAMIC_STRING *str, const char *init_str); extern my_bool dynstr_set(DYNAMIC_STRING *str, const char *init_str);
extern my_bool dynstr_realloc(DYNAMIC_STRING *str, size_t additional_size); extern my_bool dynstr_realloc(DYNAMIC_STRING *str, size_t additional_size);
extern my_bool dynstr_trunc(DYNAMIC_STRING *str, size_t n); extern my_bool dynstr_trunc(DYNAMIC_STRING *str, size_t n);
extern void dynstr_free(DYNAMIC_STRING *str); extern void dynstr_free(DYNAMIC_STRING *str);
#ifdef HAVE_MLOCK #ifdef HAVE_MLOCK
extern void *my_malloc_lock(size_t length,myf flags); extern void *my_malloc_lock(size_t length,myf flags);
extern void my_free_lock(void *ptr); extern void my_free_lock(void *ptr,myf flags);
#else #else
#define my_malloc_lock(A,B) my_malloc((A),(B)) #define my_malloc_lock(A,B) my_malloc((A),(B))
#define my_free_lock(A) my_free((A)) #define my_free_lock(A,B) my_free((A),(B))
#endif #endif
#define alloc_root_inited(A) ((A)->min_malloc != 0) #define alloc_root_inited(A) ((A)->min_malloc != 0)
#define ALLOC_ROOT_MIN_BLOCK_SIZE (MALLOC_OVERHEAD + sizeof(USED_MEM) + 8) #define ALLOC_ROOT_MIN_BLOCK_SIZE (MALLOC_OVERHEAD + sizeof(USED_MEM) + 8)
#define clear_alloc_root(A) do { (A)->free= (A)->used= (A)->pre_alloc= 0; ( A)->min_malloc=0;} while(0) #define clear_alloc_root(A) do { (A)->free= (A)->used= (A)->pre_alloc= 0; ( A)->min_malloc=0;} while(0)
extern void init_alloc_root(MEM_ROOT *mem_root, size_t block_size, extern void init_alloc_root(MEM_ROOT *mem_root, size_t block_size,
size_t pre_alloc_size); size_t pre_alloc_size);
extern void *alloc_root(MEM_ROOT *mem_root, size_t Size); extern void *alloc_root(MEM_ROOT *mem_root, size_t Size);
extern void *multi_alloc_root(MEM_ROOT *mem_root, ...); extern void *multi_alloc_root(MEM_ROOT *mem_root, ...);
extern void free_root(MEM_ROOT *root, myf MyFLAGS); extern void free_root(MEM_ROOT *root, myf MyFLAGS);
extern void set_prealloc_root(MEM_ROOT *root, char *ptr); extern void set_prealloc_root(MEM_ROOT *root, char *ptr);
extern void reset_root_defaults(MEM_ROOT *mem_root, size_t block_size, extern void reset_root_defaults(MEM_ROOT *mem_root, size_t block_size,
size_t prealloc_size); size_t prealloc_size);
extern char *strdup_root(MEM_ROOT *root,const char *str); extern char *strdup_root(MEM_ROOT *root,const char *str);
extern char *strmake_root(MEM_ROOT *root,const char *str,size_t len); extern char *strmake_root(MEM_ROOT *root,const char *str,size_t len);
extern void *memdup_root(MEM_ROOT *root,const void *str, size_t len); extern void *memdup_root(MEM_ROOT *root,const void *str, size_t len);
extern int get_defaults_options(int argc, char **argv, extern int get_defaults_options(int argc, char **argv,
char **defaults, char **extra_defaults, char **defaults, char **extra_defaults,
char **group_suffix); char **group_suffix);
extern const char *args_separator;
extern int my_load_defaults(const char *conf_file, const char **groups, extern int my_load_defaults(const char *conf_file, const char **groups,
int *argc, char ***argv, const char ***); int *argc, char ***argv, const char ***);
extern int load_defaults(const char *conf_file, const char **groups, extern int load_defaults(const char *conf_file, const char **groups,
int *argc, char ***argv); int *argc, char ***argv);
extern int modify_defaults_file(const char *file_location, const char *opti
on,
const char *option_value,
const char *section_name, int remove_option
);
extern int my_search_option_files(const char *conf_file, int *argc, extern int my_search_option_files(const char *conf_file, int *argc,
char ***argv, uint *args_used, char ***argv, uint *args_used,
Process_option_func func, void *func_ctx, Process_option_func func, void *func_ctx,
const char **default_directories); const char **default_directories);
extern void free_defaults(char **argv); extern void free_defaults(char **argv);
extern void my_print_default_files(const char *conf_file); extern void my_print_default_files(const char *conf_file);
extern void print_defaults(const char *conf_file, const char **groups); extern void print_defaults(const char *conf_file, const char **groups);
extern my_bool my_compress(uchar *, size_t *, size_t *); extern my_bool my_compress(uchar *, size_t *, size_t *);
extern my_bool my_uncompress(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, extern uchar *my_compress_alloc(const uchar *packet, size_t *len,
size_t *complen); size_t *complen);
extern int packfrm(uchar *, size_t, uchar **, size_t *); extern int packfrm(uchar *, size_t, uchar **, size_t *);
extern int unpackfrm(uchar **, size_t *, const uchar *); extern int unpackfrm(uchar **, size_t *, const uchar *);
extern ha_checksum my_checksum(ha_checksum crc, const uchar *mem, extern ha_checksum my_checksum(ha_checksum crc, const uchar *mem,
size_t count); size_t count);
#ifndef DBUG_OFF
extern void my_debug_put_break_here(void);
#else
#define my_debug_put_break_here() do {} while(0)
#endif
extern void my_sleep(ulong m_seconds); extern void my_sleep(ulong m_seconds);
extern ulong crc32(ulong crc, const uchar *buf, uint len); extern ulong crc32(ulong crc, const uchar *buf, uint len);
extern uint my_set_max_open_files(uint files); extern uint my_set_max_open_files(uint files);
void my_free_open_file_info(void); void my_free_open_file_info(void);
extern time_t my_time(myf flags); extern time_t my_time(myf flags);
extern ulonglong my_getsystime(void); extern ulonglong my_getsystime(void);
extern ulonglong my_micro_time(); extern ulonglong my_micro_time();
extern ulonglong my_micro_time_and_time(time_t *time_arg); extern ulonglong my_micro_time_and_time(time_t *time_arg);
time_t my_time_possible_from_micro(ulonglong microtime); time_t my_time_possible_from_micro(ulonglong microtime);
skipping to change at line 891 skipping to change at line 987
/* not a complete set of mmap() flags, but only those that nesessary */ /* not a complete set of mmap() flags, but only those that nesessary */
#define PROT_READ 1 #define PROT_READ 1
#define PROT_WRITE 2 #define PROT_WRITE 2
#define MAP_NORESERVE 0 #define MAP_NORESERVE 0
#define MAP_SHARED 0x0001 #define MAP_SHARED 0x0001
#define MAP_PRIVATE 0x0002 #define MAP_PRIVATE 0x0002
#define MAP_NOSYNC 0x0800 #define MAP_NOSYNC 0x0800
#define MAP_FAILED ((void *)-1) #define MAP_FAILED ((void *)-1)
#define MS_SYNC 0x0000 #define MS_SYNC 0x0000
#ifndef __NETWARE__
#define HAVE_MMAP #define HAVE_MMAP
#endif
void *my_mmap(void *, size_t, int, int, int, my_off_t); void *my_mmap(void *, size_t, int, int, int, my_off_t);
int my_munmap(void *, size_t); int my_munmap(void *, size_t);
#endif #endif
/* my_getpagesize */ /* my_getpagesize */
#ifdef HAVE_GETPAGESIZE #ifdef HAVE_GETPAGESIZE
#define my_getpagesize() getpagesize() #define my_getpagesize() getpagesize()
#else #else
int my_getpagesize(void); int my_getpagesize(void);
#endif #endif
int my_msync(int, void *, size_t, int); int my_msync(int, void *, size_t, int);
#define MY_UUID_SIZE 16
#define MY_UUID_STRING_LENGTH (8+1+4+1+4+1+4+1+12)
void my_uuid_init(ulong seed1, ulong seed2);
void my_uuid(uchar *guid);
void my_uuid2str(const uchar *guid, char *s);
void my_uuid_end();
struct my_rnd_struct {
unsigned long seed1,seed2,max_value;
double max_value_dbl;
};
void my_rnd_init(struct my_rnd_struct *rand_st, ulong seed1, ulong seed2);
double my_rnd(struct my_rnd_struct *rand_st);
/* character sets */ /* character sets */
extern uint get_charset_number(const char *cs_name, uint cs_flags); extern uint get_charset_number(const char *cs_name, uint cs_flags);
extern uint get_collation_number(const char *name); extern uint get_collation_number(const char *name);
extern const char *get_charset_name(uint cs_number); extern const char *get_charset_name(uint cs_number);
extern CHARSET_INFO *get_charset(uint cs_number, myf flags); extern CHARSET_INFO *get_charset(uint cs_number, myf flags);
extern CHARSET_INFO *get_charset_by_name(const char *cs_name, myf flags); extern CHARSET_INFO *get_charset_by_name(const char *cs_name, myf flags);
extern CHARSET_INFO *get_charset_by_csname(const char *cs_name, extern CHARSET_INFO *get_charset_by_csname(const char *cs_name,
uint cs_flags, myf my_flags); uint cs_flags, myf my_flags);
extern my_bool resolve_charset(const char *cs_name, extern my_bool resolve_charset(const char *cs_name,
CHARSET_INFO *default_cs, CHARSET_INFO *default_cs,
CHARSET_INFO **cs); CHARSET_INFO **cs);
extern my_bool resolve_collation(const char *cl_name, extern my_bool resolve_collation(const char *cl_name,
CHARSET_INFO *default_cl, CHARSET_INFO *default_cl,
CHARSET_INFO **cl); CHARSET_INFO **cl);
extern void free_charsets(void); extern void free_charsets(void);
extern char *get_charsets_dir(char *buf); extern char *get_charsets_dir(char *buf);
extern my_bool my_charset_same(CHARSET_INFO *cs1, CHARSET_INFO *cs2); extern my_bool my_charset_same(CHARSET_INFO *cs1, CHARSET_INFO *cs2);
extern my_bool init_compiled_charsets(myf flags); extern my_bool init_compiled_charsets(myf flags);
extern void add_compiled_collation(CHARSET_INFO *cs); extern void add_compiled_collation(CHARSET_INFO *cs);
extern size_t escape_string_for_mysql(CHARSET_INFO *charset_info, extern size_t escape_string_for_mysql(CHARSET_INFO *charset_info,
char *to, size_t to_length, char *to, size_t to_length,
const char *from, size_t length); const char *from, size_t length);
#ifdef __WIN__ #ifdef __WIN__
#define BACKSLASH_MBTAIL #define BACKSLASH_MBTAIL
skipping to change at line 956 skipping to change at line 1072
int my_security_attr_create(SECURITY_ATTRIBUTES **psa, const char **perror, int my_security_attr_create(SECURITY_ATTRIBUTES **psa, const char **perror,
DWORD owner_rights, DWORD everybody_rights); DWORD owner_rights, DWORD everybody_rights);
void my_security_attr_free(SECURITY_ATTRIBUTES *sa); void my_security_attr_free(SECURITY_ATTRIBUTES *sa);
/* implemented in my_conio.c */ /* implemented in my_conio.c */
char* my_cgets(char *string, size_t clen, size_t* plen); char* my_cgets(char *string, size_t clen, size_t* plen);
#endif #endif
#ifdef __NETWARE__
#include <mysql/psi/psi.h> void netware_reg_user(const char *ip, const char *user,
const char *application);
#ifdef HAVE_PSI_INTERFACE
extern MYSQL_PLUGIN_IMPORT struct PSI_bootstrap *PSI_hook;
void my_init_mysys_psi_keys(void);
#endif #endif
struct st_mysql_file;
extern struct st_mysql_file *mysql_stdin;
C_MODE_END C_MODE_END
#endif /* _my_sys_h */ #endif /* _my_sys_h */
 End of changes. 63 change blocks. 
105 lines changed or deleted 227 lines changed or added


 mysql.h   mysql.h 
skipping to change at line 47 skipping to change at line 47
#undef _WIN32 #undef _WIN32
#undef _WIN64 #undef _WIN64
#undef __WIN__ #undef __WIN__
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#ifndef _global_h /* If not standard header */ #ifndef _global_h /* If not standard header */
#ifndef MYSQL_ABI_CHECK
#include <sys/types.h> #include <sys/types.h>
#endif
#ifdef __LCC__ #ifdef __LCC__
#include <winsock2.h> /* For windows */ #include <winsock2.h> /* For windows */
#endif #endif
typedef char my_bool; typedef char my_bool;
#if (defined(_WIN32) || defined(_WIN64)) && !defined(__WIN__) #if (defined(_WIN32) || defined(_WIN64)) && !defined(__WIN__)
#define __WIN__ #define __WIN__
#endif #endif
#if !defined(__WIN__) #if !defined(__WIN__)
#define STDCALL #define STDCALL
#else #else
skipping to change at line 84 skipping to change at line 82
#include "mysql_time.h" #include "mysql_time.h"
#include "my_list.h" /* for LISTs used in 'MYSQL' and 'MYSQL_STMT' */ #include "my_list.h" /* for LISTs used in 'MYSQL' and 'MYSQL_STMT' */
extern unsigned int mysql_port; extern unsigned int mysql_port;
extern char *mysql_unix_port; extern char *mysql_unix_port;
#define CLIENT_NET_READ_TIMEOUT 365*24*3600 /* Timeout o n read */ #define CLIENT_NET_READ_TIMEOUT 365*24*3600 /* Timeout o n read */
#define CLIENT_NET_WRITE_TIMEOUT 365*24*3600 /* Timeout on write */ #define CLIENT_NET_WRITE_TIMEOUT 365*24*3600 /* Timeout on write */
#ifdef __NETWARE__
#pragma pack(push, 8) /* 8 byte alignment */
#endif
#define IS_PRI_KEY(n) ((n) & PRI_KEY_FLAG) #define IS_PRI_KEY(n) ((n) & PRI_KEY_FLAG)
#define IS_NOT_NULL(n) ((n) & NOT_NULL_FLAG) #define IS_NOT_NULL(n) ((n) & NOT_NULL_FLAG)
#define IS_BLOB(n) ((n) & BLOB_FLAG) #define IS_BLOB(n) ((n) & BLOB_FLAG)
/** #define IS_NUM(t) ((t) <= MYSQL_TYPE_INT24 || (t) == MYSQL_TYPE_YEAR |
Returns true if the value is a number which does not need quotes for | (t) == MYSQL_TYPE_NEWDECIMAL)
the sql_lex.cc parser to parse correctly. #define IS_NUM_FIELD(f) ((f)->flags & NUM_FLAG)
*/ #define INTERNAL_NUM_FIELD(f) (((f)->type <= MYSQL_TYPE_INT24 && ((f)->type
#define IS_NUM(t) (((t) <= MYSQL_TYPE_INT24 && (t) != MYSQL_TYPE_TIMES != MYSQL_TYPE_TIMESTAMP || (f)->length == 14 || (f)->length == 8)) || (f)-
TAMP) || (t) == MYSQL_TYPE_YEAR || (t) == MYSQL_TYPE_NEWDECIMAL) >type == MYSQL_TYPE_YEAR)
#define IS_LONGDATA(t) ((t) >= MYSQL_TYPE_TINY_BLOB && (t) <= MYSQL_TYPE_ST RING) #define IS_LONGDATA(t) ((t) >= MYSQL_TYPE_TINY_BLOB && (t) <= MYSQL_TYPE_ST RING)
typedef struct st_mysql_field { typedef struct st_mysql_field {
char *name; /* Name of column */ char *name; /* Name of column */
char *org_name; /* Original column name, if an alias */ char *org_name; /* Original column name, if an alias */
char *table; /* Table of column if column was a field */ char *table; /* Table of column if column was a field */
char *org_table; /* Org table name, if table was an alias */ char *org_table; /* Org table name, if table was an alias */
char *db; /* Database for table */ char *db; /* Database for table */
char *catalog; /* Catalog for table */ char *catalog; /* Catalog for table */
char *def; /* Default value (set by mysql_list_fields) * / char *def; /* Default value (set by mysql_list_fields) * /
skipping to change at line 737 skipping to change at line 737
They are not for general usage They are not for general usage
*/ */
#define simple_command(mysql, command, arg, length, skip_check) \ #define simple_command(mysql, command, arg, length, skip_check) \
(*(mysql)->methods->advanced_command)(mysql, command, 0, \ (*(mysql)->methods->advanced_command)(mysql, command, 0, \
0, arg, length, skip_check, NULL) 0, arg, length, skip_check, NULL)
#define stmt_command(mysql, command, arg, length, stmt) \ #define stmt_command(mysql, command, arg, length, stmt) \
(*(mysql)->methods->advanced_command)(mysql, command, 0, \ (*(mysql)->methods->advanced_command)(mysql, command, 0, \
0, arg, length, 1, stmt) 0, arg, length, 1, stmt)
#ifdef __NETWARE__
#pragma pack(pop) /* restore alignment */
#endif
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _mysql_h */ #endif /* _mysql_h */
 End of changes. 5 change blocks. 
8 lines changed or deleted 14 lines changed or added


 mysql_com.h   mysql_com.h 
skipping to change at line 24 skipping to change at line 24
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A */ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A */
/* /*
** Common definition between mysql server & client ** Common definition between mysql server & client
*/ */
#ifndef _mysql_com_h #ifndef _mysql_com_h
#define _mysql_com_h #define _mysql_com_h
#define HOSTNAME_LENGTH 60 #define HOSTNAME_LENGTH 60
#define SYSTEM_CHARSET_MBMAXLEN 3 #define SYSTEM_CHARSET_MBMAXLEN 4
#define NAME_CHAR_LEN 64 /* Field/table name length */ #define NAME_CHAR_LEN 64 /* Field/table name length */
#define USERNAME_CHAR_LENGTH 16 #define USERNAME_CHAR_LENGTH 16
#define NAME_LEN (NAME_CHAR_LEN*SYSTEM_CHARSET_MBMAXLEN) #define NAME_LEN (NAME_CHAR_LEN*SYSTEM_CHARSET_MBMAXLEN)
#define USERNAME_LENGTH (USERNAME_CHAR_LENGTH*SYSTEM_CHARSET_MBMAXL EN) #define USERNAME_LENGTH (USERNAME_CHAR_LENGTH*SYSTEM_CHARSET_MBMAXL EN)
#define MYSQL_AUTODETECT_CHARSET_NAME "auto"
#define SERVER_VERSION_LENGTH 60 #define SERVER_VERSION_LENGTH 60
#define SQLSTATE_LENGTH 5 #define SQLSTATE_LENGTH 5
/* /*
Maximum length of comments Maximum length of comments
*/ */
#define TABLE_COMMENT_INLINE_MAXLEN 180 /* pre 6.0: 60 characters */ #define TABLE_COMMENT_INLINE_MAXLEN 180 /* pre 6.0: 60 (3-byte) characters */
#define TABLE_COMMENT_MAXLEN 2048 #define TABLE_COMMENT_MAXLEN 2048
#define COLUMN_COMMENT_MAXLEN 1024 #define COLUMN_COMMENT_MAXLEN 1024
#define INDEX_COMMENT_MAXLEN 1024 #define INDEX_COMMENT_MAXLEN 1024
/* /*
USER_HOST_BUFF_SIZE -- length of string buffer, that is enough to contain USER_HOST_BUFF_SIZE -- length of string buffer, that is enough to contain
username and hostname parts of the user identifier with trailing zero in username and hostname parts of the user identifier with trailing zero in
MySQL standard format: MySQL standard format:
user_name_part@host_name_part\0 user_name_part@host_name_part\0
*/ */
skipping to change at line 114 skipping to change at line 112
#define ON_UPDATE_NOW_FLAG 8192 /* Field is set to NOW on UPDATE */ #define ON_UPDATE_NOW_FLAG 8192 /* Field is set to NOW on UPDATE */
#define NUM_FLAG 32768 /* Field is num (for clients) */ #define NUM_FLAG 32768 /* Field is num (for clients) */
#define PART_KEY_FLAG 16384 /* Intern; Part of some key */ #define PART_KEY_FLAG 16384 /* Intern; Part of some key */
#define GROUP_FLAG 32768 /* Intern: Group field */ #define GROUP_FLAG 32768 /* Intern: Group field */
#define UNIQUE_FLAG 65536 /* Intern: Used by sql_yacc */ #define UNIQUE_FLAG 65536 /* Intern: Used by sql_yacc */
#define BINCMP_FLAG 131072 /* Intern: Used by sql_yacc */ #define BINCMP_FLAG 131072 /* Intern: Used by sql_yacc */
#define GET_FIXED_FIELDS_FLAG (1 << 18) /* Used to get fields in item tree */ #define GET_FIXED_FIELDS_FLAG (1 << 18) /* Used to get fields in item tree */
#define FIELD_IN_PART_FUNC_FLAG (1 << 19)/* Field part of partition func */ #define FIELD_IN_PART_FUNC_FLAG (1 << 19)/* Field part of partition func */
#define FIELD_IN_ADD_INDEX (1<< 20) /* Intern: Field used in ADD INDEX * / #define FIELD_IN_ADD_INDEX (1<< 20) /* Intern: Field used in ADD INDEX * /
#define FIELD_IS_RENAMED (1<< 21) /* Intern: Field is being renamed * / #define FIELD_IS_RENAMED (1<< 21) /* Intern: Field is being renamed * /
#define FIELD_STORAGE_FLAGS 22 /* Storage type: bit 22, 23 and 24
*/
#define COLUMN_FORMAT_FLAGS 25 /* Column format: bit 25, 26 and 27
*/
#define REFRESH_GRANT 1 /* Refresh grant tables */ #define REFRESH_GRANT 1 /* Refresh grant tables */
#define REFRESH_LOG 2 /* Start on new log file */ #define REFRESH_LOG 2 /* Start on new log file */
#define REFRESH_TABLES 4 /* close all tables */ #define REFRESH_TABLES 4 /* close all tables */
#define REFRESH_HOSTS 8 /* Flush host cache */ #define REFRESH_HOSTS 8 /* Flush host cache */
#define REFRESH_STATUS 16 /* Flush status variables */ #define REFRESH_STATUS 16 /* Flush status variables */
#define REFRESH_THREADS 32 /* Flush thread cache */ #define REFRESH_THREADS 32 /* Flush thread cache */
#define REFRESH_SLAVE 64 /* Reset master info and restart sl ave #define REFRESH_SLAVE 64 /* Reset master info and restart sl ave
thread */ thread */
#define REFRESH_MASTER 128 /* Remove all bin logs in the index #define REFRESH_MASTER 128 /* Remove all bin logs in the index
and truncate the index */ and truncate the index */
#define REFRESH_ERROR_LOG 256 /* Rotate only the erorr log */
#define REFRESH_ENGINE_LOG 512 /* Flush all storage engine logs */
#define REFRESH_BINARY_LOG 1024 /* Flush the binary log */
#define REFRESH_RELAY_LOG 2048 /* Flush the relay log */
#define REFRESH_GENERAL_LOG 4096 /* Flush the general log */
#define REFRESH_SLOW_LOG 8192 /* Flush the slow query log */
/* The following can't be set with mysql_refresh() */ /* The following can't be set with mysql_refresh() */
#define REFRESH_READ_LOCK 16384 /* Lock tables for read */ #define REFRESH_READ_LOCK 16384 /* Lock tables for read */
#define REFRESH_FAST 32768 /* Intern flag */ #define REFRESH_FAST 32768 /* Intern flag */
/* RESET (remove all queries) from query cache */ /* RESET (remove all queries) from query cache */
#define REFRESH_QUERY_CACHE 65536 #define REFRESH_QUERY_CACHE 65536
#define REFRESH_QUERY_CACHE_FREE 0x20000L /* pack query cache */ #define REFRESH_QUERY_CACHE_FREE 0x20000L /* pack query cache */
#define REFRESH_DES_KEY_FILE 0x40000L #define REFRESH_DES_KEY_FILE 0x40000L
#define REFRESH_USER_RESOURCES 0x80000L #define REFRESH_USER_RESOURCES 0x80000L
#define REFRESH_BACKUP_LOG 0x200000L
#define CLIENT_LONG_PASSWORD 1 /* new more secure passwords */ #define CLIENT_LONG_PASSWORD 1 /* new more secure passwords */
#define CLIENT_FOUND_ROWS 2 /* Found instead of affected rows */ #define CLIENT_FOUND_ROWS 2 /* Found instead of affected rows */
#define CLIENT_LONG_FLAG 4 /* Get all column flags */ #define CLIENT_LONG_FLAG 4 /* Get all column flags */
#define CLIENT_CONNECT_WITH_DB 8 /* One can specify db on connect */ #define CLIENT_CONNECT_WITH_DB 8 /* One can specify db on connect */
#define CLIENT_NO_SCHEMA 16 /* Don't allow database.table.column */ #define CLIENT_NO_SCHEMA 16 /* Don't allow database.table.column */
#define CLIENT_COMPRESS 32 /* Can use compression proto col */ #define CLIENT_COMPRESS 32 /* Can use compression proto col */
#define CLIENT_ODBC 64 /* Odbc client */ #define CLIENT_ODBC 64 /* Odbc client */
#define CLIENT_LOCAL_FILES 128 /* Can use LOAD DATA LOCAL */ #define CLIENT_LOCAL_FILES 128 /* Can use LOAD DATA LOCAL */
#define CLIENT_IGNORE_SPACE 256 /* Ignore spaces before '(' */ #define CLIENT_IGNORE_SPACE 256 /* Ignore spaces before '(' */
skipping to change at line 197 skipping to change at line 192
/* /*
Switch off the flags that are optional and depending on build flags Switch off the flags that are optional and depending on build flags
If any of the optional flags is supported by the build it will be switche d If any of the optional flags is supported by the build it will be switche d
on before sending to the client during the connection handshake. on before sending to the client during the connection handshake.
*/ */
#define CLIENT_BASIC_FLAGS (((CLIENT_ALL_FLAGS & ~CLIENT_SSL) \ #define CLIENT_BASIC_FLAGS (((CLIENT_ALL_FLAGS & ~CLIENT_SSL) \
& ~CLIENT_COMPRESS) \ & ~CLIENT_COMPRESS) \
& ~CLIENT_SSL_VERIFY_SERVER_ CERT) & ~CLIENT_SSL_VERIFY_SERVER_ CERT)
/** #define SERVER_STATUS_IN_TRANS 1 /* Transaction has started */
Is raised when a multi-statement transaction
has been started, either explicitly, by means
of BEGIN or COMMIT AND CHAIN, or
implicitly, by the first transactional
statement, when autocommit=off.
*/
#define SERVER_STATUS_IN_TRANS 1
#define SERVER_STATUS_AUTOCOMMIT 2 /* Server in auto_commit mode */ #define SERVER_STATUS_AUTOCOMMIT 2 /* Server in auto_commit mode */
#define SERVER_MORE_RESULTS_EXISTS 8 /* Multi query - next query exists */ #define SERVER_MORE_RESULTS_EXISTS 8 /* Multi query - next query exists */
#define SERVER_QUERY_NO_GOOD_INDEX_USED 16 #define SERVER_QUERY_NO_GOOD_INDEX_USED 16
#define SERVER_QUERY_NO_INDEX_USED 32 #define SERVER_QUERY_NO_INDEX_USED 32
/** /**
The server was able to fulfill the clients request and opened a The server was able to fulfill the clients request and opened a
read-only non-scrollable cursor for a query. This flag comes read-only non-scrollable cursor for a query. This flag comes
in reply to COM_STMT_EXECUTE and COM_STMT_FETCH commands. in reply to COM_STMT_EXECUTE and COM_STMT_FETCH commands.
*/ */
#define SERVER_STATUS_CURSOR_EXISTS 64 #define SERVER_STATUS_CURSOR_EXISTS 64
skipping to change at line 228 skipping to change at line 216
*/ */
#define SERVER_STATUS_LAST_ROW_SENT 128 #define SERVER_STATUS_LAST_ROW_SENT 128
#define SERVER_STATUS_DB_DROPPED 256 /* A database was dropped */ #define SERVER_STATUS_DB_DROPPED 256 /* A database was dropped */
#define SERVER_STATUS_NO_BACKSLASH_ESCAPES 512 #define SERVER_STATUS_NO_BACKSLASH_ESCAPES 512
/** /**
Sent to the client if after a prepared statement reprepare Sent to the client if after a prepared statement reprepare
we discovered that the new statement returns a different we discovered that the new statement returns a different
number of result set columns. number of result set columns.
*/ */
#define SERVER_STATUS_METADATA_CHANGED 1024 #define SERVER_STATUS_METADATA_CHANGED 1024
#define SERVER_QUERY_WAS_SLOW 2048 /*
Tell clients that this query was logged to the slow query log.
Not yet set in the server, but interface is defined for applications
to use. See WorkLog 4098.
*/
#define SERVER_QUERY_WAS_SLOW 2048
/** /**
To mark ResultSet containing output parameter values. To mark ResultSet containing output parameter values.
*/ */
#define SERVER_PS_OUT_PARAMS 4096 #define SERVER_PS_OUT_PARAMS 4096
/** /**
Server status flags that must be cleared when starting Server status flags that must be cleared when starting
execution of a new SQL statement. execution of a new SQL statement.
Flags from this set are only added to the Flags from this set are only added to the
skipping to change at line 306 skipping to change at line 299
unsigned char *unused; unsigned char *unused;
unsigned int last_errno; unsigned int last_errno;
unsigned char error; unsigned char error;
my_bool unused4; /* Please remove with the next incompatible ABI change. */ my_bool unused4; /* Please remove with the next incompatible ABI change. */
my_bool unused5; /* Please remove with the next incompatible ABI change. */ my_bool unused5; /* Please remove with the next incompatible ABI change. */
/** Client library error message buffer. Actually belongs to struct MYSQL . */ /** Client library error message buffer. Actually belongs to struct MYSQL . */
char last_error[MYSQL_ERRMSG_SIZE]; char last_error[MYSQL_ERRMSG_SIZE];
/** Client library sqlstate buffer. Set along with the error message. */ /** Client library sqlstate buffer. Set along with the error message. */
char sqlstate[SQLSTATE_LENGTH+1]; char sqlstate[SQLSTATE_LENGTH+1];
void *extension; void *extension;
#if defined(MYSQL_SERVER) && !defined(EMBEDDED_LIBRARY)
/*
Controls whether a big packet should be skipped.
Initially set to FALSE by default. Unauthenticated sessions must have
this set to FALSE so that the server can't be tricked to read packets
indefinitely.
*/
my_bool skip_big_packet;
#endif
} NET; } NET;
#define packet_error (~(unsigned long) 0) #define packet_error (~(unsigned long) 0)
enum enum_field_types { MYSQL_TYPE_DECIMAL, MYSQL_TYPE_TINY, enum enum_field_types { MYSQL_TYPE_DECIMAL, MYSQL_TYPE_TINY,
MYSQL_TYPE_SHORT, MYSQL_TYPE_LONG, MYSQL_TYPE_SHORT, MYSQL_TYPE_LONG,
MYSQL_TYPE_FLOAT, MYSQL_TYPE_DOUBLE, MYSQL_TYPE_FLOAT, MYSQL_TYPE_DOUBLE,
MYSQL_TYPE_NULL, MYSQL_TYPE_TIMESTAMP, MYSQL_TYPE_NULL, MYSQL_TYPE_TIMESTAMP,
MYSQL_TYPE_LONGLONG,MYSQL_TYPE_INT24, MYSQL_TYPE_LONGLONG,MYSQL_TYPE_INT24,
MYSQL_TYPE_DATE, MYSQL_TYPE_TIME, MYSQL_TYPE_DATE, MYSQL_TYPE_TIME,
MYSQL_TYPE_DATETIME, MYSQL_TYPE_YEAR, MYSQL_TYPE_DATETIME, MYSQL_TYPE_YEAR,
MYSQL_TYPE_NEWDATE, MYSQL_TYPE_VARCHAR, MYSQL_TYPE_NEWDATE, MYSQL_TYPE_VARCHAR,
MYSQL_TYPE_BIT, MYSQL_TYPE_BIT,
MYSQL_TYPE_NEWDECIMAL=246, MYSQL_TYPE_NEWDECIMAL=246,
MYSQL_TYPE_ENUM=247, MYSQL_TYPE_ENUM=247,
MYSQL_TYPE_SET=248, MYSQL_TYPE_SET=248,
MYSQL_TYPE_TINY_BLOB=249, MYSQL_TYPE_TINY_BLOB=249,
MYSQL_TYPE_MEDIUM_BLOB=250, MYSQL_TYPE_MEDIUM_BLOB=250,
MYSQL_TYPE_LONG_BLOB=251, MYSQL_TYPE_LONG_BLOB=251,
MYSQL_TYPE_BLOB=252, MYSQL_TYPE_BLOB=252,
MYSQL_TYPE_VAR_STRING=253, MYSQL_TYPE_VAR_STRING=253,
MYSQL_TYPE_STRING=254, MYSQL_TYPE_STRING=254,
MYSQL_TYPE_GEOMETRY=255 MYSQL_TYPE_GEOMETRY=255,
MAX_NO_FIELD_TYPES /* Should always be last */
}; };
/* For backward compatibility */ /* For backward compatibility */
#define CLIENT_MULTI_QUERIES CLIENT_MULTI_STATEMENTS #define CLIENT_MULTI_QUERIES CLIENT_MULTI_STATEMENTS
#define FIELD_TYPE_DECIMAL MYSQL_TYPE_DECIMAL #define FIELD_TYPE_DECIMAL MYSQL_TYPE_DECIMAL
#define FIELD_TYPE_NEWDECIMAL MYSQL_TYPE_NEWDECIMAL #define FIELD_TYPE_NEWDECIMAL MYSQL_TYPE_NEWDECIMAL
#define FIELD_TYPE_TINY MYSQL_TYPE_TINY #define FIELD_TYPE_TINY MYSQL_TYPE_TINY
#define FIELD_TYPE_SHORT MYSQL_TYPE_SHORT #define FIELD_TYPE_SHORT MYSQL_TYPE_SHORT
#define FIELD_TYPE_LONG MYSQL_TYPE_LONG #define FIELD_TYPE_LONG MYSQL_TYPE_LONG
#define FIELD_TYPE_FLOAT MYSQL_TYPE_FLOAT #define FIELD_TYPE_FLOAT MYSQL_TYPE_FLOAT
skipping to change at line 447 skipping to change at line 430
unsigned long my_net_read(NET *net); unsigned long my_net_read(NET *net);
#ifdef _global_h #ifdef _global_h
void my_net_set_write_timeout(NET *net, uint timeout); void my_net_set_write_timeout(NET *net, uint timeout);
void my_net_set_read_timeout(NET *net, uint timeout); void my_net_set_read_timeout(NET *net, uint timeout);
#endif #endif
struct sockaddr; struct sockaddr;
int my_connect(my_socket s, const struct sockaddr *name, unsigned int namel en, int my_connect(my_socket s, const struct sockaddr *name, unsigned int namel en,
unsigned int timeout); unsigned int timeout);
struct my_rnd_struct;
struct rand_struct {
unsigned long seed1,seed2,max_value;
double max_value_dbl;
};
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
/* The following is for user defined functions */ /* The following is for user defined functions */
enum Item_result {STRING_RESULT=0, REAL_RESULT, INT_RESULT, ROW_RESULT, enum Item_result
DECIMAL_RESULT}; {
STRING_RESULT=0, REAL_RESULT, INT_RESULT, ROW_RESULT, DECIMAL_RESULT
#ifdef MYSQL_SERVER
,IMPOSSIBLE_RESULT /* Yes, we know this is ugly, don't tell us */
,MAX_NO_ITEM_RESULTS = IMPOSSIBLE_RESULT /* Should always be last */
#endif
};
typedef struct st_udf_args typedef struct st_udf_args
{ {
unsigned int arg_count; /* Number of arguments */ unsigned int arg_count; /* Number of arguments */
enum Item_result *arg_type; /* Pointer to item_results */ enum Item_result *arg_type; /* Pointer to item_results */
char **args; /* Pointer to argument */ char **args; /* Pointer to argument */
unsigned long *lengths; /* Length of string arguments */ unsigned long *lengths; /* Length of string arguments */
char *maybe_null; /* Set to 1 for all maybe_null args */ char *maybe_null; /* Set to 1 for all maybe_null args */
char **attributes; /* Pointer to attribute name */ char **attributes; /* Pointer to attribute name */
unsigned long *attribute_lengths; /* Length of attribute arguments */ unsigned long *attribute_lengths; /* Length of attribute arguments */
skipping to change at line 505 skipping to change at line 490
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/* /*
These functions are used for authentication by client and server and These functions are used for authentication by client and server and
implemented in sql/password.c implemented in sql/password.c
*/ */
void randominit(struct rand_struct *, unsigned long seed1, void create_random_string(char *to, unsigned int length,
unsigned long seed2); struct my_rnd_struct *rand_st);
double my_rnd(struct rand_struct *);
void create_random_string(char *to, unsigned int length, struct rand_struct
*rand_st);
void hash_password(unsigned long *to, const char *password, unsigned int pa ssword_len); void hash_password(unsigned long *to, const char *password, unsigned int pa ssword_len);
void make_scrambled_password_323(char *to, const char *password); void make_scrambled_password_323(char *to, const char *password);
void scramble_323(char *to, const char *message, const char *password); void scramble_323(char *to, const char *message, const char *password);
my_bool check_scramble_323(const char *, const char *message, my_bool check_scramble_323(const char *, const char *message,
unsigned long *salt); unsigned long *salt);
void get_salt_from_password_323(unsigned long *res, const char *password); 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_password_from_salt_323(char *to, const unsigned long *salt);
void make_scrambled_password(char *to, const char *password); void make_scrambled_password(char *to, const char *password);
 End of changes. 14 change blocks. 
59 lines changed or deleted 43 lines changed or added


 mysql_embed.h   mysql_embed.h 
#ifndef MYSQL_EMBED_INCLUDED
#define MYSQL_EMBED_INCLUDED
/* Copyright (C) 2000 MySQL AB /* Copyright (C) 2000 MySQL AB
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License. the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
skipping to change at line 27 skipping to change at line 24
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A */ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A */
/* Defines that are unique to the embedded version of MySQL */ /* Defines that are unique to the embedded version of MySQL */
#ifdef EMBEDDED_LIBRARY #ifdef EMBEDDED_LIBRARY
/* Things we don't need in the embedded version of MySQL */ /* Things we don't need in the embedded version of MySQL */
/* TODO HF add #undef HAVE_VIO if we don't want client in embedded library */ /* TODO HF add #undef HAVE_VIO if we don't want client in embedded library */
#undef HAVE_PSTACK /* No stacktrace */ #undef HAVE_PSTACK /* No stacktrace */
#undef HAVE_DLOPEN /* No udf functions */
#undef HAVE_SMEM /* No shared memory */ #undef HAVE_SMEM /* No shared memory */
#undef HAVE_NDBCLUSTER_DB /* No NDB cluster */ #undef HAVE_NDBCLUSTER_DB /* No NDB cluster */
#define DONT_USE_RAID
#endif /* EMBEDDED_LIBRARY */ #endif /* EMBEDDED_LIBRARY */
#endif /* MYSQL_EMBED_INCLUDED */
 End of changes. 4 change blocks. 
4 lines changed or deleted 2 lines changed or added


 mysql_version.h   mysql_version.h 
skipping to change at line 12 skipping to change at line 12
This file is public domain and comes with NO WARRANTY of any kind */ This file is public domain and comes with NO WARRANTY of any kind */
/* Version numbers for protocol & mysqld */ /* Version numbers for protocol & mysqld */
#ifndef _mysql_version_h #ifndef _mysql_version_h
#define _mysql_version_h #define _mysql_version_h
#ifdef _CUSTOMCONFIG_ #ifdef _CUSTOMCONFIG_
#include <custom_conf.h> #include <custom_conf.h>
#else #else
#define PROTOCOL_VERSION 10 #define PROTOCOL_VERSION 10
#define MYSQL_SERVER_VERSION "5.6.0-m4" #define MYSQL_SERVER_VERSION "6.0.11-alpha"
#define MYSQL_BASE_VERSION "mysqld-5.6" #define MYSQL_BASE_VERSION "mysqld-6.0"
#define MYSQL_SERVER_SUFFIX_DEF "" #define MYSQL_SERVER_SUFFIX_DEF ""
#define FRM_VER 6 #define FRM_VER 6
#define MYSQL_VERSION_ID 50600 #define MYSQL_VERSION_ID 60011
#define MYSQL_PORT 3306 #define MYSQL_PORT 3306
#define MYSQL_PORT_DEFAULT 0 #define MYSQL_PORT_DEFAULT 0
#define MYSQL_UNIX_ADDR "/tmp/mysql.sock" #define MYSQL_UNIX_ADDR "/tmp/mysql.sock"
#define MYSQL_CONFIG_NAME "my" #define MYSQL_CONFIG_NAME "my"
#define MYSQL_COMPILATION_COMMENT "Source distribution" #define MYSQL_COMPILATION_COMMENT "Source distribution"
/* mysqld compile time options */ /* mysqld compile time options */
#endif /* _CUSTOMCONFIG_ */ #endif /* _CUSTOMCONFIG_ */
#ifndef LICENSE #ifndef LICENSE
 End of changes. 2 change blocks. 
3 lines changed or deleted 3 lines changed or added


 mysqld_ername.h   mysqld_ername.h 
skipping to change at line 122 skipping to change at line 122
{ "ER_UNKNOWN_TABLE", 1109, "Unknown table \'%-.192s\' in %-.32s" }, { "ER_UNKNOWN_TABLE", 1109, "Unknown table \'%-.192s\' in %-.32s" },
{ "ER_FIELD_SPECIFIED_TWICE", 1110, "Column \'%-.192s\' specified twice" }, { "ER_FIELD_SPECIFIED_TWICE", 1110, "Column \'%-.192s\' specified twice" },
{ "ER_INVALID_GROUP_FUNC_USE", 1111, "Invalid use of group function" }, { "ER_INVALID_GROUP_FUNC_USE", 1111, "Invalid use of group function" },
{ "ER_UNSUPPORTED_EXTENSION", 1112, "Table \'%-.192s\' uses an extension th at doesn\'t exist in this MySQL version" }, { "ER_UNSUPPORTED_EXTENSION", 1112, "Table \'%-.192s\' uses an extension th at doesn\'t exist in this MySQL version" },
{ "ER_TABLE_MUST_HAVE_COLUMNS", 1113, "A table must have at least 1 column" }, { "ER_TABLE_MUST_HAVE_COLUMNS", 1113, "A table must have at least 1 column" },
{ "ER_RECORD_FILE_FULL", 1114, "The table \'%-.192s\' is full" }, { "ER_RECORD_FILE_FULL", 1114, "The table \'%-.192s\' is full" },
{ "ER_UNKNOWN_CHARACTER_SET", 1115, "Unknown character set: \'%-.64s\'" }, { "ER_UNKNOWN_CHARACTER_SET", 1115, "Unknown character set: \'%-.64s\'" },
{ "ER_TOO_MANY_TABLES", 1116, "Too many tables; MySQL can only use %d table s in a join" }, { "ER_TOO_MANY_TABLES", 1116, "Too many tables; MySQL can only use %d table s in a join" },
{ "ER_TOO_MANY_FIELDS", 1117, "Too many columns" }, { "ER_TOO_MANY_FIELDS", 1117, "Too many columns" },
{ "ER_TOO_BIG_ROWSIZE", 1118, "Row size too large. The maximum row size for the used table type, not counting BLOBs, is %ld. You have to change some c olumns to TEXT or BLOBs" }, { "ER_TOO_BIG_ROWSIZE", 1118, "Row size too large. The maximum row size for the used table type, not counting BLOBs, is %ld. You have to change some c olumns to TEXT or BLOBs" },
{ "ER_STACK_OVERRUN", 1119, "Thread stack overrun: Used: %ld of a %ld stac k. Use \'mysqld --thread_stack=#\' to specify a bigger stack if needed" }, { "ER_STACK_OVERRUN", 1119, "Thread stack overrun: Used: %ld of a %ld stac k. Use \'mysqld -O thread_stack=#\' to specify a bigger stack if needed" } ,
{ "ER_WRONG_OUTER_JOIN", 1120, "Cross dependency found in OUTER JOIN; exami ne your ON conditions" }, { "ER_WRONG_OUTER_JOIN", 1120, "Cross dependency found in OUTER JOIN; exami ne your ON conditions" },
{ "ER_NULL_COLUMN_IN_INDEX", 1121, "Table handler doesn\'t support NULL in given index. Please change column \'%-.192s\' to be NOT NULL or use another handler" }, { "ER_NULL_COLUMN_IN_INDEX", 1121, "Table handler doesn\'t support NULL in given index. Please change column \'%-.192s\' to be NOT NULL or use another handler" },
{ "ER_CANT_FIND_UDF", 1122, "Can\'t load function \'%-.192s\'" }, { "ER_CANT_FIND_UDF", 1122, "Can\'t load function \'%-.192s\'" },
{ "ER_CANT_INITIALIZE_UDF", 1123, "Can\'t initialize function \'%-.192s\'; %-.80s" }, { "ER_CANT_INITIALIZE_UDF", 1123, "Can\'t initialize function \'%-.192s\'; %-.80s" },
{ "ER_UDF_NO_PATHS", 1124, "No paths allowed for shared library" }, { "ER_UDF_NO_PATHS", 1124, "No paths allowed for shared library" },
{ "ER_UDF_EXISTS", 1125, "Function \'%-.192s\' already exists" }, { "ER_UDF_EXISTS", 1125, "Function \'%-.192s\' already exists" },
{ "ER_CANT_OPEN_LIBRARY", 1126, "Can\'t open shared library \'%-.192s\' (er rno: %d %-.128s)" }, { "ER_CANT_OPEN_LIBRARY", 1126, "Can\'t open shared library \'%-.192s\' (er rno: %d %-.128s)" },
{ "ER_CANT_FIND_DL_ENTRY", 1127, "Can\'t find symbol \'%-.128s\' in library " }, { "ER_CANT_FIND_DL_ENTRY", 1127, "Can\'t find symbol \'%-.128s\' in library " },
{ "ER_FUNCTION_NOT_DEFINED", 1128, "Function \'%-.192s\' is not defined" }, { "ER_FUNCTION_NOT_DEFINED", 1128, "Function \'%-.192s\' is not defined" },
{ "ER_HOST_IS_BLOCKED", 1129, "Host \'%-.64s\' is blocked because of many c onnection errors; unblock with \'mysqladmin flush-hosts\'" }, { "ER_HOST_IS_BLOCKED", 1129, "Host \'%-.64s\' is blocked because of many c onnection errors; unblock with \'mysqladmin flush-hosts\'" },
skipping to change at line 145 skipping to change at line 145
{ "ER_PASSWORD_NOT_ALLOWED", 1132, "You must have privileges to update tabl es in the mysql database to be able to change passwords for others" }, { "ER_PASSWORD_NOT_ALLOWED", 1132, "You must have privileges to update tabl es in the mysql database to be able to change passwords for others" },
{ "ER_PASSWORD_NO_MATCH", 1133, "Can\'t find any matching row in the user t able" }, { "ER_PASSWORD_NO_MATCH", 1133, "Can\'t find any matching row in the user t able" },
{ "ER_UPDATE_INFO", 1134, "Rows matched: %ld Changed: %ld Warnings: %ld" }, { "ER_UPDATE_INFO", 1134, "Rows matched: %ld Changed: %ld Warnings: %ld" },
{ "ER_CANT_CREATE_THREAD", 1135, "Can\'t create a new thread (errno %d); if you are not out of available memory, you can consult the manual for a poss ible OS-dependent bug" }, { "ER_CANT_CREATE_THREAD", 1135, "Can\'t create a new thread (errno %d); if you are not out of available memory, you can consult the manual for a poss ible OS-dependent bug" },
{ "ER_WRONG_VALUE_COUNT_ON_ROW", 1136, "Column count doesn\'t match value c ount at row %ld" }, { "ER_WRONG_VALUE_COUNT_ON_ROW", 1136, "Column count doesn\'t match value c ount at row %ld" },
{ "ER_CANT_REOPEN_TABLE", 1137, "Can\'t reopen table: \'%-.192s\'" }, { "ER_CANT_REOPEN_TABLE", 1137, "Can\'t reopen table: \'%-.192s\'" },
{ "ER_INVALID_USE_OF_NULL", 1138, "Invalid use of NULL value" }, { "ER_INVALID_USE_OF_NULL", 1138, "Invalid use of NULL value" },
{ "ER_REGEXP_ERROR", 1139, "Got error \'%-.64s\' from regexp" }, { "ER_REGEXP_ERROR", 1139, "Got error \'%-.64s\' from regexp" },
{ "ER_MIX_OF_GROUP_FUNC_AND_FIELDS", 1140, "Mixing of GROUP columns (MIN(), MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause" }, { "ER_MIX_OF_GROUP_FUNC_AND_FIELDS", 1140, "Mixing of GROUP columns (MIN(), MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause" },
{ "ER_NONEXISTING_GRANT", 1141, "There is no such grant defined for user \' %-.48s\' on host \'%-.64s\'" }, { "ER_NONEXISTING_GRANT", 1141, "There is no such grant defined for user \' %-.48s\' on host \'%-.64s\'" },
{ "ER_TABLEACCESS_DENIED_ERROR", 1142, "%-.128s command denied to user \'%- .48s\'@\'%-.64s\' for table \'%-.64s\'" }, { "ER_TABLEACCESS_DENIED_ERROR", 1142, "%-.16s command denied to user \'%-. 48s\'@\'%-.64s\' for table \'%-.192s\'" },
{ "ER_COLUMNACCESS_DENIED_ERROR", 1143, "%-.16s command denied to user \'%- .48s\'@\'%-.64s\' for column \'%-.192s\' in table \'%-.192s\'" }, { "ER_COLUMNACCESS_DENIED_ERROR", 1143, "%-.16s command denied to user \'%- .48s\'@\'%-.64s\' for column \'%-.192s\' in table \'%-.192s\'" },
{ "ER_ILLEGAL_GRANT_FOR_TABLE", 1144, "Illegal GRANT/REVOKE command; please consult the manual to see which privileges can be used" }, { "ER_ILLEGAL_GRANT_FOR_TABLE", 1144, "Illegal GRANT/REVOKE command; please consult the manual to see which privileges can be used" },
{ "ER_GRANT_WRONG_HOST_OR_USER", 1145, "The host or user argument to GRANT is too long" }, { "ER_GRANT_WRONG_HOST_OR_USER", 1145, "The host or user argument to GRANT is too long" },
{ "ER_NO_SUCH_TABLE", 1146, "Table \'%-.192s.%-.192s\' doesn\'t exist" }, { "ER_NO_SUCH_TABLE", 1146, "Table \'%-.192s.%-.192s\' doesn\'t exist" },
{ "ER_NONEXISTING_TABLE_GRANT", 1147, "There is no such grant defined for u ser \'%-.48s\' on host \'%-.64s\' on table \'%-.192s\'" }, { "ER_NONEXISTING_TABLE_GRANT", 1147, "There is no such grant defined for u ser \'%-.48s\' on host \'%-.64s\' on table \'%-.192s\'" },
{ "ER_NOT_ALLOWED_COMMAND", 1148, "The used command is not allowed with thi s MySQL version" }, { "ER_NOT_ALLOWED_COMMAND", 1148, "The used command is not allowed with thi s MySQL version" },
{ "ER_SYNTAX_ERROR", 1149, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use" }, { "ER_SYNTAX_ERROR", 1149, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use" },
{ "ER_DELAYED_CANT_CHANGE_LOCK", 1150, "Delayed insert thread couldn\'t get requested lock for table %-.192s" }, { "ER_DELAYED_CANT_CHANGE_LOCK", 1150, "Delayed insert thread couldn\'t get requested lock for table %-.192s" },
{ "ER_TOO_MANY_DELAYED_THREADS", 1151, "Too many delayed threads in use" }, { "ER_TOO_MANY_DELAYED_THREADS", 1151, "Too many delayed threads in use" },
{ "ER_ABORTING_CONNECTION", 1152, "Aborted connection %ld to db: \'%-.192s\ ' user: \'%-.48s\' (%-.64s)" }, { "ER_ABORTING_CONNECTION", 1152, "Aborted connection %ld to db: \'%-.192s\ ' user: \'%-.48s\' (%-.64s)" },
skipping to change at line 203 skipping to change at line 203
{ "ER_MASTER_NET_WRITE", 1190, "Net error writing to master" }, { "ER_MASTER_NET_WRITE", 1190, "Net error writing to master" },
{ "ER_FT_MATCHING_KEY_NOT_FOUND", 1191, "Can\'t find FULLTEXT index matchin g the column list" }, { "ER_FT_MATCHING_KEY_NOT_FOUND", 1191, "Can\'t find FULLTEXT index matchin g the column list" },
{ "ER_LOCK_OR_ACTIVE_TRANSACTION", 1192, "Can\'t execute the given command because you have active locked tables or an active transaction" }, { "ER_LOCK_OR_ACTIVE_TRANSACTION", 1192, "Can\'t execute the given command because you have active locked tables or an active transaction" },
{ "ER_UNKNOWN_SYSTEM_VARIABLE", 1193, "Unknown system variable \'%-.64s\'" }, { "ER_UNKNOWN_SYSTEM_VARIABLE", 1193, "Unknown system variable \'%-.64s\'" },
{ "ER_CRASHED_ON_USAGE", 1194, "Table \'%-.192s\' is marked as crashed and should be repaired" }, { "ER_CRASHED_ON_USAGE", 1194, "Table \'%-.192s\' is marked as crashed and should be repaired" },
{ "ER_CRASHED_ON_REPAIR", 1195, "Table \'%-.192s\' is marked as crashed and last (automatic?) repair failed" }, { "ER_CRASHED_ON_REPAIR", 1195, "Table \'%-.192s\' is marked as crashed and last (automatic?) repair failed" },
{ "ER_WARNING_NOT_COMPLETE_ROLLBACK", 1196, "Some non-transactional changed tables couldn\'t be rolled back" }, { "ER_WARNING_NOT_COMPLETE_ROLLBACK", 1196, "Some non-transactional changed tables couldn\'t be rolled back" },
{ "ER_TRANS_CACHE_FULL", 1197, "Multi-statement transaction required more t han \'max_binlog_cache_size\' bytes of storage; increase this mysqld variab le and try again" }, { "ER_TRANS_CACHE_FULL", 1197, "Multi-statement transaction required more t han \'max_binlog_cache_size\' bytes of storage; increase this mysqld variab le and try again" },
{ "ER_SLAVE_MUST_STOP", 1198, "This operation cannot be performed with a ru nning slave; run STOP SLAVE first" }, { "ER_SLAVE_MUST_STOP", 1198, "This operation cannot be performed with a ru nning slave; run STOP SLAVE first" },
{ "ER_SLAVE_NOT_RUNNING", 1199, "This operation requires a running slave; c onfigure slave and do START SLAVE" }, { "ER_SLAVE_NOT_RUNNING", 1199, "This operation requires a running slave; c onfigure slave and do START SLAVE" },
{ "ER_BAD_SLAVE", 1200, "The server is not configured as slave; fix in conf ig file or with CHANGE MASTER TO" }, { "ER_BAD_SLAVE", 1200, "The server is not configured as slave; fix with CH ANGE MASTER TO" },
{ "ER_MASTER_INFO", 1201, "Could not initialize master info structure; more error messages can be found in the MySQL error log" }, { "ER_MASTER_INFO", 1201, "Could not initialize master info structure; more error messages can be found in the MySQL error log" },
{ "ER_SLAVE_THREAD", 1202, "Could not create slave thread; check system res ources" }, { "ER_SLAVE_THREAD", 1202, "Could not create slave thread; check system res ources" },
{ "ER_TOO_MANY_USER_CONNECTIONS", 1203, "User %-.64s already has more than \'max_user_connections\' active connections" }, { "ER_TOO_MANY_USER_CONNECTIONS", 1203, "User %-.64s already has more than \'max_user_connections\' active connections" },
{ "ER_SET_CONSTANTS_ONLY", 1204, "You may only use constant expressions wit h SET" }, { "ER_SET_CONSTANTS_ONLY", 1204, "You may only use constant expressions wit h SET" },
{ "ER_LOCK_WAIT_TIMEOUT", 1205, "Lock wait timeout exceeded; try restarting transaction" }, { "ER_LOCK_WAIT_TIMEOUT", 1205, "Lock wait timeout exceeded; try restarting transaction" },
{ "ER_LOCK_TABLE_FULL", 1206, "The total number of locks exceeds the lock t able size" }, { "ER_LOCK_TABLE_FULL", 1206, "The total number of locks exceeds the lock t able size" },
{ "ER_READ_ONLY_TRANSACTION", 1207, "Update locks cannot be acquired during a READ UNCOMMITTED transaction" }, { "ER_READ_ONLY_TRANSACTION", 1207, "Update locks cannot be acquired during a READ UNCOMMITTED transaction" },
{ "ER_DROP_DB_WITH_READ_LOCK", 1208, "DROP DATABASE not allowed while threa d is holding global read lock" }, { "ER_DROP_DB_WITH_READ_LOCK", 1208, "DROP DATABASE not allowed while threa d is holding global read lock" },
{ "ER_CREATE_DB_WITH_READ_LOCK", 1209, "CREATE DATABASE not allowed while t hread is holding global read lock" }, { "ER_CREATE_DB_WITH_READ_LOCK", 1209, "CREATE DATABASE not allowed while t hread is holding global read lock" },
{ "ER_WRONG_ARGUMENTS", 1210, "Incorrect arguments to %s" }, { "ER_WRONG_ARGUMENTS", 1210, "Incorrect arguments to %s" },
skipping to change at line 230 skipping to change at line 230
{ "ER_ROW_IS_REFERENCED", 1217, "Cannot delete or update a parent row: a fo reign key constraint fails" }, { "ER_ROW_IS_REFERENCED", 1217, "Cannot delete or update a parent row: a fo reign key constraint fails" },
{ "ER_CONNECT_TO_MASTER", 1218, "Error connecting to master: %-.128s" }, { "ER_CONNECT_TO_MASTER", 1218, "Error connecting to master: %-.128s" },
{ "ER_QUERY_ON_MASTER", 1219, "Error running query on master: %-.128s" }, { "ER_QUERY_ON_MASTER", 1219, "Error running query on master: %-.128s" },
{ "ER_ERROR_WHEN_EXECUTING_COMMAND", 1220, "Error when executing command %s : %-.128s" }, { "ER_ERROR_WHEN_EXECUTING_COMMAND", 1220, "Error when executing command %s : %-.128s" },
{ "ER_WRONG_USAGE", 1221, "Incorrect usage of %s and %s" }, { "ER_WRONG_USAGE", 1221, "Incorrect usage of %s and %s" },
{ "ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT", 1222, "The used SELECT statements have a different number of columns" }, { "ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT", 1222, "The used SELECT statements have a different number of columns" },
{ "ER_CANT_UPDATE_WITH_READLOCK", 1223, "Can\'t execute the query because y ou have a conflicting read lock" }, { "ER_CANT_UPDATE_WITH_READLOCK", 1223, "Can\'t execute the query because y ou have a conflicting read lock" },
{ "ER_MIXING_NOT_ALLOWED", 1224, "Mixing of transactional and non-transacti onal tables is disabled" }, { "ER_MIXING_NOT_ALLOWED", 1224, "Mixing of transactional and non-transacti onal tables is disabled" },
{ "ER_DUP_ARGUMENT", 1225, "Option \'%s\' used twice in statement" }, { "ER_DUP_ARGUMENT", 1225, "Option \'%s\' used twice in statement" },
{ "ER_USER_LIMIT_REACHED", 1226, "User \'%-.64s\' has exceeded the \'%s\' r esource (current value: %ld)" }, { "ER_USER_LIMIT_REACHED", 1226, "User \'%-.64s\' has exceeded the \'%s\' r esource (current value: %ld)" },
{ "ER_SPECIFIC_ACCESS_DENIED_ERROR", 1227, "Access denied; you need (at lea st one of) the %-.128s privilege(s) for this operation" }, { "ER_SPECIFIC_ACCESS_DENIED_ERROR", 1227, "Access denied; you need the %-. 128s privilege for this operation" },
{ "ER_LOCAL_VARIABLE", 1228, "Variable \'%-.64s\' is a SESSION variable and can\'t be used with SET GLOBAL" }, { "ER_LOCAL_VARIABLE", 1228, "Variable \'%-.64s\' is a SESSION variable and can\'t be used with SET GLOBAL" },
{ "ER_GLOBAL_VARIABLE", 1229, "Variable \'%-.64s\' is a GLOBAL variable and should be set with SET GLOBAL" }, { "ER_GLOBAL_VARIABLE", 1229, "Variable \'%-.64s\' is a GLOBAL variable and should be set with SET GLOBAL" },
{ "ER_NO_DEFAULT", 1230, "Variable \'%-.64s\' doesn\'t have a default value " }, { "ER_NO_DEFAULT", 1230, "Variable \'%-.64s\' doesn\'t have a default value " },
{ "ER_WRONG_VALUE_FOR_VAR", 1231, "Variable \'%-.64s\' can\'t be set to the value of \'%-.200s\'" }, { "ER_WRONG_VALUE_FOR_VAR", 1231, "Variable \'%-.64s\' can\'t be set to the value of \'%-.200s\'" },
{ "ER_WRONG_TYPE_FOR_VAR", 1232, "Incorrect argument type to variable \'%-. 64s\'" }, { "ER_WRONG_TYPE_FOR_VAR", 1232, "Incorrect argument type to variable \'%-. 64s\'" },
{ "ER_VAR_CANT_BE_READ", 1233, "Variable \'%-.64s\' can only be set, not re ad" }, { "ER_VAR_CANT_BE_READ", 1233, "Variable \'%-.64s\' can only be set, not re ad" },
{ "ER_CANT_USE_OPTION_HERE", 1234, "Incorrect usage/placement of \'%s\'" }, { "ER_CANT_USE_OPTION_HERE", 1234, "Incorrect usage/placement of \'%s\'" },
{ "ER_NOT_SUPPORTED_YET", 1235, "This version of MySQL doesn\'t yet support \'%s\'" }, { "ER_NOT_SUPPORTED_YET", 1235, "This version of MySQL doesn\'t yet support \'%s\'" },
{ "ER_MASTER_FATAL_ERROR_READING_BINLOG", 1236, "Got fatal error %d from ma ster when reading data from binary log: \'%-.128s\'" }, { "ER_MASTER_FATAL_ERROR_READING_BINLOG", 1236, "Got fatal error %d: \'%-.1 28s\' from master when reading data from binary log" },
{ "ER_SLAVE_IGNORED_TABLE", 1237, "Slave SQL thread ignored the query becau se of replicate-*-table rules" }, { "ER_SLAVE_IGNORED_TABLE", 1237, "Slave SQL thread ignored the query becau se of replicate-*-table rules" },
{ "ER_INCORRECT_GLOBAL_LOCAL_VAR", 1238, "Variable \'%-.192s\' is a %s vari able" }, { "ER_INCORRECT_GLOBAL_LOCAL_VAR", 1238, "Variable \'%-.192s\' is a %s vari able" },
{ "ER_WRONG_FK_DEF", 1239, "Incorrect foreign key definition for \'%-.192s\ ': %s" }, { "ER_WRONG_FK_DEF", 1239, "Incorrect foreign key definition for \'%-.192s\ ': %s" },
{ "ER_KEY_REF_DO_NOT_MATCH_TABLE_REF", 1240, "Key reference and table refer ence don\'t match" }, { "ER_KEY_REF_DO_NOT_MATCH_TABLE_REF", 1240, "Key reference and table refer ence don\'t match" },
{ "ER_OPERAND_COLUMNS", 1241, "Operand should contain %d column(s)" }, { "ER_OPERAND_COLUMNS", 1241, "Operand should contain %d column(s)" },
{ "ER_SUBQUERY_NO_1_ROW", 1242, "Subquery returns more than 1 row" }, { "ER_SUBQUERY_NO_1_ROW", 1242, "Subquery returns more than 1 row" },
{ "ER_UNKNOWN_STMT_HANDLER", 1243, "Unknown prepared statement handler (%.* s) given to %s" }, { "ER_UNKNOWN_STMT_HANDLER", 1243, "Unknown prepared statement handler (%.* s) given to %s" },
{ "ER_CORRUPT_HELP_DB", 1244, "Help database is corrupt or does not exist" }, { "ER_CORRUPT_HELP_DB", 1244, "Help database is corrupt or does not exist" },
{ "ER_CYCLIC_REFERENCE", 1245, "Cyclic reference on subqueries" }, { "ER_CYCLIC_REFERENCE", 1245, "Cyclic reference on subqueries" },
{ "ER_AUTO_CONVERT", 1246, "Converting column \'%s\' from %s to %s" }, { "ER_AUTO_CONVERT", 1246, "Converting column \'%s\' from %s to %s" },
skipping to change at line 290 skipping to change at line 290
{ "ER_BAD_SLAVE_UNTIL_COND", 1277, "Incorrect parameter or combination of p arameters for START SLAVE UNTIL" }, { "ER_BAD_SLAVE_UNTIL_COND", 1277, "Incorrect parameter or combination of p arameters for START SLAVE UNTIL" },
{ "ER_MISSING_SKIP_SLAVE", 1278, "It is recommended to use --skip-slave-sta rt when doing step-by-step replication with START SLAVE UNTIL; otherwise, y ou will get problems if you get an unexpected slave\'s mysqld restart" }, { "ER_MISSING_SKIP_SLAVE", 1278, "It is recommended to use --skip-slave-sta rt when doing step-by-step replication with START SLAVE UNTIL; otherwise, y ou will get problems if you get an unexpected slave\'s mysqld restart" },
{ "ER_UNTIL_COND_IGNORED", 1279, "SQL thread is not to be started so UNTIL options are ignored" }, { "ER_UNTIL_COND_IGNORED", 1279, "SQL thread is not to be started so UNTIL options are ignored" },
{ "ER_WRONG_NAME_FOR_INDEX", 1280, "Incorrect index name \'%-.100s\'" }, { "ER_WRONG_NAME_FOR_INDEX", 1280, "Incorrect index name \'%-.100s\'" },
{ "ER_WRONG_NAME_FOR_CATALOG", 1281, "Incorrect catalog name \'%-.100s\'" } , { "ER_WRONG_NAME_FOR_CATALOG", 1281, "Incorrect catalog name \'%-.100s\'" } ,
{ "ER_WARN_QC_RESIZE", 1282, "Query cache failed to set size %lu; new query cache size is %lu" }, { "ER_WARN_QC_RESIZE", 1282, "Query cache failed to set size %lu; new query cache size is %lu" },
{ "ER_BAD_FT_COLUMN", 1283, "Column \'%-.192s\' cannot be part of FULLTEXT index" }, { "ER_BAD_FT_COLUMN", 1283, "Column \'%-.192s\' cannot be part of FULLTEXT index" },
{ "ER_UNKNOWN_KEY_CACHE", 1284, "Unknown key cache \'%-.100s\'" }, { "ER_UNKNOWN_KEY_CACHE", 1284, "Unknown key cache \'%-.100s\'" },
{ "ER_WARN_HOSTNAME_WONT_WORK", 1285, "MySQL is started in --skip-name-reso lve mode; you must restart it without this switch for this grant to work" } , { "ER_WARN_HOSTNAME_WONT_WORK", 1285, "MySQL is started in --skip-name-reso lve mode; you must restart it without this switch for this grant to work" } ,
{ "ER_UNKNOWN_STORAGE_ENGINE", 1286, "Unknown storage engine \'%s\'" }, { "ER_UNKNOWN_STORAGE_ENGINE", 1286, "Unknown storage engine \'%s\'" },
{ "ER_WARN_DEPRECATED_SYNTAX", 1287, "\'%s\' is deprecated and will be remo ved in a future release. Please use %s instead" }, { "ER_WARN_DEPRECATED_SYNTAX", 1287, "\'%s\' is deprecated; use \'%s\' inst ead" },
{ "ER_NON_UPDATABLE_TABLE", 1288, "The target table %-.100s of the %s is no t updatable" }, { "ER_NON_UPDATABLE_TABLE", 1288, "The target table %-.100s of the %s is no t updatable" },
{ "ER_FEATURE_DISABLED", 1289, "The \'%s\' feature is disabled; you need My SQL built with \'%s\' to have it working" }, { "ER_FEATURE_DISABLED", 1289, "The \'%s\' feature is disabled; you need My SQL built with \'%s\' to have it working" },
{ "ER_OPTION_PREVENTS_STATEMENT", 1290, "The MySQL server is running with t he %s option so it cannot execute this statement" }, { "ER_OPTION_PREVENTS_STATEMENT", 1290, "The MySQL server is running with t he %s option so it cannot execute this statement" },
{ "ER_DUPLICATED_VALUE_IN_TYPE", 1291, "Column \'%-.100s\' has duplicated v alue \'%-.64s\' in %s" }, { "ER_DUPLICATED_VALUE_IN_TYPE", 1291, "Column \'%-.100s\' has duplicated v alue \'%-.64s\' in %s" },
{ "ER_TRUNCATED_WRONG_VALUE", 1292, "Truncated incorrect %-.32s value: \'%- .128s\'" }, { "ER_TRUNCATED_WRONG_VALUE", 1292, "Truncated incorrect %-.32s value: \'%- .128s\'" },
{ "ER_TOO_MUCH_AUTO_TIMESTAMP_COLS", 1293, "Incorrect table definition; the re can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause" }, { "ER_TOO_MUCH_AUTO_TIMESTAMP_COLS", 1293, "Incorrect table definition; the re can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause" },
{ "ER_INVALID_ON_UPDATE", 1294, "Invalid ON UPDATE clause for \'%-.192s\' c olumn" }, { "ER_INVALID_ON_UPDATE", 1294, "Invalid ON UPDATE clause for \'%-.192s\' c olumn" },
{ "ER_UNSUPPORTED_PS", 1295, "This command is not supported in the prepared statement protocol yet" }, { "ER_UNSUPPORTED_PS", 1295, "This command is not supported in the prepared statement protocol yet" },
{ "ER_GET_ERRMSG", 1296, "Got error %d \'%-.100s\' from %s" }, { "ER_GET_ERRMSG", 1296, "Got error %d \'%-.100s\' from %s" },
{ "ER_GET_TEMPORARY_ERRMSG", 1297, "Got temporary error %d \'%-.100s\' from %s" }, { "ER_GET_TEMPORARY_ERRMSG", 1297, "Got temporary error %d \'%-.100s\' from %s" },
skipping to change at line 318 skipping to change at line 318
{ "ER_SP_DOES_NOT_EXIST", 1305, "%s %s does not exist" }, { "ER_SP_DOES_NOT_EXIST", 1305, "%s %s does not exist" },
{ "ER_SP_DROP_FAILED", 1306, "Failed to DROP %s %s" }, { "ER_SP_DROP_FAILED", 1306, "Failed to DROP %s %s" },
{ "ER_SP_STORE_FAILED", 1307, "Failed to CREATE %s %s" }, { "ER_SP_STORE_FAILED", 1307, "Failed to CREATE %s %s" },
{ "ER_SP_LILABEL_MISMATCH", 1308, "%s with no matching label: %s" }, { "ER_SP_LILABEL_MISMATCH", 1308, "%s with no matching label: %s" },
{ "ER_SP_LABEL_REDEFINE", 1309, "Redefining label %s" }, { "ER_SP_LABEL_REDEFINE", 1309, "Redefining label %s" },
{ "ER_SP_LABEL_MISMATCH", 1310, "End-label %s without match" }, { "ER_SP_LABEL_MISMATCH", 1310, "End-label %s without match" },
{ "ER_SP_UNINIT_VAR", 1311, "Referring to uninitialized variable %s" }, { "ER_SP_UNINIT_VAR", 1311, "Referring to uninitialized variable %s" },
{ "ER_SP_BADSELECT", 1312, "PROCEDURE %s can\'t return a result set in the given context" }, { "ER_SP_BADSELECT", 1312, "PROCEDURE %s can\'t return a result set in the given context" },
{ "ER_SP_BADRETURN", 1313, "RETURN is only allowed in a FUNCTION" }, { "ER_SP_BADRETURN", 1313, "RETURN is only allowed in a FUNCTION" },
{ "ER_SP_BADSTATEMENT", 1314, "%s is not allowed in stored procedures" }, { "ER_SP_BADSTATEMENT", 1314, "%s is not allowed in stored procedures" },
{ "ER_UPDATE_LOG_DEPRECATED_IGNORED", 1315, "The update log is deprecated a { "ER_UPDATE_LOG_DEPRECATED_IGNORED", 1315, "The update log is deprecated a
nd replaced by the binary log; SET SQL_LOG_UPDATE has been ignored. This op nd replaced by the binary log; SET SQL_LOG_UPDATE has been ignored" },
tion will be removed in MySQL 5.6." }, { "ER_UPDATE_LOG_DEPRECATED_TRANSLATED", 1316, "The update log is deprecate
{ "ER_UPDATE_LOG_DEPRECATED_TRANSLATED", 1316, "The update log is deprecate d and replaced by the binary log; SET SQL_LOG_UPDATE has been translated to
d and replaced by the binary log; SET SQL_LOG_UPDATE has been translated to SET SQL_LOG_BIN" },
SET SQL_LOG_BIN. This option will be removed in MySQL 5.6." },
{ "ER_QUERY_INTERRUPTED", 1317, "Query execution was interrupted" }, { "ER_QUERY_INTERRUPTED", 1317, "Query execution was interrupted" },
{ "ER_SP_WRONG_NO_OF_ARGS", 1318, "Incorrect number of arguments for %s %s; expected %u, got %u" }, { "ER_SP_WRONG_NO_OF_ARGS", 1318, "Incorrect number of arguments for %s %s; expected %u, got %u" },
{ "ER_SP_COND_MISMATCH", 1319, "Undefined CONDITION: %s" }, { "ER_SP_COND_MISMATCH", 1319, "Undefined CONDITION: %s" },
{ "ER_SP_NORETURN", 1320, "No RETURN found in FUNCTION %s" }, { "ER_SP_NORETURN", 1320, "No RETURN found in FUNCTION %s" },
{ "ER_SP_NORETURNEND", 1321, "FUNCTION %s ended without RETURN" }, { "ER_SP_NORETURNEND", 1321, "FUNCTION %s ended without RETURN" },
{ "ER_SP_BAD_CURSOR_QUERY", 1322, "Cursor statement must be a SELECT" }, { "ER_SP_BAD_CURSOR_QUERY", 1322, "Cursor statement must be a SELECT" },
{ "ER_SP_BAD_CURSOR_SELECT", 1323, "Cursor SELECT must not have INTO" }, { "ER_SP_BAD_CURSOR_SELECT", 1323, "Cursor SELECT must not have INTO" },
{ "ER_SP_CURSOR_MISMATCH", 1324, "Undefined CURSOR: %s" }, { "ER_SP_CURSOR_MISMATCH", 1324, "Undefined CURSOR: %s" },
{ "ER_SP_CURSOR_ALREADY_OPEN", 1325, "Cursor is already open" }, { "ER_SP_CURSOR_ALREADY_OPEN", 1325, "Cursor is already open" },
{ "ER_SP_CURSOR_NOT_OPEN", 1326, "Cursor is not open" }, { "ER_SP_CURSOR_NOT_OPEN", 1326, "Cursor is not open" },
skipping to change at line 439 skipping to change at line 439
{ "ER_TOO_BIG_PRECISION", 1426, "Too big precision %d specified for column \'%-.192s\'. Maximum is %lu." }, { "ER_TOO_BIG_PRECISION", 1426, "Too big precision %d specified for column \'%-.192s\'. Maximum is %lu." },
{ "ER_M_BIGGER_THAN_D", 1427, "For float(M,D), double(M,D) or decimal(M,D), M must be >= D (column \'%-.192s\')." }, { "ER_M_BIGGER_THAN_D", 1427, "For float(M,D), double(M,D) or decimal(M,D), M must be >= D (column \'%-.192s\')." },
{ "ER_WRONG_LOCK_OF_SYSTEM_TABLE", 1428, "You can\'t combine write-locking of system tables with other tables or lock types" }, { "ER_WRONG_LOCK_OF_SYSTEM_TABLE", 1428, "You can\'t combine write-locking of system tables with other tables or lock types" },
{ "ER_CONNECT_TO_FOREIGN_DATA_SOURCE", 1429, "Unable to connect to foreign data source: %.64s" }, { "ER_CONNECT_TO_FOREIGN_DATA_SOURCE", 1429, "Unable to connect to foreign data source: %.64s" },
{ "ER_QUERY_ON_FOREIGN_DATA_SOURCE", 1430, "There was a problem processing the query on the foreign data source. Data source error: %-.64s" }, { "ER_QUERY_ON_FOREIGN_DATA_SOURCE", 1430, "There was a problem processing the query on the foreign data source. Data source error: %-.64s" },
{ "ER_FOREIGN_DATA_SOURCE_DOESNT_EXIST", 1431, "The foreign data source you are trying to reference does not exist. Data source error: %-.64s" }, { "ER_FOREIGN_DATA_SOURCE_DOESNT_EXIST", 1431, "The foreign data source you are trying to reference does not exist. Data source error: %-.64s" },
{ "ER_FOREIGN_DATA_STRING_INVALID_CANT_CREATE", 1432, "Can\'t create federa ted table. The data source connection string \'%-.64s\' is not in the corre ct format" }, { "ER_FOREIGN_DATA_STRING_INVALID_CANT_CREATE", 1432, "Can\'t create federa ted table. The data source connection string \'%-.64s\' is not in the corre ct format" },
{ "ER_FOREIGN_DATA_STRING_INVALID", 1433, "The data source connection strin g \'%-.64s\' is not in the correct format" }, { "ER_FOREIGN_DATA_STRING_INVALID", 1433, "The data source connection strin g \'%-.64s\' is not in the correct format" },
{ "ER_CANT_CREATE_FEDERATED_TABLE", 1434, "Can\'t create federated table. F oreign data src error: %-.64s" }, { "ER_CANT_CREATE_FEDERATED_TABLE", 1434, "Can\'t create federated table. F oreign data src error: %-.64s" },
{ "ER_TRG_IN_WRONG_SCHEMA", 1435, "Trigger in wrong schema" }, { "ER_TRG_IN_WRONG_SCHEMA", 1435, "Trigger in wrong schema" },
{ "ER_STACK_OVERRUN_NEED_MORE", 1436, "Thread stack overrun: %ld bytes use d of a %ld byte stack, and %ld bytes needed. Use \'mysqld --thread_stack=# \' to specify a bigger stack." }, { "ER_STACK_OVERRUN_NEED_MORE", 1436, "Thread stack overrun: %ld bytes use d of a %ld byte stack, and %ld bytes needed. Use \'mysqld -O thread_stack= #\' to specify a bigger stack." },
{ "ER_TOO_LONG_BODY", 1437, "Routine body for \'%-.100s\' is too long" }, { "ER_TOO_LONG_BODY", 1437, "Routine body for \'%-.100s\' is too long" },
{ "ER_WARN_CANT_DROP_DEFAULT_KEYCACHE", 1438, "Cannot drop default keycache " }, { "ER_WARN_CANT_DROP_DEFAULT_KEYCACHE", 1438, "Cannot drop default keycache " },
{ "ER_TOO_BIG_DISPLAYWIDTH", 1439, "Display width out of range for column \ '%-.192s\' (max = %lu)" }, { "ER_TOO_BIG_DISPLAYWIDTH", 1439, "Display width out of range for column \ '%-.192s\' (max = %lu)" },
{ "ER_XAER_DUPID", 1440, "XAER_DUPID: The XID already exists" }, { "ER_XAER_DUPID", 1440, "XAER_DUPID: The XID already exists" },
{ "ER_DATETIME_FUNCTION_OVERFLOW", 1441, "Datetime function: %-.32s field o verflow" }, { "ER_DATETIME_FUNCTION_OVERFLOW", 1441, "Datetime function: %-.32s field o verflow" },
{ "ER_CANT_UPDATE_USED_TABLE_IN_SF_OR_TRG", 1442, "Can\'t update table \'%- .192s\' in stored function/trigger because it is already used by statement which invoked this stored function/trigger." }, { "ER_CANT_UPDATE_USED_TABLE_IN_SF_OR_TRG", 1442, "Can\'t update table \'%- .192s\' in stored function/trigger because it is already used by statement which invoked this stored function/trigger." },
{ "ER_VIEW_PREVENT_UPDATE", 1443, "The definition of table \'%-.192s\' prev ents operation %.192s on table \'%-.192s\'." }, { "ER_VIEW_PREVENT_UPDATE", 1443, "The definition of table \'%-.192s\' prev ents operation %.192s on table \'%-.192s\'." },
{ "ER_PS_NO_RECURSION", 1444, "The prepared statement contains a stored rou tine call that refers to that same statement. It\'s not allowed to execute a prepared statement in such a recursive manner" }, { "ER_PS_NO_RECURSION", 1444, "The prepared statement contains a stored rou tine call that refers to that same statement. It\'s not allowed to execute a prepared statement in such a recursive manner" },
{ "ER_SP_CANT_SET_AUTOCOMMIT", 1445, "Not allowed to set autocommit from a stored function or trigger" }, { "ER_SP_CANT_SET_AUTOCOMMIT", 1445, "Not allowed to set autocommit from a stored function or trigger" },
{ "ER_MALFORMED_DEFINER", 1446, "Definer is not fully qualified" }, { "ER_MALFORMED_DEFINER", 1446, "Definer is not fully qualified" },
skipping to change at line 462 skipping to change at line 462
{ "ER_NO_SUCH_USER", 1449, "The user specified as a definer (\'%-.64s\'@\'% -.64s\') does not exist" }, { "ER_NO_SUCH_USER", 1449, "The user specified as a definer (\'%-.64s\'@\'% -.64s\') does not exist" },
{ "ER_FORBID_SCHEMA_CHANGE", 1450, "Changing schema from \'%-.192s\' to \'% -.192s\' is not allowed." }, { "ER_FORBID_SCHEMA_CHANGE", 1450, "Changing schema from \'%-.192s\' to \'% -.192s\' is not allowed." },
{ "ER_ROW_IS_REFERENCED_2", 1451, "Cannot delete or update a parent row: a foreign key constraint fails (%.192s)" }, { "ER_ROW_IS_REFERENCED_2", 1451, "Cannot delete or update a parent row: a foreign key constraint fails (%.192s)" },
{ "ER_NO_REFERENCED_ROW_2", 1452, "Cannot add or update a child row: a fore ign key constraint fails (%.192s)" }, { "ER_NO_REFERENCED_ROW_2", 1452, "Cannot add or update a child row: a fore ign key constraint fails (%.192s)" },
{ "ER_SP_BAD_VAR_SHADOW", 1453, "Variable \'%-.64s\' must be quoted with `. ..`, or renamed" }, { "ER_SP_BAD_VAR_SHADOW", 1453, "Variable \'%-.64s\' must be quoted with `. ..`, or renamed" },
{ "ER_TRG_NO_DEFINER", 1454, "No definer attribute for trigger \'%-.192s\'. \'%-.192s\'. The trigger will be activated under the authorization of the i nvoker, which may have insufficient privileges. Please recreate the trigger ." }, { "ER_TRG_NO_DEFINER", 1454, "No definer attribute for trigger \'%-.192s\'. \'%-.192s\'. The trigger will be activated under the authorization of the i nvoker, which may have insufficient privileges. Please recreate the trigger ." },
{ "ER_OLD_FILE_FORMAT", 1455, "\'%-.192s\' has an old format, you should re -create the \'%s\' object(s)" }, { "ER_OLD_FILE_FORMAT", 1455, "\'%-.192s\' has an old format, you should re -create the \'%s\' object(s)" },
{ "ER_SP_RECURSION_LIMIT", 1456, "Recursive limit %d (as set by the max_sp_ recursion_depth variable) was exceeded for routine %.192s" }, { "ER_SP_RECURSION_LIMIT", 1456, "Recursive limit %d (as set by the max_sp_ recursion_depth variable) was exceeded for routine %.192s" },
{ "ER_SP_PROC_TABLE_CORRUPT", 1457, "Failed to load routine %-.192s. The ta ble mysql.proc is missing, corrupt, or contains bad data (internal code %d) " }, { "ER_SP_PROC_TABLE_CORRUPT", 1457, "Failed to load routine %-.192s. The ta ble mysql.proc is missing, corrupt, or contains bad data (internal code %d) " },
{ "ER_SP_WRONG_NAME", 1458, "Incorrect routine name \'%-.192s\'" }, { "ER_SP_WRONG_NAME", 1458, "Incorrect routine name \'%-.192s\'" },
{ "ER_TABLE_NEEDS_UPGRADE", 1459, "Table upgrade required. Please do \"REPA IR TABLE `%-.32s`\" or dump/reload to fix it!" }, { "ER_TABLE_NEEDS_UPGRADE", 1459, "Table upgrade required. Please do \"REPA IR TABLE `%-.32s`\" to fix it!" },
{ "ER_SP_NO_AGGREGATE", 1460, "AGGREGATE is not supported for stored functi ons" }, { "ER_SP_NO_AGGREGATE", 1460, "AGGREGATE is not supported for stored functi ons" },
{ "ER_MAX_PREPARED_STMT_COUNT_REACHED", 1461, "Can\'t create more than max_ prepared_stmt_count statements (current value: %lu)" }, { "ER_MAX_PREPARED_STMT_COUNT_REACHED", 1461, "Can\'t create more than max_ prepared_stmt_count statements (current value: %lu)" },
{ "ER_VIEW_RECURSIVE", 1462, "`%-.192s`.`%-.192s` contains view recursion" }, { "ER_VIEW_RECURSIVE", 1462, "`%-.192s`.`%-.192s` contains view recursion" },
{ "ER_NON_GROUPING_FIELD_USED", 1463, "non-grouping field \'%-.192s\' is us ed in %-.64s clause" }, { "ER_NON_GROUPING_FIELD_USED", 1463, "non-grouping field \'%-.192s\' is us ed in %-.64s clause" },
{ "ER_TABLE_CANT_HANDLE_SPKEYS", 1464, "The used table type doesn\'t suppor t SPATIAL indexes" }, { "ER_TABLE_CANT_HANDLE_SPKEYS", 1464, "The used table type doesn\'t suppor t SPATIAL indexes" },
{ "ER_NO_TRIGGERS_ON_SYSTEM_SCHEMA", 1465, "Triggers can not be created on system tables" }, { "ER_NO_TRIGGERS_ON_SYSTEM_SCHEMA", 1465, "Triggers can not be created on system tables" },
{ "ER_REMOVED_SPACES", 1466, "Leading spaces are removed from name \'%s\'" }, { "ER_REMOVED_SPACES", 1466, "Leading spaces are removed from name \'%s\'" },
{ "ER_AUTOINC_READ_FAILED", 1467, "Failed to read auto-increment value from storage engine" }, { "ER_AUTOINC_READ_FAILED", 1467, "Failed to read auto-increment value from storage engine" },
{ "ER_USERNAME", 1468, "user name" }, { "ER_USERNAME", 1468, "user name" },
{ "ER_HOSTNAME", 1469, "host name" }, { "ER_HOSTNAME", 1469, "host name" },
skipping to change at line 489 skipping to change at line 489
{ "ER_FOREIGN_SERVER_EXISTS", 1476, "The foreign server, %s, you are trying to create already exists." }, { "ER_FOREIGN_SERVER_EXISTS", 1476, "The foreign server, %s, you are trying to create already exists." },
{ "ER_FOREIGN_SERVER_DOESNT_EXIST", 1477, "The foreign server name you are trying to reference does not exist. Data source error: %-.64s" }, { "ER_FOREIGN_SERVER_DOESNT_EXIST", 1477, "The foreign server name you are trying to reference does not exist. Data source error: %-.64s" },
{ "ER_ILLEGAL_HA_CREATE_OPTION", 1478, "Table storage engine \'%-.64s\' doe s not support the create option \'%.64s\'" }, { "ER_ILLEGAL_HA_CREATE_OPTION", 1478, "Table storage engine \'%-.64s\' doe s not support the create option \'%.64s\'" },
{ "ER_PARTITION_REQUIRES_VALUES_ERROR", 1479, "Syntax error: %-.64s PARTITI ONING requires definition of VALUES %-.64s for each partition" }, { "ER_PARTITION_REQUIRES_VALUES_ERROR", 1479, "Syntax error: %-.64s PARTITI ONING requires definition of VALUES %-.64s for each partition" },
{ "ER_PARTITION_WRONG_VALUES_ERROR", 1480, "Only %-.64s PARTITIONING can us e VALUES %-.64s in partition definition" }, { "ER_PARTITION_WRONG_VALUES_ERROR", 1480, "Only %-.64s PARTITIONING can us e VALUES %-.64s in partition definition" },
{ "ER_PARTITION_MAXVALUE_ERROR", 1481, "MAXVALUE can only be used in last p artition definition" }, { "ER_PARTITION_MAXVALUE_ERROR", 1481, "MAXVALUE can only be used in last p artition definition" },
{ "ER_PARTITION_SUBPARTITION_ERROR", 1482, "Subpartitions can only be hash partitions and by key" }, { "ER_PARTITION_SUBPARTITION_ERROR", 1482, "Subpartitions can only be hash partitions and by key" },
{ "ER_PARTITION_SUBPART_MIX_ERROR", 1483, "Must define subpartitions on all partitions if on one partition" }, { "ER_PARTITION_SUBPART_MIX_ERROR", 1483, "Must define subpartitions on all partitions if on one partition" },
{ "ER_PARTITION_WRONG_NO_PART_ERROR", 1484, "Wrong number of partitions def ined, mismatch with previous setting" }, { "ER_PARTITION_WRONG_NO_PART_ERROR", 1484, "Wrong number of partitions def ined, mismatch with previous setting" },
{ "ER_PARTITION_WRONG_NO_SUBPART_ERROR", 1485, "Wrong number of subpartitio ns defined, mismatch with previous setting" }, { "ER_PARTITION_WRONG_NO_SUBPART_ERROR", 1485, "Wrong number of subpartitio ns defined, mismatch with previous setting" },
{ "ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR", 1486, "Constant, random or timez one-dependent expressions in (sub)partitioning function are not allowed" }, { "ER_CONST_EXPR_IN_PARTITION_FUNC_ERROR", 1486, "Constant/Random expressio n in (sub)partitioning function is not allowed" },
{ "ER_NO_CONST_EXPR_IN_RANGE_OR_LIST_ERROR", 1487, "Expression in RANGE/LIS T VALUES must be constant" }, { "ER_NO_CONST_EXPR_IN_RANGE_OR_LIST_ERROR", 1487, "Expression in RANGE/LIS T VALUES must be constant" },
{ "ER_FIELD_NOT_FOUND_PART_ERROR", 1488, "Field in list of fields for parti tion function not found in table" }, { "ER_FIELD_NOT_FOUND_PART_ERROR", 1488, "Field in list of fields for parti tion function not found in table" },
{ "ER_LIST_OF_FIELDS_ONLY_IN_HASH_ERROR", 1489, "List of fields is only all owed in KEY partitions" }, { "ER_LIST_OF_FIELDS_ONLY_IN_HASH_ERROR", 1489, "List of fields is only all owed in KEY partitions" },
{ "ER_INCONSISTENT_PARTITION_INFO_ERROR", 1490, "The partition info in the frm file is not consistent with what can be written into the frm file" }, { "ER_INCONSISTENT_PARTITION_INFO_ERROR", 1490, "The partition info in the frm file is not consistent with what can be written into the frm file" },
{ "ER_PARTITION_FUNC_NOT_ALLOWED_ERROR", 1491, "The %-.192s function return s the wrong type" }, { "ER_PARTITION_FUNC_NOT_ALLOWED_ERROR", 1491, "The %-.192s function return s the wrong type" },
{ "ER_PARTITIONS_MUST_BE_DEFINED_ERROR", 1492, "For %-.64s partitions each partition must be defined" }, { "ER_PARTITIONS_MUST_BE_DEFINED_ERROR", 1492, "For %-.64s partitions each partition must be defined" },
{ "ER_RANGE_NOT_INCREASING_ERROR", 1493, "VALUES LESS THAN value must be st rictly increasing for each partition" }, { "ER_RANGE_NOT_INCREASING_ERROR", 1493, "VALUES LESS THAN value must be st rictly increasing for each partition" },
{ "ER_INCONSISTENT_TYPE_OF_FUNCTIONS_ERROR", 1494, "VALUES value must be of same type as partition function" }, { "ER_INCONSISTENT_TYPE_OF_FUNCTIONS_ERROR", 1494, "VALUES value must be of same type as partition function" },
{ "ER_MULTIPLE_DEF_CONST_IN_LIST_PART_ERROR", 1495, "Multiple definition of same constant in list partitioning" }, { "ER_MULTIPLE_DEF_CONST_IN_LIST_PART_ERROR", 1495, "Multiple definition of same constant in list partitioning" },
{ "ER_PARTITION_ENTRY_ERROR", 1496, "Partitioning can not be used stand-alo ne in query" }, { "ER_PARTITION_ENTRY_ERROR", 1496, "Partitioning can not be used stand-alo ne in query" },
skipping to change at line 550 skipping to change at line 550
{ "ER_EVENT_ALREADY_EXISTS", 1537, "Event \'%-.192s\' already exists" }, { "ER_EVENT_ALREADY_EXISTS", 1537, "Event \'%-.192s\' already exists" },
{ "ER_EVENT_STORE_FAILED", 1538, "Failed to store event %s. Error code %d f rom storage engine." }, { "ER_EVENT_STORE_FAILED", 1538, "Failed to store event %s. Error code %d f rom storage engine." },
{ "ER_EVENT_DOES_NOT_EXIST", 1539, "Unknown event \'%-.192s\'" }, { "ER_EVENT_DOES_NOT_EXIST", 1539, "Unknown event \'%-.192s\'" },
{ "ER_EVENT_CANT_ALTER", 1540, "Failed to alter event \'%-.192s\'" }, { "ER_EVENT_CANT_ALTER", 1540, "Failed to alter event \'%-.192s\'" },
{ "ER_EVENT_DROP_FAILED", 1541, "Failed to drop %s" }, { "ER_EVENT_DROP_FAILED", 1541, "Failed to drop %s" },
{ "ER_EVENT_INTERVAL_NOT_POSITIVE_OR_TOO_BIG", 1542, "INTERVAL is either no t positive or too big" }, { "ER_EVENT_INTERVAL_NOT_POSITIVE_OR_TOO_BIG", 1542, "INTERVAL is either no t positive or too big" },
{ "ER_EVENT_ENDS_BEFORE_STARTS", 1543, "ENDS is either invalid or before ST ARTS" }, { "ER_EVENT_ENDS_BEFORE_STARTS", 1543, "ENDS is either invalid or before ST ARTS" },
{ "ER_EVENT_EXEC_TIME_IN_THE_PAST", 1544, "Event execution time is in the p ast. Event has been disabled" }, { "ER_EVENT_EXEC_TIME_IN_THE_PAST", 1544, "Event execution time is in the p ast. Event has been disabled" },
{ "ER_EVENT_OPEN_TABLE_FAILED", 1545, "Failed to open mysql.event" }, { "ER_EVENT_OPEN_TABLE_FAILED", 1545, "Failed to open mysql.event" },
{ "ER_EVENT_NEITHER_M_EXPR_NOR_M_AT", 1546, "No datetime expression provide d" }, { "ER_EVENT_NEITHER_M_EXPR_NOR_M_AT", 1546, "No datetime expression provide d" },
{ "ER_OBSOLETE_COL_COUNT_DOESNT_MATCH_CORRUPTED", 1547, "Column count of my { "ER_COL_COUNT_DOESNT_MATCH_CORRUPTED", 1547, "Column count of mysql.%s is
sql.%s is wrong. Expected %d, found %d. The table is probably corrupted" }, wrong. Expected %d, found %d. The table is probably corrupted" },
{ "ER_OBSOLETE_CANNOT_LOAD_FROM_TABLE", 1548, "Cannot load from mysql.%s. T { "ER_CANNOT_LOAD_FROM_TABLE", 1548, "Cannot load from mysql.%s. The table
he table is probably corrupted" }, is probably corrupted" },
{ "ER_EVENT_CANNOT_DELETE", 1549, "Failed to delete the event from mysql.ev ent" }, { "ER_EVENT_CANNOT_DELETE", 1549, "Failed to delete the event from mysql.ev ent" },
{ "ER_EVENT_COMPILE_ERROR", 1550, "Error during compilation of event\'s bod y" }, { "ER_EVENT_COMPILE_ERROR", 1550, "Error during compilation of event\'s bod y" },
{ "ER_EVENT_SAME_NAME", 1551, "Same old and new event name" }, { "ER_EVENT_SAME_NAME", 1551, "Same old and new event name" },
{ "ER_EVENT_DATA_TOO_LONG", 1552, "Data for column \'%s\' too long" }, { "ER_EVENT_DATA_TOO_LONG", 1552, "Data for column \'%s\' too long" },
{ "ER_DROP_INDEX_FK", 1553, "Cannot drop index \'%-.192s\': needed in a for eign key constraint" }, { "ER_DROP_INDEX_FK", 1553, "Cannot drop index \'%-.192s\': needed in a for eign key constraint" },
{ "ER_WARN_DEPRECATED_SYNTAX_WITH_VER", 1554, "The syntax \'%s\' is depreca ted and will be removed in MySQL %s. Please use %s instead" }, { "ER_WARN_DEPRECATED_SYNTAX_WITH_VER", 1554, "The syntax \'%s\' is depreca ted and will be removed in MySQL %s. Please use %s instead" },
{ "ER_CANT_WRITE_LOCK_LOG_TABLE", 1555, "You can\'t write-lock a log table. Only read access is possible" }, { "ER_CANT_WRITE_LOCK_LOG_TABLE", 1555, "You can\'t write-lock a log table. Only read access is possible" },
{ "ER_CANT_LOCK_LOG_TABLE", 1556, "You can\'t use locks with log tables." } , { "ER_CANT_LOCK_LOG_TABLE", 1556, "You can\'t use locks with log tables." } ,
{ "ER_FOREIGN_DUPLICATE_KEY", 1557, "Upholding foreign key constraints for table \'%.192s\', entry \'%-.192s\', key %d would lead to a duplicate entry " }, { "ER_FOREIGN_DUPLICATE_KEY", 1557, "Upholding foreign key constraints for table \'%.192s\', entry \'%-.192s\', key %d would lead to a duplicate entry " },
{ "ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE", 1558, "Column count of mysql.% s is wrong. Expected %d, found %d. Created with MySQL %d, now running %d. P lease use mysql_upgrade to fix this error." }, { "ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE", 1558, "Column count of mysql.% s is wrong. Expected %d, found %d. Created with MySQL %d, now running %d. P lease use mysql_upgrade to fix this error." },
skipping to change at line 595 skipping to change at line 595
{ "ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT", 1582, "Incorrect parameter count in the call to native function \'%-.192s\'" }, { "ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT", 1582, "Incorrect parameter count in the call to native function \'%-.192s\'" },
{ "ER_WRONG_PARAMETERS_TO_NATIVE_FCT", 1583, "Incorrect parameters in the c all to native function \'%-.192s\'" }, { "ER_WRONG_PARAMETERS_TO_NATIVE_FCT", 1583, "Incorrect parameters in the c all to native function \'%-.192s\'" },
{ "ER_WRONG_PARAMETERS_TO_STORED_FCT", 1584, "Incorrect parameters in the c all to stored function \'%-.192s\'" }, { "ER_WRONG_PARAMETERS_TO_STORED_FCT", 1584, "Incorrect parameters in the c all to stored function \'%-.192s\'" },
{ "ER_NATIVE_FCT_NAME_COLLISION", 1585, "This function \'%-.192s\' has the same name as a native function" }, { "ER_NATIVE_FCT_NAME_COLLISION", 1585, "This function \'%-.192s\' has the same name as a native function" },
{ "ER_DUP_ENTRY_WITH_KEY_NAME", 1586, "Duplicate entry \'%-.64s\' for key \ '%-.192s\'" }, { "ER_DUP_ENTRY_WITH_KEY_NAME", 1586, "Duplicate entry \'%-.64s\' for key \ '%-.192s\'" },
{ "ER_BINLOG_PURGE_EMFILE", 1587, "Too many files opened, please execute th e command again" }, { "ER_BINLOG_PURGE_EMFILE", 1587, "Too many files opened, please execute th e command again" },
{ "ER_EVENT_CANNOT_CREATE_IN_THE_PAST", 1588, "Event execution time is in t he past and ON COMPLETION NOT PRESERVE is set. The event was dropped immedi ately after creation." }, { "ER_EVENT_CANNOT_CREATE_IN_THE_PAST", 1588, "Event execution time is in t he past and ON COMPLETION NOT PRESERVE is set. The event was dropped immedi ately after creation." },
{ "ER_EVENT_CANNOT_ALTER_IN_THE_PAST", 1589, "Event execution time is in th e past and ON COMPLETION NOT PRESERVE is set. The event was dropped immedia tely after creation." }, { "ER_EVENT_CANNOT_ALTER_IN_THE_PAST", 1589, "Event execution time is in th e past and ON COMPLETION NOT PRESERVE is set. The event was dropped immedia tely after creation." },
{ "ER_SLAVE_INCIDENT", 1590, "The incident %s occured on the master. Messag e: %-.64s" }, { "ER_SLAVE_INCIDENT", 1590, "The incident %s occured on the master. Messag e: %-.64s" },
{ "ER_NO_PARTITION_FOR_GIVEN_VALUE_SILENT", 1591, "Table has no partition f or some existing values" }, { "ER_NO_PARTITION_FOR_GIVEN_VALUE_SILENT", 1591, "Table has no partition f or some existing values" },
{ "ER_BINLOG_UNSAFE_STATEMENT", 1592, "Unsafe statement written to the bina ry log using statement format since BINLOG_FORMAT = STATEMENT. %s" }, { "ER_BINLOG_UNSAFE_STATEMENT", 1592, "Statement is not safe to log in stat ement format." },
{ "ER_SLAVE_FATAL_ERROR", 1593, "Fatal error: %s" }, { "ER_SLAVE_FATAL_ERROR", 1593, "Fatal error: %s" },
{ "ER_SLAVE_RELAY_LOG_READ_FAILURE", 1594, "Relay log read failure: %s" }, { "ER_SLAVE_RELAY_LOG_READ_FAILURE", 1594, "Relay log read failure: %s" },
{ "ER_SLAVE_RELAY_LOG_WRITE_FAILURE", 1595, "Relay log write failure: %s" } , { "ER_SLAVE_RELAY_LOG_WRITE_FAILURE", 1595, "Relay log write failure: %s" } ,
{ "ER_SLAVE_CREATE_EVENT_FAILURE", 1596, "Failed to create %s" }, { "ER_SLAVE_CREATE_EVENT_FAILURE", 1596, "Failed to create %s" },
{ "ER_SLAVE_MASTER_COM_FAILURE", 1597, "Master command %s failed: %s" }, { "ER_SLAVE_MASTER_COM_FAILURE", 1597, "Master command %s failed: %s" },
{ "ER_BINLOG_LOGGING_IMPOSSIBLE", 1598, "Binary logging not possible. Messa ge: %s" }, { "ER_BINLOG_LOGGING_IMPOSSIBLE", 1598, "Binary logging not possible. Messa ge: %s" },
{ "ER_VIEW_NO_CREATION_CTX", 1599, "View `%-.64s`.`%-.64s` has no creation context" }, { "ER_VIEW_NO_CREATION_CTX", 1599, "View `%-.64s`.`%-.64s` has no creation context" },
{ "ER_VIEW_INVALID_CREATION_CTX", 1600, "Creation context of view `%-.64s`. `%-.64s\' is invalid" }, { "ER_VIEW_INVALID_CREATION_CTX", 1600, "Creation context of view `%-.64s`. `%-.64s\' is invalid" },
{ "ER_SR_INVALID_CREATION_CTX", 1601, "Creation context of stored routine ` %-.64s`.`%-.64s` is invalid" }, { "ER_SR_INVALID_CREATION_CTX", 1601, "Creation context of stored routine ` %-.64s`.`%-.64s` is invalid" },
{ "ER_TRG_CORRUPTED_FILE", 1602, "Corrupted TRG file for table `%-.64s`.`%- .64s`" }, { "ER_TRG_CORRUPTED_FILE", 1602, "Corrupted TRG file for table `%-.64s`.`%- .64s`" },
{ "ER_TRG_NO_CREATION_CTX", 1603, "Triggers for table `%-.64s`.`%-.64s` hav e no creation context" }, { "ER_TRG_NO_CREATION_CTX", 1603, "Triggers for table `%-.64s`.`%-.64s` hav e no creation context" },
{ "ER_TRG_INVALID_CREATION_CTX", 1604, "Trigger creation context of table ` %-.64s`.`%-.64s` is invalid" }, { "ER_TRG_INVALID_CREATION_CTX", 1604, "Trigger creation context of table ` %-.64s`.`%-.64s` is invalid" },
{ "ER_EVENT_INVALID_CREATION_CTX", 1605, "Creation context of event `%-.64s `.`%-.64s` is invalid" }, { "ER_EVENT_INVALID_CREATION_CTX", 1605, "Creation context of event `%-.64s `.`%-.64s` is invalid" },
{ "ER_TRG_CANT_OPEN_TABLE", 1606, "Cannot open table for trigger `%-.64s`.` %-.64s`" }, { "ER_TRG_CANT_OPEN_TABLE", 1606, "Cannot open table for trigger `%-.64s`.` %-.64s`" },
{ "ER_CANT_CREATE_SROUTINE", 1607, "Cannot create stored routine `%-.64s`. Check warnings" }, { "ER_CANT_CREATE_SROUTINE", 1607, "Cannot create stored routine `%-.64s`. Check warnings" },
{ "ER_NEVER_USED", 1608, "Ambiguous slave modes combination. %s" }, { "ER_SLAVE_AMBIGOUS_EXEC_MODE", 1608, "Ambiguous slave modes combination. %s" },
{ "ER_NO_FORMAT_DESCRIPTION_EVENT_BEFORE_BINLOG_STATEMENT", 1609, "The BINL OG statement of type `%s` was not preceded by a format description BINLOG s tatement." }, { "ER_NO_FORMAT_DESCRIPTION_EVENT_BEFORE_BINLOG_STATEMENT", 1609, "The BINL OG statement of type `%s` was not preceded by a format description BINLOG s tatement." },
{ "ER_SLAVE_CORRUPT_EVENT", 1610, "Corrupted replication event was detected " }, { "ER_SLAVE_CORRUPT_EVENT", 1610, "Corrupted replication event was detected " },
{ "ER_LOAD_DATA_INVALID_COLUMN", 1611, "Invalid column reference (%-.64s) i n LOAD DATA" }, { "ER_LOAD_DATA_INVALID_COLUMN", 1611, "Invalid column reference (%-.64s) i n LOAD DATA" },
{ "ER_LOG_PURGE_NO_FILE", 1612, "Being purged log %s was not found" }, { "ER_LOG_PURGE_NO_FILE", 1612, "Being purged log %s was not found" },
{ "ER_XA_RBTIMEOUT", 1613, "XA_RBTIMEOUT: Transaction branch was rolled bac k: took too long" }, { "ER_XA_RBTIMEOUT", 1613, "XA_RBTIMEOUT: Transaction branch was rolled bac k: took too long" },
{ "ER_XA_RBDEADLOCK", 1614, "XA_RBDEADLOCK: Transaction branch was rolled b ack: deadlock was detected" }, { "ER_XA_RBDEADLOCK", 1614, "XA_RBDEADLOCK: Transaction branch was rolled b ack: deadlock was detected" },
{ "ER_NEED_REPREPARE", 1615, "Prepared statement needs to be re-prepared" } , { "ER_NEED_REPREPARE", 1615, "Prepared statement needs to be re-prepared" } ,
{ "ER_DELAYED_NOT_SUPPORTED", 1616, "DELAYED option not supported for table \'%-.192s\'" }, { "ER_DELAYED_NOT_SUPPORTED", 1616, "DELAYED option not supported for table \'%-.192s\'" },
{ "WARN_NO_MASTER_INFO", 1617, "The master info structure does not exist" } , { "WARN_NO_MASTER_INFO", 1617, "The master info structure does not exist" } ,
{ "WARN_OPTION_IGNORED", 1618, "<%-.64s> option ignored" }, { "WARN_OPTION_IGNORED", 1618, "<%-.64s> option ignored" },
skipping to change at line 633 skipping to change at line 633
{ "WARN_PLUGIN_BUSY", 1620, "Plugin is busy and will be uninstalled on shut down" }, { "WARN_PLUGIN_BUSY", 1620, "Plugin is busy and will be uninstalled on shut down" },
{ "ER_VARIABLE_IS_READONLY", 1621, "%s variable \'%s\' is read-only. Use SE T %s to assign the value" }, { "ER_VARIABLE_IS_READONLY", 1621, "%s variable \'%s\' is read-only. Use SE T %s to assign the value" },
{ "ER_WARN_ENGINE_TRANSACTION_ROLLBACK", 1622, "Storage engine %s does not support rollback for this statement. Transaction rolled back and must be re started" }, { "ER_WARN_ENGINE_TRANSACTION_ROLLBACK", 1622, "Storage engine %s does not support rollback for this statement. Transaction rolled back and must be re started" },
{ "ER_SLAVE_HEARTBEAT_FAILURE", 1623, "Unexpected master\'s heartbeat data: %s" }, { "ER_SLAVE_HEARTBEAT_FAILURE", 1623, "Unexpected master\'s heartbeat data: %s" },
{ "ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE", 1624, "The requested value for t he heartbeat period %s %s" }, { "ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE", 1624, "The requested value for t he heartbeat period %s %s" },
{ "ER_NDB_REPLICATION_SCHEMA_ERROR", 1625, "Bad schema for mysql.ndb_replic ation table. Message: %-.64s" }, { "ER_NDB_REPLICATION_SCHEMA_ERROR", 1625, "Bad schema for mysql.ndb_replic ation table. Message: %-.64s" },
{ "ER_CONFLICT_FN_PARSE_ERROR", 1626, "Error in parsing conflict function. Message: %-.64s" }, { "ER_CONFLICT_FN_PARSE_ERROR", 1626, "Error in parsing conflict function. Message: %-.64s" },
{ "ER_EXCEPTIONS_WRITE_ERROR", 1627, "Write to exceptions table failed. Mes sage: %-.128s\"" }, { "ER_EXCEPTIONS_WRITE_ERROR", 1627, "Write to exceptions table failed. Mes sage: %-.128s\"" },
{ "ER_TOO_LONG_TABLE_COMMENT", 1628, "Comment for table \'%-.64s\' is too l ong (max = %lu)" }, { "ER_TOO_LONG_TABLE_COMMENT", 1628, "Comment for table \'%-.64s\' is too l ong (max = %lu)" },
{ "ER_TOO_LONG_FIELD_COMMENT", 1629, "Comment for field \'%-.64s\' is too l ong (max = %lu)" }, { "ER_TOO_LONG_FIELD_COMMENT", 1629, "Comment for field \'%-.64s\' is too l ong (max = %lu)" },
{ "ER_FUNC_INEXISTENT_NAME_COLLISION", 1630, "FUNCTION %s does not exist. C { "ER_WARN_AUTO_CONVERT_LOCK", 1630, "Converted to non-transactional lock o
heck the \'Function Name Parsing and Resolution\' section in the Reference n \'%-.64s\'" },
Manual" }, { "ER_NO_AUTO_CONVERT_LOCK_STRICT", 1631, "Cannot convert to non-transactio
{ "ER_DATABASE_NAME", 1631, "Database" }, nal lock in strict mode on \'%-.64s\'" },
{ "ER_TABLE_NAME", 1632, "Table" }, { "ER_NO_AUTO_CONVERT_LOCK_TRANSACTION", 1632, "Cannot convert to non-trans
{ "ER_PARTITION_NAME", 1633, "Partition" }, actional lock in an active transaction on \'%-.64s\'" },
{ "ER_SUBPARTITION_NAME", 1634, "Subpartition" }, { "ER_NO_STORAGE_ENGINE", 1633, "Can\'t access storage engine of table %-.6
{ "ER_TEMPORARY_NAME", 1635, "Temporary" }, 4s" },
{ "ER_RENAMED_NAME", 1636, "Renamed" }, { "ER_BACKUP_BACKUP_START", 1634, "Starting backup process" },
{ "ER_TOO_MANY_CONCURRENT_TRXS", 1637, "Too many active concurrent transact { "ER_BACKUP_BACKUP_DONE", 1635, "Backup completed" },
ions" }, { "ER_BACKUP_RESTORE_START", 1636, "Starting restore process" },
{ "WARN_NON_ASCII_SEPARATOR_NOT_IMPLEMENTED", 1638, "Non-ASCII separator ar { "ER_BACKUP_RESTORE_DONE", 1637, "Restore completed" },
guments are not fully supported" }, { "ER_BACKUP_NOTHING_TO_BACKUP", 1638, "Nothing to backup" },
{ "ER_DEBUG_SYNC_TIMEOUT", 1639, "debug sync point wait timed out" }, { "ER_BACKUP_CANNOT_INCLUDE_DB", 1639, "Database \'%-.64s\' cannot be inclu
{ "ER_DEBUG_SYNC_HIT_LIMIT", 1640, "debug sync point hit limit reached" }, ded in a backup" },
{ "ER_DUP_SIGNAL_SET", 1641, "Duplicate condition information item \'%s\'" { "ER_BACKUP_BACKUP", 1640, "Error during backup operation - see SHOW WARNI
}, NGS for more information" },
{ "ER_SIGNAL_WARN", 1642, "Unhandled user-defined warning condition" }, { "ER_BACKUP_RESTORE", 1641, "Error during restore operation - see SHOW WAR
{ "ER_SIGNAL_NOT_FOUND", 1643, "Unhandled user-defined not found condition" NINGS for more information" },
}, { "ER_BACKUP_RUNNING", 1642, "Can\'t execute this command because another B
{ "ER_SIGNAL_EXCEPTION", 1644, "Unhandled user-defined exception condition" ACKUP/RESTORE operation is in progress" },
}, { "ER_BACKUP_BACKUP_PREPARE", 1643, "Error when preparing for backup operat
{ "ER_RESIGNAL_WITHOUT_ACTIVE_HANDLER", 1645, "RESIGNAL when handler not ac ion" },
tive" }, { "ER_BACKUP_RESTORE_PREPARE", 1644, "Error when preparing for restore oper
{ "ER_SIGNAL_BAD_CONDITION_TYPE", 1646, "SIGNAL/RESIGNAL can only use a CON ation" },
DITION defined with SQLSTATE" }, { "ER_BACKUP_INVALID_LOC", 1645, "Invalid backup location \'%-.64s\'" },
{ "WARN_COND_ITEM_TRUNCATED", 1647, "Data truncated for condition item \'%s { "ER_BACKUP_READ_LOC", 1646, "Can\'t read backup location \'%-.64s\'" },
\'" }, { "ER_BACKUP_WRITE_LOC", 1647, "Can\'t write to backup location \'%-.64s\'"
{ "ER_COND_ITEM_TOO_LONG", 1648, "Data too long for condition item \'%s\'" },
}, { "ER_BACKUP_LIST_DBS", 1648, "Can\'t enumerate server databases" },
{ "ER_UNKNOWN_LOCALE", 1649, "Unknown locale: \'%-.64s\'" }, { "ER_BACKUP_LIST_TABLES", 1649, "Can\'t enumerate server tables" },
{ "ER_SLAVE_IGNORE_SERVER_IDS", 1650, "The requested server id %d clashes w { "ER_BACKUP_LIST_DB_TABLES", 1650, "Can\'t enumerate tables in database %-
ith the slave startup option --replicate-same-server-id" }, .64s" },
{ "ER_QUERY_CACHE_DISABLED", 1651, "Query cache is disabled; restart the se { "ER_BACKUP_SKIP_VIEW", 1651, "Skipping view %-.64s in database %-.64s" },
rver with query_cache_type=1 to enable it" }, { "ER_BACKUP_NO_ENGINE", 1652, "Skipping table %-.64s since it has no valid
{ "ER_SAME_NAME_PARTITION_FIELD", 1652, "Duplicate partition field name \'% storage engine" },
-.192s\'" }, { "ER_BACKUP_TABLE_OPEN", 1653, "Can\'t open table %-.64s" },
{ "ER_PARTITION_COLUMN_LIST_ERROR", 1653, "Inconsistency in usage of column { "ER_BACKUP_READ_HEADER", 1654, "Can\'t read backup archive preamble" },
lists for partitioning" }, { "ER_BACKUP_WRITE_HEADER", 1655, "Can\'t write backup archive preamble" },
{ "ER_WRONG_TYPE_COLUMN_VALUE_ERROR", 1654, "Partition column values of inc { "ER_BACKUP_NO_BACKUP_DRIVER", 1656, "Can\'t find backup driver for table
orrect type" }, %-.64s" },
{ "ER_TOO_MANY_PARTITION_FUNC_FIELDS_ERROR", 1655, "Too many fields in \'%- { "ER_BACKUP_NOT_ACCEPTED", 1657, "%-.64s backup driver was selected for ta
.192s\'" }, ble %-.64s but it rejects to handle this table" },
{ "ER_MAXVALUE_IN_VALUES_IN", 1656, "Cannot use MAXVALUE as value in VALUES { "ER_BACKUP_CREATE_BACKUP_DRIVER", 1658, "Can\'t create %-.64s backup driv
IN" }, er" },
{ "ER_TOO_MANY_VALUES_ERROR", 1657, "Cannot have more than one value for th { "ER_BACKUP_CREATE_RESTORE_DRIVER", 1659, "Can\'t create %-.64s restore dr
is type of %-.64s partitioning" }, iver" },
{ "ER_ROW_SINGLE_PARTITION_FIELD_ERROR", 1658, "Row expressions in VALUES I { "ER_BACKUP_TOO_MANY_IMAGES", 1660, "Backup image uses %d backup engines b
N only allowed for multi-field column partitioning" }, ut maximum %d are supported" },
{ "ER_FIELD_TYPE_NOT_ALLOWED_AS_PARTITION_FIELD", 1659, "Field \'%-.192s\' { "ER_BACKUP_WRITE_META", 1661, "Error when saving meta-data of %-.64s" },
is of a not allowed type for this type of partitioning" }, { "ER_BACKUP_READ_META", 1662, "Error when reading meta-data" },
{ "ER_PARTITION_FIELDS_TOO_LONG", 1660, "The total length of the partitioni { "ER_BACKUP_CREATE_META", 1663, "Failed to obtain meta-data for %-.64s" },
ng fields is too large" }, { "ER_BACKUP_GET_BUF", 1664, "Can\'t allocate buffer for image data transfe
{ "ER_BINLOG_ROW_ENGINE_AND_STMT_ENGINE", 1661, "Cannot execute statement: r" },
impossible to write to binary log since both row-incapable engines and stat { "ER_BACKUP_WRITE_DATA", 1665, "Error when writing data from %-.64s backup
ement-incapable engines are involved." }, driver (data block for table #%d)" },
{ "ER_BINLOG_ROW_MODE_AND_STMT_ENGINE", 1662, "Cannot execute statement: im { "ER_BACKUP_READ_DATA", 1666, "Error when reading data from backup stream"
possible to write to binary log since BINLOG_FORMAT = ROW and at least one },
table uses a storage engine limited to statement-based logging." }, { "ER_BACKUP_NEXT_CHUNK", 1667, "Can\'t go to the next chunk in backup stre
{ "ER_BINLOG_UNSAFE_AND_STMT_ENGINE", 1663, "Cannot execute statement: impo am" },
ssible to write to binary log since statement is unsafe, storage engine is { "ER_BACKUP_INIT_BACKUP_DRIVER", 1668, "Can\'t initialize %-.64s backup dr
limited to statement-based logging, and BINLOG_FORMAT = MIXED. %s" }, iver" },
{ "ER_BINLOG_ROW_INJECTION_AND_STMT_ENGINE", 1664, "Cannot execute statemen { "ER_BACKUP_INIT_RESTORE_DRIVER", 1669, "Can\'t initialize %-.64s restore
t: impossible to write to binary log since statement is in row format and a driver" },
t least one table uses a storage engine limited to statement-based logging. { "ER_BACKUP_STOP_BACKUP_DRIVER", 1670, "Can\'t shut down %-.64s backup dri
" }, ver" },
{ "ER_BINLOG_STMT_MODE_AND_ROW_ENGINE", 1665, "Cannot execute statement: im { "ER_BACKUP_STOP_RESTORE_DRIVERS", 1671, "Can\'t shut down %-.64s restore
possible to write to binary log since BINLOG_FORMAT = STATEMENT and at leas driver(s)" },
t one table uses a storage engine limited to row-based logging.%s" }, { "ER_BACKUP_PREPARE_DRIVER", 1672, "%-.64s backup driver can\'t prepare fo
{ "ER_BINLOG_ROW_INJECTION_AND_STMT_MODE", 1666, "Cannot execute statement: r synchronization" },
impossible to write to binary log since statement is in row format and BIN { "ER_BACKUP_CREATE_VP", 1673, "%-.64s backup driver can\'t create its vali
LOG_FORMAT = STATEMENT." }, dity point" },
{ "ER_BINLOG_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE", 1667, "Cannot execu { "ER_BACKUP_UNLOCK_DRIVER", 1674, "Can\'t unlock %-.64s backup driver afte
te statement: impossible to write to binary log since more than one engine r creating the validity point" },
is involved and at least one engine is self-logging." }, { "ER_BACKUP_CANCEL_BACKUP", 1675, "%-.64s backup driver can\'t cancel its
{ "ER_BINLOG_UNSAFE_LIMIT", 1668, "The statement is unsafe because it uses backup operation" },
a LIMIT clause. This is unsafe because the set of rows included cannot be p { "ER_BACKUP_CANCEL_RESTORE", 1676, "%-.64s restore driver can\'t cancel it
redicted." }, s restore operation" },
{ "ER_BINLOG_UNSAFE_INSERT_DELAYED", 1669, "The statement is unsafe because { "ER_BACKUP_GET_DATA", 1677, "Error when polling %-.64s backup driver for
it uses INSERT DELAYED. This is unsafe because the times when rows are ins its data" },
erted cannot be predicted." }, { "ER_BACKUP_SEND_DATA", 1678, "Error when sending data (for table #%d) to
{ "ER_BINLOG_UNSAFE_SYSTEM_TABLE", 1670, "The statement is unsafe because i %-.64s restore driver" },
t uses the general log, slow query log, or performance_schema table(s). Thi { "ER_BACKUP_SEND_DATA_RETRY", 1679, "After %d attempts %-.64s restore driv
s is unsafe because system tables may differ on slaves." }, er still can\'t accept next block of data" },
{ "ER_BINLOG_UNSAFE_AUTOINC_COLUMNS", 1671, "Statement is unsafe because it { "ER_BACKUP_OPEN_TABLES", 1680, "Open and lock tables failed in %-.64s" },
invokes a trigger or a stored function that inserts into an AUTO_INCREMENT { "ER_BACKUP_THREAD_INIT", 1681, "Backup driver\'s table locking thread can
column. Inserted values cannot be logged correctly." }, not be initialized." },
{ "ER_BINLOG_UNSAFE_UDF", 1672, "Statement is unsafe because it uses a UDF { "ER_BACKUP_PROGRESS_TABLES", 1682, "Can\'t open the backup logs as tables
which may not return the same value on the slave." }, . Check \'mysql.backup_history\' and \'mysql.backup_progress\' or run mysql
{ "ER_BINLOG_UNSAFE_SYSTEM_VARIABLE", 1673, "Statement is unsafe because it _upgrade to repair." },
uses a system variable that may have a different value on the slave." }, { "ER_TABLESPACE_EXIST", 1683, "Tablespace \'%-.192s\' already exists" },
{ "ER_BINLOG_UNSAFE_SYSTEM_FUNCTION", 1674, "Statement is unsafe because it { "ER_NO_SUCH_TABLESPACE", 1684, "Tablespace \'%-.192s\' doesn\'t exist" },
uses a system function that may return a different value on the slave." }, { "ER_SLAVE_IGNORE_SERVER_IDS", 1685, "The requested server id %d clashes w
{ "ER_BINLOG_UNSAFE_NONTRANS_AFTER_TRANS", 1675, "Statement is unsafe becau ith the slave startup option --replicate-same-server-id" },
se it accesses a non-transactional table after accessing a transactional ta { "ER_BACKUP_CANT_FIND_SE", 1686, "Backup image contains data created by a
ble within the same transaction." }, native driver of %-.64s storage engine but this engine can not be found on
{ "ER_MESSAGE_AND_STATEMENT", 1676, "%s Statement: %s" }, this server" },
{ "ER_SLAVE_CONVERSION_FAILED", 1677, "Column %d of table \'%-.192s.%-.192s { "ER_BACKUP_NO_NATIVE_BE", 1687, "Backup image contains data created by a
\' cannot be converted from type \'%-.32s\' to type \'%-.32s\'" }, native driver of %-.64s storage engine but it has no native backup support
{ "ER_SLAVE_CANT_CREATE_CONVERSION", 1678, "Can\'t create conversion table on this server" },
for table \'%-.192s.%-.192s\'" }, { "ER_BACKUP_UNKNOWN_BE", 1688, "Backup engine #%d needed for restoring fro
{ "ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_FORMAT", 1679, "Cannot modi m backup image has unknown type" },
fy @@session.binlog_format inside a transaction" }, { "ER_BACKUP_WRONG_TABLE_BE", 1689, "Backup image specifies wrong backup en
{ "ER_PATH_LENGTH", 1680, "The path specified for %.64s is too long." }, gine #%d for one of the tables" },
{ "ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT", 1681, "The syntax \'%s\' is d { "ER_BACKUP_CANT_RESTORE_DB", 1690, "Could not restore database %-.64s" },
eprecated and will be removed in MySQL %s." }, { "ER_BACKUP_CANT_RESTORE_TABLE", 1691, "Could not restore table %-.64s" },
{ "ER_WRONG_NATIVE_TABLE_STRUCTURE", 1682, "Native table \'%-.64s\'.\'%-.64 { "ER_BACKUP_CANT_RESTORE_VIEW", 1692, "Could not restore view %-.64s. Plea
s\' has the wrong structure" }, se check the view definition for possible missing dependencies." },
{ "ER_WRONG_PERFSCHEMA_USAGE", 1683, "Invalid performance_schema usage." }, { "ER_BACKUP_CANT_RESTORE_SROUT", 1693, "Could not restore stored routine %
{ "ER_WARN_I_S_SKIPPED_TABLE", 1684, "Table \'%s\'.\'%s\' was skipped since -.64s" },
its definition is being modified by concurrent DDL statement" }, { "ER_BACKUP_CANT_RESTORE_EVENT", 1694, "Could not restore event %-.64s" },
{ "ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_DIRECT", 1685, "Cannot modi { "ER_BACKUP_CANT_RESTORE_TRIGGER", 1695, "Could not restore trigger %-.64s
fy @@session.binlog_direct_non_transactional_updates inside a transaction" " },
}, { "ER_BACKUP_CATALOG_ADD_DB", 1696, "Failed to add database `%-.64s` to the
{ "ER_STORED_FUNCTION_PREVENTS_SWITCH_BINLOG_DIRECT", 1686, "Cannot change catalog" },
the binlog direct flag inside a stored function or trigger" }, { "ER_BACKUP_CATALOG_ADD_TABLE", 1697, "Failed to add table `%-.64s`.`%-.64
{ "ER_SPATIAL_MUST_HAVE_GEOM_COL", 1687, "A SPATIAL index may only contain s` to the catalog" },
a geometrical type column" }, { "ER_BACKUP_CATALOG_ADD_VIEW", 1698, "Failed to add view `%-.64s`.`%-.64s`
{ "ER_TOO_LONG_INDEX_COMMENT", 1688, "Comment for index \'%-.64s\' is too l to the catalog" },
ong (max = %lu)" }, { "ER_BACKUP_CATALOG_ADD_SROUT", 1699, "Failed to add stored routine `%-.64
{ "ER_LOCK_ABORTED", 1689, "Wait on a lock was aborted due to a pending exc s`.`%-.64s` to the catalog" },
lusive lock" }, { "ER_BACKUP_CATALOG_ADD_EVENT", 1700, "Failed to add event `%-.64s`.`%-.64
{ "ER_DATA_OUT_OF_RANGE", 1690, "%s value is out of range in \'%s\'" }, s` to the catalog" },
{ "ER_WRONG_SPVAR_TYPE_IN_LIMIT", 1691, "A variable of a non-integer type i { "ER_BACKUP_CATALOG_ADD_TRIGGER", 1701, "Failed to add trigger `%-.64s`.`%
n LIMIT clause" }, -.64s` to the catalog" },
{ "ER_BINLOG_UNSAFE_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE", 1692, "Mixin { "ER_BACKUP_UNKNOWN_OBJECT", 1702, "Backup image refers to an object which
g self-logging and non-self-logging engines in a statement is unsafe." }, could not be found in the catalog" },
{ "ER_BINLOG_UNSAFE_MIXED_STATEMENT", 1693, "Statement accesses nontransact { "ER_BACKUP_UNKNOWN_OBJECT_TYPE", 1703, "Backup image refers to an object
ional table as well as transactional or temporary table, and writes to any of unknown type" },
of them." }, { "ER_BACKUP_OPEN_WR", 1704, "Cannot open backup stream for writing" },
{ "ER_FAILED_READ_FROM_PAR_FILE", 1694, "Failed to read from the .par file" { "ER_BACKUP_OPEN_RD", 1705, "Cannot open backup stream for reading" },
}, { "ER_BACKUP_BAD_MAGIC", 1706, "Could not find correct signature at the beg
{ "ER_COL_COUNT_DOESNT_MATCH_CORRUPTED_V2", 1695, "Column count of %s.%s is inning of backup stream" },
wrong. Expected %d, found %d. The table is probably corrupted" }, { "ER_BACKUP_CONTEXT_CREATE", 1707, "Cannot create backup/restore execution
{ "ER_CANNOT_LOAD_FROM_TABLE_V2", 1696, "Cannot load from %s.%s. The table context" },
is probably corrupted" }, { "ER_BACKUP_CONTEXT_REMOVE", 1708, "Error when cleaning up after backup/re
{ "ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_SQL_LOG_BIN", 1697, "Cannot modify store operation" },
@@session.sql_log_bin inside a transaction" }, { "ER_BAD_PATH", 1709, "Malformed file path \'%-128s\'" },
{ "ER_STORED_FUNCTION_PREVENTS_SWITCH_SQL_LOG_BIN", 1698, "Cannot change th { "ER_DDL_BLOCK", 1710, "Erorr when attempting to block DDLs" },
e sql_log_bin inside a stored function or trigger" }, { "ER_BACKUP_LOGGER_INIT", 1711, "Could not initialize logging and reportin
{ "ER_MASTER_DELAY_VALUE_OUT_OF_RANGE", 1699, "The requested value %u for t g services" },
he master delay exceeds the maximum %u" }, { "ER_BACKUP_WRITE_SUMMARY", 1712, "Error when writing summary section of b
{ "ER_ONLY_FD_AND_RBR_EVENTS_ALLOWED_IN_BINLOG_STATEMENT", 1700, "Only Form ackup image" },
at_description_log_event and row events are allowed in BINLOG statements (b { "ER_BACKUP_READ_SUMMARY", 1713, "Error when reading summary section of ba
ut %s was provided)" }, ckup image" },
{ "ER_PARTITION_EXCHANGE_DIFFERENT_OPTION", 1701, "Non matching attribute \ { "ER_BACKUP_GET_META_DB", 1714, "Failed to obtain meta-data for database %
'%-.64s\' between partition and table" }, -.64s" },
{ "ER_PARTITION_EXCHANGE_PART_TABLE", 1702, "Table to exchange with partiti { "ER_BACKUP_GET_META_TABLE", 1715, "Failed to obtain meta-data for table %
on is partitioned: \'%-.64s\'" }, -.64s" },
{ "ER_PARTITION_EXCHANGE_TEMP_TABLE", 1703, "Table to exchange with partiti { "ER_BACKUP_GET_META_VIEW", 1716, "Failed to obtain meta-data for view %-.
on is temporary: \'%-.64s\'" }, 64s" },
{ "ER_PARTITION_INSTEAD_OF_SUBPARTITION", 1704, "Subpartitioned table, use { "ER_BACKUP_GET_META_SROUT", 1717, "Failed to obtain meta-data for stored
subpartition instead of partition" }, routine %-.64s" },
{ "ER_UNKNOWN_PARTITION", 1705, "Unknown partition \'%-.64s\' in table \'%- { "ER_BACKUP_GET_META_EVENT", 1718, "Failed to obtain meta-data for event %
.64s\'" }, -.64s" },
{ "ER_TABLES_DIFFERENT_METADATA", 1706, "Tables have different definitions" { "ER_BACKUP_GET_META_TRIGGER", 1719, "Failed to obtain meta-data for trigg
}, er %-.64s" },
{ "ER_ROW_DOES_NOT_MATCH_PARTITION", 1707, "Found row that does not match t { "ER_BACKUP_CREATE_BE", 1720, "Cannot create backup engine for storage eng
he partition" }, ine %-.64s" },
{ "ER_BACKUP_LIST_PERDB", 1721, "Can\'t enumerate per database objects" },
{ "ER_BACKUP_LIST_DB_VIEWS", 1722, "Can\'t enumerate views in database `%-.
64s`" },
{ "ER_BACKUP_LIST_DB_SROUT", 1723, "Can\'t enumerate stored routines in dat
abase `%-.64s`" },
{ "ER_BACKUP_LIST_DB_EVENTS", 1724, "Can\'t enumerate events in database `%
-.64s`" },
{ "ER_BACKUP_LIST_DB_TRIGGERS", 1725, "Can\'t enumerate triggers in databas
e `%-.64s`" },
{ "ER_BACKUP_LOG_WRITE_ERROR", 1726, "Can\'t write to the online backup pro
gress log %-.64s." },
{ "ER_TABLESPACE_NOT_EMPTY", 1727, "Tablespace \'%-.192s\' not empty" },
{ "ER_BACKUP_CAT_ENUM", 1728, "Could not access the contents of the backup
catalog when writing backup image preamble" },
{ "ER_BACKUP_CANT_RESTORE_TS", 1729, "Could not create tablespace %-.64s ne
eded by tables being restored." },
{ "ER_BACKUP_TS_CHANGE", 1730, "Tablespace %-.64s needed by tables being re
stored, but the current tablespace definition differs from how it was when
backup was made." },
{ "ER_BACKUP_GET_META_TS", 1731, "Failed to obtain meta-data for tablespace
%-.64s." },
{ "ER_TABLESPACE_DATAFILE_EXIST", 1732, "Tablespace data file \'%-.192s\' a
lready exists" },
{ "ER_BACKUP_CATALOG_ADD_TS", 1733, "Failed to add tablespace `%-.64s` to t
he catalog" },
{ "ER_DEBUG_SYNC_TIMEOUT", 1734, "debug sync point wait timed out" },
{ "ER_DEBUG_SYNC_HIT_LIMIT", 1735, "debug sync point hit limit reached" },
{ "ER_BACKUP_FAILED_TO_INIT_COMPRESSION", 1736, "Could not initialize compr
ession of backup image (function deflateInit2 returned error code %d: %-.64
s)" },
{ "ER_BACKUP_OBTAIN_NAME_LOCK_FAILED", 1737, "Restore failed to obtain the
name locks on the tables." },
{ "ER_BACKUP_RELEASE_NAME_LOCK_FAILED", 1738, "Restore failed to release th
e name locks on the tables." },
{ "ER_BACKUP_BACKUPDIR", 1739, "The path specified for the system variable
backupdir cannot be accessed or is invalid. ref: %-.64s" },
{ "ER_DDL_TIMEOUT", 1740, "The backup wait timeout has expired for query \'
%-64s\'." },
{ "ER_BACKUP_LIST_DB_PRIV", 1741, "Can\'t enumerate grants in database \'%-
.64s\'." },
{ "ER_BACKUP_CATALOG_ADD_PRIV", 1742, "Failed to add grant \'%-.64s\' to th
e catalog" },
{ "ER_BACKUP_GET_META_PRIV", 1743, "Failed to obtain meta-data for grant \'
%-.64s\'." },
{ "ER_BACKUP_CANT_RESTORE_PRIV", 1744, "Could not execute grant \'%-.64s\'.
" },
{ "ER_BACKUP_GRANT_SKIPPED", 1745, "The grant \'%-.64s\' for the user %-.64
s was skipped because the user does not exist." },
{ "ER_BACKUP_GRANT_WRONG_DB", 1746, "The grant \'%-.64s\' failed. Database
not included in the backup image." },
{ "ER_BACKUP_LOGPATHS", 1747, "The log names for backup_history and backup_
progress must be unique." },
{ "ER_BACKUP_LOGPATH_INVALID", 1748, "The path specified for the %-.64s is
invalid. ref: %-.64s" },
{ "ER_BACKUP_SEND_REPLY", 1749, "Failed to send reply to client after succe
ssful %-.64s operation" },
{ "ER_BACKUP_CLOSE", 1750, "Backup/Restore: Error on close of backup stream
" },
{ "ER_BACKUP_BINLOG", 1751, "Error on accessing binlog during BACKUP" },
{ "ER_BACKUP_LOG_OUTPUT", 1752, "Removing backup log entries by date or bac
kup_id requires logging to tables." },
{ "ER_BACKUP_PURGE_DATETIME", 1753, "The datetime specified is invalid for
the \'%-.64s\' command." },
{ "ER_BACKUP_LOGS_DELETED", 1754, "Backup log entries deleted: " },
{ "ER_BACKUP_LOGS_TRUNCATED", 1755, "All backup log entries have been delet
ed" },
{ "ER_MASTER_BLOCKING_SLAVES", 1756, "The master is not allowing slave conn
ections." },
{ "ER_RESTORE_ON_MASTER", 1757, "A restore operation was initiated on the m
aster." },
{ "ER_RESTORE_ON_SLAVE", 1758, "A restore operation was attempted on a slav
e during replication. You must stop the slave prior to running a restore."
},
{ "ER_NONUNIQ_DB", 1759, "Not unique database: \'%-.192s\'" },
{ "ER_RESTORE_DB_EXISTS", 1760, "Database \'%-.64s\' already exists. Use OV
ERWRITE flag to overwrite." },
{ "ER_QUERY_CACHE_DISABLED", 1761, "Query cache is disabled; restart the se
rver with query_cache_type=1 to enable it" },
{ "ER_BACKUP_UNEXPECTED_DATA", 1762, "Backup image contains no tables, but
table data was found in it" },
{ "ER_BACKUP_BACKUP_DBS", 1763, "Backing up %u database(s) %.220s" },
{ "ER_BACKUP_RESTORE_DBS", 1764, "Restoring %u database(s) %.220s" },
{ "ER_COM_UNSUPPORTED", 1765, "%s doesn\'t support %s" },
{ "ER_BACKUP_SYNCHRONIZE", 1766, "Backup failed to synchronize table images
." },
{ "ER_RESTORE_CANNOT_START_SLAVE", 1767, "Cannot start slave. SLAVE START i
s blocked by %-.64s." },
{ "ER_OPERATION_ABORTED", 1768, "Operation aborted" },
{ "ER_OPERATION_ABORTED_CORRUPTED", 1769, "Operation aborted - data might b
e corrupted" },
{ "ER_DUP_SIGNAL_SET", 1770, "Duplicate condition information item \'%s\'"
},
{ "ER_SIGNAL_WARN", 1771, "Unhandled user-defined warning condition" },
{ "ER_SIGNAL_NOT_FOUND", 1772, "Unhandled user-defined not found condition"
},
{ "ER_SIGNAL_EXCEPTION", 1773, "Unhandled user-defined exception condition"
},
{ "ER_RESIGNAL_WITHOUT_ACTIVE_HANDLER", 1774, "RESIGNAL when handler not ac
tive" },
{ "ER_SIGNAL_BAD_CONDITION_TYPE", 1775, "SIGNAL/RESIGNAL can only use a CON
DITION defined with SQLSTATE" },
{ "WARN_COND_ITEM_TRUNCATED", 1776, "Data truncated for condition item \'%s
\'" },
{ "ER_COND_ITEM_TOO_LONG", 1777, "Data too long for condition item \'%s\'"
},
{ "ER_PATH_LENGTH", 1778, "The path specified for %.64s is too long." },
{ "ER_BACKUP_INTERRUPTED", 1779, "Operation has been interrupted." },
 End of changes. 14 change blocks. 
21 lines changed or deleted 20 lines changed or added


 mysqld_error.h   mysqld_error.h 
skipping to change at line 490 skipping to change at line 490
#define ER_FOREIGN_SERVER_EXISTS 1476 #define ER_FOREIGN_SERVER_EXISTS 1476
#define ER_FOREIGN_SERVER_DOESNT_EXIST 1477 #define ER_FOREIGN_SERVER_DOESNT_EXIST 1477
#define ER_ILLEGAL_HA_CREATE_OPTION 1478 #define ER_ILLEGAL_HA_CREATE_OPTION 1478
#define ER_PARTITION_REQUIRES_VALUES_ERROR 1479 #define ER_PARTITION_REQUIRES_VALUES_ERROR 1479
#define ER_PARTITION_WRONG_VALUES_ERROR 1480 #define ER_PARTITION_WRONG_VALUES_ERROR 1480
#define ER_PARTITION_MAXVALUE_ERROR 1481 #define ER_PARTITION_MAXVALUE_ERROR 1481
#define ER_PARTITION_SUBPARTITION_ERROR 1482 #define ER_PARTITION_SUBPARTITION_ERROR 1482
#define ER_PARTITION_SUBPART_MIX_ERROR 1483 #define ER_PARTITION_SUBPART_MIX_ERROR 1483
#define ER_PARTITION_WRONG_NO_PART_ERROR 1484 #define ER_PARTITION_WRONG_NO_PART_ERROR 1484
#define ER_PARTITION_WRONG_NO_SUBPART_ERROR 1485 #define ER_PARTITION_WRONG_NO_SUBPART_ERROR 1485
#define ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR 1486 #define ER_CONST_EXPR_IN_PARTITION_FUNC_ERROR 1486
#define ER_NO_CONST_EXPR_IN_RANGE_OR_LIST_ERROR 1487 #define ER_NO_CONST_EXPR_IN_RANGE_OR_LIST_ERROR 1487
#define ER_FIELD_NOT_FOUND_PART_ERROR 1488 #define ER_FIELD_NOT_FOUND_PART_ERROR 1488
#define ER_LIST_OF_FIELDS_ONLY_IN_HASH_ERROR 1489 #define ER_LIST_OF_FIELDS_ONLY_IN_HASH_ERROR 1489
#define ER_INCONSISTENT_PARTITION_INFO_ERROR 1490 #define ER_INCONSISTENT_PARTITION_INFO_ERROR 1490
#define ER_PARTITION_FUNC_NOT_ALLOWED_ERROR 1491 #define ER_PARTITION_FUNC_NOT_ALLOWED_ERROR 1491
#define ER_PARTITIONS_MUST_BE_DEFINED_ERROR 1492 #define ER_PARTITIONS_MUST_BE_DEFINED_ERROR 1492
#define ER_RANGE_NOT_INCREASING_ERROR 1493 #define ER_RANGE_NOT_INCREASING_ERROR 1493
#define ER_INCONSISTENT_TYPE_OF_FUNCTIONS_ERROR 1494 #define ER_INCONSISTENT_TYPE_OF_FUNCTIONS_ERROR 1494
#define ER_MULTIPLE_DEF_CONST_IN_LIST_PART_ERROR 1495 #define ER_MULTIPLE_DEF_CONST_IN_LIST_PART_ERROR 1495
#define ER_PARTITION_ENTRY_ERROR 1496 #define ER_PARTITION_ENTRY_ERROR 1496
skipping to change at line 551 skipping to change at line 551
#define ER_EVENT_ALREADY_EXISTS 1537 #define ER_EVENT_ALREADY_EXISTS 1537
#define ER_EVENT_STORE_FAILED 1538 #define ER_EVENT_STORE_FAILED 1538
#define ER_EVENT_DOES_NOT_EXIST 1539 #define ER_EVENT_DOES_NOT_EXIST 1539
#define ER_EVENT_CANT_ALTER 1540 #define ER_EVENT_CANT_ALTER 1540
#define ER_EVENT_DROP_FAILED 1541 #define ER_EVENT_DROP_FAILED 1541
#define ER_EVENT_INTERVAL_NOT_POSITIVE_OR_TOO_BIG 1542 #define ER_EVENT_INTERVAL_NOT_POSITIVE_OR_TOO_BIG 1542
#define ER_EVENT_ENDS_BEFORE_STARTS 1543 #define ER_EVENT_ENDS_BEFORE_STARTS 1543
#define ER_EVENT_EXEC_TIME_IN_THE_PAST 1544 #define ER_EVENT_EXEC_TIME_IN_THE_PAST 1544
#define ER_EVENT_OPEN_TABLE_FAILED 1545 #define ER_EVENT_OPEN_TABLE_FAILED 1545
#define ER_EVENT_NEITHER_M_EXPR_NOR_M_AT 1546 #define ER_EVENT_NEITHER_M_EXPR_NOR_M_AT 1546
#define ER_OBSOLETE_COL_COUNT_DOESNT_MATCH_CORRUPTED 1547 #define ER_COL_COUNT_DOESNT_MATCH_CORRUPTED 1547
#define ER_OBSOLETE_CANNOT_LOAD_FROM_TABLE 1548 #define ER_CANNOT_LOAD_FROM_TABLE 1548
#define ER_EVENT_CANNOT_DELETE 1549 #define ER_EVENT_CANNOT_DELETE 1549
#define ER_EVENT_COMPILE_ERROR 1550 #define ER_EVENT_COMPILE_ERROR 1550
#define ER_EVENT_SAME_NAME 1551 #define ER_EVENT_SAME_NAME 1551
#define ER_EVENT_DATA_TOO_LONG 1552 #define ER_EVENT_DATA_TOO_LONG 1552
#define ER_DROP_INDEX_FK 1553 #define ER_DROP_INDEX_FK 1553
#define ER_WARN_DEPRECATED_SYNTAX_WITH_VER 1554 #define ER_WARN_DEPRECATED_SYNTAX_WITH_VER 1554
#define ER_CANT_WRITE_LOCK_LOG_TABLE 1555 #define ER_CANT_WRITE_LOCK_LOG_TABLE 1555
#define ER_CANT_LOCK_LOG_TABLE 1556 #define ER_CANT_LOCK_LOG_TABLE 1556
#define ER_FOREIGN_DUPLICATE_KEY 1557 #define ER_FOREIGN_DUPLICATE_KEY 1557
#define ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE 1558 #define ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE 1558
skipping to change at line 612 skipping to change at line 612
#define ER_BINLOG_LOGGING_IMPOSSIBLE 1598 #define ER_BINLOG_LOGGING_IMPOSSIBLE 1598
#define ER_VIEW_NO_CREATION_CTX 1599 #define ER_VIEW_NO_CREATION_CTX 1599
#define ER_VIEW_INVALID_CREATION_CTX 1600 #define ER_VIEW_INVALID_CREATION_CTX 1600
#define ER_SR_INVALID_CREATION_CTX 1601 #define ER_SR_INVALID_CREATION_CTX 1601
#define ER_TRG_CORRUPTED_FILE 1602 #define ER_TRG_CORRUPTED_FILE 1602
#define ER_TRG_NO_CREATION_CTX 1603 #define ER_TRG_NO_CREATION_CTX 1603
#define ER_TRG_INVALID_CREATION_CTX 1604 #define ER_TRG_INVALID_CREATION_CTX 1604
#define ER_EVENT_INVALID_CREATION_CTX 1605 #define ER_EVENT_INVALID_CREATION_CTX 1605
#define ER_TRG_CANT_OPEN_TABLE 1606 #define ER_TRG_CANT_OPEN_TABLE 1606
#define ER_CANT_CREATE_SROUTINE 1607 #define ER_CANT_CREATE_SROUTINE 1607
#define ER_NEVER_USED 1608 #define ER_SLAVE_AMBIGOUS_EXEC_MODE 1608
#define ER_NO_FORMAT_DESCRIPTION_EVENT_BEFORE_BINLOG_STATEMENT 1609 #define ER_NO_FORMAT_DESCRIPTION_EVENT_BEFORE_BINLOG_STATEMENT 1609
#define ER_SLAVE_CORRUPT_EVENT 1610 #define ER_SLAVE_CORRUPT_EVENT 1610
#define ER_LOAD_DATA_INVALID_COLUMN 1611 #define ER_LOAD_DATA_INVALID_COLUMN 1611
#define ER_LOG_PURGE_NO_FILE 1612 #define ER_LOG_PURGE_NO_FILE 1612
#define ER_XA_RBTIMEOUT 1613 #define ER_XA_RBTIMEOUT 1613
#define ER_XA_RBDEADLOCK 1614 #define ER_XA_RBDEADLOCK 1614
#define ER_NEED_REPREPARE 1615 #define ER_NEED_REPREPARE 1615
#define ER_DELAYED_NOT_SUPPORTED 1616 #define ER_DELAYED_NOT_SUPPORTED 1616
#define WARN_NO_MASTER_INFO 1617 #define WARN_NO_MASTER_INFO 1617
#define WARN_OPTION_IGNORED 1618 #define WARN_OPTION_IGNORED 1618
skipping to change at line 634 skipping to change at line 634
#define WARN_PLUGIN_BUSY 1620 #define WARN_PLUGIN_BUSY 1620
#define ER_VARIABLE_IS_READONLY 1621 #define ER_VARIABLE_IS_READONLY 1621
#define ER_WARN_ENGINE_TRANSACTION_ROLLBACK 1622 #define ER_WARN_ENGINE_TRANSACTION_ROLLBACK 1622
#define ER_SLAVE_HEARTBEAT_FAILURE 1623 #define ER_SLAVE_HEARTBEAT_FAILURE 1623
#define ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE 1624 #define ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE 1624
#define ER_NDB_REPLICATION_SCHEMA_ERROR 1625 #define ER_NDB_REPLICATION_SCHEMA_ERROR 1625
#define ER_CONFLICT_FN_PARSE_ERROR 1626 #define ER_CONFLICT_FN_PARSE_ERROR 1626
#define ER_EXCEPTIONS_WRITE_ERROR 1627 #define ER_EXCEPTIONS_WRITE_ERROR 1627
#define ER_TOO_LONG_TABLE_COMMENT 1628 #define ER_TOO_LONG_TABLE_COMMENT 1628
#define ER_TOO_LONG_FIELD_COMMENT 1629 #define ER_TOO_LONG_FIELD_COMMENT 1629
#define ER_FUNC_INEXISTENT_NAME_COLLISION 1630 #define ER_WARN_AUTO_CONVERT_LOCK 1630
#define ER_DATABASE_NAME 1631 #define ER_NO_AUTO_CONVERT_LOCK_STRICT 1631
#define ER_TABLE_NAME 1632 #define ER_NO_AUTO_CONVERT_LOCK_TRANSACTION 1632
#define ER_PARTITION_NAME 1633 #define ER_NO_STORAGE_ENGINE 1633
#define ER_SUBPARTITION_NAME 1634 #define ER_BACKUP_BACKUP_START 1634
#define ER_TEMPORARY_NAME 1635 #define ER_BACKUP_BACKUP_DONE 1635
#define ER_RENAMED_NAME 1636 #define ER_BACKUP_RESTORE_START 1636
#define ER_TOO_MANY_CONCURRENT_TRXS 1637 #define ER_BACKUP_RESTORE_DONE 1637
#define WARN_NON_ASCII_SEPARATOR_NOT_IMPLEMENTED 1638 #define ER_BACKUP_NOTHING_TO_BACKUP 1638
#define ER_DEBUG_SYNC_TIMEOUT 1639 #define ER_BACKUP_CANNOT_INCLUDE_DB 1639
#define ER_DEBUG_SYNC_HIT_LIMIT 1640 #define ER_BACKUP_BACKUP 1640
#define ER_DUP_SIGNAL_SET 1641 #define ER_BACKUP_RESTORE 1641
#define ER_SIGNAL_WARN 1642 #define ER_BACKUP_RUNNING 1642
#define ER_SIGNAL_NOT_FOUND 1643 #define ER_BACKUP_BACKUP_PREPARE 1643
#define ER_SIGNAL_EXCEPTION 1644 #define ER_BACKUP_RESTORE_PREPARE 1644
#define ER_RESIGNAL_WITHOUT_ACTIVE_HANDLER 1645 #define ER_BACKUP_INVALID_LOC 1645
#define ER_SIGNAL_BAD_CONDITION_TYPE 1646 #define ER_BACKUP_READ_LOC 1646
#define WARN_COND_ITEM_TRUNCATED 1647 #define ER_BACKUP_WRITE_LOC 1647
#define ER_COND_ITEM_TOO_LONG 1648 #define ER_BACKUP_LIST_DBS 1648
#define ER_UNKNOWN_LOCALE 1649 #define ER_BACKUP_LIST_TABLES 1649
#define ER_SLAVE_IGNORE_SERVER_IDS 1650 #define ER_BACKUP_LIST_DB_TABLES 1650
#define ER_QUERY_CACHE_DISABLED 1651 #define ER_BACKUP_SKIP_VIEW 1651
#define ER_SAME_NAME_PARTITION_FIELD 1652 #define ER_BACKUP_NO_ENGINE 1652
#define ER_PARTITION_COLUMN_LIST_ERROR 1653 #define ER_BACKUP_TABLE_OPEN 1653
#define ER_WRONG_TYPE_COLUMN_VALUE_ERROR 1654 #define ER_BACKUP_READ_HEADER 1654
#define ER_TOO_MANY_PARTITION_FUNC_FIELDS_ERROR 1655 #define ER_BACKUP_WRITE_HEADER 1655
#define ER_MAXVALUE_IN_VALUES_IN 1656 #define ER_BACKUP_NO_BACKUP_DRIVER 1656
#define ER_TOO_MANY_VALUES_ERROR 1657 #define ER_BACKUP_NOT_ACCEPTED 1657
#define ER_ROW_SINGLE_PARTITION_FIELD_ERROR 1658 #define ER_BACKUP_CREATE_BACKUP_DRIVER 1658
#define ER_FIELD_TYPE_NOT_ALLOWED_AS_PARTITION_FIELD 1659 #define ER_BACKUP_CREATE_RESTORE_DRIVER 1659
#define ER_PARTITION_FIELDS_TOO_LONG 1660 #define ER_BACKUP_TOO_MANY_IMAGES 1660
#define ER_BINLOG_ROW_ENGINE_AND_STMT_ENGINE 1661 #define ER_BACKUP_WRITE_META 1661
#define ER_BINLOG_ROW_MODE_AND_STMT_ENGINE 1662 #define ER_BACKUP_READ_META 1662
#define ER_BINLOG_UNSAFE_AND_STMT_ENGINE 1663 #define ER_BACKUP_CREATE_META 1663
#define ER_BINLOG_ROW_INJECTION_AND_STMT_ENGINE 1664 #define ER_BACKUP_GET_BUF 1664
#define ER_BINLOG_STMT_MODE_AND_ROW_ENGINE 1665 #define ER_BACKUP_WRITE_DATA 1665
#define ER_BINLOG_ROW_INJECTION_AND_STMT_MODE 1666 #define ER_BACKUP_READ_DATA 1666
#define ER_BINLOG_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE 1667 #define ER_BACKUP_NEXT_CHUNK 1667
#define ER_BINLOG_UNSAFE_LIMIT 1668 #define ER_BACKUP_INIT_BACKUP_DRIVER 1668
#define ER_BINLOG_UNSAFE_INSERT_DELAYED 1669 #define ER_BACKUP_INIT_RESTORE_DRIVER 1669
#define ER_BINLOG_UNSAFE_SYSTEM_TABLE 1670 #define ER_BACKUP_STOP_BACKUP_DRIVER 1670
#define ER_BINLOG_UNSAFE_AUTOINC_COLUMNS 1671 #define ER_BACKUP_STOP_RESTORE_DRIVERS 1671
#define ER_BINLOG_UNSAFE_UDF 1672 #define ER_BACKUP_PREPARE_DRIVER 1672
#define ER_BINLOG_UNSAFE_SYSTEM_VARIABLE 1673 #define ER_BACKUP_CREATE_VP 1673
#define ER_BINLOG_UNSAFE_SYSTEM_FUNCTION 1674 #define ER_BACKUP_UNLOCK_DRIVER 1674
#define ER_BINLOG_UNSAFE_NONTRANS_AFTER_TRANS 1675 #define ER_BACKUP_CANCEL_BACKUP 1675
#define ER_MESSAGE_AND_STATEMENT 1676 #define ER_BACKUP_CANCEL_RESTORE 1676
#define ER_SLAVE_CONVERSION_FAILED 1677 #define ER_BACKUP_GET_DATA 1677
#define ER_SLAVE_CANT_CREATE_CONVERSION 1678 #define ER_BACKUP_SEND_DATA 1678
#define ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_FORMAT 1679 #define ER_BACKUP_SEND_DATA_RETRY 1679
#define ER_PATH_LENGTH 1680 #define ER_BACKUP_OPEN_TABLES 1680
#define ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT 1681 #define ER_BACKUP_THREAD_INIT 1681
#define ER_WRONG_NATIVE_TABLE_STRUCTURE 1682 #define ER_BACKUP_PROGRESS_TABLES 1682
#define ER_WRONG_PERFSCHEMA_USAGE 1683 #define ER_TABLESPACE_EXIST 1683
#define ER_WARN_I_S_SKIPPED_TABLE 1684 #define ER_NO_SUCH_TABLESPACE 1684
#define ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_DIRECT 1685 #define ER_SLAVE_IGNORE_SERVER_IDS 1685
#define ER_STORED_FUNCTION_PREVENTS_SWITCH_BINLOG_DIRECT 1686 #define ER_BACKUP_CANT_FIND_SE 1686
#define ER_SPATIAL_MUST_HAVE_GEOM_COL 1687 #define ER_BACKUP_NO_NATIVE_BE 1687
#define ER_TOO_LONG_INDEX_COMMENT 1688 #define ER_BACKUP_UNKNOWN_BE 1688
#define ER_LOCK_ABORTED 1689 #define ER_BACKUP_WRONG_TABLE_BE 1689
#define ER_DATA_OUT_OF_RANGE 1690 #define ER_BACKUP_CANT_RESTORE_DB 1690
#define ER_WRONG_SPVAR_TYPE_IN_LIMIT 1691 #define ER_BACKUP_CANT_RESTORE_TABLE 1691
#define ER_BINLOG_UNSAFE_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE 1692 #define ER_BACKUP_CANT_RESTORE_VIEW 1692
#define ER_BINLOG_UNSAFE_MIXED_STATEMENT 1693 #define ER_BACKUP_CANT_RESTORE_SROUT 1693
#define ER_FAILED_READ_FROM_PAR_FILE 1694 #define ER_BACKUP_CANT_RESTORE_EVENT 1694
#define ER_COL_COUNT_DOESNT_MATCH_CORRUPTED_V2 1695 #define ER_BACKUP_CANT_RESTORE_TRIGGER 1695
#define ER_CANNOT_LOAD_FROM_TABLE_V2 1696 #define ER_BACKUP_CATALOG_ADD_DB 1696
#define ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_SQL_LOG_BIN 1697 #define ER_BACKUP_CATALOG_ADD_TABLE 1697
#define ER_STORED_FUNCTION_PREVENTS_SWITCH_SQL_LOG_BIN 1698 #define ER_BACKUP_CATALOG_ADD_VIEW 1698
#define ER_MASTER_DELAY_VALUE_OUT_OF_RANGE 1699 #define ER_BACKUP_CATALOG_ADD_SROUT 1699
#define ER_ONLY_FD_AND_RBR_EVENTS_ALLOWED_IN_BINLOG_STATEMENT 1700 #define ER_BACKUP_CATALOG_ADD_EVENT 1700
#define ER_PARTITION_EXCHANGE_DIFFERENT_OPTION 1701 #define ER_BACKUP_CATALOG_ADD_TRIGGER 1701
#define ER_PARTITION_EXCHANGE_PART_TABLE 1702 #define ER_BACKUP_UNKNOWN_OBJECT 1702
#define ER_PARTITION_EXCHANGE_TEMP_TABLE 1703 #define ER_BACKUP_UNKNOWN_OBJECT_TYPE 1703
#define ER_PARTITION_INSTEAD_OF_SUBPARTITION 1704 #define ER_BACKUP_OPEN_WR 1704
#define ER_UNKNOWN_PARTITION 1705 #define ER_BACKUP_OPEN_RD 1705
#define ER_TABLES_DIFFERENT_METADATA 1706 #define ER_BACKUP_BAD_MAGIC 1706
#define ER_ROW_DOES_NOT_MATCH_PARTITION 1707 #define ER_BACKUP_CONTEXT_CREATE 1707
#define ER_ERROR_LAST 1707 #define ER_BACKUP_CONTEXT_REMOVE 1708
#define ER_BAD_PATH 1709
#define ER_DDL_BLOCK 1710
#define ER_BACKUP_LOGGER_INIT 1711
#define ER_BACKUP_WRITE_SUMMARY 1712
#define ER_BACKUP_READ_SUMMARY 1713
#define ER_BACKUP_GET_META_DB 1714
#define ER_BACKUP_GET_META_TABLE 1715
#define ER_BACKUP_GET_META_VIEW 1716
#define ER_BACKUP_GET_META_SROUT 1717
#define ER_BACKUP_GET_META_EVENT 1718
#define ER_BACKUP_GET_META_TRIGGER 1719
#define ER_BACKUP_CREATE_BE 1720
#define ER_BACKUP_LIST_PERDB 1721
#define ER_BACKUP_LIST_DB_VIEWS 1722
#define ER_BACKUP_LIST_DB_SROUT 1723
#define ER_BACKUP_LIST_DB_EVENTS 1724
#define ER_BACKUP_LIST_DB_TRIGGERS 1725
#define ER_BACKUP_LOG_WRITE_ERROR 1726
#define ER_TABLESPACE_NOT_EMPTY 1727
#define ER_BACKUP_CAT_ENUM 1728
#define ER_BACKUP_CANT_RESTORE_TS 1729
#define ER_BACKUP_TS_CHANGE 1730
#define ER_BACKUP_GET_META_TS 1731
#define ER_TABLESPACE_DATAFILE_EXIST 1732
#define ER_BACKUP_CATALOG_ADD_TS 1733
#define ER_DEBUG_SYNC_TIMEOUT 1734
#define ER_DEBUG_SYNC_HIT_LIMIT 1735
#define ER_BACKUP_FAILED_TO_INIT_COMPRESSION 1736
#define ER_BACKUP_OBTAIN_NAME_LOCK_FAILED 1737
#define ER_BACKUP_RELEASE_NAME_LOCK_FAILED 1738
#define ER_BACKUP_BACKUPDIR 1739
#define ER_DDL_TIMEOUT 1740
#define ER_BACKUP_LIST_DB_PRIV 1741
#define ER_BACKUP_CATALOG_ADD_PRIV 1742
#define ER_BACKUP_GET_META_PRIV 1743
#define ER_BACKUP_CANT_RESTORE_PRIV 1744
#define ER_BACKUP_GRANT_SKIPPED 1745
#define ER_BACKUP_GRANT_WRONG_DB 1746
#define ER_BACKUP_LOGPATHS 1747
#define ER_BACKUP_LOGPATH_INVALID 1748
#define ER_BACKUP_SEND_REPLY 1749
#define ER_BACKUP_CLOSE 1750
#define ER_BACKUP_BINLOG 1751
#define ER_BACKUP_LOG_OUTPUT 1752
#define ER_BACKUP_PURGE_DATETIME 1753
#define ER_BACKUP_LOGS_DELETED 1754
#define ER_BACKUP_LOGS_TRUNCATED 1755
#define ER_MASTER_BLOCKING_SLAVES 1756
#define ER_RESTORE_ON_MASTER 1757
#define ER_RESTORE_ON_SLAVE 1758
#define ER_NONUNIQ_DB 1759
#define ER_RESTORE_DB_EXISTS 1760
#define ER_QUERY_CACHE_DISABLED 1761
#define ER_BACKUP_UNEXPECTED_DATA 1762
#define ER_BACKUP_BACKUP_DBS 1763
#define ER_BACKUP_RESTORE_DBS 1764
#define ER_COM_UNSUPPORTED 1765
#define ER_BACKUP_SYNCHRONIZE 1766
#define ER_RESTORE_CANNOT_START_SLAVE 1767
#define ER_OPERATION_ABORTED 1768
#define ER_OPERATION_ABORTED_CORRUPTED 1769
#define ER_DUP_SIGNAL_SET 1770
#define ER_SIGNAL_WARN 1771
#define ER_SIGNAL_NOT_FOUND 1772
#define ER_SIGNAL_EXCEPTION 1773
#define ER_RESIGNAL_WITHOUT_ACTIVE_HANDLER 1774
#define ER_SIGNAL_BAD_CONDITION_TYPE 1775
#define WARN_COND_ITEM_TRUNCATED 1776
#define ER_COND_ITEM_TOO_LONG 1777
#define ER_PATH_LENGTH 1778
#define ER_BACKUP_INTERRUPTED 1779
#define ER_ERROR_LAST 1779
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added


 plugin.h   plugin.h 
/* Copyright (C) 2005 MySQL AB, 2009 Sun Microsystems, Inc. /* Copyright (C) 2005 MySQL AB
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License. the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A */ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A */
#ifndef _my_plugin_h #ifndef _my_plugin_h
#define _my_plugin_h #define _my_plugin_h
/* size_t */
#include <stdlib.h>
typedef struct st_mysql MYSQL;
/* /*
On Windows, exports from DLL need to be declared On Windows, exports from DLL need to be declared
Also, plugin needs to be declared as extern "C" because MSVC */
unlike other compilers, uses C++ mangling for variables not only #if (defined(_WIN32) && defined(MYSQL_DYNAMIC_PLUGIN))
for functions. #define MYSQL_PLUGIN_EXPORT extern "C" __declspec(dllexport)
*/ #else
#if defined(_MSC_VER)
#if defined(MYSQL_DYNAMIC_PLUGIN)
#ifdef __cplusplus
#define MYSQL_PLUGIN_EXPORT extern "C" __declspec(dllexport)
#else
#define MYSQL_PLUGIN_EXPORT __declspec(dllexport)
#endif
#else /* MYSQL_DYNAMIC_PLUGIN */
#ifdef __cplusplus
#define MYSQL_PLUGIN_EXPORT extern "C"
#else
#define MYSQL_PLUGIN_EXPORT
#endif
#endif /*MYSQL_DYNAMIC_PLUGIN */
#else /*_MSC_VER */
#define MYSQL_PLUGIN_EXPORT #define MYSQL_PLUGIN_EXPORT
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
class THD; class THD;
class Item; class Item;
#define MYSQL_THD THD* #define MYSQL_THD THD*
#else #else
#define MYSQL_THD void* #define MYSQL_THD void*
#endif #endif
#include <mysql/services.h> #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 #define MYSQL_XIDDATASIZE 128
/** /**
struct st_mysql_xid is binary compatible with the XID structure as struct st_mysql_xid is binary compatible with the XID structure as
in the X/Open CAE Specification, Distributed Transaction Processing: in the X/Open CAE Specification, Distributed Transaction Processing:
The XA Specification, X/Open Company Ltd., 1991. The XA Specification, X/Open Company Ltd., 1991.
http://www.opengroup.org/bookstore/catalog/c193.htm http://www.opengroup.org/bookstore/catalog/c193.htm
@see XID in sql/handler.h @see XID in sql/handler.h
*/ */
skipping to change at line 74 skipping to change at line 72
long gtrid_length; long gtrid_length;
long bqual_length; long bqual_length;
char data[MYSQL_XIDDATASIZE]; /* Not \0-terminated */ char data[MYSQL_XIDDATASIZE]; /* Not \0-terminated */
}; };
typedef struct st_mysql_xid MYSQL_XID; typedef struct st_mysql_xid MYSQL_XID;
/************************************************************************* /*************************************************************************
Plugin API. Common for all plugin types. Plugin API. Common for all plugin types.
*/ */
#define MYSQL_PLUGIN_INTERFACE_VERSION 0x0101 #define MYSQL_PLUGIN_INTERFACE_VERSION 0x0100
/* /*
The allowable types of plugins The allowable types of plugins
*/ */
#define MYSQL_UDF_PLUGIN 0 /* User-defined function */ #define MYSQL_UDF_PLUGIN 0 /* User-defined function */
#define MYSQL_STORAGE_ENGINE_PLUGIN 1 /* Storage Engine */ #define MYSQL_STORAGE_ENGINE_PLUGIN 1 /* Storage Engine */
#define MYSQL_FTPARSER_PLUGIN 2 /* Full-text parser plugin */ #define MYSQL_FTPARSER_PLUGIN 2 /* Full-text parser plugin */
#define MYSQL_DAEMON_PLUGIN 3 /* The daemon/raw plugin type */ #define MYSQL_DAEMON_PLUGIN 3 /* The daemon/raw plugin type */
#define MYSQL_INFORMATION_SCHEMA_PLUGIN 4 /* The I_S plugin type */ #define MYSQL_INFORMATION_SCHEMA_PLUGIN 4 /* The I_S plugin type */
#define MYSQL_AUDIT_PLUGIN 5 /* The Audit plugin type */ #define MYSQL_AUDIT_PLUGIN 5 /* The Audit plugin type */
skipping to change at line 105 skipping to change at line 103
#define PLUGIN_LICENSE_BSD_STRING "BSD" #define PLUGIN_LICENSE_BSD_STRING "BSD"
/* /*
Macros for beginning and ending plugin declarations. Between Macros for beginning and ending plugin declarations. Between
mysql_declare_plugin and mysql_declare_plugin_end there should mysql_declare_plugin and mysql_declare_plugin_end there should
be a st_mysql_plugin struct for each plugin to be declared. be a st_mysql_plugin struct for each plugin to be declared.
*/ */
#ifndef MYSQL_DYNAMIC_PLUGIN #ifndef MYSQL_DYNAMIC_PLUGIN
#define __MYSQL_DECLARE_PLUGIN(NAME, VERSION, PSIZE, DECLS) \ #define __MYSQL_DECLARE_PLUGIN(NAME, VERSION, PSIZE, DECLS) \
MYSQL_PLUGIN_EXPORT int VERSION= MYSQL_PLUGIN_INTERFACE_VERSION; int VERSION= MYSQL_PLUGIN_INTERFACE_VERSION;
\ \
MYSQL_PLUGIN_EXPORT int PSIZE= sizeof(struct st_mysql_plugin); int PSIZE= sizeof(struct st_mysql_plugin);
\ \
MYSQL_PLUGIN_EXPORT struct st_mysql_plugin DECLS[]= { struct st_mysql_plugin DECLS[]= {
#else #else
#define __MYSQL_DECLARE_PLUGIN(NAME, VERSION, PSIZE, DECLS) \ #define __MYSQL_DECLARE_PLUGIN(NAME, VERSION, PSIZE, DECLS) \
MYSQL_PLUGIN_EXPORT int _mysql_plugin_interface_version_= MYSQL_PLUGIN_INTE RFACE_VERSION; \ MYSQL_PLUGIN_EXPORT int _mysql_plugin_interface_version_= MYSQL_PLUGIN_INTE RFACE_VERSION; \
MYSQL_PLUGIN_EXPORT int _mysql_sizeof_struct_st_plugin_= sizeof(struct st_m ysql_plugin); \ MYSQL_PLUGIN_EXPORT int _mysql_sizeof_struct_st_plugin_= sizeof(struct st_m ysql_plugin); \
MYSQL_PLUGIN_EXPORT struct st_mysql_plugin _mysql_plugin_declarations_[]= { MYSQL_PLUGIN_EXPORT struct st_mysql_plugin _mysql_plugin_declarations_[]= {
#endif #endif
#define mysql_declare_plugin(NAME) \ #define mysql_declare_plugin(NAME) \
__MYSQL_DECLARE_PLUGIN(NAME, \ __MYSQL_DECLARE_PLUGIN(NAME, \
builtin_ ## NAME ## _plugin_interface_version, \ builtin_ ## NAME ## _plugin_interface_version, \
skipping to change at line 130 skipping to change at line 128
#define mysql_declare_plugin_end ,{0,0,0,0,0,0,0,0,0,0,0,0}} #define mysql_declare_plugin_end ,{0,0,0,0,0,0,0,0,0,0,0,0}}
/* /*
declarations for SHOW STATUS support in plugins declarations for SHOW STATUS support in plugins
*/ */
enum enum_mysql_show_type enum enum_mysql_show_type
{ {
SHOW_UNDEF, SHOW_BOOL, SHOW_INT, SHOW_LONG, SHOW_UNDEF, SHOW_BOOL, SHOW_INT, SHOW_LONG,
SHOW_LONGLONG, SHOW_CHAR, SHOW_CHAR_PTR, SHOW_LONGLONG, SHOW_CHAR, SHOW_CHAR_PTR,
SHOW_ARRAY, SHOW_FUNC, SHOW_DOUBLE, SHOW_ARRAY, SHOW_FUNC, SHOW_DOUBLE
SHOW_always_last
}; };
struct st_mysql_show_var { struct st_mysql_show_var {
const char *name; const char *name;
char *value; char *value;
enum enum_mysql_show_type type; enum enum_mysql_show_type type;
}; };
#define SHOW_VAR_FUNC_BUFF_SIZE 1024 #define SHOW_VAR_FUNC_BUFF_SIZE 1024
typedef int (*mysql_show_var_func)(MYSQL_THD, struct st_mysql_show_var*, ch ar *); typedef int (*mysql_show_var_func)(MYSQL_THD, struct st_mysql_show_var*, ch ar *);
skipping to change at line 400 skipping to change at line 397
/* /*
Plugin description structure. Plugin description structure.
*/ */
struct st_mysql_plugin struct st_mysql_plugin
{ {
int type; /* the plugin type (a MYSQL_XXX_PLUGIN value) */ int type; /* the plugin type (a MYSQL_XXX_PLUGIN value) */
void *info; /* pointer to type-specific plugin descriptor */ void *info; /* pointer to type-specific plugin descriptor */
const char *name; /* plugin name */ const char *name; /* plugin name */
const char *author; /* plugin author (for I_S.PLUGINS) */ const char *author; /* plugin author (for SHOW PLUGINS) */
const char *descr; /* general descriptive text (for I_S.PLUGINS) */ const char *descr; /* general descriptive text (for SHOW PLUGINS ) */
int license; /* the plugin license (PLUGIN_LICENSE_XXX) */ int license; /* the plugin license (PLUGIN_LICENSE_XXX) */
int (*init)(void *); /* the function to invoke when plugin is loaded */ int (*init)(void *); /* the function to invoke when plugin is loaded */
int (*deinit)(void *);/* the function to invoke when plugin is unloaded * / int (*deinit)(void *);/* the function to invoke when plugin is unloaded * /
unsigned int version; /* plugin version (for I_S.PLUGINS) */ unsigned int version; /* plugin version (for SHOW PLUGINS) */
struct st_mysql_show_var *status_vars; struct st_mysql_show_var *status_vars;
struct st_mysql_sys_var **system_vars; struct st_mysql_sys_var **system_vars;
void * __reserved1; /* reserved for dependency checking */ void * __reserved1; /* reserved for dependency checking */
}; };
/************************************************************************* /*************************************************************************
API for Full-text parser plugin. (MYSQL_FTPARSER_PLUGIN) API for Full-text parser plugin. (MYSQL_FTPARSER_PLUGIN)
*/ */
#include "plugin_ftparser.h" #include "plugin_ftparser.h"
skipping to change at line 470 skipping to change at line 467
st_mysql_plugin. st_mysql_plugin.
*/ */
struct st_mysql_storage_engine struct st_mysql_storage_engine
{ {
int interface_version; int interface_version;
}; };
struct handlerton; struct handlerton;
/* /*************************************************************************
API for Replication plugin. (MYSQL_REPLICATION_PLUGIN) API for Replication plugin. (MYSQL_REPLICATION_PLUGIN)
*/ */
#define MYSQL_REPLICATION_INTERFACE_VERSION 0x0100 #define MYSQL_REPLICATION_INTERFACE_VERSION 0x0100
/** /**
Replication plugin descriptor Replication plugin descriptor
*/ */
struct Mysql_replication { struct Mysql_replication {
int interface_version; int interface_version;
}; };
/************************************************************************* /*************************************************************************
st_mysql_value struct for reading values from mysqld. st_mysql_value struct for reading values from mysqld.
Used by server variables framework to parse user-provided values. Used by server variables framework to parse user-provided values.
Will be used for arguments when implementing UDFs. Will be used for arguments when implementing UDFs.
Note that val_str() returns a string in temporary memory Note that val_str() returns a string in temporary memory
that will be freed at the end of statement. Copy the string that will be freed at the end of statement. Copy the string
if you need it to persist. if you need it to persist.
*/ */
skipping to change at line 502 skipping to change at line 499
#define MYSQL_VALUE_TYPE_STRING 0 #define MYSQL_VALUE_TYPE_STRING 0
#define MYSQL_VALUE_TYPE_REAL 1 #define MYSQL_VALUE_TYPE_REAL 1
#define MYSQL_VALUE_TYPE_INT 2 #define MYSQL_VALUE_TYPE_INT 2
struct st_mysql_value struct st_mysql_value
{ {
int (*value_type)(struct st_mysql_value *); int (*value_type)(struct st_mysql_value *);
const char *(*val_str)(struct st_mysql_value *, char *buffer, int *length ); const char *(*val_str)(struct st_mysql_value *, char *buffer, int *length );
int (*val_real)(struct st_mysql_value *, double *realbuf); int (*val_real)(struct st_mysql_value *, double *realbuf);
int (*val_int)(struct st_mysql_value *, long long *intbuf); int (*val_int)(struct st_mysql_value *, long long *intbuf);
int (*is_unsigned)(struct st_mysql_value *);
}; };
/************************************************************************* /*************************************************************************
Miscellaneous functions for plugin implementors Miscellaneous functions for plugin implementors
*/ */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
int thd_in_lock_tables(const MYSQL_THD thd); int thd_in_lock_tables(const MYSQL_THD thd);
int thd_tablespace_op(const MYSQL_THD thd); int thd_tablespace_op(const MYSQL_THD thd);
long long thd_test_options(const MYSQL_THD thd, long long test_options); long long thd_test_options(const MYSQL_THD thd, long long test_options);
int thd_sql_command(const MYSQL_THD thd); int thd_sql_command(const MYSQL_THD thd);
const char *thd_proc_info(MYSQL_THD thd, const char *info);
void **thd_ha_data(const MYSQL_THD thd, const struct handlerton *hton); void **thd_ha_data(const MYSQL_THD thd, const struct handlerton *hton);
int thd_tx_isolation(const MYSQL_THD thd); int thd_tx_isolation(const MYSQL_THD thd);
char *thd_security_context(MYSQL_THD thd, char *buffer, unsigned int length , char *thd_security_context(MYSQL_THD thd, char *buffer, unsigned int length ,
unsigned int max_query_len); unsigned int max_query_len);
/* Increments the row counter, see THD::row_count */ /* Increments the row counter, see THD::row_count */
void thd_inc_row_count(MYSQL_THD thd); void thd_inc_row_count(MYSQL_THD thd);
#define thd_proc_info(thd, msg) set_thd_proc_info(thd, msg, __func__, __FI
LE__, __LINE__)
const char *set_thd_proc_info(MYSQL_THD, const char * info, const char *fun
c,
const char *file, const unsigned int line);
/** /**
Create a temporary file. Create a temporary file.
@details @details
The temporary file is created in a location specified by the mysql The temporary file is created in a location specified by the mysql
server configuration (--tmpdir option). The caller does not need to server configuration (--tmpdir option). The caller does not need to
delete the file, it will be deleted automatically. delete the file, it will be deleted automatically.
@param prefix prefix for temporary file name @param prefix prefix for temporary file name
@retval -1 error @retval -1 error
skipping to change at line 564 skipping to change at line 563
/** /**
Return the thread id of a user thread Return the thread id of a user thread
@param thd user thread connection handle @param thd user thread connection handle
@return thread id @return thread id
*/ */
unsigned long thd_get_thread_id(const MYSQL_THD thd); unsigned long thd_get_thread_id(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 Get the XID for this connection's transaction
@param thd user thread connection handle @param thd user thread connection handle
@param xid location where identifier is stored @param xid location where identifier is stored
*/ */
void thd_get_xid(const MYSQL_THD thd, MYSQL_XID *xid); void thd_get_xid(const MYSQL_THD thd, MYSQL_XID *xid);
/** /**
Invalidate the query cache for a given table. Invalidate the query cache for a given table.
@param thd user thread connection handle @param thd user thread connection handle
@param key databasename\\0tablename\\0 @param key databasename\\0tablename\\0
@param key_length length of key in bytes, including the NUL bytes @param key_length length of key in bytes, including the NUL bytes
@param using_trx flag: TRUE if using transactions, FALSE otherwise @param using_trx flag: TRUE if using transactions, FALSE otherwise
*/ */
void mysql_query_cache_invalidate4(MYSQL_THD thd, void mysql_query_cache_invalidate4(MYSQL_THD thd,
const char *key, unsigned int key_length , const char *key, unsigned int key_length ,
int using_trx); int using_trx);
/** /**
Provide a handler data getter to simplify coding Get the value of user variable as an integer.
This function will return the value of variable @a name as an
integer. If the original value of the variable is not an integer,
the value will be converted into an integer.
@param name user variable name
@param value pointer to return the value
@param null_value if not NULL, the function will set it to true if
the value of variable is null, set to false if not
@retval 0 Success
@retval 1 Variable not found
*/ */
void *thd_get_ha_data(const MYSQL_THD thd, const struct handlerton *hton); int get_user_var_int(const char *name,
long long int *value, int *null_value);
/** /**
Provide a handler data setter to simplify coding Get the value of user variable as a double precision float number.
@details This function will return the value of variable @a name as real
Set ha_data pointer (storage engine per-connection information). number. If the original value of the variable is not a real number,
the value will be converted into a real number.
@param name user variable name
@param value pointer to return the value
@param null_value if not NULL, the function will set it to true if
the value of variable is null, set to false if not
To avoid unclean deactivation (uninstall) of storage engine plugin @retval 0 Success
in the middle of transaction, additional storage engine plugin @retval 1 Variable not found
lock is acquired. */
int get_user_var_real(const char *name,
double *value, int *null_value);
If ha_data is not null and storage engine plugin was not locked /**
by thd_set_ha_data() in this connection before, storage engine Get the value of user variable as a string.
plugin gets locked.
If ha_data is null and storage engine plugin was locked by This function will return the value of variable @a name as
thd_set_ha_data() in this connection before, storage engine string. If the original value of the variable is not a string,
plugin lock gets released. the value will be converted into a string.
@param name user variable name
@param value pointer to the value buffer
@param len length of the value buffer
@param precision precision of the value if it is a float number
@param null_value if not NULL, the function will set it to true if
the value of variable is null, set to false if not
@retval 0 Success
@retval 1 Variable not found
*/
int get_user_var_str(const char *name,
char *value, unsigned long len,
unsigned int precision, int *null_value);
#ifdef __cplusplus
}
#endif
If handlerton::close_connection() didn't reset ha_data, server does
it immediately after calling handlerton::close_connection().
*/
void thd_set_ha_data(MYSQL_THD thd, const struct handlerton *hton,
const void *ha_data);
#ifdef __cplusplus #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
#endif #endif
 End of changes. 25 change blocks. 
61 lines changed or deleted 163 lines changed or added


 plugin_audit.h   plugin_audit.h 
skipping to change at line 27 skipping to change at line 27
#define _my_audit_h #define _my_audit_h
/************************************************************************* /*************************************************************************
API for Audit plugin. (MYSQL_AUDIT_PLUGIN) API for Audit plugin. (MYSQL_AUDIT_PLUGIN)
*/ */
#include "plugin.h" #include "plugin.h"
#define MYSQL_AUDIT_CLASS_MASK_SIZE 1 #define MYSQL_AUDIT_CLASS_MASK_SIZE 1
#define MYSQL_AUDIT_INTERFACE_VERSION 0x0200 #define MYSQL_AUDIT_INTERFACE_VERSION 0x0100
/* /*
The first word in every event class struct indicates the specific The first word in every event class struct indicates the specific
class of the event. class of the event.
*/ */
struct mysql_event struct mysql_event
{ {
unsigned int event_class; int event_class;
}; };
/************************************************************************* /*************************************************************************
AUDIT CLASS : GENERAL AUDIT CLASS : GENERAL
LOG events occurs before emitting to the general query log. LOG events occurs before emitting to the general query log.
ERROR events occur before transmitting errors to the user. ERROR events occur before transmitting errors to the user.
RESULT events occur after transmitting a resultset to the user. RESULT events occur after transmitting a resultset to the user.
*/ */
#define MYSQL_AUDIT_GENERAL_CLASS 0 #define MYSQL_AUDIT_GENERAL_CLASS 0
#define MYSQL_AUDIT_GENERAL_CLASSMASK (1 << MYSQL_AUDIT_GENERAL_CLASS) #define MYSQL_AUDIT_GENERAL_CLASSMASK (1 << MYSQL_AUDIT_GENERAL_CLASS)
#define MYSQL_AUDIT_GENERAL_LOG 0 #define MYSQL_AUDIT_GENERAL_LOG 0
#define MYSQL_AUDIT_GENERAL_ERROR 1 #define MYSQL_AUDIT_GENERAL_ERROR 1
#define MYSQL_AUDIT_GENERAL_RESULT 2 #define MYSQL_AUDIT_GENERAL_RESULT 2
struct mysql_event_general struct mysql_event_general
{ {
unsigned int event_class; int event_class;
unsigned int event_subclass;
int general_error_code; int general_error_code;
unsigned long general_thread_id; unsigned long general_thread_id;
const char *general_user; const char *general_user;
unsigned int general_user_length; unsigned int general_user_length;
const char *general_command; const char *general_command;
unsigned int general_command_length; unsigned int general_command_length;
const char *general_query; const char *general_query;
unsigned int general_query_length; unsigned int general_query_length;
struct charset_info_st *general_charset; struct charset_info_st *general_charset;
unsigned long long general_time; unsigned long long general_time;
 End of changes. 3 change blocks. 
4 lines changed or deleted 3 lines changed or added


 sql_common.h   sql_common.h 
#ifndef SQL_COMMON_INCLUDED
#define SQL_COMMON_INCLUDED
/* Copyright (C) 2003-2004, 2006 MySQL AB /* Copyright (C) 2003-2004, 2006 MySQL AB
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License. the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
skipping to change at line 52 skipping to change at line 49
void net_clear_error(NET *net); void net_clear_error(NET *net);
void set_stmt_errmsg(MYSQL_STMT *stmt, NET *net); void set_stmt_errmsg(MYSQL_STMT *stmt, NET *net);
void set_stmt_error(MYSQL_STMT *stmt, int errcode, const char *sqlstate, void set_stmt_error(MYSQL_STMT *stmt, int errcode, const char *sqlstate,
const char *err); const char *err);
void set_mysql_error(MYSQL *mysql, int errcode, const char *sqlstate); void set_mysql_error(MYSQL *mysql, int errcode, const char *sqlstate);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#define protocol_41(A) ((A)->server_capabilities & CLIENT_PROTOCOL_41) #define protocol_41(A) ((A)->server_capabilities & CLIENT_PROTOCOL_41)
#endif /* SQL_COMMON_INCLUDED */
 End of changes. 2 change blocks. 
3 lines changed or deleted 0 lines changed or added


 sql_state.h   sql_state.h 
skipping to change at line 211 skipping to change at line 211
{ ER_MAX_PREPARED_STMT_COUNT_REACHED ,"42000", "" }, { ER_MAX_PREPARED_STMT_COUNT_REACHED ,"42000", "" },
{ ER_NON_GROUPING_FIELD_USED ,"42000", "" }, { ER_NON_GROUPING_FIELD_USED ,"42000", "" },
{ ER_FOREIGN_DUPLICATE_KEY ,"23000", "S1009" }, { ER_FOREIGN_DUPLICATE_KEY ,"23000", "S1009" },
{ ER_CANT_CHANGE_TX_ISOLATION ,"25001", "" }, { ER_CANT_CHANGE_TX_ISOLATION ,"25001", "" },
{ ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT ,"42000", "" }, { ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT ,"42000", "" },
{ ER_WRONG_PARAMETERS_TO_NATIVE_FCT ,"42000", "" }, { ER_WRONG_PARAMETERS_TO_NATIVE_FCT ,"42000", "" },
{ ER_WRONG_PARAMETERS_TO_STORED_FCT ,"42000", "" }, { ER_WRONG_PARAMETERS_TO_STORED_FCT ,"42000", "" },
{ ER_DUP_ENTRY_WITH_KEY_NAME ,"23000", "S1009" }, { ER_DUP_ENTRY_WITH_KEY_NAME ,"23000", "S1009" },
{ ER_XA_RBTIMEOUT ,"XA106", "" }, { ER_XA_RBTIMEOUT ,"XA106", "" },
{ ER_XA_RBDEADLOCK ,"XA102", "" }, { ER_XA_RBDEADLOCK ,"XA102", "" },
{ ER_FUNC_INEXISTENT_NAME_COLLISION ,"42000", "" }, { ER_NONUNIQ_DB ,"42000", "S1009" },
{ ER_DUP_SIGNAL_SET ,"42000", "" }, { ER_DUP_SIGNAL_SET ,"42000", "" },
{ ER_SIGNAL_WARN ,"01000", "" }, { ER_SIGNAL_WARN ,"01000", "" },
{ ER_SIGNAL_NOT_FOUND ,"02000", "" }, { ER_SIGNAL_NOT_FOUND ,"02000", "" },
{ ER_SIGNAL_EXCEPTION ,"HY000", "" }, { ER_SIGNAL_EXCEPTION ,"HY000", "" },
{ ER_RESIGNAL_WITHOUT_ACTIVE_HANDLER ,"0K000", "" }, { ER_RESIGNAL_WITHOUT_ACTIVE_HANDLER ,"0K000", "" },
{ ER_SPATIAL_MUST_HAVE_GEOM_COL ,"42000", "" },
{ ER_DATA_OUT_OF_RANGE ,"22003", "" },
 End of changes. 2 change blocks. 
1 lines changed or deleted 1 lines changed or added


 sslopt-case.h   sslopt-case.h 
#ifndef SSLOPT_CASE_INCLUDED
#define SSLOPT_CASE_INCLUDED
/* Copyright (C) 2000 MySQL AB /* Copyright (C) 2000 MySQL AB
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License. the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
skipping to change at line 32 skipping to change at line 29
case OPT_SSL_CA: case OPT_SSL_CA:
case OPT_SSL_CAPATH: case OPT_SSL_CAPATH:
case OPT_SSL_CIPHER: case OPT_SSL_CIPHER:
/* /*
Enable use of SSL if we are using any ssl option Enable use of SSL if we are using any ssl option
One can disable SSL later by using --skip-ssl or --ssl=0 One can disable SSL later by using --skip-ssl or --ssl=0
*/ */
opt_use_ssl= 1; opt_use_ssl= 1;
break; break;
#endif #endif
#endif /* SSLOPT_CASE_INCLUDED */
 End of changes. 2 change blocks. 
3 lines changed or deleted 0 lines changed or added


 sslopt-longopts.h   sslopt-longopts.h 
#ifndef SSLOPT_LONGOPTS_INCLUDED
#define SSLOPT_LONGOPTS_INCLUDED
/* Copyright (C) 2000 MySQL AB /* Copyright (C) 2000 MySQL AB
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License. the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A */ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A */
#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY) #if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
{"ssl", OPT_SSL_SSL, {"ssl", OPT_SSL_SSL,
"Enable SSL for connection (automatically enabled with other flags).", "Enable SSL for connection (automatically enabled with other flags). Dis
&opt_use_ssl, &opt_use_ssl, 0, GET_BOOL, OPT_ARG, 0, 0, 0, 0, 0, 0}, able with --skip-ssl.",
(uchar **) &opt_use_ssl, (uchar **) &opt_use_ssl, 0, GET_BOOL, NO_ARG, 0,
0, 0,
0, 0, 0},
{"ssl-ca", OPT_SSL_CA, {"ssl-ca", OPT_SSL_CA,
"CA file in PEM format (check OpenSSL docs, implies --ssl).", "CA file in PEM format (check OpenSSL docs, implies --ssl).",
&opt_ssl_ca, &opt_ssl_ca, 0, GET_STR, REQUIRED_ARG, (uchar **) &opt_ssl_ca, (uchar **) &opt_ssl_ca, 0, GET_STR, REQUIRED_ARG ,
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
{"ssl-capath", OPT_SSL_CAPATH, {"ssl-capath", OPT_SSL_CAPATH,
"CA directory (check OpenSSL docs, implies --ssl).", "CA directory (check OpenSSL docs, implies --ssl).",
&opt_ssl_capath, &opt_ssl_capath, 0, GET_STR, REQUIRED_ARG, (uchar **) &opt_ssl_capath, (uchar **) &opt_ssl_capath, 0, GET_STR, REQU IRED_ARG,
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
{"ssl-cert", OPT_SSL_CERT, "X509 cert in PEM format (implies --ssl).", {"ssl-cert", OPT_SSL_CERT, "X509 cert in PEM format (implies --ssl).",
&opt_ssl_cert, &opt_ssl_cert, 0, GET_STR, REQUIRED_ARG, (uchar **) &opt_ssl_cert, (uchar **) &opt_ssl_cert, 0, GET_STR, REQUIRED _ARG,
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
{"ssl-cipher", OPT_SSL_CIPHER, "SSL cipher to use (implies --ssl).", {"ssl-cipher", OPT_SSL_CIPHER, "SSL cipher to use (implies --ssl).",
&opt_ssl_cipher, &opt_ssl_cipher, 0, GET_STR, REQUIRED_ARG, (uchar **) &opt_ssl_cipher, (uchar **) &opt_ssl_cipher, 0, GET_STR, REQU IRED_ARG,
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
{"ssl-key", OPT_SSL_KEY, "X509 key in PEM format (implies --ssl).", {"ssl-key", OPT_SSL_KEY, "X509 key in PEM format (implies --ssl).",
&opt_ssl_key, &opt_ssl_key, 0, GET_STR, REQUIRED_ARG, (uchar **) &opt_ssl_key, (uchar **) &opt_ssl_key, 0, GET_STR, REQUIRED_A RG,
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
#ifdef MYSQL_CLIENT #ifdef MYSQL_CLIENT
{"ssl-verify-server-cert", OPT_SSL_VERIFY_SERVER_CERT, {"ssl-verify-server-cert", OPT_SSL_VERIFY_SERVER_CERT,
"Verify server's \"Common Name\" in its cert against hostname used " "Verify server's \"Common Name\" in its cert against hostname used when
"when connecting. This option is disabled by default.", connecting. This option is disabled by default.",
&opt_ssl_verify_server_cert, &opt_ssl_verify_server_cert, (uchar **) &opt_ssl_verify_server_cert, (uchar **) &opt_ssl_verify_serve
0, GET_BOOL, OPT_ARG, 0, 0, 0, 0, 0, 0}, r_cert,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
#endif #endif
#endif /* HAVE_OPENSSL */ #endif /* HAVE_OPENSSL */
#endif /* SSLOPT_LONGOPTS_INCLUDED */
 End of changes. 9 change blocks. 
14 lines changed or deleted 15 lines changed or added


 sslopt-vars.h   sslopt-vars.h 
#ifndef SSLOPT_VARS_INCLUDED
#define SSLOPT_VARS_INCLUDED
/* Copyright (C) 2000 MySQL AB /* Copyright (C) 2000 MySQL AB
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License. the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
skipping to change at line 35 skipping to change at line 32
SSL_STATIC my_bool opt_use_ssl = 0; SSL_STATIC my_bool opt_use_ssl = 0;
SSL_STATIC char *opt_ssl_ca = 0; SSL_STATIC char *opt_ssl_ca = 0;
SSL_STATIC char *opt_ssl_capath = 0; SSL_STATIC char *opt_ssl_capath = 0;
SSL_STATIC char *opt_ssl_cert = 0; SSL_STATIC char *opt_ssl_cert = 0;
SSL_STATIC char *opt_ssl_cipher = 0; SSL_STATIC char *opt_ssl_cipher = 0;
SSL_STATIC char *opt_ssl_key = 0; SSL_STATIC char *opt_ssl_key = 0;
#ifdef MYSQL_CLIENT #ifdef MYSQL_CLIENT
SSL_STATIC my_bool opt_ssl_verify_server_cert= 0; SSL_STATIC my_bool opt_ssl_verify_server_cert= 0;
#endif #endif
#endif #endif
#endif /* SSLOPT_VARS_INCLUDED */
 End of changes. 2 change blocks. 
3 lines changed or deleted 0 lines changed or added


 typelib.h   typelib.h 
skipping to change at line 38 skipping to change at line 38
extern my_ulonglong find_typeset(char *x, TYPELIB *typelib,int *error_posit ion); extern my_ulonglong find_typeset(char *x, TYPELIB *typelib,int *error_posit ion);
extern int find_type_or_exit(const char *x, TYPELIB *typelib, extern int find_type_or_exit(const char *x, TYPELIB *typelib,
const char *option); const char *option);
extern int find_type(char *x, const TYPELIB *typelib, unsigned int full_nam e); extern int find_type(char *x, const TYPELIB *typelib, unsigned int full_nam e);
extern void make_type(char *to,unsigned int nr,TYPELIB *typelib); extern void make_type(char *to,unsigned int nr,TYPELIB *typelib);
extern const char *get_type(TYPELIB *typelib,unsigned int nr); extern const char *get_type(TYPELIB *typelib,unsigned int nr);
extern TYPELIB *copy_typelib(MEM_ROOT *root, TYPELIB *from); extern TYPELIB *copy_typelib(MEM_ROOT *root, TYPELIB *from);
extern TYPELIB sql_protocol_typelib; extern TYPELIB sql_protocol_typelib;
my_ulonglong find_set_from_flags(const TYPELIB *lib, unsigned int default_n
ame,
my_ulonglong cur_set, my_ulonglong default_se
t,
const char *str, unsigned int length,
char **err_pos, unsigned int *err_len);
#endif /* _typelib_h */ #endif /* _typelib_h */
 End of changes. 1 change blocks. 
7 lines changed or deleted 0 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/