client_plugin.h   client_plugin.h 
skipping to change at line 38 skipping to change at line 38
#ifndef MYSQL_ABI_CHECK #ifndef MYSQL_ABI_CHECK
#include <stdarg.h> #include <stdarg.h>
#include <stdlib.h> #include <stdlib.h>
#endif #endif
#ifndef PLUGINDIR #ifndef PLUGINDIR
#define PLUGINDIR "lib/plugin" #define PLUGINDIR "lib/plugin"
#endif #endif
/* known plugin types */ /* known plugin types */
#define MYSQL_CLIENT_reserved1 0 #define MYSQL_CLIENT_DB_PLUGIN 0
#define MYSQL_CLIENT_reserved2 1 #define MYSQL_CLIENT_reserved 1
#define MYSQL_CLIENT_AUTHENTICATION_PLUGIN 2 #define MYSQL_CLIENT_AUTHENTICATION_PLUGIN 2
#define MYSQL_CLIENT_AUTHENTICATION_PLUGIN_INTERFACE_VERSION 0x0100 #define MYSQL_CLIENT_AUTHENTICATION_PLUGIN_INTERFACE_VERSION 0x0100
#define MYSQL_CLIENT_DB_PLUGIN_INTERFACE_VERSION 0x0100
#define MYSQL_CLIENT_MAX_PLUGINS 3 #define MYSQL_CLIENT_MAX_PLUGINS 3
#define mysql_declare_client_plugin(X) \ #define mysql_declare_client_plugin(X) \
struct st_mysql_client_plugin_ ## X \ struct st_mysql_client_plugin_ ## X \
_mysql_client_plugin_declaration_ = { \ _mysql_client_plugin_declaration_ = { \
MYSQL_CLIENT_ ## X ## _PLUGIN, \ MYSQL_CLIENT_ ## X ## _PLUGIN, \
MYSQL_CLIENT_ ## X ## _PLUGIN_INTERFACE_VERSION, MYSQL_CLIENT_ ## X ## _PLUGIN_INTERFACE_VERSION,
#define mysql_end_client_plugin } #define mysql_end_client_plugin }
/* generic plugin header structure */ /* generic plugin header structure */
#define MYSQL_CLIENT_PLUGIN_HEADER \ #define MYSQL_CLIENT_PLUGIN_HEADER \
int type; \ int type; \
unsigned int interface_version; \ unsigned int interface_version; \
const char *name; \ const char *name; \
const char *author; \ const char *author; \
const char *desc; \ const char *desc; \
unsigned int version[3]; \ unsigned int version[3]; \
int (*init)(char *, size_t, int, va_list); \ int (*init)(char *, size_t, int, va_list); \
int (*deinit)(); int (*deinit)(void);
struct st_mysql_client_plugin struct st_mysql_client_plugin
{ {
MYSQL_CLIENT_PLUGIN_HEADER MYSQL_CLIENT_PLUGIN_HEADER
}; };
struct st_mysql; struct st_mysql;
/********* database api plugin specific declarations **********/
typedef struct st_mariadb_client_plugin_DB
{
MYSQL_CLIENT_PLUGIN_HEADER
/* functions */
struct st_mysql_methods *methods;
/*
MYSQL * (*db_connect)(MYSQL *mysql,const char *host, const char *user,
const char *passwd, const char *db, uint po
rt,
const char *unix_socket,unsigned long client_flag);
void (*db_close)(MYSQL *mysql);
int (*db_query)(MYSQL *mysql, const char *query, size_t query_len);
int (*db_read_one_row)(MYSQL *mysql, uint fields, MYSQL_ROW row,
ulong *lengths);
MYSQL_DATA *(*db_read_all_rows)(MYSQL *mysql,
MYSQL_FIELD *mysql_fields, uint fields);
void (*db_query_end)(MYSQL *mysql);
int (*db_stmt_prepare)(MYSQL_STMT *stmt, const char *stmt_str, ulong leng
th);
my_bool (*db_stmt_close)(MYSQL_STMT *stmt);
my_bool (*is_supported_buffer_type)(enum enum_field_types type);
int (*db_stmt_fetch)(MYSQL_STMT *stmt);
int (*db_stmt_execute)(MYSQL_STMT *stmt); */
} MARIADB_DB_PLUGIN;
#define MARIADB_DB_DRIVER(a) ((a)->ext_db)
/******** authentication plugin specific declarations *********/ /******** authentication plugin specific declarations *********/
#include <mysql/plugin_auth_common.h> #include <mysql/plugin_auth_common.h>
struct st_mysql_client_plugin_AUTHENTICATION struct st_mysql_client_plugin_AUTHENTICATION
{ {
MYSQL_CLIENT_PLUGIN_HEADER MYSQL_CLIENT_PLUGIN_HEADER
int (*authenticate_user)(MYSQL_PLUGIN_VIO *vio, struct st_mysql *mysql); int (*authenticate_user)(MYSQL_PLUGIN_VIO *vio, struct st_mysql *mysql);
}; };
/** /**
 End of changes. 4 change blocks. 
3 lines changed or deleted 32 lines changed or added


 config-win.h   config-win.h 
skipping to change at line 114 skipping to change at line 114
#define bool BOOL #define bool BOOL
#define SIGPIPE SIGINT #define SIGPIPE SIGINT
#define RETQSORTTYPE void #define RETQSORTTYPE void
#define QSORT_TYPE_IS_VOID #define QSORT_TYPE_IS_VOID
#define RETSIGTYPE void #define RETSIGTYPE void
#define SOCKET_SIZE_TYPE int #define SOCKET_SIZE_TYPE int
#define my_socket_defined #define my_socket_defined
#define bool_defined #define bool_defined
#define byte_defined #define byte_defined
#define HUGE_PTR #define HUGE_PTR
#define STDCALL __stdcall /* Used by libmysql.dll */ #define STDCALL __stdcall /* Used by libmariadb.dll */
#define VOID_SIGHANDLER #define VOID_SIGHANDLER
#define SIZEOF_CHAR 1 #define SIZEOF_CHAR 1
#define SIZEOF_LONG 4 #define SIZEOF_LONG 4
#define SIZEOF_LONG_LONG 8 #define SIZEOF_LONG_LONG 8
#define SIZEOF_OFF_T 8 #define SIZEOF_OFF_T 8
#define HAVE_BROKEN_NETINET_INCLUDES #define HAVE_BROKEN_NETINET_INCLUDES
#ifdef __NT__ #ifdef __NT__
#define HAVE_NAMED_PIPE /* We can only create pipes on NT */ #define HAVE_NAMED_PIPE /* We can only create pipes on NT */
#endif #endif
skipping to change at line 216 skipping to change at line 216
#define HAVE_SOCKET /* Giangi */ #define HAVE_SOCKET /* Giangi */
#define HAVE_FLOAT_H #define HAVE_FLOAT_H
#define HAVE_LIMITS_H #define HAVE_LIMITS_H
#define HAVE_STDDEF_H #define HAVE_STDDEF_H
#define HAVE_RINT /* defined in this file */ #define HAVE_RINT /* defined in this file */
#define NO_FCNTL_NONBLOCK /* No FCNTL */ #define NO_FCNTL_NONBLOCK /* No FCNTL */
#define HAVE_ALLOCA #define HAVE_ALLOCA
#define HAVE_STRPBRK #define HAVE_STRPBRK
#define HAVE_STRSTR #define HAVE_STRSTR
#ifdef NOT_USED #ifdef WIN32
#define HAVE_SNPRINTF /* Gave link error */ #define HAVE_SNPRINTF /* Gave link error */
#define _snprintf snprintf #define snprintf _snprintf
#endif #endif
#ifdef _MSC_VER #ifdef _MSC_VER
#define HAVE_LDIV /* The optimizer breaks in zortech for ldiv */ #define HAVE_LDIV /* The optimizer breaks in zortech for ldiv */
#define HAVE_ANSI_INCLUDE #define HAVE_ANSI_INCLUDE
#define HAVE_SYS_UTIME_H #define HAVE_SYS_UTIME_H
#define HAVE_STRTOUL #define HAVE_STRTOUL
#endif #endif
#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>
skipping to change at line 267 skipping to change at line 267
#else #else
#define thread_safe_add(V,C,L) \ #define thread_safe_add(V,C,L) \
pthread_mutex_lock((L)); (V)+=(C); pthread_mutex_unlock((L)); pthread_mutex_lock((L)); (V)+=(C); pthread_mutex_unlock((L));
#define thread_safe_sub(V,C,L) \ #define thread_safe_sub(V,C,L) \
pthread_mutex_lock((L)); (V)-=(C); pthread_mutex_unlock((L)); pthread_mutex_lock((L)); (V)-=(C); pthread_mutex_unlock((L));
#define statistic_add(V,C,L) (V)+=(C) #define statistic_add(V,C,L) (V)+=(C)
#endif #endif
#define statistic_increment(V,L) thread_safe_increment((V),(L)) #define statistic_increment(V,L) thread_safe_increment((V),(L))
#define strcasecmp(A,B) _stricmp((A),(B)) #define strcasecmp(A,B) _stricmp((A),(B))
#define close(A) _close((A))
#define fdopen(A,B) _fdopen((A),(B))
#define sopen(A,B,C,D) _sopen((A),(B),(C),(D))
#endif #endif
 End of changes. 4 change blocks. 
3 lines changed or deleted 7 lines changed or added


 dbug.h   dbug.h 
skipping to change at line 24 skipping to change at line 24
License along with this library; if not, write to the Free License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA */ MA 02111-1307, USA */
#ifndef _dbug_h #ifndef _dbug_h
#define _dbug_h #define _dbug_h
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#if !defined(DBUG_OFF) && !defined(_lint) #if !defined(DBUG_OFF) && !defined(_lint)
extern int _db_on_,_no_db_;
extern FILE *_db_fp_;
extern char *_db_process_;
extern int _db_keyword_(const char *keyword);
extern void _db_setjmp_(void);
extern void _db_longjmp_(void);
extern void _db_push_(const char *control);
extern void _db_pop_(void);
extern void _db_enter_(const char *_func_,const char *_file_,uint _line_,
const char **_sfunc_,const char **_sfile_,
uint *_slevel_, char ***);
extern void _db_return_(uint _line_,const char **_sfunc_,const char **_sfil
e_,
uint *_slevel_);
extern void _db_pargs_(uint _line_,const char *keyword);
extern void _db_doprnt_ _VARARGS((const char *format,...));
extern void _db_dump_(uint _line_,const char *keyword,const char *memory,
uint length);
extern void _db_lock_file();
extern void _db_unlock_file();
#define DBUG_ENTER(a) const char *_db_func_, *_db_file_; uint _db_level_; \ struct _db_stack_frame_ {
char **_db_framep_; \ const char *func; /* function name of the previous stack frame
_db_enter_ (a,__FILE__,__LINE__,&_db_func_,&_db_file_,&_db_level_, \ */
&_db_framep_) 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 */
};
struct _db_code_state_;
extern my_bool _dbug_on_;
extern my_bool _db_keyword_(struct _db_code_state_ *, const char *, int);
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_is_pushed_(void);
extern void _db_setjmp_(void);
extern void _db_longjmp_(void);
extern void _db_process_(const char *name);
extern void _db_push_(const char *control);
extern void _db_pop_(void);
extern void _db_set_(const char *control);
extern void _db_set_init_(const char *control);
extern void _db_enter_(const char *_func_, const char *_file_, uint _line_,
struct _db_stack_frame_ *_stack_frame_);
extern void _db_return_(uint _line_, struct _db_stack_frame_ *_stack_frame
_);
extern void _db_pargs_(uint _line_,const char *keyword);
extern void _db_doprnt_ _VARARGS((const char *format,...));
extern void _db_dump_(uint _line_,const char *keyword,
const unsigned char *memory, size_t length);
extern void _db_end_(void);
extern void _db_lock_file_(void);
extern void _db_unlock_file_(void);
extern FILE *_db_fp_(void);
extern void _db_flush_();
extern const char* _db_get_func_(void);
/*
#define DBUG_ENTER(a) struct _db_stack_frame_ _db_stack_frame_; \
_db_enter_ (a,__FILE__,__LINE__,&_db_stack_frame_)
#define DBUG_LEAVE \ #define DBUG_LEAVE \
(_db_return_ (__LINE__, &_db_func_, &_db_file_, &_db_level_)) (_db_return_ (__LINE__, &_db_func_, &_db_file_, &_db_level_))
#define DBUG_RETURN(a1) {DBUG_LEAVE; return(a1);} #define DBUG_RETURN(a1) do {DBUG_LEAVE; return(a1);} while(0)
#define DBUG_VOID_RETURN {DBUG_LEAVE; return;} #define DBUG_VOID_RETURN {DBUG_LEAVE; return;}
#define DBUG_END() _db_end_ ()
#define DBUG_EXECUTE(keyword,a1) \ #define DBUG_EXECUTE(keyword,a1) \
{if (_db_on_) {if (_db_keyword_ (keyword)) { a1 }}} {if (_db_on_) {if (_db_keyword_ (keyword)) { a1 }}}
#define DBUG_PRINT(keyword,arglist) \ #define DBUG_PRINT(keyword,arglist) \
{if (_db_on_) {_db_pargs_(__LINE__,keyword); _db_doprnt_ arglist;}} {if (_db_on_) {_db_pargs_(__LINE__,keyword); _db_doprnt_ arglist;}}
#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_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)\ #define DBUG_DUMP(keyword,a1,a2)\
{if (_db_on_) {_db_dump_(__LINE__,keyword,a1,a2);}} {if (_db_on_) {_db_dump_(__LINE__,keyword,a1,a2);}}
#define DBUG_IN_USE (_db_fp_ && _db_fp_ != stderr) #define DBUG_IN_USE (_db_fp_ && _db_fp_ != stderr)
#define DEBUGGER_OFF _no_db_=1;_db_on_=0; #define DEBUGGER_OFF _no_db_=1;_db_on_=0;
#define DEBUGGER_ON _no_db_=0 #define DEBUGGER_ON _no_db_=0
#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_ENTER(a) struct _db_stack_frame_ _db_stack_frame_; \
_db_enter_ (a,__FILE__,__LINE__,&_db_stack_frame_)
#define DBUG_LEAVE _db_return_ (__LINE__, &_db_stack_frame_)
#define DBUG_RETURN(a1) do {DBUG_LEAVE; return(a1);} while(0)
#define DBUG_VOID_RETURN do {DBUG_LEAVE; return;} while(0)
#define DBUG_EXECUTE(keyword,a1) \
do {if (_db_keyword_(0, (keyword), 0)) { a1 }} while(0)
#define DBUG_EXECUTE_IF(keyword,a1) \
do {if (_db_keyword_(0, (keyword), 1)) { a1 }} while(0)
#define DBUG_EVALUATE(keyword,a1,a2) \
(_db_keyword_(0,(keyword), 0) ? (a1) : (a2))
#define DBUG_EVALUATE_IF(keyword,a1,a2) \
(_db_keyword_(0,(keyword), 1) ? (a1) : (a2))
#define DBUG_PRINT(keyword,arglist) \
do {_db_pargs_(__LINE__,keyword); _db_doprnt_ arglist;} while(0)
#define DBUG_PUSH(a1) _db_push_ (a1)
#define DBUG_POP() _db_pop_ ()
#define DBUG_SET(a1) _db_set_ (a1)
#define DBUG_SET_INITIAL(a1) _db_set_init_ (a1)
#define DBUG_PROCESS(a1) _db_process_(a1)
#define DBUG_FILE _db_fp_()
#define DBUG_SETJMP(a1) (_db_setjmp_ (), setjmp (a1))
#define DBUG_LONGJMP(a1,a2) (_db_longjmp_ (), longjmp (a1, a2))
#define DBUG_DUMP(keyword,a1,a2) _db_dump_(__LINE__,keyword,a1,a2)
#define DBUG_END() _db_end_ ()
#define DBUG_LOCK_FILE _db_lock_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_INITIAL(buf,len) _db_explain_init_((buf),(len))
#define DEBUGGER_OFF do { _dbug_on_= 0; } while(0)
#define DEBUGGER_ON do { _dbug_on_= 1; } while(0)
#ifndef _WIN32
#define DBUG_ABORT() (_db_flush_(), abort())
#else
#define DBUG_ABORT() (_db_flush_(), exit(3))
#endif
#else /* No debugger */ #else /* No debugger */
#define DBUG_ENTER(a1) #define DBUG_ENTER(a1)
#define DBUG_END() {}
#define DBUG_RETURN(a1) return(a1) #define DBUG_RETURN(a1) return(a1)
#define DBUG_VOID_RETURN return #define DBUG_VOID_RETURN return
#define DBUG_EXECUTE(keyword,a1) {} #define DBUG_EXECUTE(keyword,a1) {}
#define DBUG_PRINT(keyword,arglist) {} #define DBUG_PRINT(keyword,arglist) {}
#define DBUG_PUSH(a1) {} #define DBUG_PUSH(a1) {}
#define DBUG_POP() {} #define DBUG_POP() {}
#define DBUG_PROCESS(a1) {} #define DBUG_PROCESS(a1) {}
#define DBUG_FILE (stderr) #define DBUG_FILE (stderr)
#define DBUG_SETJMP setjmp #define DBUG_SETJMP setjmp
#define DBUG_LONGJMP longjmp #define DBUG_LONGJMP longjmp
 End of changes. 7 change blocks. 
25 lines changed or deleted 82 lines changed or added


 errmsg.h   errmsg.h 
skipping to change at line 20 skipping to change at line 20
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details. Library General Public License for more details.
You should have received a copy of the GNU Library General Public You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA */ MA 02111-1307, USA */
/* Error messages for mysql clients */ /* Error messages for mysql clients */
/* error messages for the demon is in share/language/errmsg.sys */ /* error messages for the demon is in share/language/errmsg.sys */
#ifndef _errmsg_h_
#define _errmsg_h_
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
void init_client_errs(void); void init_client_errs(void);
extern const char *client_errors[]; /* Error messages */ extern const char *client_errors[]; /* Error messages */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
skipping to change at line 73 skipping to change at line 75
#define CR_PARAMS_NOT_BOUND 2031 #define CR_PARAMS_NOT_BOUND 2031
#define CR_INVALID_PARAMETER_NO 2034 #define CR_INVALID_PARAMETER_NO 2034
#define CR_UNSUPPORTED_PARAM_TYPE 2036 #define CR_UNSUPPORTED_PARAM_TYPE 2036
#define CR_NO_DATA 2051 #define CR_NO_DATA 2051
#define CR_NO_STMT_METADATA 2052 #define CR_NO_STMT_METADATA 2052
#define CR_NOT_IMPLEMENTED 2054 #define CR_NOT_IMPLEMENTED 2054
#define CR_SERVER_LOST_EXTENDED 2055 #define CR_SERVER_LOST_EXTENDED 2055
#define CR_NEW_STMT_METADATA 2057 #define CR_NEW_STMT_METADATA 2057
#define CR_AUTH_PLUGIN_CANNOT_LOAD 2058 #define CR_AUTH_PLUGIN_CANNOT_LOAD 2058
#define CR_ALREADY_CONNECTED 2059 #define CR_ALREADY_CONNECTED 2059
#define CR_PLUGIN_FUNCTION_NOT_SUPPORTED 2060
#define SQLSTATE_UNKNOWN "HY000" #define SQLSTATE_UNKNOWN "HY000"
#endif
 End of changes. 3 change blocks. 
0 lines changed or deleted 3 lines changed or added


 global.h   global.h 
skipping to change at line 405 skipping to change at line 405
/* #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. */
#define IO_SIZE 4096 #define IO_SIZE 4096
/* How much overhead does malloc have. The code often allocates /* How much overhead does malloc have. The code often allocates
something like 1024-MALLOC_OVERHEAD bytes */ something like 1024-MALLOC_OVERHEAD bytes */
#ifdef SAFEMALLOC
#define MALLOC_OVERHEAD (8+24+4)
#else
#define MALLOC_OVERHEAD 8 #define MALLOC_OVERHEAD 8
#endif
/* get memory in huncs */ /* get memory in huncs */
#define ONCE_ALLOC_INIT (uint) (4096-MALLOC_OVERHEAD) #define ONCE_ALLOC_INIT (uint) (4096-MALLOC_OVERHEAD)
/* Typical record cash */ /* Typical record cash */
#define RECORD_CACHE_SIZE (uint) (64*1024-MALLOC_OVERHEAD) #define RECORD_CACHE_SIZE (uint) (64*1024-MALLOC_OVERHEAD)
/* Typical key cash */ /* Typical key cash */
#define KEY_CACHE_SIZE (uint) (8*1024*1024-MALLOC_OVERHEAD) #define KEY_CACHE_SIZE (uint) (8*1024*1024-MALLOC_OVERHEAD)
/* Some things that this system doesn't have */ /* Some things that this system doesn't have */
#define ONLY_OWN_DATABASES /* We are using only databases by monty */ #define ONLY_OWN_DATABASES /* We are using only databases by monty */
skipping to change at line 729 skipping to change at line 725
*((T)+1)=(uchar) (((A) >> 8));\ *((T)+1)=(uchar) (((A) >> 8));\
*((T)+2)=(uchar) (((A) >> 16));\ *((T)+2)=(uchar) (((A) >> 16));\
*((T)+3)=(uchar) (((A) >> 24)); \ *((T)+3)=(uchar) (((A) >> 24)); \
*((T)+4)=(uchar) (((A) >> 32)); } *((T)+4)=(uchar) (((A) >> 32)); }
#define int8store(T,A) *((ulonglong *) (T))= (ulonglong) (A) #define int8store(T,A) *((ulonglong *) (T))= (ulonglong) (A)
typedef union { typedef union {
double v; double v;
long m[2]; long m[2];
} doubleget_union; } doubleget_union;
#define doubleget(V,M) { ((doubleget_union *)&V)->m[0] = *((long*) M); \ #define doubleget(V,M) { ((const doubleget_union *)&V)->m[0] = *((long*) M)
((doubleget_union *)&V)->m[1] = *(((long*) M)+1); ; \
} ((const doubleget_union *)&V)->m[1] = *(((long*) M
)+1); }
#define doublestore(T,V) { *((long *) T) = ((doubleget_union *)&V)->m[0]; \ #define doublestore(T,V) { *((long *) T) = ((doubleget_union *)&V)->m[0]; \
*(((long *) T)+1) = ((doubleget_union *)&V)->m[1] ; } *(((long *) T)+1) = ((doubleget_union *)&V)->m[1] ; }
#define float4get(V,M) { *((long *) &(V)) = *((long*) (M)); } #define float4get(V,M) { *((long *) &(V)) = *((long*) (M)); }
#define float8get(V,M) doubleget((V),(M)) #define float8get(V,M) doubleget((V),(M))
#define float4store(V,M) memcpy((byte*) V,(byte*) (&M),sizeof(float)) #define float4store(V,M) memcpy((byte*) V,(byte*) (&M),sizeof(float))
#define float8store(V,M) doublestore((V),(M)) #define float8store(V,M) doublestore((V),(M))
#endif /* __i386__ */ #endif /* __i386__ */
#ifndef sint2korr #ifndef sint2korr
#define sint2korr(A) (int16) (((int16) ((uchar) (A)[0])) +\ #define sint2korr(A) (int16) (((int16) ((uchar) (A)[0])) +\
 End of changes. 3 change blocks. 
7 lines changed or deleted 4 lines changed or added


 hash.h   hash.h 
/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB /**************************************************************************
**********
Copyright (C) 2000, 2012 MySQL AB & MySQL Finland AB & TCX DataKonsult
AB,
Monty Program AB
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version. version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library 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 GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details. Library General Public License for more details.
You should have received a copy of the GNU Library General Public You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free License along with this library; if not see <http://www.gnu.org/licenses
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, >
MA 02111-1307, USA */ or write to the Free Software Foundation, Inc.,
51 Franklin St., Fifth Floor, Boston, MA 02110, USA
/* Dynamic hashing of record with different key-length */
Part of this code includes code from the PHP project which
is freely available from http://www.php.net
***************************************************************************
**********/
#ifndef _hash_h #ifndef _hash_h
#define _hash_h #define _hash_h
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
typedef byte *(*hash_get_key)(const byte *,uint*,my_bool); typedef uchar *(*hash_get_key)(const uchar *,uint*,my_bool);
typedef void (*hash_free_key)(void *); typedef void (*hash_free_key)(void *);
/* flags for hash_init */ /* flags for hash_init */
#define HASH_CASE_INSENSITIVE 1 #define HASH_CASE_INSENSITIVE 1
typedef struct st_hash_info { typedef struct st_hash_info {
uint next; /* index to next key */ uint next; /* index to next key */
byte *data; /* data for current entry */ uchar *data; /* data for current entry */
} HASH_LINK; } HASH_LINK;
typedef struct st_hash { typedef struct st_hash {
uint key_offset,key_length; /* Length of key if const length */ uint key_offset,key_length; /* Length of key if const length */
uint records,blength,current_record; uint records,blength,current_record;
uint flags; uint flags;
DYNAMIC_ARRAY array; /* Place for hash_keys */ DYNAMIC_ARRAY array; /* Place for hash_keys */
hash_get_key get_key; hash_get_key get_key;
void (*free)(void *); void (*free)(void *);
uint (*calc_hashnr)(const byte *key,uint length); uint (*calc_hashnr)(const uchar *key,uint length);
} HASH; } HASH;
#define hash_init(A,B,C,D,E,F,G) _hash_init(A,B,C,D,E,F,G CALLER_INFO) #define hash_init(A,B,C,D,E,F,G) _hash_init(A,B,C,D,E,F,G CALLER_INFO)
my_bool _hash_init(HASH *hash,uint default_array_elements, uint key_offset, my_bool _hash_init(HASH *hash,uint default_array_elements, uint key_offset,
uint key_length, hash_get_key get_key, uint key_length, hash_get_key get_key,
void (*free_element)(void*), uint flags CALLER_INFO_PROTO) ; void (*free_element)(void*), uint flags CALLER_INFO_PROTO) ;
void hash_free(HASH *tree); void hash_free(HASH *tree);
byte *hash_element(HASH *hash,uint idx); uchar *hash_element(HASH *hash,uint idx);
gptr hash_search(HASH *info,const byte *key,uint length); gptr hash_search(HASH *info,const uchar *key,uint length);
gptr hash_next(HASH *info,const byte *key,uint length); gptr hash_next(HASH *info,const uchar *key,uint length);
my_bool hash_insert(HASH *info,const byte *data); my_bool hash_insert(HASH *info,const uchar *data);
my_bool hash_delete(HASH *hash,byte *record); my_bool hash_delete(HASH *hash,uchar *record);
my_bool hash_update(HASH *hash,byte *record,byte *old_key,uint old_key_leng my_bool hash_update(HASH *hash,uchar *record,uchar *old_key,uint old_key_le
th); ngth);
my_bool hash_check(HASH *hash); /* Only in debug lib rary */ my_bool hash_check(HASH *hash); /* Only in debug lib rary */
#define hash_clear(H) bzero((char*) (H),sizeof(*(H))) #define hash_clear(H) bzero((char*) (H),sizeof(*(H)))
#define hash_inited(H) ((H)->array.buffer != 0) #define hash_inited(H) ((H)->array.buffer != 0)
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif
 End of changes. 6 change blocks. 
16 lines changed or deleted 24 lines changed or added


 m_ctype.h   m_ctype.h 
skipping to change at line 35 skipping to change at line 35
#include <ctype.h> #include <ctype.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#define CHARSET_DIR "charsets/" #define CHARSET_DIR "charsets/"
#define MY_CS_NAME_SIZE 32 #define MY_CS_NAME_SIZE 32
#define MADB_DEFAULT_CHARSET_NAME "latin1"
#define MADB_DEFAULT_COLLATION_NAME "latin1_swedish_ci"
/* we use the mysqlnd implementation */ /* we use the mysqlnd implementation */
typedef struct charset_info_st typedef struct charset_info_st
{ {
uint nr; /* so far only 1 byte for charset */ unsigned int nr; /* so far only 1 byte for charset */
uint state; unsigned int state;
char *csname; char *csname;
char *name; char *name;
char *comment;
char *dir; char *dir;
uint char_minlen; unsigned int codepage;
uint char_maxlen; char *encoding;
uint (*mb_charlen)(uint c); unsigned int char_minlen;
uint (*mb_valid)(const char *start, const char *end); unsigned int char_maxlen;
unsigned int (*mb_charlen)(unsigned int c);
unsigned int (*mb_valid)(const char *start, const char *end);
} CHARSET_INFO; } CHARSET_INFO;
extern const CHARSET_INFO compiled_charsets[]; extern const CHARSET_INFO compiled_charsets[];
extern CHARSET_INFO *default_charset_info; extern CHARSET_INFO *default_charset_info;
extern CHARSET_INFO *my_charset_bin;
extern CHARSET_INFO *my_charset_latin1;
extern CHARSET_INFO *my_charset_utf8_general_ci;
CHARSET_INFO *find_compiled_charset(uint cs_number); CHARSET_INFO *find_compiled_charset(unsigned int cs_number);
CHARSET_INFO *find_compiled_charset_by_name(const char *name); CHARSET_INFO *find_compiled_charset_by_name(const char *name);
size_t mysql_cset_escape_quotes(const CHARSET_INFO *cset, char *newstr, co nst char *escapestr, size_t escapestr_len); size_t mysql_cset_escape_quotes(const CHARSET_INFO *cset, char *newstr, co nst char *escapestr, size_t escapestr_len);
size_t mysql_cset_escape_slashes(const CHARSET_INFO *cset, char *newstr, co nst char *escapestr, size_t escapestr_len); size_t mysql_cset_escape_slashes(const CHARSET_INFO *cset, char *newstr, co nst char *escapestr, size_t escapestr_len);
char* madb_get_os_character_set(void);
#ifdef _WIN32
int madb_get_windows_cp(const char *charset);
#endif
#ifdef __cplusplus
}
#endif
#endif #endif
 End of changes. 7 change blocks. 
