| m_ctype.h | | m_ctype.h | |
| | | | |
| skipping to change at line 109 | | skipping to change at line 109 | |
| 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; | |
| | | | |
|
| | | /* See strings/CHARSET_INFO.txt for information about this structure */ | |
| typedef struct my_collation_handler_st | | typedef struct my_collation_handler_st | |
| { | | { | |
| my_bool (*init)(struct charset_info_st *, void *(*alloc)(uint)); | | my_bool (*init)(struct charset_info_st *, void *(*alloc)(uint)); | |
| /* Collation routines */ | | /* Collation routines */ | |
| int (*strnncoll)(struct charset_info_st *, | | int (*strnncoll)(struct charset_info_st *, | |
| const uchar *, uint, const uchar *, uint, my_bool); | | const uchar *, uint, const uchar *, uint, my_bool); | |
| int (*strnncollsp)(struct charset_info_st *, | | int (*strnncollsp)(struct charset_info_st *, | |
| const uchar *, uint, const uchar *, uint); | | const uchar *, uint, const uchar *, uint); | |
| int (*strnxfrm)(struct charset_info_st *, | | int (*strnxfrm)(struct charset_info_st *, | |
| uchar *, uint, const uchar *, uint); | | uchar *, uint, const uchar *, uint); | |
| | | | |
| skipping to change at line 147 | | skipping to change at line 148 | |
| /* Hash calculation */ | | /* Hash calculation */ | |
| void (*hash_sort)(struct charset_info_st *cs, const uchar *key, uint len, | | void (*hash_sort)(struct charset_info_st *cs, const uchar *key, uint len, | |
| ulong *nr1, ulong *nr2); | | ulong *nr1, ulong *nr2); | |
| } MY_COLLATION_HANDLER; | | } MY_COLLATION_HANDLER; | |
| | | | |
| extern MY_COLLATION_HANDLER my_collation_mb_bin_handler; | | extern MY_COLLATION_HANDLER my_collation_mb_bin_handler; | |
| extern MY_COLLATION_HANDLER my_collation_8bit_bin_handler; | | extern MY_COLLATION_HANDLER my_collation_8bit_bin_handler; | |
| extern MY_COLLATION_HANDLER my_collation_8bit_simple_ci_handler; | | extern MY_COLLATION_HANDLER my_collation_8bit_simple_ci_handler; | |
| extern MY_COLLATION_HANDLER my_collation_ucs2_uca_handler; | | extern MY_COLLATION_HANDLER my_collation_ucs2_uca_handler; | |
| | | | |
|
| | | /* See strings/CHARSET_INFO.txt about information on this structure */ | |
| typedef struct my_charset_handler_st | | typedef struct my_charset_handler_st | |
| { | | { | |
| my_bool (*init)(struct charset_info_st *, void *(*alloc)(uint)); | | my_bool (*init)(struct charset_info_st *, void *(*alloc)(uint)); | |
| /* Multibyte routines */ | | /* Multibyte routines */ | |
| int (*ismbchar)(struct charset_info_st *, const char *, const char *)
; | | int (*ismbchar)(struct charset_info_st *, const char *, const char *)
; | |
| int (*mbcharlen)(struct charset_info_st *, uint); | | int (*mbcharlen)(struct charset_info_st *, uint); | |
| uint (*numchars)(struct charset_info_st *, const char *b, const char *
e); | | uint (*numchars)(struct charset_info_st *, const char *b, const char *
e); | |
| uint (*charpos)(struct charset_info_st *, const char *b, const char *e
, uint pos); | | uint (*charpos)(struct charset_info_st *, const char *b, const char *e
, uint pos); | |
| uint (*well_formed_len)(struct charset_info_st *, | | uint (*well_formed_len)(struct charset_info_st *, | |
| const char *b,const char *e, | | const char *b,const char *e, | |
| | | | |
| skipping to change at line 175 | | skipping to change at line 177 | |
| unsigned char *s,unsigned char *e); | | unsigned char *s,unsigned char *e); | |
| | | | |
| /* Functions for case and sort convertion */ | | /* Functions for case and sort convertion */ | |
| void (*caseup_str)(struct charset_info_st *, char *); | | void (*caseup_str)(struct charset_info_st *, char *); | |
| void (*casedn_str)(struct charset_info_st *, char *); | | void (*casedn_str)(struct charset_info_st *, char *); | |
| void (*caseup)(struct charset_info_st *, char *, uint); | | void (*caseup)(struct charset_info_st *, char *, uint); | |
| void (*casedn)(struct charset_info_st *, char *, uint); | | void (*casedn)(struct charset_info_st *, char *, uint); | |
| | | | |
| /* Charset dependant snprintf() */ | | /* Charset dependant snprintf() */ | |
| int (*snprintf)(struct charset_info_st *, char *to, uint n, const char *
fmt, | | int (*snprintf)(struct charset_info_st *, char *to, uint n, const char *
fmt, | |
|
| ...); | | ...) ATTRIBUTE_FORMAT_FPTR(printf, 4, 5); | |
| int (*long10_to_str)(struct charset_info_st *, char *to, uint n, int rad
ix, | | int (*long10_to_str)(struct charset_info_st *, char *to, uint n, int rad
ix, | |
| long int val); | | long int val); | |
| int (*longlong10_to_str)(struct charset_info_st *, char *to, uint n, | | int (*longlong10_to_str)(struct charset_info_st *, char *to, uint n, | |
| int radix, longlong val); | | int radix, longlong val); | |
| | | | |
| void (*fill)(struct charset_info_st *, char *to, uint len, int fill); | | void (*fill)(struct charset_info_st *, char *to, uint len, int fill); | |
| | | | |
| /* String-to-number convertion routines */ | | /* String-to-number convertion routines */ | |
| long (*strntol)(struct charset_info_st *, const char *s, uint l, | | long (*strntol)(struct charset_info_st *, const char *s, uint l, | |
| int base, char **e, int *err); | | int base, char **e, int *err); | |
| | | | |
| skipping to change at line 203 | | skipping to change at line 205 | |
| int *err); | | int *err); | |
| longlong (*my_strtoll10)(struct charset_info_st *cs, | | longlong (*my_strtoll10)(struct charset_info_st *cs, | |
| const char *nptr, char **endptr, int *error); | | const char *nptr, char **endptr, int *error); | |
| ulong (*scan)(struct charset_info_st *, const char *b, const char
*e, | | ulong (*scan)(struct charset_info_st *, const char *b, const char
*e, | |
| int sq); | | int sq); | |
| } MY_CHARSET_HANDLER; | | } MY_CHARSET_HANDLER; | |
| | | | |
| extern MY_CHARSET_HANDLER my_charset_8bit_handler; | | extern MY_CHARSET_HANDLER my_charset_8bit_handler; | |
| extern MY_CHARSET_HANDLER my_charset_ucs2_handler; | | extern MY_CHARSET_HANDLER my_charset_ucs2_handler; | |
| | | | |
|
| | | /* See strings/CHARSET_INFO.txt about information on this structure */ | |
| typedef struct charset_info_st | | typedef struct charset_info_st | |
| { | | { | |
| uint number; | | uint number; | |
| uint primary_number; | | uint primary_number; | |
| uint binary_number; | | uint binary_number; | |
| uint state; | | uint state; | |
| const char *csname; | | const char *csname; | |
| const char *name; | | const char *name; | |
| const char *comment; | | const char *comment; | |
| const char *tailoring; | | const char *tailoring; | |
| | | | |
| skipping to change at line 297 | | skipping to change at line 300 | |
| extern void my_casedn_8bit(CHARSET_INFO *, char *, uint); | | extern void my_casedn_8bit(CHARSET_INFO *, char *, uint); | |
| | | | |
| extern int my_strcasecmp_8bit(CHARSET_INFO * cs, const char *, const char *
); | | extern int my_strcasecmp_8bit(CHARSET_INFO * cs, const char *, const char *
); | |
| | | | |
| int my_mb_wc_8bit(CHARSET_INFO *cs,my_wc_t *wc, const uchar *s,const uchar
*e); | | int my_mb_wc_8bit(CHARSET_INFO *cs,my_wc_t *wc, const uchar *s,const uchar
*e); | |
| int my_wc_mb_8bit(CHARSET_INFO *cs,my_wc_t wc, uchar *s, uchar *e); | | int my_wc_mb_8bit(CHARSET_INFO *cs,my_wc_t wc, uchar *s, uchar *e); | |
| | | | |
| ulong my_scan_8bit(CHARSET_INFO *cs, const char *b, const char *e, int sq); | | ulong my_scan_8bit(CHARSET_INFO *cs, const char *b, const char *e, int sq); | |
| | | | |
| int my_snprintf_8bit(struct charset_info_st *, char *to, uint n, | | int my_snprintf_8bit(struct charset_info_st *, char *to, uint n, | |
|
| const char *fmt, ...); | | const char *fmt, ...) | |
| | | ATTRIBUTE_FORMAT(printf, 4, 5); | |
| | | | |
| long my_strntol_8bit(CHARSET_INFO *, const char *s, uint l, int base
, | | long my_strntol_8bit(CHARSET_INFO *, const char *s, uint l, int base
, | |
| char **e, int *err); | | char **e, int *err); | |
| ulong my_strntoul_8bit(CHARSET_INFO *, const char *s, uint l, int base
, | | ulong my_strntoul_8bit(CHARSET_INFO *, const char *s, uint l, int base
, | |
| char **e, int *err); | | char **e, int *err); | |
| longlong my_strntoll_8bit(CHARSET_INFO *, const char *s, uint l, int base
, | | longlong my_strntoll_8bit(CHARSET_INFO *, const char *s, uint l, int base
, | |
| char **e, int *err); | | char **e, int *err); | |
| ulonglong my_strntoull_8bit(CHARSET_INFO *, const char *s, uint l, int base
, | | ulonglong my_strntoull_8bit(CHARSET_INFO *, const char *s, uint l, int base
, | |
| char **e, int *err); | | char **e, int *err); | |
| double my_strntod_8bit(CHARSET_INFO *, char *s, uint l,char **e, | | double my_strntod_8bit(CHARSET_INFO *, char *s, uint l,char **e, | |
| | | | |
End of changes. 5 change blocks. |
| 2 lines changed or deleted | | 6 lines changed or added | |
|
| my_global.h | | my_global.h | |
| | | | |
| skipping to change at line 415 | | skipping to change at line 415 | |
| /* 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 | |
| | | # define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__) | |
| | | # 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 | |
|
| #if !defined(__attribute__) && (defined(__cplusplus) || !defined(__GNUC__) | | | |
| || __GNUC__ == 2 && __GNUC_MINOR__ < 8) | | /* | |
| #define __attribute__(A) | | Disable __attribute__() on gcc < 2.7, g++ < 3.4, and non-gcc compilers. | |
| | | Some forms of __attribute__ are actually supported in earlier versions of | |
| | | g++, but we just disable them all because we only use them to generate | |
| | | compilation warnings. | |
| | | */ | |
| | | #ifndef __attribute__ | |
| | | # if !defined(__GNUC__) | |
| | | # define __attribute__(A) | |
| | | # elif GCC_VERSION < 2008 | |
| | | # define __attribute__(A) | |
| | | # elif defined(__cplusplus) && GCC_VERSION < 3004 | |
| | | # define __attribute__(A) | |
| | | # endif | |
| | | #endif | |
| | | | |
| | | /* | |
| | | __attribute__((format(...))) is only supported in gcc >= 2.8 and g++ >= 3 | |
| | | .4 | |
| | | But that's already covered by the __attribute__ tests above, so this is | |
| | | just a convenience macro. | |
| | | */ | |
| | | #ifndef ATTRIBUTE_FORMAT | |
| | | # define ATTRIBUTE_FORMAT(style, m, n) __attribute__((format(style, m, n))) | |
| | | #endif | |
| | | | |
| | | /* | |
| | | __attribute__((format(...))) on a function pointer is not supported | |
| | | until gcc 3.1 | |
| | | */ | |
| | | #ifndef ATTRIBUTE_FORMAT_FPTR | |
| | | # if (GCC_VERSION >= 3001) | |
| | | # define ATTRIBUTE_FORMAT_FPTR(style, m, n) ATTRIBUTE_FORMAT(style, m, n) | |
| | | # else | |
| | | # define ATTRIBUTE_FORMAT_FPTR(style, m, n) | |
| | | # endif /* GNUC >= 3.1 */ | |
| #endif | | #endif | |
| | | | |
| /* From old s-system.h */ | | /* From old s-system.h */ | |
| | | | |
| /* | | /* | |
| Support macros for non ansi & other old compilers. Since such | | Support macros for non ansi & other old compilers. Since such | |
| things are no longer supported we do nothing. We keep then since | | things are no longer supported we do nothing. We keep then since | |
| some of our code may still be needed to upgrade old customers. | | some of our code may still be needed to upgrade old customers. | |
| */ | | */ | |
| #define _VARARGS(X) X | | #define _VARARGS(X) X | |
| | | | |
End of changes. 2 change blocks. |
| 3 lines changed or deleted | | 40 lines changed or added | |
|
| my_sys.h | | my_sys.h | |
| | | | |
| skipping to change at line 328 | | skipping to change at line 328 | |
| char *str; | | char *str; | |
| uint length,max_length,alloc_increment; | | uint length,max_length,alloc_increment; | |
| } DYNAMIC_STRING; | | } DYNAMIC_STRING; | |
| | | | |
| struct st_io_cache; | | struct st_io_cache; | |
| typedef int (*IO_CACHE_CALLBACK)(struct st_io_cache*); | | typedef int (*IO_CACHE_CALLBACK)(struct st_io_cache*); | |
| | | | |
| #ifdef THREAD | | #ifdef THREAD | |
| typedef struct st_io_cache_share | | typedef struct st_io_cache_share | |
| { | | { | |
|
| /* to sync on reads into buffer */ | | pthread_mutex_t mutex; /* To sync on reads into buffer. * | |
| pthread_mutex_t mutex; | | / | |
| pthread_cond_t cond; | | pthread_cond_t cond; /* To wait for signals. */ | |
| int count, total; | | pthread_cond_t cond_writer; /* For a synchronized writer. */ | |
| /* actual IO_CACHE that filled the buffer */ | | /* Offset in file corresponding to the first byte of buffer. */ | |
| struct st_io_cache *active; | | my_off_t pos_in_file; | |
| | | /* If a synchronized write cache is the source of the data. */ | |
| | | struct st_io_cache *source_cache; | |
| | | byte *buffer; /* The read buffer. */ | |
| | | byte *read_end; /* Behind last valid byte of buffe | |
| | | r. */ | |
| | | int running_threads; /* threads not in lock. */ | |
| | | int total_threads; /* threads sharing the cache. */ | |
| | | int error; /* Last error. */ | |
| #ifdef NOT_YET_IMPLEMENTED | | #ifdef NOT_YET_IMPLEMENTED | |
| /* whether the structure should be free'd */ | | /* whether the structure should be free'd */ | |
| my_bool alloced; | | my_bool alloced; | |
| #endif | | #endif | |
| } IO_CACHE_SHARE; | | } IO_CACHE_SHARE; | |
| #endif | | #endif | |
| | | | |
| typedef struct st_io_cache /* Used when cacheing files */ | | typedef struct st_io_cache /* Used when cacheing files */ | |
| { | | { | |
| /* Offset in file corresponding to the first byte of byte* buffer. */ | | /* Offset in file corresponding to the first byte of byte* buffer. */ | |
| | | | |
| skipping to change at line 591 | | skipping to change at line 597 | |
| extern void TERMINATE(FILE *file); | | extern void TERMINATE(FILE *file); | |
| #endif | | #endif | |
| extern void init_glob_errs(void); | | extern void init_glob_errs(void); | |
| extern FILE *my_fopen(const char *FileName,int Flags,myf MyFlags); | | extern FILE *my_fopen(const char *FileName,int Flags,myf MyFlags); | |
| extern FILE *my_fdopen(File Filedes,const char *name, int Flags,myf MyFlags
); | | extern FILE *my_fdopen(File Filedes,const char *name, int Flags,myf MyFlags
); | |
| extern int my_fclose(FILE *fd,myf MyFlags); | | extern int my_fclose(FILE *fd,myf MyFlags); | |
| extern int my_chsize(File fd,my_off_t newlength, int filler, myf MyFlags); | | extern int my_chsize(File fd,my_off_t newlength, int filler, myf MyFlags); | |
| extern int my_sync(File fd, myf my_flags); | | extern int my_sync(File fd, myf my_flags); | |
| extern int my_error _VARARGS((int nr,myf MyFlags, ...)); | | extern int my_error _VARARGS((int nr,myf MyFlags, ...)); | |
| extern int my_printf_error _VARARGS((uint my_err, const char *format, | | extern int my_printf_error _VARARGS((uint my_err, const char *format, | |
|
| myf MyFlags, ...) | | myf MyFlags, ...)) | |
| __attribute__ ((format (printf, 2, 4)))) | | ATTRIBUTE_FORMAT(printf, 2, 4); | |
| ; | | | |
| extern int my_message(uint my_err, const char *str,myf MyFlags); | | extern int my_message(uint my_err, const char *str,myf MyFlags); | |
| extern int my_message_no_curses(uint my_err, const char *str,myf MyFlags); | | extern int my_message_no_curses(uint my_err, const char *str,myf MyFlags); | |
| extern int my_message_curses(uint my_err, const char *str,myf MyFlags); | | extern int my_message_curses(uint my_err, const char *str,myf MyFlags); | |
| extern my_bool my_init(void); | | extern my_bool my_init(void); | |
| extern void my_end(int infoflag); | | extern void my_end(int infoflag); | |
| extern int my_redel(const char *from, const char *to, int MyFlags); | | extern int my_redel(const char *from, const char *to, int MyFlags); | |
| extern int my_copystat(const char *from, const char *to, int MyFlags); | | extern int my_copystat(const char *from, const char *to, int MyFlags); | |
| extern my_string my_filename(File fd); | | extern my_string my_filename(File fd); | |
| | | | |
| #ifndef THREAD | | #ifndef THREAD | |
| | | | |
| skipping to change at line 675 | | skipping to change at line 681 | |
| extern int init_io_cache(IO_CACHE *info,File file,uint cachesize, | | extern int init_io_cache(IO_CACHE *info,File file,uint cachesize, | |
| enum cache_type type,my_off_t seek_offset, | | enum cache_type type,my_off_t seek_offset, | |
| pbool use_async_io, myf cache_myflags); | | pbool use_async_io, myf cache_myflags); | |
| extern my_bool reinit_io_cache(IO_CACHE *info,enum cache_type type, | | extern my_bool reinit_io_cache(IO_CACHE *info,enum cache_type type, | |
| my_off_t seek_offset,pbool use_async_io, | | my_off_t seek_offset,pbool use_async_io, | |
| pbool clear_cache); | | pbool clear_cache); | |
| extern void setup_io_cache(IO_CACHE* info); | | extern void setup_io_cache(IO_CACHE* info); | |
| extern int _my_b_read(IO_CACHE *info,byte *Buffer,uint Count); | | extern int _my_b_read(IO_CACHE *info,byte *Buffer,uint Count); | |
| #ifdef THREAD | | #ifdef THREAD | |
| extern int _my_b_read_r(IO_CACHE *info,byte *Buffer,uint Count); | | extern int _my_b_read_r(IO_CACHE *info,byte *Buffer,uint Count); | |
|
| extern void init_io_cache_share(IO_CACHE *info, | | extern void init_io_cache_share(IO_CACHE *read_cache, IO_CACHE_SHARE *cshar | |
| IO_CACHE_SHARE *s, uint num_threads); | | e, | |
| | | IO_CACHE *write_cache, uint num_threads); | |
| extern void remove_io_thread(IO_CACHE *info); | | extern void remove_io_thread(IO_CACHE *info); | |
| #endif | | #endif | |
| extern int _my_b_seq_read(IO_CACHE *info,byte *Buffer,uint Count); | | extern int _my_b_seq_read(IO_CACHE *info,byte *Buffer,uint Count); | |
| extern int _my_b_net_read(IO_CACHE *info,byte *Buffer,uint Count); | | extern int _my_b_net_read(IO_CACHE *info,byte *Buffer,uint Count); | |
| extern int _my_b_get(IO_CACHE *info); | | extern int _my_b_get(IO_CACHE *info); | |
| extern int _my_b_async_read(IO_CACHE *info,byte *Buffer,uint Count); | | extern int _my_b_async_read(IO_CACHE *info,byte *Buffer,uint Count); | |
| extern int _my_b_write(IO_CACHE *info,const byte *Buffer,uint Count); | | extern int _my_b_write(IO_CACHE *info,const byte *Buffer,uint Count); | |
| extern int my_b_append(IO_CACHE *info,const byte *Buffer,uint Count); | | extern int my_b_append(IO_CACHE *info,const byte *Buffer,uint Count); | |
| extern int my_b_safe_write(IO_CACHE *info,const byte *Buffer,uint Count); | | extern int my_b_safe_write(IO_CACHE *info,const byte *Buffer,uint Count); | |
| | | | |
| | | | |
End of changes. 3 change blocks. |
| 11 lines changed or deleted | | 19 lines changed or added | |
|