| m_ctype.h | | m_ctype.h | |
|
| /* | | /* Copyright (C) 2000 MySQL AB | |
| Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reser | | | |
| ved. | | | |
| | | | |
| This program is free software; you can redistribute it and/or modify | | This program is free software; you can redistribute it and/or modify | |
| it under the terms of the GNU General Public License as published by | | it under the terms of the GNU General Public License as published by | |
| the Free Software Foundation; version 2 of the License. | | the Free Software Foundation; version 2 of the License. | |
| | | | |
| This program is distributed in the hope that it will be useful, | | This program is distributed in the hope that it will be useful, | |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| GNU General Public License for more details. | | GNU General Public License for more details. | |
| | | | |
| You should have received a copy of the GNU General Public License | | You should have received a copy of the GNU General Public License | |
| along with this program; if not, write to the Free Software | | along with this program; if not, write to the Free Software | |
|
| Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 US | | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US | |
| A | | A */ | |
| */ | | | |
| | | | |
| /* | | /* | |
| A better inplementation of the UNIX ctype(3) library. | | A better inplementation of the UNIX ctype(3) library. | |
| Notes: my_global.h should be included before ctype.h | | Notes: my_global.h should be included before ctype.h | |
| */ | | */ | |
| | | | |
| #ifndef _m_ctype_h | | #ifndef _m_ctype_h | |
| #define _m_ctype_h | | #define _m_ctype_h | |
| | | | |
| #include <my_attribute.h> | | #include <my_attribute.h> | |
| | | | |
| skipping to change at line 52 | | skipping to change at line 50 | |
| | | | |
| 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]; | |
|
| extern MY_UNICASE_INFO *my_unicase_mysql500[256]; | | | |
| | | | |
| typedef struct uni_ctype_st | | typedef struct uni_ctype_st | |
| { | | { | |
| uchar pctype; | | uchar pctype; | |
| uchar *ctype; | | uchar *ctype; | |
| } MY_UNI_CTYPE; | | } MY_UNI_CTYPE; | |
| | | | |
| extern MY_UNI_CTYPE my_uni_ctype[256]; | | extern MY_UNI_CTYPE my_uni_ctype[256]; | |
| | | | |
| /* wm_wc and wc_mb return codes */ | | /* wm_wc and wc_mb return codes */ | |
| | | | |
| skipping to change at line 92 | | skipping to change at line 89 | |
| #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_HIDDEN 2048 /* don't display in SHOW */ | | #define MY_CS_HIDDEN 2048 /* don't display in SHOW */ | |
| #define MY_CS_PUREASCII 4096 /* if a charset is pure ascii */ | | #define MY_CS_PUREASCII 4096 /* if a charset is pure ascii */ | |
|
| | | #define MY_CS_NONASCII 8192 /* if not ASCII-compatible */ | |
| #define MY_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 131 | | skipping to change at line 129 | |
| MY_LEX_LONG_COMMENT, MY_LEX_END_LONG_COMMENT, MY_LEX_SEMICOLON, | | MY_LEX_LONG_COMMENT, MY_LEX_END_LONG_COMMENT, MY_LEX_SEMICOLON, | |
| MY_LEX_SET_VAR, MY_LEX_USER_END, MY_LEX_HOSTNAME, MY_LEX_SKIP, | | MY_LEX_SET_VAR, MY_LEX_USER_END, MY_LEX_HOSTNAME, MY_LEX_SKIP, | |
| MY_LEX_USER_VARIABLE_DELIMITER, MY_LEX_SYSTEM_VAR, | | MY_LEX_USER_VARIABLE_DELIMITER, MY_LEX_SYSTEM_VAR, | |
| 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; | |
| | | | |
|
| extern int (*my_string_stack_guard)(int); | | | |
| | | | |
| /* See strings/CHARSET_INFO.txt for information about this structure */ | | /* See strings/CHARSET_INFO.txt for information about this structure */ | |
| typedef struct my_collation_handler_st | | typedef struct my_collation_handler_st | |
| { | | { | |
| my_bool (*init)(struct charset_info_st *, void *(*alloc)(size_t)); | | my_bool (*init)(struct charset_info_st *, void *(*alloc)(size_t)); | |
| /* Collation routines */ | | /* Collation routines */ | |
| int (*strnncoll)(struct charset_info_st *, | | int (*strnncoll)(struct charset_info_st *, | |
| const uchar *, size_t, const uchar *, size_t, my_bool
); | | const uchar *, size_t, const uchar *, size_t, my_bool
); | |
| int (*strnncollsp)(struct charset_info_st *, | | int (*strnncollsp)(struct charset_info_st *, | |
| const uchar *, size_t, const uchar *, size_t, | | const uchar *, size_t, const uchar *, size_t, | |
| my_bool diff_if_only_endspace_difference); | | my_bool diff_if_only_endspace_difference); | |
| | | | |
| skipping to change at line 311 | | skipping to change at line 307 | |
| 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_ucs2_general_mysql500_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_utf8_general_mysql500_ci; | | | |
| 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; | | extern MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_filename; | |
| | | | |
| /* declarations for simple charsets */ | | /* declarations for simple charsets */ | |
| extern size_t my_strnxfrm_simple(CHARSET_INFO *, uchar *, size_t, | | extern size_t my_strnxfrm_simple(CHARSET_INFO *, uchar *, size_t, | |
| const uchar *, size_t); | | const uchar *, size_t); | |
| size_t my_strnxfrmlen_simple(CHARSET_INFO *, size_t); | | size_t my_strnxfrmlen_simple(CHARSET_INFO *, size_t); | |
| extern int my_strnncoll_simple(CHARSET_INFO *, const uchar *, size_t, | | extern int my_strnncoll_simple(CHARSET_INFO *, const uchar *, size_t, | |
| const uchar *, size_t, my_bool); | | const uchar *, size_t, my_bool); | |
| | | | |
| | | | |
| skipping to change at line 465 | | skipping to change at line 459 | |
| int my_wildcmp_unicode(CHARSET_INFO *cs, | | int my_wildcmp_unicode(CHARSET_INFO *cs, | |
| const char *str, const char *str_end, | | const char *str, const char *str_end, | |
| const char *wildstr, const char *wildend, | | const char *wildstr, const char *wildend, | |
| int escape, int w_one, int w_many, | | int escape, int w_one, int w_many, | |
| MY_UNICASE_INFO **weights); | | MY_UNICASE_INFO **weights); | |
| | | | |
| extern my_bool my_parse_charset_xml(const char *bug, size_t len, | | extern my_bool my_parse_charset_xml(const char *bug, size_t len, | |
| int (*add)(CHARSET_INFO *cs)); | | int (*add)(CHARSET_INFO *cs)); | |
| extern char *my_strchr(CHARSET_INFO *cs, const char *str, const char *end, | | extern char *my_strchr(CHARSET_INFO *cs, const char *str, const char *end, | |
| pchar c); | | pchar c); | |
|
| extern size_t my_strcspn(CHARSET_INFO *cs, const char *str, const char *end | | | |
| , | | | |
| const char *accept); | | | |
| | | | |
| my_bool my_propagate_simple(CHARSET_INFO *cs, const uchar *str, size_t len)
; | | my_bool my_propagate_simple(CHARSET_INFO *cs, const uchar *str, size_t len)
; | |
| my_bool my_propagate_complex(CHARSET_INFO *cs, const uchar *str, size_t len
); | | my_bool my_propagate_complex(CHARSET_INFO *cs, const uchar *str, size_t len
); | |
| | | | |
| uint my_string_repertoire(CHARSET_INFO *cs, const char *str, ulong len); | | uint my_string_repertoire(CHARSET_INFO *cs, const char *str, ulong len); | |
| my_bool my_charset_is_ascii_based(CHARSET_INFO *cs); | | my_bool my_charset_is_ascii_based(CHARSET_INFO *cs); | |
| my_bool my_charset_is_8bit_pure_ascii(CHARSET_INFO *cs); | | my_bool my_charset_is_8bit_pure_ascii(CHARSET_INFO *cs); | |
| uint my_charset_repertoire(CHARSET_INFO *cs); | | uint my_charset_repertoire(CHARSET_INFO *cs); | |
| | | | |
|
| | | my_bool my_charset_is_ascii_compatible(CHARSET_INFO *cs); | |
| | | | |
| | | extern size_t my_vsnprintf_ex(CHARSET_INFO *cs, char *to, size_t n, | |
| | | const char* fmt, va_list ap); | |
| | | | |
| #define _MY_U 01 /* Upper case */ | | #define _MY_U 01 /* Upper case */ | |
| #define _MY_L 02 /* Lower case */ | | #define _MY_L 02 /* Lower case */ | |
| #define _MY_NMR 04 /* Numeral (digit) */ | | #define _MY_NMR 04 /* Numeral (digit) */ | |
| #define _MY_SPC 010 /* Spacing character */ | | #define _MY_SPC 010 /* Spacing character */ | |
| #define _MY_PNT 020 /* Punctuation */ | | #define _MY_PNT 020 /* Punctuation */ | |
| #define _MY_CTR 040 /* Control character */ | | #define _MY_CTR 040 /* Control character */ | |
| #define _MY_B 0100 /* Blank */ | | #define _MY_B 0100 /* Blank */ | |
| #define _MY_X 0200 /* heXadecimal digit */ | | #define _MY_X 0200 /* heXadecimal digit */ | |
| | | | |
| #define my_isascii(c) (!((c) & ~0177)) | | #define my_isascii(c) (!((c) & ~0177)) | |
| | | | |
End of changes. 9 change blocks. |
| 14 lines changed or deleted | | 9 lines changed or added | |
|
| m_string.h | | m_string.h | |
|
| /* | | /* Copyright (C) 2000 MySQL AB | |
| Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reser | | | |
| ved. | | | |
| | | | |
| This program is free software; you can redistribute it and/or modify | | This program is free software; you can redistribute it and/or modify | |
| it under the terms of the GNU General Public License as published by | | it under the terms of the GNU General Public License as published by | |
| the Free Software Foundation; version 2 of the License. | | the Free Software Foundation; version 2 of the License. | |
| | | | |
| This program is distributed in the hope that it will be useful, | | This program is distributed in the hope that it will be useful, | |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| GNU General Public License for more details. | | GNU General Public License for more details. | |
| | | | |
| You should have received a copy of the GNU General Public License | | You should have received a copy of the GNU General Public License | |
| along with this program; if not, write to the Free Software | | along with this program; if not, write to the Free Software | |
|
| Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 US | | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US | |
| A | | A */ | |
| */ | | | |
| | | | |
| /* There may be prolems include all of theese. Try to test in | | /* There may be prolems include all of theese. Try to test in | |
| configure with ones are needed? */ | | configure with ones are needed? */ | |
| | | | |
| /* This is needed for the definitions of strchr... on solaris */ | | /* This is needed for the definitions of strchr... on solaris */ | |
| | | | |
| #ifndef _m_string_h | | #ifndef _m_string_h | |
| #define _m_string_h | | #define _m_string_h | |
| #ifndef __USE_GNU | | #ifndef __USE_GNU | |
| #define __USE_GNU /* We want to use stpcpy */ | | #define __USE_GNU /* We want to use stpcpy */ | |
| | | | |
| skipping to change at line 38 | | skipping to change at line 36 | |
| #if defined(HAVE_STRINGS_H) | | #if defined(HAVE_STRINGS_H) | |
| #include <strings.h> | | #include <strings.h> | |
| #endif | | #endif | |
| #if defined(HAVE_STRING_H) | | #if defined(HAVE_STRING_H) | |
| #include <string.h> | | #include <string.h> | |
| #endif | | #endif | |
| | | | |
| /* need by my_vsnprintf */ | | /* need by my_vsnprintf */ | |
| #include <stdarg.h> | | #include <stdarg.h> | |
| | | | |
|
| | | #ifdef _AIX | |
| | | #undef HAVE_BCMP | |
| | | #endif | |
| | | | |
| /* This is needed for the definitions of bzero... on solaris */ | | /* This is needed for the definitions of bzero... on solaris */ | |
| #if defined(HAVE_STRINGS_H) | | #if defined(HAVE_STRINGS_H) | |
| #include <strings.h> | | #include <strings.h> | |
| #endif | | #endif | |
| | | | |
| /* This is needed for the definitions of memcpy... on solaris */ | | /* This is needed for the definitions of memcpy... on solaris */ | |
| #if defined(HAVE_MEMORY_H) && !defined(__cplusplus) | | #if defined(HAVE_MEMORY_H) && !defined(__cplusplus) | |
| #include <memory.h> | | #include <memory.h> | |
| #endif | | #endif | |
| | | | |
| | | | |
| skipping to change at line 61 | | skipping to change at line 63 | |
| # define memmove(d, s, n) bmove ((d), (s), (n)) | | # define memmove(d, s, n) bmove ((d), (s), (n)) | |
| #elif defined(HAVE_MEMMOVE) | | #elif defined(HAVE_MEMMOVE) | |
| # define bmove(d, s, n) memmove((d), (s), (n)) | | # define bmove(d, s, n) memmove((d), (s), (n)) | |
| #else | | #else | |
| # define memmove(d, s, n) bmove((d), (s), (n)) /* our bmove */ | | # define memmove(d, s, n) bmove((d), (s), (n)) /* our bmove */ | |
| #endif | | #endif | |
| | | | |
| /* Unixware 7 */ | | /* Unixware 7 */ | |
| #if !defined(HAVE_BFILL) | | #if !defined(HAVE_BFILL) | |
| # define bfill(A,B,C) memset((A),(C),(B)) | | # define bfill(A,B,C) memset((A),(C),(B)) | |
|
| | | # define bmove_align(A,B,C) memcpy((A),(B),(C)) | |
| #endif | | #endif | |
| | | | |
|
| #if !defined(bzero) && (!defined(HAVE_BZERO) || !HAVE_DECL_BZERO || defined | | #if !defined(HAVE_BCMP) | |
| (_AIX)) | | # define bcopy(s, d, n) memcpy((d), (s), (n)) | |
| /* See autoconf doku: "HAVE_DECL_symbol" will be defined after configure, t | | # define bcmp(A,B,C) memcmp((A),(B),(C)) | |
| o 0 or 1 */ | | # define bzero(A,B) memset((A),0,(B)) | |
| /* AIX has bzero() as a function, but the declaration prototype is strangel | | # define bmove_align(A,B,C) memcpy((A),(B),(C)) | |
| y hidden */ | | | |
| # define bzero(A,B) memset((A),0,(B)) | | | |
| #endif | | #endif | |
| | | | |
| #if defined(__cplusplus) | | #if defined(__cplusplus) | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
| /* | | /* | |
| my_str_malloc() and my_str_free() are assigned to implementations in | | my_str_malloc() and my_str_free() are assigned to implementations in | |
| strings/alloc.c, but can be overridden in the calling program. | | strings/alloc.c, but can be overridden in the calling program. | |
| */ | | */ | |
| extern void *(*my_str_malloc)(size_t); | | extern void *(*my_str_malloc)(size_t); | |
| extern void (*my_str_free)(void *); | | extern void (*my_str_free)(void *); | |
| | | | |
|
| #if defined(HAVE_STPCPY) && MY_GNUC_PREREQ(3, 4) && !defined(__INTEL_COMPIL | | #if defined(HAVE_STPCPY) | |
| ER) | | | |
| #define strmov(A,B) __builtin_stpcpy((A),(B)) | | | |
| #elif defined(HAVE_STPCPY) | | | |
| #define strmov(A,B) stpcpy((A),(B)) | | #define strmov(A,B) stpcpy((A),(B)) | |
| #ifndef stpcpy | | #ifndef stpcpy | |
| extern char *stpcpy(char *, const char *); /* For AIX with gcc 2.95.3 *
/ | | extern char *stpcpy(char *, const char *); /* For AIX with gcc 2.95.3 *
/ | |
| #endif | | #endif | |
| #endif | | #endif | |
| | | | |
| /* Declared in int2str() */ | | /* Declared in int2str() */ | |
| extern char NEAR _dig_vec_upper[]; | | extern char NEAR _dig_vec_upper[]; | |
| extern char NEAR _dig_vec_lower[]; | | extern char NEAR _dig_vec_lower[]; | |
| | | | |
| /* Defined in strtod.c */ | | /* Defined in strtod.c */ | |
| extern const double log_10[309]; | | extern const double log_10[309]; | |
| | | | |
|
| #ifndef strmov | | #ifdef BAD_STRING_COMPILER | |
| | | #define strmov(A,B) (memccpy(A,B,0,INT_MAX)-1) | |
| | | #else | |
| #define strmov_overlapp(A,B) strmov(A,B) | | #define strmov_overlapp(A,B) strmov(A,B) | |
| #define strmake_overlapp(A,B,C) strmake(A,B,C) | | #define strmake_overlapp(A,B,C) strmake(A,B,C) | |
| #endif | | #endif | |
| | | | |
| #ifdef BAD_MEMCPY /* Problem with gcc on Alpha */ | | #ifdef BAD_MEMCPY /* Problem with gcc on Alpha */ | |
| #define memcpy_fixed(A,B,C) bmove((A),(B),(C)) | | #define memcpy_fixed(A,B,C) bmove((A),(B),(C)) | |
| #else | | #else | |
| #define memcpy_fixed(A,B,C) memcpy((A),(B),(C)) | | #define memcpy_fixed(A,B,C) memcpy((A),(B),(C)) | |
| #endif | | #endif | |
| | | | |
| #if (!defined(USE_BMOVE512) || defined(HAVE_purify)) && !defined(bmove512) | | #if (!defined(USE_BMOVE512) || defined(HAVE_purify)) && !defined(bmove512) | |
| #define bmove512(A,B,C) memcpy(A,B,C) | | #define bmove512(A,B,C) memcpy(A,B,C) | |
| #endif | | #endif | |
| | | | |
| /* Prototypes for string functions */ | | /* Prototypes for string functions */ | |
| | | | |
| #if !defined(bfill) && !defined(HAVE_BFILL) | | #if !defined(bfill) && !defined(HAVE_BFILL) | |
| extern void bfill(uchar *dst,size_t len,pchar fill); | | extern void bfill(uchar *dst,size_t len,pchar fill); | |
| #endif | | #endif | |
| | | | |
|
| | | #if !defined(bzero) && !defined(HAVE_BZERO) | |
| | | extern void bzero(uchar * dst,size_t len); | |
| | | #endif | |
| | | | |
| | | #if !defined(bcmp) && !defined(HAVE_BCMP) | |
| | | extern size_t bcmp(const uchar *s1,const uchar *s2,size_t len); | |
| | | #endif | |
| | | #ifdef HAVE_purify | |
| | | extern size_t my_bcmp(const uchar *s1,const uchar *s2,size_t len); | |
| | | #undef bcmp | |
| | | #define bcmp(A,B,C) my_bcmp((A),(B),(C)) | |
| | | #define bzero_if_purify(A,B) bzero(A,B) | |
| | | #else | |
| | | #define bzero_if_purify(A,B) | |
| | | #endif /* HAVE_purify */ | |
| | | | |
| #ifndef bmove512 | | #ifndef bmove512 | |
| extern void bmove512(uchar *dst,const uchar *src,size_t len); | | extern void bmove512(uchar *dst,const uchar *src,size_t len); | |
| #endif | | #endif | |
| | | | |
| #if !defined(HAVE_BMOVE) && !defined(bmove) | | #if !defined(HAVE_BMOVE) && !defined(bmove) | |
| extern void bmove(uuchar *dst, const uchar *src,size_t len); | | extern void bmove(uuchar *dst, const uchar *src,size_t len); | |
| #endif | | #endif | |
| | | | |
| extern void bmove_upp(uchar *dst,const uchar *src,size_t len); | | extern void bmove_upp(uchar *dst,const uchar *src,size_t len); | |
| extern void bchange(uchar *dst,size_t old_len,const uchar *src, | | extern void bchange(uchar *dst,size_t old_len,const uchar *src, | |
| | | | |
| skipping to change at line 138 | | skipping to change at line 158 | |
| extern void strappend(char *s,size_t len,pchar fill); | | extern void strappend(char *s,size_t len,pchar fill); | |
| extern char *strend(const char *s); | | extern char *strend(const char *s); | |
| extern char *strcend(const char *, pchar); | | extern char *strcend(const char *, pchar); | |
| extern char *strfield(char *src,int fields,int chars,int blanks, | | extern char *strfield(char *src,int fields,int chars,int blanks, | |
| int tabch); | | int tabch); | |
| extern char *strfill(char * s,size_t len,pchar fill); | | extern char *strfill(char * s,size_t len,pchar fill); | |
| extern size_t strinstr(const char *str,const char *search); | | extern size_t strinstr(const char *str,const char *search); | |
| extern size_t r_strinstr(const char *str, size_t from, const char *search)
; | | extern size_t r_strinstr(const char *str, size_t from, const char *search)
; | |
| extern char *strkey(char *dst,char *head,char *tail,char *flags); | | extern char *strkey(char *dst,char *head,char *tail,char *flags); | |
| extern char *strmake(char *dst,const char *src,size_t length); | | extern char *strmake(char *dst,const char *src,size_t length); | |
|
| | | #ifndef strmake_overlapp | |
| | | extern char *strmake_overlapp(char *dst,const char *src, size_t length); | |
| | | #endif | |
| | | | |
| #ifndef strmov | | #ifndef strmov | |
| extern char *strmov(char *dst,const char *src); | | extern char *strmov(char *dst,const char *src); | |
|
| #else | | | |
| extern char *strmov_overlapp(char *dst,const char *src); | | | |
| #endif | | #endif | |
| extern char *strnmov(char *dst,const char *src,size_t n); | | extern char *strnmov(char *dst,const char *src,size_t n); | |
| extern char *strsuff(const char *src,const char *suffix); | | extern char *strsuff(const char *src,const char *suffix); | |
| extern char *strcont(const char *src,const char *set); | | extern char *strcont(const char *src,const char *set); | |
| extern char *strxcat _VARARGS((char *dst,const char *src, ...)); | | extern char *strxcat _VARARGS((char *dst,const char *src, ...)); | |
| extern char *strxmov _VARARGS((char *dst,const char *src, ...)); | | extern char *strxmov _VARARGS((char *dst,const char *src, ...)); | |
| extern char *strxcpy _VARARGS((char *dst,const char *src, ...)); | | extern char *strxcpy _VARARGS((char *dst,const char *src, ...)); | |
| extern char *strxncat _VARARGS((char *dst,size_t len, const char *src, ...)
); | | extern char *strxncat _VARARGS((char *dst,size_t len, const char *src, ...)
); | |
| extern char *strxnmov _VARARGS((char *dst,size_t len, const char *src, ...)
); | | extern char *strxnmov _VARARGS((char *dst,size_t len, const char *src, ...)
); | |
| extern char *strxncpy _VARARGS((char *dst,size_t len, const char *src, ...)
); | | extern char *strxncpy _VARARGS((char *dst,size_t len, const char *src, ...)
); | |
| | | | |
| skipping to change at line 184 | | skipping to change at line 205 | |
| #ifndef HAVE_STRSTR | | #ifndef HAVE_STRSTR | |
| extern char *strstr(const char *, const char *); | | extern char *strstr(const char *, const char *); | |
| #endif | | #endif | |
| #endif | | #endif | |
| extern int is_prefix(const char *, const char *); | | extern int is_prefix(const char *, const char *); | |
| | | | |
| /* Conversion routines */ | | /* Conversion routines */ | |
| double my_strtod(const char *str, char **end, int *error); | | double my_strtod(const char *str, char **end, int *error); | |
| double my_atof(const char *nptr); | | double my_atof(const char *nptr); | |
| | | | |
|
| #ifndef NOT_FIXED_DEC | | | |
| #define NOT_FIXED_DEC 31 | | | |
| #endif | | | |
| | | | |
| /* | | | |
| Max length of a floating point number. | | | |
| */ | | | |
| #define FLOATING_POINT_BUFFER (311 + NOT_FIXED_DEC) | | | |
| | | | |
| extern char *llstr(longlong value,char *buff); | | extern char *llstr(longlong value,char *buff); | |
| extern char *ullstr(longlong value,char *buff); | | extern char *ullstr(longlong value,char *buff); | |
| #ifndef HAVE_STRTOUL | | #ifndef HAVE_STRTOUL | |
| extern long strtol(const char *str, char **ptr, int base); | | extern long strtol(const char *str, char **ptr, int base); | |
| extern ulong strtoul(const char *str, char **ptr, int base); | | extern ulong strtoul(const char *str, char **ptr, int base); | |
| #endif | | #endif | |
| | | | |
| extern char *int2str(long val, char *dst, int radix, int upcase); | | extern char *int2str(long val, char *dst, int radix, int upcase); | |
| extern char *int10_to_str(long val,char *dst,int radix); | | extern char *int10_to_str(long val,char *dst,int radix); | |
| extern char *str2int(const char *src,int radix,long lower,long upper, | | extern char *str2int(const char *src,int radix,long lower,long upper, | |
| | | | |
| skipping to change at line 241 | | skipping to change at line 253 | |
| const char *format, va_list ap); | | const char *format, va_list ap); | |
| extern size_t my_snprintf(char *to, size_t n, const char *fmt, ...) | | extern size_t my_snprintf(char *to, size_t n, const char *fmt, ...) | |
| ATTRIBUTE_FORMAT(printf, 3, 4); | | ATTRIBUTE_FORMAT(printf, 3, 4); | |
| | | | |
| #if defined(__cplusplus) | | #if defined(__cplusplus) | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| /* | | /* | |
| LEX_STRING -- a pair of a C-string and its length. | | LEX_STRING -- a pair of a C-string and its length. | |
|
| | | (it's part of the plugin API as a MYSQL_LEX_STRING) | |
| */ | | */ | |
| | | | |
|
| #ifndef _my_plugin_h | | #include <mysql/plugin.h> | |
| /* This definition must match the one given in mysql/plugin.h */ | | | |
| struct st_mysql_lex_string | | | |
| { | | | |
| char *str; | | | |
| size_t length; | | | |
| }; | | | |
| #endif | | | |
| typedef struct st_mysql_lex_string LEX_STRING; | | typedef struct st_mysql_lex_string LEX_STRING; | |
| | | | |
| #define STRING_WITH_LEN(X) (X), ((size_t) (sizeof(X) - 1)) | | #define STRING_WITH_LEN(X) (X), ((size_t) (sizeof(X) - 1)) | |
| #define USTRING_WITH_LEN(X) ((uchar*) X), ((size_t) (sizeof(X) - 1)) | | #define USTRING_WITH_LEN(X) ((uchar*) X), ((size_t) (sizeof(X) - 1)) | |
| #define C_STRING_WITH_LEN(X) ((char *) (X)), ((size_t) (sizeof(X) - 1)) | | #define C_STRING_WITH_LEN(X) ((char *) (X)), ((size_t) (sizeof(X) - 1)) | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 13 change blocks. |
| 37 lines changed or deleted | | 38 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. */ | |
|
| /* include/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 */ | | | |
| #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 */ | |
| #define DBUG_OFF 1 | | #define DBUG_OFF 1 | |
| | | | |
| skipping to change at line 58 | | skipping to change at line 55 | |
| | | | |
| /* 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 to 1 if you have the `abi::__cxa_demangle' function. */ | |
| #define HAVE_ABI_CXA_DEMANGLE 1 | | #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 | |
| | | | |
| /* 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 | |
| | | | |
|
| /* Define to 1 if you have the `atomic_add_long_nv' function. */ | | /* Define to 1 if you have the `atomic_add_long' function. */ | |
| /* #undef HAVE_ATOMIC_ADD_LONG_NV */ | | /* #undef HAVE_ATOMIC_ADD_LONG */ | |
| | | | |
| /* Define to 1 if you have the `atomic_cas_32' function. */ | | /* Define to 1 if you have the `atomic_cas_32' function. */ | |
| /* #undef HAVE_ATOMIC_CAS_32 */ | | /* #undef HAVE_ATOMIC_CAS_32 */ | |
| | | | |
| /* Define to 1 if you have the `atomic_cas_64' function. */ | | /* Define to 1 if you have the `atomic_cas_64' function. */ | |
| /* #undef HAVE_ATOMIC_CAS_64 */ | | /* #undef HAVE_ATOMIC_CAS_64 */ | |
| | | | |
| /* Define to 1 if you have the `atomic_cas_ulong' function. */ | | /* Define to 1 if you have the `atomic_cas_ulong' function. */ | |
| /* #undef HAVE_ATOMIC_CAS_ULONG */ | | /* #undef HAVE_ATOMIC_CAS_ULONG */ | |
| | | | |
|
| /* Define to 1 if you have the `atomic_swap_uchar' function. */ | | | |
| /* #undef HAVE_ATOMIC_SWAP_UCHAR */ | | | |
| | | | |
| /* Define to 1 if you have the `backtrace' function. */ | | /* Define to 1 if you have the `backtrace' function. */ | |
| #define HAVE_BACKTRACE 1 | | #define HAVE_BACKTRACE 1 | |
| | | | |
| /* Define to 1 if you have the `backtrace_symbols' function. */ | | /* Define to 1 if you have the `backtrace_symbols' function. */ | |
| #define HAVE_BACKTRACE_SYMBOLS 1 | | #define HAVE_BACKTRACE_SYMBOLS 1 | |
| | | | |
| /* Define to 1 if you have the `backtrace_symbols_fd' function. */ | | /* Define to 1 if you have the `backtrace_symbols_fd' function. */ | |
| #define HAVE_BACKTRACE_SYMBOLS_FD 1 | | #define HAVE_BACKTRACE_SYMBOLS_FD 1 | |
| | | | |
|
| | | /* Define to 1 if you have the `bcmp' function. */ | |
| | | #define HAVE_BCMP 1 | |
| | | | |
| /* Define to 1 if you have the `bfill' function. */ | | /* Define to 1 if you have the `bfill' function. */ | |
| /* #undef HAVE_BFILL */ | | /* #undef HAVE_BFILL */ | |
| | | | |
| /* 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 */ | |
| | | | |
| skipping to change at line 257 | | skipping to change at line 251 | |
| | | | |
| /* 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 to 1 if you have the <cxxabi.h> header file. */ | |
| #define HAVE_CXXABI_H 1 | | #define HAVE_CXXABI_H 1 | |
| | | | |
|
| /* Define to 1 if you have the declaration of `bzero', and to 0 if you don' | | | |
| t. | | | |
| */ | | | |
| #define HAVE_DECL_BZERO 1 | | | |
| | | | |
| /* Define to 1 if you have the declaration of `fdatasync', and to 0 if you | | | |
| don't. */ | | | |
| #define HAVE_DECL_FDATASYNC 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 `MHA_MAPSIZE_VA', and to 0 if | |
| | | you don't. */ | |
| | | /* #undef HAVE_DECL_MHA_MAPSIZE_VA */ | |
| | | | |
| /* 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. | |
| */ | | */ | |
| #define HAVE_DECL_TGOTO 1 | | #define HAVE_DECL_TGOTO 1 | |
| | | | |
| /* Whether we are using DEC threads */ | | /* Whether we are using DEC threads */ | |
| /* #undef HAVE_DEC_THREADS */ | | /* #undef HAVE_DEC_THREADS */ | |
| | | | |
| skipping to change at line 295 | | skipping to change at line 285 | |
| | | | |
| /* Define to 1 if you have the <dlfcn.h> header file. */ | | /* Define to 1 if you have the <dlfcn.h> header file. */ | |
| #define HAVE_DLFCN_H 1 | | #define HAVE_DLFCN_H 1 | |
| | | | |
| /* 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 */ | |
| | | | |
|
| | | /* Defined to 1 if DTrace support is enabled */ | |
| | | /* #undef HAVE_DTRACE */ | |
| | | | |
| /* Access checks in embedded library */ | | /* Access checks in embedded library */ | |
| /* #undef HAVE_EMBEDDED_PRIVILEGE_CONTROL */ | | /* #undef HAVE_EMBEDDED_PRIVILEGE_CONTROL */ | |
| | | | |
| /* Define to 1 if you have the <execinfo.h> header file. */ | | /* Define to 1 if you have the <execinfo.h> header file. */ | |
| #define HAVE_EXECINFO_H 1 | | #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 | |
| | | | |
|
| | | /* Does x86 NOP instruction exist */ | |
| | | /* #undef HAVE_FAKE_PAUSE_INSTRUCTION */ | |
| | | | |
| /* 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 1 if you have the `fedisableexcept' function. */ | | | |
| #define HAVE_FEDISABLEEXCEPT 1 | | | |
| | | | |
| /* 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 349 | | skipping to change at line 342 | |
| | | | |
| /* 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 */ | |
| | | | |
|
| /* Define to 1 if you have the <fpu_control.h> header file. */ | | | |
| #define HAVE_FPU_CONTROL_H 1 | | | |
| | | | |
| /* Define to 1 if the system has the type `fp_except'. */ | | /* 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 to 1 if compiler provides atomic builtins. */ | |
| #define HAVE_GCC_ATOMIC_BUILTINS 1 | | #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 `getegid' function. */ | | | |
| #define HAVE_GETEGID 1 | | | |
| | | | |
| /* Define to 1 if you have the `geteuid' function. */ | | | |
| #define HAVE_GETEUID 1 | | | |
| | | | |
| /* Define to 1 if you have the `getgid' function. */ | | | |
| #define HAVE_GETGID 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 | |
| | | | |
| | | | |
| skipping to change at line 419 | | skipping to change at line 400 | |
| | | | |
| /* getpwent() declaration present */ | | /* getpwent() declaration present */ | |
| /* #undef HAVE_GETPW_DECLS */ | | /* #undef HAVE_GETPW_DECLS */ | |
| | | | |
| /* Define to 1 if you have the `getrlimit' function. */ | | /* Define to 1 if you have the `getrlimit' function. */ | |
| #define HAVE_GETRLIMIT 1 | | #define HAVE_GETRLIMIT 1 | |
| | | | |
| /* Define to 1 if you have the `getrusage' function. */ | | /* Define to 1 if you have the `getrusage' function. */ | |
| #define HAVE_GETRUSAGE 1 | | #define HAVE_GETRUSAGE 1 | |
| | | | |
|
| /* Define to 1 if you have the `getuid' function. */ | | | |
| #define HAVE_GETUID 1 | | | |
| | | | |
| /* Define to 1 if you have the `getwd' function. */ | | /* Define to 1 if you have the `getwd' function. */ | |
| #define HAVE_GETWD 1 | | #define HAVE_GETWD 1 | |
| | | | |
| /* Define to 1 if you have the `gmtime_r' function. */ | | /* Define 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 */ | |
| | | | |
| skipping to change at line 503 | | skipping to change at line 481 | |
| | | | |
| /* 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 if you have large page option */ | |
| | | #define HAVE_LARGE_PAGE_OPTION 1 | |
| | | | |
| /* 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 `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). */ | |
| | | | |
| skipping to change at line 602 | | skipping to change at line 583 | |
| | | | |
| /* Define to 1 if you have the `mmap64' function. */ | | /* Define to 1 if you have the `mmap64' function. */ | |
| #define HAVE_MMAP64 1 | | #define HAVE_MMAP64 1 | |
| | | | |
| /* Define to 1 if you have the <ndir.h> header file. */ | | /* 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 | |
| | | | |
|
| | | /* Define to 1 if you have the `nl_langinfo' function. */ | |
| | | #define HAVE_NL_LANGINFO 1 | |
| | | | |
| /* For some non posix threads */ | | /* For some non posix threads */ | |
| /* #undef HAVE_NONPOSIX_PTHREAD_GETSPECIFIC */ | | /* #undef HAVE_NONPOSIX_PTHREAD_GETSPECIFIC */ | |
| | | | |
| /* For some non posix threads */ | | /* For some non posix threads */ | |
| /* #undef HAVE_NONPOSIX_PTHREAD_MUTEX_INIT */ | | /* #undef HAVE_NONPOSIX_PTHREAD_MUTEX_INIT */ | |
| | | | |
| /* sigwait with one argument */ | | /* sigwait with one argument */ | |
| /* #undef HAVE_NONPOSIX_SIGWAIT */ | | /* #undef HAVE_NONPOSIX_SIGWAIT */ | |
| | | | |
| /* NPTL threads implementation */ | | /* NPTL threads implementation */ | |
| | | | |
| skipping to change at line 623 | | skipping to change at line 607 | |
| | | | |
| /* 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 | |
| | | | |
| /* OpenSSL */ | | /* 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 | |
| | | | |
|
| | | /* Does x86 PAUSE instruction exist */ | |
| | | #define HAVE_PAUSE_INSTRUCTION 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. */ | | /* Define to 1 if you have the `port_create' function. */ | |
| /* #undef HAVE_PORT_CREATE */ | | /* #undef HAVE_PORT_CREATE */ | |
| | | | |
| /* Define to 1 if you have the <port.h> header file. */ | | /* Define to 1 if you have the <port.h> header file. */ | |
| | | | |
| skipping to change at line 644 | | skipping to change at line 631 | |
| | | | |
| /* Define to 1 if you have the `posix_fallocate' function. */ | | /* Define to 1 if you have the `posix_fallocate' function. */ | |
| #define HAVE_POSIX_FALLOCATE 1 | | #define HAVE_POSIX_FALLOCATE 1 | |
| | | | |
| /* Signal handling is POSIX (sigset/sighold, etc) */ | | /* 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 `printstack' function. */ | | | |
| /* #undef HAVE_PRINTSTACK */ | | | |
| | | | |
| /* 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. */ | |
| #define HAVE_PTHREAD_ATTR_GETSTACKSIZE 1 | | #define HAVE_PTHREAD_ATTR_GETSTACKSIZE 1 | |
| | | | |
| /* Define to 1 if you have the `pthread_attr_setprio' function. */ | | /* Define to 1 if you have the `pthread_attr_setprio' function. */ | |
| /* #undef HAVE_PTHREAD_ATTR_SETPRIO */ | | /* #undef HAVE_PTHREAD_ATTR_SETPRIO */ | |
| | | | |
| /* Define to 1 if you have the `pthread_attr_setschedparam' function. */ | | /* Define to 1 if you have the `pthread_attr_setschedparam' function. */ | |
| | | | |
| skipping to change at line 813 | | skipping to change at line 797 | |
| | | | |
| /* Define to 1 if you have the `sleep' function. */ | | /* Define to 1 if you have the `sleep' function. */ | |
| #define HAVE_SLEEP 1 | | #define HAVE_SLEEP 1 | |
| | | | |
| /* Define to 1 if you have the `snprintf' function. */ | | /* Define 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 | |
| | | | |
|
| | | /* Define to 1 if OS provides atomic_* functions like Solaris. */ | |
| | | /* #undef HAVE_SOLARIS_ATOMIC */ | |
| | | | |
| | | /* Define to 1 if you have large pages support */ | |
| | | /* #undef HAVE_SOLARIS_LARGE_PAGES */ | |
| | | | |
| /* 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 */ | |
| | | | |
| /* Spatial extentions */ | | /* Spatial extentions */ | |
| #define HAVE_SPATIAL 1 | | #define HAVE_SPATIAL 1 | |
| | | | |
| /* Define to 1 if you have the <stdarg.h> header file. */ | | /* Define to 1 if you have the <stdarg.h> header file. */ | |
| #define HAVE_STDARG_H 1 | | #define HAVE_STDARG_H 1 | |
| | | | |
| | | | |
| skipping to change at line 1052 | | skipping to change at line 1042 | |
| | | | |
| /* Define to 1 if you have the <utime.h> header file. */ | | /* Define to 1 if you have the <utime.h> header file. */ | |
| #define HAVE_UTIME_H 1 | | #define HAVE_UTIME_H 1 | |
| | | | |
| /* Define to 1 if `utime(file, NULL)' sets file's timestamp to the present.
*/ | | /* Define to 1 if `utime(file, NULL)' sets file's timestamp to the present.
*/ | |
| #define HAVE_UTIME_NULL 1 | | #define HAVE_UTIME_NULL 1 | |
| | | | |
| /* Define to 1 if the system has the type `u_int32_t'. */ | | /* Define to 1 if the system has the type `u_int32_t'. */ | |
| #define HAVE_U_INT32_T 1 | | #define HAVE_U_INT32_T 1 | |
| | | | |
|
| /* Define for Valgrind support */ | | | |
| /* #undef HAVE_VALGRIND */ | | | |
| | | | |
| /* Define to 1 if you have the <valgrind/memcheck.h> header file. */ | | | |
| /* #undef HAVE_VALGRIND_MEMCHECK_H */ | | | |
| | | | |
| /* Define to 1 if you have the <valgrind/valgrind.h> header file. */ | | | |
| /* #undef HAVE_VALGRIND_VALGRIND_H */ | | | |
| | | | |
| /* Define to 1 if you have the <varargs.h> header file. */ | | /* Define to 1 if you have the <varargs.h> header file. */ | |
| /* #undef HAVE_VARARGS_H */ | | /* #undef HAVE_VARARGS_H */ | |
| | | | |
| /* Define to 1 if you have the `vidattr' function. */ | | /* Define to 1 if you have the `vidattr' function. */ | |
| /* #undef HAVE_VIDATTR */ | | /* #undef HAVE_VIDATTR */ | |
| | | | |
| /* Define to enable buffered read. This works only if syscalls read/recv | | /* Define to enable buffered read. This works only if syscalls read/recv | |
| return as soon as there is some data in the kernel buffer, no matter how | | return as soon as there is some data in the kernel buffer, no matter how | |
| big the given buffer is. */ | | big the given buffer is. */ | |
| #define HAVE_VIO_READ_BUFF 1 | | #define HAVE_VIO_READ_BUFF 1 | |
| | | | |
| skipping to change at line 1112 | | skipping to change at line 1093 | |
| /* Define if you have wcwidth */ | | /* Define if you have wcwidth */ | |
| #define HAVE_WCWIDTH /**/ | | #define HAVE_WCWIDTH /**/ | |
| | | | |
| /* Define to 1 if compiler supports weak symbol attribute. */ | | /* Define to 1 if compiler supports weak symbol attribute. */ | |
| #define HAVE_WEAK_SYMBOL 1 | | #define HAVE_WEAK_SYMBOL 1 | |
| | | | |
| /* systems should define this type here */ | | /* systems should define this type here */ | |
| #define HAVE_WINT_T 1 | | #define HAVE_WINT_T 1 | |
| | | | |
| /* Define to 1 if you have the <xfs/xfs.h> header file. */ | | /* Define to 1 if you have the <xfs/xfs.h> header file. */ | |
|
| #define HAVE_XFS_XFS_H 1 | | /* #undef HAVE_XFS_XFS_H */ | |
| | | | |
| /* Defined by configure. Using yaSSL for SSL. */ | | /* 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 */ | |
| | | | |
| | | | |
| skipping to change at line 1173 | | skipping to change at line 1154 | |
| /* NDB status version */ | | /* NDB status version */ | |
| /* #undef 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 "MySQL Server" | | #define PACKAGE_NAME "" | |
| | | | |
| /* Define to the full name and version of this package. */ | | /* Define to the full name and version of this package. */ | |
|
| #define PACKAGE_STRING "MySQL Server 5.1.73" | | #define PACKAGE_STRING "" | |
| | | | |
| /* Define to the one symbol short name of this package. */ | | /* Define to the one symbol short name of this package. */ | |
|
| #define PACKAGE_TARNAME "mysql" | | #define PACKAGE_TARNAME "" | |
| | | | |
| /* Define to the version of this package. */ | | /* Define to the version of this package. */ | |
|
| #define PACKAGE_VERSION "5.1.73" | | #define PACKAGE_VERSION "" | |
| | | | |
| /* mysql client protocol version */ | | /* mysql client protocol version */ | |
| #define PROTOCOL_VERSION 10 | | #define PROTOCOL_VERSION 10 | |
| | | | |
| /* qsort returns void */ | | /* qsort returns void */ | |
| #define QSORT_TYPE_IS_VOID 1 | | #define QSORT_TYPE_IS_VOID 1 | |
| | | | |
| /* The return type of qsort (int or void). */ | | /* The return type of qsort (int or void). */ | |
| #define RETQSORTTYPE void | | #define RETQSORTTYPE void | |
| | | | |
| | | | |
| skipping to change at line 1220 | | skipping to change at line 1201 | |
| | | | |
| /* The size of `off_t', as computed by sizeof. */ | | /* 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. */ | | /* The size of `pthread_t', as computed by sizeof. */ | |
| #define SIZEOF_PTHREAD_T 4 | | #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 `time_t', as computed by sizeof. */ | | | |
| #define SIZEOF_TIME_T 4 | | | |
| | | | |
| /* The size of `void*', as computed by sizeof. */ | | /* The size of `void*', as computed by sizeof. */ | |
| #define SIZEOF_VOIDP 4 | | #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 */ | |
| | | /* #undef SPRINTF_RETURNS_GARBAGE */ | |
| | | | |
| | | /* POSIX sprintf */ | |
| | | #define SPRINTF_RETURNS_INT 1 | |
| | | | |
| | | /* Broken sprintf */ | |
| | | /* #undef SPRINTF_RETURNS_PTR */ | |
| | | | |
| /* If using the C implementation of alloca, define if you know the | | /* If using the C implementation of alloca, define if you know the | |
| direction of stack growth for your system; otherwise it will be | | direction of stack growth for your system; otherwise it will be | |
| automatically deduced at runtime. | | automatically deduced at runtime. | |
| STACK_DIRECTION > 0 => grows toward higher addresses | | STACK_DIRECTION > 0 => grows toward higher addresses | |
| STACK_DIRECTION < 0 => grows toward lower addresses | | STACK_DIRECTION < 0 => grows toward lower addresses | |
| STACK_DIRECTION = 0 => direction of growth unknown */ | | STACK_DIRECTION = 0 => direction of growth unknown */ | |
| #define STACK_DIRECTION -1 | | #define STACK_DIRECTION -1 | |
| | | | |
| /* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly.
*/ | | /* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly.
*/ | |
| /* #undef STAT_MACROS_BROKEN */ | | /* #undef STAT_MACROS_BROKEN */ | |
| | | | |
| skipping to change at line 1297 | | skipping to change at line 1284 | |
| /* */ | | /* */ | |
| #define USE_MB_IDENT 1 | | #define USE_MB_IDENT 1 | |
| | | | |
| /* Needs to use mysys_new helpers */ | | /* Needs to use mysys_new helpers */ | |
| /* #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 */ | |
| | | /* #undef USE_PSTACK */ | |
| | | | |
| /* Version number of package */ | | /* Version number of package */ | |
|
| #define VERSION "5.1.73" | | #define VERSION "5.5.0-m2" | |
| | | | |
| /* sighandler type is void (*signal ()) (); */ | | /* sighandler type is void (*signal ()) (); */ | |
| #define VOID_SIGHANDLER 1 | | #define VOID_SIGHANDLER 1 | |
| | | | |
| /* Include Archive Storage Engine into mysqld */ | | /* Include Archive Storage Engine into mysqld */ | |
| /* #undef WITH_ARCHIVE_STORAGE_ENGINE */ | | /* #undef WITH_ARCHIVE_STORAGE_ENGINE */ | |
| | | | |
| /* Include Basic Write-only Read-never tables into mysqld */ | | /* Include Basic Write-only Read-never tables into mysqld */ | |
| /* #undef WITH_BLACKHOLE_STORAGE_ENGINE */ | | /* #undef WITH_BLACKHOLE_STORAGE_ENGINE */ | |
| | | | |
| | | | |
| skipping to change at line 1321 | | skipping to change at line 1311 | |
| | | | |
| /* Include Example for Storage Engines for developers into mysqld */ | | /* Include Example for Storage Engines for developers into mysqld */ | |
| /* #undef WITH_EXAMPLE_STORAGE_ENGINE */ | | /* #undef WITH_EXAMPLE_STORAGE_ENGINE */ | |
| | | | |
| /* Include Connects to tables on remote MySQL servers into mysqld */ | | /* Include Connects to tables on remote MySQL servers into mysqld */ | |
| /* #undef WITH_FEDERATED_STORAGE_ENGINE */ | | /* #undef WITH_FEDERATED_STORAGE_ENGINE */ | |
| | | | |
| /* Include Volatile memory based tables into mysqld */ | | /* Include Volatile memory based tables into mysqld */ | |
| #define WITH_HEAP_STORAGE_ENGINE 1 | | #define WITH_HEAP_STORAGE_ENGINE 1 | |
| | | | |
|
| /* Include Transactional Tables using InnoDB into mysqld */ | | /* Include IBM DB2 for i Storage Engine into mysqld */ | |
| /* #undef WITH_INNOBASE_STORAGE_ENGINE */ | | /* #undef WITH_IBMDB2I_STORAGE_ENGINE */ | |
| | | | |
| /* Include Transactional Tables using InnoDB into mysqld */ | | /* Include Transactional Tables using InnoDB into mysqld */ | |
|
| /* #undef WITH_INNODB_PLUGIN_STORAGE_ENGINE */ | | /* #undef WITH_INNOBASE_STORAGE_ENGINE */ | |
| | | | |
| /* Include Merge multiple MySQL tables into one into mysqld */ | | /* Include Merge multiple MySQL tables into one into mysqld */ | |
| #define WITH_MYISAMMRG_STORAGE_ENGINE 1 | | #define WITH_MYISAMMRG_STORAGE_ENGINE 1 | |
| | | | |
| /* Include Traditional non-transactional MySQL tables into mysqld */ | | /* Include Traditional non-transactional MySQL tables into mysqld */ | |
| #define WITH_MYISAM_STORAGE_ENGINE 1 | | #define WITH_MYISAM_STORAGE_ENGINE 1 | |
| | | | |
| /* Include High Availability Clustered tables into mysqld */ | | /* Include High Availability Clustered tables into mysqld */ | |
| /* #undef WITH_NDBCLUSTER_STORAGE_ENGINE */ | | /* #undef WITH_NDBCLUSTER_STORAGE_ENGINE */ | |
| | | | |
| | | | |
End of changes. 31 change blocks. |
| 63 lines changed or deleted | | 52 lines changed or added | |
|
| my_dbug.h | | my_dbug.h | |
|
| /* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reser
ved. | | /* Copyright (C) 2000 MySQL AB | |
| | | | |
| This program is free software; you can redistribute it and/or modify | | This program is free software; you can redistribute it and/or modify | |
| it under the terms of the GNU General Public License as published by | | it under the terms of the GNU General Public License as published by | |
| the Free Software Foundation; version 2 of the License. | | the Free Software Foundation; version 2 of the License. | |
| | | | |
| This program is distributed in the hope that it will be useful, | | This program is distributed in the hope that it will be useful, | |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| GNU General Public License for more details. | | GNU General Public License for more details. | |
| | | | |
| You should have received a copy of the GNU General Public License | | You should have received a copy of the GNU General Public License | |
| along with this program; if not, write to the Free Software | | along with this program; if not, write to the Free Software | |
|
| Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 US | | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US | |
| A | | A */ | |
| */ | | | |
| | | | |
|
| #ifndef MY_DBUG_INCLUDED | | #ifndef _dbug_h | |
| #define MY_DBUG_INCLUDED | | #define _dbug_h | |
| | | | |
|
| #ifndef __WIN__ | | #ifdef __cplusplus | |
| #ifdef HAVE_SYS_TYPES_H | | extern "C" { | |
| #include <sys/types.h> | | | |
| #endif | | | |
| #ifdef HAVE_UNISTD_H | | | |
| #include <unistd.h> | | | |
| #endif | | #endif | |
|
| #include <signal.h> | | #if !defined(DBUG_OFF) && !defined(_lint) | |
| #endif /* not __WIN__ */ | | | |
| | | | |
| #if defined(__cplusplus) && !defined(DBUG_OFF) | | | |
| class Dbug_violation_helper | | | |
| { | | | |
| public: | | | |
| inline Dbug_violation_helper() : | | | |
| _entered(TRUE) | | | |
| { } | | | |
| | | | |
| inline ~Dbug_violation_helper() | | | |
| { | | | |
| assert(!_entered); | | | |
| } | | | |
| | | | |
| inline void leave() | | | |
| { | | | |
| _entered= FALSE; | | | |
| } | | | |
| | | | |
|
| private: | | struct _db_stack_frame_ { | |
| bool _entered; | | const char *func; /* function name of the previous stack frame | |
| | | */ | |
| | | const char *file; /* filename of the function of previous frame | |
| | | */ | |
| | | uint level; /* this nesting level, highest bit enables tracing | |
| | | */ | |
| | | struct _db_stack_frame_ *prev; /* pointer to the previous frame */ | |
| }; | | }; | |
|
| #endif /* C++ */ | | | |
| | | | |
|
| #ifdef __cplusplus | | struct _db_code_state_; | |
| extern "C" { | | extern my_bool _dbug_on_; | |
| #endif | | extern my_bool _db_keyword_(struct _db_code_state_ *, const char *, int); | |
| #if !defined(DBUG_OFF) && !defined(_lint) | | | |
| struct _db_code_state_; | | | |
| extern int _db_keyword_(struct _db_code_state_ *cs, const char *keyword); | | | |
| extern int _db_strict_keyword_(const char *keyword); | | | |
| extern int _db_explain_(struct _db_code_state_ *cs, char *buf, size_t len)
; | | extern int _db_explain_(struct _db_code_state_ *cs, char *buf, size_t len)
; | |
| extern int _db_explain_init_(char *buf, size_t len); | | extern int _db_explain_init_(char *buf, size_t len); | |
|
| extern void _db_setjmp_(void); | | extern int _db_is_pushed_(void); | |
| extern void _db_longjmp_(void); | | extern void _db_setjmp_(void); | |
| | | extern void _db_longjmp_(void); | |
| extern void _db_process_(const char *name); | | extern void _db_process_(const char *name); | |
|
| extern void _db_push_(const char *control); | | extern void _db_push_(const char *control); | |
| extern void _db_pop_(void); | | extern void _db_pop_(void); | |
| extern void _db_set_(struct _db_code_state_ *cs, const char *control); | | extern void _db_set_(const char *control); | |
| extern void _db_set_init_(const char *control); | | extern void _db_set_init_(const char *control); | |
|
| extern void _db_enter_(const char *_func_,const char *_file_,uint _line_, | | extern void _db_enter_(const char *_func_, const char *_file_, uint _line_, | |
| const char **_sfunc_,const char **_sfile_, | | struct _db_stack_frame_ *_stack_frame_); | |
| uint *_slevel_, char ***); | | extern void _db_return_(uint _line_, struct _db_stack_frame_ *_stack_frame | |
| extern void _db_return_(uint _line_,const char **_sfunc_,const char **_sfil | | _); | |
| e_, | | extern void _db_pargs_(uint _line_,const char *keyword); | |
| uint *_slevel_); | | extern void _db_doprnt_ _VARARGS((const char *format,...)) | |
| extern void _db_pargs_(uint _line_,const char *keyword); | | | |
| extern void _db_doprnt_ _VARARGS((const char *format,...)) | | | |
| ATTRIBUTE_FORMAT(printf, 1, 2); | | ATTRIBUTE_FORMAT(printf, 1, 2); | |
|
| extern void _db_dump_(uint _line_,const char *keyword, | | extern void _db_dump_(uint _line_,const char *keyword, | |
| const unsigned char *memory, size_t length); | | const unsigned char *memory, size_t length); | |
|
| extern void _db_end_(void); | | extern void _db_end_(void); | |
| extern void _db_lock_file_(void); | | extern void _db_lock_file_(void); | |
| extern void _db_unlock_file_(void); | | extern void _db_unlock_file_(void); | |
| extern FILE *_db_fp_(void); | | extern FILE *_db_fp_(void); | |
| extern void _db_flush_(); | | extern void _db_flush_(); | |
|
| | | extern const char* _db_get_func_(void); | |
| | | | |
|
| #ifdef __cplusplus | | #define DBUG_ENTER(a) struct _db_stack_frame_ _db_stack_frame_; \ | |
| | | _db_enter_ (a,__FILE__,__LINE__,&_db_stack_frame_) | |
| #define DBUG_ENTER(a) \ | | #define DBUG_LEAVE _db_return_ (__LINE__, &_db_stack_frame_) | |
| const char *_db_func_, *_db_file_; \ | | | |
| uint _db_level_; \ | | | |
| char **_db_framep_; \ | | | |
| Dbug_violation_helper dbug_violation_helper; \ | | | |
| _db_enter_ (a, __FILE__, __LINE__, &_db_func_, &_db_file_, \ | | | |
| &_db_level_, &_db_framep_) | | | |
| #define DBUG_VIOLATION_HELPER_LEAVE dbug_violation_helper.leave() | | | |
| | | | |
| #else /* C */ | | | |
| | | | |
| #define DBUG_ENTER(a) \ | | | |
| const char *_db_func_, *_db_file_; \ | | | |
| uint _db_level_; \ | | | |
| char **_db_framep_; \ | | | |
| _db_enter_ (a, __FILE__, __LINE__, &_db_func_, &_db_file_, \ | | | |
| &_db_level_, &_db_framep_) | | | |
| #define DBUG_VIOLATION_HELPER_LEAVE do { } while(0) | | | |
| | | | |
| #endif /* C++ */ | | | |
| | | | |
| #define DBUG_LEAVE \ | | | |
| DBUG_VIOLATION_HELPER_LEAVE; \ | | | |
| _db_return_ (__LINE__, &_db_func_, &_db_file_, &_db_level_) | | | |
| #define DBUG_RETURN(a1) do {DBUG_LEAVE; return(a1);} while(0) | | #define DBUG_RETURN(a1) do {DBUG_LEAVE; return(a1);} while(0) | |
| #define DBUG_VOID_RETURN do {DBUG_LEAVE; return;} while(0) | | #define DBUG_VOID_RETURN do {DBUG_LEAVE; return;} while(0) | |
| #define DBUG_EXECUTE(keyword,a1) \ | | #define DBUG_EXECUTE(keyword,a1) \ | |
|
| do {if (_db_keyword_(0, (keyword))) { a1 }} while(0) | | do {if (_db_keyword_(0, (keyword), 0)) { a1 }} while(0) | |
| #define DBUG_EXECUTE_IF(keyword,a1) \ | | #define DBUG_EXECUTE_IF(keyword,a1) \ | |
|
| do {if (_db_strict_keyword_ (keyword)) { a1 } } while(0) | | do {if (_db_keyword_(0, (keyword), 1)) { a1 }} while(0) | |
| #define DBUG_EVALUATE(keyword,a1,a2) \ | | #define DBUG_EVALUATE(keyword,a1,a2) \ | |
|
| (_db_keyword_(0,(keyword)) ? (a1) : (a2)) | | (_db_keyword_(0,(keyword), 0) ? (a1) : (a2)) | |
| #define DBUG_EVALUATE_IF(keyword,a1,a2) \ | | #define DBUG_EVALUATE_IF(keyword,a1,a2) \ | |
|
| (_db_strict_keyword_((keyword)) ? (a1) : (a2)) | | (_db_keyword_(0,(keyword), 1) ? (a1) : (a2)) | |
| #define DBUG_PRINT(keyword,arglist) \ | | #define DBUG_PRINT(keyword,arglist) \ | |
| do {_db_pargs_(__LINE__,keyword); _db_doprnt_ arglist;} while(0) | | do {_db_pargs_(__LINE__,keyword); _db_doprnt_ arglist;} while(0) | |
| #define DBUG_PUSH(a1) _db_push_ (a1) | | #define DBUG_PUSH(a1) _db_push_ (a1) | |
| #define DBUG_POP() _db_pop_ () | | #define DBUG_POP() _db_pop_ () | |
|
| #define DBUG_SET(a1) _db_set_ (0, (a1)) | | #define DBUG_SET(a1) _db_set_ (a1) | |
| #define DBUG_SET_INITIAL(a1) _db_set_init_ (a1) | | #define DBUG_SET_INITIAL(a1) _db_set_init_ (a1) | |
| #define DBUG_PROCESS(a1) _db_process_(a1) | | #define DBUG_PROCESS(a1) _db_process_(a1) | |
| #define DBUG_FILE _db_fp_() | | #define DBUG_FILE _db_fp_() | |
| #define DBUG_SETJMP(a1) (_db_setjmp_ (), setjmp (a1)) | | #define DBUG_SETJMP(a1) (_db_setjmp_ (), setjmp (a1)) | |
| #define DBUG_LONGJMP(a1,a2) (_db_longjmp_ (), longjmp (a1, a2)) | | #define DBUG_LONGJMP(a1,a2) (_db_longjmp_ (), longjmp (a1, a2)) | |
| #define DBUG_DUMP(keyword,a1,a2) _db_dump_(__LINE__,keyword,a1,a2) | | #define DBUG_DUMP(keyword,a1,a2) _db_dump_(__LINE__,keyword,a1,a2) | |
| #define DBUG_END() _db_end_ () | | #define DBUG_END() _db_end_ () | |
| #define DBUG_LOCK_FILE _db_lock_file_() | | #define DBUG_LOCK_FILE _db_lock_file_() | |
| #define DBUG_UNLOCK_FILE _db_unlock_file_() | | #define DBUG_UNLOCK_FILE _db_unlock_file_() | |
| #define DBUG_ASSERT(A) assert(A) | | #define DBUG_ASSERT(A) assert(A) | |
| #define DBUG_EXPLAIN(buf,len) _db_explain_(0, (buf),(len)) | | #define DBUG_EXPLAIN(buf,len) _db_explain_(0, (buf),(len)) | |
| #define DBUG_EXPLAIN_INITIAL(buf,len) _db_explain_init_((buf),(len)) | | #define DBUG_EXPLAIN_INITIAL(buf,len) _db_explain_init_((buf),(len)) | |
|
| #define IF_DBUG(A) A | | #define DEBUGGER_OFF do { _dbug_on_= 0; } while(0) | |
| | | #define DEBUGGER_ON do { _dbug_on_= 1; } while(0) | |
| #ifndef __WIN__ | | #ifndef __WIN__ | |
| #define DBUG_ABORT() (_db_flush_(), abort()) | | #define DBUG_ABORT() (_db_flush_(), abort()) | |
| #else | | #else | |
| /* | | /* | |
| Avoid popup with abort/retry/ignore buttons. When BUG#31745 is fixed we c
an | | Avoid popup with abort/retry/ignore buttons. When BUG#31745 is fixed we c
an | |
| call abort() instead of _exit(3) (now it would cause a "test signal" popu
p). | | call abort() instead of _exit(3) (now it would cause a "test signal" popu
p). | |
| */ | | */ | |
| #include <crtdbg.h> | | #include <crtdbg.h> | |
| #define DBUG_ABORT() (_db_flush_(),\ | | #define DBUG_ABORT() (_db_flush_(),\ | |
| (void)_CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE)
,\ | | (void)_CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE)
,\ | |
| (void)_CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDER
R),\ | | (void)_CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDER
R),\ | |
| _exit(3)) | | _exit(3)) | |
| #endif | | #endif | |
|
| | | #define DBUG_CHECK_CRASH(func, op) \ | |
| | | do { char _dbuf_[255]; strxnmov(_dbuf_, sizeof(_dbuf_)-1, (func), (op)); | |
| | | \ | |
| | | DBUG_EXECUTE_IF(_dbuf_, DBUG_ABORT()); } while(0) | |
| | | #define DBUG_CRASH_ENTER(func) \ | |
| | | DBUG_ENTER(func); DBUG_CHECK_CRASH(func, "_crash_enter") | |
| | | #define DBUG_CRASH_RETURN(val) \ | |
| | | DBUG_CHECK_CRASH(_db_get_func_(), "_crash_return") | |
| | | #define DBUG_CRASH_VOID_RETURN \ | |
| | | DBUG_CHECK_CRASH (_db_get_func_(), "_crash_return") | |
| | | | |
|
| /* | | #else /* No debugger */ | |
| Make the program fail, without creating a core file. | | | |
| abort() will send SIGABRT which (most likely) generates core. | | | |
| Use SIGKILL instead, which cannot be caught. | | | |
| We also pause the current thread, until the signal is actually delivered. | | | |
| An alternative would be to use _exit(EXIT_FAILURE), | | | |
| but then valgrind would report lots of memory leaks. | | | |
| */ | | | |
| #ifdef __WIN__ | | | |
| #define DBUG_SUICIDE() DBUG_ABORT() | | | |
| #else | | | |
| extern void _db_suicide_(); | | | |
| #define DBUG_SUICIDE() (_db_flush_(), _db_suicide_()) | | | |
| #endif | | | |
| | | | |
| #else /* No debugger */ | | | |
| | | | |
| #define DBUG_ENTER(a1) | | #define DBUG_ENTER(a1) | |
| #define DBUG_LEAVE | | #define DBUG_LEAVE | |
|
| #define DBUG_VIOLATION_HELPER_LEAVE | | #define DBUG_RETURN(a1) do { return(a1); } while(0) | |
| #define DBUG_RETURN(a1) do { return(a1); } while(0) | | #define DBUG_VOID_RETURN do { return; } while(0) | |
| #define DBUG_VOID_RETURN do { return; } while(0) | | #define DBUG_EXECUTE(keyword,a1) do { } while(0) | |
| #define DBUG_EXECUTE(keyword,a1) do { } while(0) | | #define DBUG_EXECUTE_IF(keyword,a1) do { } while(0) | |
| #define DBUG_EXECUTE_IF(keyword,a1) do { } while(0) | | | |
| #define DBUG_EVALUATE(keyword,a1,a2) (a2) | | #define DBUG_EVALUATE(keyword,a1,a2) (a2) | |
| #define DBUG_EVALUATE_IF(keyword,a1,a2) (a2) | | #define DBUG_EVALUATE_IF(keyword,a1,a2) (a2) | |
|
| #define DBUG_PRINT(keyword,arglist) do { } while(0) | | #define DBUG_PRINT(keyword,arglist) do { } while(0) | |
| #define DBUG_PUSH(a1) | | #define DBUG_PUSH(a1) do { } while(0) | |
| #define DBUG_SET(a1) do { } while(0) | | #define DBUG_SET(a1) do { } while(0) | |
| #define DBUG_SET_INITIAL(a1) do { } while(0) | | #define DBUG_SET_INITIAL(a1) do { } while(0) | |
| #define DBUG_POP() | | #define DBUG_POP() do { } while(0) | |
| #define DBUG_PROCESS(a1) | | #define DBUG_PROCESS(a1) do { } while(0) | |
| #define DBUG_SETJMP(a1) setjmp(a1) | | #define DBUG_SETJMP(a1) setjmp(a1) | |
| #define DBUG_LONGJMP(a1) longjmp(a1) | | #define DBUG_LONGJMP(a1) longjmp(a1) | |
|
| #define DBUG_DUMP(keyword,a1,a2) do { } while(0) | | #define DBUG_DUMP(keyword,a1,a2) do { } while(0) | |
| #define DBUG_END() | | #define DBUG_END() do { } while(0) | |
| #define DBUG_ASSERT(A) do { } while(0) | | #define DBUG_ASSERT(A) do { } while(0) | |
| #define DBUG_LOCK_FILE | | #define DBUG_LOCK_FILE do { } while(0) | |
| #define DBUG_FILE (stderr) | | #define DBUG_FILE (stderr) | |
|
| #define DBUG_UNLOCK_FILE | | #define DBUG_UNLOCK_FILE do { } while(0) | |
| #define DBUG_EXPLAIN(buf,len) | | #define DBUG_EXPLAIN(buf,len) | |
| #define DBUG_EXPLAIN_INITIAL(buf,len) | | #define DBUG_EXPLAIN_INITIAL(buf,len) | |
|
| #define IF_DBUG(A) | | #define DEBUGGER_OFF do { } while(0) | |
| #define DBUG_ABORT() do { } while(0) | | #define DEBUGGER_ON do { } while(0) | |
| #define DBUG_SUICIDE() do { } while(0) | | #define DBUG_ABORT() abort() | |
| | | #define DBUG_CRASH_ENTER(func) | |
| | | #define DBUG_CRASH_RETURN(val) do { return(val); } while(0) | |
| | | #define DBUG_CRASH_VOID_RETURN do { return; } while(0) | |
| | | | |
| #endif | | #endif | |
|
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
|
| | | #endif | |
| #endif /* MY_DBUG_INCLUDED */ | | | |
| | | | |
End of changes. 30 change blocks. |
| 128 lines changed or deleted | | 80 lines changed or added | |
|
| my_getopt.h | | my_getopt.h | |
|
| /* | | /* Copyright (C) 2002-2004 MySQL AB | |
| Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reser | | | |
| ved. | | | |
| | | | |
| This program is free software; you can redistribute it and/or modify | | This program is free software; you can redistribute it and/or modify | |
| it under the terms of the GNU General Public License as published by | | it under the terms of the GNU General Public License as published by | |
| the Free Software Foundation; version 2 of the License. | | the Free Software Foundation; version 2 of the License. | |
| | | | |
| This program is distributed in the hope that it will be useful, | | This program is distributed in the hope that it will be useful, | |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| GNU General Public License for more details. | | GNU General Public License for more details. | |
| | | | |
| You should have received a copy of the GNU General Public License | | You should have received a copy of the GNU General Public License | |
| along with this program; if not, write to the Free Software | | along with this program; if not, write to the Free Software | |
|
| Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 US | | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US | |
| A | | A */ | |
| */ | | | |
| | | | |
| #ifndef _my_getopt_h | | #ifndef _my_getopt_h | |
| #define _my_getopt_h | | #define _my_getopt_h | |
| | | | |
| C_MODE_START | | C_MODE_START | |
| | | | |
| #define GET_NO_ARG 1 | | #define GET_NO_ARG 1 | |
| #define GET_BOOL 2 | | #define GET_BOOL 2 | |
| #define GET_INT 3 | | #define GET_INT 3 | |
| #define GET_UINT 4 | | #define GET_UINT 4 | |
| | | | |
| skipping to change at line 50 | | skipping to change at line 48 | |
| | | | |
| enum get_opt_arg_type { NO_ARG, OPT_ARG, REQUIRED_ARG }; | | enum get_opt_arg_type { NO_ARG, OPT_ARG, REQUIRED_ARG }; | |
| | | | |
| struct st_typelib; | | struct st_typelib; | |
| | | | |
| struct my_option | | struct my_option | |
| { | | { | |
| const char *name; /* Name of the option */ | | const char *name; /* Name of the option */ | |
| int id; /* unique id or short option */ | | int id; /* unique id or short option */ | |
| const char *comment; /* option comment, for autom. --hel
p */ | | const char *comment; /* option comment, for autom. --hel
p */ | |
|
| void *value; /* The variable value */ | | uchar **value; /* The variable value */ | |
| void *u_max_value; /* The user def. max variable value | | uchar **u_max_value; /* The user def. max variable value | |
| */ | | */ | |
| struct st_typelib *typelib; /* Pointer to possible values */ | | struct st_typelib *typelib; /* Pointer to possible values */ | |
|
| ulong var_type; /* Must match the variable type */ | | ulong var_type; | |
| enum get_opt_arg_type arg_type; | | enum get_opt_arg_type arg_type; | |
| longlong def_value; /* Default value */ | | longlong def_value; /* Default value */ | |
| longlong min_value; /* Min allowed value */ | | longlong min_value; /* Min allowed value */ | |
|
| ulonglong max_value; /* Max allowed value */ | | longlong max_value; /* Max allowed value */ | |
| longlong sub_size; /* Subtract this from given value *
/ | | longlong sub_size; /* Subtract this from given value *
/ | |
| long block_size; /* Value should be a mult. of this
*/ | | long block_size; /* Value should be a mult. of this
*/ | |
| void *app_type; /* To be used by an application */ | | void *app_type; /* To be used by an application */ | |
| }; | | }; | |
| | | | |
|
| typedef my_bool (*my_get_one_option)(int, const struct my_option *, char *) | | typedef my_bool (* my_get_one_option) (int, const struct my_option *, char | |
| ; | | * ); | |
| typedef void (*my_error_reporter)(enum loglevel level, const char *format, | | typedef void (* my_error_reporter) (enum loglevel level, const char *format | |
| ...) | | , ... ); | |
| ATTRIBUTE_FORMAT_FPTR(printf, 2, 3); | | | |
| | | | |
| /** | | | |
| Used to retrieve a reference to the object (variable) that holds the valu | | | |
| e | | | |
| for the given option. For example, if var_type is GET_UINT, the function | | | |
| must return a pointer to a variable of type uint. A argument is stored in | | | |
| the location pointed to by the returned pointer. | | | |
| */ | | | |
| typedef void *(*my_getopt_value)(const char *, uint, const struct my_option | | | |
| *, | | | |
| int *); | | | |
| | | | |
| extern char *disabled_my_option; | | extern char *disabled_my_option; | |
| extern my_bool my_getopt_print_errors; | | extern my_bool my_getopt_print_errors; | |
| extern my_bool my_getopt_skip_unknown; | | extern my_bool my_getopt_skip_unknown; | |
| extern my_error_reporter my_getopt_error_reporter; | | extern my_error_reporter my_getopt_error_reporter; | |
| | | | |
| extern int handle_options (int *argc, char ***argv, | | extern int handle_options (int *argc, char ***argv, | |
| const struct my_option *longopts, my_get_one_opti
on); | | const struct my_option *longopts, my_get_one_opti
on); | |
| extern void my_cleanup_options(const struct my_option *options); | | extern void my_cleanup_options(const struct my_option *options); | |
| extern void my_print_help(const struct my_option *options); | | extern void my_print_help(const struct my_option *options); | |
| extern void my_print_variables(const struct my_option *options); | | extern void my_print_variables(const struct my_option *options); | |
|
| extern void my_getopt_register_get_addr(my_getopt_value); | | extern void my_getopt_register_get_addr(uchar ** (*func_addr)(const char *, | |
| | | uint, | |
| | | const struct my_option *, int *)); | |
| | | | |
| ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *opt
p, | | ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *opt
p, | |
| my_bool *fix); | | my_bool *fix); | |
| longlong getopt_ll_limit_value(longlong, const struct my_option *, | | longlong getopt_ll_limit_value(longlong, const struct my_option *, | |
| my_bool *fix); | | my_bool *fix); | |
| my_bool getopt_compare_strings(const char *s, const char *t, uint length); | | my_bool getopt_compare_strings(const char *s, const char *t, uint length); | |
| | | | |
| C_MODE_END | | C_MODE_END | |
| | | | |
| #endif /* _my_getopt_h */ | | #endif /* _my_getopt_h */ | |
| | | | |
End of changes. 7 change blocks. |
| 28 lines changed or deleted | | 15 lines changed or added | |
|
| my_global.h | | my_global.h | |
|
| /* | | /* Copyright (C) 2000-2003 MySQL AB | |
| Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reser | | | |
| ved. | | | |
| | | | |
| This program is free software; you can redistribute it and/or modify | | This program is free software; you can redistribute it and/or modify | |
| it under the terms of the GNU General Public License as published by | | it under the terms of the GNU General Public License as published by | |
| the Free Software Foundation; version 2 of the License. | | the Free Software Foundation; version 2 of the License. | |
| | | | |
| This program is distributed in the hope that it will be useful, | | This program is distributed in the hope that it will be useful, | |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| GNU General Public License for more details. | | GNU General Public License for more details. | |
| | | | |
| You should have received a copy of the GNU General Public License | | You should have received a copy of the GNU General Public License | |
| along with this program; if not, write to the Free Software | | along with this program; if not, write to the Free Software | |
|
| Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 US | | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US | |
| A | | 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 | |
| | | | |
| /* | | /* | |
| InnoDB depends on some MySQL internals which other plugins should not | | InnoDB depends on some MySQL internals which other plugins should not | |
| need. This is because of InnoDB's foreign key support, "safe" binlog | | need. This is because of InnoDB's foreign key support, "safe" binlog | |
| truncation, and other similar legacy features. | | truncation, and other similar legacy features. | |
| | | | |
| skipping to change at line 59 | | skipping to change at line 57 | |
| Must be defined before including | | Must be defined before including | |
| "sys/select.h" and "sys/time.h" | | "sys/select.h" and "sys/time.h" | |
| */ | | */ | |
| #endif | | #endif | |
| | | | |
| /* to make command line shorter we'll define USE_PRAGMA_INTERFACE here */ | | /* to make command line shorter we'll define USE_PRAGMA_INTERFACE here */ | |
| #ifdef USE_PRAGMA_IMPLEMENTATION | | #ifdef USE_PRAGMA_IMPLEMENTATION | |
| #define USE_PRAGMA_INTERFACE | | #define USE_PRAGMA_INTERFACE | |
| #endif | | #endif | |
| | | | |
|
| #if defined(__OpenBSD__) && (OpenBSD >= 200411) | | | |
| #define HAVE_ERRNO_AS_DEFINE | | | |
| #endif | | | |
| | | | |
| #if defined(i386) && !defined(__i386__) | | #if defined(i386) && !defined(__i386__) | |
| #define __i386__ | | #define __i386__ | |
| #endif | | #endif | |
| | | | |
| /* Macros to make switching between C and C++ mode easier */ | | /* Macros to make switching between C and C++ mode easier */ | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| #define C_MODE_START extern "C" { | | #define C_MODE_START extern "C" { | |
| #define C_MODE_END } | | #define C_MODE_END } | |
| #else | | #else | |
| #define C_MODE_START | | #define C_MODE_START | |
| | | | |
| skipping to change at line 360 | | skipping to change at line 354 | |
| #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?). */ | |
| #define ulonglong2double(A) my_ulonglong2double(A) | | #define ulonglong2double(A) my_ulonglong2double(A) | |
| #define my_off_t2double(A) my_ulonglong2double(A) | | #define my_off_t2double(A) my_ulonglong2double(A) | |
| C_MODE_START | | C_MODE_START | |
|
| inline double my_ulonglong2double(unsigned long long A) { return (double) A
; } | | double my_ulonglong2double(unsigned long long A); | |
| C_MODE_END | | C_MODE_END | |
| #endif /* _AIX */ | | #endif /* _AIX */ | |
| | | | |
| #ifdef HAVE_BROKEN_SNPRINTF /* HPUX 10.20 don't have this defined */ | | #ifdef HAVE_BROKEN_SNPRINTF /* HPUX 10.20 don't have this defined */ | |
| #undef HAVE_SNPRINTF | | #undef HAVE_SNPRINTF | |
| #endif | | #endif | |
| #ifdef HAVE_BROKEN_PREAD | | #ifdef HAVE_BROKEN_PREAD | |
| /* | | /* | |
| pread()/pwrite() are not 64 bit safe on HP-UX 11.0 without | | pread()/pwrite() are not 64 bit safe on HP-UX 11.0 without | |
| installing the kernel patch PHKL_20349 or greater | | installing the kernel patch PHKL_20349 or greater | |
| | | | |
| skipping to change at line 414 | | skipping to change at line 408 | |
| #if defined(_lint) && !defined(lint) | | #if defined(_lint) && !defined(lint) | |
| #define lint | | #define lint | |
| #endif | | #endif | |
| #if SIZEOF_LONG_LONG > 4 && !defined(_LONG_LONG) | | #if SIZEOF_LONG_LONG > 4 && !defined(_LONG_LONG) | |
| #define _LONG_LONG 1 /* For AIX string library */ | | #define _LONG_LONG 1 /* For AIX string library */ | |
| #endif | | #endif | |
| | | | |
| #ifndef stdin | | #ifndef stdin | |
| #include <stdio.h> | | #include <stdio.h> | |
| #endif | | #endif | |
|
| | | #include <stdarg.h> | |
| #ifdef HAVE_STDLIB_H | | #ifdef HAVE_STDLIB_H | |
| #include <stdlib.h> | | #include <stdlib.h> | |
| #endif | | #endif | |
| #ifdef HAVE_STDDEF_H | | #ifdef HAVE_STDDEF_H | |
| #include <stddef.h> | | #include <stddef.h> | |
| #endif | | #endif | |
| | | | |
| #include <math.h> | | #include <math.h> | |
| #ifdef HAVE_LIMITS_H | | #ifdef HAVE_LIMITS_H | |
| #include <limits.h> | | #include <limits.h> | |
| | | | |
| skipping to change at line 541 | | skipping to change at line 536 | |
| #define QUOTE_ARG(x) #x /* Quote argument (before cpp) */ | | #define QUOTE_ARG(x) #x /* Quote argument (before cpp) */ | |
| #define STRINGIFY_ARG(x) QUOTE_ARG(x) /* Quote argument, after cpp */ | | #define STRINGIFY_ARG(x) QUOTE_ARG(x) /* Quote argument, after cpp */ | |
| | | | |
| /* Paranoid settings. Define I_AM_PARANOID if you are paranoid */ | | /* Paranoid settings. Define I_AM_PARANOID if you are paranoid */ | |
| #ifdef I_AM_PARANOID | | #ifdef I_AM_PARANOID | |
| #define DONT_ALLOW_USER_CHANGE 1 | | #define DONT_ALLOW_USER_CHANGE 1 | |
| #define DONT_USE_MYSQL_PWD 1 | | #define DONT_USE_MYSQL_PWD 1 | |
| #endif | | #endif | |
| | | | |
| /* Does the system remember a signal handler after a signal ? */ | | /* Does the system remember a signal handler after a signal ? */ | |
|
| #if !defined(HAVE_BSD_SIGNALS) && !defined(HAVE_SIGACTION) | | #ifndef HAVE_BSD_SIGNALS | |
| #define SIGNAL_HANDLER_RESET_ON_DELIVERY | | #define DONT_REMEMBER_SIGNAL | |
| #endif | | #endif | |
| | | | |
| /* Define void to stop lint from generating "null effekt" comments */ | | /* Define void to stop lint from generating "null effekt" comments */ | |
| #ifndef DONT_DEFINE_VOID | | #ifndef DONT_DEFINE_VOID | |
| #ifdef _lint | | #ifdef _lint | |
| int __void__; | | int __void__; | |
| #define VOID(X) (__void__ = (int) (X)) | | #define VOID(X) (__void__ = (int) (X)) | |
| #else | | #else | |
| #undef VOID | | #undef VOID | |
| #define VOID(X) (X) | | #define VOID(X) (X) | |
| #endif | | #endif | |
| #endif /* DONT_DEFINE_VOID */ | | #endif /* DONT_DEFINE_VOID */ | |
| | | | |
|
| /* | | #if defined(_lint) || defined(FORCE_INIT_OF_VARS) | |
| Deprecated workaround for false-positive uninitialized variables | | #define LINT_INIT(var) var=0 /* No uninitialize-warning * | |
| warnings. Those should be silenced using tool-specific heuristics. | | / | |
| | | | |
| Enabled by default for g++ due to the bug referenced below. | | | |
| */ | | | |
| #if defined(_lint) || defined(FORCE_INIT_OF_VARS) || \ | | | |
| (defined(__GNUC__) && defined(__cplusplus)) | | | |
| #define LINT_INIT(var) var= 0 | | | |
| #else | | #else | |
| #define LINT_INIT(var) | | #define LINT_INIT(var) | |
| #endif | | #endif | |
| | | | |
| /* | | /* | |
| Suppress uninitialized variable warning without generating code. | | Suppress uninitialized variable warning without generating code. | |
| | | | |
| The _cplusplus is a temporary workaround for C++ code pending a fix | | The _cplusplus is a temporary workaround for C++ code pending a fix | |
| for a g++ bug (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34772). | | for a g++ bug (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34772). | |
| */ | | */ | |
|
| #if defined(_lint) || defined(FORCE_INIT_OF_VARS) || \ | | #if defined(_lint) || defined(FORCE_INIT_OF_VARS) || defined(__cplusplus) | | |
| defined(__cplusplus) || !defined(__GNUC__) | | | \ | |
| | | !defined(__GNUC__) | |
| #define UNINIT_VAR(x) x= 0 | | #define UNINIT_VAR(x) x= 0 | |
| #else | | #else | |
|
| /* GCC specific self-initialization which inhibits the warning. */ | | | |
| #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(HAVE_UINT) | | #if !defined(HAVE_UINT) | |
| | | | |
| skipping to change at line 603 | | skipping to change at line 590 | |
| 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) { t dummy; dummy= a; a= b; b= dummy; } | | #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 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 */ | |
| #define FALSE (0) /* Logical false */ | | #define FALSE (0) /* Logical false */ | |
| #endif | | #endif | |
| | | | |
| #if defined(__GNUC__) | | #if defined(__GNUC__) | |
| #define function_volatile volatile | | #define function_volatile volatile | |
| #define my_reinterpret_cast(A) reinterpret_cast<A> | | #define my_reinterpret_cast(A) reinterpret_cast<A> | |
| #define my_const_cast(A) const_cast<A> | | #define my_const_cast(A) const_cast<A> | |
| # ifndef GCC_VERSION | | # ifndef GCC_VERSION | |
| # define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__) | | # define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__) | |
| # endif | | # endif | |
| #elif !defined(my_reinterpret_cast) | | #elif !defined(my_reinterpret_cast) | |
| #define my_reinterpret_cast(A) (A) | | #define my_reinterpret_cast(A) (A) | |
| #define my_const_cast(A) (A) | | #define my_const_cast(A) (A) | |
| #endif | | #endif | |
| | | | |
|
| #include <my_compiler.h> | | #include <my_attribute.h> | |
| | | | |
| /* | | /* | |
| Wen using the embedded library, users might run into link problems, | | Wen using the embedded library, users might run into link problems, | |
| duplicate declaration of __cxa_pure_virtual, solved by declaring it a | | duplicate declaration of __cxa_pure_virtual, solved by declaring it a | |
| weak symbol. | | weak symbol. | |
| */ | | */ | |
| #if defined(USE_MYSYS_NEW) && ! defined(DONT_DECLARE_CXA_PURE_VIRTUAL) | | #if defined(USE_MYSYS_NEW) && ! defined(DONT_DECLARE_CXA_PURE_VIRTUAL) | |
| C_MODE_START | | C_MODE_START | |
| int __cxa_pure_virtual () __attribute__ ((weak)); | | int __cxa_pure_virtual () __attribute__ ((weak)); | |
| C_MODE_END | | C_MODE_END | |
| | | | |
| skipping to change at line 659 | | skipping to change at line 647 | |
| #endif | | #endif | |
| | | | |
| /* We might be forced to turn debug off, if not turned off already */ | | /* We might be forced to turn debug off, if not turned off already */ | |
| #if (defined(FORCE_DBUG_OFF) || defined(_lint)) && !defined(DBUG_OFF) | | #if (defined(FORCE_DBUG_OFF) || defined(_lint)) && !defined(DBUG_OFF) | |
| # define DBUG_OFF | | # define DBUG_OFF | |
| # ifdef DBUG_ON | | # ifdef DBUG_ON | |
| # undef DBUG_ON | | # undef DBUG_ON | |
| # endif | | # endif | |
| #endif | | #endif | |
| | | | |
|
| #include <my_dbug.h> | | | |
| | | | |
| #define MIN_ARRAY_SIZE 0 /* Zero or One. Gcc allows zero*/ | | #define MIN_ARRAY_SIZE 0 /* Zero or One. Gcc allows zero*/ | |
| #define ASCII_BITS_USED 8 /* Bit char used */ | | #define ASCII_BITS_USED 8 /* Bit char used */ | |
| #define NEAR_F /* No near function handling */ | | #define NEAR_F /* No near function handling */ | |
| | | | |
| /* Some types that is different between systems */ | | /* Some types that is different between systems */ | |
| | | | |
| typedef int File; /* File descriptor */ | | typedef int File; /* File descriptor */ | |
| #ifndef Socket_defined | | #ifndef Socket_defined | |
| typedef int my_socket; /* File descriptor for sockets */ | | typedef int my_socket; /* File descriptor for sockets */ | |
| #define INVALID_SOCKET -1 | | #define INVALID_SOCKET -1 | |
| | | | |
| skipping to change at line 757 | | skipping to change at line 743 | |
| #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 | |
| #define FN_LIBCHAR '/' | | #define FN_LIBCHAR '/' | |
|
| #define FN_DIRSEP "/" /* Valid directory separators */ | | | |
| #define FN_ROOTDIR "/" | | #define FN_ROOTDIR "/" | |
| #endif | | #endif | |
|
| #define MY_NFILE 64 /* This is only used to save filenames */ | | | |
| | | /* | |
| | | MY_FILE_MIN is Windows speciality and is used to quickly detect | |
| | | the mismatch of CRT and mysys file IO usage on Windows at runtime. | |
| | | CRT file descriptors can be in the range 0-2047, whereas descriptors retu | |
| | | rned | |
| | | by my_open() will start with 2048. If a file descriptor with value less t | |
| | | hen | |
| | | MY_FILE_MIN is passed to mysys IO function, chances are it stemms from | |
| | | open()/fileno() and not my_open()/my_fileno. | |
| | | | |
| | | For Posix, mysys functions are light wrappers around libc, and MY_FILE_M | |
| | | IN | |
| | | is logically 0. | |
| | | */ | |
| | | | |
| | | #ifdef _WIN32 | |
| | | #define MY_FILE_MIN 2048 | |
| | | #else | |
| | | #define MY_FILE_MIN 0 | |
| | | #endif | |
| | | | |
| | | /* | |
| | | MY_NFILE is the default size of my_file_info array. | |
| | | | |
| | | It is larger on Windows, because it all file handles are stored in my_fil | |
| | | e_info | |
| | | Default size is 16384 and this should be enough for most cases.If it is n | |
| | | ot | |
| | | enough, --max-open-files with larger value can be used. | |
| | | | |
| | | For Posix , my_file_info array is only used to store filenames for | |
| | | error reporting and its size is not a limitation for number of open files | |
| | | . | |
| | | */ | |
| | | #ifdef _WIN32 | |
| | | #define MY_NFILE (16384 + MY_FILE_MIN) | |
| | | #else | |
| | | #define MY_NFILE 64 | |
| | | #endif | |
| | | | |
| #ifndef OS_FILE_LIMIT | | #ifndef OS_FILE_LIMIT | |
|
| #define OS_FILE_LIMIT UINT_MAX | | #define OS_FILE_LIMIT 65535 | |
| #endif | | #endif | |
| | | | |
| /* #define EXT_IN_LIBNAME */ | | /* #define EXT_IN_LIBNAME */ | |
| /* #define FN_NO_CASE_SENCE */ | | /* #define FN_NO_CASE_SENCE */ | |
| /* #define FN_UPPER_CASE TRUE */ | | /* #define FN_UPPER_CASE TRUE */ | |
| | | | |
| /* | | /* | |
| Io buffer size; Must be a power of 2 and a multiple of 512. May be | | Io buffer size; Must be a power of 2 and a multiple of 512. May be | |
| smaller what the disk page size. This influences the speed of the | | smaller what the disk page size. This influences the speed of the | |
| isam btree library. eg to big to slow. | | isam btree library. eg to big to slow. | |
| | | | |
| skipping to change at line 796 | | skipping to change at line 815 | |
| /* Typical record cash */ | | /* Typical record cash */ | |
| #define RECORD_CACHE_SIZE (uint) (64*1024-MALLOC_OVERHEAD) | | #define RECORD_CACHE_SIZE (uint) (64*1024-MALLOC_OVERHEAD) | |
| /* Typical key cash */ | | /* Typical key cash */ | |
| #define KEY_CACHE_SIZE (uint) (8*1024*1024-MALLOC_OVERHEAD) | | #define KEY_CACHE_SIZE (uint) (8*1024*1024-MALLOC_OVERHEAD) | |
| /* Default size of a key cache block */ | | /* Default size of a key cache block */ | |
| #define KEY_CACHE_BLOCK_SIZE (uint) 1024 | | #define KEY_CACHE_BLOCK_SIZE (uint) 1024 | |
| | | | |
| /* Some things that this system doesn't have */ | | /* Some things that this system doesn't have */ | |
| | | | |
| #define NO_HASH /* Not needed anymore */ | | #define NO_HASH /* Not needed anymore */ | |
|
| #ifdef __WIN__ | | #ifdef _WIN32 | |
| #define NO_DIR_LIBRARY /* Not standar dir-library */ | | #define NO_DIR_LIBRARY /* Not standard dir-library */ | |
| #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__ | |
| #define closesocket(A) close(A) | | #define closesocket(A) close(A) | |
| #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)) | |
| | | | |
| skipping to change at line 878 | | skipping to change at line 896 | |
| /* From limits.h instead */ | | /* From limits.h instead */ | |
| #ifndef DBL_MIN | | #ifndef DBL_MIN | |
| #define DBL_MIN 4.94065645841246544e-324 | | #define DBL_MIN 4.94065645841246544e-324 | |
| #define FLT_MIN ((float)1.40129846432481707e-45) | | #define FLT_MIN ((float)1.40129846432481707e-45) | |
| #endif | | #endif | |
| #ifndef DBL_MAX | | #ifndef DBL_MAX | |
| #define DBL_MAX 1.79769313486231470e+308 | | #define DBL_MAX 1.79769313486231470e+308 | |
| #define FLT_MAX ((float)3.40282346638528860e+38) | | #define FLT_MAX ((float)3.40282346638528860e+38) | |
| #endif | | #endif | |
| #ifndef SIZE_T_MAX | | #ifndef SIZE_T_MAX | |
|
| #define SIZE_T_MAX (~((size_t) 0)) | | #define SIZE_T_MAX ~((size_t) 0) | |
| #endif | | #endif | |
| | | | |
| #ifndef isfinite | | #ifndef isfinite | |
| #ifdef HAVE_FINITE | | #ifdef HAVE_FINITE | |
| #define isfinite(x) finite(x) | | #define isfinite(x) finite(x) | |
| #else | | #else | |
| #define finite(x) (1.0 / fabs(x) > 0.0) | | #define finite(x) (1.0 / fabs(x) > 0.0) | |
| #endif /* HAVE_FINITE */ | | #endif /* HAVE_FINITE */ | |
| #endif /* isfinite */ | | #endif /* isfinite */ | |
| | | | |
| | | | |
| skipping to change at line 940 | | skipping to change at line 958 | |
| | | | |
| #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) ((uchar*) (ptr)+size) | | #define ADD_TO_PTR(ptr,size,type) (type) ((uchar*) (ptr)+size) | |
| #define PTR_BYTE_DIFF(A,B) (my_ptrdiff_t) ((uchar*) (A) - (uchar*) (B)) | | #define PTR_BYTE_DIFF(A,B) (my_ptrdiff_t) ((uchar*) (A) - (uchar*) (B)) | |
| | | | |
|
| | | #define MY_DIV_UP(A, B) (((A) + (B) - 1) / (B)) | |
| | | #define MY_ALIGNED_BYTE_ARRAY(N, S, T) T N[MY_DIV_UP(S, sizeof(T))] | |
| | | | |
| /* | | /* | |
| Custom version of standard offsetof() macro which can be used to get | | Custom version of standard offsetof() macro which can be used to get | |
| offsets of members in class for non-POD types (according to the current | | offsets of members in class for non-POD types (according to the current | |
| version of C++ standard offsetof() macro can't be used in such cases and | | version of C++ standard offsetof() macro can't be used in such cases and | |
| attempt to do so causes warnings to be emitted, OTOH in many cases it is | | attempt to do so causes warnings to be emitted, OTOH in many cases it is | |
| still OK to assume that all instances of the class has the same offsets | | still OK to assume that all instances of the class has the same offsets | |
| for the same members). | | for the same members). | |
| | | | |
| This is temporary solution which should be removed once File_parser class | | This is temporary solution which should be removed once File_parser class | |
| and related routines are refactored. | | and related routines are refactored. | |
| | | | |
| skipping to change at line 1150 | | skipping to change at line 1171 | |
| #define reg9 register | | #define reg9 register | |
| #define reg10 register | | #define reg10 register | |
| #define reg11 register | | #define reg11 register | |
| #define reg12 register | | #define reg12 register | |
| #define reg13 register | | #define reg13 register | |
| #define reg14 register | | #define reg14 register | |
| #define reg15 register | | #define reg15 register | |
| #define reg16 register | | #define reg16 register | |
| #endif | | #endif | |
| | | | |
|
| | | #include <my_dbug.h> | |
| | | | |
| /* | | /* | |
| Sometimes we want to make sure that the variable is not put into | | 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 | |
| | | | |
| skipping to change at line 1461 | | skipping to change at line 1484 | |
| #endif | | #endif | |
| #ifndef doubleget | | #ifndef doubleget | |
| #define doubleget(V,M) memcpy_fixed((uchar*) &V,(uchar*) (M),sizeof(double
)) | | #define doubleget(V,M) memcpy_fixed((uchar*) &V,(uchar*) (M),sizeof(double
)) | |
| #define doublestore(T,V) memcpy_fixed((uchar*) (T),(uchar*) &V,sizeof(doubl
e)) | | #define doublestore(T,V) memcpy_fixed((uchar*) (T),(uchar*) &V,sizeof(doubl
e)) | |
| #endif /* doubleget */ | | #endif /* doubleget */ | |
| #define longlongget(V,M) memcpy_fixed((uchar*) &V,(uchar*) (M),sizeof(ulong
long)) | | #define longlongget(V,M) memcpy_fixed((uchar*) &V,(uchar*) (M),sizeof(ulong
long)) | |
| #define longlongstore(T,V) memcpy_fixed((uchar*) (T),(uchar*) &V,sizeof(ulo
nglong)) | | #define longlongstore(T,V) memcpy_fixed((uchar*) (T),(uchar*) &V,sizeof(ulo
nglong)) | |
| | | | |
| #endif /* WORDS_BIGENDIAN */ | | #endif /* WORDS_BIGENDIAN */ | |
| | | | |
|
| | | /* sprintf does not always return the number of bytes :- */ | |
| | | #ifdef SPRINTF_RETURNS_INT | |
| | | #define my_sprintf(buff,args) sprintf args | |
| | | #else | |
| | | #ifdef SPRINTF_RETURNS_PTR | |
| | | #define my_sprintf(buff,args) ((int)(sprintf args - buff)) | |
| | | #else | |
| | | #define my_sprintf(buff,args) ((ulong) sprintf args, (ulong) strlen(buff)) | |
| | | #endif | |
| | | #endif | |
| | | | |
| #ifndef THREAD | | #ifndef THREAD | |
| #define thread_safe_increment(V,L) (V)++ | | #define thread_safe_increment(V,L) (V)++ | |
| #define thread_safe_decrement(V,L) (V)-- | | #define thread_safe_decrement(V,L) (V)-- | |
| #define thread_safe_add(V,C,L) (V)+=(C) | | #define thread_safe_add(V,C,L) (V)+=(C) | |
| #define thread_safe_sub(V,C,L) (V)-=(C) | | #define thread_safe_sub(V,C,L) (V)-=(C) | |
| #define statistic_increment(V,L) (V)++ | | #define statistic_increment(V,L) (V)++ | |
| #define statistic_decrement(V,L) (V)-- | | #define statistic_decrement(V,L) (V)-- | |
| #define statistic_add(V,C,L) (V)+=(C) | | #define statistic_add(V,C,L) (V)+=(C) | |
| #define statistic_sub(V,C,L) (V)-=(C) | | #define statistic_sub(V,C,L) (V)-=(C) | |
| #endif | | #endif | |
| | | | |
End of changes. 20 change blocks. |
| 35 lines changed or deleted | | 76 lines changed or added | |
|
| my_pthread.h | | my_pthread.h | |
|
| /* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reser
ved. | | /* Copyright (C) 2000 MySQL AB | |
| | | | |
| This program is free software; you can redistribute it and/or modify | | This program is free software; you can redistribute it and/or modify | |
| it under the terms of the GNU General Public License as published by | | it under the terms of the GNU General Public License as published by | |
| the Free Software Foundation; version 2 of the License. | | the Free Software Foundation; version 2 of the License. | |
| | | | |
| This program is distributed in the hope that it will be useful, | | This program is distributed in the hope that it will be useful, | |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| GNU General Public License for more details. | | GNU General Public License for more details. | |
| | | | |
| You should have received a copy of the GNU General Public License | | You should have received a copy of the GNU General Public License | |
| along with this program; if not, write to the Free Software | | along with this program; if not, write to the Free Software | |
|
| Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130
1, USA */ | | 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 | |
| | | | |
| #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__) | | #if defined(__WIN__) | |
| typedef CRITICAL_SECTION pthread_mutex_t; | | typedef CRITICAL_SECTION pthread_mutex_t; | |
|
| typedef HANDLE pthread_t; | | typedef DWORD 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 66 | | skipping to change at line 66 | |
| BROADCAST= 1, | | BROADCAST= 1, | |
| 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 pthread_self() GetCurrentThreadId() | |
| #define pthread_self() win_pthread_self | | | |
| #define pthread_handler_t EXTERNC void * __cdecl | | #define pthread_handler_t EXTERNC void * __cdecl | |
| typedef void * (__cdecl *pthread_handler)(void *); | | typedef void * (__cdecl *pthread_handler)(void *); | |
| | | | |
|
| typedef volatile LONG my_pthread_once_t; | | | |
| #define MY_PTHREAD_ONCE_INIT 0 | | | |
| #define MY_PTHREAD_ONCE_INPROGRESS 1 | | | |
| #define MY_PTHREAD_ONCE_DONE 2 | | | |
| | | | |
| /* | | /* | |
| Struct and macros to be used in combination with the | | Struct and macros to be used in combination with the | |
| windows implementation of pthread_cond_timedwait | | windows implementation of pthread_cond_timedwait | |
| */ | | */ | |
| | | | |
| /* | | /* | |
| Declare a union to make sure FILETIME is properly aligned | | Declare a union to make sure FILETIME is properly aligned | |
| so it can be used directly as a 64 bit value. The value | | so it can be used directly as a 64 bit value. The value | |
| stored is in 100ns units. | | stored is in 100ns units. | |
| */ | | */ | |
| | | | |
| skipping to change at line 106 | | skipping to change at line 100 | |
| GetSystemTimeAsFileTime(&((ABSTIME).tv.ft)); \ | | GetSystemTimeAsFileTime(&((ABSTIME).tv.ft)); \ | |
| (ABSTIME).tv.i64+= (__int64)(SEC)*10000000; \ | | (ABSTIME).tv.i64+= (__int64)(SEC)*10000000; \ | |
| (ABSTIME).max_timeout_msec= (long)((SEC)*1000); \ | | (ABSTIME).max_timeout_msec= (long)((SEC)*1000); \ | |
| } | | } | |
| #define set_timespec_nsec(ABSTIME,NSEC) { \ | | #define set_timespec_nsec(ABSTIME,NSEC) { \ | |
| GetSystemTimeAsFileTime(&((ABSTIME).tv.ft)); \ | | GetSystemTimeAsFileTime(&((ABSTIME).tv.ft)); \ | |
| (ABSTIME).tv.i64+= (__int64)(NSEC)/100; \ | | (ABSTIME).tv.i64+= (__int64)(NSEC)/100; \ | |
| (ABSTIME).max_timeout_msec= (long)((NSEC)/1000000); \ | | (ABSTIME).max_timeout_msec= (long)((NSEC)/1000000); \ | |
| } | | } | |
| | | | |
|
| void win_pthread_init(void); | | | |
| int win_pthread_setspecific(void *A,void *B,uint length); | | | |
| int win_pthread_mutex_trylock(pthread_mutex_t *mutex); | | int win_pthread_mutex_trylock(pthread_mutex_t *mutex); | |
| int pthread_create(pthread_t *,pthread_attr_t *,pthread_handler,void *); | | int pthread_create(pthread_t *,pthread_attr_t *,pthread_handler,void *); | |
| int pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr)
; | | int pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr)
; | |
| int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex); | | int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex); | |
| int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, | | int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, | |
| struct timespec *abstime); | | struct timespec *abstime); | |
| int pthread_cond_signal(pthread_cond_t *cond); | | int pthread_cond_signal(pthread_cond_t *cond); | |
| int pthread_cond_broadcast(pthread_cond_t *cond); | | int pthread_cond_broadcast(pthread_cond_t *cond); | |
| int pthread_cond_destroy(pthread_cond_t *cond); | | int pthread_cond_destroy(pthread_cond_t *cond); | |
| int pthread_attr_init(pthread_attr_t *connect_att); | | int pthread_attr_init(pthread_attr_t *connect_att); | |
| int pthread_attr_setstacksize(pthread_attr_t *connect_att,DWORD stack); | | int pthread_attr_setstacksize(pthread_attr_t *connect_att,DWORD stack); | |
| int pthread_attr_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); | |
|
| int my_pthread_once(my_pthread_once_t *once_control,void (*init_routine)(vo
id)); | | | |
| struct tm *localtime_r(const time_t *timep,struct tm *tmp); | | struct tm *localtime_r(const time_t *timep,struct tm *tmp); | |
| struct tm *gmtime_r(const time_t *timep,struct tm *tmp); | | struct tm *gmtime_r(const time_t *timep,struct tm *tmp); | |
| | | | |
|
| void pthread_exit(void *a); /* was #define pthread_exit(A) ExitThread(A | | void pthread_exit(void *a); | |
| )*/ | | int pthread_join(pthread_t thread, void **value_ptr); | |
| | | | |
|
| #ifndef ETIMEDOUT | | #define ETIMEDOUT 145 /* Win32 doesn't have this */ | |
| #define ETIMEDOUT 145 /* Win32 might not have this */ | | | |
| #endif | | | |
| #define getpid() GetCurrentThreadId() | | | |
| #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 */ | | | |
| #undef SAFE_MUTEX /* This will cause conflicts
*/ | | #undef SAFE_MUTEX /* This will cause conflicts
*/ | |
| #define pthread_key(T,V) DWORD V | | #define pthread_key(T,V) DWORD V | |
| #define pthread_key_create(A,B) ((*A=TlsAlloc())==0xFFFFFFFF) | | #define pthread_key_create(A,B) ((*A=TlsAlloc())==0xFFFFFFFF) | |
| #define pthread_key_delete(A) TlsFree(A) | | #define pthread_key_delete(A) TlsFree(A) | |
|
| | | #define my_pthread_setspecific_ptr(T,V) (!TlsSetValue((T),(V))) | |
| | | #define pthread_setspecific(A,B) (!TlsSetValue((A),(B))) | |
| #define pthread_getspecific(A) (TlsGetValue(A)) | | #define pthread_getspecific(A) (TlsGetValue(A)) | |
| #define my_pthread_getspecific(T,A) ((T) TlsGetValue(A)) | | #define my_pthread_getspecific(T,A) ((T) TlsGetValue(A)) | |
| #define my_pthread_getspecific_ptr(T,V) ((T) TlsGetValue(V)) | | #define my_pthread_getspecific_ptr(T,V) ((T) TlsGetValue(V)) | |
|
| #define my_pthread_setspecific_ptr(T,V) (!TlsSetValue((T),(V))) | | | |
| #define pthread_setspecific(A,B) (!TlsSetValue((A),(B))) | | | |
| #else | | | |
| #define pthread_key(T,V) __declspec(thread) T V | | | |
| #define pthread_key_create(A,B) pthread_dummy(0) | | | |
| #define pthread_key_delete(A) pthread_dummy(0) | | | |
| #define pthread_getspecific(A) (&(A)) | | | |
| #define my_pthread_getspecific(T,A) (&(A)) | | | |
| #define my_pthread_getspecific_ptr(T,V) (V) | | | |
| #define my_pthread_setspecific_ptr(T,V) ((T)=(V),0) | | | |
| #define pthread_setspecific(A,B) win_pthread_setspecific(&(A),(B),sizeof(A) | | | |
| ) | | | |
| #endif /* USE_TLS */ | | | |
| | | | |
| #define pthread_equal(A,B) ((A) == (B)) | | #define pthread_equal(A,B) ((A) == (B)) | |
| #define pthread_mutex_init(A,B) (InitializeCriticalSection(A),0) | | #define pthread_mutex_init(A,B) (InitializeCriticalSection(A),0) | |
| #define pthread_mutex_lock(A) (EnterCriticalSection(A),0) | | #define pthread_mutex_lock(A) (EnterCriticalSection(A),0) | |
| #define pthread_mutex_trylock(A) win_pthread_mutex_trylock((A)) | | #define pthread_mutex_trylock(A) win_pthread_mutex_trylock((A)) | |
| #define pthread_mutex_unlock(A) LeaveCriticalSection(A) | | #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) | |
| | | | |
|
| #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) | |
| | | | |
| | | | |
| skipping to change at line 219 | | skipping to change at line 188 | |
| | | | |
| 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)) | |
| #define my_pthread_setspecific_ptr(T,V) pthread_setspecific(T,(void*) (V)) | | #define my_pthread_setspecific_ptr(T,V) pthread_setspecific(T,(void*) (V)) | |
| #define pthread_detach_this_thread() | | #define pthread_detach_this_thread() | |
| #define pthread_handler_t EXTERNC void * | | #define pthread_handler_t EXTERNC void * | |
| typedef void *(* pthread_handler)(void *); | | typedef void *(* pthread_handler)(void *); | |
| | | | |
|
| #define my_pthread_once_t pthread_once_t | | | |
| #define MY_PTHREAD_ONCE_INIT PTHREAD_ONCE_INIT | | | |
| #define my_pthread_once(C,F) pthread_once(C,F) | | | |
| | | | |
| /* Test first for RTS or FSU threads */ | | /* Test first for RTS or FSU threads */ | |
| | | | |
| #if defined(PTHREAD_SCOPE_GLOBAL) && !defined(PTHREAD_SCOPE_SYSTEM) | | #if defined(PTHREAD_SCOPE_GLOBAL) && !defined(PTHREAD_SCOPE_SYSTEM) | |
| #define HAVE_rts_threads | | #define HAVE_rts_threads | |
| extern int my_pthread_create_detached; | | extern int my_pthread_create_detached; | |
| #define pthread_sigmask(A,B,C) sigprocmask((A),(B),(C)) | | #define pthread_sigmask(A,B,C) sigprocmask((A),(B),(C)) | |
| #define PTHREAD_CREATE_DETACHED &my_pthread_create_detached | | #define PTHREAD_CREATE_DETACHED &my_pthread_create_detached | |
| #define PTHREAD_SCOPE_SYSTEM PTHREAD_SCOPE_GLOBAL | | #define PTHREAD_SCOPE_SYSTEM PTHREAD_SCOPE_GLOBAL | |
| #define PTHREAD_SCOPE_PROCESS PTHREAD_SCOPE_LOCAL | | #define PTHREAD_SCOPE_PROCESS PTHREAD_SCOPE_LOCAL | |
| #define USE_ALARM_THREAD | | #define USE_ALARM_THREAD | |
| | | | |
| skipping to change at line 271 | | skipping to change at line 236 | |
| int sigwait(sigset_t *setp, int *sigp); /* Use our implement
ion */ | | int sigwait(sigset_t *setp, int *sigp); /* Use our implement
ion */ | |
| #endif | | #endif | |
| | | | |
| /* | | /* | |
| We define my_sigset() and use that instead of the system sigset() so that | | We define my_sigset() and use that instead of the system sigset() so that | |
| we can favor an implementation based on sigaction(). On some systems, suc
h | | we can favor an implementation based on sigaction(). On some systems, suc
h | |
| as Mac OS X, sigset() results in flags such as SA_RESTART being set, and | | as Mac OS X, sigset() results in flags such as SA_RESTART being set, and | |
| we want to make sure that no such flags are set. | | we want to make sure that no such flags are set. | |
| */ | | */ | |
| #if defined(HAVE_SIGACTION) && !defined(my_sigset) | | #if defined(HAVE_SIGACTION) && !defined(my_sigset) | |
|
| #define my_sigset(A,B) do { struct sigaction l_s; sigset_t l_set; | | #define my_sigset(A,B) do { struct sigaction l_s; sigset_t l_set; int l_rc; | |
| \ | | \ | |
| IF_DBUG(int l_rc); | | | |
| \ | | | |
| DBUG_ASSERT((A) != 0);
\ | | DBUG_ASSERT((A) != 0);
\ | |
| sigemptyset(&l_set);
\ | | sigemptyset(&l_set);
\ | |
| l_s.sa_handler = (B);
\ | | l_s.sa_handler = (B);
\ | |
| l_s.sa_mask = l_set;
\ | | l_s.sa_mask = l_set;
\ | |
| l_s.sa_flags = 0;
\ | | l_s.sa_flags = 0;
\ | |
|
| IF_DBUG(l_rc=) sigaction((A), &l_s, NULL);
\ | | l_rc= sigaction((A), &l_s, (struct sigaction *)
NULL);\ | |
| DBUG_ASSERT(l_rc == 0);
\ | | DBUG_ASSERT(l_rc == 0);
\ | |
| } while (0) | | } while (0) | |
| #elif defined(HAVE_SIGSET) && !defined(my_sigset) | | #elif defined(HAVE_SIGSET) && !defined(my_sigset) | |
| #define my_sigset(A,B) sigset((A),(B)) | | #define my_sigset(A,B) sigset((A),(B)) | |
| #elif !defined(my_sigset) | | #elif !defined(my_sigset) | |
| #define my_sigset(A,B) signal((A),(B)) | | #define my_sigset(A,B) signal((A),(B)) | |
| #endif | | #endif | |
| | | | |
| #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) | | #elif defined(HAVE_PTHREAD_SETSCHEDPRIO) && !defined (__GNUC__) | |
| | | /* | |
| | | Workaround for bug on Solaris where pthread.h have bug in GNU | |
| | | version of pthread.h => configure says yes, header files says | |
| | | no. So not used with gcc and issue is Solaris only, so will | |
| | | be used on Solaris using SunStudio. | |
| | | */ | |
| #define my_pthread_setprio(A,B) pthread_setschedprio((A),(B)) | | #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 | |
| | | | |
| skipping to change at line 494 | | skipping to change at line 464 | |
| #endif /* SAFE_MUTEX_DETECT_DESTROY */ | | #endif /* SAFE_MUTEX_DETECT_DESTROY */ | |
| | | | |
| int safe_mutex_init(safe_mutex_t *mp, const pthread_mutexattr_t *attr, | | int safe_mutex_init(safe_mutex_t *mp, const pthread_mutexattr_t *attr, | |
| const char *file, uint line); | | const char *file, uint line); | |
| int safe_mutex_lock(safe_mutex_t *mp, my_bool try_lock, const char *file, u
int line); | | int safe_mutex_lock(safe_mutex_t *mp, my_bool try_lock, const char *file, u
int line); | |
| int safe_mutex_unlock(safe_mutex_t *mp,const char *file, uint line); | | int safe_mutex_unlock(safe_mutex_t *mp,const char *file, uint line); | |
| int safe_mutex_destroy(safe_mutex_t *mp,const char *file, uint line); | | int safe_mutex_destroy(safe_mutex_t *mp,const char *file, uint line); | |
| int safe_cond_wait(pthread_cond_t *cond, safe_mutex_t *mp,const char *file, | | int safe_cond_wait(pthread_cond_t *cond, safe_mutex_t *mp,const char *file, | |
| uint line); | | uint line); | |
| int safe_cond_timedwait(pthread_cond_t *cond, safe_mutex_t *mp, | | int safe_cond_timedwait(pthread_cond_t *cond, safe_mutex_t *mp, | |
|
| const struct timespec *abstime, | | struct timespec *abstime, const char *file, uint lin | |
| const char *file, uint line); | | e); | |
| void safe_mutex_global_init(void); | | void safe_mutex_global_init(void); | |
| void safe_mutex_end(FILE *file); | | void safe_mutex_end(FILE *file); | |
| | | | |
| /* Wrappers if safe mutex is actually used */ | | /* Wrappers if safe mutex is actually used */ | |
| #ifdef SAFE_MUTEX | | #ifdef SAFE_MUTEX | |
| #undef pthread_mutex_init | | #undef pthread_mutex_init | |
| #undef pthread_mutex_lock | | #undef pthread_mutex_lock | |
| #undef pthread_mutex_unlock | | #undef pthread_mutex_unlock | |
| #undef pthread_mutex_destroy | | #undef pthread_mutex_destroy | |
| #undef pthread_mutex_wait | | #undef pthread_mutex_wait | |
| | | | |
| skipping to change at line 698 | | skipping to change at line 667 | |
| 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 | |
| void *dbug; | | void *dbug; | |
| char name[THREAD_NAME_SIZE+1]; | | char name[THREAD_NAME_SIZE+1]; | |
| #endif | | #endif | |
| }; | | }; | |
| | | | |
| extern struct st_my_thread_var *_my_thread_var(void) __attribute__ ((const)
); | | extern struct st_my_thread_var *_my_thread_var(void) __attribute__ ((const)
); | |
|
| | | extern void **my_thread_var_dbug(); | |
| extern 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 | |
| report errors with them | | report errors with them | |
| */ | | */ | |
| | | | |
| /* Which kind of thread library is in use */ | | /* Which kind of thread library is in use */ | |
| | | | |
| | | | |
| skipping to change at line 719 | | skipping to change at line 689 | |
| #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; | |
| | | | |
| /* | | /* | |
| thread_safe_xxx functions are for critical statistic or counters. | | thread_safe_xxx functions are for critical statistic or counters. | |
| The implementation is guaranteed to be thread safe, on all platforms. | | The implementation is guaranteed to be thread safe, on all platforms. | |
| Note that the calling code should *not* assume the counter is protected | | Note that the calling code should *not* assume the counter is protected | |
| by the mutex given, as the implementation of these helpers may change | | by the mutex given, as the implementation of these helpers may change | |
|
| to use atomic operations instead. | | to use my_atomic operations instead. | |
| */ | | */ | |
| | | | |
| /* | | /* | |
| Warning: | | Warning: | |
| When compiling without threads, this file is not included. | | When compiling without threads, this file is not included. | |
| See the *other* declarations of thread_safe_xxx in include/my_global.h | | See the *other* declarations of thread_safe_xxx in include/my_global.h | |
| | | | |
| Second warning: | | Second warning: | |
| See include/config-win.h, for yet another implementation. | | See include/config-win.h, for yet another implementation. | |
| */ | | */ | |
| | | | |
End of changes. 20 change blocks. |
| 56 lines changed or deleted | | 23 lines changed or added | |
|
| my_sys.h | | my_sys.h | |
|
| /* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reser
ved. | | /* Copyright (C) 2000-2003 MySQL AB | |
| | | | |
| This program is free software; you can redistribute it and/or modify | | This program is free software; you can redistribute it and/or modify | |
| it under the terms of the GNU General Public License as published by | | it under the terms of the GNU General Public License as published by | |
| the Free Software Foundation; version 2 of the License. | | the Free Software Foundation; version 2 of the License. | |
| | | | |
| This program is distributed in the hope that it will be useful, | | This program is distributed in the hope that it will be useful, | |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| GNU General Public License for more details. | | GNU General Public License for more details. | |
| | | | |
| You should have received a copy of the GNU General Public License | | You should have received a copy of the GNU General Public License | |
| along with this program; if not, write to the Free Software | | along with this program; if not, write to the Free Software | |
|
| Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130
1, USA */ | | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US
A */ | |
| | | | |
| #ifndef _my_sys_h | | #ifndef _my_sys_h | |
| #define _my_sys_h | | #define _my_sys_h | |
| C_MODE_START | | C_MODE_START | |
| | | | |
| #ifdef HAVE_AIOWAIT | | #ifdef HAVE_AIOWAIT | |
| #include <sys/asynch.h> /* Used by record-cache */ | | #include <sys/asynch.h> /* Used by record-cache */ | |
| typedef struct my_aio_result { | | typedef struct my_aio_result { | |
| aio_result_t result; | | aio_result_t result; | |
| int pending; | | int pending; | |
| } my_aio_result; | | } my_aio_result; | |
| #endif | | #endif | |
| | | | |
|
| #ifdef HAVE_VALGRIND | | | |
| # include <valgrind/memcheck.h> | | | |
| # define MEM_UNDEFINED(a,len) VALGRIND_MAKE_MEM_UNDEFINED(a,len) | | | |
| # define MEM_NOACCESS(a,len) VALGRIND_MAKE_MEM_NOACCESS(a,len) | | | |
| # define MEM_CHECK_ADDRESSABLE(a,len) VALGRIND_CHECK_MEM_IS_ADDRESSABLE(a,l | | | |
| en) | | | |
| # define MEM_CHECK_DEFINED(a,len) VALGRIND_CHECK_MEM_IS_DEFINED(a,len) | | | |
| #else /* HAVE_VALGRIND */ | | | |
| # define MEM_UNDEFINED(a,len) ((void) 0) | | | |
| # define MEM_NOACCESS(a,len) ((void) 0) | | | |
| # define MEM_CHECK_ADDRESSABLE(a,len) ((void) 0) | | | |
| # define MEM_CHECK_DEFINED(a,len) ((void) 0) | | | |
| #endif /* HAVE_VALGRIND */ | | | |
| | | | |
| #ifndef THREAD | | #ifndef THREAD | |
| extern int NEAR my_errno; /* Last error in mysys */ | | extern int NEAR my_errno; /* Last error in mysys */ | |
| #else | | #else | |
| #include <my_pthread.h> | | #include <my_pthread.h> | |
| #endif | | #endif | |
| | | | |
| #include <m_ctype.h> /* for CHARSET_INFO */ | | #include <m_ctype.h> /* for CHARSET_INFO */ | |
| #include <stdarg.h> | | #include <stdarg.h> | |
| #include <typelib.h> | | #include <typelib.h> | |
| | | | |
| #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(); } | |
| | | | |
| | | /** | |
| | | Max length of an error message generated by mysys utilities. | |
| | | Some mysys functions produce error messages. These mostly go | |
| | | to stderr. | |
| | | This constant defines the size of the buffer used to format | |
| | | the message. It should be kept in sync with MYSQL_ERRMSG_SIZE, | |
| | | since sometimes mysys errors are stored in the server diagnostics | |
| | | area, and we would like to avoid unexpected truncation. | |
| | | */ | |
| | | #define MYSYS_ERRMSG_SIZE (512) | |
| | | | |
| #define MY_FILE_ERROR ((size_t) -1) | | #define MY_FILE_ERROR ((size_t) -1) | |
| | | | |
| /* General bitmaps for my_func's */ | | /* General bitmaps for my_func's */ | |
| #define MY_FFNF 1 /* Fatal if file not found */ | | #define MY_FFNF 1 /* Fatal if file not found */ | |
| #define MY_FNABP 2 /* Fatal if not all bytes read/writen */ | | #define MY_FNABP 2 /* Fatal if not all bytes read/writen */ | |
| #define MY_NABP 4 /* Error if not all bytes read/write
n */ | | #define MY_NABP 4 /* Error if not all bytes read/write
n */ | |
| #define MY_FAE 8 /* Fatal if any error */ | | #define MY_FAE 8 /* Fatal if any error */ | |
| #define MY_WME 16 /* Write message on error */ | | #define MY_WME 16 /* Write message on error */ | |
| #define MY_WAIT_IF_FULL 32 /* Wait and try again if disk full error */ | | #define MY_WAIT_IF_FULL 32 /* Wait and try again if disk full error */ | |
| | | | |
| skipping to change at line 106 | | skipping to change at line 104 | |
| #define ME_BELL 4 /* Ring bell then printing message *
/ | | #define ME_BELL 4 /* Ring bell then printing message *
/ | |
| #define ME_HOLDTANG 8 /* Don't delete last keys */ | | #define ME_HOLDTANG 8 /* Don't delete last keys */ | |
| #define ME_WAITTOT 16 /* Wait for errtime secs of for a action */ | | #define ME_WAITTOT 16 /* Wait for errtime secs of for a action */ | |
| #define ME_WAITTANG 32 /* Wait for a user action */ | | #define ME_WAITTANG 32 /* Wait for a user action */ | |
| #define ME_NOREFRESH 64 /* Dont refresh screen */ | | #define ME_NOREFRESH 64 /* Dont refresh screen */ | |
| #define ME_NOINPUT 128 /* Dont use the input libary */ | | #define ME_NOINPUT 128 /* Dont use the input libary */ | |
| #define ME_COLOUR1 ((1 << ME_HIGHBYTE)) /* Possibly error-colours */ | | #define ME_COLOUR1 ((1 << ME_HIGHBYTE)) /* Possibly error-colours */ | |
| #define ME_COLOUR2 ((2 << ME_HIGHBYTE)) | | #define ME_COLOUR2 ((2 << ME_HIGHBYTE)) | |
| #define ME_COLOUR3 ((3 << ME_HIGHBYTE)) | | #define ME_COLOUR3 ((3 << ME_HIGHBYTE)) | |
| #define ME_FATALERROR 1024 /* Fatal statement error */ | | #define ME_FATALERROR 1024 /* Fatal statement error */ | |
|
| #define ME_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' */ | |
| | | | |
| skipping to change at line 156 | | skipping to change at line 152 | |
| /* 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_strndup(A,B,C) _my_strndup((A),(B),__FILE__,__LINE__,C) | | #define my_strndup(A,B,C) _my_strndup((A),(B),__FILE__,__LINE__,C) | |
|
| #define TRASH(A,B) do { bfill(A, B, 0x8F); MEM_UNDEFINED(A, B); } while (0) | | #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() | |
| | | | |
| skipping to change at line 184 | | skipping to change at line 180 | |
| extern void my_no_flags_free(void *ptr); | | extern void my_no_flags_free(void *ptr); | |
| extern void *my_memdup(const void *from,size_t length,myf MyFlags); | | extern void *my_memdup(const void *from,size_t length,myf MyFlags); | |
| extern char *my_strdup(const char *from,myf MyFlags); | | extern char *my_strdup(const char *from,myf MyFlags); | |
| extern char *my_strndup(const char *from, size_t length, | | extern char *my_strndup(const char *from, size_t length, | |
| myf MyFlags); | | myf MyFlags); | |
| /* 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) do{MEM_CHECK_ADDRESSABLE(A,B);MEM_UNDEFINED(A,B);} while
(0) | | #define TRASH(A,B) /* nothing */ | |
| #endif | | #endif | |
| | | | |
| #if defined(ENABLED_DEBUG_SYNC) | | #if defined(ENABLED_DEBUG_SYNC) | |
| extern void (*debug_sync_C_callback_ptr)(const char *, size_t); | | extern void (*debug_sync_C_callback_ptr)(const char *, size_t); | |
| #define DEBUG_SYNC_C(_sync_point_name_) do { \ | | #define DEBUG_SYNC_C(_sync_point_name_) do { \ | |
| if (debug_sync_C_callback_ptr != NULL) \ | | if (debug_sync_C_callback_ptr != NULL) \ | |
| (*debug_sync_C_callback_ptr)(STRING_WITH_LEN(_sync_point_name_)); } \ | | (*debug_sync_C_callback_ptr)(STRING_WITH_LEN(_sync_point_name_)); } \ | |
| while(0) | | while(0) | |
| #else | | #else | |
| #define DEBUG_SYNC_C(_sync_point_name_) | | #define DEBUG_SYNC_C(_sync_point_name_) | |
| | | | |
| skipping to change at line 235 | | skipping to change at line 231 | |
| #ifndef errno /* did we already get it? */ | | #ifndef errno /* did we already get it? */ | |
| #ifdef HAVE_ERRNO_AS_DEFINE | | #ifdef HAVE_ERRNO_AS_DEFINE | |
| #include <errno.h> /* errno is a define */ | | #include <errno.h> /* errno is a define */ | |
| #else | | #else | |
| extern int errno; /* declare errno */ | | extern int errno; /* declare errno */ | |
| #endif | | #endif | |
| #endif /* #ifndef errno */ | | #endif /* #ifndef errno */ | |
| extern char *home_dir; /* Home directory for user */ | | extern char *home_dir; /* Home directory for user */ | |
| extern const char *my_progname; /* program-name (printed in
errors) */ | | extern const char *my_progname; /* program-name (printed in
errors) */ | |
| extern char 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 void (*error_handler_hook)(uint my_err, const char *str,myf MyFlags) | |
| extern void(*sql_print_warning_hook)(const char *format,...); | | ; | |
| extern int (*fatal_error_handler_hook)(uint my_err, const char *str, | | extern void (*fatal_error_handler_hook)(uint my_err, const char *str, | |
| myf MyFlags); | | myf MyFlags); | |
| extern uint my_file_limit; | | extern uint my_file_limit; | |
| extern ulong my_thread_stack_size; | | extern ulong my_thread_stack_size; | |
| | | | |
| #ifdef HAVE_LARGE_PAGES | | #ifdef HAVE_LARGE_PAGES | |
| extern my_bool my_use_large_pages; | | extern my_bool my_use_large_pages; | |
| extern uint my_large_page_size; | | extern uint my_large_page_size; | |
| #endif | | #endif | |
| | | | |
| /* charsets */ | | /* charsets */ | |
|
| | | #define MY_ALL_CHARSETS_SIZE 2048 | |
| extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *default_charset_info; | | extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *default_charset_info; | |
|
| extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *all_charsets[256]; | | extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *all_charsets[MY_ALL_CHARSETS_SIZE]
; | |
| 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 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), | |
| | | | |
| skipping to change at line 337 | | skipping to change at line 333 | |
| } 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 | |
| { | | { | |
|
| char * name; | | char *name; | |
| enum file_type type; | | #ifdef _WIN32 | |
| #if defined(THREAD) && !defined(HAVE_PREAD) | | HANDLE fhandle; /* win32 file handle */ | |
| | | int oflag; /* open flags, e.g O_APPEND */ | |
| | | #endif | |
| | | enum file_type type; | |
| | | #if defined(THREAD) && !defined(HAVE_PREAD) && !defined(_WIN32) | |
| 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 | |
| { | | { | |
| uchar *buffer; | | uchar *buffer; | |
| uint elements,max_element; | | uint elements,max_element; | |
| | | | |
| skipping to change at line 642 | | skipping to change at line 642 | |
| extern char * _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_strndup(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 _WIN32 | |
| 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); | | | |
| #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); | | extern int check_if_legal_tablename(const char *path); | |
|
| extern my_bool is_filename_allowed(const char *name, size_t length); | | | |
| | | | |
|
| #if defined(__WIN__) && defined(__NT__) | | #ifdef _WIN32 | |
| extern int nt_share_delete(const char *name,myf MyFlags); | | extern int nt_share_delete(const char *name,myf MyFlags); | |
| #define my_delete_allow_opened(fname,flags) nt_share_delete((fname),(flags
)) | | #define my_delete_allow_opened(fname,flags) nt_share_delete((fname),(flags
)) | |
| #else | | #else | |
| #define my_delete_allow_opened(fname,flags) my_delete((fname),(flags)) | | #define my_delete_allow_opened(fname,flags) my_delete((fname),(flags)) | |
| #endif | | #endif | |
| | | | |
|
| | | #ifdef _WIN32 | |
| | | /* Windows-only functions (CRT equivalents)*/ | |
| | | extern File my_sopen(const char *path, int oflag, int shflag, int pmode | |
| | | ); | |
| | | extern HANDLE my_get_osfhandle(File fd); | |
| | | extern void my_osmaperr(unsigned long last_error); | |
| | | #endif | |
| | | | |
| #ifndef TERMINATE | | #ifndef TERMINATE | |
| extern void TERMINATE(FILE *file, uint flag); | | extern void TERMINATE(FILE *file, uint flag); | |
| #endif | | #endif | |
| extern void init_glob_errs(void); | | extern void init_glob_errs(void); | |
|
| | | extern const char** get_global_errmsgs(); | |
| extern void wait_for_free_space(const char *filename, int errors); | | extern void wait_for_free_space(const char *filename, int errors); | |
| extern FILE *my_fopen(const char *FileName,int Flags,myf MyFlags); | | extern FILE *my_fopen(const char *FileName,int Flags,myf MyFlags); | |
| extern FILE *my_fdopen(File Filedes,const char *name, int Flags,myf MyFlags
); | | extern FILE *my_fdopen(File Filedes,const char *name, int Flags,myf MyFlags
); | |
|
| extern FILE *my_freopen(const char *path, const char *mode, FILE *stream); | | | |
| extern int my_fclose(FILE *fd,myf MyFlags); | | extern int my_fclose(FILE *fd,myf MyFlags); | |
|
| | | extern File my_fileno(FILE *fd); | |
| extern int my_chsize(File fd,my_off_t newlength, int filler, myf MyFlags); | | extern int my_chsize(File fd,my_off_t newlength, int filler, myf MyFlags); | |
| extern int my_sync(File fd, myf my_flags); | | extern int my_sync(File fd, myf my_flags); | |
| extern int my_sync_dir(const char *dir_name, myf my_flags); | | extern int my_sync_dir(const char *dir_name, myf my_flags); | |
| extern int my_sync_dir_by_file(const char *file_name, myf my_flags); | | extern int my_sync_dir_by_file(const char *file_name, myf my_flags); | |
|
| extern int my_error _VARARGS((int nr,myf MyFlags, ...)); | | extern void my_error _VARARGS((int nr,myf MyFlags, ...)); | |
| extern int my_printf_error _VARARGS((uint my_err, const char *format, | | extern void my_printf_error _VARARGS((uint my_err, const char *format, | |
| myf MyFlags, ...)) | | myf MyFlags, ...)) | |
| ATTRIBUTE_FORMAT(printf, 2, 4); | | ATTRIBUTE_FORMAT(printf, 2, 4); | |
| extern void my_printf_warning _VARARGS((const char * format, ...)); | | extern void my_printv_error(uint error, const char *format, myf MyFlags, | |
| extern int my_error_register(const char **errmsgs, int first, int last); | | va_list ap); | |
| | | extern int my_error_register(const char** (*get_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 void 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 void 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 void 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 char * my_filename(File fd); | | extern char * my_filename(File fd); | |
| | | | |
| #ifndef THREAD | | #ifndef THREAD | |
| extern void dont_break(void); | | extern void dont_break(void); | |
| extern void allow_break(void); | | extern void allow_break(void); | |
| #else | | #else | |
| | | | |
| skipping to change at line 870 | | skipping to change at line 879 | |
| extern void free_root(MEM_ROOT *root, myf MyFLAGS); | | extern void free_root(MEM_ROOT *root, myf MyFLAGS); | |
| extern void set_prealloc_root(MEM_ROOT *root, char *ptr); | | extern void set_prealloc_root(MEM_ROOT *root, char *ptr); | |
| extern void reset_root_defaults(MEM_ROOT *mem_root, size_t block_size, | | extern void reset_root_defaults(MEM_ROOT *mem_root, size_t block_size, | |
| size_t prealloc_size); | | size_t prealloc_size); | |
| extern char *strdup_root(MEM_ROOT *root,const char *str); | | extern char *strdup_root(MEM_ROOT *root,const char *str); | |
| extern char *strmake_root(MEM_ROOT *root,const char *str,size_t len); | | extern char *strmake_root(MEM_ROOT *root,const char *str,size_t len); | |
| extern void *memdup_root(MEM_ROOT *root,const void *str, size_t len); | | extern void *memdup_root(MEM_ROOT *root,const void *str, size_t len); | |
| extern int get_defaults_options(int argc, char **argv, | | extern int get_defaults_options(int argc, char **argv, | |
| char **defaults, char **extra_defaults, | | char **defaults, char **extra_defaults, | |
| char **group_suffix); | | char **group_suffix); | |
|
| | | extern const char *args_separator; | |
| extern int my_load_defaults(const char *conf_file, const char **groups, | | extern int my_load_defaults(const char *conf_file, const char **groups, | |
| int *argc, char ***argv, const char ***); | | int *argc, char ***argv, const char ***); | |
| extern int load_defaults(const char *conf_file, const char **groups, | | extern int load_defaults(const char *conf_file, const char **groups, | |
| int *argc, char ***argv); | | int *argc, char ***argv); | |
| extern int modify_defaults_file(const char *file_location, const char *opti
on, | | 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, | |
| | | | |
| skipping to change at line 967 | | skipping to change at line 977 | |
| extern CHARSET_INFO *get_charset_by_name(const char *cs_name, myf flags); | | extern CHARSET_INFO *get_charset_by_name(const char *cs_name, myf flags); | |
| extern CHARSET_INFO *get_charset_by_csname(const char *cs_name, | | extern CHARSET_INFO *get_charset_by_csname(const char *cs_name, | |
| uint cs_flags, myf my_flags); | | uint cs_flags, myf my_flags); | |
| | | | |
| extern my_bool resolve_charset(const char *cs_name, | | extern my_bool resolve_charset(const char *cs_name, | |
| CHARSET_INFO *default_cs, | | CHARSET_INFO *default_cs, | |
| CHARSET_INFO **cs); | | CHARSET_INFO **cs); | |
| extern my_bool resolve_collation(const char *cl_name, | | extern my_bool resolve_collation(const char *cl_name, | |
| CHARSET_INFO *default_cl, | | CHARSET_INFO *default_cl, | |
| CHARSET_INFO **cl); | | CHARSET_INFO **cl); | |
|
| | | | |
| extern void free_charsets(void); | | extern void free_charsets(void); | |
| extern char *get_charsets_dir(char *buf); | | extern char *get_charsets_dir(char *buf); | |
| extern my_bool my_charset_same(CHARSET_INFO *cs1, CHARSET_INFO *cs2); | | extern my_bool my_charset_same(CHARSET_INFO *cs1, CHARSET_INFO *cs2); | |
| extern my_bool init_compiled_charsets(myf flags); | | extern my_bool init_compiled_charsets(myf flags); | |
| extern void add_compiled_collation(CHARSET_INFO *cs); | | extern void add_compiled_collation(CHARSET_INFO *cs); | |
| extern size_t escape_string_for_mysql(CHARSET_INFO *charset_info, | | extern size_t escape_string_for_mysql(CHARSET_INFO *charset_info, | |
| char *to, size_t to_length, | | char *to, size_t to_length, | |
| const char *from, size_t length); | | const char *from, size_t length); | |
| #ifdef __WIN__ | | #ifdef __WIN__ | |
| #define BACKSLASH_MBTAIL | | #define BACKSLASH_MBTAIL | |
| | | | |
End of changes. 23 change blocks. |
| 44 lines changed or deleted | | 55 lines changed or added | |
|
| mysql.h | | mysql.h | |
|
| /* | | /* Copyright (C) 2000-2003 MySQL AB | |
| Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reser | | | |
| ved. | | | |
| | | | |
| This program is free software; you can redistribute it and/or modify | | This program is free software; you can redistribute it and/or modify | |
| it under the terms of the GNU General Public License as published by | | it under the terms of the GNU General Public License as published by | |
| the Free Software Foundation; version 2 of the License. | | the Free Software Foundation; version 2 of the License. | |
| | | | |
| This program is distributed in the hope that it will be useful, | | This program is distributed in the hope that it will be useful, | |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| GNU General Public License for more details. | | GNU General Public License for more details. | |
| | | | |
| You should have received a copy of the GNU General Public License | | You should have received a copy of the GNU General Public License | |
| along with this program; if not, write to the Free Software | | along with this program; if not, write to the Free Software | |
|
| Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 US | | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US | |
| A | | A */ | |
| */ | | | |
| | | | |
| /* | | /* | |
| This file defines the client API to MySQL and also the ABI of the | | This file defines the client API to MySQL and also the ABI of the | |
| dynamically linked libmysqlclient. | | dynamically linked libmysqlclient. | |
| | | | |
| The ABI should never be changed in a released product of MySQL | | The ABI should never be changed in a released product of MySQL | |
| thus you need to take great care when changing the file. In case | | thus you need to take great care when changing the file. In case | |
| the file is changed so the ABI is broken, you must also | | the file is changed so the ABI is broken, you must also | |
| update the SHAREDLIB_MAJOR_VERSION in configure.in . | | update the SHAREDLIB_MAJOR_VERSION in configure.in . | |
| | | | |
| | | | |
| skipping to change at line 49 | | skipping to change at line 47 | |
| #undef _WIN32 | | #undef _WIN32 | |
| #undef _WIN64 | | #undef _WIN64 | |
| #undef __WIN__ | | #undef __WIN__ | |
| #endif | | #endif | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
| #ifndef _global_h /* If not standard header */ | | #ifndef _global_h /* If not standard header */ | |
|
| #ifndef MYSQL_ABI_CHECK | | | |
| #include <sys/types.h> | | #include <sys/types.h> | |
|
| #endif | | | |
| #ifdef __LCC__ | | #ifdef __LCC__ | |
| #include <winsock2.h> /* For windows */ | | #include <winsock2.h> /* For windows */ | |
| #endif | | #endif | |
| typedef char my_bool; | | typedef char my_bool; | |
| #if (defined(_WIN32) || defined(_WIN64)) && !defined(__WIN__) | | #if (defined(_WIN32) || defined(_WIN64)) && !defined(__WIN__) | |
| #define __WIN__ | | #define __WIN__ | |
| #endif | | #endif | |
| #if !defined(__WIN__) | | #if !defined(__WIN__) | |
| #define STDCALL | | #define STDCALL | |
| #else | | #else | |
| | | | |
| skipping to change at line 93 | | skipping to change at line 89 | |
| #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) <= MYSQL_TYPE_INT24 || (t) == MYSQL_TYPE_YEAR | | | /** | |
| | (t) == MYSQL_TYPE_NEWDECIMAL) | | Returns true if the value is a number which does not need quotes for | |
| #define IS_NUM_FIELD(f) ((f)->flags & NUM_FLAG) | | the sql_lex.cc parser to parse correctly. | |
| #define INTERNAL_NUM_FIELD(f) (((f)->type <= MYSQL_TYPE_INT24 && ((f)->type | | */ | |
| != MYSQL_TYPE_TIMESTAMP || (f)->length == 14 || (f)->length == 8)) || (f)- | | #define IS_NUM(t) (((t) <= MYSQL_TYPE_INT24 && (t) != MYSQL_TYPE_TIMES | |
| >type == MYSQL_TYPE_YEAR) | | TAMP) || (t) == MYSQL_TYPE_YEAR || (t) == MYSQL_TYPE_NEWDECIMAL) | |
| #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 192 | | skipping to change at line 190 | |
| char *my_cnf_file,*my_cnf_group, *charset_dir, *charset_name; | | char *my_cnf_file,*my_cnf_group, *charset_dir, *charset_name; | |
| char *ssl_key; /* PEM key file */ | | char *ssl_key; /* PEM key file */ | |
| char *ssl_cert; /* PEM cert file */ | | char *ssl_cert; /* PEM cert file */ | |
| char *ssl_ca; /* PEM CA file */ | | char *ssl_ca; /* PEM CA file */ | |
| char *ssl_capath; /* PEM directory of CA-s? */ | | char *ssl_capath; /* PEM directory of CA-s? */ | |
| char *ssl_cipher; /* cipher to use */ | | char *ssl_cipher; /* cipher to use */ | |
| char *shared_memory_base_name; | | char *shared_memory_base_name; | |
| unsigned long max_allowed_packet; | | unsigned long max_allowed_packet; | |
| my_bool use_ssl; /* if to use SSL or not */ | | my_bool use_ssl; /* if to use SSL or not */ | |
| my_bool compress,named_pipe; | | my_bool compress,named_pipe; | |
|
| /* | | my_bool unused1; | |
| On connect, find out the replication role of the server, and | | my_bool unused2; | |
| establish connections to all the peers | | my_bool unused3; | |
| */ | | my_bool unused4; | |
| my_bool rpl_probe; | | | |
| /* | | | |
| Each call to mysql_real_query() will parse it to tell if it is a read | | | |
| or a write, and direct it to the slave or the master | | | |
| */ | | | |
| my_bool rpl_parse; | | | |
| /* | | | |
| If set, never read from a master, only from slave, when doing | | | |
| a read that is replication-aware | | | |
| */ | | | |
| my_bool no_master_reads; | | | |
| #if !defined(CHECK_EMBEDDED_DIFFERENCES) || defined(EMBEDDED_LIBRARY) | | | |
| my_bool separate_thread; | | | |
| #endif | | | |
| enum mysql_option methods_to_use; | | enum mysql_option methods_to_use; | |
| char *client_ip; | | char *client_ip; | |
| /* Refuse client connecting to server if it uses old (pre-4.1.1) protocol
*/ | | /* Refuse client connecting to server if it uses old (pre-4.1.1) protocol
*/ | |
| 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; | | 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 | |
| MYSQL_STATUS_STATEMENT_GET_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, | |
| MYSQL_PROTOCOL_PIPE, MYSQL_PROTOCOL_MEMORY | | MYSQL_PROTOCOL_PIPE, MYSQL_PROTOCOL_MEMORY | |
| }; | | }; | |
|
| /* | | | |
| There are three types of queries - the ones that have to go to | | | |
| the master, the ones that go to a slave, and the adminstrative | | | |
| type which must happen on the pivot connectioin | | | |
| */ | | | |
| enum mysql_rpl_type | | | |
| { | | | |
| MYSQL_RPL_MASTER, MYSQL_RPL_SLAVE, MYSQL_RPL_ADMIN | | | |
| }; | | | |
| | | | |
| typedef struct character_set | | typedef struct character_set | |
| { | | { | |
| unsigned int number; /* character set number */ | | unsigned int number; /* character set number */ | |
| unsigned int state; /* character set state */ | | unsigned int state; /* character set state */ | |
| const char *csname; /* collation name */ | | const char *csname; /* collation name */ | |
| const char *name; /* character set name */ | | const char *name; /* character set name */ | |
| const char *comment; /* comment */ | | const char *comment; /* comment */ | |
| const char *dir; /* character set directory */ | | const char *dir; /* character set directory */ | |
| unsigned int mbminlen; /* min. length for multibyte strings */ | | unsigned int mbminlen; /* min. length for multibyte strings */ | |
| | | | |
| skipping to change at line 290 | | skipping to change at line 264 | |
| unsigned int server_status; | | unsigned int server_status; | |
| unsigned int server_language; | | unsigned int server_language; | |
| unsigned int warning_count; | | unsigned int warning_count; | |
| struct st_mysql_options options; | | struct st_mysql_options options; | |
| enum mysql_status status; | | enum mysql_status status; | |
| my_bool free_me; /* If free in mysql_close */ | | my_bool free_me; /* If free in mysql_close */ | |
| my_bool reconnect; /* set to 1 if automatic reconnect *
/ | | my_bool reconnect; /* set to 1 if automatic reconnect *
/ | |
| | | | |
| /* session-wide random string */ | | /* session-wide random string */ | |
| char scramble[SCRAMBLE_LENGTH+1]; | | char scramble[SCRAMBLE_LENGTH+1]; | |
|
| | | my_bool unused1; | |
| /* | | void *unused2, *unused3, *unused4, *unused5; | |
| Set if this is the original connection, not a master or a slave we have | | | |
| added though mysql_rpl_probe() or mysql_set_master()/ mysql_add_slave() | | | |
| */ | | | |
| my_bool rpl_pivot; | | | |
| /* | | | |
| Pointers to the master, and the next slave connections, points to | | | |
| itself if lone connection. | | | |
| */ | | | |
| struct st_mysql* master, *next_slave; | | | |
| | | | |
| struct st_mysql* last_used_slave; /* needed for round-robin slave pick */ | | | |
| /* needed for send/read/store/use result to work correctly with replicatio | | | |
| n */ | | | |
| 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; | |
| /* needed for embedded server - no net buffer to store the 'info' */ | | /* needed for embedded server - no net buffer to store the 'info' */ | |
| | | | |
| skipping to change at line 337 | | skipping to change at line 298 | |
| 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; | | MEM_ROOT field_alloc; | |
| unsigned int field_count, current_field; | | 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; | |
| void *extension; | | void *extension; | |
| } MYSQL_RES; | | } MYSQL_RES; | |
| | | | |
|
| #define MAX_MYSQL_MANAGER_ERR 256 | | | |
| #define MAX_MYSQL_MANAGER_MSG 256 | | | |
| | | | |
| #define MANAGER_OK 200 | | | |
| #define MANAGER_INFO 250 | | | |
| #define MANAGER_ACCESS 401 | | | |
| #define MANAGER_CLIENT_ERR 450 | | | |
| #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 | | | |
| { | | | |
| NET net; | | | |
| char *host, *user, *passwd; | | | |
| char *net_buf, *net_buf_pos, *net_data_end; | | | |
| unsigned int port; | | | |
| int cmd_status; | | | |
| int last_errno; | | | |
| int net_buf_size; | | | |
| my_bool free_me; | | | |
| my_bool eof; | | | |
| char last_error[MAX_MYSQL_MANAGER_ERR]; | | | |
| void *extension; | | | |
| } 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; | | 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) | |
| | | | |
| skipping to change at line 457 | | skipping to change at line 394 | |
| unsigned long clientflag); | | unsigned long clientflag); | |
| int STDCALL mysql_select_db(MYSQL *mysql, const char *db); | | int STDCALL mysql_select_db(MYSQL *mysql, const char *db); | |
| int STDCALL mysql_query(MYSQL *mysql, const char *q); | | int STDCALL mysql_query(MYSQL *mysql, const char *q); | |
| int STDCALL mysql_send_query(MYSQL *mysql, const char *q, | | int STDCALL mysql_send_query(MYSQL *mysql, const char *q, | |
| unsigned long length); | | unsigned long length); | |
| int STDCALL mysql_real_query(MYSQL *mysql, const char *q, | | int STDCALL mysql_real_query(MYSQL *mysql, const char *q, | |
| unsigned long length); | | unsigned long length); | |
| MYSQL_RES * STDCALL mysql_store_result(MYSQL *mysql); | | MYSQL_RES * STDCALL mysql_store_result(MYSQL *mysql); | |
| MYSQL_RES * STDCALL mysql_use_result(MYSQL *mysql); | | MYSQL_RES * STDCALL mysql_use_result(MYSQL *mysql); | |
| | | | |
|
| /* perform query on master */ | | | |
| my_bool STDCALL mysql_master_query(MYSQL *mysql, const char | | | |
| *q, | | | |
| unsigned long length); | | | |
| my_bool STDCALL mysql_master_send_query(MYSQL *mysql, const | | | |
| char *q, | | | |
| unsigned long length); | | | |
| /* perform query on slave */ | | | |
| my_bool STDCALL mysql_slave_query(MYSQL *mysql, const char * | | | |
| q, | | | |
| unsigned long length); | | | |
| my_bool STDCALL mysql_slave_send_query(MYSQL *mysql, const c | | | |
| har *q, | | | |
| unsigned long length); | | | |
| void STDCALL mysql_get_character_set_info(MYSQL *mysql, | | void STDCALL mysql_get_character_set_info(MYSQL *mysql, | |
| MY_CHARSET_INFO *charset); | | MY_CHARSET_INFO *charset); | |
| | | | |
| /* local infile support */ | | /* local infile support */ | |
| | | | |
| #define LOCAL_INFILE_ERROR_LEN 512 | | #define LOCAL_INFILE_ERROR_LEN 512 | |
| | | | |
| void | | void | |
| mysql_set_local_infile_handler(MYSQL *mysql, | | mysql_set_local_infile_handler(MYSQL *mysql, | |
| int (*local_infile_init)(void **, const char
*, | | int (*local_infile_init)(void **, const char
*, | |
| | | | |
| skipping to change at line 488 | | skipping to change at line 415 | |
| int (*local_infile_read)(void *, char *, | | int (*local_infile_read)(void *, char *, | |
| unsigned int), | | unsigned int), | |
| void (*local_infile_end)(void *), | | void (*local_infile_end)(void *), | |
| int (*local_infile_error)(void *, char*, | | int (*local_infile_error)(void *, char*, | |
| unsigned int), | | unsigned int), | |
| void *); | | void *); | |
| | | | |
| void | | void | |
| mysql_set_local_infile_default(MYSQL *mysql); | | mysql_set_local_infile_default(MYSQL *mysql); | |
| | | | |
|
| /* | | | |
| enable/disable parsing of all queries to decide if they go on master or | | | |
| slave | | | |
| */ | | | |
| void STDCALL mysql_enable_rpl_parse(MYSQL* mysql); | | | |
| void STDCALL mysql_disable_rpl_parse(MYSQL* mysql); | | | |
| /* get the value of the parse flag */ | | | |
| int STDCALL mysql_rpl_parse_enabled(MYSQL* mysql); | | | |
| | | | |
| /* enable/disable reads from master */ | | | |
| void STDCALL mysql_enable_reads_from_master(MYSQL* mysql); | | | |
| void STDCALL mysql_disable_reads_from_master(MYSQL* mysql); | | | |
| /* get the value of the master read flag */ | | | |
| my_bool STDCALL mysql_reads_from_master_enabled(MYSQL* mysql | | | |
| ); | | | |
| | | | |
| enum mysql_rpl_type STDCALL mysql_rpl_query_type(const char* q, int len | | | |
| ); | | | |
| | | | |
| /* discover the master and its slaves */ | | | |
| my_bool STDCALL mysql_rpl_probe(MYSQL* mysql); | | | |
| | | | |
| /* set the master, close/free the old one, if it is not a pivot */ | | | |
| int STDCALL mysql_set_master(MYSQL* mysql, const char* host, | | | |
| unsigned int port, | | | |
| const char* user, | | | |
| const char* passwd); | | | |
| int STDCALL mysql_add_slave(MYSQL* mysql, const char* host, | | | |
| unsigned int port, | | | |
| const char* user, | | | |
| const char* passwd); | | | |
| | | | |
| int STDCALL mysql_shutdown(MYSQL *mysql, | | int STDCALL mysql_shutdown(MYSQL *mysql, | |
| enum mysql_enum_shutdown_level | | enum mysql_enum_shutdown_level | |
| shutdown_level); | | shutdown_level); | |
| int STDCALL mysql_dump_debug_info(MYSQL *mysql); | | int STDCALL mysql_dump_debug_info(MYSQL *mysql); | |
| int STDCALL mysql_refresh(MYSQL *mysql, | | int STDCALL mysql_refresh(MYSQL *mysql, | |
| unsigned int refresh_options); | | unsigned int refresh_options); | |
| int STDCALL mysql_kill(MYSQL *mysql,unsigned long pid); | | int STDCALL mysql_kill(MYSQL *mysql,unsigned long pid); | |
| int STDCALL mysql_set_server_option(MYSQL *mysql, | | int STDCALL mysql_set_server_option(MYSQL *mysql, | |
| enum enum_mysql_set_option | | enum enum_mysql_set_option | |
| option); | | option); | |
| | | | |
| skipping to change at line 561 | | skipping to change at line 458 | |
| MYSQL_RES * STDCALL mysql_list_fields(MYSQL *mysql, const char *table, | | MYSQL_RES * STDCALL mysql_list_fields(MYSQL *mysql, const char *table, | |
| const char *wild); | | const char *wild); | |
| unsigned long STDCALL mysql_escape_string(char *to,const char *from, | | unsigned long STDCALL mysql_escape_string(char *to,const char *from, | |
| unsigned long from_length); | | unsigned long from_length); | |
| unsigned long STDCALL mysql_hex_string(char *to,const char *from, | | unsigned long STDCALL mysql_hex_string(char *to,const char *from, | |
| unsigned long from_length); | | unsigned long from_length); | |
| unsigned long STDCALL mysql_real_escape_string(MYSQL *mysql, | | unsigned long STDCALL mysql_real_escape_string(MYSQL *mysql, | |
| char *to,const char *from, | | char *to,const char *from, | |
| unsigned long length); | | unsigned long length); | |
| void STDCALL mysql_debug(const char *debug); | | void STDCALL mysql_debug(const char *debug); | |
|
| | | char * STDCALL mysql_odbc_escape_string(MYSQL *mysql, | |
| | | char *to, | |
| | | unsigned long to_length, | |
| | | const char *from, | |
| | | unsigned long from_length, | |
| | | void *param, | |
| | | char * | |
| | | (*extend_buffer) | |
| | | (void *, char *to, | |
| | | unsigned long *length)); | |
| void STDCALL myodbc_remove_escape(MYSQL *mysql,char *name); | | void STDCALL myodbc_remove_escape(MYSQL *mysql,char *name); | |
| unsigned int STDCALL mysql_thread_safe(void); | | unsigned int STDCALL mysql_thread_safe(void); | |
| my_bool STDCALL mysql_embedded(void); | | my_bool STDCALL mysql_embedded(void); | |
|
| MYSQL_MANAGER* STDCALL mysql_manager_init(MYSQL_MANAGER* con); | | | |
| MYSQL_MANAGER* STDCALL mysql_manager_connect(MYSQL_MANAGER* con, | | | |
| const char* host, | | | |
| const char* user, | | | |
| const char* passwd, | | | |
| unsigned int port); | | | |
| void STDCALL mysql_manager_close(MYSQL_MANAGER* con); | | | |
| int STDCALL mysql_manager_command(MYSQL_MANAGER* con, | | | |
| const char* cmd, int cmd_len | | | |
| ); | | | |
| int STDCALL mysql_manager_fetch_line(MYSQL_MANAGER* con, | | | |
| char* res_buf, | | | |
| int res_buf_size); | | | |
| my_bool STDCALL mysql_read_query_result(MYSQL *mysql); | | my_bool STDCALL mysql_read_query_result(MYSQL *mysql); | |
| | | | |
| /* | | /* | |
| The following definitions are added for the enhanced | | The following definitions are added for the enhanced | |
| client-server protocol | | client-server protocol | |
| */ | | */ | |
| | | | |
| /* statement state */ | | /* statement state */ | |
| enum enum_mysql_stmt_state | | enum enum_mysql_stmt_state | |
| { | | { | |
| | | | |
| skipping to change at line 766 | | skipping to change at line 661 | |
| unsigned long header_length, | | unsigned long header_length, | |
| const unsigned 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, my_bool flush_all_results); | |
| #if !defined(MYSQL_SERVER) || defined(EMBEDDED_LIBRARY) | | #if !defined(MYSQL_SERVER) || defined(EMBEDDED_LIBRARY) | |
| MYSQL_FIELD * (*list_fields)(MYSQL *mysql); | | MYSQL_FIELD * (*list_fields)(MYSQL *mysql); | |
| my_bool (*read_prepare_result)(MYSQL *mysql, MYSQL_STMT *stmt); | | my_bool (*read_prepare_result)(MYSQL *mysql, MYSQL_STMT *stmt); | |
| int (*stmt_execute)(MYSQL_STMT *stmt); | | int (*stmt_execute)(MYSQL_STMT *stmt); | |
| int (*read_binary_rows)(MYSQL_STMT *stmt); | | int (*read_binary_rows)(MYSQL_STMT *stmt); | |
| int (*unbuffered_fetch)(MYSQL *mysql, char **row); | | int (*unbuffered_fetch)(MYSQL *mysql, char **row); | |
| void (*free_embedded_thd)(MYSQL *mysql); | | void (*free_embedded_thd)(MYSQL *mysql); | |
| const char *(*read_statistics)(MYSQL *mysql); | | const char *(*read_statistics)(MYSQL *mysql); | |
| my_bool (*next_result)(MYSQL *mysql); | | my_bool (*next_result)(MYSQL *mysql); | |
| int (*read_change_user_result)(MYSQL *mysql, char *buff, const char *pass
wd); | | int (*read_change_user_result)(MYSQL *mysql, char *buff, const char *pass
wd); | |
| | | | |
| skipping to change at line 825 | | skipping to change at line 720 | |
| my_ulonglong STDCALL mysql_stmt_num_rows(MYSQL_STMT *stmt); | | my_ulonglong STDCALL mysql_stmt_num_rows(MYSQL_STMT *stmt); | |
| my_ulonglong STDCALL mysql_stmt_affected_rows(MYSQL_STMT *stmt); | | my_ulonglong STDCALL mysql_stmt_affected_rows(MYSQL_STMT *stmt); | |
| my_ulonglong STDCALL mysql_stmt_insert_id(MYSQL_STMT *stmt); | | my_ulonglong STDCALL mysql_stmt_insert_id(MYSQL_STMT *stmt); | |
| unsigned int STDCALL mysql_stmt_field_count(MYSQL_STMT *stmt); | | unsigned int STDCALL mysql_stmt_field_count(MYSQL_STMT *stmt); | |
| | | | |
| my_bool STDCALL mysql_commit(MYSQL * mysql); | | my_bool STDCALL mysql_commit(MYSQL * mysql); | |
| my_bool STDCALL mysql_rollback(MYSQL * mysql); | | my_bool STDCALL mysql_rollback(MYSQL * mysql); | |
| my_bool STDCALL mysql_autocommit(MYSQL * mysql, my_bool auto_mode); | | my_bool STDCALL mysql_autocommit(MYSQL * mysql, my_bool auto_mode); | |
| my_bool STDCALL mysql_more_results(MYSQL *mysql); | | my_bool STDCALL mysql_more_results(MYSQL *mysql); | |
| int STDCALL mysql_next_result(MYSQL *mysql); | | int STDCALL mysql_next_result(MYSQL *mysql); | |
|
| | | int STDCALL mysql_stmt_next_result(MYSQL_STMT *stmt); | |
| void STDCALL mysql_close(MYSQL *sock); | | void STDCALL mysql_close(MYSQL *sock); | |
| | | | |
| /* status return codes */ | | /* status return codes */ | |
| #define MYSQL_NO_DATA 100 | | #define MYSQL_NO_DATA 100 | |
| #define MYSQL_DATA_TRUNCATED 101 | | #define MYSQL_DATA_TRUNCATED 101 | |
| | | | |
| #define mysql_reload(mysql) mysql_refresh((mysql),REFRESH_GRANT) | | #define mysql_reload(mysql) mysql_refresh((mysql),REFRESH_GRANT) | |
| | | | |
| #ifdef USE_OLD_FUNCTIONS | | #ifdef USE_OLD_FUNCTIONS | |
| MYSQL * STDCALL mysql_connect(MYSQL *mysql, const char *host
, | | MYSQL * STDCALL mysql_connect(MYSQL *mysql, const char *host
, | |
| const char *user, const char *passwd); | | const char *user, const char *passwd); | |
| int STDCALL mysql_create_db(MYSQL *mysql, const char *DB); | | int STDCALL mysql_create_db(MYSQL *mysql, const char *DB); | |
| int STDCALL mysql_drop_db(MYSQL *mysql, const char *DB); | | int STDCALL mysql_drop_db(MYSQL *mysql, const char *DB); | |
|
| #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, 0, \ | | (*(mysql)->methods->advanced_command)(mysql, command, 0, \ | |
| | | | |
End of changes. 18 change blocks. |
| 144 lines changed or deleted | | 28 lines changed or added | |
|
| mysql_com.h | | mysql_com.h | |
|
| /* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reser
ved. | | /* Copyright (C) 2000 MySQL AB | |
| | | | |
| This program is free software; you can redistribute it and/or modify | | This program is free software; you can redistribute it and/or modify | |
| it under the terms of the GNU General Public License as published by | | it under the terms of the GNU General Public License as published by | |
| the Free Software Foundation; version 2 of the License. | | the Free Software Foundation; version 2 of the License. | |
| | | | |
| This program is distributed in the hope that it will be useful, | | This program is distributed in the hope that it will be useful, | |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| GNU General Public License for more details. | | GNU General Public License for more details. | |
| | | | |
| You should have received a copy of the GNU General Public License | | You should have received a copy of the GNU General Public License | |
| along with this program; if not, write to the Free Software | | along with this program; if not, write to the Free Software | |
|
| Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130
1, USA */ | | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US
A */ | |
| | | | |
| /* | | /* | |
| ** Common definition between mysql server & client | | ** Common definition between mysql server & client | |
| */ | | */ | |
| | | | |
| #ifndef _mysql_com_h | | #ifndef _mysql_com_h | |
| #define _mysql_com_h | | #define _mysql_com_h | |
| | | | |
| #define HOSTNAME_LENGTH 60 | | #define HOSTNAME_LENGTH 60 | |
| #define SYSTEM_CHARSET_MBMAXLEN 3 | | #define SYSTEM_CHARSET_MBMAXLEN 3 | |
| #define NAME_CHAR_LEN 64 /* Field/table name length */ | | #define NAME_CHAR_LEN 64 /* Field/table name length */ | |
| #define USERNAME_CHAR_LENGTH 16 | | #define USERNAME_CHAR_LENGTH 16 | |
| #define NAME_LEN (NAME_CHAR_LEN*SYSTEM_CHARSET_MBMAXLEN) | | #define NAME_LEN (NAME_CHAR_LEN*SYSTEM_CHARSET_MBMAXLEN) | |
| #define USERNAME_LENGTH (USERNAME_CHAR_LENGTH*SYSTEM_CHARSET_MBMAXL
EN) | | #define USERNAME_LENGTH (USERNAME_CHAR_LENGTH*SYSTEM_CHARSET_MBMAXL
EN) | |
| | | | |
|
| | | #define MYSQL_AUTODETECT_CHARSET_NAME "auto" | |
| | | | |
| #define SERVER_VERSION_LENGTH 60 | | #define SERVER_VERSION_LENGTH 60 | |
| #define SQLSTATE_LENGTH 5 | | #define SQLSTATE_LENGTH 5 | |
| | | | |
| /* | | /* | |
| 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 144 | | skipping to change at line 146 | |
| #define CLIENT_IGNORE_SPACE 256 /* Ignore spaces before '(' */ | | #define CLIENT_IGNORE_SPACE 256 /* Ignore spaces before '(' */ | |
| #define CLIENT_PROTOCOL_41 512 /* New 4.1 protocol */ | | #define CLIENT_PROTOCOL_41 512 /* New 4.1 protocol */ | |
| #define CLIENT_INTERACTIVE 1024 /* This is an interactive client */ | | #define CLIENT_INTERACTIVE 1024 /* This is an interactive client */ | |
| #define CLIENT_SSL 2048 /* Switch to SSL after handshake */ | | #define CLIENT_SSL 2048 /* Switch to SSL after handshake */ | |
| #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_PS_MULTI_RESULTS (1UL << 18) /* Multi-results in PS-protocol
*/ | |
| | | | |
| #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 */ | | /* Gather all possible capabilites (flags) supported by the server */ | |
| #define CLIENT_ALL_FLAGS (CLIENT_LONG_PASSWORD | \ | | #define CLIENT_ALL_FLAGS (CLIENT_LONG_PASSWORD | \ | |
| CLIENT_FOUND_ROWS | \ | | CLIENT_FOUND_ROWS | \ | |
| CLIENT_LONG_FLAG | \ | | CLIENT_LONG_FLAG | \ | |
| CLIENT_CONNECT_WITH_DB | \ | | CLIENT_CONNECT_WITH_DB | \ | |
| CLIENT_NO_SCHEMA | \ | | CLIENT_NO_SCHEMA | \ | |
| | | | |
| skipping to change at line 167 | | skipping to change at line 170 | |
| CLIENT_IGNORE_SPACE | \ | | CLIENT_IGNORE_SPACE | \ | |
| CLIENT_PROTOCOL_41 | \ | | CLIENT_PROTOCOL_41 | \ | |
| CLIENT_INTERACTIVE | \ | | CLIENT_INTERACTIVE | \ | |
| CLIENT_SSL | \ | | CLIENT_SSL | \ | |
| CLIENT_IGNORE_SIGPIPE | \ | | CLIENT_IGNORE_SIGPIPE | \ | |
| CLIENT_TRANSACTIONS | \ | | CLIENT_TRANSACTIONS | \ | |
| CLIENT_RESERVED | \ | | CLIENT_RESERVED | \ | |
| CLIENT_SECURE_CONNECTION | \ | | CLIENT_SECURE_CONNECTION | \ | |
| CLIENT_MULTI_STATEMENTS | \ | | CLIENT_MULTI_STATEMENTS | \ | |
| CLIENT_MULTI_RESULTS | \ | | CLIENT_MULTI_RESULTS | \ | |
|
| | | CLIENT_PS_MULTI_RESULTS | \ | |
| CLIENT_SSL_VERIFY_SERVER_CERT | \ | | CLIENT_SSL_VERIFY_SERVER_CERT | \ | |
| CLIENT_REMEMBER_OPTIONS) | | CLIENT_REMEMBER_OPTIONS) | |
| | | | |
| /* | | /* | |
| Switch off the flags that are optional and depending on build flags | | Switch off the flags that are optional and depending on build flags | |
| If any of the optional flags is supported by the build it will be switche
d | | If any of the optional flags is supported by the build it will be switche
d | |
| on before sending to the client during the connection handshake. | | on before sending to the client during the connection handshake. | |
| */ | | */ | |
| #define CLIENT_BASIC_FLAGS (((CLIENT_ALL_FLAGS & ~CLIENT_SSL) \ | | #define CLIENT_BASIC_FLAGS (((CLIENT_ALL_FLAGS & ~CLIENT_SSL) \ | |
| & ~CLIENT_COMPRESS) \ | | & ~CLIENT_COMPRESS) \ | |
| | | | |
| skipping to change at line 203 | | skipping to change at line 207 | |
| */ | | */ | |
| #define SERVER_STATUS_LAST_ROW_SENT 128 | | #define SERVER_STATUS_LAST_ROW_SENT 128 | |
| #define SERVER_STATUS_DB_DROPPED 256 /* A database was dropped */ | | #define SERVER_STATUS_DB_DROPPED 256 /* A database was dropped */ | |
| #define SERVER_STATUS_NO_BACKSLASH_ESCAPES 512 | | #define SERVER_STATUS_NO_BACKSLASH_ESCAPES 512 | |
| /** | | /** | |
| Sent to the client if after a prepared statement reprepare | | Sent to the client if after a prepared statement reprepare | |
| we discovered that the new statement returns a different | | we discovered that the new statement returns a different | |
| number of result set columns. | | number of result set columns. | |
| */ | | */ | |
| #define SERVER_STATUS_METADATA_CHANGED 1024 | | #define SERVER_STATUS_METADATA_CHANGED 1024 | |
|
| | | #define SERVER_QUERY_WAS_SLOW 2048 | |
| | | | |
| | | /** | |
| | | To mark ResultSet containing output parameter values. | |
| | | */ | |
| | | #define SERVER_PS_OUT_PARAMS 4096 | |
| | | | |
| /** | | /** | |
| Server status flags that must be cleared when starting | | Server status flags that must be cleared when starting | |
| execution of a new SQL statement. | | execution of a new SQL statement. | |
| Flags from this set are only added to the | | Flags from this set are only added to the | |
| current server status by the execution engine, but | | current server status by the execution engine, but | |
| never removed -- the execution engine expects them | | never removed -- the execution engine expects them | |
| to disappear automagically by the next command. | | to disappear automagically by the next command. | |
| */ | | */ | |
| #define SERVER_STATUS_CLEAR_SET (SERVER_QUERY_NO_GOOD_INDEX_USED| \ | | #define SERVER_STATUS_CLEAR_SET (SERVER_QUERY_NO_GOOD_INDEX_USED| \ | |
| | | | |
| skipping to change at line 253 | | skipping to change at line 263 | |
| 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 long max_packet,max_packet_size; | |
| unsigned int pkt_nr,compress_pkt_nr; | | unsigned int pkt_nr,compress_pkt_nr; | |
| unsigned int write_timeout, read_timeout, retry_count; | | unsigned int write_timeout, read_timeout, retry_count; | |
| int fcntl; | | 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 unused0; /* Please remove with the next incompatible ABI change. | | | |
| */ | | | |
| my_bool unused; /* Please remove with the next incompatible ABI change */ | | | |
| my_bool compress; | | | |
| my_bool unused1; /* Please remove with the next incompatible ABI change.
*/ | | my_bool unused1; /* Please remove with the next incompatible ABI change.
*/ | |
|
| | | my_bool unused2; /* Please remove with the next incompatible ABI change * | |
| | | / | |
| | | my_bool compress; | |
| | | my_bool unused3; /* Please remove with the next incompatible ABI change. | |
| | | */ | |
| /* | | /* | |
| 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 | |
| /* | | /* | |
|
| 'query_cache_query' should be accessed only via query cache | | Unused, please remove with the next incompatible ABI change. | |
| functions and methods to maintain proper locking. | | | |
| */ | | */ | |
|
| unsigned char *query_cache_query; | | unsigned char *unused; | |
| unsigned int last_errno; | | unsigned int last_errno; | |
| unsigned char error; | | unsigned char error; | |
|
| my_bool unused2; /* Please remove with the next incompatible ABI change. | | my_bool unused4; /* Please remove with the next incompatible ABI change. | |
| */ | | */ | |
| my_bool return_errno; | | my_bool unused5; /* Please remove with the next incompatible ABI change. | |
| | | */ | |
| /** Client library error message buffer. Actually belongs to struct MYSQL
. */ | | /** Client library error message buffer. Actually belongs to struct MYSQL
. */ | |
| char last_error[MYSQL_ERRMSG_SIZE]; | | char last_error[MYSQL_ERRMSG_SIZE]; | |
| /** Client library sqlstate buffer. Set along with the error message. */ | | /** Client library sqlstate buffer. Set along with the error message. */ | |
| char sqlstate[SQLSTATE_LENGTH+1]; | | char sqlstate[SQLSTATE_LENGTH+1]; | |
| void *extension; | | void *extension; | |
|
| #if defined(MYSQL_SERVER) && !defined(EMBEDDED_LIBRARY) | | | |
| /* | | | |
| Controls whether a big packet should be skipped. | | | |
| | | | |
| Initially set to FALSE by default. Unauthenticated sessions must have | | | |
| this set to FALSE so that the server can't be tricked to read packets | | | |
| indefinitely. | | | |
| */ | | | |
| my_bool skip_big_packet; | | | |
| #endif | | | |
| } NET; | | } NET; | |
| | | | |
| #define packet_error (~(unsigned long) 0) | | #define packet_error (~(unsigned long) 0) | |
| | | | |
| enum enum_field_types { MYSQL_TYPE_DECIMAL, MYSQL_TYPE_TINY, | | enum enum_field_types { MYSQL_TYPE_DECIMAL, MYSQL_TYPE_TINY, | |
| MYSQL_TYPE_SHORT, MYSQL_TYPE_LONG, | | MYSQL_TYPE_SHORT, MYSQL_TYPE_LONG, | |
| MYSQL_TYPE_FLOAT, MYSQL_TYPE_DOUBLE, | | MYSQL_TYPE_FLOAT, MYSQL_TYPE_DOUBLE, | |
| MYSQL_TYPE_NULL, MYSQL_TYPE_TIMESTAMP, | | MYSQL_TYPE_NULL, MYSQL_TYPE_TIMESTAMP, | |
| MYSQL_TYPE_LONGLONG,MYSQL_TYPE_INT24, | | MYSQL_TYPE_LONGLONG,MYSQL_TYPE_INT24, | |
| MYSQL_TYPE_DATE, MYSQL_TYPE_TIME, | | MYSQL_TYPE_DATE, MYSQL_TYPE_TIME, | |
| | | | |
| skipping to change at line 414 | | skipping to change at line 413 | |
| const unsigned char *header, size_t head_len, | | const unsigned char *header, size_t head_len, | |
| const unsigned char *packet, size_t len); | | const unsigned char *packet, size_t len); | |
| int net_real_write(NET *net,const unsigned char *packet, size_t len); | | int net_real_write(NET *net,const unsigned char *packet, size_t len); | |
| unsigned long my_net_read(NET *net); | | 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 | | | |
| Currently it's used internally by manager.c | | | |
| */ | | | |
| struct sockaddr; | | struct sockaddr; | |
| int my_connect(my_socket s, const struct sockaddr *name, unsigned int namel
en, | | int my_connect(my_socket s, const struct sockaddr *name, unsigned int namel
en, | |
| unsigned int timeout); | | unsigned int timeout); | |
| | | | |
| struct rand_struct { | | struct rand_struct { | |
| unsigned long seed1,seed2,max_value; | | unsigned long seed1,seed2,max_value; | |
| double max_value_dbl; | | double max_value_dbl; | |
| }; | | }; | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| | | | |
End of changes. 13 change blocks. |
| 26 lines changed or deleted | | 23 lines changed or added | |
|
| mysqld_ername.h | | mysqld_ername.h | |
| | | | |
| skipping to change at line 489 | | skipping to change at line 489 | |
| { "ER_FOREIGN_SERVER_EXISTS", 1476 }, | | { "ER_FOREIGN_SERVER_EXISTS", 1476 }, | |
| { "ER_FOREIGN_SERVER_DOESNT_EXIST", 1477 }, | | { "ER_FOREIGN_SERVER_DOESNT_EXIST", 1477 }, | |
| { "ER_ILLEGAL_HA_CREATE_OPTION", 1478 }, | | { "ER_ILLEGAL_HA_CREATE_OPTION", 1478 }, | |
| { "ER_PARTITION_REQUIRES_VALUES_ERROR", 1479 }, | | { "ER_PARTITION_REQUIRES_VALUES_ERROR", 1479 }, | |
| { "ER_PARTITION_WRONG_VALUES_ERROR", 1480 }, | | { "ER_PARTITION_WRONG_VALUES_ERROR", 1480 }, | |
| { "ER_PARTITION_MAXVALUE_ERROR", 1481 }, | | { "ER_PARTITION_MAXVALUE_ERROR", 1481 }, | |
| { "ER_PARTITION_SUBPARTITION_ERROR", 1482 }, | | { "ER_PARTITION_SUBPARTITION_ERROR", 1482 }, | |
| { "ER_PARTITION_SUBPART_MIX_ERROR", 1483 }, | | { "ER_PARTITION_SUBPART_MIX_ERROR", 1483 }, | |
| { "ER_PARTITION_WRONG_NO_PART_ERROR", 1484 }, | | { "ER_PARTITION_WRONG_NO_PART_ERROR", 1484 }, | |
| { "ER_PARTITION_WRONG_NO_SUBPART_ERROR", 1485 }, | | { "ER_PARTITION_WRONG_NO_SUBPART_ERROR", 1485 }, | |
|
| { "ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR", 1486 }, | | { "ER_CONST_EXPR_IN_PARTITION_FUNC_ERROR", 1486 }, | |
| { "ER_NO_CONST_EXPR_IN_RANGE_OR_LIST_ERROR", 1487 }, | | { "ER_NO_CONST_EXPR_IN_RANGE_OR_LIST_ERROR", 1487 }, | |
| { "ER_FIELD_NOT_FOUND_PART_ERROR", 1488 }, | | { "ER_FIELD_NOT_FOUND_PART_ERROR", 1488 }, | |
| { "ER_LIST_OF_FIELDS_ONLY_IN_HASH_ERROR", 1489 }, | | { "ER_LIST_OF_FIELDS_ONLY_IN_HASH_ERROR", 1489 }, | |
| { "ER_INCONSISTENT_PARTITION_INFO_ERROR", 1490 }, | | { "ER_INCONSISTENT_PARTITION_INFO_ERROR", 1490 }, | |
| { "ER_PARTITION_FUNC_NOT_ALLOWED_ERROR", 1491 }, | | { "ER_PARTITION_FUNC_NOT_ALLOWED_ERROR", 1491 }, | |
| { "ER_PARTITIONS_MUST_BE_DEFINED_ERROR", 1492 }, | | { "ER_PARTITIONS_MUST_BE_DEFINED_ERROR", 1492 }, | |
| { "ER_RANGE_NOT_INCREASING_ERROR", 1493 }, | | { "ER_RANGE_NOT_INCREASING_ERROR", 1493 }, | |
| { "ER_INCONSISTENT_TYPE_OF_FUNCTIONS_ERROR", 1494 }, | | { "ER_INCONSISTENT_TYPE_OF_FUNCTIONS_ERROR", 1494 }, | |
| { "ER_MULTIPLE_DEF_CONST_IN_LIST_PART_ERROR", 1495 }, | | { "ER_MULTIPLE_DEF_CONST_IN_LIST_PART_ERROR", 1495 }, | |
| { "ER_PARTITION_ENTRY_ERROR", 1496 }, | | { "ER_PARTITION_ENTRY_ERROR", 1496 }, | |
| | | | |
| skipping to change at line 644 | | skipping to change at line 644 | |
| { "ER_DATABASE_NAME", 1631 }, | | { "ER_DATABASE_NAME", 1631 }, | |
| { "ER_TABLE_NAME", 1632 }, | | { "ER_TABLE_NAME", 1632 }, | |
| { "ER_PARTITION_NAME", 1633 }, | | { "ER_PARTITION_NAME", 1633 }, | |
| { "ER_SUBPARTITION_NAME", 1634 }, | | { "ER_SUBPARTITION_NAME", 1634 }, | |
| { "ER_TEMPORARY_NAME", 1635 }, | | { "ER_TEMPORARY_NAME", 1635 }, | |
| { "ER_RENAMED_NAME", 1636 }, | | { "ER_RENAMED_NAME", 1636 }, | |
| { "ER_TOO_MANY_CONCURRENT_TRXS", 1637 }, | | { "ER_TOO_MANY_CONCURRENT_TRXS", 1637 }, | |
| { "WARN_NON_ASCII_SEPARATOR_NOT_IMPLEMENTED", 1638 }, | | { "WARN_NON_ASCII_SEPARATOR_NOT_IMPLEMENTED", 1638 }, | |
| { "ER_DEBUG_SYNC_TIMEOUT", 1639 }, | | { "ER_DEBUG_SYNC_TIMEOUT", 1639 }, | |
| { "ER_DEBUG_SYNC_HIT_LIMIT", 1640 }, | | { "ER_DEBUG_SYNC_HIT_LIMIT", 1640 }, | |
|
| | | { "ER_DUP_SIGNAL_SET", 1641 }, | |
| | | { "ER_SIGNAL_WARN", 1642 }, | |
| | | { "ER_SIGNAL_NOT_FOUND", 1643 }, | |
| | | { "ER_SIGNAL_EXCEPTION", 1644 }, | |
| | | { "ER_RESIGNAL_WITHOUT_ACTIVE_HANDLER", 1645 }, | |
| | | { "ER_SIGNAL_BAD_CONDITION_TYPE", 1646 }, | |
| | | { "WARN_COND_ITEM_TRUNCATED", 1647 }, | |
| | | { "ER_COND_ITEM_TOO_LONG", 1648 }, | |
| | | { "ER_UNKNOWN_LOCALE", 1649 }, | |
| | | { "ER_SLAVE_IGNORE_SERVER_IDS", 1650 }, | |
| | | { "ER_QUERY_CACHE_DISABLED", 1651 }, | |
| | | { "ER_SAME_NAME_PARTITION_FIELD", 1652 }, | |
| | | { "ER_PARTITION_COLUMN_LIST_ERROR", 1653 }, | |
| | | { "ER_WRONG_TYPE_COLUMN_VALUE_ERROR", 1654 }, | |
| | | { "ER_TOO_MANY_PARTITION_FUNC_FIELDS_ERROR", 1655 }, | |
| | | { "ER_MAXVALUE_IN_VALUES_IN", 1656 }, | |
| | | { "ER_TOO_MANY_VALUES_ERROR", 1657 }, | |
| | | { "ER_ROW_SINGLE_PARTITION_FIELD_ERROR", 1658 }, | |
| | | { "ER_FIELD_TYPE_NOT_ALLOWED_AS_PARTITION_FIELD", 1659 }, | |
| | | { "ER_PARTITION_FIELDS_TOO_LONG", 1660 }, | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 1 lines changed or added | |
|
| plugin.h | | plugin.h | |
|
| /* | | /* Copyright (C) 2005 MySQL AB, 2009 Sun Microsystems, Inc. | |
| Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reser | | | |
| ved. | | | |
| | | | |
| This program is free software; you can redistribute it and/or modify | | This program is free software; you can redistribute it and/or modify | |
| it under the terms of the GNU General Public License as published by | | it under the terms of the GNU General Public License as published by | |
| the Free Software Foundation; version 2 of the License. | | the Free Software Foundation; version 2 of the License. | |
| | | | |
| This program is distributed in the hope that it will be useful, | | This program is distributed in the hope that it will be useful, | |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| GNU General Public License for more details. | | GNU General Public License for more details. | |
| | | | |
| You should have received a copy of the GNU General Public License | | You should have received a copy of the GNU General Public License | |
| along with this program; if not, write to the Free Software | | along with this program; if not, write to the Free Software | |
|
| Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 US | | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US | |
| A | | A */ | |
| */ | | | |
| | | | |
| #ifndef _my_plugin_h | | #ifndef _my_plugin_h | |
| #define _my_plugin_h | | #define _my_plugin_h | |
| | | | |
| /* | | /* | |
| On Windows, exports from DLL need to be declared | | On Windows, exports from DLL need to be declared | |
| */ | | */ | |
| #if (defined(_WIN32) && defined(MYSQL_DYNAMIC_PLUGIN)) | | #if (defined(_WIN32) && defined(MYSQL_DYNAMIC_PLUGIN)) | |
| #define MYSQL_PLUGIN_EXPORT extern "C" __declspec(dllexport) | | #define MYSQL_PLUGIN_EXPORT extern "C" __declspec(dllexport) | |
| #else | | #else | |
| | | | |
| skipping to change at line 38 | | skipping to change at line 36 | |
| #endif | | #endif | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| class THD; | | class THD; | |
| class Item; | | class Item; | |
| #define MYSQL_THD THD* | | #define MYSQL_THD THD* | |
| #else | | #else | |
| #define MYSQL_THD void* | | #define MYSQL_THD void* | |
| #endif | | #endif | |
| | | | |
|
| #ifndef _m_string_h | | #include <mysql/services.h> | |
| /* This definition must match the one given in m_string.h */ | | | |
| struct st_mysql_lex_string | | | |
| { | | | |
| char *str; | | | |
| unsigned int length; | | | |
| }; | | | |
| #endif /* _m_string_h */ | | | |
| typedef struct st_mysql_lex_string MYSQL_LEX_STRING; | | | |
| | | | |
| #define MYSQL_XIDDATASIZE 128 | | #define MYSQL_XIDDATASIZE 128 | |
| /** | | /** | |
| struct st_mysql_xid is binary compatible with the XID structure as | | struct st_mysql_xid is binary compatible with the XID structure as | |
| in the X/Open CAE Specification, Distributed Transaction Processing: | | in the X/Open CAE Specification, Distributed Transaction Processing: | |
| The XA Specification, X/Open Company Ltd., 1991. | | The XA Specification, X/Open Company Ltd., 1991. | |
| http://www.opengroup.org/bookstore/catalog/c193.htm | | http://www.opengroup.org/bookstore/catalog/c193.htm | |
| | | | |
| @see XID in sql/handler.h | | @see XID in sql/handler.h | |
| */ | | */ | |
| | | | |
| skipping to change at line 69 | | skipping to change at line 59 | |
| long gtrid_length; | | long gtrid_length; | |
| long bqual_length; | | long bqual_length; | |
| char data[MYSQL_XIDDATASIZE]; /* Not \0-terminated */ | | char data[MYSQL_XIDDATASIZE]; /* Not \0-terminated */ | |
| }; | | }; | |
| typedef struct st_mysql_xid MYSQL_XID; | | typedef struct st_mysql_xid MYSQL_XID; | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| Plugin API. Common for all plugin types. | | Plugin API. Common for all plugin types. | |
| */ | | */ | |
| | | | |
|
| #define MYSQL_PLUGIN_INTERFACE_VERSION 0x0100 | | #define MYSQL_PLUGIN_INTERFACE_VERSION 0x0101 | |
| | | | |
| /* | | /* | |
| The allowable types of plugins | | The allowable types of plugins | |
| */ | | */ | |
| #define MYSQL_UDF_PLUGIN 0 /* User-defined function */ | | #define MYSQL_UDF_PLUGIN 0 /* User-defined function */ | |
| #define MYSQL_STORAGE_ENGINE_PLUGIN 1 /* Storage Engine */ | | #define MYSQL_STORAGE_ENGINE_PLUGIN 1 /* Storage Engine */ | |
| #define MYSQL_FTPARSER_PLUGIN 2 /* Full-text parser plugin */ | | #define MYSQL_FTPARSER_PLUGIN 2 /* Full-text parser plugin */ | |
| #define MYSQL_DAEMON_PLUGIN 3 /* The daemon/raw plugin type */ | | #define MYSQL_DAEMON_PLUGIN 3 /* The daemon/raw plugin type */ | |
| #define MYSQL_INFORMATION_SCHEMA_PLUGIN 4 /* The I_S plugin type */ | | #define MYSQL_INFORMATION_SCHEMA_PLUGIN 4 /* The I_S plugin type */ | |
|
| #define MYSQL_MAX_PLUGIN_TYPE_NUM 5 /* The number of plugin types */ | | #define MYSQL_REPLICATION_PLUGIN 5 /* The replication plugin type */ | |
| | | #define MYSQL_MAX_PLUGIN_TYPE_NUM 6 /* The number of plugin types */ | |
| | | | |
| /* We use the following strings to define licenses for plugins */ | | /* We use the following strings to define licenses for plugins */ | |
| #define PLUGIN_LICENSE_PROPRIETARY 0 | | #define PLUGIN_LICENSE_PROPRIETARY 0 | |
| #define PLUGIN_LICENSE_GPL 1 | | #define PLUGIN_LICENSE_GPL 1 | |
| #define PLUGIN_LICENSE_BSD 2 | | #define PLUGIN_LICENSE_BSD 2 | |
| | | | |
| #define PLUGIN_LICENSE_PROPRIETARY_STRING "PROPRIETARY" | | #define PLUGIN_LICENSE_PROPRIETARY_STRING "PROPRIETARY" | |
| #define PLUGIN_LICENSE_GPL_STRING "GPL" | | #define PLUGIN_LICENSE_GPL_STRING "GPL" | |
| #define PLUGIN_LICENSE_BSD_STRING "BSD" | | #define PLUGIN_LICENSE_BSD_STRING "BSD" | |
| | | | |
| | | | |
| skipping to change at line 123 | | skipping to change at line 114 | |
| | | | |
| #define mysql_declare_plugin_end ,{0,0,0,0,0,0,0,0,0,0,0,0}} | | #define mysql_declare_plugin_end ,{0,0,0,0,0,0,0,0,0,0,0,0}} | |
| | | | |
| /* | | /* | |
| declarations for SHOW STATUS support in plugins | | declarations for SHOW STATUS support in plugins | |
| */ | | */ | |
| enum enum_mysql_show_type | | enum enum_mysql_show_type | |
| { | | { | |
| SHOW_UNDEF, SHOW_BOOL, SHOW_INT, SHOW_LONG, | | SHOW_UNDEF, SHOW_BOOL, SHOW_INT, SHOW_LONG, | |
| SHOW_LONGLONG, SHOW_CHAR, SHOW_CHAR_PTR, | | SHOW_LONGLONG, SHOW_CHAR, SHOW_CHAR_PTR, | |
|
| SHOW_ARRAY, SHOW_FUNC, SHOW_DOUBLE | | SHOW_ARRAY, SHOW_FUNC, SHOW_DOUBLE, | |
| | | SHOW_always_last | |
| }; | | }; | |
| | | | |
| struct st_mysql_show_var { | | struct st_mysql_show_var { | |
| const char *name; | | const char *name; | |
| char *value; | | char *value; | |
| enum enum_mysql_show_type type; | | enum enum_mysql_show_type type; | |
| }; | | }; | |
| | | | |
| #define SHOW_VAR_FUNC_BUFF_SIZE 1024 | | #define SHOW_VAR_FUNC_BUFF_SIZE 1024 | |
| typedef int (*mysql_show_var_func)(MYSQL_THD, struct st_mysql_show_var*, ch
ar *); | | typedef int (*mysql_show_var_func)(MYSQL_THD, struct st_mysql_show_var*, ch
ar *); | |
| | | | |
| skipping to change at line 392 | | skipping to change at line 384 | |
| | | | |
| /* | | /* | |
| Plugin description structure. | | Plugin description structure. | |
| */ | | */ | |
| | | | |
| struct st_mysql_plugin | | struct st_mysql_plugin | |
| { | | { | |
| int type; /* the plugin type (a MYSQL_XXX_PLUGIN value) */ | | int type; /* the plugin type (a MYSQL_XXX_PLUGIN value) */ | |
| void *info; /* pointer to type-specific plugin descriptor */ | | void *info; /* pointer to type-specific plugin descriptor */ | |
| const char *name; /* plugin name */ | | const char *name; /* plugin name */ | |
|
| const char *author; /* plugin author (for I_S.PLUGINS) */ | | const char *author; /* plugin author (for SHOW PLUGINS) */ | |
| const char *descr; /* general descriptive text (for I_S.PLUGINS) */ | | const char *descr; /* general descriptive text (for SHOW PLUGINS ) */ | |
| int license; /* the plugin license (PLUGIN_LICENSE_XXX) */ | | int license; /* the plugin license (PLUGIN_LICENSE_XXX) */ | |
| int (*init)(void *); /* the function to invoke when plugin is loaded */ | | int (*init)(void *); /* the function to invoke when plugin is loaded */ | |
| int (*deinit)(void *);/* the function to invoke when plugin is unloaded *
/ | | int (*deinit)(void *);/* the function to invoke when plugin is unloaded *
/ | |
|
| unsigned int version; /* plugin version (for I_S.PLUGINS) */ | | unsigned int version; /* plugin version (for SHOW PLUGINS) */ | |
| struct st_mysql_show_var *status_vars; | | struct st_mysql_show_var *status_vars; | |
| struct st_mysql_sys_var **system_vars; | | struct st_mysql_sys_var **system_vars; | |
| void * __reserved1; /* reserved for dependency checking */ | | void * __reserved1; /* reserved for dependency checking */ | |
| }; | | }; | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| API for Full-text parser plugin. (MYSQL_FTPARSER_PLUGIN) | | API for Full-text parser plugin. (MYSQL_FTPARSER_PLUGIN) | |
| */ | | */ | |
| | | | |
| #define MYSQL_FTPARSER_INTERFACE_VERSION 0x0100 | | #define MYSQL_FTPARSER_INTERFACE_VERSION 0x0100 | |
| | | | |
| skipping to change at line 647 | | skipping to change at line 639 | |
| Here we define only the descriptor structure, that is referred from | | Here we define only the descriptor structure, that is referred from | |
| st_mysql_plugin. | | st_mysql_plugin. | |
| */ | | */ | |
| | | | |
| struct st_mysql_information_schema | | struct st_mysql_information_schema | |
| { | | { | |
| int interface_version; | | int interface_version; | |
| }; | | }; | |
| | | | |
| /* | | /* | |
|
| | | API for Replication plugin. (MYSQL_REPLICATION_PLUGIN) | |
| | | */ | |
| | | #define MYSQL_REPLICATION_INTERFACE_VERSION 0x0100 | |
| | | | |
| | | /** | |
| | | Replication plugin descriptor | |
| | | */ | |
| | | struct Mysql_replication { | |
| | | int interface_version; | |
| | | }; | |
| | | | |
| | | /* | |
| st_mysql_value struct for reading values from mysqld. | | st_mysql_value struct for reading values from mysqld. | |
| Used by server variables framework to parse user-provided values. | | Used by server variables framework to parse user-provided values. | |
| Will be used for arguments when implementing UDFs. | | Will be used for arguments when implementing UDFs. | |
| | | | |
| Note that val_str() returns a string in temporary memory | | Note that val_str() returns a string in temporary memory | |
| that will be freed at the end of statement. Copy the string | | that will be freed at the end of statement. Copy the string | |
| if you need it to persist. | | if you need it to persist. | |
| */ | | */ | |
| | | | |
| #define MYSQL_VALUE_TYPE_STRING 0 | | #define MYSQL_VALUE_TYPE_STRING 0 | |
| | | | |
| skipping to change at line 727 | | skipping to change at line 731 | |
| | | | |
| /** | | /** | |
| Return the thread id of a user thread | | Return the thread id of a user thread | |
| | | | |
| @param thd user thread connection handle | | @param thd user thread connection handle | |
| @return thread id | | @return thread id | |
| */ | | */ | |
| unsigned long thd_get_thread_id(const MYSQL_THD thd); | | unsigned long thd_get_thread_id(const MYSQL_THD thd); | |
| | | | |
| /** | | /** | |
|
| Allocate memory in the connection's local memory pool | | | |
| | | | |
| @details | | | |
| When properly used in place of @c my_malloc(), this can significantly | | | |
| improve concurrency. Don't use this or related functions to allocate | | | |
| large chunks of memory. Use for temporary storage only. The memory | | | |
| will be freed automatically at the end of the statement; no explicit | | | |
| code is required to prevent memory leaks. | | | |
| | | | |
| @see alloc_root() | | | |
| */ | | | |
| void *thd_alloc(MYSQL_THD thd, unsigned int size); | | | |
| /** | | | |
| @see thd_alloc() | | | |
| */ | | | |
| void *thd_calloc(MYSQL_THD thd, unsigned int size); | | | |
| /** | | | |
| @see thd_alloc() | | | |
| */ | | | |
| char *thd_strdup(MYSQL_THD thd, const char *str); | | | |
| /** | | | |
| @see thd_alloc() | | | |
| */ | | | |
| char *thd_strmake(MYSQL_THD thd, const char *str, unsigned int size); | | | |
| /** | | | |
| @see thd_alloc() | | | |
| */ | | | |
| void *thd_memdup(MYSQL_THD thd, const void* str, unsigned int size); | | | |
| | | | |
| /** | | | |
| Create a LEX_STRING in this connection's local memory pool | | | |
| | | | |
| @param thd user thread connection handle | | | |
| @param lex_str pointer to LEX_STRING object to be initialized | | | |
| @param str initializer to be copied into lex_str | | | |
| @param size length of str, in bytes | | | |
| @param allocate_lex_string flag: if TRUE, allocate new LEX_STRING object | | | |
| , | | | |
| instead of using lex_str value | | | |
| @return NULL on failure, or pointer to the LEX_STRING object | | | |
| | | | |
| @see thd_alloc() | | | |
| */ | | | |
| MYSQL_LEX_STRING *thd_make_lex_string(MYSQL_THD thd, MYSQL_LEX_STRING *lex_ | | | |
| str, | | | |
| const char *str, unsigned int size, | | | |
| int allocate_lex_string); | | | |
| | | | |
| /** | | | |
| Get the XID for this connection's transaction | | Get the XID for this connection's transaction | |
| | | | |
| @param thd user thread connection handle | | @param thd user thread connection handle | |
| @param xid location where identifier is stored | | @param xid location where identifier is stored | |
| */ | | */ | |
| void thd_get_xid(const MYSQL_THD thd, MYSQL_XID *xid); | | void thd_get_xid(const MYSQL_THD thd, MYSQL_XID *xid); | |
| | | | |
| /** | | /** | |
| Invalidate the query cache for a given table. | | Invalidate the query cache for a given table. | |
| | | | |
| @param thd user thread connection handle | | @param thd user thread connection handle | |
| @param key databasename\\0tablename\\0 | | @param key databasename\\0tablename\\0 | |
| @param key_length length of key in bytes, including the NUL bytes | | @param key_length length of key in bytes, including the NUL bytes | |
| @param using_trx flag: TRUE if using transactions, FALSE otherwise | | @param using_trx flag: TRUE if using transactions, FALSE otherwise | |
| */ | | */ | |
| void mysql_query_cache_invalidate4(MYSQL_THD thd, | | void mysql_query_cache_invalidate4(MYSQL_THD thd, | |
| const char *key, unsigned int key_length
, | | const char *key, unsigned int key_length
, | |
| int using_trx); | | int using_trx); | |
| | | | |
|
| | | #ifdef __cplusplus | |
| | | } | |
| | | #endif | |
| | | | |
| | | #ifdef __cplusplus | |
| /** | | /** | |
| Provide a handler data getter to simplify coding | | Provide a handler data getter to simplify coding | |
| */ | | */ | |
|
| void *thd_get_ha_data(const MYSQL_THD thd, const struct handlerton *hton); | | inline | |
| | | void * | |
| | | thd_get_ha_data(const MYSQL_THD thd, const struct handlerton *hton) | |
| | | { | |
| | | return *thd_ha_data(thd, hton); | |
| | | } | |
| | | | |
| /** | | /** | |
| Provide a handler data setter to simplify coding | | Provide a handler data setter to simplify coding | |
|
| | | | |
| @details | | | |
| Set ha_data pointer (storage engine per-connection information). | | | |
| | | | |
| To avoid unclean deactivation (uninstall) of storage engine plugin | | | |
| in the middle of transaction, additional storage engine plugin | | | |
| lock is acquired. | | | |
| | | | |
| If ha_data is not null and storage engine plugin was not locked | | | |
| by thd_set_ha_data() in this connection before, storage engine | | | |
| plugin gets locked. | | | |
| | | | |
| If ha_data is null and storage engine plugin was locked by | | | |
| thd_set_ha_data() in this connection before, storage engine | | | |
| plugin lock gets released. | | | |
| | | | |
| If handlerton::close_connection() didn't reset ha_data, server does | | | |
| it immediately after calling handlerton::close_connection(). | | | |
| */ | | */ | |
|
| void thd_set_ha_data(MYSQL_THD thd, const struct handlerton *hton, | | inline | |
| const void *ha_data); | | void | |
| #ifdef __cplusplus | | thd_set_ha_data(const MYSQL_THD thd, const struct handlerton *hton, | |
| | | const void *ha_data) | |
| | | { | |
| | | *thd_ha_data(thd, hton)= (void*) ha_data; | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 14 change blocks. |
| 92 lines changed or deleted | | 41 lines changed or added | |
|
| readline.h | | readline.h | |
|
| /* $NetBSD: readline.h,v 1.32 2010/09/16 20:08:52 christos Exp $ */ | | /* $NetBSD: readline.h,v 1.24 2009/02/05 19:15:26 christos Exp $ */ | |
| | | | |
| /*- | | /*- | |
| * Copyright (c) 1997 The NetBSD Foundation, Inc. | | * Copyright (c) 1997 The NetBSD Foundation, Inc. | |
| * All rights reserved. | | * All rights reserved. | |
| * | | * | |
| * This code is derived from software contributed to The NetBSD Foundation | | * This code is derived from software contributed to The NetBSD Foundation | |
| * by Jaromir Dolecek. | | * by Jaromir Dolecek. | |
| * | | * | |
| * Redistribution and use in source and binary forms, with or without | | * Redistribution and use in source and binary forms, with or without | |
| * modification, are permitted provided that the following conditions | | * modification, are permitted provided that the following conditions | |
| | | | |
| skipping to change at line 35 | | skipping to change at line 35 | |
| * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
| * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
| * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF T
HE | | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF T
HE | |
| * POSSIBILITY OF SUCH DAMAGE. | | * POSSIBILITY OF SUCH DAMAGE. | |
| */ | | */ | |
| #ifndef _READLINE_H_ | | #ifndef _READLINE_H_ | |
| #define _READLINE_H_ | | #define _READLINE_H_ | |
| | | | |
| #include <sys/types.h> | | #include <sys/types.h> | |
|
| #include <stdio.h> | | | |
| | | | |
| /* list of readline stuff supported by editline library's readline wrapper
*/ | | /* list of readline stuff supported by editline library's readline wrapper
*/ | |
| | | | |
| /* typedefs */ | | /* typedefs */ | |
| typedef int Function(const char *, int); | | typedef int Function(const char *, int); | |
| typedef void VFunction(void); | | typedef void VFunction(void); | |
| typedef void VCPFunction(char *); | | typedef void VCPFunction(char *); | |
| typedef char *CPFunction(const char *, int); | | typedef char *CPFunction(const char *, int); | |
| typedef char **CPPFunction(const char *, int, int); | | typedef char **CPPFunction(const char *, int, int); | |
| typedef char *rl_compentry_func_t(const char *, int); | | typedef char *rl_compentry_func_t(const char *, int); | |
|
| typedef int rl_command_func_t(int, int); | | | |
| | | | |
| /* only supports length */ | | | |
| typedef struct { | | | |
| int length; | | | |
| } HISTORY_STATE; | | | |
| | | | |
| typedef void *histdata_t; | | | |
| | | | |
| typedef struct _hist_entry { | | typedef struct _hist_entry { | |
| const char *line; | | const char *line; | |
|
| histdata_t data; | | const char *data; | |
| } HIST_ENTRY; | | } HIST_ENTRY; | |
| | | | |
| typedef struct _keymap_entry { | | typedef struct _keymap_entry { | |
| char type; | | char type; | |
| #define ISFUNC 0 | | #define ISFUNC 0 | |
| #define ISKMAP 1 | | #define ISKMAP 1 | |
| #define ISMACR 2 | | #define ISMACR 2 | |
| Function *function; | | Function *function; | |
| } KEYMAP_ENTRY; | | } KEYMAP_ENTRY; | |
| | | | |
| | | | |
| skipping to change at line 91 | | skipping to change at line 82 | |
| #ifndef CTRL | | #ifndef CTRL | |
| #define CTRL(c) ((c) & 037) | | #define CTRL(c) ((c) & 037) | |
| #endif | | #endif | |
| #endif | | #endif | |
| #ifndef UNCTRL | | #ifndef UNCTRL | |
| #define UNCTRL(c) (((c) - 'a' + 'A')|control_character_bit) | | #define UNCTRL(c) (((c) - 'a' + 'A')|control_character_bit) | |
| #endif | | #endif | |
| | | | |
| #define RUBOUT 0x7f | | #define RUBOUT 0x7f | |
| #define ABORT_CHAR CTRL('G') | | #define ABORT_CHAR CTRL('G') | |
|
| #define RL_READLINE_VERSION 0x0402 | | | |
| #define RL_PROMPT_START_IGNORE '\1' | | | |
| #define RL_PROMPT_END_IGNORE '\2' | | | |
| | | | |
| /* global variables used by readline enabled applications */ | | /* global variables used by readline enabled applications */ | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| extern const char *rl_library_version; | | extern const char *rl_library_version; | |
|
| extern int rl_readline_version; | | | |
| extern char *rl_readline_name; | | extern char *rl_readline_name; | |
| extern FILE *rl_instream; | | extern FILE *rl_instream; | |
| extern FILE *rl_outstream; | | extern FILE *rl_outstream; | |
| extern char *rl_line_buffer; | | extern char *rl_line_buffer; | |
| extern int rl_point, rl_end; | | extern int rl_point, rl_end; | |
| extern int history_base, history_length; | | extern int history_base, history_length; | |
| extern int max_input_history; | | extern int max_input_history; | |
| extern char *rl_basic_word_break_characters; | | extern char *rl_basic_word_break_characters; | |
| extern char *rl_completer_word_break_characters; | | extern char *rl_completer_word_break_characters; | |
| extern char *rl_completer_quote_characters; | | extern char *rl_completer_quote_characters; | |
| | | | |
| skipping to change at line 154 | | skipping to change at line 141 | |
| void using_history(void); | | void using_history(void); | |
| int add_history(const char *); | | int add_history(const char *); | |
| void clear_history(void); | | void clear_history(void); | |
| void stifle_history(int); | | void stifle_history(int); | |
| int unstifle_history(void); | | int unstifle_history(void); | |
| int history_is_stifled(void); | | int history_is_stifled(void); | |
| int where_history(void); | | int where_history(void); | |
| HIST_ENTRY *current_history(void); | | HIST_ENTRY *current_history(void); | |
| HIST_ENTRY *history_get(int); | | HIST_ENTRY *history_get(int); | |
| HIST_ENTRY *remove_history(int); | | HIST_ENTRY *remove_history(int); | |
|
| HIST_ENTRY *replace_history_entry(int, const char *, histdata_t); | | | |
| int history_total_bytes(void); | | int history_total_bytes(void); | |
| int history_set_pos(int); | | int history_set_pos(int); | |
| HIST_ENTRY *previous_history(void); | | HIST_ENTRY *previous_history(void); | |
| HIST_ENTRY *next_history(void); | | HIST_ENTRY *next_history(void); | |
| int history_search(const char *, int); | | int history_search(const char *, int); | |
| int history_search_prefix(const char *, int); | | int history_search_prefix(const char *, int); | |
| int history_search_pos(const char *, int, int); | | int history_search_pos(const char *, int, int); | |
| int read_history(const char *); | | int read_history(const char *); | |
| int write_history(const char *); | | int write_history(const char *); | |
|
| int history_truncate_file (const char *, int); | | | |
| int history_expand(char *, char **); | | int history_expand(char *, char **); | |
| char **history_tokenize(const char *); | | char **history_tokenize(const char *); | |
| const char *get_history_event(const char *, int *, int); | | const char *get_history_event(const char *, int *, int); | |
| char *history_arg_extract(int, int, const char *); | | char *history_arg_extract(int, int, const char *); | |
| | | | |
| char *tilde_expand(char *); | | char *tilde_expand(char *); | |
| char *filename_completion_function(const char *, int); | | char *filename_completion_function(const char *, int); | |
| char *username_completion_function(const char *, int); | | char *username_completion_function(const char *, int); | |
| int rl_complete(int, int); | | int rl_complete(int, int); | |
| int rl_read_key(void); | | int rl_read_key(void); | |
| char **completion_matches(const char *, CPFunction *); | | char **completion_matches(const char *, CPFunction *); | |
| void rl_display_match_list(char **, int, int); | | void rl_display_match_list(char **, int, int); | |
| | | | |
| int rl_insert(int, int); | | int rl_insert(int, int); | |
|
| int rl_insert_text(const char *); | | | |
| void rl_reset_terminal(const char *); | | void rl_reset_terminal(const char *); | |
|
| int rl_bind_key(int, rl_command_func_t *); | | int rl_bind_key(int, int (*)(int, int)); | |
| int rl_newline(int, int); | | int rl_newline(int, int); | |
| void rl_callback_read_char(void); | | void rl_callback_read_char(void); | |
| void rl_callback_handler_install(const char *, VCPFunction *); | | void rl_callback_handler_install(const char *, VCPFunction *); | |
| void rl_callback_handler_remove(void); | | void rl_callback_handler_remove(void); | |
| void rl_redisplay(void); | | void rl_redisplay(void); | |
| int rl_get_previous_history(int, int); | | int rl_get_previous_history(int, int); | |
| void rl_prep_terminal(int); | | void rl_prep_terminal(int); | |
| void rl_deprep_terminal(void); | | void rl_deprep_terminal(void); | |
| int rl_read_init_file(const char *); | | int rl_read_init_file(const char *); | |
| int rl_parse_and_bind(const char *); | | int rl_parse_and_bind(const char *); | |
| int rl_variable_bind(const char *, const char *); | | int rl_variable_bind(const char *, const char *); | |
| void rl_stuff_char(int); | | void rl_stuff_char(int); | |
| int rl_add_defun(const char *, Function *, int); | | int rl_add_defun(const char *, Function *, int); | |
|
| HISTORY_STATE *history_get_history_state(void); | | | |
| void rl_get_screen_size(int *, int *); | | void rl_get_screen_size(int *, int *); | |
| void rl_set_screen_size(int, int); | | void rl_set_screen_size(int, int); | |
| char *rl_filename_completion_function (const char *, int); | | char *rl_filename_completion_function (const char *, int); | |
| int _rl_abort_internal(void); | | int _rl_abort_internal(void); | |
| int _rl_qsort_string_compare(char **, char **); | | int _rl_qsort_string_compare(char **, char **); | |
| char **rl_completion_matches(const char *, rl_compentry_func_t *); | | char **rl_completion_matches(const char *, rl_compentry_func_t *); | |
| void rl_forced_update_display(void); | | void rl_forced_update_display(void); | |
| int rl_set_prompt(const char *); | | int rl_set_prompt(const char *); | |
|
| int rl_on_new_line(void); | | | |
| | | | |
| /* | | /* | |
| * The following are not implemented | | * The following are not implemented | |
| */ | | */ | |
| int rl_kill_text(int, int); | | int rl_kill_text(int, int); | |
| Keymap rl_get_keymap(void); | | Keymap rl_get_keymap(void); | |
| void rl_set_keymap(Keymap); | | void rl_set_keymap(Keymap); | |
| Keymap rl_make_bare_keymap(void); | | Keymap rl_make_bare_keymap(void); | |
| int rl_generic_bind(int, const char *, const char *, Keymap); | | int rl_generic_bind(int, const char *, const char *, Keymap); | |
|
| int rl_bind_key_in_map(int, rl_command_func_t *, Keymap); | | int rl_bind_key_in_map(int, Function *, Keymap); | |
| void rl_cleanup_after_signal(void); | | | |
| void rl_free_line_state(void); | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #endif /* _READLINE_H_ */ | | #endif /* _READLINE_H_ */ | |
| | | | |
End of changes. 13 change blocks. |
| 24 lines changed or deleted | | 4 lines changed or added | |
|
| sslopt-longopts.h | | sslopt-longopts.h | |
|
| /* | | #ifndef SSLOPT_LONGOPTS_INCLUDED | |
| Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reser | | #define SSLOPT_LONGOPTS_INCLUDED | |
| ved. | | | |
| | | /* Copyright (C) 2000 MySQL AB | |
| | | | |
| This program is free software; you can redistribute it and/or modify | | This program is free software; you can redistribute it and/or modify | |
| it under the terms of the GNU General Public License as published by | | it under the terms of the GNU General Public License as published by | |
| the Free Software Foundation; version 2 of the License. | | the Free Software Foundation; version 2 of the License. | |
| | | | |
| This program is distributed in the hope that it will be useful, | | This program is distributed in the hope that it will be useful, | |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| GNU General Public License for more details. | | GNU General Public License for more details. | |
| | | | |
| You should have received a copy of the GNU General Public License | | You should have received a copy of the GNU General Public License | |
| along with this program; if not, write to the Free Software | | along with this program; if not, write to the Free Software | |
|
| Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 US | | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US | |
| A | | A */ | |
| */ | | | |
| | | | |
| #ifdef HAVE_OPENSSL | | #ifdef HAVE_OPENSSL | |
| | | | |
| {"ssl", OPT_SSL_SSL, | | {"ssl", OPT_SSL_SSL, | |
|
| "Enable SSL for connection (automatically enabled with other flags)." | | "Enable SSL for connection (automatically enabled with other flags). Dis | |
| "Disable with --skip-ssl.", &opt_use_ssl, &opt_use_ssl, 0, GET_BOOL, | | able with --skip-ssl.", | |
| NO_ARG, 0, 0, 0, 0, 0, 0}, | | (uchar **) &opt_use_ssl, (uchar **) &opt_use_ssl, 0, GET_BOOL, NO_ARG, 0, | |
| | | 0, 0, | |
| | | 0, 0, 0}, | |
| {"ssl-ca", OPT_SSL_CA, | | {"ssl-ca", OPT_SSL_CA, | |
| "CA file in PEM format (check OpenSSL docs, implies --ssl).", | | "CA file in PEM format (check OpenSSL docs, implies --ssl).", | |
|
| &opt_ssl_ca, &opt_ssl_ca, 0, GET_STR, REQUIRED_ARG, | | (uchar **) &opt_ssl_ca, (uchar **) &opt_ssl_ca, 0, GET_STR, REQUIRED_ARG
, | |
| 0, 0, 0, 0, 0, 0}, | | 0, 0, 0, 0, 0, 0}, | |
| {"ssl-capath", OPT_SSL_CAPATH, | | {"ssl-capath", OPT_SSL_CAPATH, | |
| "CA directory (check OpenSSL docs, implies --ssl).", | | "CA directory (check OpenSSL docs, implies --ssl).", | |
|
| &opt_ssl_capath, &opt_ssl_capath, 0, GET_STR, REQUIRED_ARG, | | (uchar **) &opt_ssl_capath, (uchar **) &opt_ssl_capath, 0, GET_STR, REQU
IRED_ARG, | |
| 0, 0, 0, 0, 0, 0}, | | 0, 0, 0, 0, 0, 0}, | |
| {"ssl-cert", OPT_SSL_CERT, "X509 cert in PEM format (implies --ssl).", | | {"ssl-cert", OPT_SSL_CERT, "X509 cert in PEM format (implies --ssl).", | |
|
| &opt_ssl_cert, &opt_ssl_cert, 0, GET_STR, REQUIRED_ARG, | | (uchar **) &opt_ssl_cert, (uchar **) &opt_ssl_cert, 0, GET_STR, REQUIRED
_ARG, | |
| 0, 0, 0, 0, 0, 0}, | | 0, 0, 0, 0, 0, 0}, | |
| {"ssl-cipher", OPT_SSL_CIPHER, "SSL cipher to use (implies --ssl).", | | {"ssl-cipher", OPT_SSL_CIPHER, "SSL cipher to use (implies --ssl).", | |
|
| &opt_ssl_cipher, &opt_ssl_cipher, 0, GET_STR, REQUIRED_ARG, | | (uchar **) &opt_ssl_cipher, (uchar **) &opt_ssl_cipher, 0, GET_STR, REQU
IRED_ARG, | |
| 0, 0, 0, 0, 0, 0}, | | 0, 0, 0, 0, 0, 0}, | |
| {"ssl-key", OPT_SSL_KEY, "X509 key in PEM format (implies --ssl).", | | {"ssl-key", OPT_SSL_KEY, "X509 key in PEM format (implies --ssl).", | |
|
| &opt_ssl_key, &opt_ssl_key, 0, GET_STR, REQUIRED_ARG, | | (uchar **) &opt_ssl_key, (uchar **) &opt_ssl_key, 0, GET_STR, REQUIRED_A
RG, | |
| 0, 0, 0, 0, 0, 0}, | | 0, 0, 0, 0, 0, 0}, | |
| #ifdef MYSQL_CLIENT | | #ifdef MYSQL_CLIENT | |
| {"ssl-verify-server-cert", OPT_SSL_VERIFY_SERVER_CERT, | | {"ssl-verify-server-cert", OPT_SSL_VERIFY_SERVER_CERT, | |
|
| "Verify server's \"Common Name\" in its cert against hostname used " | | "Verify server's \"Common Name\" in its cert against hostname used when | |
| "when connecting. This option is disabled by default.", | | connecting. This option is disabled by default.", | |
| &opt_ssl_verify_server_cert, &opt_ssl_verify_server_cert, | | (uchar **) &opt_ssl_verify_server_cert, (uchar **) &opt_ssl_verify_serve | |
| | | r_cert, | |
| 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, | | 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, | |
| #endif | | #endif | |
| #endif /* HAVE_OPENSSL */ | | #endif /* HAVE_OPENSSL */ | |
|
| | | #endif /* SSLOPT_LONGOPTS_INCLUDED */ | |
| | | | |
End of changes. 10 change blocks. |
| 17 lines changed or deleted | | 20 lines changed or added | |
|