8 lines changed or deleted 24 lines changed or added


 m_string.h   m_string.h 
skipping to change at line 91 skipping to change at line 91
# define bzero(A,B) memset((A),0,(B)) # define bzero(A,B) memset((A),0,(B))
# define bmove_allign(A,B,C) memcpy((A),(B),(C)) # define bmove_allign(A,B,C) memcpy((A),(B),(C))
#endif #endif
#if defined(__cplusplus) #if defined(__cplusplus)
extern "C" { extern "C" {
#endif #endif
#if defined(HAVE_STPCPY) && !defined(HAVE_mit_thread) #if defined(HAVE_STPCPY) && !defined(HAVE_mit_thread)
#define strmov(A,B) stpcpy((A),(B)) #define strmov(A,B) stpcpy((A),(B))
#ifndef stpcpy
extern char *stpcpy(char *, const char *); /* For AIX with gcc 2.95.3 *
/
#endif
#endif #endif
extern char NEAR _dig_vec[]; /* Declared in int2str() */ extern char NEAR _dig_vec[]; /* Declared in int2str() */
#ifdef BAD_STRING_COMPILER #ifdef BAD_STRING_COMPILER
#define strmov(A,B) (memccpy(A,B,0,INT_MAX)-1) #define strmov(A,B) (memccpy(A,B,0,INT_MAX)-1)
#else #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
 End of changes. 1 change blocks. 
4 lines changed or deleted 0 lines changed or added


 my_config.h   my_config.h 
#define HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE 1
/* /*
* Include file constants (processed in LibmysqlIncludeFiles.txt 1 * Include file constants (processed in LibmysqlIncludeFiles.txt 1
*/ */
#define HAVE_ALLOCA_H 1 #define HAVE_ALLOCA_H 1
#define HAVE_ARPA_INET_H 1 #define HAVE_ARPA_INET_H 1
#define HAVE_CRYPT_H 1 #define HAVE_CRYPT_H 1
#define HAVE_DIRENT_H 1 #define HAVE_DIRENT_H 1
#define HAVE_DLFCN_H 1 #define HAVE_DLFCN_H 1
#define HAVE_EXECINFO_H 1 #define HAVE_EXECINFO_H 1
#define HAVE_FCNTL_H 1 #define HAVE_FCNTL_H 1
skipping to change at line 72 skipping to change at line 70
#define HAVE_BZERO 1 #define HAVE_BZERO 1
/* #undef HAVE_CLOCK_GETTIME */ /* #undef HAVE_CLOCK_GETTIME */
/* #undef HAVE_COMPRESS */ /* #undef HAVE_COMPRESS */
/* #undef HAVE_CRYPT */ /* #undef HAVE_CRYPT */
#define HAVE_DLERROR 1 #define HAVE_DLERROR 1
#define HAVE_DLOPEN 1 #define HAVE_DLOPEN 1
#define HAVE_FCHMOD 1 #define HAVE_FCHMOD 1
#define HAVE_FCNTL 1 #define HAVE_FCNTL 1
/* #undef HAVE_FCONVERT */ /* #undef HAVE_FCONVERT */
#define HAVE_FDATASYNC 1 #define HAVE_FDATASYNC 1
/* #undef HAVE_FESETROUND */ #define HAVE_FESETROUND 1
#define HAVE_FINITE 1 #define HAVE_FINITE 1
#define HAVE_FSEEKO 1 #define HAVE_FSEEKO 1
#define HAVE_FSYNC 1 #define HAVE_FSYNC 1
#define HAVE_GETADDRINFO 1 #define HAVE_GETADDRINFO 1
#define HAVE_GETCWD 1 #define HAVE_GETCWD 1
#define HAVE_GETHOSTBYADDR_R 1 #define HAVE_GETHOSTBYADDR_R 1
#define HAVE_GETHOSTBYNAME_R 1 #define HAVE_GETHOSTBYNAME_R 1
/* #undef HAVE_GETHRTIME */ /* #undef HAVE_GETHRTIME */
#define HAVE_GETNAMEINFO 1 #define HAVE_GETNAMEINFO 1
#define HAVE_GETPAGESIZE 1 #define HAVE_GETPAGESIZE 1
skipping to change at line 94 skipping to change at line 92
/* #undef HAVE_GETPASSPHRASE */ /* #undef HAVE_GETPASSPHRASE */
#define HAVE_GETPWNAM 1 #define HAVE_GETPWNAM 1
#define HAVE_GETPWUID 1 #define HAVE_GETPWUID 1
#define HAVE_GETRLIMIT 1 #define HAVE_GETRLIMIT 1
#define HAVE_GETRUSAGE 1 #define HAVE_GETRUSAGE 1
#define HAVE_GETWD 1 #define HAVE_GETWD 1
#define HAVE_GMTIME_R 1 #define HAVE_GMTIME_R 1
#define HAVE_INITGROUPS 1 #define HAVE_INITGROUPS 1
#define HAVE_LDIV 1 #define HAVE_LDIV 1
#define HAVE_LOCALTIME_R 1 #define HAVE_LOCALTIME_R 1
/* #undef HAVE_LOG2 */ #define HAVE_LOG2 1
#define HAVE_LONGJMP 1 #define HAVE_LONGJMP 1
#define HAVE_LSTAT 1 #define HAVE_LSTAT 1
#define HAVE_MADVISE 1 #define HAVE_MADVISE 1
#define HAVE_MALLINFO 1 #define HAVE_MALLINFO 1
#define HAVE_MEMALIGN 1 #define HAVE_MEMALIGN 1
#define HAVE_MEMCPY 1 #define HAVE_MEMCPY 1
#define HAVE_MEMMOVE 1 #define HAVE_MEMMOVE 1
#define HAVE_MKSTEMP 1 #define HAVE_MKSTEMP 1
#define HAVE_MLOCK 1 #define HAVE_MLOCK 1
#define HAVE_MLOCKALL 1 #define HAVE_MLOCKALL 1
#define HAVE_MMAP 1 #define HAVE_MMAP 1
#define HAVE_MMAP64 1 #define HAVE_MMAP64 1
#define HAVE_PERROR 1 #define HAVE_PERROR 1
#define HAVE_POLL 1 #define HAVE_POLL 1
#define HAVE_PREAD 1 #define HAVE_PREAD 1
/* #undef HAVE_PTHREAD_ATTR_CREATE */ /* #undef HAVE_PTHREAD_ATTR_CREATE */
/* #undef HAVE_PTHREAD_ATTR_GETSTACKSIZE */ #define HAVE_PTHREAD_ATTR_GETSTACKSIZE 1
/* #undef HAVE_PTHREAD_ATTR_SETPRIO */ /* #undef HAVE_PTHREAD_ATTR_SETPRIO */
#define HAVE_PTHREAD_ATTR_SETSCHEDPARAM 1 #define HAVE_PTHREAD_ATTR_SETSCHEDPARAM 1
#define HAVE_PTHREAD_ATTR_SETSCOPE 1 #define HAVE_PTHREAD_ATTR_SETSCOPE 1
/* #undef HAVE_PTHREAD_ATTR_SETSTACKSIZE */ #define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1
/* #undef HAVE_PTHREAD_CONDATTR_CREATE */ /* #undef HAVE_PTHREAD_CONDATTR_CREATE */
/* #undef HAVE_PTHREAD_INIT */ /* #undef HAVE_PTHREAD_INIT */
/* #undef HAVE_PTHREAD_KEY_DELETE */ #define HAVE_PTHREAD_KEY_DELETE 1
/* #undef HAVE_PTHREAD_KILL */ #define HAVE_PTHREAD_KILL 1
/* #undef HAVE_PTHREAD_RWLOCK_RDLOCK */ #define HAVE_PTHREAD_RWLOCK_RDLOCK 1
/* #undef HAVE_PTHREAD_SETPRIO_NP */ /* #undef HAVE_PTHREAD_SETPRIO_NP */
#define HAVE_PTHREAD_SETSCHEDPARAM 1 #define HAVE_PTHREAD_SETSCHEDPARAM 1
/* #undef HAVE_PTHREAD_SIGMASK */ #define HAVE_PTHREAD_SIGMASK 1
/* #undef HAVE_PTHREAD_THREADMASK */ /* #undef HAVE_PTHREAD_THREADMASK */
/* #undef HAVE_PTHREAD_YIELD_NP */ /* #undef HAVE_PTHREAD_YIELD_NP */
#define HAVE_READDIR_R 1 #define HAVE_READDIR_R 1
#define HAVE_READLINK 1 #define HAVE_READLINK 1
#define HAVE_REALPATH 1 #define HAVE_REALPATH 1
#define HAVE_RENAME 1 #define HAVE_RENAME 1
#define HAVE_SCHED_YIELD 1 #define HAVE_SCHED_YIELD 1
#define HAVE_SELECT 1 #define HAVE_SELECT 1
/* #undef HAVE_SETFD */ /* #undef HAVE_SETFD */
/* #undef HAVE_SETFILEPOINTER */ /* #undef HAVE_SETFILEPOINTER */
#define HAVE_SIGNAL 1 #define HAVE_SIGNAL 1
#define HAVE_SIGACTION 1 #define HAVE_SIGACTION 1
/* #undef HAVE_SIGTHREADMASK */ /* #undef HAVE_SIGTHREADMASK */
#define HAVE_SIGWAIT 1 #define HAVE_SIGWAIT 1
#define HAVE_SLEEP 1 #define HAVE_SLEEP 1
#define HAVE_SNPRINTF 1 #define HAVE_SNPRINTF 1
/* #undef HAVE_SQLITE */
#define HAVE_STPCPY 1 #define HAVE_STPCPY 1
#define HAVE_STRERROR 1 #define HAVE_STRERROR 1
/* #undef HAVE_STRLCPY */ /* #undef HAVE_STRLCPY */
#define HAVE_STRNLEN 1 #define HAVE_STRNLEN 1
#define HAVE_STRPBRK 1 #define HAVE_STRPBRK 1
#define HAVE_STRSEP 1 #define HAVE_STRSEP 1
#define HAVE_STRSTR 1 #define HAVE_STRSTR 1
#define HAVE_STRTOK_R 1 #define HAVE_STRTOK_R 1
#define HAVE_STRTOL 1 #define HAVE_STRTOL 1
#define HAVE_STRTOLL 1 #define HAVE_STRTOLL 1
skipping to change at line 277 skipping to change at line 276
#define SOCKET_SIZE_TYPE socklen_t #define SOCKET_SIZE_TYPE socklen_t
#define RETSIGTYPE void #define RETSIGTYPE void
#define RETQSORTTYPE void #define RETQSORTTYPE void
/* /*
* various other defines * various other defines
*/ */
/* #undef HAVE_THREADS */ /* #undef HAVE_THREADS */
#define SHAREDIR "share" #define SHAREDIR "share"
#define DEFAULT_CHARSET_HOME "/home/ut/testing/mariadb_client/1.0.0" #define DEFAULT_CHARSET_HOME "/home/ut/testing/mariadb_client/2.0.0"
#define PLUGINDIR "/home/ut/testing/mariadb_client/2.0.0/lib/plugin"
 End of changes. 9 change blocks. 
10 lines changed or deleted 9 lines changed or added


 my_global.h   my_global.h 
skipping to change at line 299 skipping to change at line 299
#endif #endif
/* 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
#ifndef my_reinterpret_cast
#define my_reinterpret_cast(A) reinterpret_cast<A> #define my_reinterpret_cast(A) reinterpret_cast<A>
#endif
#define my_const_cast(A) const_cast<A> #define my_const_cast(A) const_cast<A>
#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) #if !defined(__attribute__) && (defined(__cplusplus) || !defined(__GNUC__) || __GNUC__ == 2 && __GNUC_MINOR__ < 8)
#define __attribute__(A) #define __attribute__(A)
#endif #endif
/* From old s-system.h */ /* From old s-system.h */
skipping to change at line 328 skipping to change at line 330
#define _PC(X) X #define _PC(X) X
#if defined(DBUG_ON) && defined(DBUG_OFF) #if defined(DBUG_ON) && defined(DBUG_OFF)
#undef DBUG_OFF #undef DBUG_OFF
#endif #endif
#if defined(_lint) && !defined(DBUG_OFF) #if defined(_lint) && !defined(DBUG_OFF)
#define DBUG_OFF #define DBUG_OFF
#endif #endif
#include <dbug.h>
#ifndef DBUG_OFF
#define dbug_assert(A) assert(A)
#else
#define dbug_assert(A)
#endif
#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 my_socket_defined #ifndef my_socket_defined
typedef int my_socket; /* File descriptor for sockets */ typedef int my_socket; /* File descriptor for sockets */
#define my_socket_defined #define my_socket_defined
#define INVALID_SOCKET -1 #define INVALID_SOCKET -1
#endif #endif
/* Type for fuctions that handles signals */ /* Type for fuctions that handles signals */
#define sig_handler RETSIGTYPE #define sig_handler RETSIGTYPE
typedef void (*sig_return)();/* Returns type from signal */ typedef void (*sig_return)(void);/* Returns type from signal */
#if defined(__GNUC__) && !defined(_lint) #if defined(__GNUC__) && !defined(_lint)
typedef char pchar; /* Mixed prototypes can take char */ typedef char pchar; /* Mixed prototypes can take char */
typedef char puchar; /* Mixed prototypes can take char */ typedef char puchar; /* Mixed prototypes can take char */
typedef char pbool; /* Mixed prototypes can take char */ typedef char pbool; /* Mixed prototypes can take char */
typedef short pshort; /* Mixed prototypes can take short int */ typedef short pshort; /* Mixed prototypes can take short int */
typedef float pfloat; /* Mixed prototypes can take float */ typedef float pfloat; /* Mixed prototypes can take float */
#else #else
typedef int pchar; /* Mixed prototypes can't take char */ typedef int pchar; /* Mixed prototypes can't take char */
typedef uint puchar; /* Mixed prototypes can't take char */ typedef uint puchar; /* Mixed prototypes can't take char */
typedef int pbool; /* Mixed prototypes can't take char */ typedef int pbool; /* Mixed prototypes can't take char */
skipping to change at line 448 skipping to change at line 443
/* /*
Io buffer size; Must be a power of 2 and a multiple of 512. May be Io buffer size; Must be a power of 2 and a multiple of 512. May be
smaller what the disk page size. This influences the speed of the smaller what the disk page size. This influences the speed of the
isam btree library. eg to big to slow. isam btree library. eg to big to slow.
*/ */
#define IO_SIZE 4096 #define IO_SIZE 4096
/* /*
How much overhead does malloc have. The code often allocates How much overhead does malloc have. The code often allocates
something like 1024-MALLOC_OVERHEAD bytes something like 1024-MALLOC_OVERHEAD bytes
*/ */
#ifdef SAFEMALLOC
#define MALLOC_OVERHEAD (8+24+4)
#else
#define MALLOC_OVERHEAD 8 #define MALLOC_OVERHEAD 8
#endif
/* get memory in huncs */ /* get memory in huncs */
#define ONCE_ALLOC_INIT (uint) (4096-MALLOC_OVERHEAD) #define ONCE_ALLOC_INIT (uint) (4096-MALLOC_OVERHEAD)
/* Typical record cash */ /* Typical record cash */
#define RECORD_CACHE_SIZE (uint) (64*1024-MALLOC_OVERHEAD) #define RECORD_CACHE_SIZE (uint) (64*1024-MALLOC_OVERHEAD)
/* Typical key cash */ /* Typical key cash */
#define KEY_CACHE_SIZE (uint) (8*1024*1024-MALLOC_OVERHEAD) #define KEY_CACHE_SIZE (uint) (8*1024*1024-MALLOC_OVERHEAD)
/* Some things that this system doesn't have */ /* Some things that this system doesn't have */
#define ONLY_OWN_DATABASES /* We are using only databases by monty */ #define ONLY_OWN_DATABASES /* We are using only databases by monty */
skipping to change at line 511 skipping to change at line 502
#if !defined(HAVE_mit_thread) && !defined(HAVE_STRTOK_R) #if !defined(HAVE_mit_thread) && !defined(HAVE_STRTOK_R)
#define strtok_r(A,B,C) strtok((A),(B)) #define strtok_r(A,B,C) strtok((A),(B))
#endif #endif
#ifdef HAVE_LINUXTHREADS #ifdef HAVE_LINUXTHREADS
/* #define pthread_sigmask(A,B,C) sigprocmask((A),(B),(C)) */ /* #define pthread_sigmask(A,B,C) sigprocmask((A),(B),(C)) */
/* #define sigset(A,B) signal((A),(B)) */ /* #define sigset(A,B) signal((A),(B)) */
#endif #endif
#if defined(_lint) || defined(FORCE_INIT_OF_VARS) || \
defined(__cplusplus) || !defined(__GNUC__)
#define UNINIT_VAR(x) x= 0
#else
/* GCC specific self-initialization which inhibits the warning. */
#define UNINIT_VAR(x) x= x
#endif
/* Remove some things that mit_thread break or doesn't support */ /* Remove some things that mit_thread break or doesn't support */
#if defined(HAVE_mit_thread) && defined(THREAD) #if defined(HAVE_mit_thread) && defined(THREAD)
#undef HAVE_PREAD #undef HAVE_PREAD
#undef HAVE_REALPATH #undef HAVE_REALPATH
#undef HAVE_MLOCK #undef HAVE_MLOCK
#undef HAVE_TEMPNAM /* Use ours */ #undef HAVE_TEMPNAM /* Use ours */
#undef HAVE_PTHREAD_SETPRIO #undef HAVE_PTHREAD_SETPRIO
#undef HAVE_FTRUNCATE #undef HAVE_FTRUNCATE
#undef HAVE_READLINK #undef HAVE_READLINK
#endif #endif
skipping to change at line 533 skipping to change at line 532
#if SIZEOF_LONG_LONG > 4 #if SIZEOF_LONG_LONG > 4
#define HAVE_LONG_LONG 1 #define HAVE_LONG_LONG 1
#endif #endif
#if defined(HAVE_LONG_LONG) && !defined(LONGLONG_MIN) #if defined(HAVE_LONG_LONG) && !defined(LONGLONG_MIN)
#define LONGLONG_MIN ((long long) 0x8000000000000000LL) #define LONGLONG_MIN ((long long) 0x8000000000000000LL)
#define LONGLONG_MAX ((long long) 0x7FFFFFFFFFFFFFFFLL) #define LONGLONG_MAX ((long long) 0x7FFFFFFFFFFFFFFFLL)
#endif #endif
#if SIZEOF_LONG == 4 #define INT_MIN64 (~0x7FFFFFFFFFFFFFFFLL)
#define INT_MIN32 (long) 0x80000000L #define INT_MAX64 0x7FFFFFFFFFFFFFFFLL
#define INT_MAX32 (long) 0x7FFFFFFFL #define INT_MIN32 (~0x7FFFFFFFL)
#define INT_MAX32 0x7FFFFFFFL
#define UINT_MAX32 0xFFFFFFFFL #define UINT_MAX32 0xFFFFFFFFL
#define INT_MIN24 ((long) 0xff800000L) #define INT_MIN24 (~0x007FFFFF)
#define INT_MAX24 0x007fffffL #define INT_MAX24 0x007FFFFF
#define INT_MIN16 ((short int) 0x8000) #define UINT_MAX24 0x00FFFFFF
#define INT_MAX16 0x7FFF #define INT_MIN16 (~0x7FFF)
#define UINT_MAX16 0xFFFF #define INT_MAX16 0x7FFF
#define INT_MIN8 ((char) 0x80) #define UINT_MAX16 0xFFFF
#define INT_MAX8 ((char) 0x7F) #define INT_MIN8 (~0x7F)
#else /* Probably Alpha */ #define INT_MAX8 0x7F
#define INT_MIN32 ((long) (int) 0x80000000) #define UINT_MAX8 0xFF
#define INT_MAX32 ((long) (int) 0x7FFFFFFF)
#define INT_MIN24 ((long) (int) 0xff800000)
#define INT_MAX24 ((long) (int) 0x007fffff)
#define INT_MIN16 ((short int) 0xffff8000)
#define INT_MAX16 ((short int) 0x00007FFF)
#endif
#ifndef ULL #ifndef ULL
#ifdef HAVE_LONG_LONG #ifdef HAVE_LONG_LONG
#define ULL(A) A ## ULL #define ULL(A) A ## ULL
#else #else
#define ULL(A) A ## UL #define ULL(A) A ## UL
#endif #endif
#endif #endif
#if defined(HAVE_LONG_LONG) && !defined(ULONGLONG_MAX)
/* First check for ANSI C99 definition: */
#ifdef ULLONG_MAX
#define ULONGLONG_MAX ULLONG_MAX
#else
#define ULONGLONG_MAX ((unsigned long long)(~0ULL))
#endif
#endif /* defined (HAVE_LONG_LONG) && !defined(ULONGLONG_MAX)*/
/* 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
skipping to change at line 582 skipping to change at line 585
Max size that must be added to a so that we know Size to make Max size that must be added to a so that we know Size to make
adressable obj. adressable obj.
*/ */
typedef long my_ptrdiff_t; typedef long my_ptrdiff_t;
#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 filed f in structure t */ /* Offset of filed f in structure t */
#define OFFSET(t, f) ((size_t)(char *)&((t *)0)->f) #define OFFSET(t, f) ((size_t)(char *)&((t *)0)->f)
#define ADD_TO_PTR(ptr,size,type) (type) ((byte*) (ptr)+size) #define ADD_TO_PTR(ptr,size,type) (type) ((unsigned char*) (ptr)+size)
#define PTR_BYTE_DIFF(A,B) (my_ptrdiff_t) ((byte*) (A) - (byte*) (B)) #define PTR_BYTE_DIFF(A,B) (my_ptrdiff_t) ((unsigned char*) (A) - (unsigned
char*) (B))
#define NullS (char *) 0 #define NullS (char *) 0
/* Nowdays we do not support MessyDos */ /* Nowdays we do not support MessyDos */
#ifndef NEAR #ifndef NEAR
#define NEAR /* Who needs segments ? */ #define NEAR /* Who needs segments ? */
#define FAR /* On a good machine */ #define FAR /* On a good machine */
#ifndef HUGE_PTR #ifndef HUGE_PTR
#define HUGE_PTR #define HUGE_PTR
#endif #endif
#endif #endif
skipping to change at line 642 skipping to change at line 645
typedef unsigned long ulong; /* Short for unsigned long */ typedef unsigned long ulong; /* Short for unsigned long */
#endif #endif
#ifndef longlong_defined #ifndef longlong_defined
#if defined(HAVE_LONG_LONG) && SIZEOF_LONG != 8 #if defined(HAVE_LONG_LONG) && SIZEOF_LONG != 8
typedef unsigned long long int ulonglong; /* ulong or unsigned long long */ typedef unsigned long long int ulonglong; /* ulong or unsigned long long */
typedef long long int longlong; typedef long long int longlong;
#else #else
typedef unsigned long ulonglong; /* ulong or unsigned long long */ typedef unsigned long ulonglong; /* ulong or unsigned long long */
typedef long longlong; typedef long longlong;
#endif #endif
#define longlong_defined
#endif #endif
#ifndef MIN #ifndef MIN
#define MIN(a,b) (((a) < (b)) ? (a) : (b)) #define MIN(a,b) (((a) < (b)) ? (a) : (b))
#endif #endif
#ifndef MAX #ifndef MAX
#define MAX(a,b) (((a) > (b)) ? (a) : (b)) #define MAX(a,b) (((a) > (b)) ? (a) : (b))
#endif #endif
#define CMP_NUM(a,b) (((a) < (b)) ? -1 : ((a) == (b)) ? 0 : 1)
#ifdef USE_RAID #ifdef USE_RAID
/* /*
The following is done with a if to not get problems with pre-processors The following is done with a if to not get problems with pre-processors
with late define evaluation with late define evaluation
*/ */
#if SIZEOF_OFF_T == 4 #if SIZEOF_OFF_T == 4
#define SYSTEM_SIZEOF_OFF_T 4 #define SYSTEM_SIZEOF_OFF_T 4
#else #else
#define SYSTEM_SIZEOF_OFF_T 8 #define SYSTEM_SIZEOF_OFF_T 8
#endif #endif
skipping to change at line 699 skipping to change at line 703
#define SOCKET_EWOULDBLOCK EWOULDBLOCK #define SOCKET_EWOULDBLOCK EWOULDBLOCK
#define SOCKET_ENFILE ENFILE #define SOCKET_ENFILE ENFILE
#define SOCKET_EMFILE EMFILE #define SOCKET_EMFILE EMFILE
#endif #endif
typedef uint8 int7; /* Most effective integer 0 <= x <= 127 */ typedef uint8 int7; /* Most effective integer 0 <= x <= 127 */
typedef short int15; /* Most effective integer 0 <= x <= 32767 */ typedef short int15; /* Most effective integer 0 <= x <= 32767 */
typedef char *my_string; /* String of characters */ typedef char *my_string; /* String of characters */
typedef unsigned long size_s; /* Size of strings (In string-funcs) */ typedef unsigned long size_s; /* Size of strings (In string-funcs) */
typedef int myf; /* Type of MyFlags in my_funcs */ typedef int myf; /* Type of MyFlags in my_funcs */
#ifndef byte_defined
typedef char byte; /* Smallest addressable unit */
#endif
typedef char my_bool; /* Small bool */ typedef char my_bool; /* Small bool */
#if !defined(bool) && !defined(bool_defined) && (!defined(HAVE_BOOL) || !de fined(__cplusplus)) #if !defined(bool) && !defined(bool_defined) && (!defined(HAVE_BOOL) || !de fined(__cplusplus))
typedef char bool; /* Ordinary boolean values 0 1 */ typedef char bool; /* Ordinary boolean values 0 1 */
#endif #endif
/* Macros for converting *constants* to the right type */ /* Macros for converting *constants* to the right type */
#define INT8(v) (int8) (v) #define INT8(v) (int8) (v)
#define INT16(v) (int16) (v) #define INT16(v) (int16) (v)
#define INT32(v) (int32) (v) #define INT32(v) (int32) (v)
#define MYF(v) (myf) (v) #define MYF(v) (myf) (v)
skipping to change at line 743 skipping to change at line 744
#endif #endif
/* Defines for time function */ /* Defines for time function */
#define SCALE_SEC 100 #define SCALE_SEC 100
#define SCALE_USEC 10000 #define SCALE_USEC 10000
#define MY_HOW_OFTEN_TO_ALARM 2 /* How often we want info on screen */ #define MY_HOW_OFTEN_TO_ALARM 2 /* How often we want info on screen */
#define MY_HOW_OFTEN_TO_WRITE 1000 /* How often we want info on screen */ #define MY_HOW_OFTEN_TO_WRITE 1000 /* How often we want info on screen */
#define NOT_FIXED_DEC 31 #define NOT_FIXED_DEC 31
#ifdef _WIN32 #if defined(_WIN32) && defined(_MSVC)
#define MYSQLND_LLU_SPEC "%I64u" #define MYSQLND_LLU_SPEC "%I64u"
#define MYSQLND_LL_SPEC "%I64d" #define MYSQLND_LL_SPEC "%I64d"
#ifndef L64 #ifndef L64
#define L64(x) x##i64 #define L64(x) x##i64
#endif #endif
#else #else
#define MYSQLND_LLU_SPEC "%llu" #define MYSQLND_LLU_SPEC "%llu"
#define MYSQLND_LL_SPEC "%lld" #define MYSQLND_LL_SPEC "%lld"
#ifndef L64 #ifndef L64
#define L64(x) x##LL #define L64(x) x##LL
skipping to change at line 1065 skipping to change at line 1066
#endif #endif
#ifdef _WIN32 #ifdef _WIN32
#define SO_EXT ".dll" #define SO_EXT ".dll"
#elif defined(__APPLE__) #elif defined(__APPLE__)
#define SO_EXT ".dylib" #define SO_EXT ".dylib"
#else #else
#define SO_EXT ".so" #define SO_EXT ".so"
#endif #endif
#include <dbug.h>
#ifndef DBUG_OFF
#define dbug_assert(A) assert(A)
#else
#define dbug_assert(A)
#endif
#ifdef HAVE_DLOPEN #ifdef HAVE_DLOPEN
#ifdef _WIN32 #ifdef _WIN32
#define dlsym(lib, name) GetProcAddress((HMODULE)lib, name) #define dlsym(lib, name) GetProcAddress((HMODULE)lib, name)
#define dlopen(libname, unused) LoadLibraryEx(libname, NULL, 0) #define dlopen(libname, unused) LoadLibraryEx(libname, NULL, 0)
#define dlclose(lib) FreeLibrary((HMODULE)lib) #define dlclose(lib) FreeLibrary((HMODULE)lib)
#elif defined(HAVE_DLFCN_H) #elif defined(HAVE_DLFCN_H)
#include <dlfcn.h> #include <dlfcn.h>
#endif #endif
#if HAVE_DLERROR #if HAVE_DLERROR
#define dlerror() "" #define dlerror() ""
 End of changes. 16 change blocks. 
