| m_ctype.h | | m_ctype.h | |
| | | | |
| skipping to change at line 51 | | skipping to change at line 51 | |
| typedef struct unicase_info_st | | typedef struct unicase_info_st | |
| { | | { | |
| uint16 toupper; | | uint16 toupper; | |
| uint16 tolower; | | uint16 tolower; | |
| uint16 sort; | | uint16 sort; | |
| } MY_UNICASE_INFO; | | } MY_UNICASE_INFO; | |
| | | | |
| extern MY_UNICASE_INFO *my_unicase_default[256]; | | extern MY_UNICASE_INFO *my_unicase_default[256]; | |
| extern MY_UNICASE_INFO *my_unicase_turkish[256]; | | extern MY_UNICASE_INFO *my_unicase_turkish[256]; | |
| | | | |
|
| | | typedef struct uni_ctype_st | |
| | | { | |
| | | uchar pctype; | |
| | | uchar *ctype; | |
| | | } MY_UNI_CTYPE; | |
| | | | |
| | | extern MY_UNI_CTYPE my_uni_ctype[256]; | |
| | | | |
| /* wm_wc and wc_mb return codes */ | | /* wm_wc and wc_mb return codes */ | |
| #define MY_CS_ILSEQ 0 /* Wrong by sequence: wb_wc
*/ | | #define MY_CS_ILSEQ 0 /* Wrong by sequence: wb_wc
*/ | |
| #define MY_CS_ILUNI 0 /* Cannot encode Unicode to charset: wc_mb
*/ | | #define MY_CS_ILUNI 0 /* Cannot encode Unicode to charset: wc_mb
*/ | |
| #define MY_CS_TOOSMALL -101 /* Need at least one byte: wc_mb and mb_wc
*/ | | #define MY_CS_TOOSMALL -101 /* Need at least one byte: wc_mb and mb_wc
*/ | |
| #define MY_CS_TOOSMALL2 -102 /* Need at least two bytes: wc_mb and mb_wc
*/ | | #define MY_CS_TOOSMALL2 -102 /* Need at least two bytes: wc_mb and mb_wc
*/ | |
| #define MY_CS_TOOSMALL3 -103 /* Need at least three bytes: wc_mb and mb_wc
*/ | | #define MY_CS_TOOSMALL3 -103 /* Need at least three bytes: wc_mb and mb_wc
*/ | |
| /* These following three are currently not really used */ | | /* These following three are currently not really used */ | |
| #define MY_CS_TOOSMALL4 -104 /* Need at least 4 bytes: wc_mb and mb_wc */ | | #define MY_CS_TOOSMALL4 -104 /* Need at least 4 bytes: wc_mb and mb_wc */ | |
| #define MY_CS_TOOSMALL5 -105 /* Need at least 5 bytes: wc_mb and mb_wc */ | | #define MY_CS_TOOSMALL5 -105 /* Need at least 5 bytes: wc_mb and mb_wc */ | |
| #define MY_CS_TOOSMALL6 -106 /* Need at least 6 bytes: wc_mb and mb_wc */ | | #define MY_CS_TOOSMALL6 -106 /* Need at least 6 bytes: wc_mb and mb_wc */ | |
| | | | |
| skipping to change at line 79 | | skipping to change at line 87 | |
| #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 full 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_PUREASCII 2048 /* if a charset is pure ascii */ | | #define MY_CS_HIDDEN 2048 /* don't display in SHOW */ | |
| | | #define MY_CS_PUREASCII 4096 /* if a charset is pure ascii */ | |
| #define MY_CHARSET_UNDEFINED 0 | | #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
*/ | |
| | | | |
| typedef struct my_uni_idx_st | | typedef struct my_uni_idx_st | |
| { | | { | |
| uint16 from; | | uint16 from; | |
| | | | |
| skipping to change at line 122 | | skipping to change at line 131 | |
| 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)(uint)); | | my_bool (*init)(struct charset_info_st *, void *(*alloc)(size_t)); | |
| /* Collation routines */ | | /* Collation routines */ | |
| int (*strnncoll)(struct charset_info_st *, | | int (*strnncoll)(struct charset_info_st *, | |
|
| const uchar *, uint, const uchar *, uint, 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 *, uint, const uchar *, uint, | | const uchar *, size_t, const uchar *, size_t, | |
| my_bool diff_if_only_endspace_difference); | | my_bool diff_if_only_endspace_difference); | |
|
| int (*strnxfrm)(struct charset_info_st *, | | size_t (*strnxfrm)(struct charset_info_st *, | |
| uchar *, uint, const uchar *, uint); | | uchar *, size_t, const uchar *, size_t); | |
| uint (*strnxfrmlen)(struct charset_info_st *, uint); | | size_t (*strnxfrmlen)(struct charset_info_st *, size_t); | |
| my_bool (*like_range)(struct charset_info_st *, | | my_bool (*like_range)(struct charset_info_st *, | |
|
| const char *s, uint s_length, | | const char *s, size_t s_length, | |
| pchar w_prefix, pchar w_one, pchar w_many, | | pchar w_prefix, pchar w_one, pchar w_many, | |
|
| uint res_length, | | size_t res_length, | |
| char *min_str, char *max_str, | | char *min_str, char *max_str, | |
|
| uint *min_len, uint *max_len); | | size_t *min_len, size_t *max_len); | |
| int (*wildcmp)(struct charset_info_st *, | | int (*wildcmp)(struct charset_info_st *, | |
| 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); | |
| | | | |
| int (*strcasecmp)(struct charset_info_st *, const char *, const char *); | | int (*strcasecmp)(struct charset_info_st *, const char *, const char *); | |
| | | | |
| uint (*instr)(struct charset_info_st *, | | uint (*instr)(struct charset_info_st *, | |
|
| const char *b, uint b_length, | | const char *b, size_t b_length, | |
| const char *s, uint s_length, | | const char *s, size_t s_length, | |
| my_match_t *match, uint nmatch); | | my_match_t *match, uint nmatch); | |
| | | | |
| /* Hash calculation */ | | /* Hash calculation */ | |
|
| void (*hash_sort)(struct charset_info_st *cs, const uchar *key, uint len, | | void (*hash_sort)(struct charset_info_st *cs, const uchar *key, size_t le
n, | |
| ulong *nr1, ulong *nr2); | | ulong *nr1, ulong *nr2); | |
|
| my_bool (*propagate)(struct charset_info_st *cs, const uchar *str, uint l
en); | | my_bool (*propagate)(struct charset_info_st *cs, const uchar *str, size_t
len); | |
| } MY_COLLATION_HANDLER; | | } MY_COLLATION_HANDLER; | |
| | | | |
| extern MY_COLLATION_HANDLER my_collation_mb_bin_handler; | | extern MY_COLLATION_HANDLER my_collation_mb_bin_handler; | |
| extern MY_COLLATION_HANDLER my_collation_8bit_bin_handler; | | extern MY_COLLATION_HANDLER my_collation_8bit_bin_handler; | |
| extern MY_COLLATION_HANDLER my_collation_8bit_simple_ci_handler; | | extern MY_COLLATION_HANDLER my_collation_8bit_simple_ci_handler; | |
| extern MY_COLLATION_HANDLER my_collation_ucs2_uca_handler; | | extern MY_COLLATION_HANDLER my_collation_ucs2_uca_handler; | |
| | | | |
|
| | | /* Some typedef to make it easy for C++ to make function pointers */ | |
| | | typedef int (*my_charset_conv_mb_wc)(struct charset_info_st *, my_wc_t *, | |
| | | const uchar *, const uchar *); | |
| | | typedef int (*my_charset_conv_wc_mb)(struct charset_info_st *, my_wc_t, | |
| | | uchar *, uchar *); | |
| | | typedef size_t (*my_charset_conv_case)(struct charset_info_st *, | |
| | | char *, size_t, char *, size_t); | |
| | | | |
| /* See strings/CHARSET_INFO.txt about information on this structure */ | | /* 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)(uint)); | | my_bool (*init)(struct charset_info_st *, void *(*alloc)(size_t)); | |
| /* Multibyte routines */ | | /* Multibyte routines */ | |
|
| int (*ismbchar)(struct charset_info_st *, const char *, const char *) | | uint (*ismbchar)(struct charset_info_st *, const char *, const char *) | |
| ; | | ; | |
| int (*mbcharlen)(struct charset_info_st *, uint); | | uint (*mbcharlen)(struct charset_info_st *, uint c); | |
| uint (*numchars)(struct charset_info_st *, const char *b, const char * | | size_t (*numchars)(struct charset_info_st *, const char *b, const char * | |
| e); | | e); | |
| uint (*charpos)(struct charset_info_st *, const char *b, const char *e | | size_t (*charpos)(struct charset_info_st *, const char *b, const char *e | |
| , uint pos); | | , | |
| uint (*well_formed_len)(struct charset_info_st *, | | size_t pos); | |
| | | size_t (*well_formed_len)(struct charset_info_st *, | |
| const char *b,const char *e, | | const char *b,const char *e, | |
|
| uint nchars, int *error); | | size_t nchars, int *error); | |
| uint (*lengthsp)(struct charset_info_st *, const char *ptr, uint lengt | | size_t (*lengthsp)(struct charset_info_st *, const char *ptr, size_t len | |
| h); | | gth); | |
| uint (*numcells)(struct charset_info_st *, const char *b, const char * | | size_t (*numcells)(struct charset_info_st *, const char *b, const char * | |
| e); | | e); | |
| | | | |
| /* Unicode convertion */ | | /* Unicode conversion */ | |
| int (*mb_wc)(struct charset_info_st *cs,my_wc_t *wc, | | my_charset_conv_mb_wc mb_wc; | |
| const unsigned char *s,const unsigned char *e); | | my_charset_conv_wc_mb wc_mb; | |
| int (*wc_mb)(struct charset_info_st *cs,my_wc_t wc, | | | |
| unsigned char *s,unsigned char *e); | | /* CTYPE scanner */ | |
| | | int (*ctype)(struct charset_info_st *cs, int *ctype, | |
| /* Functions for case and sort convertion */ | | const uchar *s, const uchar *e); | |
| uint (*caseup_str)(struct charset_info_st *, char *); | | | |
| uint (*casedn_str)(struct charset_info_st *, char *); | | /* Functions for case and sort conversion */ | |
| uint (*caseup)(struct charset_info_st *, char *src, uint srclen, | | size_t (*caseup_str)(struct charset_info_st *, char *); | |
| char *dst, uint dstlen); | | size_t (*casedn_str)(struct charset_info_st *, char *); | |
| uint (*casedn)(struct charset_info_st *, char *src, uint srclen, | | | |
| char *dst, uint dstlen); | | my_charset_conv_case caseup; | |
| | | my_charset_conv_case casedn; | |
| | | | |
| /* Charset dependant snprintf() */ | | /* Charset dependant snprintf() */ | |
|
| int (*snprintf)(struct charset_info_st *, char *to, uint n, const char * | | size_t (*snprintf)(struct charset_info_st *, char *to, size_t n, | |
| fmt, | | const char *fmt, | |
| ...) ATTRIBUTE_FORMAT_FPTR(printf, 4, 5); | | ...) ATTRIBUTE_FORMAT_FPTR(printf, 4, 5); | |
| int (*long10_to_str)(struct charset_info_st *, char *to, uint n, int rad | | size_t (*long10_to_str)(struct charset_info_st *, char *to, size_t n, | |
| ix, | | int radix, long int val); | |
| long int val); | | size_t (*longlong10_to_str)(struct charset_info_st *, char *to, size_t n, | |
| int (*longlong10_to_str)(struct charset_info_st *, char *to, uint n, | | int radix, longlong val); | |
| int radix, longlong val); | | | |
| | | | |
|
| void (*fill)(struct charset_info_st *, char *to, uint len, int fill); | | void (*fill)(struct charset_info_st *, char *to, size_t len, int fill); | |
| | | | |
|
| /* String-to-number convertion routines */ | | /* String-to-number conversion routines */ | |
| long (*strntol)(struct charset_info_st *, const char *s, uint l, | | long (*strntol)(struct charset_info_st *, const char *s, size_t l, | |
| int base, char **e, int *err); | | int base, char **e, int *err); | |
|
| ulong (*strntoul)(struct charset_info_st *, const char *s, uint l, | | ulong (*strntoul)(struct charset_info_st *, const char *s, size_t l, | |
| int base, char **e, int *err); | | int base, char **e, int *err); | |
|
| longlong (*strntoll)(struct charset_info_st *, const char *s, uint l, | | longlong (*strntoll)(struct charset_info_st *, const char *s, size_t l, | |
| int base, char **e, int *err); | | int base, char **e, int *err); | |
|
| ulonglong (*strntoull)(struct charset_info_st *, const char *s, uint l, | | ulonglong (*strntoull)(struct charset_info_st *, const char *s, size_t l, | |
| int base, char **e, int *err); | | int base, char **e, int *err); | |
|
| double (*strntod)(struct charset_info_st *, char *s, uint l, char **
e, | | double (*strntod)(struct charset_info_st *, char *s, size_t l, char
**e, | |
| int *err); | | int *err); | |
| longlong (*strtoll10)(struct charset_info_st *cs, | | longlong (*strtoll10)(struct charset_info_st *cs, | |
| const char *nptr, char **endptr, int *error); | | const char *nptr, char **endptr, int *error); | |
| ulonglong (*strntoull10rnd)(struct charset_info_st *cs, | | ulonglong (*strntoull10rnd)(struct charset_info_st *cs, | |
|
| const char *str, uint length, int unsigned_ | | const char *str, size_t length, | |
| fl, | | int unsigned_fl, | |
| char **endptr, int *error); | | char **endptr, int *error); | |
|
| ulong (*scan)(struct charset_info_st *, const char *b, const char | | size_t (*scan)(struct charset_info_st *, const char *b, const char | |
| *e, | | *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; | |
| | | | |
| /* 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; | |
| | | | |
| skipping to change at line 259 | | skipping to change at line 280 | |
| uint mbmaxlen; | | uint mbmaxlen; | |
| uint16 min_sort_char; | | uint16 min_sort_char; | |
| uint16 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; | |
| | | | |
| 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) | |
| | | | |
|
| extern CHARSET_INFO my_charset_bin; | | extern MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_bin; | |
| 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_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 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 CHARSET_INFO my_charset_latin1; | | 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_utf8_general_ci; | | extern CHARSET_INFO my_charset_utf8_general_ci; | |
| extern CHARSET_INFO my_charset_utf8_unicode_ci; | | extern CHARSET_INFO my_charset_utf8_unicode_ci; | |
| extern CHARSET_INFO my_charset_utf8_bin; | | extern CHARSET_INFO my_charset_utf8_bin; | |
| extern CHARSET_INFO my_charset_cp1250_czech_ci; | | extern CHARSET_INFO my_charset_cp1250_czech_ci; | |
|
| | | extern MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_filename; | |
| | | | |
| /* declarations for simple charsets */ | | /* declarations for simple charsets */ | |
|
| extern int my_strnxfrm_simple(CHARSET_INFO *, uchar *, uint, const uchar * | | extern size_t my_strnxfrm_simple(CHARSET_INFO *, uchar *, size_t, | |
| , | | const uchar *, size_t); | |
| uint); | | size_t my_strnxfrmlen_simple(CHARSET_INFO *, size_t); | |
| uint my_strnxfrmlen_simple(CHARSET_INFO *, uint); | | extern int my_strnncoll_simple(CHARSET_INFO *, const uchar *, size_t, | |
| extern int my_strnncoll_simple(CHARSET_INFO *, const uchar *, uint, | | const uchar *, size_t, my_bool); | |
| const uchar *, uint, my_bool); | | | |
| | | | |
|
| extern int my_strnncollsp_simple(CHARSET_INFO *, const uchar *, uint, | | extern int my_strnncollsp_simple(CHARSET_INFO *, const uchar *, size_t, | |
| const uchar *, uint, | | 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, uint len, | | const uchar *key, size_t len, | |
| ulong *nr1, ulong *nr2); | | ulong *nr1, ulong *nr2); | |
| | | | |
|
| extern uint my_lengthsp_8bit(CHARSET_INFO *cs, const char *ptr, uint length
); | | extern size_t my_lengthsp_8bit(CHARSET_INFO *cs, const char *ptr, size_t le
ngth); | |
| | | | |
| extern uint my_instr_simple(struct charset_info_st *, | | extern uint my_instr_simple(struct charset_info_st *, | |
|
| const char *b, uint b_length, | | const char *b, size_t b_length, | |
| const char *s, uint s_length, | | const char *s, size_t s_length, | |
| my_match_t *match, uint nmatch); | | my_match_t *match, uint nmatch); | |
| | | | |
| /* Functions for 8bit */ | | /* Functions for 8bit */ | |
|
| extern uint my_caseup_str_8bit(CHARSET_INFO *, char *); | | extern size_t my_caseup_str_8bit(CHARSET_INFO *, char *); | |
| extern uint my_casedn_str_8bit(CHARSET_INFO *, char *); | | extern size_t my_casedn_str_8bit(CHARSET_INFO *, char *); | |
| extern uint my_caseup_8bit(CHARSET_INFO *, char *src, uint srclen, | | extern size_t my_caseup_8bit(CHARSET_INFO *, char *src, size_t srclen, | |
| char *dst, uint dstlen); | | char *dst, size_t dstlen); | |
| extern uint my_casedn_8bit(CHARSET_INFO *, char *src, uint srclen, | | extern size_t my_casedn_8bit(CHARSET_INFO *, char *src, size_t srclen, | |
| char *dst, uint dstlen); | | char *dst, size_t dstlen); | |
| | | | |
| extern int my_strcasecmp_8bit(CHARSET_INFO * cs, const char *, const char *
); | | extern int my_strcasecmp_8bit(CHARSET_INFO * cs, const char *, const char *
); | |
| | | | |
| int my_mb_wc_8bit(CHARSET_INFO *cs,my_wc_t *wc, const uchar *s,const uchar
*e); | | int my_mb_wc_8bit(CHARSET_INFO *cs,my_wc_t *wc, const uchar *s,const uchar
*e); | |
| int my_wc_mb_8bit(CHARSET_INFO *cs,my_wc_t wc, uchar *s, uchar *e); | | int my_wc_mb_8bit(CHARSET_INFO *cs,my_wc_t wc, uchar *s, uchar *e); | |
| | | | |
|
| ulong my_scan_8bit(CHARSET_INFO *cs, const char *b, const char *e, int sq); | | int my_mb_ctype_8bit(CHARSET_INFO *,int *, const uchar *,const uchar *); | |
| | | int my_mb_ctype_mb(CHARSET_INFO *,int *, const uchar *,const uchar *); | |
| | | | |
| | | size_t my_scan_8bit(CHARSET_INFO *cs, const char *b, const char *e, int sq) | |
| | | ; | |
| | | | |
|
| int my_snprintf_8bit(struct charset_info_st *, char *to, uint n, | | size_t my_snprintf_8bit(struct charset_info_st *, char *to, size_t n, | |
| const char *fmt, ...) | | const char *fmt, ...) | |
| ATTRIBUTE_FORMAT(printf, 4, 5); | | ATTRIBUTE_FORMAT(printf, 4, 5); | |
| | | | |
|
| long my_strntol_8bit(CHARSET_INFO *, const char *s, uint l, int base | | long my_strntol_8bit(CHARSET_INFO *, const char *s, size_t l, int bas | |
| , | | e, | |
| char **e, int *err); | | char **e, int *err); | |
| ulong my_strntoul_8bit(CHARSET_INFO *, const char *s, uint l, int base | | ulong my_strntoul_8bit(CHARSET_INFO *, const char *s, size_t l, int ba | |
| , | | se, | |
| char **e, int *err); | | char **e, int *err); | |
|
| longlong my_strntoll_8bit(CHARSET_INFO *, const char *s, uint l, int base
, | | longlong my_strntoll_8bit(CHARSET_INFO *, const char *s, size_t l, int ba
se, | |
| char **e, int *err); | | char **e, int *err); | |
|
| ulonglong my_strntoull_8bit(CHARSET_INFO *, const char *s, uint l, int base
, | | ulonglong my_strntoull_8bit(CHARSET_INFO *, const char *s, size_t l, int ba
se, | |
| char **e, int *err); | | char **e, int *err); | |
|
| double my_strntod_8bit(CHARSET_INFO *, char *s, uint l,char **e, | | double my_strntod_8bit(CHARSET_INFO *, char *s, size_t l,char **e, | |
| int *err); | | int *err); | |
|
| int my_long10_to_str_8bit(CHARSET_INFO *, char *to, uint l, int radix, | | size_t my_long10_to_str_8bit(CHARSET_INFO *, char *to, size_t l, int radix, | |
| long int val); | | long int val); | |
| int my_longlong10_to_str_8bit(CHARSET_INFO *, char *to, uint l, int radix, | | size_t my_longlong10_to_str_8bit(CHARSET_INFO *, char *to, size_t l, int ra | |
| longlong val); | | dix, | |
| | | longlong val); | |
| | | | |
| longlong my_strtoll10_8bit(CHARSET_INFO *cs, | | longlong my_strtoll10_8bit(CHARSET_INFO *cs, | |
| const char *nptr, char **endptr, int *error); | | const char *nptr, char **endptr, int *error); | |
| longlong my_strtoll10_ucs2(CHARSET_INFO *cs, | | longlong my_strtoll10_ucs2(CHARSET_INFO *cs, | |
| const char *nptr, char **endptr, int *error); | | const char *nptr, char **endptr, int *error); | |
| | | | |
| ulonglong my_strntoull10rnd_8bit(CHARSET_INFO *cs, | | ulonglong my_strntoull10rnd_8bit(CHARSET_INFO *cs, | |
|
| const char *str, uint length, int unsigned | | const char *str, size_t length, int | |
| _fl, | | unsigned_fl, char **endptr, int *error); | |
| char **endptr, int *error); | | | |
| ulonglong my_strntoull10rnd_ucs2(CHARSET_INFO *cs, | | ulonglong my_strntoull10rnd_ucs2(CHARSET_INFO *cs, | |
|
| const char *str, uint length, int unsigned | | const char *str, size_t length, | |
| _fl, | | int unsigned_fl, char **endptr, int *error | |
| char **endptr, int *error); | | ); | |
| | | | |
|
| void my_fill_8bit(CHARSET_INFO *cs, char* to, uint l, int fill); | | void my_fill_8bit(CHARSET_INFO *cs, char* to, size_t l, int fill); | |
| | | | |
| my_bool my_like_range_simple(CHARSET_INFO *cs, | | my_bool my_like_range_simple(CHARSET_INFO *cs, | |
|
| const char *ptr, uint ptr_length, | | const char *ptr, size_t ptr_length, | |
| pbool escape, pbool w_one, pbool w_many, | | pbool escape, pbool w_one, pbool w_many, | |
|
| uint res_length, | | size_t res_length, | |
| char *min_str, char *max_str, | | char *min_str, char *max_str, | |
|
| uint *min_length, uint *max_length); | | size_t *min_length, size_t *max_length); | |
| | | | |
| my_bool my_like_range_mb(CHARSET_INFO *cs, | | my_bool my_like_range_mb(CHARSET_INFO *cs, | |
|
| const char *ptr, uint ptr_length, | | const char *ptr, size_t ptr_length, | |
| pbool escape, pbool w_one, pbool w_many, | | pbool escape, pbool w_one, pbool w_many, | |
|
| uint res_length, | | size_t res_length, | |
| char *min_str, char *max_str, | | char *min_str, char *max_str, | |
|
| uint *min_length, uint *max_length); | | size_t *min_length, size_t *max_length); | |
| | | | |
| my_bool my_like_range_ucs2(CHARSET_INFO *cs, | | my_bool my_like_range_ucs2(CHARSET_INFO *cs, | |
|
| const char *ptr, uint ptr_length, | | const char *ptr, size_t ptr_length, | |
| pbool escape, pbool w_one, pbool w_many, | | pbool escape, pbool w_one, pbool w_many, | |
|
| uint res_length, | | size_t res_length, | |
| char *min_str, char *max_str, | | char *min_str, char *max_str, | |
|
| uint *min_length, uint *max_length); | | size_t *min_length, size_t *max_length); | |
| | | | |
| int my_wildcmp_8bit(CHARSET_INFO *, | | int my_wildcmp_8bit(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); | |
| | | | |
| int my_wildcmp_bin(CHARSET_INFO *, | | int my_wildcmp_bin(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); | |
| | | | |
|
| uint my_numchars_8bit(CHARSET_INFO *, const char *b, const char *e); | | size_t my_numchars_8bit(CHARSET_INFO *, const char *b, const char *e); | |
| uint my_numcells_8bit(CHARSET_INFO *, const char *b, const char *e); | | size_t my_numcells_8bit(CHARSET_INFO *, const char *b, const char *e); | |
| uint my_charpos_8bit(CHARSET_INFO *, const char *b, const char *e, uint pos | | size_t my_charpos_8bit(CHARSET_INFO *, const char *b, const char *e, size_t | |
| ); | | pos); | |
| uint my_well_formed_len_8bit(CHARSET_INFO *, const char *b, const char *e, | | size_t my_well_formed_len_8bit(CHARSET_INFO *, const char *b, const char *e | |
| uint pos, int *error); | | , | |
| int my_mbcharlen_8bit(CHARSET_INFO *, uint c); | | size_t pos, int *error); | |
| | | uint my_mbcharlen_8bit(CHARSET_INFO *, uint c); | |
| | | | |
| /* Functions for multibyte charsets */ | | /* Functions for multibyte charsets */ | |
|
| extern uint my_caseup_str_mb(CHARSET_INFO *, char *); | | extern size_t my_caseup_str_mb(CHARSET_INFO *, char *); | |
| extern uint my_casedn_str_mb(CHARSET_INFO *, char *); | | extern size_t my_casedn_str_mb(CHARSET_INFO *, char *); | |
| extern uint my_caseup_mb(CHARSET_INFO *, char *src, uint srclen, | | extern size_t my_caseup_mb(CHARSET_INFO *, char *src, size_t srclen, | |
| char *dst, uint dstlen); | | char *dst, size_t dstlen); | |
| extern uint my_casedn_mb(CHARSET_INFO *, char *src, uint srclen, | | extern size_t my_casedn_mb(CHARSET_INFO *, char *src, size_t srclen, | |
| char *dst, uint dstlen); | | 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); | |
|
| uint my_numchars_mb(CHARSET_INFO *, const char *b, const char *e); | | size_t my_numchars_mb(CHARSET_INFO *, const char *b, const char *e); | |
| uint my_numcells_mb(CHARSET_INFO *, const char *b, const char *e); | | size_t my_numcells_mb(CHARSET_INFO *, const char *b, const char *e); | |
| uint my_charpos_mb(CHARSET_INFO *, const char *b, const char *e, uint pos); | | size_t my_charpos_mb(CHARSET_INFO *, const char *b, const char *e, size_t p | |
| uint my_well_formed_len_mb(CHARSET_INFO *, const char *b, const char *e, | | os); | |
| uint pos, int *error); | | size_t my_well_formed_len_mb(CHARSET_INFO *, const char *b, const char *e, | |
| | | size_t pos, int *error); | |
| uint my_instr_mb(struct charset_info_st *, | | uint my_instr_mb(struct charset_info_st *, | |
|
| const char *b, uint b_length, | | const char *b, size_t b_length, | |
| const char *s, uint s_length, | | const char *s, size_t s_length, | |
| my_match_t *match, uint nmatch); | | my_match_t *match, uint nmatch); | |
| | | | |
| 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, uint len, | | extern my_bool my_parse_charset_xml(const char *bug, size_t len, | |
| int (*add)(CHARSET_INFO *cs)); | | int (*add)(CHARSET_INFO *cs)); | |
|
| | | extern char *my_strchr(CHARSET_INFO *cs, const char *str, const char *end, | |
| | | pchar c); | |
| | | | |
|
| my_bool my_propagate_simple(CHARSET_INFO *cs, const uchar *str, uint 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, uint 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); | |
| | | | |
| #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 */ | |
| | | | |
End of changes. 61 change blocks. |
| 136 lines changed or deleted | | 165 lines changed or added | |
|
| my_config.h | | my_config.h | |
| /* include/config.h. Generated from config.h.in by configure. */ | | /* include/config.h. Generated from config.h.in by configure. */ | |
| /* config.h.in. Generated from configure.in by autoheader. */ | | /* config.h.in. Generated from configure.in by autoheader. */ | |
| | | | |
| /* Define if building universal (internal helper macro) */ | | /* Define if building universal (internal helper macro) */ | |
| /* #undef AC_APPLE_UNIVERSAL_BUILD */ | | /* #undef AC_APPLE_UNIVERSAL_BUILD */ | |
| | | | |
| /* Support big tables */ | | /* Support big tables */ | |
| /* #undef BIG_TABLES */ | | /* #undef BIG_TABLES */ | |
| | | | |
| /* Whether features provided by the user community should be included */ | | /* Whether features provided by the user community should be included */ | |
|
| /* #undef COMMUNITY_SERVER */ | | #define COMMUNITY_SERVER 1 | |
| | | | |
| /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP | | /* 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. | | systems. This function is required for `alloca.c' support on those syste
ms. | |
| */ | | */ | |
| /* #undef CRAY_STACKSEG_END */ | | /* #undef CRAY_STACKSEG_END */ | |
| | | | |
| /* Define to 1 if using `alloca.c'. */ | | /* Define to 1 if using `alloca.c'. */ | |
| /* #undef C_ALLOCA */ | | /* #undef C_ALLOCA */ | |
| | | | |
| /* Don't use libdbug */ | | /* Don't use libdbug */ | |
| | | | |
| skipping to change at line 37 | | skipping to change at line 37 | |
| /* all charsets are available */ | | /* all charsets are available */ | |
| /* #undef DEFINE_ALL_CHARACTER_SETS */ | | /* #undef DEFINE_ALL_CHARACTER_SETS */ | |
| | | | |
| /* Disables the use of --init-file, --skip-grant-tables and --bootstrap | | /* Disables the use of --init-file, --skip-grant-tables and --bootstrap | |
| options */ | | options */ | |
| /* #undef DISABLE_GRANT_OPTIONS */ | | /* #undef DISABLE_GRANT_OPTIONS */ | |
| | | | |
| /* Version of .frm files */ | | /* Version of .frm files */ | |
| #define DOT_FRM_VERSION 6 | | #define DOT_FRM_VERSION 6 | |
| | | | |
|
| | | /* If Debug Sync Facility should be enabled */ | |
| | | /* #undef ENABLED_DEBUG_SYNC */ | |
| | | | |
| /* If LOAD DATA LOCAL INFILE should be enabled by default */ | | /* If LOAD DATA LOCAL INFILE should be enabled by default */ | |
| /* #undef ENABLED_LOCAL_INFILE */ | | /* #undef ENABLED_LOCAL_INFILE */ | |
| | | | |
| /* If SHOW PROFILE should be enabled */ | | /* If SHOW PROFILE should be enabled */ | |
|
| /* #undef ENABLED_PROFILING */ | | #define ENABLED_PROFILING 1 | |
| | | | |
| | | /* Enable error injection in MySQL Server */ | |
| | | /* #undef ERROR_INJECT_SUPPORT */ | |
| | | | |
| /* Do we have FIONREAD */ | | /* 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. */ | | /* READLINE: your system defines TIOCGWINSZ in sys/ioctl.h. */ | |
| #define GWINSZ_IN_SYS_IOCTL 1 | | #define GWINSZ_IN_SYS_IOCTL 1 | |
| | | | |
|
| | | /* Define to 1 if you have the `abi::__cxa_demangle' function. */ | |
| | | #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 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 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 to 1 if you have <alloca.h> and it should be used (not on Ultrix)
. | |
| */ | | */ | |
| #define HAVE_ALLOCA_H 1 | | #define HAVE_ALLOCA_H 1 | |
| | | | |
|
| /* Builds Archive Storage Engine */ | | | |
| /* #undef HAVE_ARCHIVE_DB */ | | | |
| | | | |
| /* Define to 1 if you have the <arpa/inet.h> header file. */ | | /* Define to 1 if you have the <arpa/inet.h> header file. */ | |
| #define HAVE_ARPA_INET_H 1 | | #define HAVE_ARPA_INET_H 1 | |
| | | | |
| /* Define to 1 if you have the <asm/termbits.h> header file. */ | | /* Define to 1 if you have the <asm/termbits.h> header file. */ | |
| #define HAVE_ASM_TERMBITS_H 1 | | #define HAVE_ASM_TERMBITS_H 1 | |
| | | | |
|
| /* atomic_add() from <asm/atomic.h> (Linux only) */ | | /* Define to 1 if you have the `atomic_add_long' function. */ | |
| /* #undef HAVE_ATOMIC_ADD */ | | /* #undef HAVE_ATOMIC_ADD_LONG */ | |
| | | | |
| | | /* Define to 1 if you have the `atomic_cas_32' function. */ | |
| | | /* #undef HAVE_ATOMIC_CAS_32 */ | |
| | | | |
| | | /* Define to 1 if you have the `atomic_cas_64' function. */ | |
| | | /* #undef HAVE_ATOMIC_CAS_64 */ | |
| | | | |
| | | /* Define to 1 if you have the `atomic_cas_ulong' function. */ | |
| | | /* #undef HAVE_ATOMIC_CAS_ULONG */ | |
| | | | |
| | | /* 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 | |
| | | | |
|
| /* atomic_sub() from <asm/atomic.h> (Linux only) */ | | /* Define to 1 if you have the `backtrace_symbols_fd' function. */ | |
| /* #undef HAVE_ATOMIC_SUB */ | | #define HAVE_BACKTRACE_SYMBOLS_FD 1 | |
| | | | |
| /* Define to 1 if you have the `bcmp' function. */ | | /* Define to 1 if you have the `bcmp' function. */ | |
| #define HAVE_BCMP 1 | | #define HAVE_BCMP 1 | |
| | | | |
|
| /* Have berkeley db installed */ | | | |
| /* #undef HAVE_BERKELEY_DB */ | | | |
| | | | |
| /* Define to 1 if you have the `bfill' function. */ | | /* Define to 1 if you have the `bfill' function. */ | |
| /* #undef HAVE_BFILL */ | | /* #undef HAVE_BFILL */ | |
| | | | |
|
| /* Builds Blackhole Storage Engine */ | | | |
| /* #undef HAVE_BLACKHOLE_DB */ | | | |
| | | | |
| /* Define to 1 if you have the `bmove' function. */ | | /* Define to 1 if you have the `bmove' function. */ | |
| /* #undef HAVE_BMOVE */ | | /* #undef HAVE_BMOVE */ | |
| | | | |
| /* bool is not defined by all C++ compilators */ | | /* bool is not defined by all C++ compilators */ | |
| #define HAVE_BOOL 1 | | #define HAVE_BOOL 1 | |
| | | | |
| /* Define to 1 if isinf() uses 80-bit register for intermediate values */ | | /* Define to 1 if isinf() uses 80-bit register for intermediate values */ | |
| /* #undef HAVE_BROKEN_ISINF */ | | /* #undef HAVE_BROKEN_ISINF */ | |
| | | | |
| /* Can netinet be included */ | | /* Can netinet be included */ | |
| /* #undef HAVE_BROKEN_NETINET_INCLUDES */ | | /* #undef HAVE_BROKEN_NETINET_INCLUDES */ | |
| | | | |
| /* BSD style signals */ | | /* BSD style signals */ | |
| /* #undef HAVE_BSD_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 to 1 if you have the `bzero' function. */ | |
| #define HAVE_BZERO 1 | | #define HAVE_BZERO 1 | |
| | | | |
| /* Define to enable charset armscii8 */ | | /* Define to enable charset armscii8 */ | |
| /* #undef HAVE_CHARSET_armscii8 */ | | /* #undef HAVE_CHARSET_armscii8 */ | |
| | | | |
| /* Define to enable ascii character set */ | | /* Define to enable ascii character set */ | |
| /* #undef HAVE_CHARSET_ascii */ | | /* #undef HAVE_CHARSET_ascii */ | |
| | | | |
| /* Define to enable charset big5 */ | | /* Define to enable charset big5 */ | |
| | | | |
| skipping to change at line 224 | | skipping to change at line 248 | |
| | | | |
| /* Define to enable compression support */ | | /* Define to enable compression support */ | |
| #define HAVE_COMPRESS 1 | | #define HAVE_COMPRESS 1 | |
| | | | |
| /* crypt */ | | /* crypt */ | |
| #define HAVE_CRYPT 1 | | #define HAVE_CRYPT 1 | |
| | | | |
| /* Define to 1 if you have the <crypt.h> header file. */ | | /* Define to 1 if you have the <crypt.h> header file. */ | |
| #define HAVE_CRYPT_H 1 | | #define HAVE_CRYPT_H 1 | |
| | | | |
|
| /* Builds the CSV Storage Engine */ | | | |
| /* #undef HAVE_CSV_DB */ | | | |
| | | | |
| /* Define to 1 if you have the <curses.h> header file. */ | | /* Define to 1 if you have the <curses.h> header file. */ | |
| #define HAVE_CURSES_H 1 | | #define HAVE_CURSES_H 1 | |
| | | | |
| /* Define to 1 if you have the `cuserid' function. */ | | /* Define to 1 if you have the `cuserid' function. */ | |
| #define HAVE_CUSERID 1 | | #define HAVE_CUSERID 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 | | /* Define to 1 if you have the declaration of `madvise', and to 0 if you | |
| don't. */ | | don't. */ | |
| #define HAVE_DECL_MADVISE 1 | | #define HAVE_DECL_MADVISE 1 | |
| | | | |
| /* Define to 1 if you have the declaration of `SHM_HUGETLB', and to 0 if yo
u | | /* Define to 1 if you have the declaration of `SHM_HUGETLB', and to 0 if yo
u | |
| don't. */ | | don't. */ | |
| #define HAVE_DECL_SHM_HUGETLB 1 | | #define HAVE_DECL_SHM_HUGETLB 1 | |
| | | | |
| /* Define to 1 if you have the declaration of `tgoto', and to 0 if you don'
t. | | /* Define to 1 if you have the declaration of `tgoto', and to 0 if you don'
t. | |
| */ | | */ | |
| | | | |
| skipping to change at line 266 | | skipping to change at line 290 | |
| | | | |
| /* Define to 1 if you have the `dlopen' function. */ | | /* 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.' */ | | /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ | |
| /* #undef HAVE_DOPRNT */ | | /* #undef HAVE_DOPRNT */ | |
| | | | |
| /* Access checks in embedded library */ | | /* Access checks in embedded library */ | |
| /* #undef HAVE_EMBEDDED_PRIVILEGE_CONTROL */ | | /* #undef HAVE_EMBEDDED_PRIVILEGE_CONTROL */ | |
| | | | |
|
| /* Builds Example DB */ | | /* Define to 1 if you have the <execinfo.h> header file. */ | |
| /* #undef HAVE_EXAMPLE_DB */ | | #define HAVE_EXECINFO_H 1 | |
| | | | |
| /* Defined by configure. Use explicit template instantiation. */ | | /* Defined by configure. Use explicit template instantiation. */ | |
| #define HAVE_EXPLICIT_TEMPLATE_INSTANTIATION 1 | | #define HAVE_EXPLICIT_TEMPLATE_INSTANTIATION 1 | |
| | | | |
| /* Define to 1 if you have the `fchmod' function. */ | | /* 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 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 to 1 if you have the <fcntl.h> header file. */ | |
| #define HAVE_FCNTL_H 1 | | #define HAVE_FCNTL_H 1 | |
| | | | |
| /* Define to 1 if you have the `fconvert' function. */ | | /* 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 to 1 if you have the `fdatasync' function. */ | |
| #define HAVE_FDATASYNC 1 | | #define HAVE_FDATASYNC 1 | |
| | | | |
|
| /* Define to enable Federated Handler */ | | | |
| /* #undef HAVE_FEDERATED_DB */ | | | |
| | | | |
| /* Define to 1 if you have the <fenv.h> header file. */ | | /* Define to 1 if you have the <fenv.h> header file. */ | |
| #define HAVE_FENV_H 1 | | #define HAVE_FENV_H 1 | |
| | | | |
| /* Define to 1 if you have the `fesetround' function. */ | | /* 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. */ | | /* Define to 1 if you have the `fgetln' function. */ | |
| /* #undef HAVE_FGETLN */ | | /* #undef HAVE_FGETLN */ | |
| | | | |
| /* Define to 1 if you have the `finite' function. */ | | /* Define to 1 if you have the `finite' function. */ | |
| | | | |
| skipping to change at line 317 | | skipping to change at line 338 | |
| | | | |
| /* Define to 1 if you have the `flockfile' function. */ | | /* Define to 1 if you have the `flockfile' function. */ | |
| #define HAVE_FLOCKFILE 1 | | #define HAVE_FLOCKFILE 1 | |
| | | | |
| /* Define to 1 if you have the `fpresetsticky' function. */ | | /* Define to 1 if you have the `fpresetsticky' function. */ | |
| /* #undef HAVE_FPRESETSTICKY */ | | /* #undef HAVE_FPRESETSTICKY */ | |
| | | | |
| /* Define to 1 if you have the `fpsetmask' function. */ | | /* Define to 1 if you have the `fpsetmask' function. */ | |
| /* #undef HAVE_FPSETMASK */ | | /* #undef HAVE_FPSETMASK */ | |
| | | | |
|
| /* fp_except from ieeefp.h */ | | /* Define to 1 if the system has the type `fp_except'. */ | |
| /* #undef HAVE_FP_EXCEPT */ | | /* #undef HAVE_FP_EXCEPT */ | |
| | | | |
| /* Define to 1 if you have the `fsync' function. */ | | /* Define to 1 if you have the `fsync' function. */ | |
| #define HAVE_FSYNC 1 | | #define HAVE_FSYNC 1 | |
| | | | |
| /* Define to 1 if you have the `ftruncate' function. */ | | /* Define to 1 if you have the `ftruncate' function. */ | |
| #define HAVE_FTRUNCATE 1 | | #define HAVE_FTRUNCATE 1 | |
| | | | |
|
| | | /* Define to 1 if compiler provides atomic builtins. */ | |
| | | #define HAVE_GCC_ATOMIC_BUILTINS 1 | |
| | | | |
| /* Define to 1 if you have the `getcwd' function. */ | | /* 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 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 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 | | /* Solaris define gethostbyname_r with 5 arguments. glibc2 defines this wit
h 6 | |
| arguments */ | | arguments */ | |
| #define HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE 1 | | #define HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE 1 | |
| | | | |
|
| /* In OSF 4.0f the 3'd argument to gethostname_r is hostent_data * */ | | /* In OSF 4.0f the 3'd argument to gethostbyname_r is hostent_data * */ | |
| /* #undef HAVE_GETHOSTBYNAME_R_RETURN_INT */ | | /* #undef HAVE_GETHOSTBYNAME_R_RETURN_INT */ | |
| | | | |
|
| | | /* Define to 1 if you have the `gethrtime' function. */ | |
| | | /* #undef HAVE_GETHRTIME */ | |
| | | | |
| /* Define to 1 if you have the `getline' function. */ | | /* Define to 1 if you have the `getline' function. */ | |
| #define HAVE_GETLINE 1 | | #define HAVE_GETLINE 1 | |
| | | | |
| /* Define to 1 if you have the `getpagesize' function. */ | | /* 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 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. */ | | /* Define to 1 if you have the `getpassphrase' function. */ | |
| | | | |
| skipping to change at line 381 | | skipping to change at line 408 | |
| | | | |
| /* Define to 1 if you have the `gmtime_r' function. */ | | /* Define to 1 if you have the `gmtime_r' function. */ | |
| #define HAVE_GMTIME_R 1 | | #define HAVE_GMTIME_R 1 | |
| | | | |
| /* Define to 1 if you have the <grp.h> header file. */ | | /* Define to 1 if you have the <grp.h> header file. */ | |
| #define HAVE_GRP_H 1 | | #define HAVE_GRP_H 1 | |
| | | | |
| /* HIST_ENTRY is defined in the outer libeditreadline */ | | /* HIST_ENTRY is defined in the outer libeditreadline */ | |
| #define HAVE_HIST_ENTRY 1 | | #define HAVE_HIST_ENTRY 1 | |
| | | | |
|
| | | /* pthread_t can be used by GCC atomic builtins */ | |
| | | #define HAVE_IB_ATOMIC_PTHREAD_T_GCC 1 | |
| | | | |
| | | /* pthread_t can be used by solaris atomics */ | |
| | | /* #undef HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS */ | |
| | | | |
| | | /* GCC atomic builtins are available */ | |
| | | #define HAVE_IB_GCC_ATOMIC_BUILTINS 1 | |
| | | | |
| | | /* Does x86 PAUSE instruction exist */ | |
| | | #define HAVE_IB_PAUSE_INSTRUCTION 1 | |
| | | | |
| | | /* Define to 1 if Solaris libc atomic functions are available */ | |
| | | /* #undef HAVE_IB_SOLARIS_ATOMICS */ | |
| | | | |
| /* Define to 1 if you have the <ieeefp.h> header file. */ | | /* Define to 1 if you have the <ieeefp.h> header file. */ | |
| /* #undef HAVE_IEEEFP_H */ | | /* #undef HAVE_IEEEFP_H */ | |
| | | | |
| /* Define to 1 if you have the `index' function. */ | | /* Define to 1 if you have the `index' function. */ | |
| #define HAVE_INDEX 1 | | #define HAVE_INDEX 1 | |
| | | | |
| /* Define to 1 if you have the `initgroups' function. */ | | /* Define to 1 if you have the `initgroups' function. */ | |
| #define HAVE_INITGROUPS 1 | | #define HAVE_INITGROUPS 1 | |
| | | | |
|
| /* Using Innobase DB */ | | /* Define to 1 if the system has the type `int16'. */ | |
| #define HAVE_INNOBASE_DB 1 | | /* #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 to 1 if you have the <inttypes.h> header file. */ | |
| #define HAVE_INTTYPES_H 1 | | #define HAVE_INTTYPES_H 1 | |
| | | | |
|
| /* whether int8, int16 and int32 types exist */ | | /* Define to 1 if the system has the type `in_addr_t'. */ | |
| /* #undef HAVE_INT_8_16_32 */ | | | |
| | | | |
| /* system headers define in_addr_t */ | | | |
| #define HAVE_IN_ADDR_T 1 | | #define HAVE_IN_ADDR_T 1 | |
| | | | |
| /* isinf() macro or function */ | | /* isinf() macro or function */ | |
| #define HAVE_ISINF 1 | | #define HAVE_ISINF 1 | |
| | | | |
| /* Define to 1 if you have the `isnan' function. */ | | /* Define to 1 if you have the `isnan' function. */ | |
| #define HAVE_ISNAN 1 | | #define HAVE_ISNAN 1 | |
| | | | |
| /* Define to 1 if you have the `issetugid' function. */ | | /* Define to 1 if you have the `issetugid' function. */ | |
| /* #undef HAVE_ISSETUGID */ | | /* #undef HAVE_ISSETUGID */ | |
| | | | |
|
| | | /* Define to 1 if you have the `iswctype' function. */ | |
| | | #define HAVE_ISWCTYPE 1 | |
| | | | |
| | | /* Define to 1 if you have the `iswlower' function. */ | |
| | | #define HAVE_ISWLOWER 1 | |
| | | | |
| | | /* Define to 1 if you have the `iswupper' function. */ | |
| | | #define HAVE_ISWUPPER 1 | |
| | | | |
| /* Define if mysql_cv_langinfo_codeset=yes */ | | /* Define if mysql_cv_langinfo_codeset=yes */ | |
| #define HAVE_LANGINFO_CODESET /**/ | | #define HAVE_LANGINFO_CODESET /**/ | |
| | | | |
| /* Define to 1 if you have the <langinfo.h> header file. */ | | /* Define to 1 if you have the <langinfo.h> header file. */ | |
| #define HAVE_LANGINFO_H 1 | | #define HAVE_LANGINFO_H 1 | |
| | | | |
| /* Define if you have large pages support */ | | /* Define if you have large pages support */ | |
| #define HAVE_LARGE_PAGES 1 | | #define HAVE_LARGE_PAGES 1 | |
| | | | |
|
| /* Define to 1 if you have the `bind' library (-lbind). */ | | | |
| /* #undef HAVE_LIBBIND */ | | | |
| | | | |
| /* Define to 1 if you have the `compat' library (-lcompat). */ | | | |
| /* #undef HAVE_LIBCOMPAT */ | | | |
| | | | |
| /* Define to 1 if you have the `c_r' library (-lc_r). */ | | /* Define to 1 if you have the `c_r' library (-lc_r). */ | |
| /* #undef HAVE_LIBC_R */ | | /* #undef HAVE_LIBC_R */ | |
| | | | |
| /* Define to 1 if you have the `dl' library (-ldl). */ | | /* Define to 1 if you have the `dl' library (-ldl). */ | |
| #define HAVE_LIBDL 1 | | #define HAVE_LIBDL 1 | |
| | | | |
|
| /* Define to 1 if you have the `gen' library (-lgen). */ | | | |
| /* #undef HAVE_LIBGEN */ | | | |
| | | | |
| /* Define to 1 if you have the `m' library (-lm). */ | | /* Define to 1 if you have the `m' library (-lm). */ | |
| #define HAVE_LIBM 1 | | #define HAVE_LIBM 1 | |
| | | | |
| /* Define to 1 if you have the `nsl' library (-lnsl). */ | | /* Define to 1 if you have the `nsl' library (-lnsl). */ | |
| #define HAVE_LIBNSL 1 | | #define HAVE_LIBNSL 1 | |
| | | | |
| /* Define to 1 if you have the `nsl_r' library (-lnsl_r). */ | | /* Define to 1 if you have the `nsl_r' library (-lnsl_r). */ | |
| /* #undef HAVE_LIBNSL_R */ | | /* #undef HAVE_LIBNSL_R */ | |
| | | | |
|
| /* Define to 1 if you have the `posix4' library (-lposix4). */ | | | |
| /* #undef HAVE_LIBPOSIX4 */ | | | |
| | | | |
| /* Define to 1 if you have the `pthread' library (-lpthread). */ | | /* Define to 1 if you have the `pthread' library (-lpthread). */ | |
| #define HAVE_LIBPTHREAD 1 | | #define HAVE_LIBPTHREAD 1 | |
| | | | |
|
| /* Define to 1 if you have the `socket' library (-lsocket). */ | | | |
| /* #undef HAVE_LIBSOCKET */ | | | |
| | | | |
| /* Define if have -lwrap */ | | /* Define if have -lwrap */ | |
| /* #undef HAVE_LIBWRAP */ | | /* #undef HAVE_LIBWRAP */ | |
| | | | |
| /* Define to 1 if you have the <limits.h> header file. */ | | /* Define to 1 if you have the <limits.h> header file. */ | |
| #define HAVE_LIMITS_H 1 | | #define HAVE_LIMITS_H 1 | |
| | | | |
| /* Whether we are using Xavier Leroy's LinuxThreads */ | | /* Whether we are using Xavier Leroy's LinuxThreads */ | |
| /* #undef HAVE_LINUXTHREADS */ | | /* #undef HAVE_LINUXTHREADS */ | |
| | | | |
| /* Define to 1 if you have the <linux/config.h> header file. */ | | /* Define to 1 if you have the <linux/config.h> header file. */ | |
| | | | |
| skipping to change at line 498 | | skipping to change at line 540 | |
| | | | |
| /* Define to 1 if you have the <malloc.h> header file. */ | | /* Define to 1 if you have the <malloc.h> header file. */ | |
| #define HAVE_MALLOC_H 1 | | #define HAVE_MALLOC_H 1 | |
| | | | |
| /* Define if you have mbrlen */ | | /* Define if you have mbrlen */ | |
| #define HAVE_MBRLEN /**/ | | #define HAVE_MBRLEN /**/ | |
| | | | |
| /* Define if you have mbrtowc */ | | /* Define if you have mbrtowc */ | |
| #define HAVE_MBRTOWC /**/ | | #define HAVE_MBRTOWC /**/ | |
| | | | |
|
| | | /* Define if you have mbscmp */ | |
| | | /* #undef HAVE_MBSCMP */ | |
| | | | |
| /* Define if you have mbsrtowcs */ | | /* Define if you have mbsrtowcs */ | |
| #define HAVE_MBSRTOWCS /**/ | | #define HAVE_MBSRTOWCS /**/ | |
| | | | |
| /* Define if mysql_cv_have_mbstate_t=yes */ | | /* Define if mysql_cv_have_mbstate_t=yes */ | |
| #define HAVE_MBSTATE_T /**/ | | #define HAVE_MBSTATE_T /**/ | |
| | | | |
| /* Define to 1 if you have the `memcpy' function. */ | | /* 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 to 1 if you have the `memmove' function. */ | |
| | | | |
| skipping to change at line 522 | | skipping to change at line 567 | |
| | | | |
| /* Define to 1 if you have the `mkstemp' function. */ | | /* 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 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 to 1 if you have the `mmap' function. */ | |
| #define HAVE_MMAP 1 | | #define HAVE_MMAP 1 | |
| | | | |
|
| /* Using Ndb Cluster DB */ | | /* Define to 1 if you have the `mmap64' function. */ | |
| /* #undef HAVE_NDBCLUSTER_DB */ | | #define HAVE_MMAP64 1 | |
| | | | |
| /* Define to 1 if you have the <ndir.h> header file. */ | | /* Define to 1 if you have the <ndir.h> header file. */ | |
| /* #undef HAVE_NDIR_H */ | | /* #undef HAVE_NDIR_H */ | |
| | | | |
| /* Define to 1 if you have the <netinet/in.h> header file. */ | | /* Define to 1 if you have the <netinet/in.h> header file. */ | |
| #define HAVE_NETINET_IN_H 1 | | #define HAVE_NETINET_IN_H 1 | |
| | | | |
| /* For some non posix threads */ | | /* For some non posix threads */ | |
| /* #undef HAVE_NONPOSIX_PTHREAD_GETSPECIFIC */ | | /* #undef HAVE_NONPOSIX_PTHREAD_GETSPECIFIC */ | |
| | | | |
| | | | |
| skipping to change at line 546 | | skipping to change at line 591 | |
| | | | |
| /* sigwait with one argument */ | | /* sigwait with one argument */ | |
| /* #undef HAVE_NONPOSIX_SIGWAIT */ | | /* #undef HAVE_NONPOSIX_SIGWAIT */ | |
| | | | |
| /* NPTL threads implementation */ | | /* NPTL threads implementation */ | |
| #define HAVE_NPTL 1 | | #define HAVE_NPTL 1 | |
| | | | |
| /* Define to 1 if the system has the type `off_t'. */ | | /* Define to 1 if the system has the type `off_t'. */ | |
| #define HAVE_OFF_T 1 | | #define HAVE_OFF_T 1 | |
| | | | |
|
| /* Defined by configure. Using yaSSL for OpenSSL emulation. */ | | /* OpenSSL */ | |
| /* #undef HAVE_OPENSSL */ | | /* #undef HAVE_OPENSSL */ | |
| | | | |
| /* Define to 1 if you have the <paths.h> header file. */ | | /* Define to 1 if you have the <paths.h> header file. */ | |
| #define HAVE_PATHS_H 1 | | #define HAVE_PATHS_H 1 | |
| | | | |
| /* Define to 1 if you have the `perror' function. */ | | /* 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 to 1 if you have the `poll' function. */ | |
| #define HAVE_POLL 1 | | #define HAVE_POLL 1 | |
| | | | |
|
| | | /* Define to 1 if you have the `port_create' function. */ | |
| | | /* #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 | |
| | | | |
| /* Signal handling is POSIX (sigset/sighold, etc) */ | | /* Signal handling is POSIX (sigset/sighold, etc) */ | |
| #define HAVE_POSIX_SIGNALS 1 | | #define HAVE_POSIX_SIGNALS 1 | |
| | | | |
| /* Define to 1 if you have the `pread' function. */ | | /* Define to 1 if you have the `pread' function. */ | |
| #define HAVE_PREAD 1 | | #define HAVE_PREAD 1 | |
| | | | |
| /* Define to 1 if you have the `pthread_attr_create' function. */ | | /* Define to 1 if you have the `pthread_attr_create' function. */ | |
| /* #undef HAVE_PTHREAD_ATTR_CREATE */ | | /* #undef HAVE_PTHREAD_ATTR_CREATE */ | |
| | | | |
| /* Define to 1 if you have the `pthread_attr_getstacksize' function. */ | | /* Define to 1 if you have the `pthread_attr_getstacksize' function. */ | |
| | | | |
| skipping to change at line 606 | | skipping to change at line 660 | |
| | | | |
| /* Define to 1 if you have the `pthread_setprio' function. */ | | /* Define to 1 if you have the `pthread_setprio' function. */ | |
| /* #undef HAVE_PTHREAD_SETPRIO */ | | /* #undef HAVE_PTHREAD_SETPRIO */ | |
| | | | |
| /* Define to 1 if you have the `pthread_setprio_np' function. */ | | /* Define to 1 if you have the `pthread_setprio_np' function. */ | |
| /* #undef HAVE_PTHREAD_SETPRIO_NP */ | | /* #undef HAVE_PTHREAD_SETPRIO_NP */ | |
| | | | |
| /* Define to 1 if you have the `pthread_setschedparam' function. */ | | /* Define to 1 if you have the `pthread_setschedparam' function. */ | |
| #define HAVE_PTHREAD_SETSCHEDPARAM 1 | | #define HAVE_PTHREAD_SETSCHEDPARAM 1 | |
| | | | |
|
| | | /* Define to 1 if you have the `pthread_setschedprio' function. */ | |
| | | #define HAVE_PTHREAD_SETSCHEDPRIO 1 | |
| | | | |
| /* Define to 1 if you have the `pthread_sigmask' function. */ | | /* Define to 1 if you have the `pthread_sigmask' function. */ | |
| #define HAVE_PTHREAD_SIGMASK 1 | | #define HAVE_PTHREAD_SIGMASK 1 | |
| | | | |
| /* pthread_yield function with one argument */ | | /* pthread_yield function with one argument */ | |
| /* #undef HAVE_PTHREAD_YIELD_ONE_ARG */ | | /* #undef HAVE_PTHREAD_YIELD_ONE_ARG */ | |
| | | | |
| /* pthread_yield that doesn't take any arguments */ | | /* 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 to 1 if you have the `putenv' function. */ | |
| | | | |
| skipping to change at line 658 | | skipping to change at line 715 | |
| | | | |
| /* RTree keys */ | | /* RTree keys */ | |
| #define HAVE_RTREE_KEYS 1 | | #define HAVE_RTREE_KEYS 1 | |
| | | | |
| /* Define to 1 if you have the `rwlock_init' function. */ | | /* 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 to 1 if you have the <sched.h> header file. */ | |
| #define HAVE_SCHED_H 1 | | #define HAVE_SCHED_H 1 | |
| | | | |
|
| | | /* Define to 1 if you have the `sched_yield' function. */ | |
| | | #define HAVE_SCHED_YIELD 1 | |
| | | | |
| /* Define to 1 if you have the `select' function. */ | | /* Define to 1 if you have the `select' function. */ | |
| #define HAVE_SELECT 1 | | #define HAVE_SELECT 1 | |
| | | | |
| /* Define to 1 if you have the <select.h> header file. */ | | /* Define to 1 if you have the <select.h> header file. */ | |
| /* #undef HAVE_SELECT_H */ | | /* #undef HAVE_SELECT_H */ | |
| | | | |
| /* Define to 1 if you have the <semaphore.h> header file. */ | | /* Define to 1 if you have the <semaphore.h> header file. */ | |
| #define HAVE_SEMAPHORE_H 1 | | #define HAVE_SEMAPHORE_H 1 | |
| | | | |
| /* Define to 1 if you have the `setenv' function. */ | | /* Define to 1 if you have the `setenv' function. */ | |
| | | | |
| skipping to change at line 715 | | skipping to change at line 775 | |
| | | | |
| /* Define to 1 if you have the `sigthreadmask' function. */ | | /* Define to 1 if you have the `sigthreadmask' function. */ | |
| /* #undef HAVE_SIGTHREADMASK */ | | /* #undef HAVE_SIGTHREADMASK */ | |
| | | | |
| /* POSIX sigwait */ | | /* POSIX sigwait */ | |
| #define HAVE_SIGWAIT 1 | | #define HAVE_SIGWAIT 1 | |
| | | | |
| /* Define to 1 if the system has the type `size_t'. */ | | /* Define to 1 if the system has the type `size_t'. */ | |
| #define HAVE_SIZE_T 1 | | #define HAVE_SIZE_T 1 | |
| | | | |
|
| | | /* Define to 1 if you have the `sleep' function. */ | |
| | | #define HAVE_SLEEP 1 | |
| | | | |
| /* Define to 1 if you have the `snprintf' function. */ | | /* 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 to 1 if you have the `socket' function. */ | |
| #define HAVE_SOCKET 1 | | #define HAVE_SOCKET 1 | |
| | | | |
| /* Solaris define gethostbyaddr_r with 7 arguments. glibc2 defines this wit
h 8 | | /* Solaris define gethostbyaddr_r with 7 arguments. glibc2 defines this wit
h 8 | |
| arguments */ | | arguments */ | |
| /* #undef HAVE_SOLARIS_STYLE_GETHOST */ | | /* #undef HAVE_SOLARIS_STYLE_GETHOST */ | |
| | | | |
| | | | |
| skipping to change at line 906 | | skipping to change at line 969 | |
| | | | |
| /* Define to 1 if you have the <term.h> header file. */ | | /* Define to 1 if you have the <term.h> header file. */ | |
| #define HAVE_TERM_H 1 | | #define HAVE_TERM_H 1 | |
| | | | |
| /* Define to 1 if you have the `thr_setconcurrency' function. */ | | /* Define to 1 if you have the `thr_setconcurrency' function. */ | |
| /* #undef HAVE_THR_SETCONCURRENCY */ | | /* #undef HAVE_THR_SETCONCURRENCY */ | |
| | | | |
| /* Timespec has a ts_sec instead of tv_sev */ | | /* Timespec has a ts_sec instead of tv_sev */ | |
| /* #undef HAVE_TIMESPEC_TS_SEC */ | | /* #undef HAVE_TIMESPEC_TS_SEC */ | |
| | | | |
|
| | | /* Define to 1 if you have the `towlower' function. */ | |
| | | #define HAVE_TOWLOWER 1 | |
| | | | |
| | | /* Define to 1 if you have the `towupper' function. */ | |
| | | #define HAVE_TOWUPPER 1 | |
| | | | |
| /* Have the tzname variable */ | | /* Have the tzname variable */ | |
| #define HAVE_TZNAME 1 | | #define HAVE_TZNAME 1 | |
| | | | |
| /* national Unicode collations */ | | /* national Unicode collations */ | |
| #define HAVE_UCA_COLLATIONS 1 | | #define HAVE_UCA_COLLATIONS 1 | |
| | | | |
|
| /* system headers define uchar */ | | /* Define to 1 if the system has the type `uchar'. */ | |
| /* #undef HAVE_UCHAR */ | | /* #undef HAVE_UCHAR */ | |
| | | | |
|
| /* system headers define uint */ | | /* Define to 1 if the system has the type `uint'. */ | |
| #define HAVE_UINT 1 | | #define HAVE_UINT 1 | |
| | | | |
|
| /* system headers define ulong */ | | /* Define to 1 if the system has the type `uint16'. */ | |
| | | /* #undef HAVE_UINT16 */ | |
| | | | |
| | | /* Define to 1 if the system has the type `uint32'. */ | |
| | | /* #undef HAVE_UINT32 */ | |
| | | | |
| | | /* Define to 1 if the system has the type `uint64'. */ | |
| | | /* #undef HAVE_UINT64 */ | |
| | | | |
| | | /* Define to 1 if the system has the type `uint8'. */ | |
| | | /* #undef HAVE_UINT8 */ | |
| | | | |
| | | /* Define to 1 if the system has the type `ulong'. */ | |
| #define HAVE_ULONG 1 | | #define HAVE_ULONG 1 | |
| | | | |
| /* Define to 1 if you have the <unistd.h> header file. */ | | /* Define to 1 if you have the <unistd.h> header file. */ | |
| #define HAVE_UNISTD_H 1 | | #define HAVE_UNISTD_H 1 | |
| | | | |
| /* Have UnixWare 7 (or similar) almost-POSIX threading library */ | | /* Have UnixWare 7 (or similar) almost-POSIX threading library */ | |
| /* #undef HAVE_UNIXWARE7_THREADS */ | | /* #undef HAVE_UNIXWARE7_THREADS */ | |
| | | | |
| /* sighold() is present and usable */ | | /* sighold() is present and usable */ | |
| /* #undef HAVE_USG_SIGHOLD */ | | /* #undef HAVE_USG_SIGHOLD */ | |
| | | | |
| skipping to change at line 962 | | skipping to change at line 1043 | |
| | | | |
| /* Found vis.h and the strvis() function */ | | /* Found vis.h and the strvis() function */ | |
| /* #undef HAVE_VIS_H */ | | /* #undef HAVE_VIS_H */ | |
| | | | |
| /* Define to 1 if you have the `vprintf' function. */ | | /* Define to 1 if you have the `vprintf' function. */ | |
| #define HAVE_VPRINTF 1 | | #define HAVE_VPRINTF 1 | |
| | | | |
| /* Define to 1 if you have the <wchar.h> header file. */ | | /* Define to 1 if you have the <wchar.h> header file. */ | |
| #define HAVE_WCHAR_H 1 | | #define HAVE_WCHAR_H 1 | |
| | | | |
|
| /* Define if you check wcsdup */ | | /* systems should define this type here */ | |
| | | #define HAVE_WCHAR_T 1 | |
| | | | |
| | | /* Define if you have wcrtomb */ | |
| | | #define HAVE_WCRTOMB /**/ | |
| | | | |
| | | /* Define if you have wcscoll */ | |
| | | #define HAVE_WCSCOLL /**/ | |
| | | | |
| | | /* Define if you have wcsdup */ | |
| #define HAVE_WCSDUP /**/ | | #define HAVE_WCSDUP /**/ | |
| | | | |
|
| /* Define if you have wctomb */ | | /* Define if you have wctype */ | |
| #define HAVE_WCTOMB /**/ | | #define HAVE_WCTYPE /**/ | |
| | | | |
| /* Define to 1 if you have the <wctype.h> header file. */ | | /* Define to 1 if you have the <wctype.h> header file. */ | |
| #define HAVE_WCTYPE_H 1 | | #define HAVE_WCTYPE_H 1 | |
| | | | |
|
| | | /* systems should define this type here */ | |
| | | #define HAVE_WCTYPE_T 1 | |
| | | | |
| /* Define if you have wcwidth */ | | /* Define if you have wcwidth */ | |
| #define HAVE_WCWIDTH /**/ | | #define HAVE_WCWIDTH /**/ | |
| | | | |
|
| /* Defined by configure. Using yaSSL for OpenSSL emulation. */ | | /* Define to 1 if compiler supports weak symbol attribute. */ | |
| | | #define HAVE_WEAK_SYMBOL 1 | |
| | | | |
| | | /* systems should define this type here */ | |
| | | #define HAVE_WINT_T 1 | |
| | | | |
| | | /* Define to 1 if you have the <xfs/xfs.h> header file. */ | |
| | | /* #undef HAVE_XFS_XFS_H */ | |
| | | | |
| | | /* Defined by configure. Using yaSSL for SSL. */ | |
| /* #undef HAVE_YASSL */ | | /* #undef HAVE_YASSL */ | |
| | | | |
| /* Define if /proc/meminfo shows the huge page size (Linux only) */ | | /* Define if /proc/meminfo shows the huge page size (Linux only) */ | |
| #define HUGETLB_USE_PROC_MEMINFO 1 | | #define HUGETLB_USE_PROC_MEMINFO 1 | |
| | | | |
| /* Define if you have -lwrap */ | | /* Define if you have -lwrap */ | |
| /* #undef LIBWRAP */ | | /* #undef LIBWRAP */ | |
| | | | |
| /* Define to the sub-directory in which libtool stores uninstalled librarie
s. | | /* Define to the sub-directory in which libtool stores uninstalled librarie
s. | |
| */ | | */ | |
| | | | |
| skipping to change at line 999 | | skipping to change at line 1101 | |
| | | | |
| /* Maximum number of indexes per table */ | | /* Maximum number of indexes per table */ | |
| #define MAX_INDEXES 64 | | #define MAX_INDEXES 64 | |
| | | | |
| /* Define the default charset name */ | | /* Define the default charset name */ | |
| #define MYSQL_DEFAULT_CHARSET_NAME "latin1" | | #define MYSQL_DEFAULT_CHARSET_NAME "latin1" | |
| | | | |
| /* Define the default charset name */ | | /* Define the default charset name */ | |
| #define MYSQL_DEFAULT_COLLATION_NAME "latin1_swedish_ci" | | #define MYSQL_DEFAULT_COLLATION_NAME "latin1_swedish_ci" | |
| | | | |
|
| | | /* Assume single-CPU mode, no concurrency */ | |
| | | /* #undef MY_ATOMIC_MODE_DUMMY */ | |
| | | | |
| | | /* Use pthread rwlocks for atomic ops */ | |
| | | /* #undef MY_ATOMIC_MODE_RWLOCKS */ | |
| | | | |
| | | /* Define to 1 if you want to use fast mutexes */ | |
| | | /* #undef MY_PTHREAD_FASTMUTEX */ | |
| | | | |
| /* Including Ndb Cluster DB sci transporter */ | | /* Including Ndb Cluster DB sci transporter */ | |
| /* #undef NDB_SCI_TRANSPORTER */ | | /* #undef NDB_SCI_TRANSPORTER */ | |
| | | | |
| /* Including Ndb Cluster DB shared memory transporter */ | | /* Including Ndb Cluster DB shared memory transporter */ | |
| /* #undef NDB_SHM_TRANSPORTER */ | | /* #undef NDB_SHM_TRANSPORTER */ | |
| | | | |
| /* NDB build version */ | | /* NDB build version */ | |
|
| #define NDB_VERSION_BUILD 90 | | /* #undef NDB_VERSION_BUILD */ | |
| | | | |
| /* NDB major version */ | | /* NDB major version */ | |
|
| #define NDB_VERSION_MAJOR 5 | | /* #undef NDB_VERSION_MAJOR */ | |
| | | | |
| /* NDB minor version */ | | /* NDB minor version */ | |
|
| #define NDB_VERSION_MINOR 0 | | /* #undef NDB_VERSION_MINOR */ | |
| | | | |
| /* NDB status version */ | | /* NDB status version */ | |
|
| #define NDB_VERSION_STATUS "" | | /* #undef NDB_VERSION_STATUS */ | |
| | | | |
| /* Name of package */ | | /* Name of package */ | |
| #define PACKAGE "mysql" | | #define PACKAGE "mysql" | |
| | | | |
| /* Define to the address where bug reports for this package should be sent.
*/ | | /* Define to the address where bug reports for this package should be sent.
*/ | |
| #define PACKAGE_BUGREPORT "" | | #define PACKAGE_BUGREPORT "" | |
| | | | |
| /* Define to the full name of this package. */ | | /* Define to the full name of this package. */ | |
| #define PACKAGE_NAME "" | | #define PACKAGE_NAME "" | |
| | | | |
| | | | |
| skipping to change at line 1062 | | skipping to change at line 1173 | |
| | | | |
| /* The size of `int', as computed by sizeof. */ | | /* The size of `int', as computed by sizeof. */ | |
| #define SIZEOF_INT 4 | | #define SIZEOF_INT 4 | |
| | | | |
| /* The size of `long', as computed by sizeof. */ | | /* The size of `long', as computed by sizeof. */ | |
| #define SIZEOF_LONG 4 | | #define SIZEOF_LONG 4 | |
| | | | |
| /* The size of `long long', as computed by sizeof. */ | | /* The size of `long long', as computed by sizeof. */ | |
| #define SIZEOF_LONG_LONG 8 | | #define SIZEOF_LONG_LONG 8 | |
| | | | |
|
| /* */ | | /* The size of `off_t', as computed by sizeof. */ | |
| #define SIZEOF_OFF_T 8 | | #define SIZEOF_OFF_T 8 | |
| | | | |
|
| | | /* The size of `pthread_t', as computed by sizeof. */ | |
| | | #define SIZEOF_PTHREAD_T 4 | |
| | | | |
| /* The size of `short', as computed by sizeof. */ | | /* The size of `short', as computed by sizeof. */ | |
| #define SIZEOF_SHORT 2 | | #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 */ | | /* The base type of the last arg to accept */ | |
| #define SOCKET_SIZE_TYPE socklen_t | | #define SOCKET_SIZE_TYPE socklen_t | |
| | | | |
| /* Last argument to get/setsockopt */ | | /* Last argument to get/setsockopt */ | |
| /* #undef SOCKOPT_OPTLEN_TYPE */ | | /* #undef SOCKOPT_OPTLEN_TYPE */ | |
| | | | |
| /* Broken sprintf */ | | /* Broken sprintf */ | |
| /* #undef SPRINTF_RETURNS_GARBAGE */ | | /* #undef SPRINTF_RETURNS_GARBAGE */ | |
| | | | |
| /* POSIX sprintf */ | | /* POSIX sprintf */ | |
| | | | |
| skipping to change at line 1116 | | skipping to change at line 1233 | |
| /* Name of system, eg sun-solaris */ | | /* Name of system, eg sun-solaris */ | |
| #define SYSTEM_TYPE "pc-linux-gnu" | | #define SYSTEM_TYPE "pc-linux-gnu" | |
| | | | |
| /* Whether we build for Linux */ | | /* Whether we build for Linux */ | |
| #define TARGET_OS_LINUX 1 | | #define TARGET_OS_LINUX 1 | |
| | | | |
| /* Define if you want to have threaded code. This may be undef on client co
de | | /* Define if you want to have threaded code. This may be undef on client co
de | |
| */ | | */ | |
| #define THREAD 1 | | #define THREAD 1 | |
| | | | |
|
| /* Should be client be thread safe */ | | /* Should the client be thread safe */ | |
| /* #undef THREAD_SAFE_CLIENT */ | | #define THREAD_SAFE_CLIENT 1 | |
| | | | |
| /* Define to 1 if time_t is unsigned */ | | /* Define to 1 if time_t is unsigned */ | |
| /* #undef TIME_T_UNSIGNED */ | | /* #undef TIME_T_UNSIGNED */ | |
| | | | |
| /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ | | /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ | |
| #define TIME_WITH_SYS_TIME 1 | | #define TIME_WITH_SYS_TIME 1 | |
| | | | |
| /* declaration of TIOCSTAT in sys/ioctl.h */ | | /* declaration of TIOCSTAT in sys/ioctl.h */ | |
| /* #undef TIOCSTAT_IN_SYS_IOCTL */ | | /* #undef TIOCSTAT_IN_SYS_IOCTL */ | |
| | | | |
| | | | |
| skipping to change at line 1152 | | skipping to change at line 1269 | |
| /* #undef USE_MYSYS_NEW */ | | /* #undef USE_MYSYS_NEW */ | |
| | | | |
| /* used new readline interface (are rl_completion_func_t and | | /* used new readline interface (are rl_completion_func_t and | |
| rl_compentry_func_t defined) */ | | rl_compentry_func_t defined) */ | |
| /* #undef USE_NEW_READLINE_INTERFACE */ | | /* #undef USE_NEW_READLINE_INTERFACE */ | |
| | | | |
| /* the pstack backtrace library */ | | /* the pstack backtrace library */ | |
| /* #undef USE_PSTACK */ | | /* #undef USE_PSTACK */ | |
| | | | |
| /* Version number of package */ | | /* Version number of package */ | |
|
| #define VERSION "5.0.90" | | #define VERSION "5.1.41" | |
| | | | |
| /* sighandler type is void (*signal ()) (); */ | | /* sighandler type is void (*signal ()) (); */ | |
| #define VOID_SIGHANDLER 1 | | #define VOID_SIGHANDLER 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 | |
| | | | |
| | | /* Include Example for Storage Engines for developers into mysqld */ | |
| | | /* #undef WITH_EXAMPLE_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 Transactional Tables using InnoDB into mysqld */ | |
| | | /* #undef WITH_INNODB_PLUGIN_STORAGE_ENGINE */ | |
| | | | |
| | | /* 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 */ | |
| | | | |
| | | /* 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 | | /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most | |
| significant byte first (like Motorola and SPARC, unlike Intel). */ | | significant byte first (like Motorola and SPARC, unlike Intel). */ | |
| #if defined AC_APPLE_UNIVERSAL_BUILD | | #if defined AC_APPLE_UNIVERSAL_BUILD | |
| # if defined __BIG_ENDIAN__ | | # if defined __BIG_ENDIAN__ | |
| # define WORDS_BIGENDIAN 1 | | # define WORDS_BIGENDIAN 1 | |
| # endif | | # endif | |
| #else | | #else | |
| # ifndef WORDS_BIGENDIAN | | # ifndef WORDS_BIGENDIAN | |
| /* # undef WORDS_BIGENDIAN */ | | /* # undef WORDS_BIGENDIAN */ | |
| # endif | | # endif | |
| | | | |
End of changes. 52 change blocks. |
| 64 lines changed or deleted | | 223 lines changed or added | |
|
| my_global.h | | my_global.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 */ | |
| | | | |
| /* 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 | |
| | | | |
|
| #ifndef EMBEDDED_LIBRARY | | /* | |
| #define HAVE_REPLICATION | | InnoDB depends on some MySQL internals which other plugins should not | |
| #define HAVE_EXTERNAL_CLIENT | | need. This is because of InnoDB's foreign key support, "safe" binlog | |
| #endif | | truncation, and other similar legacy features. | |
| | | | |
| #if defined( __EMX__) && !defined( MYSQL_SERVER) | | We define accessors for these internals unconditionally, but do not | |
| /* moved here to use below VOID macro redefinition */ | | expose them in mysql/plugin.h. They are declared in ha_innodb.h for | |
| #define INCL_BASE | | InnoDB's use. | |
| #define INCL_NOPMAPI | | */ | |
| #include <os2.h> | | #define INNODB_COMPATIBILITY_HOOKS | |
| #endif /* __EMX__ */ | | | |
| | | | |
| #ifdef __CYGWIN__ | | #ifdef __CYGWIN__ | |
| /* We use a Unix API, so pretend it's not Windows */ | | /* We use a Unix API, so pretend it's not Windows */ | |
| #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__ | |
| | | | |
| skipping to change at line 73 | | skipping to change at line 72 | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| #define C_MODE_START extern "C" { | | #define C_MODE_START extern "C" { | |
| #define C_MODE_END } | | #define C_MODE_END } | |
| #else | | #else | |
| #define C_MODE_START | | #define C_MODE_START | |
| #define C_MODE_END | | #define C_MODE_END | |
| #endif | | #endif | |
| | | | |
| #if defined(_WIN32) || defined(_WIN64) || defined(__WIN32__) || defined(WIN
32) | | #if defined(_WIN32) || defined(_WIN64) || defined(__WIN32__) || defined(WIN
32) | |
| #include <config-win.h> | | #include <config-win.h> | |
|
| #elif defined(OS2) | | | |
| #include <config-os2.h> | | | |
| #elif defined(__NETWARE__) | | #elif defined(__NETWARE__) | |
| #include <my_config.h> | | #include <my_config.h> | |
| #include <config-netware.h> | | #include <config-netware.h> | |
| #if defined(__cplusplus) && defined(inline) | | #if defined(__cplusplus) && defined(inline) | |
| #undef inline /* fix configure problem */ | | #undef inline /* fix configure problem */ | |
| #endif | | #endif | |
| #else | | #else | |
| #include <my_config.h> | | #include <my_config.h> | |
| #if defined(__cplusplus) && defined(inline) | | #if defined(__cplusplus) && defined(inline) | |
| #undef inline /* fix configure problem */ | | #undef inline /* fix configure problem */ | |
| #endif | | #endif | |
| #endif /* _WIN32... */ | | #endif /* _WIN32... */ | |
| | | | |
| /* Make it easier to add conditionl code for windows */ | | /* Make it easier to add conditionl code for windows */ | |
| #ifdef __WIN__ | | #ifdef __WIN__ | |
| #define IF_WIN(A,B) (A) | | #define IF_WIN(A,B) (A) | |
| #else | | #else | |
| #define IF_WIN(A,B) (B) | | #define IF_WIN(A,B) (B) | |
| #endif | | #endif | |
| | | | |
|
| | | #ifndef EMBEDDED_LIBRARY | |
| | | #ifdef WITH_NDB_BINLOG | |
| | | #define HAVE_NDB_BINLOG 1 | |
| | | #endif | |
| | | #endif /* !EMBEDDED_LIBRARY */ | |
| | | | |
| | | #ifndef EMBEDDED_LIBRARY | |
| | | #define HAVE_REPLICATION | |
| | | #define HAVE_EXTERNAL_CLIENT | |
| | | #endif | |
| | | | |
| /* Some defines to avoid ifdefs in the code */ | | /* Some defines to avoid ifdefs in the code */ | |
| #ifndef NETWARE_YIELD | | #ifndef NETWARE_YIELD | |
| #define NETWARE_YIELD | | #define NETWARE_YIELD | |
| #define NETWARE_SET_SCREEN_MODE(A) | | #define NETWARE_SET_SCREEN_MODE(A) | |
| #endif | | #endif | |
| | | | |
| /* 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 | |
| | | | |
| skipping to change at line 152 | | skipping to change at line 160 | |
| 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 likely(x) __builtin_expect((x),1) | |
| #define unlikely(x) __builtin_expect((x),0) | | #define unlikely(x) __builtin_expect((x),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(UNDEF_THREADS_HACK) | | #if defined(MYSQL_CLIENT_NO_THREADS) || defined(UNDEF_THREADS_HACK) | |
| #undef THREAD | | #undef THREAD | |
|
| #undef HAVE_mit_thread | | | |
| #undef HAVE_LINUXTHREADS | | #undef HAVE_LINUXTHREADS | |
| #undef HAVE_NPTL | | #undef HAVE_NPTL | |
|
| #undef HAVE_UNIXWARE7_THREADS | | | |
| #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 | |
| | | | |
| #define __EXTENSIONS__ 1 /* We want some extension */ | | #define __EXTENSIONS__ 1 /* We want some extension */ | |
| #ifndef __STDC_EXT__ | | #ifndef __STDC_EXT__ | |
| #define __STDC_EXT__ 1 /* To get large file support on hpux */ | | #define __STDC_EXT__ 1 /* To get large file support on hpux */ | |
| | | | |
| skipping to change at line 217 | | skipping to change at line 323 | |
| Cleaner solutions are welcome. | | Cleaner solutions are welcome. | |
| */ | | */ | |
| #ifdef __sun | | #ifdef __sun | |
| #if __STDC_VERSION__ - 0 >= 199901L | | #if __STDC_VERSION__ - 0 >= 199901L | |
| #define _XOPEN_SOURCE 600 | | #define _XOPEN_SOURCE 600 | |
| #else | | #else | |
| #define _XOPEN_SOURCE 500 | | #define _XOPEN_SOURCE 500 | |
| #endif | | #endif | |
| #endif | | #endif | |
| | | | |
|
| #if defined(THREAD) && !defined(__WIN__) && !defined(OS2) | | #if defined(THREAD) && !defined(__WIN__) | |
| #ifndef _POSIX_PTHREAD_SEMANTICS | | #ifndef _POSIX_PTHREAD_SEMANTICS | |
| #define _POSIX_PTHREAD_SEMANTICS /* We want posix threads */ | | #define _POSIX_PTHREAD_SEMANTICS /* We want posix threads */ | |
| #endif | | #endif | |
| | | | |
| #if !defined(SCO) | | #if !defined(SCO) | |
| #define _REENTRANT 1 /* Some thread libraries require this */ | | #define _REENTRANT 1 /* Some thread libraries require this */ | |
| #endif | | #endif | |
| #if !defined(_THREAD_SAFE) && !defined(_AIX) | | #if !defined(_THREAD_SAFE) && !defined(_AIX) | |
| #define _THREAD_SAFE /* Required for OSF1 */ | | #define _THREAD_SAFE /* Required for OSF1 */ | |
| #endif | | #endif | |
|
| #ifndef HAVE_mit_thread | | | |
| #ifdef HAVE_UNIXWARE7_THREADS | | | |
| #include <thread.h> | | | |
| #else | | | |
| #if defined(HPUX10) || defined(HPUX11) | | #if defined(HPUX10) || defined(HPUX11) | |
| C_MODE_START /* HPUX needs this, signal.h bug */ | | C_MODE_START /* HPUX needs this, signal.h bug */ | |
| #include <pthread.h> | | #include <pthread.h> | |
| C_MODE_END | | C_MODE_END | |
| #else | | #else | |
| #include <pthread.h> /* AIX must have this included first */ | | #include <pthread.h> /* AIX must have this included first */ | |
| #endif | | #endif | |
|
| #endif /* HAVE_UNIXWARE7_THREADS */ | | | |
| #endif /* HAVE_mit_thread */ | | | |
| #if !defined(SCO) && !defined(_REENTRANT) | | #if !defined(SCO) && !defined(_REENTRANT) | |
| #define _REENTRANT 1 /* Threads requires reentrant code */ | | #define _REENTRANT 1 /* Threads requires reentrant code */ | |
| #endif | | #endif | |
| #endif /* THREAD */ | | #endif /* THREAD */ | |
| | | | |
| /* Go around some bugs in different OS and compilers */ | | /* Go around some bugs in different OS and compilers */ | |
| #ifdef _AIX /* By soren@t.dk */ | | #ifdef _AIX /* By soren@t.dk */ | |
| #define _H_STRINGS | | #define _H_STRINGS | |
| #define _SYS_STREAM_H | | #define _SYS_STREAM_H | |
| /* #define _AIX32_CURSES */ /* XXX: this breaks AIX 4.3.3 (others?). */ | | /* #define _AIX32_CURSES */ /* XXX: this breaks AIX 4.3.3 (others?). */ | |
| | | | |
| skipping to change at line 355 | | skipping to change at line 455 | |
| #ifdef HAVE_UNISTD_H | | #ifdef HAVE_UNISTD_H | |
| #include <unistd.h> | | #include <unistd.h> | |
| #endif | | #endif | |
| #if defined(__cplusplus) && defined(NO_CPLUSPLUS_ALLOCA) | | #if defined(__cplusplus) && defined(NO_CPLUSPLUS_ALLOCA) | |
| #undef HAVE_ALLOCA | | #undef HAVE_ALLOCA | |
| #undef HAVE_ALLOCA_H | | #undef HAVE_ALLOCA_H | |
| #endif | | #endif | |
| #ifdef HAVE_ALLOCA_H | | #ifdef HAVE_ALLOCA_H | |
| #include <alloca.h> | | #include <alloca.h> | |
| #endif | | #endif | |
|
| #ifdef HAVE_ATOMIC_ADD | | | |
| #define new my_arg_new | | | |
| #define need_to_restore_new 1 | | | |
| C_MODE_START | | | |
| #include <asm/atomic.h> | | | |
| C_MODE_END | | | |
| #ifdef need_to_restore_new /* probably safer than #ifdef new */ | | | |
| #undef new | | | |
| #undef need_to_restore_new | | | |
| #endif | | | |
| #endif | | | |
| #include <errno.h> /* Recommended by debian */ | | #include <errno.h> /* Recommended by debian */ | |
| /* We need the following to go around a problem with openssl on solaris */ | | /* We need the following to go around a problem with openssl on solaris */ | |
| #if defined(HAVE_CRYPT_H) | | #if defined(HAVE_CRYPT_H) | |
| #include <crypt.h> | | #include <crypt.h> | |
| #endif | | #endif | |
| | | | |
| /* | | /* | |
| A lot of our programs uses asserts, so better to always include it | | A lot of our programs uses asserts, so better to always include it | |
| This also fixes a problem when people uses DBUG_ASSERT without including | | This also fixes a problem when people uses DBUG_ASSERT without including | |
| assert.h | | assert.h | |
| */ | | */ | |
| #include <assert.h> | | #include <assert.h> | |
| | | | |
|
| | | /* an assert that works at compile-time. only for constant expression */ | |
| | | #ifndef __GNUC__ | |
| | | #define compile_time_assert(X) do { } while(0) | |
| | | #else | |
| | | #define compile_time_assert(X) \ | |
| | | do \ | |
| | | { \ | |
| | | char compile_time_assert[(X) ? 1 : -1] \ | |
| | | __attribute__ ((unused)); \ | |
| | | } while(0) | |
| | | #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) | |
| | | #define _LARGEFILE64_SOURCE | |
| | | #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 | |
|
| #ifdef DONT_USE_FINITE /* HPUX 11.x has is_finite() */ | | | |
| #undef HAVE_FINITE | | | |
| #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 | |
| | | | |
| | | | |
| skipping to change at line 421 | | skipping to change at line 523 | |
| #endif | | #endif | |
| | | | |
| /* We can not live without the following defines */ | | /* We can not live without the following defines */ | |
| | | | |
| #define USE_MYFUNC 1 /* Must use syscall indirection */ | | #define USE_MYFUNC 1 /* Must use syscall indirection */ | |
| #define MASTER 1 /* Compile without unireg */ | | #define MASTER 1 /* Compile without unireg */ | |
| #define ENGLISH 1 /* Messages in English */ | | #define ENGLISH 1 /* Messages in English */ | |
| #define POSIX_MISTAKE 1 /* regexp: Fix stupid spec error */ | | #define POSIX_MISTAKE 1 /* regexp: Fix stupid spec error */ | |
| #define USE_REGEX 1 /* We want the use the regex library */ | | #define USE_REGEX 1 /* We want the use the regex library */ | |
| /* Do not define for ultra sparcs */ | | /* Do not define for ultra sparcs */ | |
|
| #ifndef OS2 | | | |
| #define USE_BMOVE512 1 /* Use this unless system bmove is faster */ | | #define USE_BMOVE512 1 /* Use this unless system bmove is faster */ | |
|
| #endif | | | |
| | | | |
| #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 | |
| | | | |
| | | | |
| skipping to change at line 475 | | skipping to change at line 575 | |
| #else | | #else | |
| #define UNINIT_VAR(x) x= x | | #define UNINIT_VAR(x) x= x | |
| #endif | | #endif | |
| | | | |
| /* Define some useful general macros */ | | /* Define some useful general macros */ | |
| #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 | |
| | | | |
|
| #if defined(__EMX__) || !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 CMP_NUM(a,b) (((a) < (b)) ? -1 : ((a) == (b)) ? 0 : 1) | | #define CMP_NUM(a,b) (((a) < (b)) ? -1 : ((a) == (b)) ? 0 : 1) | |
| #define sgn(a) (((a) < 0) ? -1 : ((a) > 0) ? 1 : 0) | | #define sgn(a) (((a) < 0) ? -1 : ((a) > 0) ? 1 : 0) | |
|
| #define swap_variables(t, a, b) { register t dummy; dummy= a; a= b; b= dumm
y; } | | #define swap_variables(t, a, b) { t dummy; dummy= a; a= b; b= 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 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]))) | |
| | | | |
| /* Define some general constants */ | | /* Define some general constants */ | |
| #ifndef TRUE | | #ifndef TRUE | |
| #define TRUE (1) /* Logical true */ | | #define TRUE (1) /* Logical true */ | |
| | | | |
| skipping to change at line 533 | | skipping to change at line 633 | |
| /* From old s-system.h */ | | /* From old s-system.h */ | |
| | | | |
| /* | | /* | |
| Support macros for non ansi & other old compilers. Since such | | Support macros for non ansi & other old compilers. Since such | |
| things are no longer supported we do nothing. We keep then since | | things are no longer supported we do nothing. We keep then since | |
| some of our code may still be needed to upgrade old customers. | | some of our code may still be needed to upgrade old customers. | |
| */ | | */ | |
| #define _VARARGS(X) X | | #define _VARARGS(X) X | |
| #define _STATIC_VARARGS(X) X | | #define _STATIC_VARARGS(X) X | |
| | | | |
|
| | | /* 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 | |
| | | | |
| skipping to change at line 580 | | skipping to change at line 681 | |
| typedef int pchar; /* Mixed prototypes can't take char */ | | typedef int pchar; /* Mixed prototypes can't take char */ | |
| typedef uint puchar; /* Mixed prototypes can't take char */ | | typedef uint puchar; /* Mixed prototypes can't take char */ | |
| typedef int pbool; /* Mixed prototypes can't take char */ | | typedef int pbool; /* Mixed prototypes can't take char */ | |
| typedef int pshort; /* Mixed prototypes can't take short int */ | | typedef int pshort; /* Mixed prototypes can't take short int */ | |
| typedef double pfloat; /* Mixed prototypes can't take float */ | | typedef double pfloat; /* Mixed prototypes can't take float */ | |
| #endif | | #endif | |
| C_MODE_START | | C_MODE_START | |
| typedef int (*qsort_cmp)(const void *,const void *); | | typedef int (*qsort_cmp)(const void *,const void *); | |
| typedef int (*qsort_cmp2)(void*, const void *,const void *); | | typedef int (*qsort_cmp2)(void*, const void *,const void *); | |
| C_MODE_END | | C_MODE_END | |
|
| #ifdef HAVE_mit_thread | | | |
| #define qsort_t void | | | |
| #undef QSORT_TYPE_IS_VOID | | | |
| #define QSORT_TYPE_IS_VOID | | | |
| #else | | | |
| #define qsort_t RETQSORTTYPE /* Broken GCC cant handle typedef !!!! */ | | #define qsort_t RETQSORTTYPE /* Broken GCC cant handle typedef !!!! */ | |
|
| #endif | | | |
| #ifdef HAVE_mit_thread | | | |
| #define size_socket socklen_t /* Type of last arg to accept */ | | | |
| #else | | | |
| #ifdef HAVE_SYS_SOCKET_H | | #ifdef HAVE_SYS_SOCKET_H | |
| #include <sys/socket.h> | | #include <sys/socket.h> | |
| #endif | | #endif | |
| typedef SOCKET_SIZE_TYPE size_socket; | | typedef SOCKET_SIZE_TYPE size_socket; | |
|
| #endif | | | |
| | | | |
| #ifndef SOCKOPT_OPTLEN_TYPE | | #ifndef SOCKOPT_OPTLEN_TYPE | |
| #define SOCKOPT_OPTLEN_TYPE size_socket | | #define SOCKOPT_OPTLEN_TYPE size_socket | |
| #endif | | #endif | |
| | | | |
| /* file create flags */ | | /* file create flags */ | |
| | | | |
| #ifndef O_SHARE /* Probably not windows */ | | #ifndef O_SHARE /* Probably not windows */ | |
| #define O_SHARE 0 /* Flag to my_open for shared files
*/ | | #define O_SHARE 0 /* Flag to my_open for shared files
*/ | |
| #ifndef O_BINARY | | #ifndef O_BINARY | |
| | | | |
| skipping to change at line 642 | | skipping to change at line 733 | |
| #endif /* __WIN__ */ | | #endif /* __WIN__ */ | |
| | | | |
| /* #define USE_RECORD_LOCK */ | | /* #define USE_RECORD_LOCK */ | |
| | | | |
| /* Unsigned types supported by the compiler */ | | /* Unsigned types supported by the compiler */ | |
| #define UNSINT8 /* unsigned int8 (char) */ | | #define UNSINT8 /* unsigned int8 (char) */ | |
| #define UNSINT16 /* unsigned int16 */ | | #define UNSINT16 /* unsigned int16 */ | |
| #define UNSINT32 /* unsigned int32 */ | | #define UNSINT32 /* unsigned int32 */ | |
| | | | |
| /* General constants */ | | /* General constants */ | |
|
| #define SC_MAXWIDTH 256 /* Max width of screen (for error messages)
*/ | | | |
| #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 */ | |
| | | | |
| #ifndef FN_LIBCHAR | | #ifndef FN_LIBCHAR | |
|
| #ifdef __EMX__ | | | |
| #define FN_LIBCHAR '\\' | | | |
| #define FN_ROOTDIR "\\" | | | |
| #else | | | |
| #define FN_LIBCHAR '/' | | #define FN_LIBCHAR '/' | |
| #define FN_ROOTDIR "/" | | #define FN_ROOTDIR "/" | |
| #endif | | #endif | |
|
| #endif | | | |
| #define MY_NFILE 64 /* This is only used to save filenames */ | | #define MY_NFILE 64 /* This is only used to save filenames */ | |
| #ifndef OS_FILE_LIMIT | | #ifndef OS_FILE_LIMIT | |
| #define OS_FILE_LIMIT 65535 | | #define OS_FILE_LIMIT 65535 | |
| #endif | | #endif | |
| | | | |
| /* #define EXT_IN_LIBNAME */ | | /* #define EXT_IN_LIBNAME */ | |
| /* #define FN_NO_CASE_SENCE */ | | /* #define FN_NO_CASE_SENCE */ | |
| /* #define FN_UPPER_CASE TRUE */ | | /* #define FN_UPPER_CASE TRUE */ | |
| | | | |
| /* | | /* | |
| | | | |
| skipping to change at line 706 | | skipping to change at line 791 | |
| #define NO_HASH /* Not needed anymore */ | | #define NO_HASH /* Not needed anymore */ | |
| #ifdef __WIN__ | | #ifdef __WIN__ | |
| #define NO_DIR_LIBRARY /* Not standar dir-library */ | | #define NO_DIR_LIBRARY /* Not standar dir-library */ | |
| #define USE_MY_STAT_STRUCT /* For my_lib */ | | #define USE_MY_STAT_STRUCT /* For my_lib */ | |
| #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__ | |
|
| #ifdef OS2 | | | |
| #define closesocket(A) soclose(A) | | | |
| #else | | | |
| #define closesocket(A) close(A) | | #define closesocket(A) close(A) | |
|
| #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 | | #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 */ | | #define SET_STACK_SIZE(X) /* Not needed on real machines */ | |
| | | | |
|
| #if !defined(HAVE_mit_thread) && !defined(HAVE_STRTOK_R) | | #ifndef STACK_DIRECTION | |
| #define strtok_r(A,B,C) strtok((A),(B)) | | #error "please add -DSTACK_DIRECTION=1 or -1 to your CPPFLAGS" | |
| #endif | | #endif | |
| | | | |
|
| /* Remove some things that mit_thread break or doesn't support */ | | #if !defined(HAVE_STRTOK_R) | |
| #if defined(HAVE_mit_thread) && defined(THREAD) | | #define strtok_r(A,B,C) strtok((A),(B)) | |
| #undef HAVE_PREAD | | | |
| #undef HAVE_REALPATH | | | |
| #undef HAVE_MLOCK | | | |
| #undef HAVE_TEMPNAM /* Use ours */ | | | |
| #undef HAVE_PTHREAD_SETPRIO | | | |
| #undef HAVE_FTRUNCATE | | | |
| #undef HAVE_READLINK | | | |
| #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 | |
| | | | |
| skipping to change at line 790 | | skipping to change at line 864 | |
| /* 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 HAVE_FINITE | | #ifndef isfinite | |
| | | #ifdef HAVE_FINITE | |
| | | #define isfinite(x) finite(x) | |
| | | #else | |
| #define finite(x) (1.0 / fabs(x) > 0.0) | | #define finite(x) (1.0 / fabs(x) > 0.0) | |
|
| #endif | | #endif /* HAVE_FINITE */ | |
| | | #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 */ | | /* Check if C compiler is affected by GCC bug #39228 */ | |
| #if !defined(__cplusplus) && defined(HAVE_BROKEN_ISINF) | | #if !defined(__cplusplus) && defined(HAVE_BROKEN_ISINF) | |
| /* Force store/reload of the argument to/from a 64-bit double */ | | /* Force store/reload of the argument to/from a 64-bit double */ | |
| static inline double my_isinf(double x) | | static inline double my_isinf(double x) | |
| | | | |
| skipping to change at line 845 | | skipping to change at line 923 | |
| #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))) | | #define ALIGN_PTR(A, t) ((t*) MY_ALIGN((A),sizeof(t))) | |
| /* Offset of field f in structure t */ | | /* Offset of field f in structure t */ | |
| #define OFFSET(t, f) ((size_t)(char *)&((t *)0)->f) | | #define OFFSET(t, f) ((size_t)(char *)&((t *)0)->f) | |
|
| #define ADD_TO_PTR(ptr,size,type) (type) ((byte*) (ptr)+size) | | #define ADD_TO_PTR(ptr,size,type) (type) ((uchar*) (ptr)+size) | |
| #define PTR_BYTE_DIFF(A,B) (my_ptrdiff_t) ((byte*) (A) - (byte*) (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 | |
| | | | |
| skipping to change at line 881 | | skipping to change at line 962 | |
| #endif | | #endif | |
| #if defined(__IBMC__) || defined(__IBMCPP__) | | #if defined(__IBMC__) || defined(__IBMCPP__) | |
| /* This was _System _Export but caused a lot of warnings on _AIX43 */ | | /* This was _System _Export but caused a lot of warnings on _AIX43 */ | |
| #define STDCALL | | #define STDCALL | |
| #elif !defined( STDCALL) | | #elif !defined( STDCALL) | |
| #define STDCALL | | #define STDCALL | |
| #endif | | #endif | |
| | | | |
| /* Typdefs for easyier portability */ | | /* Typdefs for easyier portability */ | |
| | | | |
|
| #if defined(VOIDTYPE) | | | |
| typedef void *gptr; /* Generic pointer */ | | | |
| #else | | | |
| typedef char *gptr; /* Generic pointer */ | | | |
| #endif | | | |
| #ifndef HAVE_INT_8_16_32 | | | |
| typedef signed char int8; /* Signed integer >= 8 bits */ | | | |
| typedef short int16; /* Signed integer >= 16 bits */ | | | |
| #endif | | | |
| #ifndef HAVE_UCHAR | | #ifndef HAVE_UCHAR | |
| typedef unsigned char uchar; /* Short for unsigned char */ | | typedef unsigned char uchar; /* Short for unsigned char */ | |
| #endif | | #endif | |
|
| typedef unsigned char uint8; /* Short for unsigned integer >= 8 bits */ | | | |
| typedef unsigned short uint16; /* Short for unsigned integer >= 16 bits */ | | | |
| | | | |
|
| | | #ifndef HAVE_INT8 | |
| | | typedef signed char int8; /* Signed integer >= 8 bits */ | |
| | | #endif | |
| | | #ifndef HAVE_UINT8 | |
| | | typedef unsigned char uint8; /* Unsigned integer >= 8 bits */ | |
| | | #endif | |
| | | #ifndef HAVE_INT16 | |
| | | typedef short int16; | |
| | | #endif | |
| | | #ifndef HAVE_UINT16 | |
| | | typedef unsigned short uint16; | |
| | | #endif | |
| #if SIZEOF_INT == 4 | | #if SIZEOF_INT == 4 | |
|
| #ifndef HAVE_INT_8_16_32 | | #ifndef HAVE_INT32 | |
| typedef int int32; | | typedef int int32; | |
| | | #endif | |
| | | #ifndef HAVE_UINT32 | |
| | | typedef unsigned int uint32; | |
| #endif | | #endif | |
|
| typedef unsigned int uint32; /* Short for unsigned integer >= 32 bits */ | | | |
| #elif SIZEOF_LONG == 4 | | #elif SIZEOF_LONG == 4 | |
|
| #ifndef HAVE_INT_8_16_32 | | #ifndef HAVE_INT32 | |
| typedef long int32; | | typedef long int32; | |
| | | #endif | |
| | | #ifndef HAVE_UINT32 | |
| | | typedef unsigned long uint32; | |
| #endif | | #endif | |
|
| typedef unsigned long uint32; /* Short for unsigned integer >= 32 bits */ | | | |
| #else | | #else | |
|
| #error "Neither int or long is of 4 bytes width" | | #error Neither int or long is of 4 bytes width | |
| #endif | | #endif | |
| | | | |
|
| #if !defined(HAVE_ULONG) && !defined(TARGET_OS_LINUX) && !defined(__USE_MIS
C) | | #if !defined(HAVE_ULONG) && !defined(__USE_MISC) | |
| typedef unsigned long ulong; /* Short for unsigned long */ | | typedef unsigned long ulong; /* Short for unsigned long */ | |
| #endif | | #endif | |
| #ifndef longlong_defined | | #ifndef longlong_defined | |
| /* | | /* | |
| Using [unsigned] long long is preferable as [u]longlong because we use | | Using [unsigned] long long is preferable as [u]longlong because we use | |
| [unsigned] long long unconditionally in many places, | | [unsigned] long long unconditionally in many places, | |
| for example in constants with [U]LL suffix. | | for example in constants with [U]LL suffix. | |
| */ | | */ | |
| #if defined(HAVE_LONG_LONG) && SIZEOF_LONG_LONG == 8 | | #if defined(HAVE_LONG_LONG) && SIZEOF_LONG_LONG == 8 | |
| typedef unsigned long long int ulonglong; /* ulong or unsigned long long */ | | typedef unsigned long long int ulonglong; /* ulong or unsigned long long */ | |
| typedef long long int longlong; | | typedef long long int longlong; | |
| #else | | #else | |
| typedef unsigned long ulonglong; /* ulong or unsigned long long */ | | typedef unsigned long ulonglong; /* ulong or unsigned long long */ | |
| typedef long longlong; | | typedef long longlong; | |
| #endif | | #endif | |
| #endif | | #endif | |
|
| | | #ifndef HAVE_INT64 | |
| | | typedef longlong int64; | |
| | | #endif | |
| | | #ifndef HAVE_UINT64 | |
| | | typedef ulonglong uint64; | |
| | | #endif | |
| | | | |
| #if defined(NO_CLIENT_LONG_LONG) | | #if defined(NO_CLIENT_LONG_LONG) | |
| typedef unsigned long my_ulonglong; | | typedef unsigned long my_ulonglong; | |
| #elif defined (__WIN__) | | #elif defined (__WIN__) | |
| typedef unsigned __int64 my_ulonglong; | | typedef unsigned __int64 my_ulonglong; | |
| #else | | #else | |
| typedef unsigned long long my_ulonglong; | | typedef unsigned long long my_ulonglong; | |
| #endif | | #endif | |
| | | | |
|
| | | #if SIZEOF_CHARP == SIZEOF_INT | |
| | | typedef int intptr; | |
| | | #elif SIZEOF_CHARP == SIZEOF_LONG | |
| | | typedef long intptr; | |
| | | #elif SIZEOF_CHARP == SIZEOF_LONG_LONG | |
| | | typedef long long intptr; | |
| | | #else | |
| | | #error sizeof(void *) is neither sizeof(int) nor sizeof(long) nor sizeof(lo | |
| | | ng long) | |
| | | #endif | |
| | | | |
| | | #define MY_ERRPTR ((void*)(intptr)1) | |
| | | | |
| #ifdef USE_RAID | | #ifdef USE_RAID | |
| /* | | /* | |
| The following is done with a if to not get problems with pre-processors | | The following is done with a if to not get problems with pre-processors | |
| with late define evaluation | | with late define evaluation | |
| */ | | */ | |
| #if SIZEOF_OFF_T == 4 | | #if SIZEOF_OFF_T == 4 | |
| #define SYSTEM_SIZEOF_OFF_T 4 | | #define SYSTEM_SIZEOF_OFF_T 4 | |
| #else | | #else | |
| #define SYSTEM_SIZEOF_OFF_T 8 | | #define SYSTEM_SIZEOF_OFF_T 8 | |
| #endif | | #endif | |
| | | | |
| skipping to change at line 958 | | skipping to change at line 1062 | |
| #else | | #else | |
| #define SYSTEM_SIZEOF_OFF_T SIZEOF_OFF_T | | #define SYSTEM_SIZEOF_OFF_T SIZEOF_OFF_T | |
| #endif /* USE_RAID */ | | #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 | |
| #define MY_FILEPOS_ERROR (~(my_off_t) 0) | | #define MY_FILEPOS_ERROR (~(my_off_t) 0) | |
|
| #if !defined(__WIN__) && !defined(OS2) | | #if !defined(__WIN__) | |
| typedef off_t os_off_t; | | typedef off_t os_off_t; | |
| #endif | | #endif | |
| | | | |
| #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 | |
|
| #elif defined(OS2) | | | |
| #define socket_errno sock_errno() | | | |
| #define SOCKET_EINTR SOCEINTR | | | |
| #define SOCKET_EAGAIN SOCEINPROGRESS | | | |
| #define SOCKET_ETIMEDOUT SOCKET_EINTR | | | |
| #define SOCKET_EWOULDBLOCK SOCEWOULDBLOCK | | | |
| #define SOCKET_EADDRINUSE SOCEADDRINUSE | | | |
| #define SOCKET_ENFILE SOCENFILE | | | |
| #define SOCKET_EMFILE SOCEMFILE | | | |
| #define closesocket(A) soclose(A) | | | |
| #else /* Unix */ | | #else /* Unix */ | |
| #define socket_errno errno | | #define socket_errno errno | |
| #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 uint8 int7; /* Most effective integer 0 <= x <= 127 */ | |
| typedef short int15; /* Most effective integer 0 <= x <= 32767 */ | | typedef short int15; /* Most effective integer 0 <= x <= 32767 */ | |
|
| typedef char *my_string; /* String of characters */ | | | |
| typedef unsigned long size_s; /* Size of strings (In string-funcs) */ | | | |
| typedef int myf; /* Type of MyFlags in my_funcs */ | | typedef int myf; /* Type of MyFlags in my_funcs */ | |
|
| #ifndef byte_defined | | | |
| typedef char byte; /* Smallest addressable unit */ | | | |
| #endif | | | |
| typedef char my_bool; /* Small bool */ | | typedef char my_bool; /* Small bool */ | |
| #if !defined(bool) && (!defined(HAVE_BOOL) || !defined(__cplusplus)) | | #if !defined(bool) && (!defined(HAVE_BOOL) || !defined(__cplusplus)) | |
| typedef char bool; /* Ordinary boolean values 0 1 */ | | typedef char bool; /* Ordinary boolean values 0 1 */ | |
| #endif | | #endif | |
| /* Macros for converting *constants* to the right type */ | | /* Macros for converting *constants* to the right type */ | |
| #define INT8(v) (int8) (v) | | #define INT8(v) (int8) (v) | |
| #define INT16(v) (int16) (v) | | #define INT16(v) (int16) (v) | |
| #define INT32(v) (int32) (v) | | #define INT32(v) (int32) (v) | |
| #define MYF(v) (myf) (v) | | #define MYF(v) (myf) (v) | |
| | | | |
| | | | |
| skipping to change at line 1061 | | skipping to change at line 1150 | |
| Sometimes we want to make sure that the variable is not put into | | 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 | | a register in debugging mode so we can see its value in the core | |
| */ | | */ | |
| | | | |
| #ifndef DBUG_OFF | | #ifndef DBUG_OFF | |
| #define dbug_volatile volatile | | #define dbug_volatile volatile | |
| #else | | #else | |
| #define dbug_volatile | | #define dbug_volatile | |
| #endif | | #endif | |
| | | | |
|
| | | /* Some helper macros */ | |
| | | #define YESNO(X) ((X) ? "yes" : "no") | |
| | | | |
| /* Defines for time function */ | | /* Defines for time function */ | |
| #define SCALE_SEC 100 | | #define SCALE_SEC 100 | |
| #define SCALE_USEC 10000 | | #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 1000 /* 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) | |
| */ | | */ | |
| | | | |
| skipping to change at line 1104 | | skipping to change at line 1196 | |
| 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) (*((unsigned int *) (A)) & 0xFFFFFF) | |
| #endif /* HAVE_purify && !_WIN32 */ | | #endif /* HAVE_purify && !_WIN32 */ | |
| #define uint4korr(A) (*((uint32 *) (A))) | | #define uint4korr(A) (*((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])) | |
| | | + \ | |
| | | (((uint32) ((uchar) (A)[1])) << 8) | |
| | | + \ | |
| | | (((uint32) ((uchar) (A)[2])) << 16) | |
| | | + \ | |
| | | (((uint32) ((uchar) (A)[3])) << 24) | |
| | | ) + \ | |
| | | (((ulonglong) ((uchar) (A)[4])) << 32) + \ | |
| | | (((ulonglong) ((uchar) (A)[5])) << 40)) | |
| #define uint8korr(A) (*((ulonglong *) (A))) | | #define uint8korr(A) (*((ulonglong *) (A))) | |
| #define sint8korr(A) (*((longlong *) (A))) | | #define sint8korr(A) (*((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) | |
|
| | | #define int6store(T,A) do { *(T)= (uchar)((A)); \ | |
| | | *((T)+1)=(uchar) (((A) >> 8)); \ | |
| | | *((T)+2)=(uchar) (((A) >> 16)); \ | |
| | | *((T)+3)=(uchar) (((A) >> 24)); \ | |
| | | *((T)+4)=(uchar) (((A) >> 32)); \ | |
| | | *((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] = *((long*)(M)); \ | |
| _tmp.m[1] = *(((long*) (M))+1); \ | | _tmp.m[1] = *(((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) = ((doubleget_union *)&V)->m[0]
; \ | |
| *(((long *) T)+1) = ((doubleget_union *)&V)->m[
1]; \ | | *(((long *) T)+1) = ((doubleget_union *)&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)) = *((float*) (M)); } while(
0) | |
| #define float8get(V,M) doubleget((V),(M)) | | #define float8get(V,M) doubleget((V),(M)) | |
|
| #define float4store(V,M) memcpy((byte*) V,(byte*) (&M),sizeof(float)) | | #define float4store(V,M) memcpy((uchar*) V,(uchar*) (&M),sizeof(float)) | |
| #define floatstore(T,V) memcpy((byte*)(T), (byte*)(&V),sizeof(float)) | | #define floatstore(T,V) memcpy((uchar*)(T), (uchar*)(&V),sizeof(float)) | |
| #define floatget(V,M) memcpy((byte*) &V,(byte*) (M),sizeof(float)) | | #define floatget(V,M) memcpy((uchar*) &V,(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 1171 | | skipping to change at line 1275 | |
| (((uint32) ((uchar) (A)[2])) << 16)) | | (((uint32) ((uchar) (A)[2])) << 16)) | |
| #define uint4korr(A) (uint32) (((uint32) ((uchar) (A)[0])) +\ | | #define uint4korr(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) +\ | |
| (((uint32) ((uchar) (A)[3])) << 24)) | | (((uint32) ((uchar) (A)[3])) << 24)) | |
| #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])) | |
| | | + \ | |
| | | (((uint32) ((uchar) (A)[1])) << 8) | |
| | | + \ | |
| | | (((uint32) ((uchar) (A)[2])) << 16) | |
| | | + \ | |
| | | (((uint32) ((uchar) (A)[3])) << 24) | |
| | | ) + \ | |
| | | (((ulonglong) ((uchar) (A)[4])) << 32) + \ | |
| | | (((ulonglong) ((uchar) (A)[5])) << 40)) | |
| #define uint8korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) +\ | | #define uint8korr(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) (((uint32) ((uchar) (A)[4])) +\ | | (((ulonglong) (((uint32) ((uchar) (A)[4])) +\ | |
| (((uint32) ((uchar) (A)[5])) << 8) +\ | | (((uint32) ((uchar) (A)[5])) << 8) +\ | |
| (((uint32) ((uchar) (A)[6])) << 16) +\ | | (((uint32) ((uchar) (A)[6])) << 16) +\ | |
| (((uint32) ((uchar) (A)[7])) << 24))) <<
\ | | (((uint32) ((uchar) (A)[7])) << 24))) <<
\ | |
| 32)) | | 32)) | |
| #define int2store(T,A) do { uint def_temp= (uint) (A) ;\ | | #define int2store(T,A) do { uint def_temp= (uint) (A) ;\ | |
| | | | |
| skipping to change at line 1193 | | skipping to change at line 1303 | |
| } while(0) | | } while(0) | |
| #define int3store(T,A) do { /*lint -save -e734 */\ | | #define int3store(T,A) do { /*lint -save -e734 */\ | |
| *((uchar*)(T))=(uchar) ((A));\ | | *((uchar*)(T))=(uchar) ((A));\ | |
| *((uchar*) (T)+1)=(uchar) (((A) >> 8));\ | | *((uchar*) (T)+1)=(uchar) (((A) >> 8));\ | |
| *((uchar*)(T)+2)=(uchar) (((A) >> 16)); \ | | *((uchar*)(T)+2)=(uchar) (((A) >> 16)); \ | |
| /*lint -restore */} while(0) | | /*lint -restore */} while(0) | |
| #define int4store(T,A) do { *((char *)(T))=(char) ((A));\ | | #define int4store(T,A) do { *((char *)(T))=(char) ((A));\ | |
| *(((char *)(T))+1)=(char) (((A) >> 8));\ | | *(((char *)(T))+1)=(char) (((A) >> 8));\ | |
| *(((char *)(T))+2)=(char) (((A) >> 16));\ | | *(((char *)(T))+2)=(char) (((A) >> 16));\ | |
| *(((char *)(T))+3)=(char) (((A) >> 24));
} while(0) | | *(((char *)(T))+3)=(char) (((A) >> 24));
} while(0) | |
|
| #define int5store(T,A) do { *((char *)(T))=((A));\ | | #define int5store(T,A) do { *((char *)(T))= (char)((A)); \ | |
| *(((char *)(T))+1)=(((A) >> 8));\ | | *(((char *)(T))+1)= (char)(((A) >> 8)); \ | |
| *(((char *)(T))+2)=(((A) >> 16));\ | | *(((char *)(T))+2)= (char)(((A) >> 16)); | |
| *(((char *)(T))+3)=(((A) >> 24)); \ | | \ | |
| *(((char *)(T))+4)=(((A) >> 32)); } while | | *(((char *)(T))+3)= (char)(((A) >> 24)); | |
| (0) | | \ | |
| | | *(((char *)(T))+4)= (char)(((A) >> 32)); | |
| | | \ | |
| | | } while(0) | |
| | | #define int6store(T,A) do { *((char *)(T))= (char)((A)); \ | |
| | | *(((char *)(T))+1)= (char)(((A) >> 8)); \ | |
| | | *(((char *)(T))+2)= (char)(((A) >> 16)); | |
| | | \ | |
| | | *(((char *)(T))+3)= (char)(((A) >> 24)); | |
| | | \ | |
| | | *(((char *)(T))+4)= (char)(((A) >> 32)); | |
| | | \ | |
| | | *(((char *)(T))+5)= (char)(((A) >> 40)); | |
| | | \ | |
| | | } while(0) | |
| #define int8store(T,A) do { uint def_temp= (uint) (A), def_temp2= (ui
nt) ((A) >> 32); \ | | #define int8store(T,A) do { uint def_temp= (uint) (A), def_temp2= (ui
nt) ((A) >> 32); \ | |
| int4store((T),def_temp); \ | | int4store((T),def_temp); \ | |
| int4store((T+4),def_temp2); } while(0) | | int4store((T+4),def_temp2); } while(0) | |
| #ifdef WORDS_BIGENDIAN | | #ifdef WORDS_BIGENDIAN | |
|
| #define float4store(T,A) do { *(T)= ((byte *) &A)[3];\ | | #define float4store(T,A) do { *(T)= ((uchar *) &A)[3];\ | |
| *((T)+1)=(char) ((byte *) &A)[2];\ | | *((T)+1)=(char) ((uchar *) &A)[2];\ | |
| *((T)+2)=(char) ((byte *) &A)[1];\ | | *((T)+2)=(char) ((uchar *) &A)[1];\ | |
| *((T)+3)=(char) ((byte *) &A)[0]; } while(0) | | *((T)+3)=(char) ((uchar *) &A)[0]; } while(0) | |
| | | | |
| #define float4get(V,M) do { float def_temp;\ | | #define float4get(V,M) do { float def_temp;\ | |
|
| ((byte*) &def_temp)[0]=(M)[3];\ | | ((uchar*) &def_temp)[0]=(M)[3];\ | |
| ((byte*) &def_temp)[1]=(M)[2];\ | | ((uchar*) &def_temp)[1]=(M)[2];\ | |
| ((byte*) &def_temp)[2]=(M)[1];\ | | ((uchar*) &def_temp)[2]=(M)[1];\ | |
| ((byte*) &def_temp)[3]=(M)[0];\ | | ((uchar*) &def_temp)[3]=(M)[0];\ | |
| (V)=def_temp; } while(0) | | (V)=def_temp; } while(0) | |
|
| #define float8store(T,V) do { *(T)= ((byte *) &V)[7];\ | | #define float8store(T,V) do { *(T)= ((uchar *) &V)[7];\ | |
| *((T)+1)=(char) ((byte *) &V)[6];\ | | *((T)+1)=(char) ((uchar *) &V)[6];\ | |
| *((T)+2)=(char) ((byte *) &V)[5];\ | | *((T)+2)=(char) ((uchar *) &V)[5];\ | |
| *((T)+3)=(char) ((byte *) &V)[4];\ | | *((T)+3)=(char) ((uchar *) &V)[4];\ | |
| *((T)+4)=(char) ((byte *) &V)[3];\ | | *((T)+4)=(char) ((uchar *) &V)[3];\ | |
| *((T)+5)=(char) ((byte *) &V)[2];\ | | *((T)+5)=(char) ((uchar *) &V)[2];\ | |
| *((T)+6)=(char) ((byte *) &V)[1];\ | | *((T)+6)=(char) ((uchar *) &V)[1];\ | |
| *((T)+7)=(char) ((byte *) &V)[0]; } while(0) | | *((T)+7)=(char) ((uchar *) &V)[0]; } while(0) | |
| | | | |
| #define float8get(V,M) do { double def_temp;\ | | #define float8get(V,M) do { double def_temp;\ | |
|
| ((byte*) &def_temp)[0]=(M)[7];\ | | ((uchar*) &def_temp)[0]=(M)[7];\ | |
| ((byte*) &def_temp)[1]=(M)[6];\ | | ((uchar*) &def_temp)[1]=(M)[6];\ | |
| ((byte*) &def_temp)[2]=(M)[5];\ | | ((uchar*) &def_temp)[2]=(M)[5];\ | |
| ((byte*) &def_temp)[3]=(M)[4];\ | | ((uchar*) &def_temp)[3]=(M)[4];\ | |
| ((byte*) &def_temp)[4]=(M)[3];\ | | ((uchar*) &def_temp)[4]=(M)[3];\ | |
| ((byte*) &def_temp)[5]=(M)[2];\ | | ((uchar*) &def_temp)[5]=(M)[2];\ | |
| ((byte*) &def_temp)[6]=(M)[1];\ | | ((uchar*) &def_temp)[6]=(M)[1];\ | |
| ((byte*) &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_fixed((byte*) &V,(byte*) (M),sizeof(float)) | | #define float4get(V,M) memcpy_fixed((uchar*) &V,(uchar*) (M),sizeof(float | |
| #define float4store(V,M) memcpy_fixed((byte*) V,(byte*) (&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) ((byte *) &V)[4];\ | | #define doublestore(T,V) do { *(((char*)T)+0)=(char) ((uchar *) &V)[4];\ | |
| *(((char*)T)+1)=(char) ((byte *) &V)[5];\ | | *(((char*)T)+1)=(char) ((uchar *) &V)[5];\ | |
| *(((char*)T)+2)=(char) ((byte *) &V)[6];\ | | *(((char*)T)+2)=(char) ((uchar *) &V)[6];\ | |
| *(((char*)T)+3)=(char) ((byte *) &V)[7];\ | | *(((char*)T)+3)=(char) ((uchar *) &V)[7];\ | |
| *(((char*)T)+4)=(char) ((byte *) &V)[0];\ | | *(((char*)T)+4)=(char) ((uchar *) &V)[0];\ | |
| *(((char*)T)+5)=(char) ((byte *) &V)[1];\ | | *(((char*)T)+5)=(char) ((uchar *) &V)[1];\ | |
| *(((char*)T)+6)=(char) ((byte *) &V)[2];\ | | *(((char*)T)+6)=(char) ((uchar *) &V)[2];\ | |
| *(((char*)T)+7)=(char) ((byte *) &V)[3]; }\ | | *(((char*)T)+7)=(char) ((uchar *) &V)[3]; }\ | |
| while(0) | | while(0) | |
| #define doubleget(V,M) do { double def_temp;\ | | #define doubleget(V,M) do { double def_temp;\ | |
|
| ((byte*) &def_temp)[0]=(M)[4];\ | | ((uchar*) &def_temp)[0]=(M)[4];\ | |
| ((byte*) &def_temp)[1]=(M)[5];\ | | ((uchar*) &def_temp)[1]=(M)[5];\ | |
| ((byte*) &def_temp)[2]=(M)[6];\ | | ((uchar*) &def_temp)[2]=(M)[6];\ | |
| ((byte*) &def_temp)[3]=(M)[7];\ | | ((uchar*) &def_temp)[3]=(M)[7];\ | |
| ((byte*) &def_temp)[4]=(M)[0];\ | | ((uchar*) &def_temp)[4]=(M)[0];\ | |
| ((byte*) &def_temp)[5]=(M)[1];\ | | ((uchar*) &def_temp)[5]=(M)[1];\ | |
| ((byte*) &def_temp)[6]=(M)[2];\ | | ((uchar*) &def_temp)[6]=(M)[2];\ | |
| ((byte*) &def_temp)[7]=(M)[3];\ | | ((uchar*) &def_temp)[7]=(M)[3];\ | |
| (V) = def_temp; } while(0) | | (V) = def_temp; } while(0) | |
| #endif /* __FLOAT_WORD_ORDER */ | | #endif /* __FLOAT_WORD_ORDER */ | |
| | | | |
| #define float8get(V,M) doubleget((V),(M)) | | #define float8get(V,M) doubleget((V),(M)) | |
| #define float8store(V,M) doublestore((V),(M)) | | #define float8store(V,M) doublestore((V),(M)) | |
| #endif /* WORDS_BIGENDIAN */ | | #endif /* WORDS_BIGENDIAN */ | |
| | | | |
| #endif /* __i386__ OR _WIN32 */ | | #endif /* __i386__ OR _WIN32 */ | |
| | | | |
| /* | | /* | |
| | | | |
| skipping to change at line 1285 | | skipping to change at line 1403 | |
| register) variable, M is a pointer to byte | | register) variable, M is a pointer to byte | |
| */ | | */ | |
| | | | |
| #ifdef WORDS_BIGENDIAN | | #ifdef WORDS_BIGENDIAN | |
| | | | |
| #define ushortget(V,M) do { V = (uint16) (((uint16) ((uchar) (M)[1]))+\ | | #define ushortget(V,M) do { V = (uint16) (((uint16) ((uchar) (M)[1]))+\ | |
| ((uint16) ((uint16) (M)[0]) << 8)); } whil
e(0) | | ((uint16) ((uint16) (M)[0]) << 8)); } whil
e(0) | |
| #define shortget(V,M) do { V = (short) (((short) ((uchar) (M)[1]))+\ | | #define shortget(V,M) do { V = (short) (((short) ((uchar) (M)[1]))+\ | |
| ((short) ((short) (M)[0]) << 8)); } while(
0) | | ((short) ((short) (M)[0]) << 8)); } while(
0) | |
| #define longget(V,M) do { int32 def_temp;\ | | #define longget(V,M) do { int32 def_temp;\ | |
|
| ((byte*) &def_temp)[0]=(M)[0];\ | | ((uchar*) &def_temp)[0]=(M)[0];\ | |
| ((byte*) &def_temp)[1]=(M)[1];\ | | ((uchar*) &def_temp)[1]=(M)[1];\ | |
| ((byte*) &def_temp)[2]=(M)[2];\ | | ((uchar*) &def_temp)[2]=(M)[2];\ | |
| ((byte*) &def_temp)[3]=(M)[3];\ | | ((uchar*) &def_temp)[3]=(M)[3];\ | |
| (V)=def_temp; } while(0) | | (V)=def_temp; } while(0) | |
| #define ulongget(V,M) do { uint32 def_temp;\ | | #define ulongget(V,M) do { uint32 def_temp;\ | |
|
| ((byte*) &def_temp)[0]=(M)[0];\ | | ((uchar*) &def_temp)[0]=(M)[0];\ | |
| ((byte*) &def_temp)[1]=(M)[1];\ | | ((uchar*) &def_temp)[1]=(M)[1];\ | |
| ((byte*) &def_temp)[2]=(M)[2];\ | | ((uchar*) &def_temp)[2]=(M)[2];\ | |
| ((byte*) &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_fixed((byte*) &V,(byte*) (M),sizeof(float)) | | #define floatget(V,M) memcpy_fixed((uchar*) &V,(uchar*) (M),sizeof(float | |
| #define floatstore(T,V) memcpy_fixed((byte*) (T),(byte*)(&V),sizeof(float) | | )) | |
| ) | | #define floatstore(T,V) memcpy_fixed((uchar*) (T),(uchar*)(&V),sizeof(floa | |
| #define doubleget(V,M) memcpy_fixed((byte*) &V,(byte*) (M),sizeof(double)) | | t)) | |
| #define doublestore(T,V) memcpy_fixed((byte*) (T),(byte*) &V,sizeof(double) | | #define doubleget(V,M) memcpy_fixed((uchar*) &V,(uchar*) (M),sizeof(double | |
| ) | | )) | |
| #define longlongget(V,M) memcpy_fixed((byte*) &V,(byte*) (M),sizeof(ulonglo | | #define doublestore(T,V) memcpy_fixed((uchar*) (T),(uchar*) &V,sizeof(doubl | |
| ng)) | | e)) | |
| #define longlongstore(T,V) memcpy_fixed((byte*) (T),(byte*) &V,sizeof(ulong | | #define longlongget(V,M) memcpy_fixed((uchar*) &V,(uchar*) (M),sizeof(ulong | |
| long)) | | 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_fixed((byte*) (T),(byte*) (&V),sizeof(float | | #define floatstore(T,V) memcpy_fixed((uchar*) (T),(uchar*) (&V),sizeof(flo | |
| )) | | at)) | |
| #define floatget(V,M) memcpy_fixed((byte*) &V, (byte*) (M), sizeof(float | | #define floatget(V,M) memcpy_fixed((uchar*) &V, (uchar*) (M), sizeof(flo | |
| )) | | at)) | |
| #endif | | #endif | |
| #ifndef doubleget | | #ifndef doubleget | |
|
| #define doubleget(V,M) memcpy_fixed((byte*) &V,(byte*) (M),sizeof(double)) | | #define doubleget(V,M) memcpy_fixed((uchar*) &V,(uchar*) (M),sizeof(double | |
| #define doublestore(T,V) memcpy_fixed((byte*) (T),(byte*) &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_fixed((byte*) &V,(byte*) (M),sizeof(ulonglo | | #define longlongget(V,M) memcpy_fixed((uchar*) &V,(uchar*) (M),sizeof(ulong | |
| ng)) | | long)) | |
| #define longlongstore(T,V) memcpy_fixed((byte*) (T),(byte*) &V,sizeof(ulong | | #define longlongstore(T,V) memcpy_fixed((uchar*) (T),(uchar*) &V,sizeof(ulo | |
| long)) | | nglong)) | |
| | | | |
| #endif /* WORDS_BIGENDIAN */ | | #endif /* WORDS_BIGENDIAN */ | |
| | | | |
| /* sprintf does not always return the number of bytes :- */ | | /* sprintf does not always return the number of bytes :- */ | |
| #ifdef SPRINTF_RETURNS_INT | | #ifdef SPRINTF_RETURNS_INT | |
| #define my_sprintf(buff,args) sprintf args | | #define my_sprintf(buff,args) sprintf args | |
| #else | | #else | |
| #ifdef SPRINTF_RETURNS_PTR | | #ifdef SPRINTF_RETURNS_PTR | |
| #define my_sprintf(buff,args) ((int)(sprintf args - buff)) | | #define my_sprintf(buff,args) ((int)(sprintf args - buff)) | |
| #else | | #else | |
| #define my_sprintf(buff,args) ((ulong) sprintf args, (ulong) strlen(buff)) | | #define my_sprintf(buff,args) ((ulong) sprintf args, (ulong) strlen(buff)) | |
| #endif | | #endif | |
| #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_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_add(V,C,L) (V)+=(C) | | #define statistic_add(V,C,L) (V)+=(C) | |
|
| | | #define statistic_sub(V,C,L) (V)-=(C) | |
| #endif | | #endif | |
| | | | |
| #ifdef HAVE_CHARSET_utf8 | | #ifdef HAVE_CHARSET_utf8 | |
| #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 | |
| | | | |
|
| /* Length of decimal number represented by INT32. */ | | #ifdef HAVE_DLOPEN | |
| | | #if defined(__WIN__) | |
| | | #define dlsym(lib, name) GetProcAddress((HMODULE)lib, name) | |
| | | #define dlopen(libname, unused) LoadLibraryEx(libname, NULL, 0) | |
| | | #define dlclose(lib) FreeLibrary((HMODULE)lib) | |
| | | #elif defined(HAVE_DLFCN_H) | |
| | | #include <dlfcn.h> | |
| | | #endif | |
| | | #endif | |
| | | | |
| | | /* FreeBSD 2.2.2 does not define RTLD_NOW) */ | |
| | | #ifndef RTLD_NOW | |
| | | #define RTLD_NOW 1 | |
| | | #endif | |
| | | | |
| | | #ifndef HAVE_DLERROR | |
| | | #define dlerror() "" | |
| | | #endif | |
| | | | |
| | | #ifndef __NETWARE__ | |
| | | /* | |
| | | * Include standard definitions of operator new and delete. | |
| | | */ | |
| | | #ifdef __cplusplus | |
| | | #include <new> | |
| | | #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. */ | |
| #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). */ | |
| | | #if !defined(max) | |
| | | #define max(a, b) ((a) > (b) ? (a) : (b)) | |
| | | #define min(a, b) ((a) < (b) ? (a) : (b)) | |
| | | #endif | |
| | | /* | |
| | | Only Linux is known to need an explicit sync of the directory to make sur | |
| | | e a | |
| | | file creation/deletion/renaming in(from,to) this directory durable. | |
| | | */ | |
| | | #ifdef TARGET_OS_LINUX | |
| | | #define NEED_EXPLICIT_SYNC_DIR 1 | |
| | | #endif | |
| | | | |
| | | #if !defined(__cplusplus) && !defined(bool) | |
| | | #define bool In_C_you_should_use_my_bool_instead() | |
| | | #endif | |
| | | | |
| #ifndef HAVE_RINT | | #ifndef HAVE_RINT | |
| /** | | /** | |
| All integers up to this number can be represented exactly as double prec
ision | | All integers up to this number can be represented exactly as double prec
ision | |
| values (DBL_MANT_DIG == 53 for IEEE 754 hardware). | | values (DBL_MANT_DIG == 53 for IEEE 754 hardware). | |
| */ | | */ | |
| #define MAX_EXACT_INTEGER ((1LL << DBL_MANT_DIG) - 1) | | #define MAX_EXACT_INTEGER ((1LL << DBL_MANT_DIG) - 1) | |
| | | | |
| /** | | /** | |
| rint(3) implementation for platforms that do not have it. | | rint(3) implementation for platforms that do not have it. | |
| Always rounds to the nearest integer with ties being rounded to the near
est | | Always rounds to the nearest integer with ties being rounded to the near
est | |
| | | | |
| skipping to change at line 1404 | | skipping to change at line 1579 | |
| i <= (double) MAX_EXACT_INTEGER && | | i <= (double) MAX_EXACT_INTEGER && | |
| (longlong) i % 2)); | | (longlong) i % 2)); | |
| else | | else | |
| i -= (double) ((f < -0.5) || (f == -0.5 && | | i -= (double) ((f < -0.5) || (f == -0.5 && | |
| i >= (double) -MAX_EXACT_INTEGER && | | i >= (double) -MAX_EXACT_INTEGER && | |
| (longlong) i % 2)); | | (longlong) i % 2)); | |
| return i; | | return i; | |
| } | | } | |
| #endif /* HAVE_RINT */ | | #endif /* HAVE_RINT */ | |
| | | | |
|
| | | /* | |
| | | MYSQL_PLUGIN_IMPORT macro is used to export mysqld data | |
| | | (i.e variables) for usage in storage engine loadable plugins. | |
| | | Outside of Windows, it is dummy. | |
| | | */ | |
| | | #ifndef MYSQL_PLUGIN_IMPORT | |
| | | #if (defined(_WIN32) && defined(MYSQL_DYNAMIC_PLUGIN)) | |
| | | #define MYSQL_PLUGIN_IMPORT __declspec(dllimport) | |
| | | #else | |
| | | #define MYSQL_PLUGIN_IMPORT | |
| | | #endif | |
| | | #endif | |
| | | | |
| #endif /* my_global_h */ | | #endif /* my_global_h */ | |
| | | | |
End of changes. 75 change blocks. |
| 194 lines changed or deleted | | 403 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 <errno.h> | | | |
| #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 */ | |
| | | | |
|
| #if defined(__WIN__) || defined(OS2) | | #if defined(__WIN__) | |
| | | | |
| #ifdef OS2 | | | |
| typedef ULONG HANDLE; | | | |
| typedef ULONG DWORD; | | | |
| typedef int sigset_t; | | | |
| #endif | | | |
| | | | |
| #ifdef OS2 | | | |
| typedef HMTX pthread_mutex_t; | | | |
| #else | | | |
| typedef CRITICAL_SECTION pthread_mutex_t; | | typedef CRITICAL_SECTION pthread_mutex_t; | |
|
| #endif | | | |
| typedef HANDLE pthread_t; | | typedef HANDLE pthread_t; | |
| typedef struct thread_attr { | | typedef struct thread_attr { | |
| DWORD dwStackSize ; | | DWORD dwStackSize ; | |
| DWORD dwCreatingFlag ; | | DWORD dwCreatingFlag ; | |
| int priority ; | | int priority ; | |
| } pthread_attr_t ; | | } pthread_attr_t ; | |
| | | | |
| typedef struct { int dummy; } pthread_condattr_t; | | typedef struct { int dummy; } pthread_condattr_t; | |
| | | | |
| /* Implementation of posix conditions */ | | /* Implementation of posix conditions */ | |
| | | | |
| skipping to change at line 79 | | skipping to change at line 67 | |
| MAX_EVENTS= 2 | | MAX_EVENTS= 2 | |
| } EVENTS; | | } EVENTS; | |
| | | | |
| 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 win_pthread_self my_thread_var->pthread_self | | #define win_pthread_self my_thread_var->pthread_self | |
|
| #ifdef OS2 | | #define pthread_self() win_pthread_self | |
| #define pthread_handler_t EXTERNC void * _Optlink | | | |
| typedef void * (_Optlink *pthread_handler)(void *); | | | |
| #else | | | |
| #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 *); | |
|
| #endif | | | |
| | | | |
| /* | | /* | |
| 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. | |
| | | | |
| skipping to change at line 137 | | skipping to change at line 121 | |
| 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_setprio(pthread_attr_t *connect_att,int priority); | | int pthread_attr_setprio(pthread_attr_t *connect_att,int priority); | |
| int pthread_attr_destroy(pthread_attr_t *connect_att); | | int pthread_attr_destroy(pthread_attr_t *connect_att); | |
| 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); /* was #define pthread_exit(A) ExitThread(A
)*/ | | void pthread_exit(void *a); /* was #define pthread_exit(A) ExitThread(A
)*/ | |
| | | | |
|
| #ifndef OS2 | | | |
| #define ETIMEDOUT 145 /* Win32 doesn't have this */ | | #define ETIMEDOUT 145 /* Win32 doesn't have this */ | |
| #define getpid() GetCurrentThreadId() | | #define getpid() GetCurrentThreadId() | |
|
| #endif | | | |
| #define pthread_self() win_pthread_self | | | |
| #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 | |
| | | | |
|
| | | /* | |
| | | Windows has two ways to use thread local storage. The most efficient | |
| | | is using __declspec(thread), but that does not work properly when | |
| | | used in a .dll that is loaded at runtime, after program load. So for | |
| | | libmysql.dll and libmysqld.dll we define USE_TLS in order to use the | |
| | | TlsXxx() API instead, which works in all cases. | |
| | | */ | |
| #ifdef USE_TLS /* For LIBMYSQL.DLL */ | | #ifdef USE_TLS /* For LIBMYSQL.DLL */ | |
| #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 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 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))) | |
| | | | |
| skipping to change at line 168 | | skipping to change at line 156 | |
| #define pthread_key_create(A,B) pthread_dummy(0) | | #define pthread_key_create(A,B) pthread_dummy(0) | |
| #define pthread_key_delete(A) pthread_dummy(0) | | #define pthread_key_delete(A) pthread_dummy(0) | |
| #define pthread_getspecific(A) (&(A)) | | #define pthread_getspecific(A) (&(A)) | |
| #define my_pthread_getspecific(T,A) (&(A)) | | #define my_pthread_getspecific(T,A) (&(A)) | |
| #define my_pthread_getspecific_ptr(T,V) (V) | | #define my_pthread_getspecific_ptr(T,V) (V) | |
| #define my_pthread_setspecific_ptr(T,V) ((T)=(V),0) | | #define my_pthread_setspecific_ptr(T,V) ((T)=(V),0) | |
| #define pthread_setspecific(A,B) win_pthread_setspecific(&(A),(B),sizeof(A)
) | | #define pthread_setspecific(A,B) win_pthread_setspecific(&(A),(B),sizeof(A)
) | |
| #endif /* USE_TLS */ | | #endif /* USE_TLS */ | |
| | | | |
| #define pthread_equal(A,B) ((A) == (B)) | | #define pthread_equal(A,B) ((A) == (B)) | |
|
| #ifdef OS2 | | | |
| extern int pthread_mutex_init (pthread_mutex_t *, const pthread_mutexattr_t | | | |
| *); | | | |
| extern int pthread_mutex_lock (pthread_mutex_t *); | | | |
| extern int pthread_mutex_unlock (pthread_mutex_t *); | | | |
| extern int pthread_mutex_destroy (pthread_mutex_t *); | | | |
| #define my_pthread_setprio(A,B) DosSetPriority(PRTYS_THREAD,PRTYC_NOCHANGE | | | |
| , B, A) | | | |
| #define pthread_kill(A,B) raise(B) | | | |
| #define pthread_exit(A) pthread_dummy() | | | |
| #else | | | |
| #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) | | #define pthread_mutex_unlock(A) LeaveCriticalSection(A) | |
| #define pthread_mutex_destroy(A) DeleteCriticalSection(A) | | #define pthread_mutex_destroy(A) DeleteCriticalSection(A) | |
| #define my_pthread_setprio(A,B) SetThreadPriority(GetCurrentThread(), (B)) | | #define my_pthread_setprio(A,B) SetThreadPriority(GetCurrentThread(), (B)) | |
| #define pthread_kill(A,B) pthread_dummy((A) ? 0 : ESRCH) | | #define pthread_kill(A,B) pthread_dummy((A) ? 0 : ESRCH) | |
|
| #endif /* OS2 */ | | | |
| | | #define pthread_join(A,B) (WaitForSingleObject((A), INFINITE) != WAIT_OBJEC | |
| | | T_0) | |
| | | | |
| /* 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 my_pthread_attr_setprio(A,B) pthread_attr_setprio(A,B) | | #define my_pthread_attr_setprio(A,B) pthread_attr_setprio(A,B) | |
| #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 my_pthread_getprio(thread_id) pthread_dummy(0) | | #define my_pthread_getprio(thread_id) pthread_dummy(0) | |
| | | | |
|
| #elif defined(HAVE_UNIXWARE7_THREADS) | | | |
| | | | |
| #include <thread.h> | | | |
| #include <synch.h> | | | |
| | | | |
| #ifndef _REENTRANT | | | |
| #define _REENTRANT | | | |
| #endif | | | |
| | | | |
| #define HAVE_NONPOSIX_SIGWAIT | | | |
| #define pthread_t thread_t | | | |
| #define pthread_cond_t cond_t | | | |
| #define pthread_mutex_t mutex_t | | | |
| #define pthread_key_t thread_key_t | | | |
| typedef int pthread_attr_t; /* Needed by Unixware 7.0.0 | | | |
| */ | | | |
| | | | |
| #define pthread_key_create(A,B) thr_keycreate((A),(B)) | | | |
| #define pthread_key_delete(A) thr_keydelete(A) | | | |
| | | | |
| #define pthread_handler_t EXTERNC void * | | | |
| #define pthread_key(T,V) pthread_key_t V | | | |
| | | | |
| void * my_pthread_getspecific_imp(pthread_key_t key); | | | |
| #define my_pthread_getspecific(A,B) ((A) my_pthread_getspecific_imp(B)) | | | |
| #define my_pthread_getspecific_ptr(T,V) my_pthread_getspecific(T,V) | | | |
| | | | |
| #define pthread_setspecific(A,B) thr_setspecific(A,B) | | | |
| #define my_pthread_setspecific_ptr(T,V) pthread_setspecific(T,V) | | | |
| | | | |
| #define pthread_create(A,B,C,D) thr_create(NULL,65536L,(C),(D),THR_DETACHED | | | |
| ,(A)) | | | |
| #define pthread_cond_init(a,b) cond_init((a),USYNC_THREAD,NULL) | | | |
| #define pthread_cond_destroy(a) cond_destroy(a) | | | |
| #define pthread_cond_signal(a) cond_signal(a) | | | |
| #define pthread_cond_wait(a,b) cond_wait((a),(b)) | | | |
| #define pthread_cond_timedwait(a,b,c) cond_timedwait((a),(b),(c)) | | | |
| #define pthread_cond_broadcast(a) cond_broadcast(a) | | | |
| | | | |
| #define pthread_mutex_init(a,b) mutex_init((a),USYNC_THREAD,NULL) | | | |
| #define pthread_mutex_lock(a) mutex_lock(a) | | | |
| #define pthread_mutex_unlock(a) mutex_unlock(a) | | | |
| #define pthread_mutex_destroy(a) mutex_destroy(a) | | | |
| | | | |
| #define pthread_self() thr_self() | | | |
| #define pthread_exit(A) thr_exit(A) | | | |
| #define pthread_equal(A,B) (((A) == (B)) ? 1 : 0) | | | |
| #define pthread_kill(A,B) thr_kill((A),(B)) | | | |
| #define HAVE_PTHREAD_KILL | | | |
| | | | |
| #define pthread_sigmask(A,B,C) thr_sigsetmask((A),(B),(C)) | | | |
| | | | |
| extern int my_sigwait(const sigset_t *set,int *sig); | | | |
| | | | |
| #define pthread_detach_this_thread() pthread_dummy(0) | | | |
| | | | |
| #define pthread_attr_init(A) pthread_dummy(0) | | | |
| #define pthread_attr_destroy(A) pthread_dummy(0) | | | |
| #define pthread_attr_setscope(A,B) pthread_dummy(0) | | | |
| #define pthread_attr_setdetachstate(A,B) pthread_dummy(0) | | | |
| #define my_pthread_setprio(A,B) pthread_dummy (0) | | | |
| #define my_pthread_getprio(A) pthread_dummy (0) | | | |
| #define my_pthread_attr_setprio(A,B) pthread_dummy(0) | | | |
| | | | |
| #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 | |
| #define _REENTRANT | | #define _REENTRANT | |
| #endif | | #endif | |
| #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 | |
|
| #if defined(__EMX__) && (!defined(EMX_PTHREAD_REV) || (EMX_PTHREAD_REV < 2) | | | |
| ) | | | |
| #error Requires at least rev 2 of EMX pthreads library. | | | |
| #endif | | | |
| | | | |
| #ifdef __NETWARE__ | | #ifdef __NETWARE__ | |
| void my_pthread_exit(void *status); | | void my_pthread_exit(void *status); | |
| #define pthread_exit(A) my_pthread_exit(A) | | #define pthread_exit(A) my_pthread_exit(A) | |
| #endif | | #endif | |
| | | | |
| extern int my_pthread_getprio(pthread_t thread_id); | | extern int my_pthread_getprio(pthread_t thread_id); | |
| | | | |
| #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)) | |
| | | | |
| skipping to change at line 306 | | skipping to change at line 221 | |
| /* 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 | |
|
| #elif defined(HAVE_mit_thread) | | | |
| #define USE_ALARM_THREAD | | | |
| #undef HAVE_LOCALTIME_R | | | |
| #define HAVE_LOCALTIME_R | | | |
| #undef HAVE_GMTIME_R | | | |
| #define HAVE_GMTIME_R | | | |
| #undef HAVE_PTHREAD_ATTR_SETSCOPE | | | |
| #define HAVE_PTHREAD_ATTR_SETSCOPE | | | |
| #undef HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE /* If we are running linux * | | | |
| / | | | |
| #undef HAVE_RWLOCK_T | | | |
| #undef HAVE_RWLOCK_INIT | | | |
| #undef HAVE_PTHREAD_RWLOCK_RDLOCK | | | |
| #undef HAVE_SNPRINTF | | | |
| | | | |
| #define my_pthread_attr_setprio(A,B) | | | |
| #endif /* defined(PTHREAD_SCOPE_GLOBAL) && !defined(PTHREAD_SCOPE_SYSTEM) *
/ | | #endif /* defined(PTHREAD_SCOPE_GLOBAL) && !defined(PTHREAD_SCOPE_SYSTEM) *
/ | |
| | | | |
| #if defined(_BSDI_VERSION) && _BSDI_VERSION < 199910 | | #if defined(_BSDI_VERSION) && _BSDI_VERSION < 199910 | |
| int sigwait(sigset_t *set, int *sig); | | int sigwait(sigset_t *set, int *sig); | |
| #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); | |
| | | | |
| skipping to change at line 348 | | skipping to change at line 248 | |
| #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_init((a),(b)) | |
| extern int my_pthread_cond_init(pthread_cond_t *mp, | | extern int my_pthread_cond_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_mit_thread) && !defined(HAVE_rt
s_threads) && !defined(sigwait) && !defined(alpha_linux_port) && !defined(H
AVE_NONPOSIX_SIGWAIT) && !defined(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) | |
| | | | |
| skipping to change at line 379 | | skipping to change at line 279 | |
| #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 | |
| | | | |
| #ifndef my_pthread_setprio | | #ifndef my_pthread_setprio | |
| #if defined(HAVE_PTHREAD_SETPRIO_NP) /* FSU threads */ | | #if defined(HAVE_PTHREAD_SETPRIO_NP) /* FSU threads */ | |
| #define my_pthread_setprio(A,B) pthread_setprio_np((A),(B)) | | #define my_pthread_setprio(A,B) pthread_setprio_np((A),(B)) | |
| #elif defined(HAVE_PTHREAD_SETPRIO) | | #elif defined(HAVE_PTHREAD_SETPRIO) | |
| #define my_pthread_setprio(A,B) pthread_setprio((A),(B)) | | #define my_pthread_setprio(A,B) pthread_setprio((A),(B)) | |
|
| | | #elif defined(HAVE_PTHREAD_SETSCHEDPRIO) | |
| | | #define my_pthread_setprio(A,B) pthread_setschedprio((A),(B)) | |
| #else | | #else | |
| extern void my_pthread_setprio(pthread_t thread_id,int prior); | | extern void my_pthread_setprio(pthread_t thread_id,int prior); | |
| #endif | | #endif | |
| #endif | | #endif | |
| | | | |
| #ifndef my_pthread_attr_setprio | | #ifndef my_pthread_attr_setprio | |
| #ifdef HAVE_PTHREAD_ATTR_SETPRIO | | #ifdef HAVE_PTHREAD_ATTR_SETPRIO | |
| #define my_pthread_attr_setprio(A,B) pthread_attr_setprio((A),(B)) | | #define my_pthread_attr_setprio(A,B) pthread_attr_setprio((A),(B)) | |
| #else | | #else | |
| extern void my_pthread_attr_setprio(pthread_attr_t *attr, int priority); | | extern void my_pthread_attr_setprio(pthread_attr_t *attr, int priority); | |
| | | | |
| skipping to change at line 404 | | skipping to change at line 306 | |
| #undef HAVE_GETHOSTBYADDR_R /* No definition */ | | #undef HAVE_GETHOSTBYADDR_R /* No definition */ | |
| #endif | | #endif | |
| | | | |
| #if defined(HAVE_BROKEN_PTHREAD_COND_TIMEDWAIT) && !defined(SAFE_MUTEX) | | #if defined(HAVE_BROKEN_PTHREAD_COND_TIMEDWAIT) && !defined(SAFE_MUTEX) | |
| extern int my_pthread_cond_timedwait(pthread_cond_t *cond, | | extern int my_pthread_cond_timedwait(pthread_cond_t *cond, | |
| pthread_mutex_t *mutex, | | pthread_mutex_t *mutex, | |
| struct timespec *abstime); | | struct timespec *abstime); | |
| #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)
) | |
| #endif | | #endif | |
| | | | |
|
| #if defined(OS2) | | #if !defined( HAVE_NONPOSIX_PTHREAD_GETSPECIFIC) | |
| #define my_pthread_getspecific(T,A) ((T) &(A)) | | | |
| #define pthread_setspecific(A,B) win_pthread_setspecific(&(A),(B),sizeof(A) | | | |
| ) | | | |
| #elif !defined( HAVE_NONPOSIX_PTHREAD_GETSPECIFIC) | | | |
| #define my_pthread_getspecific(A,B) ((A) pthread_getspecific(B)) | | #define my_pthread_getspecific(A,B) ((A) pthread_getspecific(B)) | |
| #else | | #else | |
| #define my_pthread_getspecific(A,B) ((A) my_pthread_getspecific_imp(B)) | | #define my_pthread_getspecific(A,B) ((A) my_pthread_getspecific_imp(B)) | |
| void *my_pthread_getspecific_imp(pthread_key_t key); | | void *my_pthread_getspecific_imp(pthread_key_t key); | |
|
| #endif /* OS2 */ | | #endif | |
| | | | |
| #ifndef HAVE_LOCALTIME_R | | #ifndef HAVE_LOCALTIME_R | |
| struct tm *localtime_r(const time_t *clock, struct tm *res); | | struct tm *localtime_r(const time_t *clock, struct tm *res); | |
| #endif | | #endif | |
| | | | |
| #ifndef HAVE_GMTIME_R | | #ifndef HAVE_GMTIME_R | |
| struct tm *gmtime_r(const time_t *clock, struct tm *res); | | struct tm *gmtime_r(const time_t *clock, struct tm *res); | |
| #endif | | #endif | |
| | | | |
| #ifdef HAVE_PTHREAD_CONDATTR_CREATE | | #ifdef HAVE_PTHREAD_CONDATTR_CREATE | |
| | | | |
| skipping to change at line 617 | | skipping to change at line 516 | |
| 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 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) | |
| | | typedef struct st_my_pthread_fastmutex_t | |
| | | { | |
| | | pthread_mutex_t mutex; | |
| | | uint spins; | |
| | | uint rng_state; | |
| | | } my_pthread_fastmutex_t; | |
| | | void fastmutex_global_init(void); | |
| | | | |
| | | int my_pthread_fastmutex_init(my_pthread_fastmutex_t *mp, | |
| | | const pthread_mutexattr_t *attr); | |
| | | int my_pthread_fastmutex_lock(my_pthread_fastmutex_t *mp); | |
| | | | |
| | | #undef pthread_mutex_init | |
| | | #undef pthread_mutex_lock | |
| | | #undef pthread_mutex_unlock | |
| | | #undef pthread_mutex_destroy | |
| | | #undef pthread_mutex_wait | |
| | | #undef pthread_mutex_timedwait | |
| | | #undef pthread_mutex_t | |
| | | #undef pthread_cond_wait | |
| | | #undef pthread_cond_timedwait | |
| | | #undef pthread_mutex_trylock | |
| | | #define pthread_mutex_init(A,B) my_pthread_fastmutex_init((A),(B)) | |
| | | #define pthread_mutex_lock(A) my_pthread_fastmutex_lock(A) | |
| | | #define pthread_mutex_unlock(A) pthread_mutex_unlock(&(A)->mutex) | |
| | | #define pthread_mutex_destroy(A) pthread_mutex_destroy(&(A)->mutex) | |
| | | #define pthread_cond_wait(A,B) pthread_cond_wait((A),&(B)->mutex) | |
| | | #define pthread_cond_timedwait(A,B,C) pthread_cond_timedwait((A),&(B)->mute | |
| | | x,(C)) | |
| | | #define pthread_mutex_trylock(A) pthread_mutex_trylock(&(A)->mutex) | |
| | | #define pthread_mutex_t my_pthread_fastmutex_t | |
| | | #endif /* defined(MY_PTHREAD_FASTMUTEX) && !defined(SAFE_MUTEX) */ | |
| | | | |
| /* READ-WRITE thread locking */ | | /* READ-WRITE thread locking */ | |
| | | | |
| #ifdef HAVE_BROKEN_RWLOCK /* For OpenUnix */ | | #ifdef HAVE_BROKEN_RWLOCK /* For OpenUnix */ | |
| #undef HAVE_PTHREAD_RWLOCK_RDLOCK | | #undef HAVE_PTHREAD_RWLOCK_RDLOCK | |
| #undef HAVE_RWLOCK_INIT | | #undef HAVE_RWLOCK_INIT | |
| #undef HAVE_RWLOCK_T | | #undef HAVE_RWLOCK_T | |
| #endif | | #endif | |
| | | | |
| #if defined(USE_MUTEX_INSTEAD_OF_RW_LOCKS) | | #if defined(USE_MUTEX_INSTEAD_OF_RW_LOCKS) | |
| /* use these defs for simple mutex locking */ | | /* use these defs for simple mutex locking */ | |
| | | | |
| skipping to change at line 705 | | skipping to change at line 637 | |
| #define MY_MUTEX_INIT_ERRCHK &my_errorcheck_mutexattr | | #define MY_MUTEX_INIT_ERRCHK &my_errorcheck_mutexattr | |
| #else | | #else | |
| #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; | |
| | | | |
| extern my_bool my_thread_global_init(void); | | extern my_bool my_thread_global_init(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 long my_thread_id(void); | | extern my_thread_id my_thread_dbug_id(void); | |
| extern int pthread_no_free(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 | |
| | | | |
| skipping to change at line 737 | | skipping to change at line 671 | |
| #endif | | #endif | |
| | | | |
| struct st_my_thread_var | | struct st_my_thread_var | |
| { | | { | |
| int thr_errno; | | int thr_errno; | |
| pthread_cond_t suspend; | | pthread_cond_t suspend; | |
| pthread_mutex_t mutex; | | pthread_mutex_t mutex; | |
| pthread_mutex_t * volatile current_mutex; | | pthread_mutex_t * volatile current_mutex; | |
| pthread_cond_t * volatile current_cond; | | pthread_cond_t * volatile current_cond; | |
| pthread_t pthread_self; | | pthread_t pthread_self; | |
|
| long 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; | |
| #ifndef DBUG_OFF | | #ifndef DBUG_OFF | |
|
| gptr 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 uint my_thread_end_wait_time; | | extern uint my_thread_end_wait_time; | |
| #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 | |
| | | | |
| skipping to change at line 766 | | skipping to change at line 700 | |
| */ | | */ | |
| | | | |
| /* 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 | |
| #define THD_LIB_NPTL 2 | | #define THD_LIB_NPTL 2 | |
| #define THD_LIB_LT 4 | | #define THD_LIB_LT 4 | |
| | | | |
| extern uint thd_lib_detected; | | extern uint thd_lib_detected; | |
| | | | |
|
| /* statistics_xxx functions are for not essential statistic */ | | /* | |
| | | thread_safe_xxx functions are for critical statistic or counters. | |
| | | The implementation is guaranteed to be thread safe, on all platforms. | |
| | | Note that the calling code should *not* assume the counter is protected | |
| | | by the mutex given, as the implementation of these helpers may change | |
| | | to use my_atomic operations instead. | |
| | | */ | |
| | | | |
|
| | | /* | |
| | | Warning: | |
| | | When compiling without threads, this file is not included. | |
| | | 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 | |
| #ifndef thread_safe_increment | | #ifndef thread_safe_increment | |
|
| #ifdef HAVE_ATOMIC_ADD | | | |
| #define thread_safe_increment(V,L) atomic_inc((atomic_t*) &V) | | | |
| #define thread_safe_decrement(V,L) atomic_dec((atomic_t*) &V) | | | |
| #define thread_safe_add(V,C,L) atomic_add((C),(atomic_t*) &V) | | | |
| #define thread_safe_sub(V,C,L) atomic_sub((C),(atomic_t*) &V) | | | |
| #else | | | |
| #define thread_safe_increment(V,L) \ | | #define thread_safe_increment(V,L) \ | |
| (pthread_mutex_lock((L)), (V)++, pthread_mutex_unlock((L))) | | (pthread_mutex_lock((L)), (V)++, pthread_mutex_unlock((L))) | |
| #define thread_safe_decrement(V,L) \ | | #define thread_safe_decrement(V,L) \ | |
| (pthread_mutex_lock((L)), (V)--, pthread_mutex_unlock((L))) | | (pthread_mutex_lock((L)), (V)--, pthread_mutex_unlock((L))) | |
|
| #define thread_safe_add(V,C,L) (pthread_mutex_lock((L)), (V)+=(C), pthread_ | | #endif | |
| mutex_unlock((L))) | | | |
| | | #ifndef thread_safe_add | |
| | | #define thread_safe_add(V,C,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) \ | |
| (pthread_mutex_lock((L)), (V)-=(C), pthread_mutex_unlock((L))) | | (pthread_mutex_lock((L)), (V)-=(C), pthread_mutex_unlock((L))) | |
|
| #endif /* HAVE_ATOMIC_ADD */ | | #endif | |
| | | #endif | |
| | | | |
| | | /* | |
| | | statistics_xxx functions are for non critical statistic, | |
| | | maintained in global variables. | |
| | | When compiling with SAFE_STATISTICS: | |
| | | - race conditions can not occur. | |
| | | - some locking occurs, which may cause performance degradation. | |
| | | | |
| | | When compiling without SAFE_STATISTICS: | |
| | | - race conditions can occur, making the result slightly inaccurate. | |
| | | - the lock given is not honored. | |
| | | */ | |
| #ifdef SAFE_STATISTICS | | #ifdef SAFE_STATISTICS | |
|
| #define statistic_increment(V,L) thread_safe_increment((V),(L)) | | #define statistic_increment(V,L) thread_safe_increment((V),(L)) | |
| #define statistic_decrement(V,L) thread_safe_decrement((V),(L)) | | #define statistic_decrement(V,L) thread_safe_decrement((V),(L)) | |
| #define statistic_add(V,C,L) thread_safe_add((V),(C),(L)) | | #define statistic_add(V,C,L) thread_safe_add((V),(C),(L)) | |
| | | #define statistic_sub(V,C,L) thread_safe_sub((V),(C),(L)) | |
| #else | | #else | |
| #define statistic_decrement(V,L) (V)-- | | #define statistic_decrement(V,L) (V)-- | |
| #define statistic_increment(V,L) (V)++ | | #define statistic_increment(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) | |
| #endif /* SAFE_STATISTICS */ | | #endif /* SAFE_STATISTICS */ | |
|
| #endif /* thread_safe_increment */ | | | |
| | | /* | |
| | | No locking needed, the counter is owned by the thread | |
| | | */ | |
| | | #define status_var_increment(V) (V)++ | |
| | | #define status_var_decrement(V) (V)-- | |
| | | #define status_var_add(V,C) (V)+=(C) | |
| | | #define status_var_sub(V,C) (V)-=(C) | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| #endif /* _my_ptread_h */ | | #endif /* _my_ptread_h */ | |
| | | | |
End of changes. 30 change blocks. |
| 141 lines changed or deleted | | 104 lines changed or added | |
|
| my_sys.h | | my_sys.h | |
| | | | |
| skipping to change at line 42 | | skipping to change at line 42 | |
| #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> | |
| | | | |
| #define MYSYS_PROGRAM_USES_CURSES() { error_handler_hook = my_message_curs
es; mysys_uses_curses=1; } | | #define MYSYS_PROGRAM_USES_CURSES() { error_handler_hook = my_message_curs
es; mysys_uses_curses=1; } | |
| #define MYSYS_PROGRAM_DONT_USE_CURSES() { error_handler_hook = my_message_
no_curses; mysys_uses_curses=0;} | | #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(); } | | #define MY_INIT(name); { my_progname= name; my_init(); } | |
| | | | |
|
| #define ERRMSGSIZE (SC_MAXWIDTH) /* Max length of a error message */ | | #define MY_FILE_ERROR ((size_t) -1) | |
| #define NRERRBUFFS (2) /* Buffers for parameters */ | | | |
| #define MY_FILE_ERROR ((uint) ~0) | | | |
| | | | |
| /* 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 1024 /* my_create/delete/rename: sync directory
*/ | |
| #define MY_RAID 64 /* 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 */ | |
| | | | |
| skipping to change at line 77 | | skipping to change at line 76 | |
| #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 1024 /* 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_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_NO_WARNING_FOR_ERROR 2048 /* Don't push a warning for error */ | |
| | | #define ME_NO_SP_HANDLER 4096 /* Don't call stored routine error handlers * | |
| | | / | |
| | | | |
| /* 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' */ | |
|
| | | #define MY_APPEND_EXT 256 /* add 'ext' as additional extensio
n*/ | |
| | | | |
| /* My seek flags */ | | /* My seek flags */ | |
| #define MY_SEEK_SET 0 | | #define MY_SEEK_SET 0 | |
| #define MY_SEEK_CUR 1 | | #define MY_SEEK_CUR 1 | |
| #define MY_SEEK_END 2 | | #define MY_SEEK_END 2 | |
| | | | |
| /* Some constants */ | | /* Some constants */ | |
| #define MY_WAIT_FOR_USER_TO_FIX_PANIC 60 /* in seconds */ | | #define MY_WAIT_FOR_USER_TO_FIX_PANIC 60 /* in seconds */ | |
| #define MY_WAIT_GIVE_USER_A_MESSAGE 10 /* Every 10 times of prev */ | | #define MY_WAIT_GIVE_USER_A_MESSAGE 10 /* Every 10 times of prev */ | |
| #define MIN_COMPRESS_LENGTH 50 /* Don't compress small bl.
*/ | | #define MIN_COMPRESS_LENGTH 50 /* Don't compress small bl.
*/ | |
| | | | |
| skipping to change at line 135 | | skipping to change at line 142 | |
| | | | |
| /* defines when allocating data */ | | /* defines when allocating data */ | |
| #ifdef SAFEMALLOC | | #ifdef SAFEMALLOC | |
| #define my_malloc(SZ,FLAG) _mymalloc((SZ), __FILE__, __LINE__, FLAG ) | | #define my_malloc(SZ,FLAG) _mymalloc((SZ), __FILE__, __LINE__, FLAG ) | |
| #define my_malloc_ci(SZ,FLAG) _mymalloc((SZ), sFile, uLine, 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_realloc(PTR,SZ,FLAG) _myrealloc((PTR), (SZ), __FILE__, __LINE__,
FLAG ) | |
| #define my_checkmalloc() _sanity( __FILE__, __LINE__ ) | | #define my_checkmalloc() _sanity( __FILE__, __LINE__ ) | |
| #define my_free(PTR,FLAG) _myfree((PTR), __FILE__, __LINE__,FLAG) | | #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_memdup(A,B,C) _my_memdup((A),(B), __FILE__,__LINE__,C) | |
| #define my_strdup(A,C) _my_strdup((A), __FILE__,__LINE__,C) | | #define my_strdup(A,C) _my_strdup((A), __FILE__,__LINE__,C) | |
|
| #define my_strdup_with_length(A,B,C) _my_strdup_with_length((A),(B),__FILE_
_,__LINE__,C) | | #define my_strndup(A,B,C) _my_strndup((A),(B),__FILE__,__LINE__,C) | |
| #define TRASH(A,B) bfill(A, B, 0x8F) | | #define TRASH(A,B) bfill(A, B, 0x8F) | |
| #define QUICK_SAFEMALLOC sf_malloc_quick=1 | | #define QUICK_SAFEMALLOC sf_malloc_quick=1 | |
| #define NORMAL_SAFEMALLOC sf_malloc_quick=0 | | #define NORMAL_SAFEMALLOC sf_malloc_quick=0 | |
| extern uint sf_malloc_prehunc,sf_malloc_endhunc,sf_malloc_quick; | | extern uint sf_malloc_prehunc,sf_malloc_endhunc,sf_malloc_quick; | |
| extern ulonglong sf_malloc_mem_limit; | | extern ulonglong sf_malloc_mem_limit; | |
| | | | |
| #define CALLER_INFO_PROTO , const char *sFile, uint uLine | | #define CALLER_INFO_PROTO , const char *sFile, uint uLine | |
| #define CALLER_INFO , __FILE__, __LINE__ | | #define CALLER_INFO , __FILE__, __LINE__ | |
| #define ORIG_CALLER_INFO , sFile, uLine | | #define ORIG_CALLER_INFO , sFile, uLine | |
| #else | | #else | |
| #define my_checkmalloc() | | #define my_checkmalloc() | |
| #undef TERMINATE | | #undef TERMINATE | |
|
| #define TERMINATE(A) {} | | #define TERMINATE(A,B) {} | |
| #define QUICK_SAFEMALLOC | | #define QUICK_SAFEMALLOC | |
| #define NORMAL_SAFEMALLOC | | #define NORMAL_SAFEMALLOC | |
|
| extern gptr my_malloc(size_t Size, myf MyFlags); | | extern void *my_malloc(size_t Size,myf MyFlags); | |
| #define my_malloc_ci(SZ,FLAG) my_malloc( SZ, FLAG ) | | #define my_malloc_ci(SZ,FLAG) my_malloc( SZ, FLAG ) | |
|
| extern gptr my_realloc(gptr oldpoint,uint Size,myf MyFlags); | | extern void *my_realloc(void *oldpoint, size_t Size, myf MyFlags); | |
| extern void my_no_flags_free(gptr ptr); | | extern void my_no_flags_free(void *ptr); | |
| extern gptr my_memdup(const byte *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_strdup_with_length(const char *from, size_t length, | | extern char *my_strndup(const char *from, size_t length, | |
| myf MyFlags); | | myf MyFlags); | |
| /* we do use FG (as a no-op) in below so that a typo on FG is caught */ | | /* we do use FG (as a no-op) in below so that a typo on FG is caught */ | |
| #define my_free(PTR,FG) ((void)FG,my_no_flags_free(PTR)) | | #define my_free(PTR,FG) ((void)FG,my_no_flags_free(PTR)) | |
| #define CALLER_INFO_PROTO /* nothing */ | | #define CALLER_INFO_PROTO /* nothing */ | |
| #define CALLER_INFO /* nothing */ | | #define CALLER_INFO /* nothing */ | |
| #define ORIG_CALLER_INFO /* nothing */ | | #define ORIG_CALLER_INFO /* nothing */ | |
| #define TRASH(A,B) /* nothing */ | | #define TRASH(A,B) /* nothing */ | |
| #endif | | #endif | |
|
| #define my_strndup(A,B,C) my_strdup_with_length((A), (B), (C)) | | | |
| | | #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 uint my_get_large_page_size(void); | | extern uint my_get_large_page_size(void); | |
|
| extern gptr 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(gptr ptr, myf my_flags); | | 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,B) my_free_lock((A),(B)) | | #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 */ | |
| | | | |
| skipping to change at line 196 | | skipping to change at line 212 | |
| #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,MYF(MY_WME)) | | #define my_afree(PTR) my_free(PTR,MYF(MY_WME)) | |
| #endif /* HAVE_ALLOCA */ | | #endif /* HAVE_ALLOCA */ | |
| | | | |
|
| #ifdef MSDOS | | | |
| #ifdef __ZTC__ | | | |
| void * __CDECL halloc(long count,size_t length); | | | |
| void __CDECL hfree(void *ptr); | | | |
| #endif | | | |
| #if defined(USE_HALLOC) | | | |
| #if defined(_VCM_) || defined(M_IC80386) | | | |
| #undef USE_HALLOC | | | |
| #endif | | | |
| #endif | | | |
| #ifdef USE_HALLOC | | | |
| #define malloc(a) halloc((long) (a),1) | | | |
| #define free(a) hfree(a) | | | |
| #endif | | | |
| #endif /* MSDOS */ | | | |
| | | | |
| #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 NEAR errbuff[NRERRBUFFS][ERRMSGSIZE]; | | | |
| 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 NEAR curr_dir[]; /* Current directory for user */ | | extern char NEAR curr_dir[]; /* Current directory for user */ | |
| extern int (*error_handler_hook)(uint my_err, const char *str,myf MyFlags); | | extern int (*error_handler_hook)(uint my_err, const char *str,myf MyFlags); | |
| extern int (*fatal_error_handler_hook)(uint my_err, const char *str, | | extern int (*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; | |
| | | | |
| #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 */ | |
|
| extern CHARSET_INFO *default_charset_info; | | extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *default_charset_info; | |
| extern CHARSET_INFO *all_charsets[256]; | | extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *all_charsets[256]; | |
| extern CHARSET_INFO compiled_charsets[]; | | extern CHARSET_INFO compiled_charsets[]; | |
| | | | |
| /* statistics */ | | /* statistics */ | |
| extern ulong my_file_opened,my_stream_opened, my_tmp_file_created; | | extern ulong my_file_opened,my_stream_opened, my_tmp_file_created; | |
|
| | | 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 int NEAR my_umask, /* Default creation mask */ | | extern MYSQL_PLUGIN_IMPORT int NEAR my_umask; /* Default creation | |
| NEAR my_umask_dir, | | mask */ | |
| | | extern int NEAR my_umask_dir, | |
| NEAR my_recived_signals, /* Signals we have got */ | | NEAR my_recived_signals, /* Signals we have got */ | |
| NEAR my_safe_to_handle_signal, /* Set when allowed to SIGTSTP */ | | NEAR my_safe_to_handle_signal, /* Set when allowed to SIGTSTP */ | |
| NEAR my_dont_interrupt; /* call remember_intr when set */ | | NEAR my_dont_interrupt; /* call remember_intr when set */ | |
| extern my_bool NEAR mysys_uses_curses, 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 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 NEAR my_disable_locking,NEAR my_disable_async_io, | | extern my_bool NEAR my_disable_locking,NEAR my_disable_async_io, | |
| NEAR my_disable_flush_key_blocks, NEAR 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; | |
| | | | |
| skipping to change at line 273 | | skipping to change at line 274 | |
| 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
*/ | | typedef struct wild_file_pack /* Struct to hold info when selecting files
*/ | |
| { | | { | |
| uint wilds; /* How many wildcards */ | | uint wilds; /* How many wildcards */ | |
| uint not_pos; /* Start of not-theese-files */ | | uint not_pos; /* Start of not-theese-files */ | |
|
| my_string *wild; /* Pointer to wildcards */ | | char * *wild; /* Pointer to wildcards */ | |
| } WF_PACK; | | } 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 */, | |
| READ_FIFO, READ_NET,WRITE_NET}; | | READ_FIFO, READ_NET,WRITE_NET}; | |
| | | | |
| enum flush_type | | enum flush_type | |
| { | | { | |
|
| FLUSH_KEEP, FLUSH_RELEASE, FLUSH_IGNORE_CHANGED, FLUSH_FORCE_WRITE | | FLUSH_KEEP, /* flush block and keep it in the cache */ | |
| | | FLUSH_RELEASE, /* flush block and remove it from the cache */ | |
| | | FLUSH_IGNORE_CHANGED, /* remove block from the cache */ | |
| | | /* | |
| | | As my_disable_flush_pagecache_blocks is always 0, the following option | |
| | | is strictly equivalent to FLUSH_KEEP | |
| | | */ | |
| | | FLUSH_FORCE_WRITE | |
| }; | | }; | |
| | | | |
| 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; | |
|
| byte *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 | |
| int use_async_io; | | int use_async_io; | |
| my_aio_result aio_result; | | my_aio_result aio_result; | |
| #endif | | #endif | |
| enum cache_type type; | | enum cache_type type; | |
| } RECORD_CACHE; | | } RECORD_CACHE; | |
| | | | |
| enum file_type | | enum file_type | |
| { | | { | |
| UNOPEN = 0, FILE_BY_OPEN, FILE_BY_CREATE, STREAM_BY_FOPEN, STREAM_BY_FDOP
EN, | | UNOPEN = 0, FILE_BY_OPEN, FILE_BY_CREATE, STREAM_BY_FOPEN, STREAM_BY_FDOP
EN, | |
| FILE_BY_MKSTEMP, FILE_BY_DUP | | FILE_BY_MKSTEMP, FILE_BY_DUP | |
| }; | | }; | |
| | | | |
| struct st_my_file_info | | struct st_my_file_info | |
| { | | { | |
|
| my_string name; | | char * name; | |
| enum file_type type; | | enum file_type type; | |
| #if defined(THREAD) && !defined(HAVE_PREAD) | | #if defined(THREAD) && !defined(HAVE_PREAD) | |
| pthread_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 | |
| { | | { | |
|
| char *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 | |
| pthread_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; | |
|
| uint 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*); | | typedef int (*IO_CACHE_CALLBACK)(struct st_io_cache*); | |
| | | | |
| #ifdef THREAD | | #ifdef THREAD | |
| typedef struct st_io_cache_share | | typedef struct st_io_cache_share | |
| { | | { | |
| pthread_mutex_t mutex; /* To sync on reads into buffer. *
/ | | pthread_mutex_t mutex; /* To sync on reads into buffer. *
/ | |
| pthread_cond_t cond; /* To wait for signals. */ | | pthread_cond_t cond; /* To wait for signals. */ | |
| pthread_cond_t cond_writer; /* For a synchronized writer. */ | | 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; | |
|
| byte *buffer; /* The read buffer. */ | | uchar *buffer; /* The read buffer. */ | |
| byte *read_end; /* Behind last valid byte of buffe | | uchar *read_end; /* Behind last valid byte of buffe | |
| r. */ | | 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 | |
| /* whether the structure should be free'd */ | | /* whether the structure should be free'd */ | |
| my_bool alloced; | | my_bool alloced; | |
| #endif | | #endif | |
| } IO_CACHE_SHARE; | | } IO_CACHE_SHARE; | |
| #endif | | #endif | |
| | | | |
| typedef struct st_io_cache /* Used when cacheing files */ | | typedef struct st_io_cache /* Used when cacheing files */ | |
| { | | { | |
|
| /* Offset in file corresponding to the first byte of byte* buffer. */ | | /* Offset in file corresponding to the first byte of uchar* buffer. */ | |
| my_off_t pos_in_file; | | my_off_t pos_in_file; | |
| /* | | /* | |
| The offset of end of file for READ_CACHE and WRITE_CACHE. | | The offset of end of file for READ_CACHE and WRITE_CACHE. | |
| For SEQ_READ_APPEND it the maximum of the actual end of file and | | For SEQ_READ_APPEND it the maximum of the actual end of file and | |
| the position represented by read_end. | | the position represented by read_end. | |
| */ | | */ | |
| my_off_t end_of_file; | | my_off_t end_of_file; | |
| /* Points to current read position in the buffer */ | | /* Points to current read position in the buffer */ | |
|
| byte *read_pos; | | uchar *read_pos; | |
| /* the non-inclusive boundary in the buffer for the currently valid read
*/ | | /* the non-inclusive boundary in the buffer for the currently valid read
*/ | |
|
| byte *read_end; | | uchar *read_end; | |
| byte *buffer; /* The read buffer */ | | uchar *buffer; /* The read buffer */ | |
| /* Used in ASYNC_IO */ | | /* Used in ASYNC_IO */ | |
|
| byte *request_pos; | | uchar *request_pos; | |
| | | | |
| /* Only used in WRITE caches and in SEQ_READ_APPEND to buffer writes */ | | /* Only used in WRITE caches and in SEQ_READ_APPEND to buffer writes */ | |
|
| byte *write_buffer; | | uchar *write_buffer; | |
| /* | | /* | |
| Only used in SEQ_READ_APPEND, and points to the current read position | | Only used in SEQ_READ_APPEND, and points to the current read position | |
| in the write buffer. Note that reads in SEQ_READ_APPEND caches can | | in the write buffer. Note that reads in SEQ_READ_APPEND caches can | |
|
| happen from both read buffer (byte* buffer) and write buffer | | happen from both read buffer (uchar* buffer) and write buffer | |
| (byte* write_buffer). | | (uchar* write_buffer). | |
| */ | | */ | |
|
| byte *append_read_pos; | | uchar *append_read_pos; | |
| /* Points to current write position in the write buffer */ | | /* Points to current write position in the write buffer */ | |
|
| byte *write_pos; | | uchar *write_pos; | |
| /* The non-inclusive boundary of the valid write area */ | | /* The non-inclusive boundary of the valid write area */ | |
|
| byte *write_end; | | uchar *write_end; | |
| | | | |
| /* | | /* | |
| Current_pos and current_end are convenience variables used by | | Current_pos and current_end are convenience variables used by | |
| 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 | |
| */ | | */ | |
|
| byte **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. | |
| */ | | */ | |
| pthread_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. | |
| | | | |
| skipping to change at line 435 | | skipping to change at line 443 | |
| IO_CACHE_SHARE *share; | | IO_CACHE_SHARE *share; | |
| #endif | | #endif | |
| /* | | /* | |
| A caller will use my_b_read() macro to read from the cache | | A caller will use my_b_read() macro to read from the cache | |
| if the data is already in cache, it will be simply copied with | | if the data is already in cache, it will be simply copied with | |
| memcpy() and internal variables will be accordinging updated with | | memcpy() and internal variables will be accordinging updated with | |
| no functions invoked. However, if the data is not fully in the cache, | | no functions invoked. However, if the data is not fully in the cache, | |
| my_b_read() will call read_function to fetch the data. read_function | | my_b_read() will call read_function to fetch the data. read_function | |
| must never be invoked directly. | | must never be invoked directly. | |
| */ | | */ | |
|
| int (*read_function)(struct st_io_cache *,byte *,uint); | | int (*read_function)(struct st_io_cache *,uchar *,size_t); | |
| /* | | /* | |
| Same idea as in the case of read_function, except my_b_write() needs to | | Same idea as in the case of read_function, except my_b_write() needs to | |
| 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 byte *,uint); | | 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 when the actual read I/O happens. These were added and | |
| are currently used for binary logging of LOAD DATA INFILE - when a | | are currently used for binary logging of LOAD DATA INFILE - when a | |
| block is read from the file, we create a block create/append event, and | | block is read from the file, we create a block create/append event, and | |
| | | | |
| skipping to change at line 475 | | skipping to change at line 483 | |
| 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; | |
| /* buffer_length is memory size allocated for buffer or write_buffer */ | | /* buffer_length is memory size allocated for buffer or write_buffer */ | |
|
| uint 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 *
/ | |
|
| uint 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 | |
| */ | | */ | |
| my_bool alloced_buffer; | | my_bool alloced_buffer; | |
| #ifdef HAVE_AIOWAIT | | #ifdef HAVE_AIOWAIT | |
| /* | | /* | |
| | | | |
| skipping to change at line 516 | | skipping to change at line 524 | |
| #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),(Buffer), (uint)(Count))) | | (*(info)->write_function)((info),(uchar *)(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)) :\ | |
| (_my_b_write(info,0,0) , ((*(info)->write_pos++)=(chr)))) | | (_my_b_write(info,0,0) , ((*(info)->write_pos++)=(chr)))) | |
| | | | |
| #define my_b_fill_cache(info) \ | | #define my_b_fill_cache(info) \ | |
| (((info)->read_end=(info)->read_pos),(*(info)->read_function)(info,0,0)) | | (((info)->read_end=(info)->read_pos),(*(info)->read_function)(info,0,0)) | |
| | | | |
| #define my_b_tell(info) ((info)->pos_in_file + \ | | #define my_b_tell(info) ((info)->pos_in_file + \ | |
|
| (uint) (*(info)->current_pos - (info)->request_pos)
) | | (size_t) (*(info)->current_pos - (info)->request_po
s)) | |
| | | | |
| #define my_b_get_buffer_start(info) (info)->request_pos | | #define my_b_get_buffer_start(info) (info)->request_pos | |
| #define my_b_get_bytes_in_buffer(info) (char*) (info)->read_end - \ | | #define my_b_get_bytes_in_buffer(info) (char*) (info)->read_end - \ | |
| (char*) my_b_get_buffer_start(info) | | (char*) my_b_get_buffer_start(info) | |
| #define my_b_get_pos_in_file(info) (info)->pos_in_file | | #define my_b_get_pos_in_file(info) (info)->pos_in_file | |
| | | | |
| /* 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); | |
| 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) (uint) (*(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; | |
| | | | |
| /* 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_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(my_string buf,uint 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 gptr my_once_alloc(uint 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 char *my_once_memdup(const char *src, uint 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 AccsesFlags, 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 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); | |
|
| extern uint my_read(File Filedes,byte *Buffer,uint Count,myf MyFlags); | | extern size_t my_read(File Filedes,uchar *Buffer,size_t Count,myf MyFlags); | |
| extern uint my_pread(File Filedes,byte *Buffer,uint Count,my_off_t offset, | | extern size_t my_pread(File Filedes,uchar *Buffer,size_t Count,my_off_t off | |
| | | set, | |
| myf MyFlags); | | myf MyFlags); | |
| extern int my_rename(const char *from,const char *to,myf MyFlags); | | extern int my_rename(const char *from,const char *to,myf MyFlags); | |
| extern my_off_t my_seek(File fd,my_off_t pos,int whence,myf MyFlags); | | extern my_off_t my_seek(File fd,my_off_t pos,int whence,myf MyFlags); | |
| extern my_off_t my_tell(File fd,myf MyFlags); | | extern my_off_t my_tell(File fd,myf MyFlags); | |
|
| extern uint my_write(File Filedes,const byte *Buffer,uint Count, | | extern size_t my_write(File Filedes,const uchar *Buffer,size_t Count, | |
| myf MyFlags); | | myf MyFlags); | |
|
| extern uint my_pwrite(File Filedes,const byte *Buffer,uint 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 uint my_fread(FILE *stream,byte *Buffer,uint Count,myf MyFlags); | | extern size_t my_fread(FILE *stream,uchar *Buffer,size_t Count,myf MyFlags) | |
| extern uint my_fwrite(FILE *stream,const byte *Buffer,uint 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 gptr _mymalloc(size_t uSize, const char *sFile, | | extern void *_mymalloc(size_t uSize,const char *sFile, | |
| uint uLine, myf MyFlag); | | uint uLine, myf MyFlag); | |
|
| extern gptr _myrealloc(gptr pPtr, size_t uSize, const char *sFile, | | extern void *_myrealloc(void *pPtr,size_t uSize,const char *sFile, | |
| uint uLine, myf MyFlag); | | uint uLine, myf MyFlag); | |
| extern gptr my_multi_malloc _VARARGS((myf MyFlags, ...)); | | extern void * my_multi_malloc _VARARGS((myf MyFlags, ...)); | |
| extern void _myfree(gptr pPtr, const char *sFile, uint uLine, myf MyFlag); | | extern void _myfree(void *pPtr,const char *sFile,uint uLine, myf MyFlag); | |
| extern int _sanity(const char *sFile,unsigned int uLine); | | extern int _sanity(const char *sFile, uint uLine); | |
| extern gptr _my_memdup(const byte *from, size_t length, | | extern void *_my_memdup(const void *from, size_t length, | |
| const char *sFile, uint uLine, myf MyFlag); | | const char *sFile, uint uLine,myf MyFlag); | |
| extern my_string _my_strdup(const char *from, const char *sFile, uint uLine | | extern char * _my_strdup(const char *from, const char *sFile, uint uLine, | |
| , | | myf MyFlag); | |
| myf MyFlag); | | extern char *_my_strndup(const char *from, size_t length, | |
| extern char *_my_strdup_with_length(const char *from, size_t length, | | const char *sFile, uint uLine, | |
| const char *sFile, uint uLine, | | myf MyFlag); | |
| 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 __WIN__ | | #ifdef __WIN__ | |
| extern int my_access(const char *path, int amode); | | extern int my_access(const char *path, int amode); | |
| extern File my_sopen(const char *path, int oflag, int shflag, int pmode); | | extern File my_sopen(const char *path, int oflag, int shflag, int pmode); | |
| #else | | #else | |
| #define my_access access | | #define my_access access | |
| #endif | | #endif | |
| extern int check_if_legal_filename(const char *path); | | extern int check_if_legal_filename(const char *path); | |
|
| | | extern int check_if_legal_tablename(const char *path); | |
| | | | |
| #if defined(__WIN__) && defined(__NT__) | | #if defined(__WIN__) && defined(__NT__) | |
| 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 | |
| | | | |
| #ifndef TERMINATE | | #ifndef TERMINATE | |
|
| extern void TERMINATE(FILE *file); | | extern void TERMINATE(FILE *file, uint flag); | |
| #endif | | #endif | |
| extern void init_glob_errs(void); | | extern void init_glob_errs(void); | |
| 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 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_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_by_file(const char *file_name, myf my_flags); | |
| extern int my_error _VARARGS((int nr,myf MyFlags, ...)); | | extern int my_error _VARARGS((int nr,myf MyFlags, ...)); | |
| extern int my_printf_error _VARARGS((uint my_err, const char *format, | | extern int 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 int my_error_register(const char **errmsgs, int first, int last); | | extern int my_error_register(const char **errmsgs, 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 int my_message(uint my_err, const char *str,myf MyFlags); | | extern int my_message(uint my_err, const char *str,myf MyFlags); | |
| extern int my_message_no_curses(uint my_err, const char *str,myf MyFlags); | | extern int my_message_no_curses(uint my_err, const char *str,myf MyFlags); | |
| extern int my_message_curses(uint my_err, const char *str,myf MyFlags); | | extern int my_message_curses(uint my_err, const char *str,myf MyFlags); | |
| 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 my_string 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 | |
| #define dont_break() | | #define dont_break() | |
| #define allow_break() | | #define allow_break() | |
| #endif | | #endif | |
| | | | |
|
| | | #ifdef EXTRA_DEBUG | |
| | | void my_print_open_files(void); | |
| | | #else | |
| | | #define my_print_open_files() | |
| | | #endif | |
| | | | |
| extern my_bool init_tmpdir(MY_TMPDIR *tmpdir, const char *pathlist); | | extern my_bool init_tmpdir(MY_TMPDIR *tmpdir, const char *pathlist); | |
| extern char *my_tmpdir(MY_TMPDIR *tmpdir); | | extern char *my_tmpdir(MY_TMPDIR *tmpdir); | |
| extern void free_tmpdir(MY_TMPDIR *tmpdir); | | extern void free_tmpdir(MY_TMPDIR *tmpdir); | |
| | | | |
| extern void my_remember_signal(int signal_number,sig_handler (*func)(int)); | | extern void my_remember_signal(int signal_number,sig_handler (*func)(int)); | |
|
| extern uint dirname_part(my_string to,const char *name); | | extern size_t dirname_part(char * to,const char *name, size_t *to_res_lengt | |
| extern uint dirname_length(const char *name); | | h); | |
| | | extern size_t dirname_length(const char *name); | |
| #define base_name(A) (A+dirname_length(A)) | | #define base_name(A) (A+dirname_length(A)) | |
| extern int test_if_hard_path(const char *dir_name); | | extern int test_if_hard_path(const char *dir_name); | |
| extern my_bool has_path(const char *name); | | extern my_bool has_path(const char *name); | |
| extern char *convert_dirname(char *to, const char *from, const char *from_e
nd); | | extern char *convert_dirname(char *to, const char *from, const char *from_e
nd); | |
|
| extern void to_unix_path(my_string name); | | extern void to_unix_path(char * name); | |
| extern my_string fn_ext(const char *name); | | extern char * fn_ext(const char *name); | |
| extern my_string fn_same(my_string toname,const char *name,int flag); | | extern char * fn_same(char * toname,const char *name,int flag); | |
| extern my_string fn_format(my_string to,const char *name,const char *dir, | | extern char * fn_format(char * to,const char *name,const char *dir, | |
| const char *form, uint flag); | | const char *form, uint flag); | |
|
| extern size_s strlength(const char *str); | | extern size_t strlength(const char *str); | |
| extern void pack_dirname(my_string to,const char *from); | | extern void pack_dirname(char * to,const char *from); | |
| extern uint normalize_dirname(char * to, const char *from); | | extern size_t normalize_dirname(char * to, const char *from); | |
| extern uint unpack_dirname(my_string to,const char *from); | | extern size_t unpack_dirname(char * to,const char *from); | |
| extern uint cleanup_dirname(my_string to,const char *from); | | extern size_t cleanup_dirname(char * to,const char *from); | |
| extern uint system_filename(my_string to,const char *from); | | extern size_t system_filename(char * to,const char *from); | |
| extern uint unpack_filename(my_string to,const char *from); | | extern size_t unpack_filename(char * to,const char *from); | |
| extern my_string intern_filename(my_string to,const char *from); | | extern char * intern_filename(char * to,const char *from); | |
| extern my_string directory_file_name(my_string dst, const char *src); | | extern char * directory_file_name(char * dst, const char *src); | |
| extern int pack_filename(my_string to, const char *name, size_s 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 my_string my_path(my_string to,const char *progname, | | | |
| const char *own_pathname_part); | | const char *own_pathname_part); | |
|
| extern my_string my_load_path(my_string 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,pbool str_is_pa | | extern int wild_compare(const char *str,const char *wildstr, | |
| ttern); | | pbool str_is_pattern); | |
| extern WF_PACK *wf_comp(my_string str); | | extern WF_PACK *wf_comp(char * str); | |
| extern int wf_test(struct wild_file_pack *wf_pack,const char *name); | | extern int wf_test(struct wild_file_pack *wf_pack,const char *name); | |
| extern void wf_end(struct wild_file_pack *buffer); | | extern void wf_end(struct wild_file_pack *buffer); | |
|
| extern size_s strip_sp(my_string 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(my_string to,int timeflag,time_t use_time); | | extern void get_date(char * to,int timeflag,time_t use_time); | |
| extern void soundex(CHARSET_INFO *, my_string out_pntr, my_string in_pntr,p | | extern void soundex(CHARSET_INFO *, char * out_pntr, char * in_pntr, | |
| bool remove_garbage); | | pbool remove_garbage); | |
| extern int init_record_cache(RECORD_CACHE *info,uint cachesize,File file, | | extern int init_record_cache(RECORD_CACHE *info,size_t cachesize,File file, | |
| uint 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,byte *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 byte *record,uint 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 long my_clock(void); | |
| extern sig_handler sigtstp_handler(int signal_number); | | 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(void *base,uint items,size_s 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_s 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); | |
|
| extern qsort2_cmp get_ptr_compare(uint); | | extern qsort2_cmp get_ptr_compare(size_t); | |
| void my_store_ptr(byte *buff, uint pack_length, my_off_t pos); | | void my_store_ptr(uchar *buff, size_t pack_length, my_off_t pos); | |
| my_off_t my_get_ptr(byte *ptr, uint pack_length); | | my_off_t my_get_ptr(uchar *ptr, size_t pack_length); | |
| extern int init_io_cache(IO_CACHE *info,File file,uint cachesize, | | extern int init_io_cache(IO_CACHE *info,File file,size_t cachesize, | |
| enum cache_type type,my_off_t seek_offset, | | enum cache_type type,my_off_t seek_offset, | |
| pbool use_async_io, myf cache_myflags); | | pbool use_async_io, myf cache_myflags); | |
| extern my_bool reinit_io_cache(IO_CACHE *info,enum cache_type type, | | extern my_bool reinit_io_cache(IO_CACHE *info,enum cache_type type, | |
| my_off_t seek_offset,pbool use_async_io, | | my_off_t seek_offset,pbool use_async_io, | |
| pbool clear_cache); | | pbool clear_cache); | |
| extern void setup_io_cache(IO_CACHE* info); | | extern void setup_io_cache(IO_CACHE* info); | |
|
| extern int _my_b_read(IO_CACHE *info,byte *Buffer,uint Count); | | extern int _my_b_read(IO_CACHE *info,uchar *Buffer,size_t Count); | |
| #ifdef THREAD | | #ifdef THREAD | |
|
| extern int _my_b_read_r(IO_CACHE *info,byte *Buffer,uint Count); | | extern int _my_b_read_r(IO_CACHE *info,uchar *Buffer,size_t Count); | |
| extern void init_io_cache_share(IO_CACHE *read_cache, IO_CACHE_SHARE *cshar
e, | | extern void init_io_cache_share(IO_CACHE *read_cache, IO_CACHE_SHARE *cshar
e, | |
| IO_CACHE *write_cache, uint num_threads); | | IO_CACHE *write_cache, uint num_threads); | |
| extern void remove_io_thread(IO_CACHE *info); | | extern void remove_io_thread(IO_CACHE *info); | |
| #endif | | #endif | |
|
| extern int _my_b_seq_read(IO_CACHE *info,byte *Buffer,uint Count); | | extern int _my_b_seq_read(IO_CACHE *info,uchar *Buffer,size_t Count); | |
| extern int _my_b_net_read(IO_CACHE *info,byte *Buffer,uint Count); | | extern int _my_b_net_read(IO_CACHE *info,uchar *Buffer,size_t Count); | |
| extern int _my_b_get(IO_CACHE *info); | | extern int _my_b_get(IO_CACHE *info); | |
|
| extern int _my_b_async_read(IO_CACHE *info,byte *Buffer,uint Count); | | extern int _my_b_async_read(IO_CACHE *info,uchar *Buffer,size_t Count); | |
| extern int _my_b_write(IO_CACHE *info,const byte *Buffer,uint Count); | | extern int _my_b_write(IO_CACHE *info,const uchar *Buffer,size_t Count); | |
| extern int my_b_append(IO_CACHE *info,const byte *Buffer,uint Count); | | extern int my_b_append(IO_CACHE *info,const uchar *Buffer,size_t Count); | |
| extern int my_b_safe_write(IO_CACHE *info,const byte *Buffer,uint Count); | | extern int my_b_safe_write(IO_CACHE *info,const uchar *Buffer,size_t Count) | |
| | | ; | |
| | | | |
|
| extern int my_block_write(IO_CACHE *info, const byte *Buffer, | | extern int my_block_write(IO_CACHE *info, const uchar *Buffer, | |
| uint Count, my_off_t pos); | | size_t Count, my_off_t pos); | |
| extern int my_b_flush_io_cache(IO_CACHE *info, int need_append_buffer_lock)
; | | extern int my_b_flush_io_cache(IO_CACHE *info, int need_append_buffer_lock)
; | |
| | | | |
| #define flush_io_cache(info) my_b_flush_io_cache((info),1) | | #define flush_io_cache(info) my_b_flush_io_cache((info),1) | |
| | | | |
| extern int end_io_cache(IO_CACHE *info); | | extern int end_io_cache(IO_CACHE *info); | |
|
| extern uint my_b_fill(IO_CACHE *info); | | extern size_t my_b_fill(IO_CACHE *info); | |
| extern void my_b_seek(IO_CACHE *info,my_off_t pos); | | extern void my_b_seek(IO_CACHE *info,my_off_t pos); | |
|
| extern uint my_b_gets(IO_CACHE *info, char *to, uint max_length); | | extern size_t my_b_gets(IO_CACHE *info, char *to, size_t max_length); | |
| extern my_off_t my_b_filelength(IO_CACHE *info); | | extern my_off_t my_b_filelength(IO_CACHE *info); | |
|
| extern uint my_b_printf(IO_CACHE *info, const char* fmt, ...); | | extern size_t my_b_printf(IO_CACHE *info, const char* fmt, ...); | |
| extern uint 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, uint 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_array(A,B,C,D CALLER_IN | | #define my_init_dynamic_array(A,B,C,D) init_dynamic_array2(A,B,NULL,C,D CAL | |
| FO) | | LER_INFO) | |
| #define my_init_dynamic_array_ci(A,B,C,D) init_dynamic_array(A,B,C,D ORIG_C | | #define my_init_dynamic_array_ci(A,B,C,D) init_dynamic_array2(A,B,NULL,C,D | |
| ALLER_INFO) | | ORIG_CALLER_INFO) | |
| | | #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, | |
| | | uint alloc_increment | |
| | | CALLER_INFO_PROTO); | |
| | | /* 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 | |
| CALLER_INFO_PROTO); | | CALLER_INFO_PROTO); | |
|
| extern my_bool insert_dynamic(DYNAMIC_ARRAY *array,gptr element); | | extern my_bool insert_dynamic(DYNAMIC_ARRAY *array,uchar * element); | |
| extern byte *alloc_dynamic(DYNAMIC_ARRAY *array); | | extern uchar *alloc_dynamic(DYNAMIC_ARRAY *array); | |
| extern byte *pop_dynamic(DYNAMIC_ARRAY*); | | extern uchar *pop_dynamic(DYNAMIC_ARRAY*); | |
| extern my_bool set_dynamic(DYNAMIC_ARRAY *array,gptr element,uint array_ind | | extern my_bool set_dynamic(DYNAMIC_ARRAY *array,uchar * element,uint array_ | |
| ex); | | index); | |
| extern void get_dynamic(DYNAMIC_ARRAY *array,gptr element,uint array_index) | | 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 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); | |
| #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) | |
| #define dynamic_element(array,array_index,type) ((type)((array)->buffer) +(
array_index)) | | #define dynamic_element(array,array_index,type) ((type)((array)->buffer) +(
array_index)) | |
|
| #define push_dynamic(A,B) insert_dynamic(A,B) | | #define push_dynamic(A,B) insert_dynamic((A),(B)) | |
| #define reset_dynamic(array) ((array)->elements= 0) | | #define reset_dynamic(array) ((array)->elements= 0) | |
|
| | | #define sort_dynamic(A,cmp) my_qsort((A)->buffer, (A)->elements, (A)->size_
of_element, (cmp)) | |
| | | | |
| extern my_bool init_dynamic_string(DYNAMIC_STRING *str, const char *init_st
r, | | extern my_bool init_dynamic_string(DYNAMIC_STRING *str, const char *init_st
r, | |
|
| uint init_alloc,uint alloc_increment); | | size_t init_alloc,size_t alloc_increment)
; | |
| extern my_bool dynstr_append(DYNAMIC_STRING *str, const char *append); | | extern my_bool dynstr_append(DYNAMIC_STRING *str, const char *append); | |
| my_bool dynstr_append_mem(DYNAMIC_STRING *str, const char *append, | | my_bool dynstr_append_mem(DYNAMIC_STRING *str, const char *append, | |
|
| uint 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, ulong 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 void dynstr_free(DYNAMIC_STRING *str); | | extern void dynstr_free(DYNAMIC_STRING *str); | |
| #ifdef HAVE_MLOCK | | #ifdef HAVE_MLOCK | |
|
| extern byte *my_malloc_lock(uint length,myf flags); | | extern void *my_malloc_lock(size_t length,myf flags); | |
| extern void my_free_lock(byte *ptr,myf flags); | | 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,B) my_free((A),(B)) | | #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, uint block_size, | | extern void init_alloc_root(MEM_ROOT *mem_root, size_t block_size, | |
| uint pre_alloc_size); | | size_t pre_alloc_size); | |
| extern gptr alloc_root(MEM_ROOT *mem_root,unsigned int Size); | | extern void *alloc_root(MEM_ROOT *mem_root, size_t Size); | |
| extern gptr 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, uint block_size, | | extern void reset_root_defaults(MEM_ROOT *mem_root, size_t block_size, | |
| uint 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,uint len); | | extern char *strmake_root(MEM_ROOT *root,const char *str,size_t len); | |
| extern char *memdup_root(MEM_ROOT *root,const char *str,uint 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 int my_load_defaults(const char *conf_file, const char **groups, | |
| | | 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, | | extern int modify_defaults_file(const char *file_location, const char *opti
on, | |
| const char *option_value, | | const char *option_value, | |
| const char *section_name, int remove_option
); | | 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); | |
| 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(byte *, ulong *, ulong *); | | extern my_bool my_compress(uchar *, size_t *, size_t *); | |
| extern my_bool my_uncompress(byte *, ulong *, ulong *); | | extern my_bool my_uncompress(uchar *, size_t , size_t *); | |
| extern byte *my_compress_alloc(const byte *packet, ulong *len, ulong *compl | | extern uchar *my_compress_alloc(const uchar *packet, size_t *len, | |
| en); | | size_t *complen); | |
| extern ha_checksum my_checksum(ha_checksum crc, const byte *mem, uint count | | extern int packfrm(uchar *, size_t, uchar **, size_t *); | |
| ); | | extern int unpackfrm(uchar **, size_t *, const uchar *); | |
| extern uint my_bit_log2(ulong value); | | | |
| extern uint my_count_bits(ulonglong v); | | extern ha_checksum my_checksum(ha_checksum crc, const uchar *mem, | |
| extern uint my_count_bits_ushort(ushort v); | | size_t count); | |
| 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); | |
| | | | |
|
| ulonglong my_getsystime(void); | | extern time_t my_time(myf flags); | |
| my_bool my_gethwaddr(uchar *to); | | extern ulonglong my_getsystime(void); | |
| | | extern ulonglong my_micro_time(); | |
| | | extern ulonglong my_micro_time_and_time(time_t *time_arg); | |
| | | time_t my_time_possible_from_micro(ulonglong microtime); | |
| | | extern my_bool my_gethwaddr(uchar *to); | |
| | | extern int my_getncpus(); | |
| | | | |
| #ifdef HAVE_SYS_MMAN_H | | #ifdef HAVE_SYS_MMAN_H | |
| #include <sys/mman.h> | | #include <sys/mman.h> | |
| | | | |
| #ifndef MAP_NOSYNC | | #ifndef MAP_NOSYNC | |
| #define MAP_NOSYNC 0 | | #define MAP_NOSYNC 0 | |
| #endif | | #endif | |
|
| | | #ifndef MAP_NORESERVE | |
| | | #define MAP_NORESERVE 0 /* For irix and AIX */ | |
| | | #endif | |
| | | | |
|
| | | #ifdef HAVE_MMAP64 | |
| | | #define my_mmap(a,b,c,d,e,f) mmap64(a,b,c,d,e,f) | |
| | | #else | |
| #define my_mmap(a,b,c,d,e,f) mmap(a,b,c,d,e,f) | | #define my_mmap(a,b,c,d,e,f) mmap(a,b,c,d,e,f) | |
|
| | | #endif | |
| #define my_munmap(a,b) munmap((a),(b)) | | #define my_munmap(a,b) munmap((a),(b)) | |
| | | | |
| #else | | #else | |
| /* 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_SHARED 0x0001 | | #define MAP_SHARED 0x0001 | |
|
| | | #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__ | | #ifndef __NETWARE__ | |
| #define HAVE_MMAP | | #define HAVE_MMAP | |
| #endif | | #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); | |
| | | | |
| skipping to change at line 894 | | skipping to change at line 943 | |
| | | | |
| /* 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 CHARSET_INFO *get_compatible_charset_with_ctype(CHARSET_INFO | | | |
| *original_cs); | | extern my_bool resolve_charset(const char *cs_name, | |
| | | CHARSET_INFO *default_cs, | |
| | | CHARSET_INFO **cs); | |
| | | extern my_bool resolve_collation(const char *cl_name, | |
| | | CHARSET_INFO *default_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 ulong escape_string_for_mysql(CHARSET_INFO *charset_info, | | extern size_t escape_string_for_mysql(CHARSET_INFO *charset_info, | |
| char *to, ulong to_length, | | char *to, size_t to_length, | |
| const char *from, ulong length); | | const char *from, size_t length); | |
| #ifdef __WIN__ | | #ifdef __WIN__ | |
| #define BACKSLASH_MBTAIL | | #define BACKSLASH_MBTAIL | |
| /* File system character set */ | | /* File system character set */ | |
| extern CHARSET_INFO *fs_character_set(void); | | extern CHARSET_INFO *fs_character_set(void); | |
| #endif | | #endif | |
|
| extern ulong escape_quotes_for_mysql(CHARSET_INFO *charset_info, | | extern size_t escape_quotes_for_mysql(CHARSET_INFO *charset_info, | |
| char *to, ulong to_length, | | char *to, size_t to_length, | |
| const char *from, ulong length); | | const char *from, size_t length); | |
| | | | |
| extern void thd_increment_bytes_sent(ulong length); | | extern void thd_increment_bytes_sent(ulong length); | |
| extern void thd_increment_bytes_received(ulong length); | | extern void thd_increment_bytes_received(ulong length); | |
| extern void thd_increment_net_big_packet_count(ulong length); | | extern void thd_increment_net_big_packet_count(ulong length); | |
| | | | |
| #ifdef __WIN__ | | #ifdef __WIN__ | |
| extern my_bool have_tcpip; /* Is set if tcpip is used */ | | extern my_bool have_tcpip; /* Is set if tcpip is used */ | |
| | | | |
| /* implemented in my_windac.c */ | | /* implemented in my_windac.c */ | |
| | | | |
| 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, unsigned long clen, unsigned long* plen); | | char* my_cgets(char *string, size_t clen, size_t* plen); | |
| | | | |
| #endif | | #endif | |
| #ifdef __NETWARE__ | | #ifdef __NETWARE__ | |
| void netware_reg_user(const char *ip, const char *user, | | void netware_reg_user(const char *ip, const char *user, | |
| const char *application); | | const char *application); | |
| #endif | | #endif | |
| | | | |
| C_MODE_END | | C_MODE_END | |
|
| #include "raid.h" | | | |
| #endif /* _my_sys_h */ | | #endif /* _my_sys_h */ | |
| | | | |
End of changes. 107 change blocks. |
| 190 lines changed or deleted | | 245 lines changed or added | |
|
| mysql.h | | mysql.h | |
| | | | |
| skipping to change at line 49 | | skipping to change at line 49 | |
| #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 */ | |
| #include <sys/types.h> | | #include <sys/types.h> | |
| #ifdef __LCC__ | | #ifdef __LCC__ | |
|
| #include <winsock.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 | |
| #define STDCALL __stdcall | | #define STDCALL __stdcall | |
| #endif | | #endif | |
|
| typedef char * gptr; | | | |
| | | | |
| #ifndef my_socket_defined | | #ifndef my_socket_defined | |
| #ifdef __WIN__ | | #ifdef __WIN__ | |
| #define my_socket SOCKET | | #define my_socket SOCKET | |
| #else | | #else | |
| typedef int my_socket; | | typedef int my_socket; | |
| #endif /* __WIN__ */ | | #endif /* __WIN__ */ | |
| #endif /* my_socket_defined */ | | #endif /* my_socket_defined */ | |
| #endif /* _global_h */ | | #endif /* _global_h */ | |
| | | | |
| #include "mysql_version.h" | | #include "mysql_version.h" | |
| #include "mysql_com.h" | | #include "mysql_com.h" | |
| #include "mysql_time.h" | | #include "mysql_time.h" | |
|
| #include "typelib.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__ | | #ifdef __NETWARE__ | |
| #pragma pack(push, 8) /* 8 byte alignment */ | | #pragma pack(push, 8) /* 8 byte alignment */ | |
| #endif | | #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) <= FIELD_TYPE_INT24 || (t) == FIELD_TYPE_YEAR |
| (t) == FIELD_TYPE_NEWDECIMAL) | | #define IS_NUM(t) ((t) <= MYSQL_TYPE_INT24 || (t) == MYSQL_TYPE_YEAR |
| (t) == MYSQL_TYPE_NEWDECIMAL) | |
| #define IS_NUM_FIELD(f) ((f)->flags & NUM_FLAG) | | #define IS_NUM_FIELD(f) ((f)->flags & NUM_FLAG) | |
|
| #define INTERNAL_NUM_FIELD(f) (((f)->type <= FIELD_TYPE_INT24 && ((f)->type
!= FIELD_TYPE_TIMESTAMP || (f)->length == 14 || (f)->length == 8)) || (f)-
>type == FIELD_TYPE_YEAR) | | #define INTERNAL_NUM_FIELD(f) (((f)->type <= MYSQL_TYPE_INT24 && ((f)->type
!= MYSQL_TYPE_TIMESTAMP || (f)->length == 14 || (f)->length == 8)) || (f)-
>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 117 | | skipping to change at line 115 | |
| unsigned int org_name_length; | | unsigned int org_name_length; | |
| unsigned int table_length; | | unsigned int table_length; | |
| unsigned int org_table_length; | | unsigned int org_table_length; | |
| unsigned int db_length; | | unsigned int db_length; | |
| unsigned int catalog_length; | | unsigned int catalog_length; | |
| unsigned int def_length; | | unsigned int def_length; | |
| unsigned int flags; /* Div flags */ | | unsigned int flags; /* Div flags */ | |
| unsigned int decimals; /* Number of decimals in field */ | | unsigned int decimals; /* Number of decimals in field */ | |
| unsigned int charsetnr; /* Character set */ | | unsigned int charsetnr; /* Character set */ | |
| enum enum_field_types type; /* Type of field. See mysql_com.h for types *
/ | | enum enum_field_types type; /* Type of field. See mysql_com.h for types *
/ | |
|
| | | void *extension; | |
| } MYSQL_FIELD; | | } MYSQL_FIELD; | |
| | | | |
| typedef char **MYSQL_ROW; /* return data as array of strings *
/ | | typedef char **MYSQL_ROW; /* return data as array of strings *
/ | |
| typedef unsigned int MYSQL_FIELD_OFFSET; /* offset to current field */ | | typedef unsigned int MYSQL_FIELD_OFFSET; /* offset to current field */ | |
| | | | |
| #ifndef _global_h | | #ifndef _global_h | |
| #if defined(NO_CLIENT_LONG_LONG) | | #if defined(NO_CLIENT_LONG_LONG) | |
| typedef unsigned long my_ulonglong; | | typedef unsigned long my_ulonglong; | |
| #elif defined (__WIN__) | | #elif defined (__WIN__) | |
| typedef unsigned __int64 my_ulonglong; | | typedef unsigned __int64 my_ulonglong; | |
| #else | | #else | |
| typedef unsigned long long my_ulonglong; | | typedef unsigned long long my_ulonglong; | |
| #endif | | #endif | |
| #endif | | #endif | |
| | | | |
|
| | | #include "typelib.h" | |
| | | | |
| #define MYSQL_COUNT_ERROR (~(my_ulonglong) 0) | | #define MYSQL_COUNT_ERROR (~(my_ulonglong) 0) | |
| | | | |
| /* backward compatibility define - to be removed eventually */ | | /* backward compatibility define - to be removed eventually */ | |
| #define ER_WARN_DATA_TRUNCATED WARN_DATA_TRUNCATED | | #define ER_WARN_DATA_TRUNCATED WARN_DATA_TRUNCATED | |
| | | | |
| typedef struct st_mysql_rows { | | typedef struct st_mysql_rows { | |
| struct st_mysql_rows *next; /* list of rows */ | | struct st_mysql_rows *next; /* list of rows */ | |
| MYSQL_ROW data; | | MYSQL_ROW data; | |
| unsigned long length; | | unsigned long length; | |
| } MYSQL_ROWS; | | } MYSQL_ROWS; | |
| | | | |
| typedef MYSQL_ROWS *MYSQL_ROW_OFFSET; /* offset to current row */ | | typedef MYSQL_ROWS *MYSQL_ROW_OFFSET; /* offset to current row */ | |
| | | | |
| #include "my_alloc.h" | | #include "my_alloc.h" | |
| | | | |
| typedef struct embedded_query_result EMBEDDED_QUERY_RESULT; | | typedef struct embedded_query_result EMBEDDED_QUERY_RESULT; | |
| typedef struct st_mysql_data { | | typedef struct st_mysql_data { | |
|
| my_ulonglong rows; | | | |
| unsigned int fields; | | | |
| MYSQL_ROWS *data; | | MYSQL_ROWS *data; | |
|
| | | struct embedded_query_result *embedded_info; | |
| MEM_ROOT alloc; | | MEM_ROOT alloc; | |
|
| | | my_ulonglong rows; | |
| | | unsigned int fields; | |
| /* extra info for embedded library */ | | /* extra info for embedded library */ | |
|
| struct embedded_query_result *embedded_info; | | void *extension; | |
| } MYSQL_DATA; | | } MYSQL_DATA; | |
| | | | |
| enum mysql_option | | enum mysql_option | |
| { | | { | |
| MYSQL_OPT_CONNECT_TIMEOUT, MYSQL_OPT_COMPRESS, MYSQL_OPT_NAMED_PIPE, | | MYSQL_OPT_CONNECT_TIMEOUT, MYSQL_OPT_COMPRESS, MYSQL_OPT_NAMED_PIPE, | |
| MYSQL_INIT_COMMAND, MYSQL_READ_DEFAULT_FILE, MYSQL_READ_DEFAULT_GROUP, | | MYSQL_INIT_COMMAND, MYSQL_READ_DEFAULT_FILE, MYSQL_READ_DEFAULT_GROUP, | |
| MYSQL_SET_CHARSET_DIR, MYSQL_SET_CHARSET_NAME, MYSQL_OPT_LOCAL_INFILE, | | MYSQL_SET_CHARSET_DIR, MYSQL_SET_CHARSET_NAME, MYSQL_OPT_LOCAL_INFILE, | |
| MYSQL_OPT_PROTOCOL, MYSQL_SHARED_MEMORY_BASE_NAME, MYSQL_OPT_READ_TIMEOUT
, | | MYSQL_OPT_PROTOCOL, MYSQL_SHARED_MEMORY_BASE_NAME, MYSQL_OPT_READ_TIMEOUT
, | |
| MYSQL_OPT_WRITE_TIMEOUT, MYSQL_OPT_USE_RESULT, | | MYSQL_OPT_WRITE_TIMEOUT, MYSQL_OPT_USE_RESULT, | |
| MYSQL_OPT_USE_REMOTE_CONNECTION, MYSQL_OPT_USE_EMBEDDED_CONNECTION, | | MYSQL_OPT_USE_REMOTE_CONNECTION, MYSQL_OPT_USE_EMBEDDED_CONNECTION, | |
| | | | |
| skipping to change at line 217 | | skipping to change at line 219 | |
| my_bool secure_auth; | | my_bool secure_auth; | |
| /* 0 - never report, 1 - always report (default) */ | | /* 0 - never report, 1 - always report (default) */ | |
| my_bool report_data_truncation; | | my_bool report_data_truncation; | |
| | | | |
| /* function pointers for local infile support */ | | /* function pointers for local infile support */ | |
| int (*local_infile_init)(void **, const char *, void *); | | int (*local_infile_init)(void **, const char *, void *); | |
| int (*local_infile_read)(void *, char *, unsigned int); | | int (*local_infile_read)(void *, char *, unsigned int); | |
| void (*local_infile_end)(void *); | | void (*local_infile_end)(void *); | |
| int (*local_infile_error)(void *, char *, unsigned int); | | int (*local_infile_error)(void *, char *, unsigned int); | |
| void *local_infile_userdata; | | void *local_infile_userdata; | |
|
| | | void *extension; | |
| }; | | }; | |
| | | | |
| enum mysql_status | | enum mysql_status | |
| { | | { | |
| MYSQL_STATUS_READY,MYSQL_STATUS_GET_RESULT,MYSQL_STATUS_USE_RESULT | | MYSQL_STATUS_READY,MYSQL_STATUS_GET_RESULT,MYSQL_STATUS_USE_RESULT | |
| }; | | }; | |
| | | | |
| enum mysql_protocol_type | | enum mysql_protocol_type | |
| { | | { | |
| MYSQL_PROTOCOL_DEFAULT, MYSQL_PROTOCOL_TCP, MYSQL_PROTOCOL_SOCKET, | | MYSQL_PROTOCOL_DEFAULT, MYSQL_PROTOCOL_TCP, MYSQL_PROTOCOL_SOCKET, | |
| | | | |
| skipping to change at line 257 | | skipping to change at line 260 | |
| unsigned int mbminlen; /* min. length for multibyte strings */ | | unsigned int mbminlen; /* min. length for multibyte strings */ | |
| unsigned int mbmaxlen; /* max. length for multibyte strings */ | | unsigned int mbmaxlen; /* max. length for multibyte strings */ | |
| } MY_CHARSET_INFO; | | } MY_CHARSET_INFO; | |
| | | | |
| struct st_mysql_methods; | | struct st_mysql_methods; | |
| struct st_mysql_stmt; | | struct st_mysql_stmt; | |
| | | | |
| typedef struct st_mysql | | typedef struct st_mysql | |
| { | | { | |
| NET net; /* Communication parameters */ | | NET net; /* Communication parameters */ | |
|
| gptr connector_fd; /* ConnectorFd for SSL */ | | unsigned char *connector_fd; /* ConnectorFd for SSL */ | |
| char *host,*user,*passwd,*unix_socket,*server_version,*host_info, | | char *host,*user,*passwd,*unix_socket,*server_version,*host_info; | |
| *info; | | char *info, *db; | |
| char *db; | | | |
| struct charset_info_st *charset; | | struct charset_info_st *charset; | |
| MYSQL_FIELD *fields; | | MYSQL_FIELD *fields; | |
| MEM_ROOT field_alloc; | | MEM_ROOT field_alloc; | |
| my_ulonglong affected_rows; | | my_ulonglong affected_rows; | |
| my_ulonglong insert_id; /* id if insert on table with NEXTNR
*/ | | my_ulonglong insert_id; /* id if insert on table with NEXTNR
*/ | |
| my_ulonglong extra_info; /* Not used */ | | my_ulonglong extra_info; /* Not used */ | |
| unsigned long thread_id; /* Id for connection in server */ | | unsigned long thread_id; /* Id for connection in server */ | |
| unsigned long packet_length; | | unsigned long packet_length; | |
| unsigned int port; | | unsigned int port; | |
| unsigned long client_flag,server_capabilities; | | unsigned long client_flag,server_capabilities; | |
| | | | |
| skipping to change at line 306 | | skipping to change at line 309 | |
| struct st_mysql* last_used_con; | | struct st_mysql* last_used_con; | |
| | | | |
| LIST *stmts; /* list of all statements */ | | LIST *stmts; /* list of all statements */ | |
| const struct st_mysql_methods *methods; | | const struct st_mysql_methods *methods; | |
| void *thd; | | void *thd; | |
| /* | | /* | |
| Points to boolean flag in MYSQL_RES or MYSQL_STMT. We set this flag | | Points to boolean flag in MYSQL_RES or MYSQL_STMT. We set this flag | |
| from mysql_stmt_close if close had to cancel result set of this object. | | from mysql_stmt_close if close had to cancel result set of this object. | |
| */ | | */ | |
| my_bool *unbuffered_fetch_owner; | | my_bool *unbuffered_fetch_owner; | |
|
| #if defined(EMBEDDED_LIBRARY) || defined(EMBEDDED_LIBRARY_COMPATIBLE) || MY
SQL_VERSION_ID >= 50100 | | | |
| /* needed for embedded server - no net buffer to store the 'info' */ | | /* needed for embedded server - no net buffer to store the 'info' */ | |
| char *info_buffer; | | char *info_buffer; | |
|
| #endif | | void *extension; | |
| } MYSQL; | | } MYSQL; | |
| | | | |
| typedef struct st_mysql_res { | | typedef struct st_mysql_res { | |
|
| my_ulonglong row_count; | | my_ulonglong row_count; | |
| MYSQL_FIELD *fields; | | MYSQL_FIELD *fields; | |
| MYSQL_DATA *data; | | MYSQL_DATA *data; | |
| MYSQL_ROWS *data_cursor; | | MYSQL_ROWS *data_cursor; | |
| unsigned long *lengths; /* column lengths of current row */ | | unsigned long *lengths; /* column lengths of current row */ | |
| MYSQL *handle; /* for unbuffered reads */ | | MYSQL *handle; /* for unbuffered reads */ | |
|
| MEM_ROOT field_alloc; | | const struct st_mysql_methods *methods; | |
| unsigned int field_count, current_field; | | | |
| MYSQL_ROW row; /* If unbuffered read */ | | MYSQL_ROW row; /* If unbuffered read */ | |
| MYSQL_ROW current_row; /* buffer to current row */ | | MYSQL_ROW current_row; /* buffer to current row */ | |
|
| | | MEM_ROOT field_alloc; | |
| | | unsigned int field_count, current_field; | |
| my_bool eof; /* Used by mysql_fetch_row */ | | my_bool eof; /* Used by mysql_fetch_row */ | |
| /* mysql_stmt_close() had to cancel this result */ | | /* mysql_stmt_close() had to cancel this result */ | |
| my_bool unbuffered_fetch_cancelled; | | my_bool unbuffered_fetch_cancelled; | |
|
| const struct st_mysql_methods *methods; | | void *extension; | |
| } MYSQL_RES; | | } MYSQL_RES; | |
| | | | |
| #define MAX_MYSQL_MANAGER_ERR 256 | | #define MAX_MYSQL_MANAGER_ERR 256 | |
| #define MAX_MYSQL_MANAGER_MSG 256 | | #define MAX_MYSQL_MANAGER_MSG 256 | |
| | | | |
| #define MANAGER_OK 200 | | #define MANAGER_OK 200 | |
| #define MANAGER_INFO 250 | | #define MANAGER_INFO 250 | |
| #define MANAGER_ACCESS 401 | | #define MANAGER_ACCESS 401 | |
| #define MANAGER_CLIENT_ERR 450 | | #define MANAGER_CLIENT_ERR 450 | |
| #define MANAGER_INTERNAL_ERR 500 | | #define MANAGER_INTERNAL_ERR 500 | |
| | | | |
| #if !defined(MYSQL_SERVER) && !defined(MYSQL_CLIENT) | | #if !defined(MYSQL_SERVER) && !defined(MYSQL_CLIENT) | |
| #define MYSQL_CLIENT | | #define MYSQL_CLIENT | |
| #endif | | #endif | |
| | | | |
| typedef struct st_mysql_manager | | typedef struct st_mysql_manager | |
| { | | { | |
| NET net; | | NET net; | |
|
| char *host,*user,*passwd; | | char *host, *user, *passwd; | |
| | | char *net_buf, *net_buf_pos, *net_data_end; | |
| unsigned int port; | | unsigned int port; | |
|
| my_bool free_me; | | | |
| my_bool eof; | | | |
| int cmd_status; | | int cmd_status; | |
| int last_errno; | | int last_errno; | |
|
| char* net_buf,*net_buf_pos,*net_data_end; | | | |
| int net_buf_size; | | int net_buf_size; | |
|
| | | my_bool free_me; | |
| | | my_bool eof; | |
| char last_error[MAX_MYSQL_MANAGER_ERR]; | | char last_error[MAX_MYSQL_MANAGER_ERR]; | |
|
| | | void *extension; | |
| } MYSQL_MANAGER; | | } MYSQL_MANAGER; | |
| | | | |
| typedef struct st_mysql_parameters | | typedef struct st_mysql_parameters | |
| { | | { | |
| unsigned long *p_max_allowed_packet; | | unsigned long *p_max_allowed_packet; | |
| unsigned long *p_net_buffer_length; | | unsigned long *p_net_buffer_length; | |
|
| | | void *extension; | |
| } MYSQL_PARAMETERS; | | } MYSQL_PARAMETERS; | |
| | | | |
| #if !defined(MYSQL_SERVER) && !defined(EMBEDDED_LIBRARY) | | #if !defined(MYSQL_SERVER) && !defined(EMBEDDED_LIBRARY) | |
| #define max_allowed_packet (*mysql_get_parameters()->p_max_allowed_packet) | | #define max_allowed_packet (*mysql_get_parameters()->p_max_allowed_packet) | |
| #define net_buffer_length (*mysql_get_parameters()->p_net_buffer_length) | | #define net_buffer_length (*mysql_get_parameters()->p_net_buffer_length) | |
| #endif | | #endif | |
| | | | |
| /* | | /* | |
| Set up and bring down the server; to ensure that applications will | | Set up and bring down the server; to ensure that applications will | |
| work when linked against either the standard client library or the | | work when linked against either the standard client library or the | |
| embedded server library, these functions should be called. | | embedded server library, these functions should be called. | |
| */ | | */ | |
| int STDCALL mysql_server_init(int argc, char **argv, char **groups); | | int STDCALL mysql_server_init(int argc, char **argv, char **groups); | |
| void STDCALL mysql_server_end(void); | | void STDCALL mysql_server_end(void); | |
|
| | | | |
| /* | | /* | |
| mysql_server_init/end need to be called when using libmysqld or | | mysql_server_init/end need to be called when using libmysqld or | |
| libmysqlclient (exactly, mysql_server_init() is called by mysql_init() so | | libmysqlclient (exactly, mysql_server_init() is called by mysql_init() so | |
| you don't need to call it explicitely; but you need to call | | you don't need to call it explicitely; but you need to call | |
| mysql_server_end() to free memory). The names are a bit misleading | | mysql_server_end() to free memory). The names are a bit misleading | |
| (mysql_SERVER* to be used when using libmysqlCLIENT). So we add more gene
ral | | (mysql_SERVER* to be used when using libmysqlCLIENT). So we add more gene
ral | |
| names which suit well whether you're using libmysqld or libmysqlclient. W
e | | names which suit well whether you're using libmysqld or libmysqlclient. W
e | |
| intend to promote these aliases over the mysql_server* ones. | | intend to promote these aliases over the mysql_server* ones. | |
| */ | | */ | |
| #define mysql_library_init mysql_server_init | | #define mysql_library_init mysql_server_init | |
| | | | |
| skipping to change at line 529 | | skipping to change at line 535 | |
| const char * STDCALL mysql_get_server_info(MYSQL *mysql); | | const char * STDCALL mysql_get_server_info(MYSQL *mysql); | |
| const char * STDCALL mysql_get_client_info(void); | | const char * STDCALL mysql_get_client_info(void); | |
| unsigned long STDCALL mysql_get_client_version(void); | | unsigned long STDCALL mysql_get_client_version(void); | |
| const char * STDCALL mysql_get_host_info(MYSQL *mysql); | | const char * STDCALL mysql_get_host_info(MYSQL *mysql); | |
| unsigned long STDCALL mysql_get_server_version(MYSQL *mysql); | | unsigned long STDCALL mysql_get_server_version(MYSQL *mysql); | |
| unsigned int STDCALL mysql_get_proto_info(MYSQL *mysql); | | unsigned int STDCALL mysql_get_proto_info(MYSQL *mysql); | |
| MYSQL_RES * STDCALL mysql_list_dbs(MYSQL *mysql,const char *wild); | | MYSQL_RES * STDCALL mysql_list_dbs(MYSQL *mysql,const char *wild); | |
| MYSQL_RES * STDCALL mysql_list_tables(MYSQL *mysql,const char *wild); | | MYSQL_RES * STDCALL mysql_list_tables(MYSQL *mysql,const char *wild); | |
| MYSQL_RES * STDCALL mysql_list_processes(MYSQL *mysql); | | MYSQL_RES * STDCALL mysql_list_processes(MYSQL *mysql); | |
| int STDCALL mysql_options(MYSQL *mysql,enum mysql_option option, | | int STDCALL mysql_options(MYSQL *mysql,enum mysql_option option, | |
|
| const char *arg); | | const void *arg); | |
| void STDCALL mysql_free_result(MYSQL_RES *result); | | void STDCALL mysql_free_result(MYSQL_RES *result); | |
| void STDCALL mysql_data_seek(MYSQL_RES *result, | | void STDCALL mysql_data_seek(MYSQL_RES *result, | |
| my_ulonglong offset); | | my_ulonglong offset); | |
| MYSQL_ROW_OFFSET STDCALL mysql_row_seek(MYSQL_RES *result, | | MYSQL_ROW_OFFSET STDCALL mysql_row_seek(MYSQL_RES *result, | |
| MYSQL_ROW_OFFSET offset); | | MYSQL_ROW_OFFSET offset); | |
| MYSQL_FIELD_OFFSET STDCALL mysql_field_seek(MYSQL_RES *result, | | MYSQL_FIELD_OFFSET STDCALL mysql_field_seek(MYSQL_RES *result, | |
| MYSQL_FIELD_OFFSET offset); | | MYSQL_FIELD_OFFSET offset); | |
| MYSQL_ROW STDCALL mysql_fetch_row(MYSQL_RES *result); | | MYSQL_ROW STDCALL mysql_fetch_row(MYSQL_RES *result); | |
| unsigned long * STDCALL mysql_fetch_lengths(MYSQL_RES *result); | | unsigned long * STDCALL mysql_fetch_lengths(MYSQL_RES *result); | |
| MYSQL_FIELD * STDCALL mysql_fetch_field(MYSQL_RES *result); | | MYSQL_FIELD * STDCALL mysql_fetch_field(MYSQL_RES *result); | |
| | | | |
| skipping to change at line 659 | | skipping to change at line 665 | |
| Please note that MYSQL_BIND also has internals members. | | Please note that MYSQL_BIND also has internals members. | |
| */ | | */ | |
| | | | |
| typedef struct st_mysql_bind | | typedef struct st_mysql_bind | |
| { | | { | |
| unsigned long *length; /* output length pointer */ | | unsigned long *length; /* output length pointer */ | |
| my_bool *is_null; /* Pointer to null indicator */ | | my_bool *is_null; /* Pointer to null indicator */ | |
| void *buffer; /* buffer to get/put data */ | | void *buffer; /* buffer to get/put data */ | |
| /* set this if you want to track data truncations happened during fetch *
/ | | /* set this if you want to track data truncations happened during fetch *
/ | |
| my_bool *error; | | my_bool *error; | |
|
| enum enum_field_types buffer_type; /* buffer type */ | | unsigned char *row_ptr; /* for the current data position */ | |
| | | void (*store_param_func)(NET *net, struct st_mysql_bind *param); | |
| | | void (*fetch_result)(struct st_mysql_bind *, MYSQL_FIELD *, | |
| | | unsigned char **row); | |
| | | void (*skip_result)(struct st_mysql_bind *, MYSQL_FIELD *, | |
| | | unsigned char **row); | |
| /* output buffer length, must be set when fetching str/binary */ | | /* output buffer length, must be set when fetching str/binary */ | |
| unsigned long buffer_length; | | unsigned long buffer_length; | |
|
| unsigned char *row_ptr; /* for the current data position */ | | | |
| unsigned long offset; /* offset position for char/binary fetch
*/ | | unsigned long offset; /* offset position for char/binary fetch
*/ | |
| unsigned long length_value; /* Used if length is 0 */ | | unsigned long length_value; /* Used if length is 0 */ | |
| unsigned int param_number; /* For null count and error messages */ | | unsigned int param_number; /* For null count and error messages */ | |
| unsigned int pack_length; /* Internal length for packed data */ | | unsigned int pack_length; /* Internal length for packed data */ | |
|
| | | enum enum_field_types buffer_type; /* buffer type */ | |
| my_bool error_value; /* used if error is 0 */ | | my_bool error_value; /* used if error is 0 */ | |
| my_bool is_unsigned; /* set if integer type is unsigned */ | | my_bool is_unsigned; /* set if integer type is unsigned */ | |
| my_bool long_data_used; /* If used with mysql_send_long_data */ | | my_bool long_data_used; /* If used with mysql_send_long_data */ | |
| my_bool is_null_value; /* Used if is_null is 0 */ | | my_bool is_null_value; /* Used if is_null is 0 */ | |
|
| void (*store_param_func)(NET *net, struct st_mysql_bind *param); | | void *extension; | |
| void (*fetch_result)(struct st_mysql_bind *, MYSQL_FIELD *, | | | |
| unsigned char **row); | | | |
| void (*skip_result)(struct st_mysql_bind *, MYSQL_FIELD *, | | | |
| unsigned char **row); | | | |
| } MYSQL_BIND; | | } MYSQL_BIND; | |
| | | | |
| /* statement handler */ | | /* statement handler */ | |
| typedef struct st_mysql_stmt | | typedef struct st_mysql_stmt | |
| { | | { | |
| MEM_ROOT mem_root; /* root allocations */ | | MEM_ROOT mem_root; /* root allocations */ | |
| LIST list; /* list to keep track of all stmts *
/ | | LIST list; /* list to keep track of all stmts *
/ | |
| MYSQL *mysql; /* connection handle */ | | MYSQL *mysql; /* connection handle */ | |
| MYSQL_BIND *params; /* input parameters */ | | MYSQL_BIND *params; /* input parameters */ | |
| MYSQL_BIND *bind; /* output parameters */ | | MYSQL_BIND *bind; /* output parameters */ | |
| MYSQL_FIELD *fields; /* result set metadata */ | | MYSQL_FIELD *fields; /* result set metadata */ | |
| MYSQL_DATA result; /* cached result set */ | | MYSQL_DATA result; /* cached result set */ | |
| MYSQL_ROWS *data_cursor; /* current row in cached result */ | | MYSQL_ROWS *data_cursor; /* current row in cached result */ | |
|
| /* copy of mysql->affected_rows after statement execution */ | | | |
| my_ulonglong affected_rows; | | | |
| my_ulonglong insert_id; /* copy of mysql->insert_id */ | | | |
| /* | | /* | |
| mysql_stmt_fetch() calls this function to fetch one row (it's different | | mysql_stmt_fetch() calls this function to fetch one row (it's different | |
| for buffered, unbuffered and cursor fetch). | | for buffered, unbuffered and cursor fetch). | |
| */ | | */ | |
| int (*read_row_func)(struct st_mysql_stmt *stmt, | | int (*read_row_func)(struct st_mysql_stmt *stmt, | |
| unsigned char **row); | | unsigned char **row); | |
|
| | | /* copy of mysql->affected_rows after statement execution */ | |
| | | my_ulonglong affected_rows; | |
| | | my_ulonglong insert_id; /* copy of mysql->insert_id */ | |
| unsigned long stmt_id; /* Id for prepared statement
*/ | | unsigned long stmt_id; /* Id for prepared statement
*/ | |
| unsigned long flags; /* i.e. type of cursor to open */ | | unsigned long flags; /* i.e. type of cursor to open */ | |
| unsigned long prefetch_rows; /* number of rows per one COM_FETCH
*/ | | unsigned long prefetch_rows; /* number of rows per one COM_FETCH
*/ | |
| /* | | /* | |
| Copied from mysql->server_status after execute/fetch to know | | Copied from mysql->server_status after execute/fetch to know | |
| server-side cursor status for this statement. | | server-side cursor status for this statement. | |
| */ | | */ | |
| unsigned int server_status; | | unsigned int server_status; | |
| unsigned int last_errno; /* error code */ | | unsigned int last_errno; /* error code */ | |
| unsigned int param_count; /* input parameter count */ | | unsigned int param_count; /* input parameter count */ | |
| | | | |
| skipping to change at line 723 | | skipping to change at line 730 | |
| my_bool send_types_to_server; | | my_bool send_types_to_server; | |
| my_bool bind_param_done; /* input buffers were supplied */ | | my_bool bind_param_done; /* input buffers were supplied */ | |
| unsigned char bind_result_done; /* output buffers were supplied */ | | unsigned char bind_result_done; /* output buffers were supplied */ | |
| /* mysql_stmt_close() had to cancel this result */ | | /* mysql_stmt_close() had to cancel this result */ | |
| my_bool unbuffered_fetch_cancelled; | | my_bool unbuffered_fetch_cancelled; | |
| /* | | /* | |
| Is set to true if we need to calculate field->max_length for | | Is set to true if we need to calculate field->max_length for | |
| metadata fields when doing mysql_stmt_store_result. | | metadata fields when doing mysql_stmt_store_result. | |
| */ | | */ | |
| my_bool update_max_length; | | my_bool update_max_length; | |
|
| | | void *extension; | |
| } MYSQL_STMT; | | } MYSQL_STMT; | |
| | | | |
| enum enum_stmt_attr_type | | enum enum_stmt_attr_type | |
| { | | { | |
| /* | | /* | |
| When doing mysql_stmt_store_result calculate max_length attribute | | When doing mysql_stmt_store_result calculate max_length attribute | |
| of statement metadata. This is to be consistent with the old API, | | of statement metadata. This is to be consistent with the old API, | |
| where this was done automatically. | | where this was done automatically. | |
| In the new API we do that only by request because it slows down | | In the new API we do that only by request because it slows down | |
| mysql_stmt_store_result sufficiently. | | mysql_stmt_store_result sufficiently. | |
| | | | |
| skipping to change at line 752 | | skipping to change at line 760 | |
| Accepts unsigned long attribute in the range 1 - ulong_max | | Accepts unsigned long attribute in the range 1 - ulong_max | |
| */ | | */ | |
| STMT_ATTR_PREFETCH_ROWS | | STMT_ATTR_PREFETCH_ROWS | |
| }; | | }; | |
| | | | |
| typedef struct st_mysql_methods | | typedef struct st_mysql_methods | |
| { | | { | |
| my_bool (*read_query_result)(MYSQL *mysql); | | my_bool (*read_query_result)(MYSQL *mysql); | |
| my_bool (*advanced_command)(MYSQL *mysql, | | my_bool (*advanced_command)(MYSQL *mysql, | |
| enum enum_server_command command, | | enum enum_server_command command, | |
|
| const char *header, | | const unsigned char *header, | |
| unsigned long header_length, | | unsigned long header_length, | |
|
| const char *arg, | | const unsigned char *arg, | |
| unsigned long arg_length, | | unsigned long arg_length, | |
| my_bool skip_check, | | my_bool skip_check, | |
| MYSQL_STMT *stmt); | | MYSQL_STMT *stmt); | |
| MYSQL_DATA *(*read_rows)(MYSQL *mysql,MYSQL_FIELD *mysql_fields, | | MYSQL_DATA *(*read_rows)(MYSQL *mysql,MYSQL_FIELD *mysql_fields, | |
| unsigned int fields); | | unsigned int fields); | |
| MYSQL_RES * (*use_result)(MYSQL *mysql); | | MYSQL_RES * (*use_result)(MYSQL *mysql); | |
| void (*fetch_lengths)(unsigned long *to, | | void (*fetch_lengths)(unsigned long *to, | |
| MYSQL_ROW column, unsigned int field_count); | | MYSQL_ROW column, unsigned int field_count); | |
| void (*flush_use_result)(MYSQL *mysql); | | void (*flush_use_result)(MYSQL *mysql); | |
| #if !defined(MYSQL_SERVER) || defined(EMBEDDED_LIBRARY) | | #if !defined(MYSQL_SERVER) || defined(EMBEDDED_LIBRARY) | |
| | | | |
| skipping to change at line 845 | | skipping to change at line 853 | |
| #define mysql_reload(mysql) mysql_refresh((mysql),REFRESH_GRANT) | | #define mysql_reload(mysql) mysql_refresh((mysql),REFRESH_GRANT) | |
| #endif | | #endif | |
| #define HAVE_MYSQL_REAL_CONNECT | | #define HAVE_MYSQL_REAL_CONNECT | |
| | | | |
| /* | | /* | |
| The following functions are mainly exported because of mysqlbinlog; | | The following functions are mainly exported because of mysqlbinlog; | |
| 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, NullS, \ | | (*(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, NullS, \ | | (*(mysql)->methods->advanced_command)(mysql, command, 0, \ | |
| 0, arg, length, 1, stmt) | | 0, arg, length, 1, stmt) | |
| | | | |
| #ifdef __NETWARE__ | | #ifdef __NETWARE__ | |
| #pragma pack(pop) /* restore alignment */ | | #pragma pack(pop) /* restore alignment */ | |
| #endif | | #endif | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| | | | |
End of changes. 38 change blocks. |
| 37 lines changed or deleted | | 44 lines changed or added | |
|
| mysql_com.h | | mysql_com.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 */ | |
| | | | |
| /* | | /* | |
| ** 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 NAME_LEN 64 /* Field/table name length */ | | | |
| #define HOSTNAME_LENGTH 60 | | #define HOSTNAME_LENGTH 60 | |
|
| #define USERNAME_LENGTH 16 | | #define SYSTEM_CHARSET_MBMAXLEN 3 | |
| | | #define NAME_CHAR_LEN 64 /* Field/table name length */ | |
| | | #define USERNAME_CHAR_LENGTH 16 | |
| | | #define NAME_LEN (NAME_CHAR_LEN*SYSTEM_CHARSET_MBMAXLEN) | |
| | | #define USERNAME_LENGTH (USERNAME_CHAR_LENGTH*SYSTEM_CHARSET_MBMAXL | |
| | | EN) | |
| | | | |
| #define SERVER_VERSION_LENGTH 60 | | #define SERVER_VERSION_LENGTH 60 | |
| #define SQLSTATE_LENGTH 5 | | #define SQLSTATE_LENGTH 5 | |
| | | | |
| /* | | /* | |
| 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 | |
| */ | | */ | |
| #define USER_HOST_BUFF_SIZE HOSTNAME_LENGTH + USERNAME_LENGTH + 2 | | #define USER_HOST_BUFF_SIZE HOSTNAME_LENGTH + USERNAME_LENGTH + 2 | |
| | | | |
| skipping to change at line 58 | | skipping to change at line 62 | |
| */ | | */ | |
| | | | |
| enum enum_server_command | | enum enum_server_command | |
| { | | { | |
| COM_SLEEP, COM_QUIT, COM_INIT_DB, COM_QUERY, COM_FIELD_LIST, | | COM_SLEEP, COM_QUIT, COM_INIT_DB, COM_QUERY, COM_FIELD_LIST, | |
| COM_CREATE_DB, COM_DROP_DB, COM_REFRESH, COM_SHUTDOWN, COM_STATISTICS, | | COM_CREATE_DB, COM_DROP_DB, COM_REFRESH, COM_SHUTDOWN, COM_STATISTICS, | |
| COM_PROCESS_INFO, COM_CONNECT, COM_PROCESS_KILL, COM_DEBUG, COM_PING, | | COM_PROCESS_INFO, COM_CONNECT, COM_PROCESS_KILL, COM_DEBUG, COM_PING, | |
| COM_TIME, COM_DELAYED_INSERT, COM_CHANGE_USER, COM_BINLOG_DUMP, | | COM_TIME, COM_DELAYED_INSERT, COM_CHANGE_USER, COM_BINLOG_DUMP, | |
| COM_TABLE_DUMP, COM_CONNECT_OUT, COM_REGISTER_SLAVE, | | COM_TABLE_DUMP, COM_CONNECT_OUT, COM_REGISTER_SLAVE, | |
| COM_STMT_PREPARE, COM_STMT_EXECUTE, COM_STMT_SEND_LONG_DATA, COM_STMT_CLO
SE, | | COM_STMT_PREPARE, COM_STMT_EXECUTE, COM_STMT_SEND_LONG_DATA, COM_STMT_CLO
SE, | |
|
| COM_STMT_RESET, COM_SET_OPTION, COM_STMT_FETCH, | | COM_STMT_RESET, COM_SET_OPTION, COM_STMT_FETCH, COM_DAEMON, | |
| /* don't forget to update const char *command_name[] in sql_parse.cc */ | | /* don't forget to update const char *command_name[] in sql_parse.cc */ | |
| | | | |
| /* Must be last */ | | /* Must be last */ | |
| COM_END | | COM_END | |
| }; | | }; | |
| | | | |
| /* | | /* | |
| Length of random string sent by server on handshake; this is also length
of | | Length of random string sent by server on handshake; this is also length
of | |
| obfuscated password, recieved from client | | obfuscated password, recieved from client | |
| */ | | */ | |
| | | | |
| skipping to change at line 90 | | skipping to change at line 94 | |
| #define UNSIGNED_FLAG 32 /* Field is unsigned */ | | #define UNSIGNED_FLAG 32 /* Field is unsigned */ | |
| #define ZEROFILL_FLAG 64 /* Field is zerofill */ | | #define ZEROFILL_FLAG 64 /* Field is zerofill */ | |
| #define BINARY_FLAG 128 /* Field is binary */ | | #define BINARY_FLAG 128 /* Field is binary */ | |
| | | | |
| /* The following are only sent to new clients */ | | /* The following are only sent to new clients */ | |
| #define ENUM_FLAG 256 /* field is an enum */ | | #define ENUM_FLAG 256 /* field is an enum */ | |
| #define AUTO_INCREMENT_FLAG 512 /* field is a autoincrement
field */ | | #define AUTO_INCREMENT_FLAG 512 /* field is a autoincrement
field */ | |
| #define TIMESTAMP_FLAG 1024 /* Field is a timestamp */ | | #define TIMESTAMP_FLAG 1024 /* Field is a timestamp */ | |
| #define SET_FLAG 2048 /* field is a set */ | | #define SET_FLAG 2048 /* field is a set */ | |
| #define NO_DEFAULT_VALUE_FLAG 4096 /* Field doesn't have default value
*/ | | #define NO_DEFAULT_VALUE_FLAG 4096 /* Field doesn't have default value
*/ | |
|
| | | #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 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_IS_RENAMED (1<< 21) /* Intern: Field is being renamed * | |
| | | / | |
| | | | |
| #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 | |
| | | | |
| skipping to change at line 139 | | skipping to change at line 148 | |
| #define CLIENT_IGNORE_SIGPIPE 4096 /* IGNORE sigpipes */ | | #define CLIENT_IGNORE_SIGPIPE 4096 /* IGNORE sigpipes */ | |
| #define CLIENT_TRANSACTIONS 8192 /* Client knows about transactions *
/ | | #define CLIENT_TRANSACTIONS 8192 /* Client knows about transactions *
/ | |
| #define CLIENT_RESERVED 16384 /* Old flag for 4.1 protocol */ | | #define CLIENT_RESERVED 16384 /* Old flag for 4.1 protocol */ | |
| #define CLIENT_SECURE_CONNECTION 32768 /* New 4.1 authentication */ | | #define CLIENT_SECURE_CONNECTION 32768 /* New 4.1 authentication */ | |
| #define CLIENT_MULTI_STATEMENTS (1UL << 16) /* Enable/disable multi-stmt su
pport */ | | #define CLIENT_MULTI_STATEMENTS (1UL << 16) /* Enable/disable multi-stmt su
pport */ | |
| #define CLIENT_MULTI_RESULTS (1UL << 17) /* Enable/disable multi-results
*/ | | #define CLIENT_MULTI_RESULTS (1UL << 17) /* Enable/disable multi-results
*/ | |
| | | | |
| #define CLIENT_SSL_VERIFY_SERVER_CERT (1UL << 30) | | #define CLIENT_SSL_VERIFY_SERVER_CERT (1UL << 30) | |
| #define CLIENT_REMEMBER_OPTIONS (1UL << 31) | | #define CLIENT_REMEMBER_OPTIONS (1UL << 31) | |
| | | | |
|
| | | /* Gather all possible capabilites (flags) supported by the server */ | |
| | | #define CLIENT_ALL_FLAGS (CLIENT_LONG_PASSWORD | \ | |
| | | CLIENT_FOUND_ROWS | \ | |
| | | CLIENT_LONG_FLAG | \ | |
| | | CLIENT_CONNECT_WITH_DB | \ | |
| | | CLIENT_NO_SCHEMA | \ | |
| | | CLIENT_COMPRESS | \ | |
| | | CLIENT_ODBC | \ | |
| | | CLIENT_LOCAL_FILES | \ | |
| | | CLIENT_IGNORE_SPACE | \ | |
| | | CLIENT_PROTOCOL_41 | \ | |
| | | CLIENT_INTERACTIVE | \ | |
| | | CLIENT_SSL | \ | |
| | | CLIENT_IGNORE_SIGPIPE | \ | |
| | | CLIENT_TRANSACTIONS | \ | |
| | | CLIENT_RESERVED | \ | |
| | | CLIENT_SECURE_CONNECTION | \ | |
| | | CLIENT_MULTI_STATEMENTS | \ | |
| | | CLIENT_MULTI_RESULTS | \ | |
| | | CLIENT_SSL_VERIFY_SERVER_CERT | \ | |
| | | CLIENT_REMEMBER_OPTIONS) | |
| | | | |
| | | /* | |
| | | 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 | |
| | | on before sending to the client during the connection handshake. | |
| | | */ | |
| | | #define CLIENT_BASIC_FLAGS (((CLIENT_ALL_FLAGS & ~CLIENT_SSL) \ | |
| | | & ~CLIENT_COMPRESS) \ | |
| | | & ~CLIENT_SSL_VERIFY_SERVER_ | |
| | | CERT) | |
| | | | |
| #define SERVER_STATUS_IN_TRANS 1 /* Transaction has started */ | | #define SERVER_STATUS_IN_TRANS 1 /* Transaction has started */ | |
| #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 | |
|
| /* | | /** | |
| This flag is sent when a read-only cursor is exhausted, in reply to | | This flag is sent when a read-only cursor is exhausted, in reply to | |
| COM_STMT_FETCH command. | | COM_STMT_FETCH command. | |
| */ | | */ | |
| #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 | |
| | | we discovered that the new statement returns a different | |
| | | number of result set columns. | |
| | | */ | |
| | | #define SERVER_STATUS_METADATA_CHANGED 1024 | |
| | | | |
| | | /** | |
| | | Server status flags that must be cleared when starting | |
| | | execution of a new SQL statement. | |
| | | Flags from this set are only added to the | |
| | | current server status by the execution engine, but | |
| | | never removed -- the execution engine expects them | |
| | | to disappear automagically by the next command. | |
| | | */ | |
| | | #define SERVER_STATUS_CLEAR_SET (SERVER_QUERY_NO_GOOD_INDEX_USED| \ | |
| | | SERVER_QUERY_NO_INDEX_USED|\ | |
| | | SERVER_MORE_RESULTS_EXISTS|\ | |
| | | SERVER_STATUS_METADATA_CHANGED) | |
| | | | |
| #define MYSQL_ERRMSG_SIZE 512 | | #define MYSQL_ERRMSG_SIZE 512 | |
| #define NET_READ_TIMEOUT 30 /* Timeout on read */ | | #define NET_READ_TIMEOUT 30 /* Timeout on read */ | |
| #define NET_WRITE_TIMEOUT 60 /* Timeout on write */ | | #define NET_WRITE_TIMEOUT 60 /* Timeout on write */ | |
| #define NET_WAIT_TIMEOUT 8*60*60 /* Wait for new query */ | | #define NET_WAIT_TIMEOUT 8*60*60 /* Wait for new query */ | |
| | | | |
| #define ONLY_KILL_QUERY 1 | | #define ONLY_KILL_QUERY 1 | |
| | | | |
| struct st_vio; /* Only C */ | | struct st_vio; /* Only C */ | |
| typedef struct st_vio Vio; | | typedef struct st_vio Vio; | |
| | | | |
| #define MAX_TINYINT_WIDTH 3 /* Max width for a TINY w.o. sign *
/ | | #define MAX_TINYINT_WIDTH 3 /* Max width for a TINY w.o. sign *
/ | |
| #define MAX_SMALLINT_WIDTH 5 /* Max width for a SHORT w.o. sign
*/ | | #define MAX_SMALLINT_WIDTH 5 /* Max width for a SHORT w.o. sign
*/ | |
| #define MAX_MEDIUMINT_WIDTH 8 /* Max width for a INT24 w.o. sign
*/ | | #define MAX_MEDIUMINT_WIDTH 8 /* Max width for a INT24 w.o. sign
*/ | |
| #define MAX_INT_WIDTH 10 /* Max width for a LONG w.o. sign *
/ | | #define MAX_INT_WIDTH 10 /* Max width for a LONG w.o. sign *
/ | |
| #define MAX_BIGINT_WIDTH 20 /* Max width for a LONGLONG */ | | #define MAX_BIGINT_WIDTH 20 /* Max width for a LONGLONG */ | |
| #define MAX_CHAR_WIDTH 255 /* Max length for a CHAR colum */ | | #define MAX_CHAR_WIDTH 255 /* Max length for a CHAR colum */ | |
|
| #define MAX_BLOB_WIDTH 8192 /* Default width for blob */ | | #define MAX_BLOB_WIDTH 16777216 /* Default width for blob */ | |
| | | | |
| typedef struct st_net { | | typedef struct st_net { | |
| #if !defined(CHECK_EMBEDDED_DIFFERENCES) || !defined(EMBEDDED_LIBRARY) | | #if !defined(CHECK_EMBEDDED_DIFFERENCES) || !defined(EMBEDDED_LIBRARY) | |
|
| Vio* vio; | | Vio *vio; | |
| unsigned char *buff,*buff_end,*write_pos,*read_pos; | | unsigned char *buff,*buff_end,*write_pos,*read_pos; | |
| my_socket fd; /* For Perl DBI/dbd
*/ | | my_socket fd; /* For Perl DBI/dbd
*/ | |
|
| unsigned long max_packet,max_packet_size; | | | |
| unsigned int pkt_nr,compress_pkt_nr; | | | |
| unsigned int write_timeout, read_timeout, retry_count; | | | |
| int fcntl; | | | |
| my_bool compress; | | | |
| /* | | /* | |
| The following variable is set if we are doing several queries in one | | The following variable is set if we are doing several queries in one | |
| command ( as in LOAD TABLE ... FROM MASTER ), | | command ( as in LOAD TABLE ... FROM MASTER ), | |
| and do not want to confuse the client with OK at the wrong time | | and do not want to confuse the client with OK at the wrong time | |
| */ | | */ | |
| unsigned long remain_in_buf,length, buf_length, where_b; | | unsigned long remain_in_buf,length, buf_length, where_b; | |
|
| | | unsigned long max_packet,max_packet_size; | |
| | | unsigned int pkt_nr,compress_pkt_nr; | |
| | | unsigned int write_timeout, read_timeout, retry_count; | |
| | | int fcntl; | |
| unsigned int *return_status; | | unsigned int *return_status; | |
| unsigned char reading_or_writing; | | unsigned char reading_or_writing; | |
| char save_char; | | char save_char; | |
|
| my_bool no_send_ok; /* For SPs and other things that do multiple stmts * | | my_bool unused0; /* Please remove with the next incompatible ABI change. | |
| / | | */ | |
| my_bool no_send_eof; /* For SPs' first version read-only cursors */ | | my_bool unused; /* Please remove with the next incompatible ABI change */ | |
| /* | | my_bool compress; | |
| Set if OK packet is already sent, and we do not need to send error | | my_bool unused1; /* Please remove with the next incompatible ABI change. | |
| messages | | */ | |
| */ | | | |
| my_bool no_send_error; | | | |
| /* | | /* | |
| Pointer to query object in query cache, do not equal NULL (0) for | | Pointer to query object in query cache, do not equal NULL (0) for | |
| queries in cache that have not stored its results yet | | queries in cache that have not stored its results yet | |
| */ | | */ | |
| #endif | | #endif | |
|
| char last_error[MYSQL_ERRMSG_SIZE], sqlstate[SQLSTATE_LENGTH+1]; | | | |
| unsigned int last_errno; | | | |
| unsigned char error; | | | |
| | | | |
| /* | | /* | |
| 'query_cache_query' should be accessed only via query cache | | 'query_cache_query' should be accessed only via query cache | |
| functions and methods to maintain proper locking. | | functions and methods to maintain proper locking. | |
| */ | | */ | |
|
| gptr query_cache_query; | | unsigned char *query_cache_query; | |
| | | unsigned int last_errno; | |
| my_bool report_error; /* We should report error (we have unreported error | | unsigned char error; | |
| ) */ | | my_bool unused2; /* Please remove with the next incompatible ABI change. | |
| | | */ | |
| my_bool return_errno; | | my_bool return_errno; | |
|
| | | /** Client library error message buffer. Actually belongs to struct MYSQL | |
| | | . */ | |
| | | char last_error[MYSQL_ERRMSG_SIZE]; | |
| | | /** Client library sqlstate buffer. Set along with the error message. */ | |
| | | char sqlstate[SQLSTATE_LENGTH+1]; | |
| | | void *extension; | |
| } 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, | |
| | | | |
| skipping to change at line 332 | | skipping to change at line 389 | |
| | | | |
| #define net_new_transaction(net) ((net)->pkt_nr=0) | | #define net_new_transaction(net) ((net)->pkt_nr=0) | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
| my_bool my_net_init(NET *net, Vio* vio); | | my_bool my_net_init(NET *net, Vio* vio); | |
| void my_net_local_init(NET *net); | | void my_net_local_init(NET *net); | |
| void net_end(NET *net); | | void net_end(NET *net); | |
|
| void net_clear(NET *net); | | void net_clear(NET *net, my_bool clear_buffer); | |
| my_bool net_realloc(NET *net, unsigned long length); | | my_bool net_realloc(NET *net, size_t length); | |
| my_bool net_flush(NET *net); | | my_bool net_flush(NET *net); | |
|
| my_bool my_net_write(NET *net,const char *packet,unsigned long len); | | my_bool my_net_write(NET *net,const unsigned char *packet, size_t le
n); | |
| my_bool net_write_command(NET *net,unsigned char command, | | my_bool net_write_command(NET *net,unsigned char command, | |
|
| const char *header, unsigned long head_len, | | const unsigned char *header, size_t head_len, | |
| const char *packet, unsigned long len); | | const unsigned char *packet, size_t len); | |
| int net_real_write(NET *net,const char *packet,unsigned long len); | | int net_real_write(NET *net,const unsigned char *packet, size_t len); | |
| 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 | |
| | | | |
| /* | | /* | |
| The following function is not meant for normal usage | | The following function is not meant for normal usage | |
| Currently it's used internally by manager.c | | Currently it's used internally by manager.c | |
| | | | |
| skipping to change at line 378 | | skipping to change at line 435 | |
| | | | |
| 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 */ | |
|
| | | void *extension; | |
| } UDF_ARGS; | | } UDF_ARGS; | |
| | | | |
| /* This holds information about the result */ | | /* This holds information about the result */ | |
| | | | |
| typedef struct st_udf_init | | typedef struct st_udf_init | |
| { | | { | |
| my_bool maybe_null; /* 1 if function can return NULL */ | | my_bool maybe_null; /* 1 if function can return NULL */ | |
| unsigned int decimals; /* for real functions */ | | unsigned int decimals; /* for real functions */ | |
| unsigned long max_length; /* For string functions */ | | unsigned long max_length; /* For string functions */ | |
| char *ptr; /* free pointer for function data */ | | char *ptr; /* free pointer for function data */ | |
| my_bool const_item; /* 1 if function always returns the same val
ue */ | | my_bool const_item; /* 1 if function always returns the same val
ue */ | |
|
| | | void *extension; | |
| } UDF_INIT; | | } UDF_INIT; | |
| /* | | /* | |
| TODO: add a notion for determinism of the UDF. | | TODO: add a notion for determinism of the UDF. | |
| See Item_udf_func::update_used_tables () | | See Item_udf_func::update_used_tables () | |
| */ | | */ | |
| | | | |
| /* Constants when using compression */ | | /* Constants when using compression */ | |
| #define NET_HEADER_SIZE 4 /* standard header size */ | | #define NET_HEADER_SIZE 4 /* standard header size */ | |
| #define COMP_HEADER_SIZE 3 /* compression header extra size */ | | #define COMP_HEADER_SIZE 3 /* compression header extra size */ | |
| | | | |
| | | | |
| skipping to change at line 433 | | skipping to change at line 492 | |
| void make_scrambled_password(char *to, const char *password); | | void make_scrambled_password(char *to, const char *password); | |
| void scramble(char *to, const char *message, const char *password); | | void scramble(char *to, const char *message, const char *password); | |
| my_bool check_scramble(const char *reply, const char *message, | | my_bool check_scramble(const char *reply, const char *message, | |
| const unsigned char *hash_stage2); | | const unsigned char *hash_stage2); | |
| void get_salt_from_password(unsigned char *res, const char *password); | | void get_salt_from_password(unsigned char *res, const char *password); | |
| void make_password_from_salt(char *to, const unsigned char *hash_stage2); | | void make_password_from_salt(char *to, const unsigned char *hash_stage2); | |
| char *octet2hex(char *to, const char *str, unsigned int len); | | char *octet2hex(char *to, const char *str, unsigned int len); | |
| | | | |
| /* end of password.c */ | | /* end of password.c */ | |
| | | | |
|
| char *get_tty_password(char *opt_message); | | char *get_tty_password(const char *opt_message); | |
| const char *mysql_errno_to_sqlstate(unsigned int mysql_errno); | | const char *mysql_errno_to_sqlstate(unsigned int mysql_errno); | |
| | | | |
| /* Some other useful functions */ | | /* Some other useful functions */ | |
| | | | |
|
| my_bool my_init(void); | | | |
| extern int modify_defaults_file(const char *file_location, const char *opti | | | |
| on, | | | |
| const char *option_value, | | | |
| const char *section_name, int remove_option | | | |
| ); | | | |
| int load_defaults(const char *conf_file, const char **groups, | | | |
| int *argc, char ***argv); | | | |
| my_bool my_thread_init(void); | | my_bool my_thread_init(void); | |
| void my_thread_end(void); | | void my_thread_end(void); | |
| | | | |
| #ifdef _global_h | | #ifdef _global_h | |
| ulong STDCALL net_field_length(uchar **packet); | | ulong STDCALL net_field_length(uchar **packet); | |
| my_ulonglong net_field_length_ll(uchar **packet); | | my_ulonglong net_field_length_ll(uchar **packet); | |
|
| char *net_store_length(char *pkg, ulonglong length); | | uchar *net_store_length(uchar *pkg, ulonglong length); | |
| #endif | | #endif | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #define NULL_LENGTH ((unsigned long) ~0) /* For net_store_length */ | | #define NULL_LENGTH ((unsigned long) ~0) /* For net_store_length */ | |
| #define MYSQL_STMT_HEADER 4 | | #define MYSQL_STMT_HEADER 4 | |
| #define MYSQL_LONG_DATA_HEADER 6 | | #define MYSQL_LONG_DATA_HEADER 6 | |
| | | | |
| | | | |
End of changes. 25 change blocks. |
| 44 lines changed or deleted | | 103 lines changed or added | |
|
| mysqld_ername.h | | mysqld_ername.h | |
| | | | |
| skipping to change at line 479 | | skipping to change at line 479 | |
| { "ER_REMOVED_SPACES", 1466 }, | | { "ER_REMOVED_SPACES", 1466 }, | |
| { "ER_AUTOINC_READ_FAILED", 1467 }, | | { "ER_AUTOINC_READ_FAILED", 1467 }, | |
| { "ER_USERNAME", 1468 }, | | { "ER_USERNAME", 1468 }, | |
| { "ER_HOSTNAME", 1469 }, | | { "ER_HOSTNAME", 1469 }, | |
| { "ER_WRONG_STRING_LENGTH", 1470 }, | | { "ER_WRONG_STRING_LENGTH", 1470 }, | |
| { "ER_NON_INSERTABLE_TABLE", 1471 }, | | { "ER_NON_INSERTABLE_TABLE", 1471 }, | |
| { "ER_ADMIN_WRONG_MRG_TABLE", 1472 }, | | { "ER_ADMIN_WRONG_MRG_TABLE", 1472 }, | |
| { "ER_TOO_HIGH_LEVEL_OF_NESTING_FOR_SELECT", 1473 }, | | { "ER_TOO_HIGH_LEVEL_OF_NESTING_FOR_SELECT", 1473 }, | |
| { "ER_NAME_BECOMES_EMPTY", 1474 }, | | { "ER_NAME_BECOMES_EMPTY", 1474 }, | |
| { "ER_AMBIGUOUS_FIELD_TERM", 1475 }, | | { "ER_AMBIGUOUS_FIELD_TERM", 1475 }, | |
|
| { "ER_LOAD_DATA_INVALID_COLUMN", 1476 }, | | { "ER_FOREIGN_SERVER_EXISTS", 1476 }, | |
| { "ER_LOG_PURGE_NO_FILE", 1477 }, | | { "ER_FOREIGN_SERVER_DOESNT_EXIST", 1477 }, | |
| { "ER_XA_RBTIMEOUT", 1478 }, | | { "ER_ILLEGAL_HA_CREATE_OPTION", 1478 }, | |
| { "ER_XA_RBDEADLOCK", 1479 }, | | { "ER_PARTITION_REQUIRES_VALUES_ERROR", 1479 }, | |
| { "ER_TOO_MANY_CONCURRENT_TRXS", 1480 }, | | { "ER_PARTITION_WRONG_VALUES_ERROR", 1480 }, | |
| | | { "ER_PARTITION_MAXVALUE_ERROR", 1481 }, | |
| | | { "ER_PARTITION_SUBPARTITION_ERROR", 1482 }, | |
| | | { "ER_PARTITION_SUBPART_MIX_ERROR", 1483 }, | |
| | | { "ER_PARTITION_WRONG_NO_PART_ERROR", 1484 }, | |
| | | { "ER_PARTITION_WRONG_NO_SUBPART_ERROR", 1485 }, | |
| | | { "ER_CONST_EXPR_IN_PARTITION_FUNC_ERROR", 1486 }, | |
| | | { "ER_NO_CONST_EXPR_IN_RANGE_OR_LIST_ERROR", 1487 }, | |
| | | { "ER_FIELD_NOT_FOUND_PART_ERROR", 1488 }, | |
| | | { "ER_LIST_OF_FIELDS_ONLY_IN_HASH_ERROR", 1489 }, | |
| | | { "ER_INCONSISTENT_PARTITION_INFO_ERROR", 1490 }, | |
| | | { "ER_PARTITION_FUNC_NOT_ALLOWED_ERROR", 1491 }, | |
| | | { "ER_PARTITIONS_MUST_BE_DEFINED_ERROR", 1492 }, | |
| | | { "ER_RANGE_NOT_INCREASING_ERROR", 1493 }, | |
| | | { "ER_INCONSISTENT_TYPE_OF_FUNCTIONS_ERROR", 1494 }, | |
| | | { "ER_MULTIPLE_DEF_CONST_IN_LIST_PART_ERROR", 1495 }, | |
| | | { "ER_PARTITION_ENTRY_ERROR", 1496 }, | |
| | | { "ER_MIX_HANDLER_ERROR", 1497 }, | |
| | | { "ER_PARTITION_NOT_DEFINED_ERROR", 1498 }, | |
| | | { "ER_TOO_MANY_PARTITIONS_ERROR", 1499 }, | |
| | | { "ER_SUBPARTITION_ERROR", 1500 }, | |
| | | { "ER_CANT_CREATE_HANDLER_FILE", 1501 }, | |
| | | { "ER_BLOB_FIELD_IN_PART_FUNC_ERROR", 1502 }, | |
| | | { "ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF", 1503 }, | |
| | | { "ER_NO_PARTS_ERROR", 1504 }, | |
| | | { "ER_PARTITION_MGMT_ON_NONPARTITIONED", 1505 }, | |
| | | { "ER_FOREIGN_KEY_ON_PARTITIONED", 1506 }, | |
| | | { "ER_DROP_PARTITION_NON_EXISTENT", 1507 }, | |
| | | { "ER_DROP_LAST_PARTITION", 1508 }, | |
| | | { "ER_COALESCE_ONLY_ON_HASH_PARTITION", 1509 }, | |
| | | { "ER_REORG_HASH_ONLY_ON_SAME_NO", 1510 }, | |
| | | { "ER_REORG_NO_PARAM_ERROR", 1511 }, | |
| | | { "ER_ONLY_ON_RANGE_LIST_PARTITION", 1512 }, | |
| | | { "ER_ADD_PARTITION_SUBPART_ERROR", 1513 }, | |
| | | { "ER_ADD_PARTITION_NO_NEW_PARTITION", 1514 }, | |
| | | { "ER_COALESCE_PARTITION_NO_PARTITION", 1515 }, | |
| | | { "ER_REORG_PARTITION_NOT_EXIST", 1516 }, | |
| | | { "ER_SAME_NAME_PARTITION", 1517 }, | |
| | | { "ER_NO_BINLOG_ERROR", 1518 }, | |
| | | { "ER_CONSECUTIVE_REORG_PARTITIONS", 1519 }, | |
| | | { "ER_REORG_OUTSIDE_RANGE", 1520 }, | |
| | | { "ER_PARTITION_FUNCTION_FAILURE", 1521 }, | |
| | | { "ER_PART_STATE_ERROR", 1522 }, | |
| | | { "ER_LIMITED_PART_RANGE", 1523 }, | |
| | | { "ER_PLUGIN_IS_NOT_LOADED", 1524 }, | |
| | | { "ER_WRONG_VALUE", 1525 }, | |
| | | { "ER_NO_PARTITION_FOR_GIVEN_VALUE", 1526 }, | |
| | | { "ER_FILEGROUP_OPTION_ONLY_ONCE", 1527 }, | |
| | | { "ER_CREATE_FILEGROUP_FAILED", 1528 }, | |
| | | { "ER_DROP_FILEGROUP_FAILED", 1529 }, | |
| | | { "ER_TABLESPACE_AUTO_EXTEND_ERROR", 1530 }, | |
| | | { "ER_WRONG_SIZE_NUMBER", 1531 }, | |
| | | { "ER_SIZE_OVERFLOW_ERROR", 1532 }, | |
| | | { "ER_ALTER_FILEGROUP_FAILED", 1533 }, | |
| | | { "ER_BINLOG_ROW_LOGGING_FAILED", 1534 }, | |
| | | { "ER_BINLOG_ROW_WRONG_TABLE_DEF", 1535 }, | |
| | | { "ER_BINLOG_ROW_RBR_TO_SBR", 1536 }, | |
| | | { "ER_EVENT_ALREADY_EXISTS", 1537 }, | |
| | | { "ER_EVENT_STORE_FAILED", 1538 }, | |
| | | { "ER_EVENT_DOES_NOT_EXIST", 1539 }, | |
| | | { "ER_EVENT_CANT_ALTER", 1540 }, | |
| | | { "ER_EVENT_DROP_FAILED", 1541 }, | |
| | | { "ER_EVENT_INTERVAL_NOT_POSITIVE_OR_TOO_BIG", 1542 }, | |
| | | { "ER_EVENT_ENDS_BEFORE_STARTS", 1543 }, | |
| | | { "ER_EVENT_EXEC_TIME_IN_THE_PAST", 1544 }, | |
| | | { "ER_EVENT_OPEN_TABLE_FAILED", 1545 }, | |
| | | { "ER_EVENT_NEITHER_M_EXPR_NOR_M_AT", 1546 }, | |
| | | { "ER_COL_COUNT_DOESNT_MATCH_CORRUPTED", 1547 }, | |
| | | { "ER_CANNOT_LOAD_FROM_TABLE", 1548 }, | |
| | | { "ER_EVENT_CANNOT_DELETE", 1549 }, | |
| | | { "ER_EVENT_COMPILE_ERROR", 1550 }, | |
| | | { "ER_EVENT_SAME_NAME", 1551 }, | |
| | | { "ER_EVENT_DATA_TOO_LONG", 1552 }, | |
| | | { "ER_DROP_INDEX_FK", 1553 }, | |
| | | { "ER_WARN_DEPRECATED_SYNTAX_WITH_VER", 1554 }, | |
| | | { "ER_CANT_WRITE_LOCK_LOG_TABLE", 1555 }, | |
| | | { "ER_CANT_LOCK_LOG_TABLE", 1556 }, | |
| | | { "ER_FOREIGN_DUPLICATE_KEY", 1557 }, | |
| | | { "ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE", 1558 }, | |
| | | { "ER_TEMP_TABLE_PREVENTS_SWITCH_OUT_OF_RBR", 1559 }, | |
| | | { "ER_STORED_FUNCTION_PREVENTS_SWITCH_BINLOG_FORMAT", 1560 }, | |
| | | { "ER_NDB_CANT_SWITCH_BINLOG_FORMAT", 1561 }, | |
| | | { "ER_PARTITION_NO_TEMPORARY", 1562 }, | |
| | | { "ER_PARTITION_CONST_DOMAIN_ERROR", 1563 }, | |
| | | { "ER_PARTITION_FUNCTION_IS_NOT_ALLOWED", 1564 }, | |
| | | { "ER_DDL_LOG_ERROR", 1565 }, | |
| | | { "ER_NULL_IN_VALUES_LESS_THAN", 1566 }, | |
| | | { "ER_WRONG_PARTITION_NAME", 1567 }, | |
| | | { "ER_CANT_CHANGE_TX_ISOLATION", 1568 }, | |
| | | { "ER_DUP_ENTRY_AUTOINCREMENT_CASE", 1569 }, | |
| | | { "ER_EVENT_MODIFY_QUEUE_ERROR", 1570 }, | |
| | | { "ER_EVENT_SET_VAR_ERROR", 1571 }, | |
| | | { "ER_PARTITION_MERGE_ERROR", 1572 }, | |
| | | { "ER_CANT_ACTIVATE_LOG", 1573 }, | |
| | | { "ER_RBR_NOT_AVAILABLE", 1574 }, | |
| | | { "ER_BASE64_DECODE_ERROR", 1575 }, | |
| | | { "ER_EVENT_RECURSION_FORBIDDEN", 1576 }, | |
| | | { "ER_EVENTS_DB_ERROR", 1577 }, | |
| | | { "ER_ONLY_INTEGERS_ALLOWED", 1578 }, | |
| | | { "ER_UNSUPORTED_LOG_ENGINE", 1579 }, | |
| | | { "ER_BAD_LOG_STATEMENT", 1580 }, | |
| | | { "ER_CANT_RENAME_LOG_TABLE", 1581 }, | |
| | | { "ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT", 1582 }, | |
| | | { "ER_WRONG_PARAMETERS_TO_NATIVE_FCT", 1583 }, | |
| | | { "ER_WRONG_PARAMETERS_TO_STORED_FCT", 1584 }, | |
| | | { "ER_NATIVE_FCT_NAME_COLLISION", 1585 }, | |
| | | { "ER_DUP_ENTRY_WITH_KEY_NAME", 1586 }, | |
| | | { "ER_BINLOG_PURGE_EMFILE", 1587 }, | |
| | | { "ER_EVENT_CANNOT_CREATE_IN_THE_PAST", 1588 }, | |
| | | { "ER_EVENT_CANNOT_ALTER_IN_THE_PAST", 1589 }, | |
| | | { "ER_SLAVE_INCIDENT", 1590 }, | |
| | | { "ER_NO_PARTITION_FOR_GIVEN_VALUE_SILENT", 1591 }, | |
| | | { "ER_BINLOG_UNSAFE_STATEMENT", 1592 }, | |
| | | { "ER_SLAVE_FATAL_ERROR", 1593 }, | |
| | | { "ER_SLAVE_RELAY_LOG_READ_FAILURE", 1594 }, | |
| | | { "ER_SLAVE_RELAY_LOG_WRITE_FAILURE", 1595 }, | |
| | | { "ER_SLAVE_CREATE_EVENT_FAILURE", 1596 }, | |
| | | { "ER_SLAVE_MASTER_COM_FAILURE", 1597 }, | |
| | | { "ER_BINLOG_LOGGING_IMPOSSIBLE", 1598 }, | |
| | | { "ER_VIEW_NO_CREATION_CTX", 1599 }, | |
| | | { "ER_VIEW_INVALID_CREATION_CTX", 1600 }, | |
| | | { "ER_SR_INVALID_CREATION_CTX", 1601 }, | |
| | | { "ER_TRG_CORRUPTED_FILE", 1602 }, | |
| | | { "ER_TRG_NO_CREATION_CTX", 1603 }, | |
| | | { "ER_TRG_INVALID_CREATION_CTX", 1604 }, | |
| | | { "ER_EVENT_INVALID_CREATION_CTX", 1605 }, | |
| | | { "ER_TRG_CANT_OPEN_TABLE", 1606 }, | |
| | | { "ER_CANT_CREATE_SROUTINE", 1607 }, | |
| | | { "ER_SLAVE_AMBIGOUS_EXEC_MODE", 1608 }, | |
| | | { "ER_NO_FORMAT_DESCRIPTION_EVENT_BEFORE_BINLOG_STATEMENT", 1609 }, | |
| | | { "ER_SLAVE_CORRUPT_EVENT", 1610 }, | |
| | | { "ER_LOAD_DATA_INVALID_COLUMN", 1611 }, | |
| | | { "ER_LOG_PURGE_NO_FILE", 1612 }, | |
| | | { "ER_XA_RBTIMEOUT", 1613 }, | |
| | | { "ER_XA_RBDEADLOCK", 1614 }, | |
| | | { "ER_NEED_REPREPARE", 1615 }, | |
| | | { "ER_DELAYED_NOT_SUPPORTED", 1616 }, | |
| | | { "WARN_NO_MASTER_INFO", 1617 }, | |
| | | { "WARN_OPTION_IGNORED", 1618 }, | |
| | | { "WARN_PLUGIN_DELETE_BUILTIN", 1619 }, | |
| | | { "WARN_PLUGIN_BUSY", 1620 }, | |
| | | { "ER_VARIABLE_IS_READONLY", 1621 }, | |
| | | { "ER_WARN_ENGINE_TRANSACTION_ROLLBACK", 1622 }, | |
| | | { "ER_SLAVE_HEARTBEAT_FAILURE", 1623 }, | |
| | | { "ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE", 1624 }, | |
| | | { "ER_NDB_REPLICATION_SCHEMA_ERROR", 1625 }, | |
| | | { "ER_CONFLICT_FN_PARSE_ERROR", 1626 }, | |
| | | { "ER_EXCEPTIONS_WRITE_ERROR", 1627 }, | |
| | | { "ER_TOO_LONG_TABLE_COMMENT", 1628 }, | |
| | | { "ER_TOO_LONG_FIELD_COMMENT", 1629 }, | |
| | | { "ER_FUNC_INEXISTENT_NAME_COLLISION", 1630 }, | |
| | | { "ER_DATABASE_NAME", 1631 }, | |
| | | { "ER_TABLE_NAME", 1632 }, | |
| | | { "ER_PARTITION_NAME", 1633 }, | |
| | | { "ER_SUBPARTITION_NAME", 1634 }, | |
| | | { "ER_TEMPORARY_NAME", 1635 }, | |
| | | { "ER_RENAMED_NAME", 1636 }, | |
| | | { "ER_TOO_MANY_CONCURRENT_TRXS", 1637 }, | |
| | | { "WARN_NON_ASCII_SEPARATOR_NOT_IMPLEMENTED", 1638 }, | |
| | | { "ER_DEBUG_SYNC_TIMEOUT", 1639 }, | |
| | | { "ER_DEBUG_SYNC_HIT_LIMIT", 1640 }, | |
| | | | |
End of changes. 1 change blocks. |
| 0 lines changed or deleted | | 0 lines changed or added | |
|
| sql_state.h | | sql_state.h | |
| /* Autogenerated file, please don't edit */ | | /* Autogenerated file, please don't edit */ | |
| | | | |
|
| ER_DUP_KEY ,"23000", "", | | { ER_DUP_KEY ,"23000", "" }, | |
| ER_OUTOFMEMORY ,"HY001", "S1001", | | { ER_OUTOFMEMORY ,"HY001", "S1001" }, | |
| ER_OUT_OF_SORTMEMORY ,"HY001", "S1001", | | { ER_OUT_OF_SORTMEMORY ,"HY001", "S1001" }, | |
| ER_CON_COUNT_ERROR ,"08004", "", | | { ER_CON_COUNT_ERROR ,"08004", "" }, | |
| ER_BAD_HOST_ERROR ,"08S01", "", | | { ER_BAD_HOST_ERROR ,"08S01", "" }, | |
| ER_HANDSHAKE_ERROR ,"08S01", "", | | { ER_HANDSHAKE_ERROR ,"08S01", "" }, | |
| ER_DBACCESS_DENIED_ERROR ,"42000", "", | | { ER_DBACCESS_DENIED_ERROR ,"42000", "" }, | |
| ER_ACCESS_DENIED_ERROR ,"28000", "", | | { ER_ACCESS_DENIED_ERROR ,"28000", "" }, | |
| ER_NO_DB_ERROR ,"3D000", "", | | { ER_NO_DB_ERROR ,"3D000", "" }, | |
| ER_UNKNOWN_COM_ERROR ,"08S01", "", | | { ER_UNKNOWN_COM_ERROR ,"08S01", "" }, | |
| ER_BAD_NULL_ERROR ,"23000", "", | | { ER_BAD_NULL_ERROR ,"23000", "" }, | |
| ER_BAD_DB_ERROR ,"42000", "", | | { ER_BAD_DB_ERROR ,"42000", "" }, | |
| ER_TABLE_EXISTS_ERROR ,"42S01", "", | | { ER_TABLE_EXISTS_ERROR ,"42S01", "" }, | |
| ER_BAD_TABLE_ERROR ,"42S02", "", | | { ER_BAD_TABLE_ERROR ,"42S02", "" }, | |
| ER_NON_UNIQ_ERROR ,"23000", "", | | { ER_NON_UNIQ_ERROR ,"23000", "" }, | |
| ER_SERVER_SHUTDOWN ,"08S01", "", | | { ER_SERVER_SHUTDOWN ,"08S01", "" }, | |
| ER_BAD_FIELD_ERROR ,"42S22", "S0022", | | { ER_BAD_FIELD_ERROR ,"42S22", "S0022" }, | |
| ER_WRONG_FIELD_WITH_GROUP ,"42000", "S1009", | | { ER_WRONG_FIELD_WITH_GROUP ,"42000", "S1009" }, | |
| ER_WRONG_GROUP_FIELD ,"42000", "S1009", | | { ER_WRONG_GROUP_FIELD ,"42000", "S1009" }, | |
| ER_WRONG_SUM_SELECT ,"42000", "S1009", | | { ER_WRONG_SUM_SELECT ,"42000", "S1009" }, | |
| ER_WRONG_VALUE_COUNT ,"21S01", "", | | { ER_WRONG_VALUE_COUNT ,"21S01", "" }, | |
| ER_TOO_LONG_IDENT ,"42000", "S1009", | | { ER_TOO_LONG_IDENT ,"42000", "S1009" }, | |
| ER_DUP_FIELDNAME ,"42S21", "S1009", | | { ER_DUP_FIELDNAME ,"42S21", "S1009" }, | |
| ER_DUP_KEYNAME ,"42000", "S1009", | | { ER_DUP_KEYNAME ,"42000", "S1009" }, | |
| ER_DUP_ENTRY ,"23000", "S1009", | | { ER_DUP_ENTRY ,"23000", "S1009" }, | |
| ER_WRONG_FIELD_SPEC ,"42000", "S1009", | | { ER_WRONG_FIELD_SPEC ,"42000", "S1009" }, | |
| ER_PARSE_ERROR ,"42000", "", | | { ER_PARSE_ERROR ,"42000", "s1009" }, | |
| ER_EMPTY_QUERY ,"42000", "", | | { ER_EMPTY_QUERY ,"42000", "" }, | |
| ER_NONUNIQ_TABLE ,"42000", "S1009", | | { ER_NONUNIQ_TABLE ,"42000", "S1009" }, | |
| ER_INVALID_DEFAULT ,"42000", "S1009", | | { ER_INVALID_DEFAULT ,"42000", "S1009" }, | |
| ER_MULTIPLE_PRI_KEY ,"42000", "S1009", | | { ER_MULTIPLE_PRI_KEY ,"42000", "S1009" }, | |
| ER_TOO_MANY_KEYS ,"42000", "S1009", | | { ER_TOO_MANY_KEYS ,"42000", "S1009" }, | |
| ER_TOO_MANY_KEY_PARTS ,"42000", "S1009", | | { ER_TOO_MANY_KEY_PARTS ,"42000", "S1009" }, | |
| ER_TOO_LONG_KEY ,"42000", "S1009", | | { ER_TOO_LONG_KEY ,"42000", "S1009" }, | |
| ER_KEY_COLUMN_DOES_NOT_EXITS ,"42000", "S1009", | | { ER_KEY_COLUMN_DOES_NOT_EXITS ,"42000", "S1009" }, | |
| ER_BLOB_USED_AS_KEY ,"42000", "S1009", | | { ER_BLOB_USED_AS_KEY ,"42000", "S1009" }, | |
| ER_TOO_BIG_FIELDLENGTH ,"42000", "S1009", | | { ER_TOO_BIG_FIELDLENGTH ,"42000", "S1009" }, | |
| ER_WRONG_AUTO_KEY ,"42000", "S1009", | | { ER_WRONG_AUTO_KEY ,"42000", "S1009" }, | |
| ER_FORCING_CLOSE ,"08S01", "", | | { ER_FORCING_CLOSE ,"08S01", "" }, | |
| ER_IPSOCK_ERROR ,"08S01", "", | | { ER_IPSOCK_ERROR ,"08S01", "" }, | |
| ER_NO_SUCH_INDEX ,"42S12", "S1009", | | { ER_NO_SUCH_INDEX ,"42S12", "S1009" }, | |
| ER_WRONG_FIELD_TERMINATORS ,"42000", "S1009", | | { ER_WRONG_FIELD_TERMINATORS ,"42000", "S1009" }, | |
| ER_BLOBS_AND_NO_TERMINATED ,"42000", "S1009", | | { ER_BLOBS_AND_NO_TERMINATED ,"42000", "S1009" }, | |
| ER_CANT_REMOVE_ALL_FIELDS ,"42000", "", | | { ER_CANT_REMOVE_ALL_FIELDS ,"42000", "" }, | |
| ER_CANT_DROP_FIELD_OR_KEY ,"42000", "", | | { ER_CANT_DROP_FIELD_OR_KEY ,"42000", "" }, | |
| ER_BLOB_CANT_HAVE_DEFAULT ,"42000", "", | | { ER_BLOB_CANT_HAVE_DEFAULT ,"42000", "" }, | |
| ER_WRONG_DB_NAME ,"42000", "", | | { ER_WRONG_DB_NAME ,"42000", "" }, | |
| ER_WRONG_TABLE_NAME ,"42000", "", | | { ER_WRONG_TABLE_NAME ,"42000", "" }, | |
| ER_TOO_BIG_SELECT ,"42000", "", | | { ER_TOO_BIG_SELECT ,"42000", "" }, | |
| ER_UNKNOWN_PROCEDURE ,"42000", "", | | { ER_UNKNOWN_PROCEDURE ,"42000", "" }, | |
| ER_WRONG_PARAMCOUNT_TO_PROCEDURE ,"42000", "", | | { ER_WRONG_PARAMCOUNT_TO_PROCEDURE ,"42000", "" }, | |
| ER_UNKNOWN_TABLE ,"42S02", "", | | { ER_UNKNOWN_TABLE ,"42S02", "" }, | |
| ER_FIELD_SPECIFIED_TWICE ,"42000", "", | | { ER_FIELD_SPECIFIED_TWICE ,"42000", "" }, | |
| ER_UNSUPPORTED_EXTENSION ,"42000", "", | | { ER_UNSUPPORTED_EXTENSION ,"42000", "" }, | |
| ER_TABLE_MUST_HAVE_COLUMNS ,"42000", "", | | { ER_TABLE_MUST_HAVE_COLUMNS ,"42000", "" }, | |
| ER_UNKNOWN_CHARACTER_SET ,"42000", "", | | { ER_UNKNOWN_CHARACTER_SET ,"42000", "" }, | |
| ER_TOO_BIG_ROWSIZE ,"42000", "", | | { ER_TOO_BIG_ROWSIZE ,"42000", "" }, | |
| ER_WRONG_OUTER_JOIN ,"42000", "", | | { ER_WRONG_OUTER_JOIN ,"42000", "" }, | |
| ER_NULL_COLUMN_IN_INDEX ,"42000", "", | | { ER_NULL_COLUMN_IN_INDEX ,"42000", "" }, | |
| ER_PASSWORD_ANONYMOUS_USER ,"42000", "", | | { ER_PASSWORD_ANONYMOUS_USER ,"42000", "" }, | |
| ER_PASSWORD_NOT_ALLOWED ,"42000", "", | | { ER_PASSWORD_NOT_ALLOWED ,"42000", "" }, | |
| ER_PASSWORD_NO_MATCH ,"42000", "", | | { ER_PASSWORD_NO_MATCH ,"42000", "" }, | |
| ER_WRONG_VALUE_COUNT_ON_ROW ,"21S01", "", | | { ER_WRONG_VALUE_COUNT_ON_ROW ,"21S01", "" }, | |
| ER_INVALID_USE_OF_NULL ,"22004", "", | | { ER_INVALID_USE_OF_NULL ,"22004", "" }, | |
| ER_REGEXP_ERROR ,"42000", "", | | { ER_REGEXP_ERROR ,"42000", "" }, | |
| ER_MIX_OF_GROUP_FUNC_AND_FIELDS ,"42000", "", | | { ER_MIX_OF_GROUP_FUNC_AND_FIELDS ,"42000", "" }, | |
| ER_NONEXISTING_GRANT ,"42000", "", | | { ER_NONEXISTING_GRANT ,"42000", "" }, | |
| ER_TABLEACCESS_DENIED_ERROR ,"42000", "", | | { ER_TABLEACCESS_DENIED_ERROR ,"42000", "" }, | |
| ER_COLUMNACCESS_DENIED_ERROR ,"42000", "", | | { ER_COLUMNACCESS_DENIED_ERROR ,"42000", "" }, | |
| ER_ILLEGAL_GRANT_FOR_TABLE ,"42000", "", | | { ER_ILLEGAL_GRANT_FOR_TABLE ,"42000", "" }, | |
| ER_GRANT_WRONG_HOST_OR_USER ,"42000", "", | | { ER_GRANT_WRONG_HOST_OR_USER ,"42000", "" }, | |
| ER_NO_SUCH_TABLE ,"42S02", "", | | { ER_NO_SUCH_TABLE ,"42S02", "" }, | |
| ER_NONEXISTING_TABLE_GRANT ,"42000", "", | | { ER_NONEXISTING_TABLE_GRANT ,"42000", "" }, | |
| ER_NOT_ALLOWED_COMMAND ,"42000", "", | | { ER_NOT_ALLOWED_COMMAND ,"42000", "" }, | |
| ER_SYNTAX_ERROR ,"42000", "", | | { ER_SYNTAX_ERROR ,"42000", "" }, | |
| ER_ABORTING_CONNECTION ,"08S01", "", | | { ER_ABORTING_CONNECTION ,"08S01", "" }, | |
| ER_NET_PACKET_TOO_LARGE ,"08S01", "", | | { ER_NET_PACKET_TOO_LARGE ,"08S01", "" }, | |
| ER_NET_READ_ERROR_FROM_PIPE ,"08S01", "", | | { ER_NET_READ_ERROR_FROM_PIPE ,"08S01", "" }, | |
| ER_NET_FCNTL_ERROR ,"08S01", "", | | { ER_NET_FCNTL_ERROR ,"08S01", "" }, | |
| ER_NET_PACKETS_OUT_OF_ORDER ,"08S01", "", | | { ER_NET_PACKETS_OUT_OF_ORDER ,"08S01", "" }, | |
| ER_NET_UNCOMPRESS_ERROR ,"08S01", "", | | { ER_NET_UNCOMPRESS_ERROR ,"08S01", "" }, | |
| ER_NET_READ_ERROR ,"08S01", "", | | { ER_NET_READ_ERROR ,"08S01", "" }, | |
| ER_NET_READ_INTERRUPTED ,"08S01", "", | | { ER_NET_READ_INTERRUPTED ,"08S01", "" }, | |
| ER_NET_ERROR_ON_WRITE ,"08S01", "", | | { ER_NET_ERROR_ON_WRITE ,"08S01", "" }, | |
| ER_NET_WRITE_INTERRUPTED ,"08S01", "", | | { ER_NET_WRITE_INTERRUPTED ,"08S01", "" }, | |
| ER_TOO_LONG_STRING ,"42000", "", | | { ER_TOO_LONG_STRING ,"42000", "" }, | |
| ER_TABLE_CANT_HANDLE_BLOB ,"42000", "", | | { ER_TABLE_CANT_HANDLE_BLOB ,"42000", "" }, | |
| ER_TABLE_CANT_HANDLE_AUTO_INCREMENT ,"42000", "", | | { ER_TABLE_CANT_HANDLE_AUTO_INCREMENT ,"42000", "" }, | |
| ER_WRONG_COLUMN_NAME ,"42000", "", | | { ER_WRONG_COLUMN_NAME ,"42000", "" }, | |
| ER_WRONG_KEY_COLUMN ,"42000", "", | | { ER_WRONG_KEY_COLUMN ,"42000", "" }, | |
| ER_DUP_UNIQUE ,"23000", "", | | { ER_DUP_UNIQUE ,"23000", "" }, | |
| ER_BLOB_KEY_WITHOUT_LENGTH ,"42000", "", | | { ER_BLOB_KEY_WITHOUT_LENGTH ,"42000", "" }, | |
| ER_PRIMARY_CANT_HAVE_NULL ,"42000", "", | | { ER_PRIMARY_CANT_HAVE_NULL ,"42000", "" }, | |
| ER_TOO_MANY_ROWS ,"42000", "", | | { ER_TOO_MANY_ROWS ,"42000", "" }, | |
| ER_REQUIRES_PRIMARY_KEY ,"42000", "", | | { ER_REQUIRES_PRIMARY_KEY ,"42000", "" }, | |
| ER_CHECK_NO_SUCH_TABLE ,"42000", "", | | { ER_KEY_DOES_NOT_EXITS ,"42000", "S1009" }, | |
| ER_CHECK_NOT_IMPLEMENTED ,"42000", "", | | { ER_CHECK_NO_SUCH_TABLE ,"42000", "" }, | |
| ER_CANT_DO_THIS_DURING_AN_TRANSACTION ,"25000", "", | | { ER_CHECK_NOT_IMPLEMENTED ,"42000", "" }, | |
| ER_NEW_ABORTING_CONNECTION ,"08S01", "", | | { ER_CANT_DO_THIS_DURING_AN_TRANSACTION ,"25000", "" }, | |
| ER_MASTER_NET_READ ,"08S01", "", | | { ER_NEW_ABORTING_CONNECTION ,"08S01", "" }, | |
| ER_MASTER_NET_WRITE ,"08S01", "", | | { ER_MASTER_NET_READ ,"08S01", "" }, | |
| ER_TOO_MANY_USER_CONNECTIONS ,"42000", "", | | { ER_MASTER_NET_WRITE ,"08S01", "" }, | |
| ER_READ_ONLY_TRANSACTION ,"25000", "", | | { ER_TOO_MANY_USER_CONNECTIONS ,"42000", "" }, | |
| ER_NO_PERMISSION_TO_CREATE_USER ,"42000", "", | | { ER_READ_ONLY_TRANSACTION ,"25000", "" }, | |
| ER_LOCK_DEADLOCK ,"40001", "", | | { ER_NO_PERMISSION_TO_CREATE_USER ,"42000", "" }, | |
| ER_NO_REFERENCED_ROW ,"23000", "", | | { ER_LOCK_DEADLOCK ,"40001", "" }, | |
| ER_ROW_IS_REFERENCED ,"23000", "", | | { ER_NO_REFERENCED_ROW ,"23000", "" }, | |
| ER_CONNECT_TO_MASTER ,"08S01", "", | | { ER_ROW_IS_REFERENCED ,"23000", "" }, | |
| ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT ,"21000", "", | | { ER_CONNECT_TO_MASTER ,"08S01", "" }, | |
| ER_USER_LIMIT_REACHED ,"42000", "", | | { ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT ,"21000", "" }, | |
| ER_SPECIFIC_ACCESS_DENIED_ERROR ,"42000", "", | | { ER_USER_LIMIT_REACHED ,"42000", "" }, | |
| ER_NO_DEFAULT ,"42000", "", | | { ER_SPECIFIC_ACCESS_DENIED_ERROR ,"42000", "" }, | |
| ER_WRONG_VALUE_FOR_VAR ,"42000", "", | | { ER_NO_DEFAULT ,"42000", "" }, | |
| ER_WRONG_TYPE_FOR_VAR ,"42000", "", | | { ER_WRONG_VALUE_FOR_VAR ,"42000", "" }, | |
| ER_CANT_USE_OPTION_HERE ,"42000", "", | | { ER_WRONG_TYPE_FOR_VAR ,"42000", "" }, | |
| ER_NOT_SUPPORTED_YET ,"42000", "", | | { ER_CANT_USE_OPTION_HERE ,"42000", "" }, | |
| ER_WRONG_FK_DEF ,"42000", "", | | { ER_NOT_SUPPORTED_YET ,"42000", "" }, | |
| ER_OPERAND_COLUMNS ,"21000", "", | | { ER_WRONG_FK_DEF ,"42000", "" }, | |
| ER_SUBQUERY_NO_1_ROW ,"21000", "", | | { ER_OPERAND_COLUMNS ,"21000", "" }, | |
| ER_ILLEGAL_REFERENCE ,"42S22", "", | | { ER_SUBQUERY_NO_1_ROW ,"21000", "" }, | |
| ER_DERIVED_MUST_HAVE_ALIAS ,"42000", "", | | { ER_ILLEGAL_REFERENCE ,"42S22", "" }, | |
| ER_SELECT_REDUCED ,"01000", "", | | { ER_DERIVED_MUST_HAVE_ALIAS ,"42000", "" }, | |
| ER_TABLENAME_NOT_ALLOWED_HERE ,"42000", "", | | { ER_SELECT_REDUCED ,"01000", "" }, | |
| ER_NOT_SUPPORTED_AUTH_MODE ,"08004", "", | | { ER_TABLENAME_NOT_ALLOWED_HERE ,"42000", "" }, | |
| ER_SPATIAL_CANT_HAVE_NULL ,"42000", "", | | { ER_NOT_SUPPORTED_AUTH_MODE ,"08004", "" }, | |
| ER_COLLATION_CHARSET_MISMATCH ,"42000", "", | | { ER_SPATIAL_CANT_HAVE_NULL ,"42000", "" }, | |
| ER_WARN_TOO_FEW_RECORDS ,"01000", "", | | { ER_COLLATION_CHARSET_MISMATCH ,"42000", "" }, | |
| ER_WARN_TOO_MANY_RECORDS ,"01000", "", | | { ER_WARN_TOO_FEW_RECORDS ,"01000", "" }, | |
| ER_WARN_NULL_TO_NOTNULL ,"22004", "", | | { ER_WARN_TOO_MANY_RECORDS ,"01000", "" }, | |
| ER_WARN_DATA_OUT_OF_RANGE ,"22003", "", | | { ER_WARN_NULL_TO_NOTNULL ,"22004", "" }, | |
| WARN_DATA_TRUNCATED ,"01000", "", | | { ER_WARN_DATA_OUT_OF_RANGE ,"22003", "" }, | |
| ER_WRONG_NAME_FOR_INDEX ,"42000", "", | | { WARN_DATA_TRUNCATED ,"01000", "" }, | |
| ER_WRONG_NAME_FOR_CATALOG ,"42000", "", | | { ER_WRONG_NAME_FOR_INDEX ,"42000", "" }, | |
| ER_UNKNOWN_STORAGE_ENGINE ,"42000", "", | | { ER_WRONG_NAME_FOR_CATALOG ,"42000", "" }, | |
| ER_TRUNCATED_WRONG_VALUE ,"22007", "", | | { ER_UNKNOWN_STORAGE_ENGINE ,"42000", "" }, | |
| ER_SP_NO_RECURSIVE_CREATE ,"2F003", "", | | { ER_TRUNCATED_WRONG_VALUE ,"22007", "" }, | |
| ER_SP_ALREADY_EXISTS ,"42000", "", | | { ER_SP_NO_RECURSIVE_CREATE ,"2F003", "" }, | |
| ER_SP_DOES_NOT_EXIST ,"42000", "", | | { ER_SP_ALREADY_EXISTS ,"42000", "" }, | |
| ER_SP_LILABEL_MISMATCH ,"42000", "", | | { ER_SP_DOES_NOT_EXIST ,"42000", "" }, | |
| ER_SP_LABEL_REDEFINE ,"42000", "", | | { ER_SP_LILABEL_MISMATCH ,"42000", "" }, | |
| ER_SP_LABEL_MISMATCH ,"42000", "", | | { ER_SP_LABEL_REDEFINE ,"42000", "" }, | |
| ER_SP_UNINIT_VAR ,"01000", "", | | { ER_SP_LABEL_MISMATCH ,"42000", "" }, | |
| ER_SP_BADSELECT ,"0A000", "", | | { ER_SP_UNINIT_VAR ,"01000", "" }, | |
| ER_SP_BADRETURN ,"42000", "", | | { ER_SP_BADSELECT ,"0A000", "" }, | |
| ER_SP_BADSTATEMENT ,"0A000", "", | | { ER_SP_BADRETURN ,"42000", "" }, | |
| ER_UPDATE_LOG_DEPRECATED_IGNORED ,"42000", "", | | { ER_SP_BADSTATEMENT ,"0A000", "" }, | |
| ER_UPDATE_LOG_DEPRECATED_TRANSLATED ,"42000", "", | | { ER_UPDATE_LOG_DEPRECATED_IGNORED ,"42000", "" }, | |
| ER_QUERY_INTERRUPTED ,"70100", "", | | { ER_UPDATE_LOG_DEPRECATED_TRANSLATED ,"42000", "" }, | |
| ER_SP_WRONG_NO_OF_ARGS ,"42000", "", | | { ER_QUERY_INTERRUPTED ,"70100", "" }, | |
| ER_SP_COND_MISMATCH ,"42000", "", | | { ER_SP_WRONG_NO_OF_ARGS ,"42000", "" }, | |
| ER_SP_NORETURN ,"42000", "", | | { ER_SP_COND_MISMATCH ,"42000", "" }, | |
| ER_SP_NORETURNEND ,"2F005", "", | | { ER_SP_NORETURN ,"42000", "" }, | |
| ER_SP_BAD_CURSOR_QUERY ,"42000", "", | | { ER_SP_NORETURNEND ,"2F005", "" }, | |
| ER_SP_BAD_CURSOR_SELECT ,"42000", "", | | { ER_SP_BAD_CURSOR_QUERY ,"42000", "" }, | |
| ER_SP_CURSOR_MISMATCH ,"42000", "", | | { ER_SP_BAD_CURSOR_SELECT ,"42000", "" }, | |
| ER_SP_CURSOR_ALREADY_OPEN ,"24000", "", | | { ER_SP_CURSOR_MISMATCH ,"42000", "" }, | |
| ER_SP_CURSOR_NOT_OPEN ,"24000", "", | | { ER_SP_CURSOR_ALREADY_OPEN ,"24000", "" }, | |
| ER_SP_UNDECLARED_VAR ,"42000", "", | | { ER_SP_CURSOR_NOT_OPEN ,"24000", "" }, | |
| ER_SP_FETCH_NO_DATA ,"02000", "", | | { ER_SP_UNDECLARED_VAR ,"42000", "" }, | |
| ER_SP_DUP_PARAM ,"42000", "", | | { ER_SP_FETCH_NO_DATA ,"02000", "" }, | |
| ER_SP_DUP_VAR ,"42000", "", | | { ER_SP_DUP_PARAM ,"42000", "" }, | |
| ER_SP_DUP_COND ,"42000", "", | | { ER_SP_DUP_VAR ,"42000", "" }, | |
| ER_SP_DUP_CURS ,"42000", "", | | { ER_SP_DUP_COND ,"42000", "" }, | |
| ER_SP_SUBSELECT_NYI ,"0A000", "", | | { ER_SP_DUP_CURS ,"42000", "" }, | |
| ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG ,"0A000", "", | | { ER_SP_SUBSELECT_NYI ,"0A000", "" }, | |
| ER_SP_VARCOND_AFTER_CURSHNDLR ,"42000", "", | | { ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG ,"0A000", "" }, | |
| ER_SP_CURSOR_AFTER_HANDLER ,"42000", "", | | { ER_SP_VARCOND_AFTER_CURSHNDLR ,"42000", "" }, | |
| ER_SP_CASE_NOT_FOUND ,"20000", "", | | { ER_SP_CURSOR_AFTER_HANDLER ,"42000", "" }, | |
| ER_DIVISION_BY_ZERO ,"22012", "", | | { ER_SP_CASE_NOT_FOUND ,"20000", "" }, | |
| ER_ILLEGAL_VALUE_FOR_TYPE ,"22007", "", | | { ER_DIVISION_BY_ZERO ,"22012", "" }, | |
| ER_PROCACCESS_DENIED_ERROR ,"42000", "", | | { ER_ILLEGAL_VALUE_FOR_TYPE ,"22007", "" }, | |
| ER_XAER_NOTA ,"XAE04", "", | | { ER_PROCACCESS_DENIED_ERROR ,"42000", "" }, | |
| ER_XAER_INVAL ,"XAE05", "", | | { ER_XAER_NOTA ,"XAE04", "" }, | |
| ER_XAER_RMFAIL ,"XAE07", "", | | { ER_XAER_INVAL ,"XAE05", "" }, | |
| ER_XAER_OUTSIDE ,"XAE09", "", | | { ER_XAER_RMFAIL ,"XAE07", "" }, | |
| ER_XAER_RMERR ,"XAE03", "", | | { ER_XAER_OUTSIDE ,"XAE09", "" }, | |
| ER_XA_RBROLLBACK ,"XA100", "", | | { ER_XAER_RMERR ,"XAE03", "" }, | |
| ER_NONEXISTING_PROC_GRANT ,"42000", "", | | { ER_XA_RBROLLBACK ,"XA100", "" }, | |
| ER_DATA_TOO_LONG ,"22001", "", | | { ER_NONEXISTING_PROC_GRANT ,"42000", "" }, | |
| ER_SP_BAD_SQLSTATE ,"42000", "", | | { ER_DATA_TOO_LONG ,"22001", "" }, | |
| ER_CANT_CREATE_USER_WITH_GRANT ,"42000", "", | | { ER_SP_BAD_SQLSTATE ,"42000", "" }, | |
| ER_SP_DUP_HANDLER ,"42000", "", | | { ER_CANT_CREATE_USER_WITH_GRANT ,"42000", "" }, | |
| ER_SP_NOT_VAR_ARG ,"42000", "", | | { ER_SP_DUP_HANDLER ,"42000", "" }, | |
| ER_SP_NO_RETSET ,"0A000", "", | | { ER_SP_NOT_VAR_ARG ,"42000", "" }, | |
| ER_CANT_CREATE_GEOMETRY_OBJECT ,"22003", "", | | { ER_SP_NO_RETSET ,"0A000", "" }, | |
| ER_TOO_BIG_SCALE ,"42000", "S1009", | | { ER_CANT_CREATE_GEOMETRY_OBJECT ,"22003", "" }, | |
| ER_TOO_BIG_PRECISION ,"42000", "S1009", | | { ER_TOO_BIG_SCALE ,"42000", "S1009" }, | |
| ER_M_BIGGER_THAN_D ,"42000", "S1009", | | { ER_TOO_BIG_PRECISION ,"42000", "S1009" }, | |
| ER_TOO_LONG_BODY ,"42000", "S1009", | | { ER_M_BIGGER_THAN_D ,"42000", "S1009" }, | |
| ER_TOO_BIG_DISPLAYWIDTH ,"42000", "S1009", | | { ER_TOO_LONG_BODY ,"42000", "S1009" }, | |
| ER_XAER_DUPID ,"XAE08", "", | | { ER_TOO_BIG_DISPLAYWIDTH ,"42000", "S1009" }, | |
| ER_DATETIME_FUNCTION_OVERFLOW ,"22008", "", | | { ER_XAER_DUPID ,"XAE08", "" }, | |
| ER_ROW_IS_REFERENCED_2 ,"23000", "", | | { ER_DATETIME_FUNCTION_OVERFLOW ,"22008", "" }, | |
| ER_NO_REFERENCED_ROW_2 ,"23000", "", | | { ER_ROW_IS_REFERENCED_2 ,"23000", "" }, | |
| ER_SP_BAD_VAR_SHADOW ,"42000", "", | | { ER_NO_REFERENCED_ROW_2 ,"23000", "" }, | |
| ER_SP_WRONG_NAME ,"42000", "", | | { ER_SP_BAD_VAR_SHADOW ,"42000", "" }, | |
| ER_SP_NO_AGGREGATE ,"42000", "", | | { ER_SP_WRONG_NAME ,"42000", "" }, | |
| ER_MAX_PREPARED_STMT_COUNT_REACHED ,"42000", "", | | { ER_SP_NO_AGGREGATE ,"42000", "" }, | |
| ER_NON_GROUPING_FIELD_USED ,"42000", "", | | { ER_MAX_PREPARED_STMT_COUNT_REACHED ,"42000", "" }, | |
| ER_XA_RBTIMEOUT ,"XA106", "", | | { ER_NON_GROUPING_FIELD_USED ,"42000", "" }, | |
| ER_XA_RBDEADLOCK ,"XA102", "", | | { ER_FOREIGN_DUPLICATE_KEY ,"23000", "S1009" }, | |
| | | { ER_CANT_CHANGE_TX_ISOLATION ,"25001", "" }, | |
| | | { ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT ,"42000", "" }, | |
| | | { ER_WRONG_PARAMETERS_TO_NATIVE_FCT ,"42000", "" }, | |
| | | { ER_WRONG_PARAMETERS_TO_STORED_FCT ,"42000", "" }, | |
| | | { ER_DUP_ENTRY_WITH_KEY_NAME ,"23000", "S1009" }, | |
| | | { ER_XA_RBTIMEOUT ,"XA106", "" }, | |
| | | { ER_XA_RBDEADLOCK ,"XA102", "" }, | |
| | | { ER_FUNC_INEXISTENT_NAME_COLLISION ,"42000", "" }, | |
| | | | |
End of changes. 1 change blocks. |
| 0 lines changed or deleted | | 0 lines changed or added | |
|