37 lines changed or deleted 46 lines changed or added


 my_net.h   my_net.h 
skipping to change at line 37 skipping to change at line 37
#include <sys/socket.h> #include <sys/socket.h>
#endif #endif
#ifdef HAVE_NETINET_IN_H #ifdef HAVE_NETINET_IN_H
#include <netinet/in.h> #include <netinet/in.h>
#endif #endif
#ifdef HAVE_ARPA_INET_H #ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h> #include <arpa/inet.h>
#endif #endif
#endif /* !defined(MSDOS) && !defined(_WIN32) */ #endif /* !defined(MSDOS) && !defined(_WIN32) */
void my_inet_ntoa(struct in_addr in, char *buf);
/*
Handling of gethostbyname_r()
*/
#if !defined(HPUX)
struct hostent;
#endif /* HPUX */
#if !defined(HAVE_GETHOSTBYNAME_R)
struct hostent *my_gethostbyname_r(const char *name,
struct hostent *result, char *buffer,
int buflen, int *h_errnop);
void my_gethostbyname_r_free();
#elif defined(HAVE_PTHREAD_ATTR_CREATE) || defined(_AIX) || defined(HAVE_GE
THOSTBYNAME_R_GLIBC2_STYLE)
struct hostent *my_gethostbyname_r(const char *name,
struct hostent *result, char *buffer,
int buflen, int *h_errnop);
#define my_gethostbyname_r_free()
#if !defined(HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE) && !defined(HPUX)
#define GETHOSTBYNAME_BUFF_SIZE sizeof(struct hostent_data)
#endif /* !defined(HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE) */
#elif defined(HAVE_GETHOSTBYNAME_R_RETURN_INT)
#define GETHOSTBYNAME_BUFF_SIZE sizeof(struct hostent_data)
struct hostent *my_gethostbyname_r(const char *name,
struct hostent *result, char *buffer,
int buflen, int *h_errnop);
#define my_gethostbyname_r_free()
#else
#define my_gethostbyname_r(A,B,C,D,E) gethostbyname_r((A),(B),(C),(D),(E))
#define my_gethostbyname_r_free()
#endif /* !defined(HAVE_GETHOSTBYNAME_R) */
#ifndef GETHOSTBYNAME_BUFF_SIZE
#define GETHOSTBYNAME_BUFF_SIZE 2048
#endif
/* On SCO you get a link error when refering to h_errno */ /* On SCO you get a link error when refering to h_errno */
#ifdef SCO #ifdef SCO
#undef h_errno #undef h_errno
#define h_errno errno #define h_errno errno
#endif #endif
void my_inet_ntoa(struct in_addr in, char *buf);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
 End of changes. 2 change blocks. 
39 lines changed or deleted 2 lines changed or added


 my_pthread.h   my_pthread.h 
skipping to change at line 32 skipping to change at line 32
#include <errno.h> #include <errno.h>
#ifndef ETIME #ifndef ETIME
#define ETIME ETIMEDOUT /* For FreeBSD */ #define ETIME ETIMEDOUT /* For FreeBSD */
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif /* __cplusplus */ #endif /* __cplusplus */
#if defined(_WIN32) || defined(OS2) #if defined(_WIN32)
#ifdef OS2
typedef ULONG HANDLE;
typedef ULONG DWORD;
typedef int sigset_t;
#endif
#ifdef OS2
typedef HMTX pthread_mutex_t;
#else
typedef CRITICAL_SECTION pthread_mutex_t; typedef CRITICAL_SECTION pthread_mutex_t;
#endif
typedef HANDLE pthread_t; typedef HANDLE pthread_t;
typedef struct thread_attr { typedef struct thread_attr {
DWORD dwStackSize ; DWORD dwStackSize ;
DWORD dwCreatingFlag ; DWORD dwCreatingFlag ;
int priority ; int priority ;
} pthread_attr_t ; } pthread_attr_t ;
typedef struct { int dummy; } pthread_condattr_t; typedef struct { int dummy; } pthread_condattr_t;
/* Implementation of posix conditions */ /* Implementation of posix conditions */
skipping to change at line 73 skipping to change at line 64
enum { enum {
SIGNAL = 0, SIGNAL = 0,
BROADCAST = 1, BROADCAST = 1,
MAX_EVENTS = 2 MAX_EVENTS = 2
} EVENTS; } EVENTS;
HANDLE events[MAX_EVENTS]; HANDLE events[MAX_EVENTS];
CRITICAL_SECTION waiters_count_lock; CRITICAL_SECTION waiters_count_lock;
} pthread_cond_t; } pthread_cond_t;
#ifndef _TIMESPEC_DEFINED
struct timespec { /* For pthread_cond_timedwait() */ struct timespec { /* For pthread_cond_timedwait() */
time_t tv_sec; time_t tv_sec;
long tv_nsec; long tv_nsec;
}; };
#endif
typedef int pthread_mutexattr_t; typedef int pthread_mutexattr_t;
#define win_pthread_self my_thread_var->pthread_self #define pthread_self() GetCurrentThreadId()
#ifdef OS2
#define pthread_handler_decl(A,B) void * _Optlink A(void *B)
typedef void * (_Optlink *pthread_handler)(void *);
#else
#define pthread_handler_decl(A,B) void * __cdecl A(void *B) #define pthread_handler_decl(A,B) void * __cdecl A(void *B)
typedef void * (__cdecl *pthread_handler)(void *); typedef void * (__cdecl *pthread_handler)(void *);
#endif
void win_pthread_init(void); void win_pthread_init(void);
int win_pthread_setspecific(void *A,void *B,uint length);
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);
struct tm *localtime_r(const time_t *timep,struct tm *tmp); struct tm *localtime_r(const time_t *timep,struct tm *tmp);
void pthread_exit(void *a); /* was #define pthread_exit(A) ExitThread(A )*/ void pthread_exit(void *a); /* was #define pthread_exit(A) ExitThread(A )*/
#ifndef OS2 #ifndef OS2
#define getpid() GetCurrentThreadId() #define getpid() GetCurrentThreadId()
#endif #endif
#define pthread_self() win_pthread_self
#define HAVE_LOCALTIME_R 1 #define HAVE_LOCALTIME_R 1
#define _REENTRANT 1 #define _REENTRANT 1
#define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1 #define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1
#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_getspecific(A) (TlsGetValue(A)) #define pthread_getspecific(A) (TlsGetValue(A))
#define my_pthread_getspecific(T,A) ((T) TlsGetValue(A)) #define my_pthread_getspecific(T,A) ((T) TlsGetValue(A))
#define my_pthread_getspecific_ptr(T,V) ((T) TlsGetValue(V)) #define my_pthread_getspecific_ptr(T,V) ((T) TlsGetValue(V))
#define my_pthread_setspecific_ptr(T,V) (!TlsSetValue((T),(V))) #define my_pthread_setspecific_ptr(T,V) (!TlsSetValue((T),(V)))
#define pthread_setspecific(A,B) (!TlsSetValue((A),(B))) #define pthread_setspecific(A,B) (!TlsSetValue((A),(B)))
#else
#define pthread_key(T,V) __declspec(thread) T V
#define pthread_key_create(A,B) 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))
#ifdef _WIN32
#define pthread_mutex_init(A,B) InitializeCriticalSection(A) #define pthread_mutex_init(A,B) InitializeCriticalSection(A)
#define pthread_mutex_lock(A) (EnterCriticalSection(A),0) #define pthread_mutex_lock(A) (EnterCriticalSection(A),0)
#define pthread_mutex_trylock(A) (WaitForSingleObject((A), 0) == WAIT_TIMEO UT) #define pthread_mutex_trylock(A) (WaitForSingleObject((A), 0) == WAIT_TIMEO UT)
#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(0) #define pthread_kill(A,B) pthread_dummy(0)
#endif /* _WIN32 */
/* 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)
/*Irena: compiler does not like this: */ /*Irena: compiler does not like this: */
skipping to change at line 261 skipping to change at line 239
/* Test first for RTS or FSU threads */ /* Test first for RTS or FSU threads */
#if defined(PTHREAD_SCOPE_GLOBAL) && !defined(PTHREAD_SCOPE_SYSTEM) #if defined(PTHREAD_SCOPE_GLOBAL) && !defined(PTHREAD_SCOPE_SYSTEM)
#define HAVE_rts_threads #define HAVE_rts_threads
extern int my_pthread_create_detached; extern int my_pthread_create_detached;
#define pthread_sigmask(A,B,C) sigprocmask((A),(B),(C)) #define pthread_sigmask(A,B,C) sigprocmask((A),(B),(C))
#define PTHREAD_CREATE_DETACHED &my_pthread_create_detached #define PTHREAD_CREATE_DETACHED &my_pthread_create_detached
#define PTHREAD_SCOPE_SYSTEM PTHREAD_SCOPE_GLOBAL #define PTHREAD_SCOPE_SYSTEM PTHREAD_SCOPE_GLOBAL
#define PTHREAD_SCOPE_PROCESS PTHREAD_SCOPE_LOCAL #define PTHREAD_SCOPE_PROCESS PTHREAD_SCOPE_LOCAL
#define USE_ALARM_THREAD #define USE_ALARM_THREAD
#elif defined(HAVE_mit_thread)
#define USE_ALARM_THREAD
#undef HAVE_LOCALTIME_R
#define HAVE_LOCALTIME_R
#undef HAVE_PTHREAD_ATTR_SETSCOPE
#define HAVE_PTHREAD_ATTR_SETSCOPE
#undef HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE /* If we are running linux *
/
#undef HAVE_RWLOCK_T
#undef HAVE_RWLOCK_INIT
#undef HAVE_PTHREAD_RWLOCK_RDLOCK
#undef HAVE_SNPRINTF
#define sigset(A,B) pthread_signal((A),(void (*)(int)) (B))
#define signal(A,B) pthread_signal((A),(void (*)(int)) (B))
#define my_pthread_attr_setprio(A,B)
#endif /* defined(PTHREAD_SCOPE_GLOBAL) && !defined(PTHREAD_SCOPE_SYSTEM) * / #endif /* defined(PTHREAD_SCOPE_GLOBAL) && !defined(PTHREAD_SCOPE_SYSTEM) * /
#if defined(_BSDI_VERSION) && _BSDI_VERSION < 199910
int sigwait(sigset_t *set, int *sig);
#endif
#if defined(HAVE_UNIXWARE7_POSIX) #if defined(HAVE_UNIXWARE7_POSIX)
#undef HAVE_NONPOSIX_SIGWAIT #undef HAVE_NONPOSIX_SIGWAIT
#define HAVE_NONPOSIX_SIGWAIT /* sigwait takes only 1 argument */ #define HAVE_NONPOSIX_SIGWAIT /* sigwait takes only 1 argument */
#endif #endif
#ifndef HAVE_NONPOSIX_SIGWAIT #ifndef HAVE_NONPOSIX_SIGWAIT
#define my_sigwait(A,B) sigwait((A),(B)) #define my_sigwait(A,B) sigwait((A),(B))
#else #else
int my_sigwait(const sigset_t *set,int *sig); int my_sigwait(const sigset_t *set,int *sig);
#endif #endif
skipping to change at line 311 skipping to change at line 270
const pthread_condattr_t *attr); const pthread_condattr_t *attr);
#endif /* HAVE_NONPOSIX_PTHREAD_MUTEX_INIT */ #endif /* HAVE_NONPOSIX_PTHREAD_MUTEX_INIT */
#if defined(HAVE_SIGTHREADMASK) && !defined(HAVE_PTHREAD_SIGMASK) #if defined(HAVE_SIGTHREADMASK) && !defined(HAVE_PTHREAD_SIGMASK)
#define pthread_sigmask(A,B,C) sigthreadmask((A),(B),(C)) #define pthread_sigmask(A,B,C) sigthreadmask((A),(B),(C))
#endif #endif
#if !defined(HAVE_SIGWAIT) && !defined(HAVE_mit_thread) && !defined(HAVE_rt s_threads) && !defined(sigwait) && !defined(alpha_linux_port) && !defined(H AVE_NONPOSIX_SIGWAIT) && !defined(HAVE_DEC_3_2_THREADS) && !defined(_AIX) #if !defined(HAVE_SIGWAIT) && !defined(HAVE_mit_thread) && !defined(HAVE_rt s_threads) && !defined(sigwait) && !defined(alpha_linux_port) && !defined(H AVE_NONPOSIX_SIGWAIT) && !defined(HAVE_DEC_3_2_THREADS) && !defined(_AIX)
int sigwait(sigset_t *setp, int *sigp); /* Use our implement ion */ int sigwait(sigset_t *setp, int *sigp); /* Use our implement ion */
#endif #endif
#if !defined(HAVE_SIGSET) && !defined(HAVE_mit_thread) && !defined(sigset) #if !defined(HAVE_SIGSET) && !defined(my_sigset)
#define sigset(A,B) do { struct sigaction s; sigset_t set; \ #define my_sigset(A,B) do { struct sigaction s; sigset_t set; \
sigemptyset(&set); \ sigemptyset(&set); \
s.sa_handler = (B); \ s.sa_handler = (B); \
s.sa_mask = set; \ s.sa_mask = set; \
s.sa_flags = 0; \ s.sa_flags = 0; \
sigaction((A), &s, (struct sigaction *) NULL); \ sigaction((A), &s, (struct sigaction *) NULL); \
} while (0) } while (0)
#elif !defined(my_sigset)
#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))
#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
skipping to change at line 351 skipping to change at line 312
#undef HAVE_GETHOSTBYADDR_R /* No definition */ #undef HAVE_GETHOSTBYADDR_R /* No definition */
#endif #endif
#if defined(HAVE_BROKEN_PTHREAD_COND_TIMEDWAIT) && !defined(SAFE_MUTEX) #if defined(HAVE_BROKEN_PTHREAD_COND_TIMEDWAIT) && !defined(SAFE_MUTEX)
extern int my_pthread_cond_timedwait(pthread_cond_t *cond, extern int my_pthread_cond_timedwait(pthread_cond_t *cond,
pthread_mutex_t *mutex, pthread_mutex_t *mutex,
struct timespec *abstime); struct timespec *abstime);
#define pthread_cond_timedwait(A,B,C) my_pthread_cond_timedwait((A),(B),(C) ) #define pthread_cond_timedwait(A,B,C) my_pthread_cond_timedwait((A),(B),(C) )
#endif #endif
#if defined(OS2) #if !defined( HAVE_NONPOSIX_PTHREAD_GETSPECIFIC)
#define my_pthread_getspecific(T,A) ((T) &(A))
#define pthread_setspecific(A,B) win_pthread_setspecific(&(A),(B),sizeof(A)
)
#elif !defined( HAVE_NONPOSIX_PTHREAD_GETSPECIFIC)
#define my_pthread_getspecific(A,B) ((A) pthread_getspecific(B)) #define my_pthread_getspecific(A,B) ((A) pthread_getspecific(B))
#else #else
#define my_pthread_getspecific(A,B) ((A) my_pthread_getspecific_imp(B)) #define my_pthread_getspecific(A,B) ((A) my_pthread_getspecific_imp(B))
void *my_pthread_getspecific_imp(pthread_key_t key); void *my_pthread_getspecific_imp(pthread_key_t key);
#endif /* OS2 */ #endif
#ifndef HAVE_LOCALTIME_R #ifndef HAVE_LOCALTIME_R
struct tm *localtime_r(const time_t *clock, struct tm *res); struct tm *localtime_r(const time_t *clock, struct tm *res);
#endif #endif
#ifdef HAVE_PTHREAD_CONDATTR_CREATE #ifdef HAVE_PTHREAD_CONDATTR_CREATE
/* DCE threads on HPUX 10.20 */ /* DCE threads on HPUX 10.20 */
#define pthread_condattr_init pthread_condattr_create #define pthread_condattr_init pthread_condattr_create
#define pthread_condattr_destroy pthread_condattr_delete #define pthread_condattr_destroy pthread_condattr_delete
#endif #endif
skipping to change at line 417 skipping to change at line 375
#define pthread_attr_init(A) pthread_attr_create(A) #define pthread_attr_init(A) pthread_attr_create(A)
#define pthread_attr_destroy(A) pthread_attr_delete(A) #define pthread_attr_destroy(A) pthread_attr_delete(A)
#define pthread_attr_setdetachstate(A,B) pthread_dummy(0) #define pthread_attr_setdetachstate(A,B) pthread_dummy(0)
#define pthread_create(A,B,C,D) pthread_create((A),*(B),(C),(D)) #define pthread_create(A,B,C,D) pthread_create((A),*(B),(C),(D))
#ifndef pthread_sigmask #ifndef pthread_sigmask
#define pthread_sigmask(A,B,C) sigprocmask((A),(B),(C)) #define pthread_sigmask(A,B,C) sigprocmask((A),(B),(C))
#endif #endif
#define pthread_kill(A,B) pthread_dummy(0) #define pthread_kill(A,B) pthread_dummy(0)
#undef pthread_detach_this_thread #undef pthread_detach_this_thread
#define pthread_detach_this_thread() { pthread_t tmp=pthread_self() ; pthre ad_detach(&tmp); } #define pthread_detach_this_thread() { pthread_t tmp=pthread_self() ; pthre ad_detach(&tmp); }
#else /* HAVE_PTHREAD_ATTR_CREATE && !HAVE_SIGWAIT */ +#elif !defined(HAVE_PTHREAD_KILL) /* HAVE_PTHREAD_ATTR_CREATE && !HAVE_SIG WAIT */
#define HAVE_PTHREAD_KILL #define HAVE_PTHREAD_KILL
#endif #endif
#endif /* defined(_WIN32) */ #endif /* defined(_WIN32) */
#if defined(HPUX) && !defined(DONT_REMAP_PTHREAD_FUNCTIONS) #if defined(HPUX) && !defined(DONT_REMAP_PTHREAD_FUNCTIONS)
#undef pthread_cond_timedwait #undef pthread_cond_timedwait
#define pthread_cond_timedwait(a,b,c) my_pthread_cond_timedwait((a),(b),(c) ) #define pthread_cond_timedwait(a,b,c) my_pthread_cond_timedwait((a),(b),(c) )
int my_pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, int my_pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
struct timespec *abstime); struct timespec *abstime);
skipping to change at line 590 skipping to change at line 548
pthread_mutex_t * volatile current_mutex; pthread_mutex_t * volatile current_mutex;
pthread_cond_t * volatile current_cond; pthread_cond_t * volatile current_cond;
pthread_t pthread_self; pthread_t pthread_self;
long id; long id;
int cmp_length; int cmp_length;
int volatile abort; int volatile abort;
#ifndef DBUG_OFF #ifndef DBUG_OFF
gptr dbug; gptr dbug;
char name[THREAD_NAME_SIZE+1]; char name[THREAD_NAME_SIZE+1];
#endif #endif
my_bool initialized;
}; };
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();
#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
/* statistics_xxx functions are for not essential statistic */ /* statistics_xxx functions are for not essential statistic */
#ifndef thread_safe_increment #ifndef thread_safe_increment
#ifdef HAVE_ATOMIC_ADD #ifdef HAVE_ATOMIC_ADD
#define thread_safe_increment(V,L) atomic_add(1,(atomic_t*) &V); #define thread_safe_increment(V,L) atomic_add(1,(atomic_t*) &V);
#define thread_safe_add(V,C,L) atomic_add((C),(atomic_t*) &V); #define thread_safe_add(V,C,L) atomic_add((C),(atomic_t*) &V);
#define thread_safe_sub(V,C,L) atomic_sub((C),(atomic_t*) &V); #define thread_safe_sub(V,C,L) atomic_sub((C),(atomic_t*) &V);
 End of changes. 22 change blocks. 
61 lines changed or deleted 18 lines changed or added


 my_stmt.h   my_stmt.h 
skipping to change at line 28 skipping to change at line 28
Part of this code includes code from PHP's mysqlnd extension Part of this code includes code from PHP's mysqlnd extension
(written by Andrey Hristov, Georg Richter and Ulf Wendel), freely (written by Andrey Hristov, Georg Richter and Ulf Wendel), freely
available from http://www.php.net/software available from http://www.php.net/software
*************************************************************************/ *************************************************************************/
#define MYSQL_NO_DATA 100 #define MYSQL_NO_DATA 100
#define MYSQL_DATA_TRUNCATED 101 #define MYSQL_DATA_TRUNCATED 101
#define MYSQL_DEFAULT_PREFETCH_ROWS (unsigned long) 1 #define MYSQL_DEFAULT_PREFETCH_ROWS (unsigned long) 1
/* Bind flags */
#define MADB_BIND_DUMMY 1
#define SET_CLIENT_STMT_ERROR(a, b, c, d) \ #define SET_CLIENT_STMT_ERROR(a, b, c, d) \
{ \ { \
(a)->last_errno= (b);\ (a)->last_errno= (b);\
strncpy((a)->sqlstate, (c), sizeof((a)->sqlstate));\ strncpy((a)->sqlstate, (c), sizeof((a)->sqlstate));\
strncpy((a)->last_error, (d) ? (d) : ER((b)), sizeof((a)->last_error));\ strncpy((a)->last_error, (d) ? (d) : ER((b)), sizeof((a)->last_error));\
} }
#define CLEAR_CLIENT_STMT_ERROR(a) \ #define CLEAR_CLIENT_STMT_ERROR(a) \
{ \ { \
(a)->last_errno= 0;\ (a)->last_errno= 0;\
skipping to change at line 95 skipping to change at line 98
unsigned char *row_ptr; /* for the current data position */ unsigned char *row_ptr; /* for the current data position */
void (*store_param_func)(NET *net, struct st_mysql_bind *param); void (*store_param_func)(NET *net, struct st_mysql_bind *param);
void (*fetch_result)(struct st_mysql_bind *, MYSQL_FIELD *, void (*fetch_result)(struct st_mysql_bind *, MYSQL_FIELD *,
unsigned char **row); unsigned char **row);
void (*skip_result)(struct st_mysql_bind *, MYSQL_FIELD *, void (*skip_result)(struct st_mysql_bind *, MYSQL_FIELD *,
unsigned char **row); unsigned char **row);
/* output buffer length, must be set when fetching str/binary */ /* output buffer length, must be set when fetching str/binary */
unsigned long buffer_length; unsigned long buffer_length;
unsigned long offset; /* offset position for char/binary fetch */ unsigned long offset; /* offset position for char/binary fetch */
unsigned long length_value; /* Used if length is 0 */ unsigned long length_value; /* Used if length is 0 */
unsigned int param_number; /* For null count and error messages */ unsigned int flags; /* special flags, e.g. for dummy bind * /
unsigned int pack_length; /* Internal length for packed data */ unsigned int pack_length; /* Internal length for packed data */
enum enum_field_types buffer_type; /* buffer type */ enum enum_field_types buffer_type; /* buffer type */
my_bool error_value; /* used if error is 0 */ my_bool error_value; /* used if error is 0 */
my_bool is_unsigned; /* set if integer type is unsigned */ my_bool is_unsigned; /* set if integer type is unsigned */
my_bool long_data_used; /* If used with mysql_send_long_data */ my_bool long_data_used; /* If used with mysql_send_long_data */
my_bool is_null_value; /* Used if is_null is 0 */ my_bool is_null_value; /* Used if is_null is 0 */
void *extension; void *extension;
} MYSQL_BIND; } MYSQL_BIND;
typedef struct st_mysqlnd_upsert_result typedef struct st_mysqlnd_upsert_result
skipping to change at line 196 skipping to change at line 199
unsigned int last_errno; unsigned int last_errno;
char last_error[MYSQL_ERRMSG_SIZE+1]; char last_error[MYSQL_ERRMSG_SIZE+1];
char sqlstate[SQLSTATE_LENGTH + 1]; char sqlstate[SQLSTATE_LENGTH + 1];
my_bool update_max_length; my_bool update_max_length;
unsigned long prefetch_rows; unsigned long prefetch_rows;
LIST list; LIST list;
my_bool cursor_exists; my_bool cursor_exists;
MYSQL_CMD_BUFFER cmd_buffer; void *extension;
mysql_stmt_fetch_row_func fetch_row_func; mysql_stmt_fetch_row_func fetch_row_func;
unsigned int execute_count;/* count how many times the stmt w as executed */ unsigned int execute_count;/* count how many times the stmt w as executed */
mysql_stmt_use_or_store_func default_rset_handler; mysql_stmt_use_or_store_func default_rset_handler;
struct st_mysqlnd_stmt_methods *m; struct st_mysqlnd_stmt_methods *m;
}; };
typedef void (*ps_field_fetch_func)(MYSQL_BIND *r_param, const MYSQL_FIELD * field, unsigned char **row); typedef void (*ps_field_fetch_func)(MYSQL_BIND *r_param, const MYSQL_FIELD * field, unsigned char **row);
struct st_mysql_perm_bind { typedef struct st_mysql_perm_bind {
ps_field_fetch_func func; ps_field_fetch_func func;
/* should be signed int */ /* should be signed int */
int pack_len; int pack_len;
unsigned long max_len; unsigned long max_len;
}; } MYSQL_PS_CONVERSION;
extern struct st_mysql_perm_bind mysql_ps_fetch_functions[MYSQL_TYPE_GEOMET RY + 1]; extern MYSQL_PS_CONVERSION mysql_ps_fetch_functions[MYSQL_TYPE_GEOMETRY + 1 ];
unsigned long net_safe_read(MYSQL *mysql); unsigned long net_safe_read(MYSQL *mysql);
void mysql_init_ps_subsystem(void); void mysql_init_ps_subsystem(void);
unsigned long net_field_length(unsigned char **packet); unsigned long net_field_length(unsigned char **packet);
int simple_command(MYSQL *mysql,enum enum_server_command command, const cha int simple_command(MYSQL *mysql,enum enum_server_command command, const cha
r *arg, size_t length, my_bool skipp_check); r *arg,
size_t length, my_bool skipp_check, void *opt_arg);
/* /*
* function prototypes * function prototypes
*/ */
MYSQL_STMT * STDCALL mysql_stmt_init(MYSQL *mysql); MYSQL_STMT * STDCALL mysql_stmt_init(MYSQL *mysql);
int STDCALL mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, unsigne d long length); int STDCALL mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, unsigne d long length);
int STDCALL mysql_stmt_execute(MYSQL_STMT *stmt); int STDCALL mysql_stmt_execute(MYSQL_STMT *stmt);
int STDCALL mysql_stmt_fetch(MYSQL_STMT *stmt); int STDCALL mysql_stmt_fetch(MYSQL_STMT *stmt);
int STDCALL mysql_stmt_fetch_column(MYSQL_STMT *stmt, MYSQL_BIND *bind_arg, unsigned int column, unsigned long offset); int STDCALL mysql_stmt_fetch_column(MYSQL_STMT *stmt, MYSQL_BIND *bind_arg, unsigned int column, unsigned long offset);
int STDCALL mysql_stmt_store_result(MYSQL_STMT *stmt); int STDCALL mysql_stmt_store_result(MYSQL_STMT *stmt);
unsigned long STDCALL mysql_stmt_param_count(MYSQL_STMT * stmt); unsigned long STDCALL mysql_stmt_param_count(MYSQL_STMT * stmt);
skipping to change at line 246 skipping to change at line 250
unsigned int STDCALL mysql_stmt_errno(MYSQL_STMT * stmt); unsigned int STDCALL mysql_stmt_errno(MYSQL_STMT * stmt);
const char *STDCALL mysql_stmt_error(MYSQL_STMT * stmt); const char *STDCALL mysql_stmt_error(MYSQL_STMT * stmt);
const char *STDCALL mysql_stmt_sqlstate(MYSQL_STMT * stmt); const char *STDCALL mysql_stmt_sqlstate(MYSQL_STMT * stmt);
MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_seek(MYSQL_STMT *stmt, MYSQL_ROW_OF FSET offset); MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_seek(MYSQL_STMT *stmt, MYSQL_ROW_OF FSET offset);
MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_tell(MYSQL_STMT *stmt); MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_tell(MYSQL_STMT *stmt);
void STDCALL mysql_stmt_data_seek(MYSQL_STMT *stmt, my_ulonglong offset); void STDCALL mysql_stmt_data_seek(MYSQL_STMT *stmt, my_ulonglong offset);
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_stmt_reset(MYSQL_STMT *stmt); int STDCALL mysql_stmt_next_result(MYSQL_STMT *stmt);
MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_tell(MYSQL_STMT *stmt); my_bool STDCALL mysql_stmt_more_results(MYSQL_STMT *stmt);
MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_seek(MYSQL_STMT *stmt, MYSQL_ROW_OF
FSET new_row);
unsigned long STDCALL mysql_stmt_param_count(MYSQL_STMT *stmt);
my_bool STDCALL mysql_stmt_send_long_data(MYSQL_STMT *stmt, unsigned int pa
ram_number, const char *data, unsigned long length);
my_ulonglong STDCALL mysql_stmt_insert_id(MYSQL_STMT *stmt);
my_ulonglong STDCALL mysql_stmt_num_rows(MYSQL_STMT *stmt);
 End of changes. 8 change blocks. 
7 lines changed or deleted 11 lines changed or added


 my_sys.h   my_sys.h 
skipping to change at line 117 skipping to change at line 117
#define MY_WAIT_FOR_USER_TO_FIX_PANIC 60 /* in seconds */ #define MY_WAIT_FOR_USER_TO_FIX_PANIC 60 /* in seconds */
#define MY_WAIT_GIVE_USER_A_MESSAGE 10 /* Every 10 times of prev */ #define MY_WAIT_GIVE_USER_A_MESSAGE 10 /* Every 10 times of prev */
#define MIN_COMPRESS_LENGTH 50 /* Don't compress small bl. */ #define MIN_COMPRESS_LENGTH 50 /* Don't compress small bl. */
#define KEYCACHE_BLOCK_SIZE 1024 #define KEYCACHE_BLOCK_SIZE 1024
/* root_alloc flags */ /* root_alloc flags */
#define MY_KEEP_PREALLOC 1 #define MY_KEEP_PREALLOC 1
/* defines when allocating data */ /* defines when allocating data */
#ifdef SAFEMALLOC
#define my_malloc(SZ,FLAG) _mymalloc( SZ, __FILE__, __LINE__, FLAG )
#define my_malloc_ci(SZ,FLAG) _mymalloc( SZ, sFile, uLine, FLAG )
#define my_realloc(PTR,SZ,FLAG) _myrealloc( PTR, SZ, __FILE__, __LINE__, FL
AG )
#define my_checkmalloc() _sanity( __FILE__, __LINE__ )
#define my_free(PTR,FLAG) _myfree( PTR, __FILE__, __LINE__,FLAG)
#define my_memdup(A,B,C) _my_memdup(A,B,__FILE__,__LINE__,C)
#define my_strdup(A,C) _my_strdup(A,__FILE__,__LINE__,C)
#define QUICK_SAFEMALLOC sf_malloc_quick=1
#define NORMAL_SAFEMALLOC sf_malloc_quick=0
extern uint sf_malloc_prehunc,sf_malloc_endhunc,sf_malloc_quick;
extern ulonglong safemalloc_mem_limit;
#define CALLER_INFO_PROTO , const char *sFile, uint uLine
#define CALLER_INFO , __FILE__, __LINE__
#define ORIG_CALLER_INFO , sFile, uLine
#else
#define my_checkmalloc() (0) #define my_checkmalloc() (0)
#undef TERMINATE #undef TERMINATE
#define TERMINATE(A) {} #define TERMINATE(A) {}
#define QUICK_SAFEMALLOC #define QUICK_SAFEMALLOC
#define NORMAL_SAFEMALLOC #define NORMAL_SAFEMALLOC
extern gptr my_malloc(size_t Size,myf MyFlags); extern gptr my_malloc(size_t Size,myf MyFlags);
#define my_malloc_ci(SZ,FLAG) my_malloc( SZ, FLAG ) #define my_malloc_ci(SZ,FLAG) my_malloc( SZ, FLAG )
extern gptr my_realloc(gptr oldpoint, size_t Size,myf MyFlags); extern gptr my_realloc(gptr oldpoint, size_t Size,myf MyFlags);
extern void my_no_flags_free(gptr ptr); extern void my_no_flags_free(gptr ptr);
extern gptr my_memdup(const byte *from, size_t length,myf MyFlags); extern gptr my_memdup(const unsigned char *from, size_t length,myf MyFlags) ;
extern my_string my_strdup(const char *from,myf MyFlags); extern my_string my_strdup(const char *from,myf MyFlags);
extern my_string my_strndup(const char *from, size_t length, myf MyFlags); extern my_string my_strndup(const char *from, size_t length, myf MyFlags);
#define my_free(PTR,FG) my_no_flags_free(PTR) #define my_free(PTR,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 */
#endif
#ifdef HAVE_ALLOCA #ifdef HAVE_ALLOCA
#if defined(_AIX) && !defined(__GNUC__) #if defined(_AIX) && !defined(__GNUC__)
#pragma alloca #pragma alloca
#endif /* _AIX */ #endif /* _AIX */
#if defined(__GNUC__) && !defined(HAVE_ALLOCA_H) #if defined(__GNUC__) && !defined(HAVE_ALLOCA_H)
#ifndef alloca
#define alloca __builtin_alloca #define alloca __builtin_alloca
#endif
#endif /* GNUC */ #endif /* GNUC */
#define my_alloca(SZ) alloca((size_t) (SZ)) #define my_alloca(SZ) alloca((size_t) (SZ))
#define my_afree(PTR) {} #define my_afree(PTR) {}
#else #else
#define my_alloca(SZ) my_malloc(SZ,MYF(0)) #define my_alloca(SZ) my_malloc(SZ,MYF(0))
#define my_afree(PTR) my_free(PTR,MYF(MY_WME)) #define my_afree(PTR) my_free(PTR,MYF(MY_WME))
#endif /* HAVE_ALLOCA */ #endif /* HAVE_ALLOCA */
#ifdef MSDOS #ifdef MSDOS
#ifdef __ZTC__ #ifdef __ZTC__
skipping to change at line 181 skipping to change at line 166
#if defined(_VCM_) || defined(M_IC80386) #if defined(_VCM_) || defined(M_IC80386)
#undef USE_HALLOC #undef USE_HALLOC
#endif #endif
#endif #endif
#ifdef USE_HALLOC #ifdef USE_HALLOC
#define malloc(a) halloc((long) (a),1) #define malloc(a) halloc((long) (a),1)
#define free(a) hfree(a) #define free(a) hfree(a)
#endif #endif
#endif /* MSDOS */ #endif /* MSDOS */
#ifndef errno
#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
extern const char ** NEAR my_errmsg[]; extern const char ** NEAR my_errmsg[];
extern char NEAR errbuff[NRERRBUFFS][ERRMSGSIZE]; extern char NEAR errbuff[NRERRBUFFS][ERRMSGSIZE];
extern char *home_dir; /* Home directory for user */ extern char *home_dir; /* Home directory for user */
extern char *my_progname; /* program-name (printed in errors) */ extern char *my_progname; /* program-name (printed in errors) */
extern char NEAR curr_dir[]; /* Current directory for user */ extern char NEAR curr_dir[]; /* Current directory for user */
extern int (*error_handler_hook)(uint my_err, const char *str,myf MyFlags); extern int (*error_handler_hook)(uint my_err, const char *str,myf MyFlags);
extern int (*fatal_error_handler_hook)(uint my_err, const char *str, extern int (*fatal_error_handler_hook)(uint my_err, const char *str,
myf MyFlags); myf MyFlags);
/* charsets */ /* charsets */
skipping to change at line 263 skipping to change at line 250
enum cache_type {READ_CACHE,WRITE_CACHE,READ_FIFO,READ_NET,WRITE_NET}; enum cache_type {READ_CACHE,WRITE_CACHE,READ_FIFO,READ_NET,WRITE_NET};
enum flush_type { FLUSH_KEEP, FLUSH_RELEASE, FLUSH_IGNORE_CHANGED, enum flush_type { FLUSH_KEEP, FLUSH_RELEASE, FLUSH_IGNORE_CHANGED,
FLUSH_FORCE_WRITE}; FLUSH_FORCE_WRITE};
typedef struct st_record_cache /* Used when cacheing records */ typedef struct st_record_cache /* Used when cacheing records */
{ {
File file; File file;
int rc_seek,error,inited; int rc_seek,error,inited;
uint rc_length,read_length,reclength; uint rc_length,read_length,reclength;
my_off_t rc_record_pos,end_of_file; my_off_t rc_record_pos,end_of_file;
byte *rc_buff,*rc_buff2,*rc_pos,*rc_end,*rc_request_pos; unsigned char *rc_buff,*rc_buff2,*rc_pos,*rc_end,*rc_request_pos;
#ifdef HAVE_AIOWAIT #ifdef HAVE_AIOWAIT
int use_async_io; int use_async_io;
my_aio_result aio_result; my_aio_result aio_result;
#endif #endif
enum cache_type type; enum cache_type type;
} RECORD_CACHE; } RECORD_CACHE;
enum file_type { UNOPEN = 0, FILE_BY_OPEN, FILE_BY_CREATE, enum file_type { UNOPEN = 0, FILE_BY_OPEN, FILE_BY_CREATE,
STREAM_BY_FOPEN, STREAM_BY_FDOPEN, FILE_BY_MKSTEMP }; STREAM_BY_FOPEN, STREAM_BY_FDOPEN, FILE_BY_MKSTEMP };
skipping to change at line 298 skipping to change at line 285
} DYNAMIC_ARRAY; } DYNAMIC_ARRAY;
typedef struct st_dynamic_string { typedef struct st_dynamic_string {
char *str; char *str;
size_t length,max_length,alloc_increment; size_t length,max_length,alloc_increment;
} DYNAMIC_STRING; } DYNAMIC_STRING;
typedef struct st_io_cache /* Used when cacheing files */ typedef struct st_io_cache /* Used when cacheing files */
{ {
my_off_t pos_in_file,end_of_file; my_off_t pos_in_file,end_of_file;
byte *rc_pos,*rc_end,*buffer,*rc_request_pos; unsigned char *rc_pos,*rc_end,*buffer,*rc_request_pos;
int (*read_function)(struct st_io_cache *,byte *,uint); int (*read_function)(struct st_io_cache *,unsigned char *,uint);
char *file_name; /* if used with 'open_cached_file' * / char *file_name; /* if used with 'open_cached_file' * /
char *dir,*prefix; char *dir,*prefix;
File file; File file;
int seek_not_done,error; int seek_not_done,error;
uint buffer_length,read_length; uint buffer_length,read_length;
myf myflags; /* Flags used to my_read/my_write */ myf myflags; /* Flags used to my_read/my_write */
enum cache_type type; enum cache_type type;
#ifdef HAVE_AIOWAIT #ifdef HAVE_AIOWAIT
uint inited; uint inited;
my_off_t aio_read_pos; my_off_t aio_read_pos;
skipping to change at line 413 skipping to change at line 400
extern int my_close(File Filedes,myf MyFlags); extern int my_close(File Filedes,myf MyFlags);
extern int my_mkdir(const char *dir, int Flags, myf MyFlags); extern int my_mkdir(const char *dir, int Flags, myf MyFlags);
extern int my_readlink(char *to, const char *filename, myf MyFlags); extern int my_readlink(char *to, const char *filename, myf MyFlags);
extern int my_realpath(char *to, const char *filename, myf MyFlags); extern int my_realpath(char *to, const char *filename, myf MyFlags);
extern File my_create_with_symlink(const char *linkname, const char *filena me, extern File my_create_with_symlink(const char *linkname, const char *filena me,
int createflags, int access_flags, int createflags, int access_flags,
myf MyFlags); myf MyFlags);
extern int my_delete_with_symlink(const char *name, myf MyFlags); extern int my_delete_with_symlink(const char *name, myf MyFlags);
extern int my_rename_with_symlink(const char *from,const char *to,myf MyFla gs); extern int my_rename_with_symlink(const char *from,const char *to,myf MyFla gs);
extern int my_symlink(const char *content, const char *linkname, myf MyFlag s); extern int my_symlink(const char *content, const char *linkname, myf MyFlag s);
extern uint my_read(File Filedes,byte *Buffer,uint Count,myf MyFlags); extern uint my_read(File Filedes,unsigned char *Buffer,uint Count,myf MyFla
extern uint my_pread(File Filedes,byte *Buffer,uint Count,my_off_t offset, gs);
extern uint my_pread(File Filedes,unsigned char *Buffer,uint Count,my_off_t
offset,
myf MyFlags); myf MyFlags);
extern int my_rename(const char *from,const char *to,myf MyFlags); extern int my_rename(const char *from,const char *to,myf MyFlags);
extern my_off_t my_seek(File fd,my_off_t pos,int whence,myf MyFlags); extern my_off_t my_seek(File fd,my_off_t pos,int whence,myf MyFlags);
extern my_off_t my_tell(File fd,myf MyFlags); extern my_off_t my_tell(File fd,myf MyFlags);
extern uint my_write(File Filedes,const byte *Buffer,uint Count, extern uint my_write(File Filedes,const unsigned char *Buffer,uint Count,
myf MyFlags); myf MyFlags);
extern uint my_pwrite(File Filedes,const byte *Buffer,uint Count, extern uint my_pwrite(File Filedes,const unsigned char *Buffer,uint Count,
my_off_t offset,myf MyFlags); my_off_t offset,myf MyFlags);
extern uint my_fread(FILE *stream,byte *Buffer,uint Count,myf MyFlags); extern uint my_fread(FILE *stream,unsigned char *Buffer,uint Count,myf MyFl
extern uint my_fwrite(FILE *stream,const byte *Buffer,uint Count, ags);
extern uint my_fwrite(FILE *stream,const unsigned char *Buffer,uint Count,
myf MyFlags); myf MyFlags);
extern my_off_t my_fseek(FILE *stream,my_off_t pos,int whence,myf MyFlags); extern my_off_t my_fseek(FILE *stream,my_off_t pos,int whence,myf MyFlags);
extern my_off_t my_ftell(FILE *stream,myf MyFlags); extern my_off_t my_ftell(FILE *stream,myf MyFlags);
extern gptr _mymalloc(size_t uSize,const char *sFile, extern gptr _mymalloc(size_t uSize,const char *sFile,
uint uLine, myf MyFlag); uint uLine, myf MyFlag);
extern gptr _myrealloc(gptr pPtr,size_t uSize,const char *sFile, extern gptr _myrealloc(gptr pPtr,size_t uSize,const char *sFile,
uint uLine, myf MyFlag); uint uLine, myf MyFlag);
extern gptr my_multi_malloc _VARARGS((myf MyFlags, ...)); extern gptr my_multi_malloc _VARARGS((myf MyFlags, ...));
extern void _myfree(gptr pPtr,const char *sFile,uint uLine, myf MyFlag); extern void _myfree(gptr pPtr,const char *sFile,uint uLine, myf MyFlag);
extern int _sanity(const char *sFile,unsigned int uLine); extern int _sanity(const char *sFile,unsigned int uLine);
extern gptr _my_memdup(const byte *from, size_t length, extern gptr _my_memdup(const unsigned char *from, size_t length,
const char *sFile, uint uLine,myf MyFlag); const char *sFile, uint uLine,myf MyFlag);
extern my_string _my_strdup(const char *from, const char *sFile, uint uLine , extern my_string _my_strdup(const char *from, const char *sFile, uint uLine ,
myf MyFlag); myf MyFlag);
#ifndef TERMINATE #ifndef TERMINATE
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);
skipping to change at line 516 skipping to change at line 503
extern int my_sortncmp(const char *s,uint s_len, const char *t,uint t_len); extern int my_sortncmp(const char *s,uint s_len, const char *t,uint t_len);
extern WF_PACK *wf_comp(my_string str); extern WF_PACK *wf_comp(my_string str);
extern int wf_test(struct wild_file_pack *wf_pack,const char *name); extern int wf_test(struct wild_file_pack *wf_pack,const char *name);
extern void wf_end(struct wild_file_pack *buffer); extern void wf_end(struct wild_file_pack *buffer);
extern size_s strip_sp(my_string str); extern size_s strip_sp(my_string str);
extern void get_date(my_string to,int timeflag,time_t use_time); extern void get_date(my_string to,int timeflag,time_t use_time);
extern void soundex(my_string out_pntr, my_string in_pntr,pbool remove_garb age); extern void soundex(my_string out_pntr, my_string in_pntr,pbool remove_garb age);
extern int init_record_cache(RECORD_CACHE *info,uint cachesize,File file, extern int init_record_cache(RECORD_CACHE *info,uint cachesize,File file,
uint reclength,enum cache_type type, uint reclength,enum cache_type type,
pbool use_async_io); pbool use_async_io);
extern int read_cache_record(RECORD_CACHE *info,byte *to); extern int read_cache_record(RECORD_CACHE *info,unsigned char *to);
extern int end_record_cache(RECORD_CACHE *info); extern int end_record_cache(RECORD_CACHE *info);
extern int write_cache_record(RECORD_CACHE *info,my_off_t filepos, extern int write_cache_record(RECORD_CACHE *info,my_off_t filepos,
const byte *record,uint length); const unsigned char *record,uint length);
extern int flush_write_cache(RECORD_CACHE *info); extern int flush_write_cache(RECORD_CACHE *info);
extern long my_clock(void); extern long my_clock(void);
extern sig_handler sigtstp_handler(int signal_number); extern sig_handler sigtstp_handler(int signal_number);
extern void handle_recived_signals(void); extern void handle_recived_signals(void);
extern int init_key_cache(ulong use_mem,ulong leave_this_much_mem); extern int init_key_cache(ulong use_mem,ulong leave_this_much_mem);
extern byte *key_cache_read(File file,my_off_t filepos,byte* buff,uint leng th, extern unsigned char *key_cache_read(File file,my_off_t filepos,unsigned ch ar* buff,uint length,
uint block_length,int return_buffer); uint block_length,int return_buffer);
extern int key_cache_write(File file,my_off_t filepos,byte* buff,uint lengt h, extern int key_cache_write(File file,my_off_t filepos,unsigned char* buff,u int length,
uint block_length,int force_write); uint block_length,int force_write);
extern int flush_key_blocks(int file, enum flush_type type); extern int flush_key_blocks(int file, enum flush_type type);
extern void end_key_cache(void); extern void end_key_cache(void);
extern sig_handler my_set_alarm_variable(int signo); extern sig_handler my_set_alarm_variable(int signo);
extern void my_string_ptr_sort(void *base,uint items,size_s size); extern void my_string_ptr_sort(void *base,uint items,size_s size);
extern void radixsort_for_str_ptr(uchar* base[], uint number_of_elements, extern void radixsort_for_str_ptr(uchar* base[], uint number_of_elements,
size_s size_of_element,uchar *buffer[]); size_s size_of_element,uchar *buffer[]);
extern qsort_t qsort2(void *base_ptr, size_t total_elems, size_t size, extern qsort_t qsort2(void *base_ptr, size_t total_elems, size_t size,
qsort2_cmp cmp, void *cmp_argument); qsort2_cmp cmp, void *cmp_argument);
extern qsort2_cmp get_ptr_compare(uint); extern qsort2_cmp get_ptr_compare(uint);
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 int _my_b_read(IO_CACHE *info,byte *Buffer,uint Count); extern int _my_b_read(IO_CACHE *info,unsigned char *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,unsigned char *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,unsigned char *Buffer,uint Count
extern int _my_b_write(IO_CACHE *info,const byte *Buffer,uint Count); );
extern int my_block_write(IO_CACHE *info, const byte *Buffer, extern int _my_b_write(IO_CACHE *info,const unsigned char *Buffer,uint Coun
t);
extern int my_block_write(IO_CACHE *info, const unsigned char *Buffer,
uint Count, my_off_t pos); uint Count, my_off_t pos);
extern int flush_io_cache(IO_CACHE *info); extern int flush_io_cache(IO_CACHE *info);
extern int end_io_cache(IO_CACHE *info); extern int end_io_cache(IO_CACHE *info);
extern uint my_b_fill(IO_CACHE *info); extern uint my_b_fill(IO_CACHE *info);
extern void my_b_seek(IO_CACHE *info,my_off_t pos); extern void my_b_seek(IO_CACHE *info,my_off_t pos);
extern uint my_b_gets(IO_CACHE *info, char *to, uint max_length); extern uint my_b_gets(IO_CACHE *info, char *to, uint max_length);
extern uint my_b_printf(IO_CACHE *info, const char* fmt, ...); extern uint my_b_printf(IO_CACHE *info, const char* fmt, ...);
extern uint my_b_vprintf(IO_CACHE *info, const char* fmt, va_list ap); extern uint my_b_vprintf(IO_CACHE *info, const char* fmt, va_list ap);
extern my_bool open_cached_file(IO_CACHE *cache,const char *dir, extern my_bool open_cached_file(IO_CACHE *cache,const char *dir,
const char *prefix, uint cache_size, const char *prefix, uint cache_size,
myf cache_myflags); myf cache_myflags);
extern my_bool real_open_cached_file(IO_CACHE *cache); extern my_bool real_open_cached_file(IO_CACHE *cache);
extern void close_cached_file(IO_CACHE *cache); extern void close_cached_file(IO_CACHE *cache);
File create_temp_file(char *to, const char *dir, const char *pfx, File create_temp_file(char *to, const char *dir, const char *pfx,
int mode, myf MyFlags); int mode, myf MyFlags);
#define my_init_dynamic_array(A,B,C,D) init_dynamic_array(A,B,C,D CALLER_IN FO) #define my_init_dynamic_array(A,B,C,D) init_dynamic_array(A,B,C,D CALLER_IN FO)
#define my_init_dynamic_array_ci(A,B,C,D) init_dynamic_array(A,B,C,D ORIG_C ALLER_INFO) #define my_init_dynamic_array_ci(A,B,C,D) init_dynamic_array(A,B,C,D ORIG_C ALLER_INFO)
extern my_bool init_dynamic_array(DYNAMIC_ARRAY *array,uint element_size, extern my_bool init_dynamic_array(DYNAMIC_ARRAY *array,uint element_size,
uint init_alloc,uint alloc_increment CALLER_INFO_PROTO); uint init_alloc,uint alloc_increment CALLER_INFO_PROTO);
extern my_bool insert_dynamic(DYNAMIC_ARRAY *array,gptr element); extern my_bool insert_dynamic(DYNAMIC_ARRAY *array,gptr element);
extern byte *alloc_dynamic(DYNAMIC_ARRAY *array); extern unsigned char *alloc_dynamic(DYNAMIC_ARRAY *array);
extern byte *pop_dynamic(DYNAMIC_ARRAY*); extern unsigned char *pop_dynamic(DYNAMIC_ARRAY*);
extern my_bool set_dynamic(DYNAMIC_ARRAY *array,gptr element,uint array_ind ex); extern my_bool set_dynamic(DYNAMIC_ARRAY *array,gptr element,uint array_ind ex);
extern void get_dynamic(DYNAMIC_ARRAY *array,gptr element,uint array_index) ; extern void get_dynamic(DYNAMIC_ARRAY *array,gptr element,uint array_index) ;
extern void delete_dynamic(DYNAMIC_ARRAY *array); extern void delete_dynamic(DYNAMIC_ARRAY *array);
extern void delete_dynamic_element(DYNAMIC_ARRAY *array, uint array_index); extern void delete_dynamic_element(DYNAMIC_ARRAY *array, uint array_index);
extern void freeze_size(DYNAMIC_ARRAY *array); extern void freeze_size(DYNAMIC_ARRAY *array);
#define dynamic_array_ptr(array,array_index) ((array)->buffer+(array_index) *(array)->size_of_element) #define dynamic_array_ptr(array,array_index) ((array)->buffer+(array_index) *(array)->size_of_element)
#define dynamic_element(array,array_index,type) ((type)((array)->buffer) +( array_index)) #define dynamic_element(array,array_index,type) ((type)((array)->buffer) +( array_index))
#define push_dynamic(A,B) insert_dynamic(A,B) #define push_dynamic(A,B) insert_dynamic(A,B)
extern int find_type(my_string x,TYPELIB *typelib,uint full_name); extern int find_type(my_string x,TYPELIB *typelib,uint full_name);
extern void make_type(my_string to,uint nr,TYPELIB *typelib); extern void make_type(my_string to,uint nr,TYPELIB *typelib);
extern const char *get_type(TYPELIB *typelib,uint nr); extern const char *get_type(TYPELIB *typelib,uint nr);
extern my_bool init_dynamic_string(DYNAMIC_STRING *str, const char *init_st r, extern my_bool init_dynamic_string(DYNAMIC_STRING *str, const char *init_st r,
size_t init_alloc, size_t alloc_increment ); size_t init_alloc, size_t alloc_increment );
extern my_bool dynstr_append(DYNAMIC_STRING *str, const char *append); extern my_bool dynstr_append(DYNAMIC_STRING *str, const char *append);
my_bool dynstr_append_mem(DYNAMIC_STRING *str, const char *append, my_bool dynstr_append_mem(DYNAMIC_STRING *str, const char *append,
size_t length); size_t length);
extern my_bool dynstr_set(DYNAMIC_STRING *str, const char *init_str); extern my_bool dynstr_set(DYNAMIC_STRING *str, const char *init_str);
extern my_bool dynstr_realloc(DYNAMIC_STRING *str, ulong additional_size); extern my_bool dynstr_realloc(DYNAMIC_STRING *str, size_t additional_size);
extern void dynstr_free(DYNAMIC_STRING *str); extern void dynstr_free(DYNAMIC_STRING *str);
void set_all_changeable_vars(CHANGEABLE_VAR *vars); void set_all_changeable_vars(CHANGEABLE_VAR *vars);
my_bool set_changeable_var(my_string str,CHANGEABLE_VAR *vars); my_bool set_changeable_var(my_string str,CHANGEABLE_VAR *vars);
my_bool set_changeable_varval(const char *var, ulong val, my_bool set_changeable_varval(const char *var, ulong val,
CHANGEABLE_VAR *vars); CHANGEABLE_VAR *vars);
#ifdef HAVE_MLOCK #ifdef HAVE_MLOCK
extern byte *my_malloc_lock(size_t length,myf flags); extern unsigned char *my_malloc_lock(size_t length,myf flags);
extern void my_free_lock(byte *ptr,myf flags); extern void my_free_lock(unsigned char *ptr,myf flags);
#else #else
#define my_malloc_lock(A,B) my_malloc((A),(B)) #define my_malloc_lock(A,B) my_malloc((A),(B))
#define my_free_lock(A,B) my_free((A),(B)) #define my_free_lock(A,B) my_free((A),(B))
#endif #endif
#define alloc_root_inited(A) ((A)->min_malloc != 0) #define alloc_root_inited(A) ((A)->min_malloc != 0)
void init_alloc_root(MEM_ROOT *mem_root, size_t block_size, size_t pre_allo c_size); void init_alloc_root(MEM_ROOT *mem_root, size_t block_size, size_t pre_allo c_size);
gptr alloc_root(MEM_ROOT *mem_root, size_t Size); gptr alloc_root(MEM_ROOT *mem_root, size_t Size);
void free_root(MEM_ROOT *root, myf MyFLAGS); void free_root(MEM_ROOT *root, myf MyFLAGS);
char *strdup_root(MEM_ROOT *root,const char *str); char *strdup_root(MEM_ROOT *root,const char *str);
char *memdup_root(MEM_ROOT *root,const char *str, size_t len); char *memdup_root(MEM_ROOT *root,const char *str, size_t len);
void load_defaults(const char *conf_file, const char **groups, void load_defaults(const char *conf_file, const char **groups,
int *argc, char ***argv); int *argc, char ***argv);
void free_defaults(char **argv); void free_defaults(char **argv);
void print_defaults(const char *conf_file, const char **groups); void print_defaults(const char *conf_file, const char **groups);
my_bool my_compress(byte *, ulong *, ulong *); my_bool my_compress(unsigned char *, size_t *, size_t *);
my_bool my_uncompress(byte *, ulong *, ulong *); my_bool my_uncompress(unsigned char *, size_t *, size_t *);
byte *my_compress_alloc(const byte *packet, ulong *len, ulong *complen); unsigned char *my_compress_alloc(const unsigned char *packet, size_t *len,
ulong checksum(const byte *mem, uint count); size_t *complen);
ulong checksum(const unsigned char *mem, uint count);
#if defined(_MSC_VER) && !defined(_WIN32) #if defined(_MSC_VER) && !defined(_WIN32)
extern void sleep(int sec); extern void sleep(int sec);
#endif #endif
#ifdef _WIN32 #ifdef _WIN32
extern my_bool have_tcpip; /* Is set if tcpip is used */ extern my_bool have_tcpip; /* Is set if tcpip is used */
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
} }
 End of changes. 24 change blocks. 
47 lines changed or deleted 39 lines changed or added


 mysql.h   mysql.h 
/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
2012 by MontyProgram AB
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version. version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library 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 GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details. Library General Public License for more details.
You should have received a copy of the GNU Library General Public You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA */ MA 02111-1307, USA */
/* defines for the libmysql library */ /* defines for the libmariadb library */
#ifndef _mysql_h #ifndef _mysql_h
#define _mysql_h #define _mysql_h
#ifndef MYSQL_SERVER
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#ifndef LIBMARIADB
#define LIBMARIADB
#endif #endif
#ifndef _global_h /* If not standard header */ #ifndef _global_h /* If not standard header */
#include <sys/types.h> #include <sys/types.h>
#ifdef __LCC__
#include <winsock2.h> /* For windows */
#endif
typedef char my_bool; typedef char my_bool;
#if !defined(_WIN32) #if !defined(_WIN32)
#define STDCALL #define STDCALL
#else #else
#include <WinSock2.h>
#define STDCALL __stdcall #define STDCALL __stdcall
#endif #endif
typedef char * gptr; typedef char * gptr;
#ifndef my_socket_defined #ifndef my_socket_defined
#define my_socket_defined #define my_socket_defined
#ifdef _WIN32 #if defined(_WIN64)
#define my_socket SOCKET #define my_socket unsigned long long
#elif defined(_WIN32)
#define my_socket unsigned int
#else #else
typedef int my_socket; typedef int my_socket;
#endif #endif
#endif #endif
#endif #endif
#include "mysql_com.h" #include "mysql_com.h"
#include "mysql_version.h" #include "mysql_version.h"
#include "my_list.h" #include "my_list.h"
#include "m_ctype.h"
#ifndef ST_USED_MEM_DEFINED #ifndef ST_USED_MEM_DEFINED
#define ST_USED_MEM_DEFINED #define ST_USED_MEM_DEFINED
typedef struct st_used_mem { /* struct for once_alloc */ typedef struct st_used_mem { /* struct for once_alloc */
struct st_used_mem *next; /* Next block in use */ struct st_used_mem *next; /* Next block in use */
size_t left; /* memory left in block */ size_t left; /* memory left in block */
size_t size; /* Size of block */ size_t size; /* Size of block */
} USED_MEM; } USED_MEM;
typedef struct st_mem_root { typedef struct st_mem_root {
USED_MEM *free; USED_MEM *free;
USED_MEM *used; USED_MEM *used;
USED_MEM *pre_alloc; USED_MEM *pre_alloc;
size_t min_malloc; size_t min_malloc;
size_t block_size; size_t block_size;
unsigned int block_num; unsigned int block_num;
unsigned int first_block_usage; unsigned int first_block_usage;
void (*error_handler)(void); void (*error_handler)(void);
} MEM_ROOT; } MEM_ROOT;
#endif #endif
extern unsigned int mysql_port; extern unsigned int mysql_port;
extern char *mysql_unix_port; extern char *mysql_unix_port;
#define IS_PRI_KEY(n) ((n) & PRI_KEY_FLAG) #define IS_PRI_KEY(n) ((n) & PRI_KEY_FLAG)
#define IS_NOT_NULL(n) ((n) & NOT_NULL_FLAG) #define IS_NOT_NULL(n) ((n) & NOT_NULL_FLAG)
#define IS_BLOB(n) ((n) & BLOB_FLAG) #define IS_BLOB(n) ((n) & BLOB_FLAG)
#define IS_NUM(t) ((t) <= FIELD_TYPE_INT24 || (t) == FIELD_TYPE_YEAR) #define IS_NUM(t) ((t) <= FIELD_TYPE_INT24 || (t) == FIELD_TYPE_YEAR)
#define IS_NUM_FIELD(f) ((f)->flags & NUM_FLAG) #define IS_NUM_FIELD(f) ((f)->flags & NUM_FLAG)
#define INTERNAL_NUM_FIELD(f) (((f)->type <= MYSQL_TYPE_INT24 && ((f)->type != MYSQL_TYPE_TIMESTAMP || (f)->length == 14 || (f)->length == 8)) || (f)- >type == MYSQL_TYPE_YEAR) #define INTERNAL_NUM_FIELD(f) (((f)->type <= MYSQL_TYPE_INT24 && ((f)->type != MYSQL_TYPE_TIMESTAMP || (f)->length == 14 || (f)->length == 8)) || (f)- >type == MYSQL_TYPE_YEAR)
typedef struct st_mysql_field { typedef struct st_mysql_field {
char *name; /* Name of column */ char *name; /* Name of column */
char *org_name; /* Name of original column (added after 3.23 char *org_name; /* Name of original column (added after 3.23
.58) */ .58) */
char *table; /* Table of column if column was a field */ char *table; /* Table of column if column was a f
char *org_table; /* Name of original table (added after 3.23. ield */
58 */ char *org_table; /* Name of original table (added after 3.23.
char *db; /* table schema (added after 3.23.58) */ 58 */
char *catalog; /* table catalog (added after 3.23.58) */ char *db; /* table schema (added after 3.23.58) */
char *def; /* Default value (set by mysql_list_fields) char *catalog; /* table catalog (added after 3.23.58) */
*/ char *def; /* Default value (set by mysql_list_fields)
unsigned long length; /* Width of column */ */
unsigned long max_length; /* Max width of selected set */ unsigned long length; /* Width of column */
/* added after 3.23.58 */ unsigned long max_length; /* Max width of selected set */
unsigned int name_length; /* added after 3.23.58 */
unsigned int org_name_length; unsigned int name_length;
unsigned int table_length; unsigned int org_name_length;
unsigned int org_table_length; unsigned int table_length;
unsigned int db_length; unsigned int org_table_length;
unsigned int catalog_length; unsigned int db_length;
unsigned int def_length; unsigned int catalog_length;
/***********************/ unsigned int def_length;
unsigned int flags; /* Div flags */ /***********************/
unsigned int decimals; /* Number of decimals in field */ unsigned int flags; /* Div flags */
unsigned int charsetnr; /* char set number (added in 4.1) */ unsigned int decimals; /* Number of decimals in field */
enum enum_field_types type; /* Type of field. Se mysql_com.h for types * unsigned int charsetnr; /* char set number (added in 4.1) */
/ enum enum_field_types type; /* Type of field. Se mysql_com.h for
void *extension; /* added in 4.1 */ types */
} MYSQL_FIELD; void *extension; /* added in 4.1 */
} MYSQL_FIELD;
typedef char **MYSQL_ROW; /* return data as array of strings * typedef char **MYSQL_ROW; /* return data as array of strings *
/ /
typedef unsigned int MYSQL_FIELD_OFFSET; /* offset to current field */ typedef unsigned int MYSQL_FIELD_OFFSET; /* offset to current field */
#if defined(NO_CLIENT_LONG_LONG) #if defined(NO_CLIENT_LONG_LONG)
typedef unsigned long my_ulonglong; typedef unsigned long my_ulonglong;
#elif defined (_WIN32) #elif defined (_WIN32)
typedef unsigned __int64 my_ulonglong; typedef unsigned __int64 my_ulonglong;
#else #else
typedef unsigned long long my_ulonglong; typedef unsigned long long my_ulonglong;
#endif
#ifndef longlong_defined
#if defined(HAVE_LONG_LONG) && SIZEOF_LONG != 8
typedef long long int longlong;
#else
typedef long longlong;
#endif
#define longlong_defined
#endif #endif
/* mysql compatibility macro */
#define mysql_options4(A,B,C,D) mysql_optionsv((A),(B),(C),(D))
#define SET_CLIENT_ERROR(a, b, c, d) \ #define SET_CLIENT_ERROR(a, b, c, d) \
{ \ { \
(a)->net.last_errno= (b);\ (a)->net.last_errno= (b);\
strncpy((a)->net.sqlstate, (c), sizeof((a)->net.sqlstate));\ strncpy((a)->net.sqlstate, (c), sizeof((a)->net.sqlstate));\
strncpy((a)->net.last_error, (d) ? (d) : ER((b)), sizeof((a)->net.last_er strncpy((a)->net.last_error, (d) ? (d) : ER((b)), sizeof((a)->net.last_
ror));\ error));\
} }
#define CLEAR_CLIENT_ERROR(a) \ #define CLEAR_CLIENT_ERROR(a) \
{ \ { \
(a)->net.last_errno= 0;\ (a)->net.last_errno= 0;\
strcpy((a)->net.sqlstate, "00000");\ strcpy((a)->net.sqlstate, "00000");\
(a)->net.last_error[0]= '\0';\ (a)->net.last_error[0]= '\0';\
} }
#define MYSQL_COUNT_ERROR (~(my_ulonglong) 0) #define MYSQL_COUNT_ERROR (~(my_ulonglong) 0)
typedef struct st_mysql_rows { typedef struct st_mysql_rows {
struct st_mysql_rows *next; /* list of rows */ struct st_mysql_rows *next; /* list of rows */
MYSQL_ROW data; MYSQL_ROW data;
unsigned long length; unsigned long length;
} MYSQL_ROWS; } MYSQL_ROWS;
typedef MYSQL_ROWS *MYSQL_ROW_OFFSET; /* offset to current row */ typedef MYSQL_ROWS *MYSQL_ROW_OFFSET; /* offset to current row */
typedef struct st_mysql_data { typedef struct st_mysql_data {
my_ulonglong rows; my_ulonglong rows;
unsigned int fields; unsigned int fields;
MYSQL_ROWS *data; MYSQL_ROWS *data;
MEM_ROOT alloc; MEM_ROOT alloc;
} MYSQL_DATA; } MYSQL_DATA;
enum mysql_option
{
MYSQL_OPT_CONNECT_TIMEOUT,
MYSQL_OPT_COMPRESS,
MYSQL_OPT_NAMED_PIPE,
MYSQL_INIT_COMMAND,
MYSQL_READ_DEFAULT_FILE,
MYSQL_READ_DEFAULT_GROUP,
MYSQL_SET_CHARSET_DIR,
MYSQL_SET_CHARSET_NAME,
MYSQL_OPT_LOCAL_INFILE,
MYSQL_OPT_PROTOCOL,
MYSQL_SHARED_MEMORY_BASE_NAME,
MYSQL_OPT_READ_TIMEOUT,
MYSQL_OPT_WRITE_TIMEOUT,
MYSQL_OPT_USE_RESULT,
MYSQL_OPT_USE_REMOTE_CONNECTION,
MYSQL_OPT_USE_EMBEDDED_CONNECTION,
MYSQL_OPT_GUESS_CONNECTION,
MYSQL_SET_CLIENT_IP,
MYSQL_SECURE_AUTH,
MYSQL_REPORT_DATA_TRUNCATION,
MYSQL_OPT_RECONNECT,
MYSQL_OPT_SSL_VERIFY_SERVER_CERT,
MYSQL_PLUGIN_DIR,
MYSQL_DEFAULT_AUTH,
MYSQL_OPT_BIND,
MYSQL_OPT_SSL_KEY,
MYSQL_OPT_SSL_CERT,
MYSQL_OPT_SSL_CA,
MYSQL_OPT_SSL_CAPATH,
MYSQL_OPT_SSL_CIPHER,
MYSQL_OPT_SSL_CRL,
MYSQL_OPT_SSL_CRLPATH,
/* Connection attribute options */
MYSQL_OPT_CONNECT_ATTR_RESET,
MYSQL_OPT_CONNECT_ATTR_ADD,
MYSQL_OPT_CONNECT_ATTR_DELETE,
/* MariaDB specific */
MYSQL_PROGRESS_CALLBACK=5999,
MYSQL_DATABASE_DRIVER=7000
};
enum mysql_status { MYSQL_STATUS_READY,
MYSQL_STATUS_GET_RESULT,
MYSQL_STATUS_USE_RESULT,
MYSQL_STATUS_QUERY_SENT,
MYSQL_STATUS_SENDING_LOAD_DATA,
MYSQL_STATUS_FETCHING_DATA,
MYSQL_STATUS_NEXT_RESULT_PENDING,
MYSQL_STATUS_QUIT_SENT, /* object is "destroyed" at t
his stage */
};
enum mysql_protocol_type
{
MYSQL_PROTOCOL_DEFAULT, MYSQL_PROTOCOL_TCP, MYSQL_PROTOCOL_SOCKET,
MYSQL_PROTOCOL_PIPE, MYSQL_PROTOCOL_MEMORY
};
enum mysql_option struct st_mysql_options_extention;
{
MYSQL_OPT_CONNECT_TIMEOUT,
MYSQL_OPT_COMPRESS,
MYSQL_OPT_NAMED_PIPE,
MYSQL_INIT_COMMAND,
MYSQL_READ_DEFAULT_FILE,
MYSQL_READ_DEFAULT_GROUP,
MYSQL_SET_CHARSET_DIR,
MYSQL_SET_CHARSET_NAME,
MYSQL_OPT_LOCAL_INFILE,
MYSQL_OPT_PROTOCOL,
MYSQL_SHARED_MEMORY_BASE_NAME,
MYSQL_OPT_READ_TIMEOUT,
MYSQL_OPT_WRITE_TIMEOUT,
MYSQL_OPT_USE_RESULT,
MYSQL_OPT_USE_REMOTE_CONNECTION,
MYSQL_OPT_USE_EMBEDDED_CONNECTION,
MYSQL_OPT_GUESS_CONNECTION,
MYSQL_SET_CLIENT_IP,
MYSQL_SECURE_AUTH,
MYSQL_REPORT_DATA_TRUNCATION,
MYSQL_OPT_RECONNECT,
MYSQL_OPT_SSL_VERIFY_SERVER_CERT,
MYSQL_OPT_PLUGIN_DIR,
MYSQL_OPT_DEFAULT_AUTH,
MYSQL_OPT_PROGRESS_CALLBACK
};
enum mysql_status { MYSQL_STATUS_READY,
MYSQL_STATUS_GET_RESULT,
MYSQL_STATUS_USE_RESULT,
MYSQL_STATUS_QUERY_SENT,
MYSQL_STATUS_SENDING_LOAD_DATA,
MYSQL_STATUS_FETCHING_DATA,
MYSQL_STATUS_NEXT_RESULT_PENDING,
MYSQL_STATUS_QUIT_SENT, /* object is "destroyed" at thi
s stage */
};
enum mysql_protocol_type
{
MYSQL_PROTOCOL_DEFAULT, MYSQL_PROTOCOL_TCP, MYSQL_PROTOCOL_SOCKET,
MYSQL_PROTOCOL_PIPE, MYSQL_PROTOCOL_MEMORY
};
struct st_mysql_options { struct st_mysql_options {
unsigned int connect_timeout, read_timeout, write_timeout; unsigned int connect_timeout, read_timeout, write_timeout;
unsigned int port, protocol; unsigned int port, protocol;
unsigned long client_flag; unsigned long client_flag;
char *host,*user,*password,*unix_socket,*db; char *host,*user,*password,*unix_socket,*db;
char *init_command; struct st_dynamic_array *init_command;
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; char *ssl_cipher;
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 unused_1, unused_2, unused_3, unused_4; my_bool unused_1, unused_2, unused_3, unused_4;
enum mysql_option methods_to_use; enum mysql_option methods_to_use;
char *client_ip; char *client_ip;
my_bool secure_auth; my_bool secure_auth;
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;
struct st_mysql_options_extention *extension; struct st_mysql_options_extention *extension;
}; };
typedef struct st_mysql { typedef struct st_mysql {
NET net; /* Communication parameters */ NET net; /* Communication parameters
unsigned char *unused; */
char *host,*user,*passwd,*unix_socket,*server_version,*host_info; void *unused_0;
char *info,*db; char *host,*user,*passwd,*unix_socket,*server_version,*host_info;
const struct charset_info_st *charset; /* character set */ char *info,*db;
MYSQL_FIELD *fields; const struct charset_info_st *charset; /* character set */
MEM_ROOT field_alloc; MYSQL_FIELD *fields;
my_ulonglong affected_rows; MEM_ROOT field_alloc;
my_ulonglong insert_id; /* id if insert on table with NEXTNR my_ulonglong affected_rows;
*/ my_ulonglong insert_id; /* id if insert on table with NEXTNR
my_ulonglong extra_info; /* Used by mysqlshow */ */
unsigned long thread_id; /* Id for connection in server */ my_ulonglong extra_info; /* Used by mysqlshow */
unsigned long packet_length; unsigned long thread_id; /* Id for connection in server */
unsigned int port; unsigned long packet_length;
unsigned long client_flag,server_capabilities; /* changed from int to lon unsigned int port;
g in 4.1 protocol */ unsigned long client_flag,server_capabilities; /* changed from int to l
unsigned int protocol_version; ong in 4.1 protocol */
unsigned int field_count; unsigned int protocol_version;
unsigned int server_status; unsigned int field_count;
unsigned int server_language; unsigned int server_status;
unsigned int warning_count; /* warning count, added in 4.1 prot unsigned int server_language;
ocol */ unsigned int warning_count; /* warning count, added in 4.1 pr
struct st_mysql_options options; otocol */
enum mysql_status status; struct st_mysql_options options;
my_bool free_me; /* If free in mysql_close */ enum mysql_status status;
my_bool reconnect; /* set to 1 if automatic reconnect * my_bool free_me; /* If free in mysql_close */
/ my_bool reconnect; /* set to 1 if automatic reconnect *
char scramble_buff[20+ 1]; /
/* madded after 3.23.58 */ char scramble_buff[20+ 1];
my_bool unused_1; /* madded after 3.23.58 */
void *unused_2, *unused_3, *unused_4, *unused_5; my_bool unused_1;
LIST *stmts; void *unused_2, *unused_3, *unused_4, *unused_5;
const struct st_mysql_methods *methods; LIST *stmts;
void *thd; const struct st_mysql_methods *methods;
my_bool *unbuffered_fetch_owner; void *thd;
char *info_buffer; my_bool *unbuffered_fetch_owner;
void *extension; char *info_buffer;
void *extension;
} MYSQL; } MYSQL;
typedef struct st_mysql_lex_string {
char *str;
size_t length;
} MYSQL_LEX_STRING;
struct st_mysql_options_extention {
char *plugin_dir;
char *default_auth;
void (*report_progress)(const MYSQL *mysql,
unsigned int stage,
unsigned int max_stage,
double progress,
const char *proc_info,
unsigned int proc_info_length);
};
typedef struct st_mysql_res { typedef struct st_mysql_res {
my_ulonglong row_count; my_ulonglong row_count;
unsigned int field_count, current_field; unsigned int field_count, current_field;
MYSQL_FIELD *fields; MYSQL_FIELD *fields;
MYSQL_DATA *data; MYSQL_DATA *data;
MYSQL_ROWS *data_cursor; MYSQL_ROWS *data_cursor;
MEM_ROOT field_alloc; MEM_ROOT field_alloc;
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 */
unsigned long *lengths; /* column lengths of current row */ unsigned long *lengths; /* column lengths of current row */
skipping to change at line 311 skipping to change at line 326
}; };
typedef struct st_mysql_time typedef struct st_mysql_time
{ {
unsigned int year, month, day, hour, minute, second; unsigned int year, month, day, hour, minute, second;
unsigned long second_part; unsigned long second_part;
my_bool neg; my_bool neg;
enum enum_mysql_timestamp_type time_type; enum enum_mysql_timestamp_type time_type;
} MYSQL_TIME; } MYSQL_TIME;
#define AUTO_SEC_PART_DIGITS 31
#define SEC_PART_DIGITS 6
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 */
unsigned int mbmaxlen; /* max. length for multibyte strings */ unsigned int mbmaxlen; /* max. length for multibyte strings */
} MY_CHARSET_INFO; } MY_CHARSET_INFO;
typedef struct
{
unsigned long *p_max_allowed_packet;
unsigned long *p_net_buffer_length;
void *extension;
} MYSQL_PARAMETERS;
#define net_buffer_length (*mysql_get_parameters()->p_net_buffer_length)
#define max_allowed_packet (*mysql_get_parameters()->p_max_allowed_packet)
/* Local infile support functions */ /* Local infile support functions */
#define LOCAL_INFILE_ERROR_LEN 512 #define LOCAL_INFILE_ERROR_LEN 512
void STDCALL mysql_set_local_infile_handler(MYSQL *mysql, void STDCALL mysql_set_local_infile_handler(MYSQL *mysql,
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 *); void *);
skipping to change at line 368 skipping to change at line 396
char * STDCALL mysql_error(MYSQL *mysql); char * STDCALL mysql_error(MYSQL *mysql);
char * STDCALL mysql_info(MYSQL *mysql); char * STDCALL mysql_info(MYSQL *mysql);
unsigned long STDCALL mysql_thread_id(MYSQL *mysql); unsigned long STDCALL mysql_thread_id(MYSQL *mysql);
const char * STDCALL mysql_character_set_name(MYSQL *mysql); const char * STDCALL mysql_character_set_name(MYSQL *mysql);
void STDCALL mysql_get_character_set_info(MYSQL *mysql, MY_CHARSET_INFO *cs ); void STDCALL mysql_get_character_set_info(MYSQL *mysql, MY_CHARSET_INFO *cs );
int STDCALL mysql_set_character_set(MYSQL *mysql, const char *csname); int STDCALL mysql_set_character_set(MYSQL *mysql, const char *csname);
MYSQL * STDCALL mysql_init(MYSQL *mysql); MYSQL * STDCALL mysql_init(MYSQL *mysql);
int STDCALL mysql_ssl_set(MYSQL *mysql, const char *key, int STDCALL mysql_ssl_set(MYSQL *mysql, const char *key,
const char *cert, const char *ca, const char *cert, const char *ca,
const char *capath); const char *capath, const char *cipher );
const char * STDCALL mysql_get_ssl_cipher(MYSQL *mysql); const char * STDCALL mysql_get_ssl_cipher(MYSQL *mysql);
int STDCALL mysql_ssl_clear(MYSQL *mysql); int STDCALL mysql_ssl_clear(MYSQL *mysql);
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);
my_bool STDCALL mysql_change_user(MYSQL *mysql, const char * user, my_bool STDCALL mysql_change_user(MYSQL *mysql, const char * user,
const char *passwd, const char *db ); const char *passwd, const char *db );
MYSQL * STDCALL mysql_real_connect(MYSQL *mysql, const char *host, MYSQL * STDCALL mysql_real_connect(MYSQL *mysql, const char *host,
const char *user, const char *user,
const char *passwd, const char *passwd,
const char *db, const char *db,
unsigned int port, unsigned int port,
const char *unix_socket, const char *unix_socket,
unsigned long clientflag); unsigned long clientflag);
void STDCALL mysql_close(MYSQL *sock); void STDCALL mysql_close(MYSQL *sock);
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 int length); unsigned long length);
int STDCALL mysql_read_query_result(MYSQL *mysql); my_bool STDCALL mysql_read_query_result(MYSQL *mysql);
int STDCALL mysql_real_query(MYSQL *mysql, const char *q, int STDCALL mysql_real_query(MYSQL *mysql, const char *q,
unsigned int length); unsigned long length);
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);
int STDCALL mysql_shutdown(MYSQL *mysql); int STDCALL mysql_shutdown(MYSQL *mysql, enum mysql_enum_shutdow n_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_ping(MYSQL *mysql); int STDCALL mysql_ping(MYSQL *mysql);
char * STDCALL mysql_stat(MYSQL *mysql); char * STDCALL mysql_stat(MYSQL *mysql);
char * STDCALL mysql_get_server_info(MYSQL *mysql); char * STDCALL mysql_get_server_info(MYSQL *mysql);
unsigned long STDCALL mysql_get_server_version(MYSQL *mysql); unsigned long STDCALL mysql_get_server_version(MYSQL *mysql);
char * STDCALL mysql_get_host_info(MYSQL *mysql); char * STDCALL mysql_get_host_info(MYSQL *mysql);
unsigned int STDCALL mysql_get_proto_info(MYSQL *mysql); unsigned int STDCALL mysql_get_proto_info(MYSQL *mysql);
MYSQL_RES * STDCALL mysql_list_dbs(MYSQL *mysql,const char *wild); MYSQL_RES * STDCALL mysql_list_dbs(MYSQL *mysql,const char *wild);
MYSQL_RES * STDCALL mysql_list_tables(MYSQL *mysql,const char *wild); MYSQL_RES * STDCALL mysql_list_tables(MYSQL *mysql,const char *wild);
MYSQL_RES * STDCALL mysql_list_fields(MYSQL *mysql, const char *table, MYSQL_RES * STDCALL mysql_list_fields(MYSQL *mysql, const char *table,
const char *wild); const char *wild);
MYSQL_RES * STDCALL mysql_list_processes(MYSQL *mysql); MYSQL_RES * STDCALL mysql_list_processes(MYSQL *mysql);
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);
int STDCALL mysql_options(MYSQL *mysql,enum mysql_option option, int STDCALL mysql_options(MYSQL *mysql,enum mysql_option option,
const char *arg); const void *arg);
void STDCALL mysql_free_result(MYSQL_RES *result); void STDCALL mysql_free_result(MYSQL_RES *result);
void STDCALL mysql_data_seek(MYSQL_RES *result, void STDCALL mysql_data_seek(MYSQL_RES *result,
my_ulonglong offset); my_ulonglong offset);
MYSQL_ROW_OFFSET STDCALL mysql_row_seek(MYSQL_RES *result, MYSQL_ROW_OFFSET ); MYSQL_ROW_OFFSET STDCALL mysql_row_seek(MYSQL_RES *result, MYSQL_ROW_OFFSET );
MYSQL_FIELD_OFFSET STDCALL mysql_field_seek(MYSQL_RES *result, MYSQL_FIELD_OFFSET STDCALL mysql_field_seek(MYSQL_RES *result,
MYSQL_FIELD_OFFSET offset); MYSQL_FIELD_OFFSET offset);
MYSQL_ROW STDCALL mysql_fetch_row(MYSQL_RES *result); MYSQL_ROW STDCALL mysql_fetch_row(MYSQL_RES *result);
unsigned long * STDCALL mysql_fetch_lengths(MYSQL_RES *result); unsigned long * STDCALL mysql_fetch_lengths(MYSQL_RES *result);
MYSQL_FIELD * STDCALL mysql_fetch_field(MYSQL_RES *result); MYSQL_FIELD * STDCALL mysql_fetch_field(MYSQL_RES *result);
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_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);
#define mysql_debug_init(A) mysql_debug((A)); #define mysql_debug_init(A) mysql_debug((A));
void STDCALL mysql_debug_end(); void STDCALL mysql_debug_end(void);
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);
unsigned int STDCALL mysql_warning_count(MYSQL *mysql); unsigned int STDCALL mysql_warning_count(MYSQL *mysql);
const char * STDCALL mysql_sqlstate(MYSQL *mysql); const char * STDCALL mysql_sqlstate(MYSQL *mysql);
int STDCALL mysql_server_init(int argc, char **argv, char **groups); int STDCALL mysql_server_init(int argc, char **argv, char **groups);
void STDCALL mysql_server_end(void); void STDCALL mysql_server_end(void);
void STDCALL mysql_thread_end(void); void STDCALL mysql_thread_end(void);
my_bool STDCALL mysql_thread_init(void); my_bool STDCALL mysql_thread_init(void);
int STDCALL mysql_set_server_option(MYSQL *mysql, int STDCALL mysql_set_server_option(MYSQL *mysql,
enum enum_mysql_set_option option); enum enum_mysql_set_option option);
const char * STDCALL mysql_get_client_info(void); const char * STDCALL mysql_get_client_info(void);
unsigned long STDCALL mysql_get_client_version(void); unsigned long STDCALL mysql_get_client_version(void);
my_bool STDCALL mariadb_connection(MYSQL *mysql);
const char * STDCALL mysql_get_server_name(MYSQL *mysql);
CHARSET_INFO * STDCALL mysql_get_charset_by_name(const char *csname);
CHARSET_INFO * STDCALL mysql_get_charset_by_nr(unsigned int csnr);
size_t STDCALL mariadb_convert_string(const char *from, size_t *from_len, C
HARSET_INFO *from_cs,
char *to, size_t *to_len, CHARSET_INF
O *to_cs, int *errorcode);
int STDCALL mysql_optionsv(MYSQL *mysql,enum mysql_option option, ...);
MYSQL_PARAMETERS *STDCALL mysql_get_parameters(void);
#include <my_stmt.h> #include <my_stmt.h>
/* these methods can be overwritten by db plugins */
struct st_mysql_methods {
MYSQL *(*db_connect)(MYSQL *mysql, const char *host, const char *user, co
nst char *passwd,
const char *db, unsigned int port
, const char *unix_socket, unsigned long clientflag);
void (*db_close)(MYSQL *mysql);
int (*db_command)(MYSQL *mysql,enum enum_server_command command, const ch
ar *arg,
size_t length, my_bool skipp_check, void *opt_arg);
void (*db_skip_result)(MYSQL *mysql);
int (*db_read_query_result)(MYSQL *mysql);
MYSQL_DATA *(*db_read_rows)(MYSQL *mysql,MYSQL_FIELD *fields, unsigned in
t field_count);
int (*db_read_one_row)(MYSQL *mysql,unsigned int fields,MYSQL_ROW row, un
signed long *lengths);
/* prepared statements */
my_bool (*db_supported_buffer_type)(enum enum_field_types type);
my_bool (*db_read_prepare_response)(MYSQL_STMT *stmt);
int (*db_read_stmt_result)(MYSQL *mysql);
my_bool (*db_stmt_get_result_metadata)(MYSQL_STMT *stmt);
my_bool (*db_stmt_get_param_metadata)(MYSQL_STMT *stmt);
int (*db_stmt_read_all_rows)(MYSQL_STMT *stmt);
int (*db_stmt_fetch)(MYSQL_STMT *stmt, unsigned char **row);
int (*db_stmt_fetch_to_bind)(MYSQL_STMT *stmt, unsigned char *row);
void (*db_stmt_flush_unbuffered)(MYSQL_STMT *stmt);
};
/* synonyms/aliases functions */
#define mysql_reload(mysql) mysql_refresh((mysql),REFRESH_GRANT) #define mysql_reload(mysql) mysql_refresh((mysql),REFRESH_GRANT)
#define mysql_library_init mysql_server_init
#define mysql_library_end mysql_server_end
/* new api functions */ /* new api functions */
#define HAVE_MYSQL_REAL_CONNECT #define HAVE_MYSQL_REAL_CONNECT
#ifndef MYSQL_SERVER #ifndef MYSQL_SERVER
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif
 End of changes. 33 change blocks. 
217 lines changed or deleted 288 lines changed or added


 mysql_com.h   mysql_com.h 
skipping to change at line 50 skipping to change at line 50
#define SCRAMBLE_LENGTH_323 8 #define SCRAMBLE_LENGTH_323 8
#define LOCAL_HOST "localhost" #define LOCAL_HOST "localhost"
#define LOCAL_HOST_NAMEDPIPE "." #define LOCAL_HOST_NAMEDPIPE "."
#if defined(_WIN32) && !defined( _CUSTOMCONFIG_) #if defined(_WIN32) && !defined( _CUSTOMCONFIG_)
#define MYSQL_NAMEDPIPE "MySQL" #define MYSQL_NAMEDPIPE "MySQL"
#define MYSQL_SERVICENAME "MySql" #define MYSQL_SERVICENAME "MySql"
#endif /* _WIN32 */ #endif /* _WIN32 */
enum mysql_enum_shutdown_level
{
SHUTDOWN_DEFAULT = 0,
KILL_QUERY= 254,
KILL_CONNECTION= 255
};
enum enum_server_command enum enum_server_command
{ {
MYSQL_COM_SLEEP = 0, MYSQL_COM_SLEEP = 0,
MYSQL_COM_QUIT, MYSQL_COM_QUIT,
MYSQL_COM_INIT_DB, MYSQL_COM_INIT_DB,
MYSQL_COM_QUERY, MYSQL_COM_QUERY,
MYSQL_COM_FIELD_LIST, MYSQL_COM_FIELD_LIST,
MYSQL_COM_CREATE_DB, MYSQL_COM_CREATE_DB,
MYSQL_COM_DROP_DB, MYSQL_COM_DROP_DB,
MYSQL_COM_REFRESH, MYSQL_COM_REFRESH,
skipping to change at line 143 skipping to change at line 150
#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 * /
/* added in 4.x */ /* added in 4.x */
#define CLIENT_PROTOCOL_41 512 #define CLIENT_PROTOCOL_41 512
#define CLIENT_RESERVED 16384 #define CLIENT_RESERVED 16384
#define CLIENT_SECURE_CONNECTION 32768 #define CLIENT_SECURE_CONNECTION 32768
#define CLIENT_MULTI_STATEMENTS (1UL << 16) #define CLIENT_MULTI_STATEMENTS (1UL << 16)
#define CLIENT_MULTI_RESULTS (1UL << 17) #define CLIENT_MULTI_RESULTS (1UL << 17)
#define CLIENT_PS_MULTI_RESULTS (1UL << 18) #define CLIENT_PS_MULTI_RESULTS (1UL << 18)
#define CLIENT_PLUGIN_AUTH (1UL << 19) #define CLIENT_PLUGIN_AUTH (1UL << 19)
#define CLIENT_CONNECT_ATTRS (1UL << 20)
#define CLIENT_PROGRESS (1UL << 29) /* client supports progress in dicator */ #define CLIENT_PROGRESS (1UL << 29) /* client supports progress in dicator */
#define CLIENT_SSL_VERIFY_SERVER_CERT (1UL << 30) #define CLIENT_SSL_VERIFY_SERVER_CERT (1UL << 30)
#define CLIENT_REMEMBER_OPTIONS (1UL << 31)
#define CLIENT_SUPPORTED_FLAGS (CLIENT_LONG_PASSWORD | \ #define CLIENT_SUPPORTED_FLAGS (CLIENT_LONG_PASSWORD | \
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 |\
CLIENT_COMPRESS |\ CLIENT_COMPRESS |\
CLIENT_ODBC |\ CLIENT_ODBC |\
CLIENT_LOCAL_FILES |\ CLIENT_LOCAL_FILES |\
CLIENT_IGNORE_SPACE |\ CLIENT_IGNORE_SPACE |\
CLIENT_INTERACTIVE |\ CLIENT_INTERACTIVE |\
CLIENT_SSL |\ CLIENT_SSL |\
CLIENT_IGNORE_SIGPIPE |\ CLIENT_IGNORE_SIGPIPE |\
CLIENT_TRANSACTIONS |\ CLIENT_TRANSACTIONS |\
CLIENT_PROTOCOL_41 |\ CLIENT_PROTOCOL_41 |\
CLIENT_RESERVED |\ CLIENT_RESERVED |\
CLIENT_SECURE_CONNECTION |\ CLIENT_SECURE_CONNECTION |\
CLIENT_MULTI_STATEMENTS |\ CLIENT_MULTI_STATEMENTS |\
CLIENT_MULTI_RESULTS |\ CLIENT_MULTI_RESULTS |\
CLIENT_PROGRESS |\ CLIENT_PROGRESS |\
CLIENT_SSL_VERIFY_SERVER_CERT) CLIENT_SSL_VERIFY_SERVER_CERT |
\
CLIENT_REMEMBER_OPTIONS |\
CLIENT_CONNECT_ATTRS)
#define CLIENT_CAPABILITIES (CLIENT_LONG_PASSWORD |\ #define CLIENT_CAPABILITIES (CLIENT_LONG_PASSWORD |\
CLIENT_LONG_FLAG |\ CLIENT_LONG_FLAG |\
CLIENT_TRANSACTIONS |\ CLIENT_TRANSACTIONS |\
CLIENT_SECURE_CONNECTION |\ CLIENT_SECURE_CONNECTION |\
CLIENT_MULTI_RESULTS | \ CLIENT_MULTI_RESULTS | \
CLIENT_PS_MULTI_RESULTS |\ CLIENT_PS_MULTI_RESULTS |\
CLIENT_PROTOCOL_41 |\ CLIENT_PROTOCOL_41 |\
CLIENT_PLUGIN_AUTH) CLIENT_PLUGIN_AUTH |\
CLIENT_CONNECT_ATTRS)
#define CLIENT_DEFAULT_FLAGS ((CLIENT_SUPPORTED_FLAGS & ~CLIENT_COMPRESS)\ #define CLIENT_DEFAULT_FLAGS ((CLIENT_SUPPORTED_FLAGS & ~CLIENT_COMPRESS)\
& ~CLIENT_SSL) & ~CLIENT_SSL)
#define SERVER_STATUS_IN_TRANS 1 /* Transaction has started * / #define SERVER_STATUS_IN_TRANS 1 /* Transaction has started * /
#define SERVER_STATUS_AUTOCOMMIT 2 /* Server in auto_commit mod e */ #define SERVER_STATUS_AUTOCOMMIT 2 /* Server in auto_commit mod e */
#define SERVER_MORE_RESULTS_EXIST 8 #define SERVER_MORE_RESULTS_EXIST 8
#define SERVER_QUERY_NO_GOOD_INDEX_USED 16 #define SERVER_QUERY_NO_GOOD_INDEX_USED 16
#define SERVER_QUERY_NO_INDEX_USED 32 #define SERVER_QUERY_NO_INDEX_USED 32
#define SERVER_STATUS_CURSOR_EXISTS 64 #define SERVER_STATUS_CURSOR_EXISTS 64
#define SERVER_STATUS_LAST_ROW_SENT 128 #define SERVER_STATUS_LAST_ROW_SENT 128
#define SERVER_STATUS_DB_DROPPED 256 #define SERVER_STATUS_DB_DROPPED 256
#define SERVER_STATUS_NO_BACKSLASH_ESCAPES 512 #define SERVER_STATUS_NO_BACKSLASH_ESCAPES 512
#define SERVER_STATUS_METADATA_CHANGED 1024
#define SERVER_QUERY_WAS_SLOW 2048
#define SERVER_PS_OUT_PARAMS 4096
#define MYSQL_ERRMSG_SIZE 512 #define MYSQL_ERRMSG_SIZE 512
#define NET_READ_TIMEOUT 30 /* Timeout on read */ #define NET_READ_TIMEOUT 30 /* Timeout on read */
#define NET_WRITE_TIMEOUT 60 /* Timeout on write */ #define NET_WRITE_TIMEOUT 60 /* Timeout on write */
#define NET_WAIT_TIMEOUT 8*60*60 /* Wait for new query */ #define NET_WAIT_TIMEOUT 8*60*60 /* Wait for new query */
#ifndef Vio_defined #ifndef Vio_defined
#define Vio_defined #define Vio_defined
#ifdef HAVE_VIO #ifdef HAVE_VIO
class Vio; /* Fill Vio class in C++ */ class Vio; /* Fill Vio class in C++ */
#else #else
struct st_vio; /* Only C */ struct st_vio; /* Only C */
typedef struct st_vio Vio; typedef struct st_vio Vio;
#endif #endif
#endif #endif
#define MAX_CHAR_WIDTH 255 /* Max length for a CHAR colum */ #define MAX_CHAR_WIDTH 255 /* Max length for a CHAR colum */
#define MAX_BLOB_WIDTH 8192 /* Default width for blob */ #define MAX_BLOB_WIDTH 8192 /* Default width for blob */
/* the following defines were added for PHP's mysqli and pdo extensions:
see: CONC-56
*/
#define MAX_TINYINT_WIDTH 3
#define MAX_SMALLINT_WIDTH 5
#define MAX_MEDIUMINT_WIDTH 8
#define MAX_INT_WIDTH 10
#define MAX_BIGINT_WIDTH 20
typedef struct st_net { typedef struct st_net {
Vio *vio; Vio *vio;
unsigned char *buff; unsigned char *buff;
unsigned char *buff_end,*write_pos,*read_pos; unsigned char *buff_end,*write_pos,*read_pos;
my_socket fd; /* For Perl DBI/dbd */ my_socket fd; /* For Perl DBI/dbd */
unsigned long remain_in_buf,length; unsigned long remain_in_buf,length;
unsigned long cmd_buffer_length;
unsigned long buf_length, where_b; unsigned long 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 unused_1, unused_2; my_bool unused_1, unused_2;
my_bool compress; my_bool compress;
skipping to change at line 308 skipping to change at line 330
#define net_new_transaction(net) ((net)->pkt_nr=0) #define net_new_transaction(net) ((net)->pkt_nr=0)
int my_net_init(NET *net, Vio *vio); int my_net_init(NET *net, Vio *vio);
void net_end(NET *net); void net_end(NET *net);
void net_clear(NET *net); void net_clear(NET *net);
int net_flush(NET *net); int net_flush(NET *net);
int my_net_write(NET *net,const char *packet, size_t len); int my_net_write(NET *net,const char *packet, size_t len);
int net_write_command(NET *net,unsigned char command,const char *packet, int net_write_command(NET *net,unsigned char command,const char *packet,
size_t len); size_t len);
int net_real_write(NET *net,const char *packet,unsigned long len); int net_real_write(NET *net,const char *packet, size_t len);
unsigned long my_net_read(NET *net); unsigned long my_net_read(NET *net);
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;
}; };
/* The following is for user defined functions */ /* The following is for user defined functions */
enum Item_result {STRING_RESULT,REAL_RESULT,INT_RESULT}; enum Item_result {STRING_RESULT,REAL_RESULT,INT_RESULT};
skipping to change at line 367 skipping to change at line 389
void make_password_from_salt(char *to, unsigned long *hash_res); void make_password_from_salt(char *to, unsigned long *hash_res);
char *scramble_323(char *to,const char *message,const char *password); char *scramble_323(char *to,const char *message,const char *password);
void my_scramble_41(const unsigned char *buffer, const char *scramble, cons t char *password); void my_scramble_41(const unsigned char *buffer, const char *scramble, cons t char *password);
my_bool check_scramble(const char *, const char *message, my_bool check_scramble(const char *, const char *message,
unsigned long *salt,my_bool old_ver); unsigned long *salt,my_bool old_ver);
char *get_tty_password(char *opt_message); char *get_tty_password(char *opt_message);
void hash_password(unsigned long *result, const char *password, size_t len) ; void hash_password(unsigned long *result, const char *password, size_t len) ;
/* Some other useful functions */ /* Some other useful functions */
void my_init(void);
void load_defaults(const char *conf_file, const char **groups, void load_defaults(const char *conf_file, const char **groups,
int *argc, char ***argv); int *argc, char ***argv);
my_bool my_thread_init(void); my_bool my_thread_init(void);
void my_thread_end(void); void my_thread_end(void);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#define NULL_LENGTH ((unsigned long) ~0) /* For net_store_length */ #define NULL_LENGTH ((unsigned long) ~0) /* For net_store_length */
 End of changes. 11 change blocks. 
6 lines changed or deleted 28 lines changed or added


 mysql_version.h   mysql_version.h 
/* Copyright Abandoned 1996, 1999, 2001 MySQL AB /* Copyright Abandoned 1996, 1999, 2001 MySQL AB
This file is public domain and comes with NO WARRANTY of any kind */ This file is public domain and comes with NO WARRANTY of any kind */
/* Version numbers for protocol & mysqld */ /* Version numbers for protocol & mysqld */
#ifdef _CUSTOMCONFIG_ #ifdef _CUSTOMCONFIG_
#include <custom_conf.h> #include <custom_conf.h>
#else #else
#define PROTOCOL_VERSION 10 #define PROTOCOL_VERSION 10
#define MYSQL_CLIENT_VERSION "5.3.2" #define MYSQL_CLIENT_VERSION "5.5.0"
#define MYSQL_SERVER_VERSION "5.3.2" #define MYSQL_SERVER_VERSION "5.5.0"
#define MYSQL_SERVER_SUFFIX "" #define MYSQL_SERVER_SUFFIX ""
#define FRM_VER #define FRM_VER
#define MYSQL_VERSION_ID 50302 #define MYSQL_VERSION_ID 50500
#define MYSQL_PORT 3306 #define MYSQL_PORT 3306
#define MYSQL_UNIX_ADDR "/tmp/mysql.sock" #define MYSQL_UNIX_ADDR "/tmp/mysql.sock"
#define MYSQL_CONFIG_NAME "my" #define MYSQL_CONFIG_NAME "my"
#define MARIADB_PACKAGE_VERSION "2.0.0"
#define MARIADB_SYSTEM_TYPE "Linux"
#define MARIADB_MACHINE_TYPE "i686"
/* mysqld compile time options */ /* mysqld compile time options */
#ifndef MYSQL_CHARSET #ifndef MYSQL_CHARSET
#define MYSQL_CHARSET "" #define MYSQL_CHARSET ""
#endif #endif
#endif #endif
 End of changes. 3 change blocks. 
3 lines changed or deleted 7 lines changed or added


 mysqld_error.h   mysqld_error.h 
/* This file is automaticly generated from errmsg.sys ; Do not edit! */ /* This file was automatically generated from errmsg.sys.
/* mysqld server error messagenumbers */ Todo: Several error messages are no longer in use
*/
#define ER_HASHCHK 1000 #define ER_HASHCHK 1000 /* no longer in use ?! */
#define ER_NISAMCHK 1001 #define ER_NISAMCHK 1001 /* no longer in use ? */
#define ER_NO 1002 #define ER_NO 1002
#define ER_YES 1003 #define ER_YES 1003
#define ER_CANT_CREATE_FILE 1004 #define ER_CANT_CREATE_FILE 1004
#define ER_CANT_CREATE_TABLE 1005 #define ER_CANT_CREATE_TABLE 1005
#define ER_CANT_CREATE_DB 1006 #define ER_CANT_CREATE_DB 1006
#define ER_DB_CREATE_EXISTS 1007 #define ER_DB_CREATE_EXISTS 1007
#define ER_DB_DROP_EXISTS 1008 #define ER_DB_DROP_EXISTS 1008
#define ER_DB_DROP_DELETE 1009 #define ER_DB_DROP_DELETE 1009 /* no longer in use ?! */
#define ER_DB_DROP_RMDIR 1010 #define ER_DB_DROP_RMDIR 1010
#define ER_CANT_DELETE_FILE 1011 #define ER_CANT_DELETE_FILE 1011
#define ER_CANT_FIND_SYSTEM_REC 1012 #define ER_CANT_FIND_SYSTEM_REC 1012
#define ER_CANT_GET_STAT 1013 #define ER_CANT_GET_STAT 1013
#define ER_CANT_GET_WD 1014 #define ER_CANT_GET_WD 1014
#define ER_CANT_LOCK 1015 #define ER_CANT_LOCK 1015
#define ER_CANT_OPEN_FILE 1016 #define ER_CANT_OPEN_FILE 1016
#define ER_FILE_NOT_FOUND 1017 #define ER_FILE_NOT_FOUND 1017
#define ER_CANT_READ_DIR 1018 #define ER_CANT_READ_DIR 1018
#define ER_CANT_SET_WD 1019 #define ER_CANT_SET_WD 1019
#define ER_CHECKREAD 1020 #define ER_CHECKREAD 1020
#define ER_DISK_FULL 1021 #define ER_DISK_FULL 1021
#define ER_DUP_KEY 1022 #define ER_DUP_KEY 1022
#define ER_ERROR_ON_CLOSE 1023 #define ER_ERROR_ON_CLOSE 1023
#define ER_ERROR_ON_READ 1024 #define ER_ERROR_ON_READ 1024
#define ER_ERROR_ON_RENAME 1025 #define ER_ERROR_ON_RENAME 1025
#define ER_ERROR_ON_WRITE 1026 #define ER_ERROR_ON_WRITE 1026
#define ER_FILE_USED 1027 #define ER_FILE_USED 1027
#define ER_FILSORT_ABORT 1028 #define ER_FILSORT_ABORT 1028
#define ER_FORM_NOT_FOUND 1029 #define ER_FORM_NOT_FOUND 1029 /* no longer in use ?! */
#define ER_GET_ERRNO 1030 #define ER_GET_ERRNO 1030
#define ER_ILLEGAL_HA 1031 #define ER_ILLEGAL_HA 1031
#define ER_KEY_NOT_FOUND 1032 #define ER_KEY_NOT_FOUND 1032
#define ER_NOT_FORM_FILE 1033 #define ER_NOT_FORM_FILE 1033
#define ER_NOT_KEYFILE 1034 #define ER_NOT_KEYFILE 1034
#define ER_OLD_KEYFILE 1035 #define ER_OLD_KEYFILE 1035
#define ER_OPEN_AS_READONLY 1036 #define ER_OPEN_AS_READONLY 1036
#define ER_OUTOFMEMORY 1037 #define ER_OUTOFMEMORY 1037
#define ER_OUT_OF_SORTMEMORY 1038 #define ER_OUT_OF_SORTMEMORY 1038
#define ER_UNEXPECTED_EOF 1039 #define ER_UNEXPECTED_EOF 1039
skipping to change at line 80 skipping to change at line 81
#define ER_NONUNIQ_TABLE 1066 #define ER_NONUNIQ_TABLE 1066
#define ER_INVALID_DEFAULT 1067 #define ER_INVALID_DEFAULT 1067
#define ER_MULTIPLE_PRI_KEY 1068 #define ER_MULTIPLE_PRI_KEY 1068
#define ER_TOO_MANY_KEYS 1069 #define ER_TOO_MANY_KEYS 1069
#define ER_TOO_MANY_KEY_PARTS 1070 #define ER_TOO_MANY_KEY_PARTS 1070
#define ER_TOO_LONG_KEY 1071 #define ER_TOO_LONG_KEY 1071
#define ER_KEY_COLUMN_DOES_NOT_EXITS 1072 #define ER_KEY_COLUMN_DOES_NOT_EXITS 1072
#define ER_BLOB_USED_AS_KEY 1073 #define ER_BLOB_USED_AS_KEY 1073
#define ER_TOO_BIG_FIELDLENGTH 1074 #define ER_TOO_BIG_FIELDLENGTH 1074
#define ER_WRONG_AUTO_KEY 1075 #define ER_WRONG_AUTO_KEY 1075
#define ER_READY 1076 #define ER_READY 1076 /* no longer in use !? */
#define ER_NORMAL_SHUTDOWN 1077 #define ER_NORMAL_SHUTDOWN 1077
#define ER_GOT_SIGNAL 1078 #define ER_GOT_SIGNAL 1078
#define ER_SHUTDOWN_COMPLETE 1079 #define ER_SHUTDOWN_COMPLETE 1079
#define ER_FORCING_CLOSE 1080 #define ER_FORCING_CLOSE 1080
#define ER_IPSOCK_ERROR 1081 #define ER_IPSOCK_ERROR 1081
#define ER_NO_SUCH_INDEX 1082 #define ER_NO_SUCH_INDEX 1082
#define ER_WRONG_FIELD_TERMINATORS 1083 #define ER_WRONG_FIELD_TERMINATORS 1083
#define ER_BLOBS_AND_NO_TERMINATED 1084 #define ER_BLOBS_AND_NO_TERMINATED 1084
#define ER_TEXTFILE_NOT_READABLE 1085 #define ER_TEXTFILE_NOT_READABLE 1085
#define ER_FILE_EXISTS_ERROR 1086 #define ER_FILE_EXISTS_ERROR 1086
#define ER_LOAD_INFO 1087 #define ER_LOAD_INFO 1087
#define ER_ALTER_INFO 1088 #define ER_ALTER_INFO 1088 /* no longer in use !? */
#define ER_WRONG_SUB_KEY 1089 #define ER_WRONG_SUB_KEY 1089
#define ER_CANT_REMOVE_ALL_FIELDS 1090 #define ER_CANT_REMOVE_ALL_FIELDS 1090
#define ER_CANT_DROP_FIELD_OR_KEY 1091 #define ER_CANT_DROP_FIELD_OR_KEY 1091
#define ER_INSERT_INFO 1092 #define ER_INSERT_INFO 1092
#define ER_INSERT_TABLE_USED 1093 #define ER_INSERT_TABLE_USED 1093 /* no longer in use !? */
#define ER_NO_SUCH_THREAD 1094 #define ER_NO_SUCH_THREAD 1094
#define ER_KILL_DENIED_ERROR 1095 #define ER_KILL_DENIED_ERROR 1095
#define ER_NO_TABLES_USED 1096 #define ER_NO_TABLES_USED 1096
#define ER_TOO_BIG_SET 1097 #define ER_TOO_BIG_SET 1097
#define ER_NO_UNIQUE_LOGFILE 1098 #define ER_NO_UNIQUE_LOGFILE 1098
#define ER_TABLE_NOT_LOCKED_FOR_WRITE 1099 #define ER_TABLE_NOT_LOCKED_FOR_WRITE 1099
#define ER_TABLE_NOT_LOCKED 1100 #define ER_TABLE_NOT_LOCKED 1100
#define ER_BLOB_CANT_HAVE_DEFAULT 1101 #define ER_BLOB_CANT_HAVE_DEFAULT 1101
#define ER_WRONG_DB_NAME 1102 #define ER_WRONG_DB_NAME 1102
#define ER_WRONG_TABLE_NAME 1103 #define ER_WRONG_TABLE_NAME 1103
skipping to change at line 136 skipping to change at line 137
#define ER_CANT_FIND_UDF 1122 #define ER_CANT_FIND_UDF 1122
#define ER_CANT_INITIALIZE_UDF 1123 #define ER_CANT_INITIALIZE_UDF 1123
#define ER_UDF_NO_PATHS 1124 #define ER_UDF_NO_PATHS 1124
#define ER_UDF_EXISTS 1125 #define ER_UDF_EXISTS 1125
#define ER_CANT_OPEN_LIBRARY 1126 #define ER_CANT_OPEN_LIBRARY 1126
#define ER_CANT_FIND_DL_ENTRY 1127 #define ER_CANT_FIND_DL_ENTRY 1127
#define ER_FUNCTION_NOT_DEFINED 1128 #define ER_FUNCTION_NOT_DEFINED 1128
#define ER_HOST_IS_BLOCKED 1129 #define ER_HOST_IS_BLOCKED 1129
#define ER_HOST_NOT_PRIVILEGED 1130 #define ER_HOST_NOT_PRIVILEGED 1130
#define ER_PASSWORD_ANONYMOUS_USER 1131 #define ER_PASSWORD_ANONYMOUS_USER 1131
#define ER_PASSWORD_NOT_ALLOWED 1132 #define ER_PASSWORD_NOT_ALLOWED 1132 /* no longer in use !? */
#define ER_PASSWORD_NO_MATCH 1133 #define ER_PASSWORD_NO_MATCH 1133
#define ER_UPDATE_INFO 1134 #define ER_UPDATE_INFO 1134
#define ER_CANT_CREATE_THREAD 1135 #define ER_CANT_CREATE_THREAD 1135
#define ER_WRONG_VALUE_COUNT_ON_ROW 1136 #define ER_WRONG_VALUE_COUNT_ON_ROW 1136
#define ER_CANT_REOPEN_TABLE 1137 #define ER_CANT_REOPEN_TABLE 1137
#define ER_INVALID_USE_OF_NULL 1138 #define ER_INVALID_USE_OF_NULL 1138 /* no longer in use !? */
#define ER_REGEXP_ERROR 1139 #define ER_REGEXP_ERROR 1139
#define ER_MIX_OF_GROUP_FUNC_AND_FIELDS 1140 #define ER_MIX_OF_GROUP_FUNC_AND_FIELDS 1140
#define ER_NONEXISTING_GRANT 1141 #define ER_NONEXISTING_GRANT 1141
#define ER_TABLEACCESS_DENIED_ERROR 1142 #define ER_TABLEACCESS_DENIED_ERROR 1142
#define ER_COLUMNACCESS_DENIED_ERROR 1143 #define ER_COLUMNACCESS_DENIED_ERROR 1143
#define ER_ILLEGAL_GRANT_FOR_TABLE 1144 #define ER_ILLEGAL_GRANT_FOR_TABLE 1144
#define ER_GRANT_WRONG_HOST_OR_USER 1145 #define ER_GRANT_WRONG_HOST_OR_USER 1145 /* no longer in use !? */
#define ER_NO_SUCH_TABLE 1146 #define ER_NO_SUCH_TABLE 1146
#define ER_NONEXISTING_TABLE_GRANT 1147 #define ER_NONEXISTING_TABLE_GRANT 1147
#define ER_NOT_ALLOWED_COMMAND 1148 #define ER_NOT_ALLOWED_COMMAND 1148
#define ER_SYNTAX_ERROR 1149 #define ER_SYNTAX_ERROR 1149
#define ER_DELAYED_CANT_CHANGE_LOCK 1150 #define ER_DELAYED_CANT_CHANGE_LOCK 1150
#define ER_TOO_MANY_DELAYED_THREADS 1151 #define ER_TOO_MANY_DELAYED_THREADS 1151 /* no longer in use !? */
#define ER_ABORTING_CONNECTION 1152 #define ER_ABORTING_CONNECTION 1152 /* no longer in use !? */
#define ER_NET_PACKET_TOO_LARGE 1153 #define ER_NET_PACKET_TOO_LARGE 1153
#define ER_NET_READ_ERROR_FROM_PIPE 1154 #define ER_NET_READ_ERROR_FROM_PIPE 1154 /* no longer in use !? */
#define ER_NET_FCNTL_ERROR 1155 #define ER_NET_FCNTL_ERROR 1155
#define ER_NET_PACKETS_OUT_OF_ORDER 1156 #define ER_NET_PACKETS_OUT_OF_ORDER 1156
#define ER_NET_UNCOMPRESS_ERROR 1157 #define ER_NET_UNCOMPRESS_ERROR 1157
#define ER_NET_READ_ERROR 1158 #define ER_NET_READ_ERROR 1158
#define ER_NET_READ_INTERRUPTED 1159 #define ER_NET_READ_INTERRUPTED 1159
#define ER_NET_ERROR_ON_WRITE 1160 #define ER_NET_ERROR_ON_WRITE 1160
#define ER_NET_WRITE_INTERRUPTED 1161 #define ER_NET_WRITE_INTERRUPTED 1161
#define ER_TOO_LONG_STRING 1162 #define ER_TOO_LONG_STRING 1162 /* no longer in use !? */
#define ER_TABLE_CANT_HANDLE_BLOB 1163 #define ER_TABLE_CANT_HANDLE_BLOB 1163
#define ER_TABLE_CANT_HANDLE_AUTO_INCREMENT 1164 #define ER_TABLE_CANT_HANDLE_AUTO_INCREMENT 1164
#define ER_DELAYED_INSERT_TABLE_LOCKED 1165 #define ER_DELAYED_INSERT_TABLE_LOCKED 1165
#define ER_WRONG_COLUMN_NAME 1166 #define ER_WRONG_COLUMN_NAME 1166
#define ER_WRONG_KEY_COLUMN 1167 #define ER_WRONG_KEY_COLUMN 1167
#define ER_WRONG_MRG_TABLE 1168 #define ER_WRONG_MRG_TABLE 1168
#define ER_DUP_UNIQUE 1169 #define ER_DUP_UNIQUE 1169
#define ER_BLOB_KEY_WITHOUT_LENGTH 1170 #define ER_BLOB_KEY_WITHOUT_LENGTH 1170
#define ER_PRIMARY_CANT_HAVE_NULL 1171 #define ER_PRIMARY_CANT_HAVE_NULL 1171
#define ER_TOO_MANY_ROWS 1172 #define ER_TOO_MANY_ROWS 1172
#define ER_REQUIRES_PRIMARY_KEY 1173 #define ER_REQUIRES_PRIMARY_KEY 1173
#define ER_NO_RAID_COMPILED 1174 #define ER_NO_RAID_COMPILED 1174 /* no longer in use !? */
#define ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE 1175 #define ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE 1175
#define ER_KEY_DOES_NOT_EXITS 1176 #define ER_KEY_DOES_NOT_EXITS 1176
#define ER_CHECK_NO_SUCH_TABLE 1177 #define ER_CHECK_NO_SUCH_TABLE 1177
#define ER_CHECK_NOT_IMPLEMENTED 1178 #define ER_CHECK_NOT_IMPLEMENTED 1178
#define ER_CANT_DO_THIS_DURING_AN_TRANSACTION 1179 #define ER_CANT_DO_THIS_DURING_AN_TRANSACTION 1179 /* no longer in use !? * /
#define ER_ERROR_DURING_COMMIT 1180 #define ER_ERROR_DURING_COMMIT 1180
#define ER_ERROR_DURING_ROLLBACK 1181 #define ER_ERROR_DURING_ROLLBACK 1181
#define ER_ERROR_DURING_FLUSH_LOGS 1182 #define ER_ERROR_DURING_FLUSH_LOGS 1182
#define ER_ERROR_DURING_CHECKPOINT 1183 #define ER_ERROR_DURING_CHECKPOINT 1183 /* no longer in use !? */
#define ER_NEW_ABORTING_CONNECTION 1184 #define ER_NEW_ABORTING_CONNECTION 1184
#define ER_DUMP_NOT_IMPLEMENTED 1185 #define ER_DUMP_NOT_IMPLEMENTED 1185 /* no longer in use !? */
#define ER_FLUSH_MASTER_BINLOG_CLOSED 1186 #define ER_FLUSH_MASTER_BINLOG_CLOSED 1186
#define ER_INDEX_REBUILD 1187 #define ER_INDEX_REBUILD 1187 /* no longer in use !? */
#define ER_MASTER 1188 #define ER_MASTER 1188
#define ER_MASTER_NET_READ 1189 #define ER_MASTER_NET_READ 1189 /* no longer in use !? */
#define ER_MASTER_NET_WRITE 1190 #define ER_MASTER_NET_WRITE 1190 /* no longer in use !? */
#define ER_FT_MATCHING_KEY_NOT_FOUND 1191 #define ER_FT_MATCHING_KEY_NOT_FOUND 1191
#define ER_LOCK_OR_ACTIVE_TRANSACTION 1192 #define ER_LOCK_OR_ACTIVE_TRANSACTION 1192
#define ER_UNKNOWN_SYSTEM_VARIABLE 1193 #define ER_UNKNOWN_SYSTEM_VARIABLE 1193
#define ER_CRASHED_ON_USAGE 1194 #define ER_CRASHED_ON_USAGE 1194
#define ER_CRASHED_ON_REPAIR 1195 #define ER_CRASHED_ON_REPAIR 1195
#define ER_WARNING_NOT_COMPLETE_ROLLBACK 1196 #define ER_WARNING_NOT_COMPLETE_ROLLBACK 1196
#define ER_TRANS_CACHE_FULL 1197 #define ER_TRANS_CACHE_FULL 1197
#define ER_SLAVE_MUST_STOP 1198 #define ER_SLAVE_MUST_STOP 1198
#define ER_SLAVE_NOT_RUNNING 1199 #define ER_SLAVE_NOT_RUNNING 1199
#define ER_BAD_SLAVE 1200 #define ER_BAD_SLAVE 1200
#define ER_MASTER_INFO 1201 #define ER_MASTER_INFO 1201
#define ER_SLAVE_THREAD 1202 #define ER_SLAVE_THREAD 1202
#define ER_TOO_MANY_USER_CONNECTIONS 1203 #define ER_TOO_MANY_USER_CONNECTIONS 1203
#define ER_SET_CONSTANTS_ONLY 1204 #define ER_SET_CONSTANTS_ONLY 1204
#define ER_LOCK_WAIT_TIMEOUT 1205 #define ER_LOCK_WAIT_TIMEOUT 1205
#define ER_LOCK_TABLE_FULL 1206 #define ER_LOCK_TABLE_FULL 1206
#define ER_READ_ONLY_TRANSACTION 1207 #define ER_READ_ONLY_TRANSACTION 1207
#define ER_DROP_DB_WITH_READ_LOCK 1208 #define ER_DROP_DB_WITH_READ_LOCK 1208 /* no longer in use !? */
#define ER_CREATE_DB_WITH_READ_LOCK 1209 #define ER_CREATE_DB_WITH_READ_LOCK 1209 /* no longer in use !? */
#define ER_WRONG_ARGUMENTS 1210 #define ER_WRONG_ARGUMENTS 1210
#define ER_NO_PERMISSION_TO_CREATE_USER 1211 #define ER_NO_PERMISSION_TO_CREATE_USER 1211 /* no longer in use !? */
#define ER_UNION_TABLES_IN_DIFFERENT_DIR 1212 #define ER_UNION_TABLES_IN_DIFFERENT_DIR 1212 /* no longer in use !? */
#define ER_LOCK_DEADLOCK 1213 #define ER_LOCK_DEADLOCK 1213
#define ER_TABLE_CANT_HANDLE_FULLTEXT 1214 #define ER_TABLE_CANT_HANDLE_FULLTEXT 1214 /* no longer in use !? */
#define ER_CANNOT_ADD_FOREIGN 1215 #define ER_CANNOT_ADD_FOREIGN 1215
#define ER_NO_REFERENCED_ROW 1216 #define ER_NO_REFERENCED_ROW 1216
#define ER_ROW_IS_REFERENCED 1217 #define ER_ROW_IS_REFERENCED 1217
#define ER_ERROR_MESSAGES 218
/* new server messages (added after 3.23.49) */
#define ER_CONNECT_TO_MASTER 1218 /* no longer in use !? */
#define ER_QUERY_ON_MASTER 1219 /* no longer in use !? */
#define ER_ERROR_WHEN_EXECUTING_COMMAND 1220
#define ER_WRONG_USAGE 1221
#define ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT 1222
#define ER_CANT_UPDATE_WITH_READLOCK 1223 /* no longer in use !? */
#define ER_MIXING_NOT_ALLOWED 1224 /* no longer in use !? */
#define ER_DUP_ARGUMENT 1225
#define ER_USER_LIMIT_REACHED 1226
#define ER_SPECIFIC_ACCESS_DENIED_ERROR 1227
#define ER_LOCAL_VARIABLE 1228
#define ER_GLOBAL_VARIABLE 1229
#define ER_NO_DEFAULT 1230
#define ER_WRONG_VALUE_FOR_VAR 1231
#define ER_WRONG_TYPE_FOR_VAR 1232
#define ER_VAR_CANT_BE_READ 1233
#define ER_CANT_USE_OPTION_HERE 1234
#define ER_NOT_SUPPORTED_YET 1235
#define ER_MASTER_FATAL_ERROR_READING_BINLOG 1236
#define ER_SLAVE_IGNORED_TABLE 1237
#define ER_INCORRECT_GLOBAL_LOCAL_VAR 1238
#define ER_WRONG_FK_DEF 1239
#define ER_KEY_REF_DO_NOT_MATCH_TABLE_REF 1240
#define ER_OPERAND_COLUMNS 1241
#define ER_SUBQUERY_NO_1_ROW 1242
#define ER_UNKNOWN_STMT_HANDLER 1243
#define ER_CORRUPT_HELP_DB 1244
#define ER_CYCLIC_REFERENCE 1245 /* no longer in use ?! */
#define ER_AUTO_CONVERT 1246
#define ER_ILLEGAL_REFERENCE 1247
#define ER_DERIVED_MUST_HAVE_ALIAS 1248
#define ER_SELECT_REDUCED 1249
#define ER_TABLENAME_NOT_ALLOWED_HERE 1250
#define ER_NOT_SUPPORTED_AUTH_MODE 1251
#define ER_SPATIAL_CANT_HAVE_NULL 1252
#define ER_COLLATION_CHARSET_MISMATCH 1253
#define ER_SLAVE_WAS_RUNNING 1254
#define ER_SLAVE_WAS_NOT_RUNNING 1255
#define ER_TOO_BIG_FOR_UNCOMPRESS 1256
#define ER_ZLIB_Z_MEM_ERROR 1257
#define ER_ZLIB_Z_BUF_ERROR 1258
#define ER_ZLIB_Z_DATA_ERROR 1259
#define ER_CUT_VALUE_GROUP_CONCAT 1260
#define ER_WARN_TOO_FEW_RECORDS 1261
#define ER_WARN_TOO_MANY_RECORDS 1262
#define ER_WARN_NULL_TO_NOTNULL 1263
#define ER_WARN_DATA_OUT_OF_RANGE 1264
#define WARN_DATA_TRUNCATED 1265
#define ER_WARN_USING_OTHER_HANDLER 1266
#define ER_CANT_AGGREGATE_2COLLATIONS 1267
#define ER_DROP_USER 1268 /* no longer in use ?! */
#define ER_REVOKE_GRANTS 1269
#define ER_CANT_AGGREGATE_3COLLATIONS 1270
#define ER_CANT_AGGREGATE_NCOLLATIONS 1271
#define ER_VARIABLE_IS_NOT_STRUCT 1272
#define ER_UNKNOWN_COLLATION 1273
#define ER_SLAVE_IGNORED_SSL_PARAMS 1274
#define ER_SERVER_IS_IN_SECURE_AUTH_MODE 1275
#define ER_WARN_FIELD_RESOLVED 1276
#define ER_BAD_SLAVE_UNTIL_COND 1277
#define ER_MISSING_SKIP_SLAVE 1278
#define ER_UNTIL_COND_IGNORED 1279
#define ER_WRONG_NAME_FOR_INDEX 1280
#define ER_WRONG_NAME_FOR_CATALOG 1281 /* no longer in use ?! */
#define ER_WARN_QC_RESIZE 1282
#define ER_BAD_FT_COLUMN 1283
#define ER_UNKNOWN_KEY_CACHE 1284
#define ER_WARN_HOSTNAME_WONT_WORK 1285
#define ER_UNKNOWN_STORAGE_ENGINE 1286
#define ER_WARN_DEPRECATED_SYNTAX 1287
#define ER_NON_UPDATABLE_TABLE 1288
#define ER_FEATURE_DISABLED 1289
#define ER_OPTION_PREVENTS_STATEMENT 1290
#define ER_DUPLICATED_VALUE_IN_TYPE 1291
#define ER_TRUNCATED_WRONG_VALUE 1292
#define ER_TOO_MUCH_AUTO_TIMESTAMP_COLS 1293
#define ER_INVALID_ON_UPDATE 1294
#define ER_UNSUPPORTED_PS 1295
#define ER_GET_ERRMSG 1296
#define ER_GET_TEMPORARY_ERRMSG 1297
#define ER_UNKNOWN_TIME_ZONE 1298
#define ER_WARN_INVALID_TIMESTAMP 1299
#define ER_INVALID_CHARACTER_STRING 1300
#define ER_WARN_ALLOWED_PACKET_OVERFLOWED 1301
#define ER_CONFLICTING_DECLARATIONS 1302
#define ER_SP_NO_RECURSIVE_CREATE 1303
#define ER_SP_ALREADY_EXISTS 1304
#define ER_SP_DOES_NOT_EXIST 1305
#define ER_SP_DROP_FAILED 1306
#define ER_SP_STORE_FAILED 1307
#define ER_SP_LILABEL_MISMATCH 1308
#define ER_SP_LABEL_REDEFINE 1309
#define ER_SP_LABEL_MISMATCH 1310
#define ER_SP_UNINIT_VAR 1311 /* no longer in use ?! */
#define ER_SP_BADSELECT 1312
#define ER_SP_BADRETURN 1313
#define ER_SP_BADSTATEMENT 1314
#define ER_UPDATE_LOG_DEPRECATED_IGNORED 1315 /* no longer in use ?! */
#define ER_UPDATE_LOG_DEPRECATED_TRANSLATED 1316 /* no longer in use ?! */
#define ER_QUERY_INTERRUPTED 1317
#define ER_SP_WRONG_NO_OF_ARGS 1318
#define ER_SP_COND_MISMATCH 1319
#define ER_SP_NORETURN 1320
#define ER_SP_NORETURNEND 1321
#define ER_SP_BAD_CURSOR_QUERY 1322
#define ER_SP_BAD_CURSOR_SELECT 1323
#define ER_SP_CURSOR_MISMATCH 1324
#define ER_SP_CURSOR_ALREADY_OPEN 1325
#define ER_SP_CURSOR_NOT_OPEN 1326
#define ER_SP_UNDECLARED_VAR 1327
#define ER_SP_WRONG_NO_OF_FETCH_ARGS 1328
#define ER_SP_FETCH_NO_DATA 1329
#define ER_SP_DUP_PARAM 1330
#define ER_SP_DUP_VAR 1331
#define ER_SP_DUP_COND 1332
#define ER_SP_DUP_CURS 1333
#define ER_SP_CANT_ALTER 1334
#define ER_SP_SUBSELECT_NYI 1335 /* no longer in use ?! */
#define ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG 1336 /* no longer in use ?! */
#define ER_SP_VARCOND_AFTER_CURSHNDLR 1337
#define ER_SP_CURSOR_AFTER_HANDLER 1338
#define ER_SP_CASE_NOT_FOUND 1339
#define ER_FPARSER_TOO_BIG_FILE 1340
#define ER_FPARSER_BAD_HEADER 1341
#define ER_FPARSER_EOF_IN_COMMENT 1342
#define ER_FPARSER_ERROR_IN_PARAMETER 1343
#define ER_FPARSER_EOF_IN_UNKNOWN_PARAMETER 1344
#define ER_VIEW_NO_EXPLAIN 1345
#define ER_FRM_UNKNOWN_TYPE 1346
#define ER_WRONG_OBJECT 1347
#define ER_NONUPDATEABLE_COLUMN 1348
#define ER_VIEW_SELECT_DERIVED 1349
#define ER_VIEW_SELECT_CLAUSE 1350
#define ER_VIEW_SELECT_VARIABLE 1351
#define ER_VIEW_SELECT_TMPTABLE 1352
#define ER_VIEW_WRONG_LIST 1353
#define ER_WARN_VIEW_MERGE 1354
#define ER_WARN_VIEW_WITHOUT_KEY 1355
#define ER_VIEW_INVALID 1356
#define ER_SP_NO_DROP_SP 1357
#define ER_SP_GOTO_IN_HNDLR 1358 /* no longer in use ?! */
#define ER_TRG_ALREADY_EXISTS 1359
#define ER_TRG_DOES_NOT_EXIST 1360
#define ER_TRG_ON_VIEW_OR_TEMP_TABLE 1361
#define ER_TRG_CANT_CHANGE_ROW 1362
#define ER_TRG_NO_SUCH_ROW_IN_TRG 1363
#define ER_NO_DEFAULT_FOR_FIELD 1364
#define ER_DIVISION_BY_ZERO 1365
#define ER_TRUNCATED_WRONG_VALUE_FOR_FIELD 1366
#define ER_ILLEGAL_VALUE_FOR_TYPE 1367
#define ER_VIEW_NONUPD_CHECK 1368
#define ER_VIEW_CHECK_FAILED 1369
#define ER_PROCACCESS_DENIED_ERROR 1370
#define ER_RELAY_LOG_FAIL 1371
#define ER_PASSWD_LENGTH 1372
#define ER_UNKNOWN_TARGET_BINLOG 1373
#define ER_IO_ERR_LOG_INDEX_READ 1374
#define ER_BINLOG_PURGE_PROHIBITED 1375
#define ER_FSEEK_FAIL 1376
#define ER_BINLOG_PURGE_FATAL_ERR 1377
#define ER_LOG_IN_USE 1378
#define ER_LOG_PURGE_UNKNOWN_ERR 1379
#define ER_RELAY_LOG_INIT 1380
#define ER_NO_BINARY_LOGGING 1381
#define ER_RESERVED_SYNTAX 1382
#define ER_WSAS_FAILED 1383 /* no longer in use ?! */
#define ER_DIFF_GROUPS_PROC 1384
#define ER_NO_GROUP_FOR_PROC 1385 /* no longer in use ?! */
#define ER_ORDER_WITH_PROC 1386
#define ER_LOGGING_PROHIBIT_CHANGING_OF 1387 /* no longer in use ?! */
#define ER_NO_FILE_MAPPING 1388 /* no longer in use ?! */
#define ER_WRONG_MAGIC 1389 /* no longer in use ?! */
#define ER_PS_MANY_PARAM 1390
#define ER_KEY_PART_0 1391
#define ER_VIEW_CHECKSUM 1392
#define ER_VIEW_MULTIUPDATE 1393
#define ER_VIEW_NO_INSERT_FIELD_LIST 1394
#define ER_VIEW_DELETE_MERGE_VIEW 1395
#define ER_CANNOT_USER 1396
#define ER_XAER_NOTA 1397
#define ER_XAER_INVAL 1398
#define ER_XAER_RMFAIL 1399
#define ER_XAER_OUTSIDE 1400
#define ER_XAER_RMERR 1401
#define ER_XA_RBROLLBACK 1402
#define ER_NONEXISTING_PROC_GRANT 1403
#define ER_PROC_AUTO_GRANT_FAIL 1404
#define ER_PROC_AUTO_REVOKE_FAIL 1405
#define ER_DATA_TOO_LONG 1406
#define ER_SP_BAD_SQLSTATE 1407
#define ER_STARTUP 1408
#define ER_LOAD_FROM_FIXED_SIZE_ROWS_TO_VAR 1409
#define ER_CANT_CREATE_USER_WITH_GRANT 1410
#define ER_WRONG_VALUE_FOR_TYPE 1411
#define ER_TABLE_DEF_CHANGED 1412
#define ER_SP_DUP_HANDLER 1413
#define ER_SP_NOT_VAR_ARG 1414
#define ER_SP_NO_RETSET 1415 /* no longer in use ?! */
#define ER_CANT_CREATE_GEOMETRY_OBJECT 1416
#define ER_FAILED_ROUTINE_BREAK_BINLOG 1417 /* no longer in use ?! */
#define ER_BINLOG_UNSAFE_ROUTINE 1418
#define ER_BINLOG_CREATE_ROUTINE_NEED_SUPER 1419
#define ER_EXEC_STMT_WITH_OPEN_CURSOR 1420 /* no longer in use ?! */
#define ER_STMT_HAS_NO_OPEN_CURSOR 1421
#define ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG 1422
#define ER_NO_DEFAULT_FOR_VIEW_FIELD 1423
#define ER_SP_NO_RECURSION 1424
#define ER_TOO_BIG_SCALE 1425
#define ER_TOO_BIG_PRECISION 1426
#define ER_M_BIGGER_THAN_D 1427
#define ER_WRONG_LOCK_OF_SYSTEM_TABLE 1428
#define ER_CONNECT_TO_FOREIGN_DATA_SOURCE 1429
#define ER_QUERY_ON_FOREIGN_DATA_SOURCE 1430
#define ER_FOREIGN_DATA_SOURCE_DOESNT_EXIST 1431
#define ER_FOREIGN_DATA_STRING_INVALID_CANT_CREATE 1432
#define ER_FOREIGN_DATA_STRING_INVALID 1433
#define ER_CANT_CREATE_FEDERATED_TABLE 1434
#define ER_TRG_IN_WRONG_SCHEMA 1435
#define ER_STACK_OVERRUN_NEED_MORE 1436
#define ER_TOO_LONG_BODY 1437
#define ER_WARN_CANT_DROP_DEFAULT_KEYCACHE 1438 /* no longer in use ?! */
#define ER_TOO_BIG_DISPLAYWIDTH 1439
#define ER_XAER_DUPID 1440
#define ER_DATETIME_FUNCTION_OVERFLOW 1441
#define ER_CANT_UPDATE_USED_TABLE_IN_SF_OR_TRG 1442
#define ER_VIEW_PREVENT_UPDATE 1443
#define ER_PS_NO_RECURSION 1444
#define ER_SP_CANT_SET_AUTOCOMMIT 1445 /* no longer in use ?! */
#define ER_MALFORMED_DEFINER 1446 /* no longer in use ?! */
#define ER_VIEW_FRM_NO_USER 1447
#define ER_VIEW_OTHER_USER 1448 /* no longer in use ?! */
#define ER_NO_SUCH_USER 1449
#define ER_FORBID_SCHEMA_CHANGE 1450
#define ER_ROW_IS_REFERENCED_2 1451
#define ER_NO_REFERENCED_ROW_2 1452
#define ER_SP_BAD_VAR_SHADOW 1453
#define ER_TRG_NO_DEFINER 1454
#define ER_OLD_FILE_FORMAT 1455
#define ER_SP_RECURSION_LIMIT 1456
#define ER_SP_PROC_TABLE_CORRUPT 1457
#define ER_SP_WRONG_NAME 1458
#define ER_TABLE_NEEDS_UPGRADE 1459
#define ER_SP_NO_AGGREGATE 1460 /* no longer in use ?! */
#define ER_MAX_PREPARED_STMT_COUNT_REACHED 1461
#define ER_VIEW_RECURSIVE 1462
#define ER_NON_GROUPING_FIELD_USED 1463
#define ER_TABLE_CANT_HANDLE_SPKEYS 1464
#define ER_NO_TRIGGERS_ON_SYSTEM_SCHEMA 1465
#define ER_REMOVED_SPACES 1466
#define ER_AUTOINC_READ_FAILED 1467
#define ER_USERNAME 1468
#define ER_HOSTNAME 1469
#define ER_WRONG_STRING_LENGTH 1470
#define ER_NON_INSERTABLE_TABLE 1471
#define ER_ADMIN_WRONG_MRG_TABLE 1472
#define ER_TOO_HIGH_LEVEL_OF_NESTING_FOR_SELECT 1473
#define ER_NAME_BECOMES_EMPTY 1474
#define ER_AMBIGUOUS_FIELD_TERM 1475
#define ER_FOREIGN_SERVER_EXISTS 1476
#define ER_FOREIGN_SERVER_DOESNT_EXIST 1477
#define ER_ILLEGAL_HA_CREATE_OPTION 1478
#define ER_PARTITION_REQUIRES_VALUES_ERROR 1479
#define ER_PARTITION_WRONG_VALUES_ERROR 1480
#define ER_PARTITION_MAXVALUE_ERROR 1481
#define ER_PARTITION_SUBPARTITION_ERROR 1482 /* no longer in use ?! */
#define ER_PARTITION_SUBPART_MIX_ERROR 1483 /* no longer in use ?! */
#define ER_PARTITION_WRONG_NO_PART_ERROR 1484
#define ER_PARTITION_WRONG_NO_SUBPART_ERROR 1485
#define ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR 1486
#define ER_NO_CONST_EXPR_IN_RANGE_OR_LIST_ERROR 1487 /* no longer in use ?!
*/
#define ER_FIELD_NOT_FOUND_PART_ERROR 1488
#define ER_LIST_OF_FIELDS_ONLY_IN_HASH_ERROR 1489 /* no longer in use ?! */
#define ER_INCONSISTENT_PARTITION_INFO_ERROR 1490
#define ER_PARTITION_FUNC_NOT_ALLOWED_ERROR 1491
#define ER_PARTITIONS_MUST_BE_DEFINED_ERROR 1492
#define ER_RANGE_NOT_INCREASING_ERROR 1493
#define ER_INCONSISTENT_TYPE_OF_FUNCTIONS_ERROR 1494 /* no longer in use ?!
*/
#define ER_MULTIPLE_DEF_CONST_IN_LIST_PART_ERROR 1495
#define ER_PARTITION_ENTRY_ERROR 1496
#define ER_MIX_HANDLER_ERROR 1497
#define ER_PARTITION_NOT_DEFINED_ERROR 1498
#define ER_TOO_MANY_PARTITIONS_ERROR 1499
#define ER_SUBPARTITION_ERROR 1500
#define ER_CANT_CREATE_HANDLER_FILE 1501
#define ER_BLOB_FIELD_IN_PART_FUNC_ERROR 1502
#define ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF 1503
#define ER_NO_PARTS_ERROR 1504
#define ER_PARTITION_MGMT_ON_NONPARTITIONED 1505
#define ER_FOREIGN_KEY_ON_PARTITIONED 1506
#define ER_DROP_PARTITION_NON_EXISTENT 1507
#define ER_DROP_LAST_PARTITION 1508
#define ER_COALESCE_ONLY_ON_HASH_PARTITION 1509
#define ER_REORG_HASH_ONLY_ON_SAME_NO 1510
#define ER_REORG_NO_PARAM_ERROR 1511
#define ER_ONLY_ON_RANGE_LIST_PARTITION 1512
#define ER_ADD_PARTITION_SUBPART_ERROR 1513
#define ER_ADD_PARTITION_NO_NEW_PARTITION 1514
#define ER_COALESCE_PARTITION_NO_PARTITION 1515
#define ER_REORG_PARTITION_NOT_EXIST 1516
#define ER_SAME_NAME_PARTITION 1517
#define ER_NO_BINLOG_ERROR 1518
#define ER_CONSECUTIVE_REORG_PARTITIONS 1519
#define ER_REORG_OUTSIDE_RANGE 1520
#define ER_PARTITION_FUNCTION_FAILURE 1521
#define ER_PART_STATE_ERROR 1522 /* no longer in use ?! */
#define ER_LIMITED_PART_RANGE 1523
#define ER_PLUGIN_IS_NOT_LOADED 1524
#define ER_WRONG_VALUE 1525
#define ER_NO_PARTITION_FOR_GIVEN_VALUE 1526
#define ER_FILEGROUP_OPTION_ONLY_ONCE 1527
#define ER_CREATE_FILEGROUP_FAILED 1528
#define ER_DROP_FILEGROUP_FAILED 1529
#define ER_TABLESPACE_AUTO_EXTEND_ERROR 1530
#define ER_WRONG_SIZE_NUMBER 1531
#define ER_SIZE_OVERFLOW_ERROR 1532
#define ER_ALTER_FILEGROUP_FAILED 1533
#define ER_BINLOG_ROW_LOGGING_FAILED 1534
#define ER_BINLOG_ROW_WRONG_TABLE_DEF 1535 /* no longer in use ?! */
#define ER_BINLOG_ROW_RBR_TO_SBR 1536 /* no longer in use ?! */
#define ER_EVENT_ALREADY_EXISTS 1537
#define ER_EVENT_STORE_FAILED 1538
#define ER_EVENT_DOES_NOT_EXIST 1539
#define ER_EVENT_CANT_ALTER 1540 /* no longer in use ?! */
#define ER_EVENT_DROP_FAILED 1541 /* no longer in use ?! */
#define ER_EVENT_INTERVAL_NOT_POSITIVE_OR_TOO_BIG 1542
#define ER_EVENT_ENDS_BEFORE_STARTS 1543
#define ER_EVENT_EXEC_TIME_IN_THE_PAST 1544
#define ER_EVENT_OPEN_TABLE_FAILED 1545
#define ER_EVENT_NEITHER_M_EXPR_NOR_M_AT 1546 /* no longer in use ?! */
#define ER_COL_COUNT_DOESNT_MATCH_CORRUPTED 1547
#define ER_CANNOT_LOAD_FROM_TABLE 1548
#define ER_EVENT_CANNOT_DELETE 1549 /* no longer in use ?! */
#define ER_EVENT_COMPILE_ERROR 1550 /* no longer in use ?! */
#define ER_EVENT_SAME_NAME 1551
#define ER_EVENT_DATA_TOO_LONG 1552
#define ER_DROP_INDEX_FK 1553
#define ER_WARN_DEPRECATED_SYNTAX_WITH_VER 1554 /* no longer in use ?! */
#define ER_CANT_WRITE_LOCK_LOG_TABLE 1555 /* no longer in use ?! */
#define ER_CANT_LOCK_LOG_TABLE 1556
#define ER_FOREIGN_DUPLICATE_KEY 1557
#define ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE 1558
#define ER_TEMP_TABLE_PREVENTS_SWITCH_OUT_OF_RBR 1559
#define ER_STORED_FUNCTION_PREVENTS_SWITCH_BINLOG_FORMAT 1560
#define ER_NDB_CANT_SWITCH_BINLOG_FORMAT 1561 /* no longer in use ?! */
#define ER_PARTITION_NO_TEMPORARY 1562
#define ER_PARTITION_CONST_DOMAIN_ERROR 1563
#define ER_PARTITION_FUNCTION_IS_NOT_ALLOWED 1564
#define ER_DDL_LOG_ERROR 1565
#define ER_NULL_IN_VALUES_LESS_THAN 1566
#define ER_WRONG_PARTITION_NAME 1567
#define ER_CANT_CHANGE_TX_ISOLATION 1568 /* no longer in use ?! */
#define ER_DUP_ENTRY_AUTOINCREMENT_CASE 1569
#define ER_EVENT_MODIFY_QUEUE_ERROR 1570 /* no longer in use ?! */
#define ER_EVENT_SET_VAR_ERROR 1571
#define ER_PARTITION_MERGE_ERROR 1572
#define ER_CANT_ACTIVATE_LOG 1573 /* no longer in use ?! */
#define ER_RBR_NOT_AVAILABLE 1574 /* no longer in use ?! */
#define ER_BASE64_DECODE_ERROR 1575
#define ER_EVENT_RECURSION_FORBIDDEN 1576
#define ER_EVENTS_DB_ERROR 1577
#define ER_ONLY_INTEGERS_ALLOWED 1578
#define ER_UNSUPORTED_LOG_ENGINE 1579
#define ER_BAD_LOG_STATEMENT 1580
#define ER_CANT_RENAME_LOG_TABLE 1581
#define ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT 1582
#define ER_WRONG_PARAMETERS_TO_NATIVE_FCT 1583
#define ER_WRONG_PARAMETERS_TO_STORED_FCT 1584
#define ER_NATIVE_FCT_NAME_COLLISION 1585
#define ER_DUP_ENTRY_WITH_KEY_NAME 1586
#define ER_BINLOG_PURGE_EMFILE 1587
#define ER_EVENT_CANNOT_CREATE_IN_THE_PAST 1588
#define ER_EVENT_CANNOT_ALTER_IN_THE_PAST 1589
#define ER_SLAVE_INCIDENT 1590
#define ER_NO_PARTITION_FOR_GIVEN_VALUE_SILENT 1591
#define ER_BINLOG_UNSAFE_STATEMENT 1592
#define ER_SLAVE_FATAL_ERROR 1593
#define ER_SLAVE_RELAY_LOG_READ_FAILURE 1594
#define ER_SLAVE_RELAY_LOG_WRITE_FAILURE 1595
#define ER_SLAVE_CREATE_EVENT_FAILURE 1596
#define ER_SLAVE_MASTER_COM_FAILURE 1597
#define ER_BINLOG_LOGGING_IMPOSSIBLE 1598
#define ER_VIEW_NO_CREATION_CTX 1599
#define ER_VIEW_INVALID_CREATION_CTX 1600
#define ER_SR_INVALID_CREATION_CTX 1601
#define ER_TRG_CORRUPTED_FILE 1602
#define ER_TRG_NO_CREATION_CTX 1603
#define ER_TRG_INVALID_CREATION_CTX 1604
#define ER_EVENT_INVALID_CREATION_CTX 1605
#define ER_TRG_CANT_OPEN_TABLE 1606
#define ER_CANT_CREATE_SROUTINE 1607
#define ER_NEVER_USED 1608 /* no longer in use ?! */
#define ER_NO_FORMAT_DESCRIPTION_EVENT_BEFORE_BINLOG_STATEMENT 1609
#define ER_SLAVE_CORRUPT_EVENT 1610
#define ER_LOAD_DATA_INVALID_COLUMN 1611
#define ER_LOG_PURGE_NO_FILE 1612
#define ER_XA_RBTIMEOUT 1613
#define ER_XA_RBDEADLOCK 1614
#define ER_NEED_REPREPARE 1615
#define ER_DELAYED_NOT_SUPPORTED 1616
#define WARN_NO_MASTER_INFO 1617
#define WARN_OPTION_IGNORED 1618
#define WARN_PLUGIN_DELETE_BUILTIN 1619
#define WARN_PLUGIN_BUSY 1620
#define ER_VARIABLE_IS_READONLY 1621
#define ER_WARN_ENGINE_TRANSACTION_ROLLBACK 1622 /* no longer in use ?! */
#define ER_SLAVE_HEARTBEAT_FAILURE 1623
#define ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE 1624
#define ER_NDB_REPLICATION_SCHEMA_ERROR 1625 /* no longer in use ?! */
#define ER_CONFLICT_FN_PARSE_ERROR 1626 /* no longer in use ?! */
#define ER_EXCEPTIONS_WRITE_ERROR 1627 /* no longer in use ?! */
#define ER_TOO_LONG_TABLE_COMMENT 1628
#define ER_TOO_LONG_FIELD_COMMENT 1629
#define ER_FUNC_INEXISTENT_NAME_COLLISION 1630
#define ER_DATABASE_NAME 1631
#define ER_TABLE_NAME 1632
#define ER_PARTITION_NAME 1633
#define ER_SUBPARTITION_NAME 1634
#define ER_TEMPORARY_NAME 1635
#define ER_RENAMED_NAME 1636
#define ER_TOO_MANY_CONCURRENT_TRXS 1637
#define WARN_NON_ASCII_SEPARATOR_NOT_IMPLEMENTED 1638
#define ER_DEBUG_SYNC_TIMEOUT 1639
#define ER_DEBUG_SYNC_HIT_LIMIT 1640
#define ER_DUP_SIGNAL_SET 1641
#define ER_SIGNAL_WARN 1642
#define ER_SIGNAL_NOT_FOUND 1643
#define ER_SIGNAL_EXCEPTION 1644
#define ER_RESIGNAL_WITHOUT_ACTIVE_HANDLER 1645
#define ER_SIGNAL_BAD_CONDITION_TYPE 1646
#define WARN_COND_ITEM_TRUNCATED 1647
#define ER_COND_ITEM_TOO_LONG 1648
#define ER_UNKNOWN_LOCALE 1649
#define ER_SLAVE_IGNORE_SERVER_IDS 1650
#define ER_QUERY_CACHE_DISABLED 1651
#define ER_SAME_NAME_PARTITION_FIELD 1652
#define ER_PARTITION_COLUMN_LIST_ERROR 1653
#define ER_WRONG_TYPE_COLUMN_VALUE_ERROR 1654
#define ER_TOO_MANY_PARTITION_FUNC_FIELDS_ERROR 1655
#define ER_MAXVALUE_IN_VALUES_IN 1656
#define ER_TOO_MANY_VALUES_ERROR 1657
#define ER_ROW_SINGLE_PARTITION_FIELD_ERROR 1658
#define ER_FIELD_TYPE_NOT_ALLOWED_AS_PARTITION_FIELD 1659
#define ER_PARTITION_FIELDS_TOO_LONG 1660
#define ER_BINLOG_ROW_ENGINE_AND_STMT_ENGINE 1661
#define ER_BINLOG_ROW_MODE_AND_STMT_ENGINE 1662
#define ER_BINLOG_UNSAFE_AND_STMT_ENGINE 1663
#define ER_BINLOG_ROW_INJECTION_AND_STMT_ENGINE 1664
#define ER_BINLOG_STMT_MODE_AND_ROW_ENGINE 1665
#define ER_BINLOG_ROW_INJECTION_AND_STMT_MODE 1666
#define ER_BINLOG_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE 1667
#define ER_BINLOG_UNSAFE_LIMIT 1668
#define ER_BINLOG_UNSAFE_INSERT_DELAYED 1669
#define ER_BINLOG_UNSAFE_SYSTEM_TABLE 1670
#define ER_BINLOG_UNSAFE_AUTOINC_COLUMNS 1671
#define ER_BINLOG_UNSAFE_UDF 1672
#define ER_BINLOG_UNSAFE_SYSTEM_VARIABLE 1673
#define ER_BINLOG_UNSAFE_SYSTEM_FUNCTION 1674
#define ER_BINLOG_UNSAFE_NONTRANS_AFTER_TRANS 1675
#define ER_MESSAGE_AND_STATEMENT 1676
#define ER_SLAVE_CONVERSION_FAILED 1677
#define ER_SLAVE_CANT_CREATE_CONVERSION 1678
#define ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_FORMAT 1679
#define ER_PATH_LENGTH 1680
#define ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT 1681
#define ER_WRONG_NATIVE_TABLE_STRUCTURE 1682
#define ER_WRONG_PERFSCHEMA_USAGE 1683
#define ER_WARN_I_S_SKIPPED_TABLE 1684
#define ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_DIRECT 1685
#define ER_STORED_FUNCTION_PREVENTS_SWITCH_BINLOG_DIRECT 1686
#define ER_SPATIAL_MUST_HAVE_GEOM_COL 1687 /* no longer in use ?! */
#define ER_TOO_LONG_INDEX_COMMENT 1688
#define ER_LOCK_ABORTED 1689
#define ER_DATA_OUT_OF_RANGE 1690 /* no longer in use ?! */
#define ER_WRONG_SPVAR_TYPE_IN_LIMIT 1691
#define ER_BINLOG_UNSAFE_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE 1692
#define ER_BINLOG_UNSAFE_MIXED_STATEMENT 1693
#define ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_SQL_LOG_BIN 1694
#define ER_STORED_FUNCTION_PREVENTS_SWITCH_SQL_LOG_BIN 1695
#define ER_FAILED_READ_FROM_PAR_FILE 1696
#define ER_VALUES_IS_NOT_INT_TYPE_ERROR 1697
#define ER_ACCESS_DENIED_NO_PASSWORD_ERROR 1698
#define ER_SET_PASSWORD_AUTH_PLUGIN 1699
#define ER_GRANT_PLUGIN_USER_EXISTS 1700
#define ER_TRUNCATE_ILLEGAL_FK 1701
#define ER_PLUGIN_IS_PERMANENT 1702
#define ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE_MIN 1703
#define ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE_MAX 1704
#define ER_STMT_CACHE_FULL 1705
#define ER_MULTI_UPDATE_KEY_CONFLICT 1706
#define ER_TABLE_NEEDS_REBUILD 1707
#define WARN_OPTION_BELOW_LIMIT 1708
#define ER_INDEX_COLUMN_TOO_LONG 1709
#define ER_ERROR_IN_TRIGGER_BODY 1710
#define ER_ERROR_IN_UNKNOWN_TRIGGER_BODY 1711
#define ER_INDEX_CORRUPT 1712
#define ER_UNDO_RECORD_TOO_BIG 1713
#define ER_BINLOG_UNSAFE_INSERT_IGNORE_SELECT 1714
#define ER_BINLOG_UNSAFE_INSERT_SELECT_UPDATE 1715
#define ER_BINLOG_UNSAFE_REPLACE_SELECT 1716
#define ER_BINLOG_UNSAFE_CREATE_IGNORE_SELECT 1717
#define ER_BINLOG_UNSAFE_CREATE_REPLACE_SELECT 1718
#define ER_BINLOG_UNSAFE_UPDATE_IGNORE 1719
#define ER_PLUGIN_NO_UNINSTALL 1720 /* no longer in use ?! */
#define ER_PLUGIN_NO_INSTALL 1721 /* no longer in use ?! */
#define ER_BINLOG_UNSAFE_WRITE_AUTOINC_SELECT 1722
#define ER_BINLOG_UNSAFE_CREATE_SELECT_AUTOINC 1723
#define ER_BINLOG_UNSAFE_INSERT_TWO_KEYS 1724
#define ER_TABLE_IN_FK_CHECK 1725
#define ER_UNUSED_1 1726 /* not in use ?! */
#define ER_BINLOG_UNSAFE_AUTOINC_NOT_FIRST 1727
#define ER_LAST_MYSQL_ERROR_MESSAGE 1728
/* MariaDB only errors */
#define ER_VCOL_BASED_ON_VCOL 1900
#define ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED 1901
#define ER_DATA_CONVERSION_ERROR_FOR_VIRTUAL_COLUMN 1902
#define ER_PRIMARY_KEY_BASED_ON_VIRTUAL_COLUMN 1903
#define ER_KEY_BASED_ON_GENERATED_VIRTUAL_COLUMN 1904
#define ER_WRONG_FK_OPTION_FOR_VIRTUAL_COLUMN 1905
#define ER_WARNING_NON_DEFAULT_VALUE_FOR_VIRTUAL_COLUMN 1906
#define ER_UNSUPPORTED_ACTION_ON_VIRTUAL_COLUMN 1907
#define ER_CONST_EXPR_IN_VCOL 1908
#define ER_ROW_EXPR_FOR_VCOL 1909
#define ER_UNSUPPORTED_ENGINE_FOR_VIRTUAL_COLUMNS 1910
#define ER_UNKNOWN_OPTION 1911
#define ER_BAD_OPTION_VALUE 1912
#define ER_NETWORK_READ_EVENT_CHECKSUM_FAILURE 1913
#define ER_BINLOG_READ_EVENT_CHECKSUM_FAILURE 1914
#define ER_CANT_DO_ONLINE 1915
#define ER_DATA_OVERFLOW 1916
#define ER_DATA_TRUNCATED 1917
#define ER_BAD_DATA 1918
#define ER_DYN_COL_WRONG_FORMAT 1919
#define ER_DYN_COL_IMPLEMENTATION_LIMIT 1920
#define ER_DYN_COL_DATA 1921
#define ER_DYN_COL_WRONG_CHARSET 1922
#define ER_ILLEGAL_SUBQUERY_OPTIMIZER_SWITCHES 1923
#define ER_QUERY_CACHE_IS_DISABLED 1924
#define ER_QUERY_CACHE_IS_GLOBALY_DISABLED 1925
#define ER_VIEW_ORDERBY_IGNORED 1926
#define ER_CONNECTION_KILLED 1927
#define ER_INTERNAL_ERROR 1928
#define ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_SKIP_REPLICATION 1929
#define ER_STORED_FUNCTION_PREVENTS_SWITCH_SKIP_REPLICATION 1930
#define ER_QUERY_EXCEEDED_ROWS_EXAMINED_LIMIT 1931
#define ER_NO_SUCH_TABLE_IN_ENGINE 1932
#define ER_GEOMETRY_SRID_MISMATCH 1933
#define ER_NO_SUCH_SPATIAL_REF_ID 1934
 End of changes. 23 change blocks. 
28 lines changed or deleted 29 lines changed or added


 mysys_err.h   mysys_err.h 
skipping to change at line 25 skipping to change at line 25
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA */ MA 02111-1307, USA */
#ifndef _mysys_err_h #ifndef _mysys_err_h
#define _mysys_err_h #define _mysys_err_h
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#define GLOB 0 /* Error maps */ #define GLOB 0 /* Error maps */
#define GLOBERRS 27 /* Max number of error messages in map's */ #define GLOBERRS EE_LASTERROR - EE_FIRSTERROR + 1 /* Max numbe
#define EE(X) globerrs[ X ] /* Defines to add error to right map */ r of error messages in map's */
#define EE(X) globerrs[ (X) - EE_FIRSTERROR ] /* Defines to add error to r
ight map */
extern const char * NEAR globerrs[]; /* my_error_messages is here */ extern const char * NEAR globerrs[]; /* my_error_messages is here */
/* Error message numbers in global map */ /* Error message numbers in global map
#define EE_FILENOTFOUND 0
#define EE_CANTCREATEFILE 1 */
#define EE_READ 2 #define EE_FIRSTERROR 1
#define EE_WRITE 3 #define EE_CANTCREATEFILE 1
#define EE_BADCLOSE 4 #define EE_READ 2
#define EE_OUTOFMEMORY 5 #define EE_WRITE 3
#define EE_DELETE 6 #define EE_BADCLOSE 4
#define EE_LINK 7 #define EE_OUTOFMEMORY 5
#define EE_EOFERR 9 #define EE_DELETE 6
#define EE_CANTLOCK 10 #define EE_LINK 7
#define EE_CANTUNLOCK 11 #define EE_EOFERR 9
#define EE_DIR 12 #define EE_CANTLOCK 10
#define EE_STAT 13 #define EE_CANTUNLOCK 11
#define EE_CANT_CHSIZE 14 #define EE_DIR 12
#define EE_CANT_OPEN_STREAM 15 #define EE_STAT 13
#define EE_GETWD 16 #define EE_CANT_CHSIZE 14
#define EE_SETWD 17 #define EE_CANT_OPEN_STREAM 15
#define EE_LINK_WARNING 18 #define EE_GETWD 16
#define EE_OPEN_WARNING 19 #define EE_SETWD 17
#define EE_DISK_FULL 20 #define EE_LINK_WARNING 18
#define EE_CANT_MKDIR 21 #define EE_OPEN_WARNING 19
#define EE_UNKNOWN_CHARSET 22 #define EE_DISK_FULL 20
#define EE_CANT_MKDIR 21
#define EE_UNKNOWN_CHARSET 22
#define EE_OUT_OF_FILERESOURCES 23 #define EE_OUT_OF_FILERESOURCES 23
#define EE_CANT_READLINK 24 #define EE_CANT_READLINK 24
#define EE_CANT_SYMLINK 25 #define EE_CANT_SYMLINK 25
#define EE_REALPATH 26 #define EE_REALPATH 26
#define EE_SYNC 27
#define EE_UNKNOWN_COLLATION 28
#define EE_FILENOTFOUND 29
#define EE_FILE_NOT_CLOSED 30
#define EE_CANT_CHMOD 31
#define EE_LASTERROR 31
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif
 End of changes. 3 change blocks. 
28 lines changed or deleted 38 lines changed or added


 plugin_auth.h   plugin_auth.h 
skipping to change at line 36 skipping to change at line 36
/** the max allowed length for a user name */ /** the max allowed length for a user name */
#define MYSQL_USERNAME_LENGTH 48 #define MYSQL_USERNAME_LENGTH 48
/** /**
return values of the plugin authenticate_user() method. return values of the plugin authenticate_user() method.
*/ */
/** /**
Authentication failed. Additionally, all other CR_xxx values Authentication failed. Additionally, all other CR_xxx values
(libmysql error code) can be used too. (libmariadb error code) can be used too.
The client plugin may set the error code and the error message directly The client plugin may set the error code and the error message directly
in the MYSQL structure and return CR_ERROR. If a CR_xxx specific error in the MYSQL structure and return CR_ERROR. If a CR_xxx specific error
code was returned, an error message in the MYSQL structure will be code was returned, an error message in the MYSQL structure will be
overwritten. If CR_ERROR is returned without setting the error in MYSQL, overwritten. If CR_ERROR is returned without setting the error in MYSQL,
CR_UNKNOWN_ERROR will be user. CR_UNKNOWN_ERROR will be user.
*/ */
#define CR_ERROR 0 #define CR_ERROR 0
/** /**
Authentication (client part) was successful. It does not mean that the Authentication (client part) was successful. It does not mean that the
authentication as a whole was successful, usually it only means authentication as a whole was successful, usually it only means
that the client was able to send the user name and the password to the that the client was able to send the user name and the password to the
server. If CR_OK is returned, the libmysql reads the next packet expectin g server. If CR_OK is returned, the libmariadb reads the next packet expect ing
it to be one of OK, ERROR, or CHANGE_PLUGIN packets. it to be one of OK, ERROR, or CHANGE_PLUGIN packets.
*/ */
#define CR_OK -1 #define CR_OK -1
/** /**
Authentication was successful. Authentication was successful.
It means that the client has done its part successfully and also that It means that the client has done its part successfully and also that
a plugin has read the last packet (one of OK, ERROR, CHANGE_PLUGIN). a plugin has read the last packet (one of OK, ERROR, CHANGE_PLUGIN).
In this case, libmysql will not read a packet from the server, In this case, libmariadb will not read a packet from the server,
but it will use the data at mysql->net.read_pos. but it will use the data at mysql->net.read_pos.
A plugin may return this value if the number of roundtrips in the A plugin may return this value if the number of roundtrips in the
authentication protocol is not known in advance, and the client plugin authentication protocol is not known in advance, and the client plugin
needs to read one packet more to determine if the authentication is finis hed needs to read one packet more to determine if the authentication is finis hed
or not. or not.
*/ */
#define CR_OK_HANDSHAKE_COMPLETE -2 #define CR_OK_HANDSHAKE_COMPLETE -2
typedef struct st_plugin_vio_info typedef struct st_plugin_vio_info
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 plugin_auth_common.h   plugin_auth_common.h 
skipping to change at line 36 skipping to change at line 36
/** the max allowed length for a user name */ /** the max allowed length for a user name */
#define MYSQL_USERNAME_LENGTH 48 #define MYSQL_USERNAME_LENGTH 48
/** /**
return values of the plugin authenticate_user() method. return values of the plugin authenticate_user() method.
*/ */
/** /**
Authentication failed. Additionally, all other CR_xxx values Authentication failed. Additionally, all other CR_xxx values
(libmysql error code) can be used too. (libmariadb error code) can be used too.
The client plugin may set the error code and the error message directly The client plugin may set the error code and the error message directly
in the MYSQL structure and return CR_ERROR. If a CR_xxx specific error in the MYSQL structure and return CR_ERROR. If a CR_xxx specific error
code was returned, an error message in the MYSQL structure will be code was returned, an error message in the MYSQL structure will be
overwritten. If CR_ERROR is returned without setting the error in MYSQL, overwritten. If CR_ERROR is returned without setting the error in MYSQL,
CR_UNKNOWN_ERROR will be user. CR_UNKNOWN_ERROR will be user.
*/ */
#define CR_ERROR 0 #define CR_ERROR 0
/** /**
Authentication (client part) was successful. It does not mean that the Authentication (client part) was successful. It does not mean that the
authentication as a whole was successful, usually it only means authentication as a whole was successful, usually it only means
that the client was able to send the user name and the password to the that the client was able to send the user name and the password to the
server. If CR_OK is returned, the libmysql reads the next packet expectin g server. If CR_OK is returned, the libmariadb reads the next packet expect ing
it to be one of OK, ERROR, or CHANGE_PLUGIN packets. it to be one of OK, ERROR, or CHANGE_PLUGIN packets.
*/ */
#define CR_OK -1 #define CR_OK -1
/** /**
Authentication was successful. Authentication was successful.
It means that the client has done its part successfully and also that It means that the client has done its part successfully and also that
a plugin has read the last packet (one of OK, ERROR, CHANGE_PLUGIN). a plugin has read the last packet (one of OK, ERROR, CHANGE_PLUGIN).
In this case, libmysql will not read a packet from the server, In this case, libmariadb will not read a packet from the server,
but it will use the data at mysql->net.read_pos. but it will use the data at mysql->net.read_pos.
A plugin may return this value if the number of roundtrips in the A plugin may return this value if the number of roundtrips in the
authentication protocol is not known in advance, and the client plugin authentication protocol is not known in advance, and the client plugin
needs to read one packet more to determine if the authentication is finis hed needs to read one packet more to determine if the authentication is finis hed
or not. or not.
*/ */
#define CR_OK_HANDSHAKE_COMPLETE -2 #define CR_OK_HANDSHAKE_COMPLETE -2
typedef struct st_plugin_vio_info typedef struct st_plugin_vio_info
{ {
enum { MYSQL_VIO_INVALID, MYSQL_VIO_TCP, MYSQL_VIO_SOCKET, enum { MYSQL_VIO_INVALID, MYSQL_VIO_TCP, MYSQL_VIO_SOCKET,
MYSQL_VIO_PIPE, MYSQL_VIO_MEMORY } protocol; MYSQL_VIO_PIPE, MYSQL_VIO_MEMORY } protocol;
#ifndef _WIN32
int socket; /**< it's set, if the protocol is SOCKET or TCP */ int socket; /**< it's set, if the protocol is SOCKET or TCP */
#ifdef _WIN32 #else
SOCKET socket; /**< it's set, if the protocol is SOCKET or TCP */
HANDLE handle; /**< it's set, if the protocol is PIPE or MEMORY */ HANDLE handle; /**< it's set, if the protocol is PIPE or MEMORY */
#endif #endif
} MYSQL_PLUGIN_VIO_INFO; } MYSQL_PLUGIN_VIO_INFO;
/** /**
Provides plugin access to communication channel Provides plugin access to communication channel
*/ */
typedef struct st_plugin_vio typedef struct st_plugin_vio
{ {
/** /**
 End of changes. 5 change blocks. 
4 lines changed or deleted 6 lines changed or added


 violite.h   violite.h 
skipping to change at line 52 skipping to change at line 52
#ifndef Vio_defined #ifndef Vio_defined
#define Vio_defined #define Vio_defined
struct st_vio; /* Only C */ struct st_vio; /* Only C */
typedef struct st_vio Vio; typedef struct st_vio Vio;
#endif #endif
#ifndef _WIN32 #ifndef _WIN32
#define HANDLE void * #define HANDLE void *
#endif #endif
/* vio read-ahead cachine */
#define VIO_CACHE_SIZE 16384
#define VIO_CACHE_MIN_SIZE 2048
enum enum_vio_type { VIO_CLOSED, VIO_TYPE_TCPIP, VIO_TYPE_SOCKET, enum enum_vio_type { VIO_CLOSED, VIO_TYPE_TCPIP, VIO_TYPE_SOCKET,
VIO_TYPE_NAMEDPIPE, VIO_TYPE_SSL}; VIO_TYPE_NAMEDPIPE, VIO_TYPE_SSL};
Vio* vio_new(my_socket sd, Vio* vio_new(my_socket sd,
enum enum_vio_type type, enum enum_vio_type type,
my_bool localhost); my_bool localhost);
#ifdef _WIN32 #ifdef _WIN32
Vio* vio_new_win32pipe(HANDLE hPipe); Vio* vio_new_win32pipe(HANDLE hPipe);
#endif #endif
void vio_delete(Vio* vio); void vio_delete(Vio* vio);
void vio_reset(Vio* vio, enum enum_vio_type type, void vio_reset(Vio* vio, enum enum_vio_type type,
my_socket sd, HANDLE hPipe, my_socket sd, HANDLE hPipe,
my_bool localhost); my_bool localhost);
/* /*
* vio_read and vio_write should have the same semantics * vio_read and vio_write should have the same semantics
* as read(2) and write(2). * as read(2) and write(2).
*/ */
int vio_read( Vio* vio, size_t vio_read(Vio* vio, gptr buf, size_t size);
gptr buf, int size my_bool vio_read_peek(Vio *vio, size_t *bytes);
); size_t vio_write(Vio* vio, const gptr buf, size_t size);
int vio_write( Vio* vio,
const gptr buf,
int size);
/* /*
* Whenever the socket is set to blocking mode or not. * Whenever the socket is set to blocking mode or not.
*/ */
int vio_blocking( Vio* vio, int vio_blocking( Vio* vio,
my_bool onoff); my_bool onoff);
my_bool vio_is_blocking( Vio* vio); my_bool vio_is_blocking( Vio* vio);
/* /*
* setsockopt TCP_NODELAY at IPPROTO_TCP level, when possible. * setsockopt TCP_NODELAY at IPPROTO_TCP level, when possible.
*/ */
int vio_fastsend( Vio* vio); int vio_fastsend( Vio* vio);
skipping to change at line 141 skipping to change at line 143
HANDLE hPipe; HANDLE hPipe;
my_bool localhost; /* Are we from localhost? */ my_bool localhost; /* Are we from localhost? */
int fcntl_mode; /* Buffered fcntl(sd,F_GETFL) */ int fcntl_mode; /* Buffered fcntl(sd,F_GETFL) */
struct sockaddr_in local; /* Local internet address */ struct sockaddr_in local; /* Local internet address */
struct sockaddr_in remote; /* Remote internet address */ struct sockaddr_in remote; /* Remote internet address */
enum enum_vio_type type; /* Type of connection */ enum enum_vio_type type; /* Type of connection */
char desc[30]; /* String description */ char desc[30]; /* String description */
#ifdef HAVE_OPENSSL #ifdef HAVE_OPENSSL
SSL *ssl; SSL *ssl;
#endif #endif
uchar *cache; /* read-ahead cache to reduce reads (see CONC-79) */
uchar *cache_pos; /* position of read-ahead cached data */
size_t cache_size; /* <= VIO_CACHE_SIZE */
}; };
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* HAVE_VIO */ #endif /* HAVE_VIO */
#endif /* vio_violite_h_ */ #endif /* vio_violite_h_ */
 End of changes. 3 change blocks. 
6 lines changed or deleted 10 lines changed or added

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