diff options
| author | Paradox <none@none> | 2009-02-09 08:16:34 -0500 |
|---|---|---|
| committer | Paradox <none@none> | 2009-02-09 08:16:34 -0500 |
| commit | d230302b16474ff22a35243ffed6236ef4fc7fb9 (patch) | |
| tree | e3679ad841a47b275756f2721f9aa24a3ee548a6 /dep/include/mysql | |
| parent | b0694d7e5e794b361fa178d55fefdb98cf47e9ca (diff) | |
Replace tabs with spaces in more files.
--HG--
branch : trunk
Diffstat (limited to 'dep/include/mysql')
| -rw-r--r-- | dep/include/mysql/config-netware.h | 2 | ||||
| -rw-r--r-- | dep/include/mysql/config-os2.h | 118 | ||||
| -rw-r--r-- | dep/include/mysql/config-win.h | 238 | ||||
| -rw-r--r-- | dep/include/mysql/errmsg.h | 66 | ||||
| -rw-r--r-- | dep/include/mysql/mysql.h | 372 | ||||
| -rw-r--r-- | dep/include/mysql/raid.h | 36 | ||||
| -rw-r--r-- | dep/include/mysql/typelib.h | 6 |
7 files changed, 419 insertions, 419 deletions
diff --git a/dep/include/mysql/config-netware.h b/dep/include/mysql/config-netware.h index 9c99305789a..0f74ebe7933 100644 --- a/dep/include/mysql/config-netware.h +++ b/dep/include/mysql/config-netware.h @@ -105,7 +105,7 @@ extern "C" { #define FN_DEVCHAR ':' /* default directory information */ -#define DEFAULT_MYSQL_HOME "sys:/mysql" +#define DEFAULT_MYSQL_HOME "sys:/mysql" #define PACKAGE "mysql" #define DEFAULT_BASEDIR "sys:/" #define SHAREDIR "share/" diff --git a/dep/include/mysql/config-os2.h b/dep/include/mysql/config-os2.h index 8e2d0e2e836..b2932c38b5a 100644 --- a/dep/include/mysql/config-os2.h +++ b/dep/include/mysql/config-os2.h @@ -39,56 +39,56 @@ /* Default socket */ #define MYSQL_UNIX_ADDR "\\socket\\MySQL" -#define FN_LIBCHAR '\\' -#define FN_ROOTDIR "\\" -#define MY_NFILE 1024 /* This is only used to save filenames */ +#define FN_LIBCHAR '\\' +#define FN_ROOTDIR "\\" +#define MY_NFILE 1024 /* This is only used to save filenames */ #define HAVE_ACCESS -#define DEFAULT_MYSQL_HOME "c:\\mysql" -#define DEFAULT_BASEDIR "C:\\" -#define SHAREDIR "share" -#define DEFAULT_CHARSET_HOME "C:/mysql/" -#define _POSIX_PATH_MAX 255 -#define DWORD ULONG +#define DEFAULT_MYSQL_HOME "c:\\mysql" +#define DEFAULT_BASEDIR "C:\\" +#define SHAREDIR "share" +#define DEFAULT_CHARSET_HOME "C:/mysql/" +#define _POSIX_PATH_MAX 255 +#define DWORD ULONG -#define O_SHARE 0x1000 /* Open file in sharing mode */ -#define FILE_BINARY O_BINARY /* my_fopen in binary mode */ -#define S_IROTH S_IREAD /* for my_lib */ +#define O_SHARE 0x1000 /* Open file in sharing mode */ +#define FILE_BINARY O_BINARY /* my_fopen in binary mode */ +#define S_IROTH S_IREAD /* for my_lib */ -#define CANT_DELETE_OPEN_FILES /* saves open files in a list, for delayed delete */ +#define CANT_DELETE_OPEN_FILES /* saves open files in a list, for delayed delete */ -#define O_NONBLOCK 0x10 +#define O_NONBLOCK 0x10 -#define NO_OPEN_3 /* For my_create() */ -#define SIGQUIT SIGTERM /* No SIGQUIT */ -#define SIGALRM 14 /* Alarm */ +#define NO_OPEN_3 /* For my_create() */ +#define SIGQUIT SIGTERM /* No SIGQUIT */ +#define SIGALRM 14 /* Alarm */ #define NO_FCNTL_NONBLOCK -#define EFBIG E2BIG -/*#define ENFILE EMFILE */ -/*#define ENAMETOOLONG (EOS2ERR+2) */ -/*#define ETIMEDOUT 145 */ -/*#define EPIPE 146 */ -#define EROFS 147 +#define EFBIG E2BIG +/*#define ENFILE EMFILE */ +/*#define ENAMETOOLONG (EOS2ERR+2) */ +/*#define ETIMEDOUT 145 */ +/*#define EPIPE 146 */ +#define EROFS 147 -#define sleep(A) DosSleep((A)*1000) -#define closesocket(A) soclose(A) +#define sleep(A) DosSleep((A)*1000) +#define closesocket(A) soclose(A) -#define F_OK 0 -#define W_OK 2 +#define F_OK 0 +#define W_OK 2 -#define bzero(x,y) memset((x),'\0',(y)) -#define bcopy(x,y,z) memcpy((y),(x),(z)) -#define bcmp(x,y,z) memcmp((y),(x),(z)) +#define bzero(x,y) memset((x),'\0',(y)) +#define bcopy(x,y,z) memcpy((y),(x),(z)) +#define bcmp(x,y,z) memcmp((y),(x),(z)) -#define F_RDLCK 4 /* Read lock. */ -#define F_WRLCK 2 /* Write lock. */ -#define F_UNLCK 0 /* Remove lock. */ +#define F_RDLCK 4 /* Read lock. */ +#define F_WRLCK 2 /* Write lock. */ +#define F_UNLCK 0 /* Remove lock. */ -#define S_IFMT 0x17000 /* Mask for file type */ -#define F_TO_EOF 0L /* Param to lockf() to lock rest of file */ +#define S_IFMT 0x17000 /* Mask for file type */ +#define F_TO_EOF 0L /* Param to lockf() to lock rest of file */ #define HUGE_PTR @@ -97,15 +97,15 @@ extern "C" #endif double _cdecl rint( double nr); -DWORD TlsAlloc( void); -BOOL TlsFree( DWORD); -PVOID TlsGetValue( DWORD); -BOOL TlsSetValue( DWORD, PVOID); +DWORD TlsAlloc( void); +BOOL TlsFree( DWORD); +PVOID TlsGetValue( DWORD); +BOOL TlsSetValue( DWORD, PVOID); /* support for > 2GB file size */ -#define SIZEOF_OFF_T 8 -#define lseek(A,B,C) _lseek64( A, B, C) -#define tell(A) _lseek64( A, 0, SEEK_CUR) +#define SIZEOF_OFF_T 8 +#define lseek(A,B,C) _lseek64( A, B, C) +#define tell(A) _lseek64( A, 0, SEEK_CUR) void* dlopen( char* path, int flag); char* dlerror( void); @@ -147,7 +147,7 @@ typedef unsigned long long os_off_t; /* Define if your struct stat has st_rdev. */ #define HAVE_ST_RDEV 1 -/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */ +/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */ /* #define HAVE_SYS_WAIT_H 1 */ /* Define if you don't have tm_zone but do have the external array @@ -166,7 +166,7 @@ typedef unsigned long long os_off_t; /* Define to `long' if <sys/types.h> doesn't define. */ /* #undef off_t */ -/* Define as the return type of signal handlers (int or void). */ +/* Define as the return type of signal handlers (int or void). */ #define RETSIGTYPE void /* Define to `unsigned' if <sys/types.h> doesn't define. */ @@ -184,7 +184,7 @@ typedef unsigned long long os_off_t; /* Define if the `S_IS*' macros in <sys/stat.h> do not work properly. */ /* #undef STAT_MACROS_BROKEN */ -/* Define if you have the ANSI C header files. */ +/* Define if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Define if you can safely include both <sys/time.h> and <time.h>. */ @@ -194,7 +194,7 @@ typedef unsigned long long os_off_t; /* #undef TM_IN_SYS_TIME */ /* Define if your processor stores words with the most significant - byte first (like Motorola and SPARC, unlike Intel and VAX). */ + byte first (like Motorola and SPARC, unlike Intel and VAX). */ /* #undef WORDS_BIGENDIAN */ /* Version of .frm files */ @@ -373,7 +373,7 @@ typedef unsigned long long os_off_t; /* The number of bytes in a long. */ #define SIZEOF_LONG 4 -/* The number of bytes in a long long. */ +/* The number of bytes in a long long. */ #define SIZEOF_LONG_LONG 8 /* Define if you have the alarm function. */ @@ -469,7 +469,7 @@ typedef unsigned long long os_off_t; /* Define if you have the index function. */ #define HAVE_INDEX 1 -/* Define if you have the initgroups function. */ +/* Define if you have the initgroups function. */ /* #undef HAVE_INITGROUPS */ /* Define if you have the localtime_r function. */ @@ -517,7 +517,7 @@ typedef unsigned long long os_off_t; /* Define if you have the pthread_attr_setprio function. */ #define HAVE_PTHREAD_ATTR_SETPRIO 1 -/* Define if you have the pthread_attr_setschedparam function. */ +/* Define if you have the pthread_attr_setschedparam function. */ /* #undef HAVE_PTHREAD_ATTR_SETSCHEDPARAM */ /* Define if you have the pthread_attr_setstacksize function. */ @@ -538,7 +538,7 @@ typedef unsigned long long os_off_t; /* Define if you have the pthread_setprio function. */ #define HAVE_PTHREAD_SETPRIO 1 -/* Define if you have the pthread_setprio_np function. */ +/* Define if you have the pthread_setprio_np function. */ /* #undef HAVE_PTHREAD_SETPRIO_NP */ /* Define if you have the pthread_setschedparam function. */ @@ -595,7 +595,7 @@ typedef unsigned long long os_off_t; /* Define if you have the stpcpy function. */ /* #undef HAVE_STPCPY */ -/* Define if you have the strcasecmp function. */ +/* Define if you have the strcasecmp function. */ /* #undef HAVE_STRCASECMP */ /* Define if you have the strcoll function. */ @@ -634,7 +634,7 @@ typedef unsigned long long os_off_t; /* Define if you have the tempnam function. */ #define HAVE_TEMPNAM 1 -/* Define if you have the thr_setconcurrency function. */ +/* Define if you have the thr_setconcurrency function. */ /* #undef HAVE_THR_SETCONCURRENCY */ /* Define if you have the vidattr function. */ @@ -667,7 +667,7 @@ typedef unsigned long long os_off_t; /* Define if you have the <floatingpoint.h> header file. */ /* #undef HAVE_FLOATINGPOINT_H */ -/* Define if you have the <grp.h> header file. */ +/* Define if you have the <grp.h> header file. */ /* #define HAVE_GRP_H 1 */ /* Define if you have the <ieeefp.h> header file. */ @@ -691,7 +691,7 @@ typedef unsigned long long os_off_t; /* Define if you have the <paths.h> header file. */ /* #undef HAVE_PATHS_H */ -/* Define if you have the <pwd.h> header file. */ +/* Define if you have the <pwd.h> header file. */ /* #define HAVE_PWD_H 1 */ /* Define if you have the <sched.h> header file. */ @@ -760,7 +760,7 @@ typedef unsigned long long os_off_t; /* Define if you have the <sys/utime.h> header file. */ #define HAVE_SYS_UTIME_H 1 -/* Define if you have the <sys/vadvise.h> header file. */ +/* Define if you have the <sys/vadvise.h> header file. */ /* #undef HAVE_SYS_VADVISE_H */ /* Define if you have the <sys/wait.h> header file. */ @@ -793,7 +793,7 @@ typedef unsigned long long os_off_t; /* Define if you have the bind library (-lbind). */ /* #undef HAVE_LIBBIND */ -/* Define if you have the c_r library (-lc_r). */ +/* Define if you have the c_r library (-lc_r). */ /* #undef HAVE_LIBC_R */ /* Define if you have the compat library (-lcompat). */ @@ -805,19 +805,19 @@ typedef unsigned long long os_off_t; /* Define if you have the dl library (-ldl). */ #define HAVE_LIBDL 1 -/* Define if you have the gen library (-lgen). */ +/* Define if you have the gen library (-lgen). */ /* #undef HAVE_LIBGEN */ /* Define if you have the m library (-lm). */ #define HAVE_LIBM 1 -/* Define if you have the nsl library (-lnsl). */ +/* Define if you have the nsl library (-lnsl). */ /* #undef HAVE_LIBNSL */ /* Define if you have the nsl_r library (-lnsl_r). */ /* #undef HAVE_LIBNSL_R */ -/* Define if you have the pthread library (-lpthread). */ +/* Define if you have the pthread library (-lpthread). */ /* #undef HAVE_LIBPTHREAD */ /* Define if you have the socket library (-lsocket). */ diff --git a/dep/include/mysql/config-win.h b/dep/include/mysql/config-win.h index 45bfeb5ba26..f23a92385fe 100644 --- a/dep/include/mysql/config-win.h +++ b/dep/include/mysql/config-win.h @@ -31,7 +31,7 @@ functions */ #include <sys/locking.h> #include <windows.h> -#include <math.h> /* Because of rint() */ +#include <math.h> /* Because of rint() */ #include <fcntl.h> #include <io.h> #include <malloc.h> @@ -39,34 +39,34 @@ functions */ #define BIG_TABLES 1 #define HAVE_SMEM 1 -#if defined(_WIN64) || defined(WIN64) -#define SYSTEM_TYPE "Win64" -#elif defined(_WIN32) || defined(WIN32) -#define SYSTEM_TYPE "Win32" +#if defined(_WIN64) || defined(WIN64) +#define SYSTEM_TYPE "Win64" +#elif defined(_WIN32) || defined(WIN32) +#define SYSTEM_TYPE "Win32" #else -#define SYSTEM_TYPE "Windows" +#define SYSTEM_TYPE "Windows" #endif -#if defined(_M_IA64) -#define MACHINE_TYPE "ia64" -#elif defined(_M_IX86) -#define MACHINE_TYPE "ia32" -#elif defined(_M_ALPHA) -#define MACHINE_TYPE "axp" +#if defined(_M_IA64) +#define MACHINE_TYPE "ia64" +#elif defined(_M_IX86) +#define MACHINE_TYPE "ia32" +#elif defined(_M_ALPHA) +#define MACHINE_TYPE "axp" #else -#define MACHINE_TYPE "unknown" /* Define to machine type name */ -#endif - -#if !(defined(_WIN64) || defined(WIN64)) +#define MACHINE_TYPE "unknown" /* Define to machine type name */ +#endif + +#if !(defined(_WIN64) || defined(WIN64)) #ifndef _WIN32 -#define _WIN32 /* Compatible with old source */ +#define _WIN32 /* Compatible with old source */ #endif #ifndef __WIN32__ #define __WIN32__ #endif #endif /* _WIN64 */ #ifndef __WIN__ -#define __WIN__ /* To make it easier in VC++ */ +#define __WIN__ /* To make it easier in VC++ */ #endif #ifndef MAX_INDEXES @@ -74,42 +74,42 @@ functions */ #endif /* File and lock constants */ -#define O_SHARE 0x1000 /* Open file in sharing mode */ +#define O_SHARE 0x1000 /* Open file in sharing mode */ #ifdef __BORLANDC__ -#define F_RDLCK LK_NBLCK /* read lock */ -#define F_WRLCK LK_NBRLCK /* write lock */ -#define F_UNLCK LK_UNLCK /* remove lock(s) */ +#define F_RDLCK LK_NBLCK /* read lock */ +#define F_WRLCK LK_NBRLCK /* write lock */ +#define F_UNLCK LK_UNLCK /* remove lock(s) */ #else -#define F_RDLCK _LK_NBLCK /* read lock */ -#define F_WRLCK _LK_NBRLCK /* write lock */ -#define F_UNLCK _LK_UNLCK /* remove lock(s) */ +#define F_RDLCK _LK_NBLCK /* read lock */ +#define F_WRLCK _LK_NBRLCK /* write lock */ +#define F_UNLCK _LK_UNLCK /* remove lock(s) */ #endif -#define F_EXCLUSIVE 1 /* We have only exclusive locking */ -#define F_TO_EOF (INT_MAX32/2) /* size for lock of all file */ -#define F_OK 0 /* parameter to access() */ -#define W_OK 2 +#define F_EXCLUSIVE 1 /* We have only exclusive locking */ +#define F_TO_EOF (INT_MAX32/2) /* size for lock of all file */ +#define F_OK 0 /* parameter to access() */ +#define W_OK 2 -#define S_IROTH S_IREAD /* for my_lib */ +#define S_IROTH S_IREAD /* for my_lib */ #ifdef __BORLANDC__ -#define FILE_BINARY O_BINARY /* my_fopen in binary mode */ -#define O_TEMPORARY 0 -#define O_SHORT_LIVED 0 -#define SH_DENYNO _SH_DENYNO +#define FILE_BINARY O_BINARY /* my_fopen in binary mode */ +#define O_TEMPORARY 0 +#define O_SHORT_LIVED 0 +#define SH_DENYNO _SH_DENYNO #else -#define O_BINARY _O_BINARY /* compability with MSDOS */ -#define FILE_BINARY _O_BINARY /* my_fopen in binary mode */ -#define O_TEMPORARY _O_TEMPORARY -#define O_SHORT_LIVED _O_SHORT_LIVED -#define SH_DENYNO _SH_DENYNO +#define O_BINARY _O_BINARY /* compability with MSDOS */ +#define FILE_BINARY _O_BINARY /* my_fopen in binary mode */ +#define O_TEMPORARY _O_TEMPORARY +#define O_SHORT_LIVED _O_SHORT_LIVED +#define SH_DENYNO _SH_DENYNO #endif -#define NO_OPEN_3 /* For my_create() */ +#define NO_OPEN_3 /* For my_create() */ -#define SIGQUIT SIGTERM /* No SIGQUIT */ +#define SIGQUIT SIGTERM /* No SIGQUIT */ -#undef _REENTRANT /* Crashes something for win32 */ -#undef SAFE_MUTEX /* Can't be used on windows */ +#undef _REENTRANT /* Crashes something for win32 */ +#undef SAFE_MUTEX /* Can't be used on windows */ #if defined(_MSC_VER) && _MSC_VER >= 1310 #define LL(A) A##ll @@ -119,20 +119,20 @@ functions */ #define ULL(A) ((unsigned __int64) A) #endif -#define LONGLONG_MIN LL(0x8000000000000000) -#define LONGLONG_MAX LL(0x7FFFFFFFFFFFFFFF) -#define ULONGLONG_MAX ULL(0xFFFFFFFFFFFFFFFF) +#define LONGLONG_MIN LL(0x8000000000000000) +#define LONGLONG_MAX LL(0x7FFFFFFFFFFFFFFF) +#define ULONGLONG_MAX ULL(0xFFFFFFFFFFFFFFFF) /* Type information */ #if defined(__EMX__) || !defined(HAVE_UINT) #undef HAVE_UINT #define HAVE_UINT -typedef unsigned short ushort; -typedef unsigned int uint; +typedef unsigned short ushort; +typedef unsigned int uint; #endif /* defined(__EMX__) || !defined(HAVE_UINT) */ -typedef unsigned __int64 ulonglong; /* Microsofts 64 bit types */ +typedef unsigned __int64 ulonglong; /* Microsofts 64 bit types */ typedef __int64 longlong; #ifndef HAVE_SIGSET_T typedef int sigset_t; @@ -167,7 +167,7 @@ typedef uint rf_SetTimer; #define bool_defined #define byte_defined #define HUGE_PTR -#define STDCALL __stdcall /* Used by libmysql.dll */ +#define STDCALL __stdcall /* Used by libmysql.dll */ #define isnan(X) _isnan(X) #define finite(X) _finite(X) @@ -175,18 +175,18 @@ typedef uint rf_SetTimer; #define THREAD #endif #define VOID_SIGHANDLER -#define SIZEOF_CHAR 1 -#define SIZEOF_LONG 4 -#define SIZEOF_LONG_LONG 8 -#define SIZEOF_OFF_T 8 +#define SIZEOF_CHAR 1 +#define SIZEOF_LONG 4 +#define SIZEOF_LONG_LONG 8 +#define SIZEOF_OFF_T 8 #ifdef _WIN64 -#define SIZEOF_CHARP 8 +#define SIZEOF_CHARP 8 #else -#define SIZEOF_CHARP 4 +#define SIZEOF_CHARP 4 #endif #define HAVE_BROKEN_NETINET_INCLUDES #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 /* ERROR is defined in wingdi.h */ @@ -258,48 +258,48 @@ inline double ulonglong2double(ulonglong value) /* Optimized store functions for Intel x86 */ #ifndef _WIN64 -#define sint2korr(A) (*((int16 *) (A))) -#define sint3korr(A) ((int32) ((((uchar) (A)[2]) & 128) ? \ - (((uint32) 255L << 24) | \ - (((uint32) (uchar) (A)[2]) << 16) |\ - (((uint32) (uchar) (A)[1]) << 8) | \ - ((uint32) (uchar) (A)[0])) : \ - (((uint32) (uchar) (A)[2]) << 16) |\ - (((uint32) (uchar) (A)[1]) << 8) | \ - ((uint32) (uchar) (A)[0]))) -#define sint4korr(A) (*((long *) (A))) -#define uint2korr(A) (*((uint16 *) (A))) +#define sint2korr(A) (*((int16 *) (A))) +#define sint3korr(A) ((int32) ((((uchar) (A)[2]) & 128) ? \ + (((uint32) 255L << 24) | \ + (((uint32) (uchar) (A)[2]) << 16) |\ + (((uint32) (uchar) (A)[1]) << 8) | \ + ((uint32) (uchar) (A)[0])) : \ + (((uint32) (uchar) (A)[2]) << 16) |\ + (((uint32) (uchar) (A)[1]) << 8) | \ + ((uint32) (uchar) (A)[0]))) +#define sint4korr(A) (*((long *) (A))) +#define uint2korr(A) (*((uint16 *) (A))) /* ATTENTION ! - + Please, note, uint3korr reads 4 bytes (not 3) ! It means, that you have to provide enough allocated space ! */ -#define uint3korr(A) (long) (*((unsigned int *) (A)) & 0xFFFFFF) -#define uint4korr(A) (*((unsigned long *) (A))) -#define uint5korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) +\ - (((uint32) ((uchar) (A)[1])) << 8) +\ - (((uint32) ((uchar) (A)[2])) << 16) +\ - (((uint32) ((uchar) (A)[3])) << 24)) +\ - (((ulonglong) ((uchar) (A)[4])) << 32)) -#define uint8korr(A) (*((ulonglong *) (A))) -#define sint8korr(A) (*((longlong *) (A))) -#define int2store(T,A) *((uint16*) (T))= (uint16) (A) -#define int3store(T,A) { *(T)= (uchar) ((A));\ - *(T+1)=(uchar) (((uint) (A) >> 8));\ - *(T+2)=(uchar) (((A) >> 16)); } -#define int4store(T,A) *((long *) (T))= (long) (A) -#define int5store(T,A) { *(T)= (uchar)((A));\ - *((T)+1)=(uchar) (((A) >> 8));\ - *((T)+2)=(uchar) (((A) >> 16));\ - *((T)+3)=(uchar) (((A) >> 24)); \ - *((T)+4)=(uchar) (((A) >> 32)); } -#define int8store(T,A) *((ulonglong *) (T))= (ulonglong) (A) - -#define doubleget(V,M) do { *((long *) &V) = *((long*) M); \ - *(((long *) &V)+1) = *(((long*) M)+1); } while(0) +#define uint3korr(A) (long) (*((unsigned int *) (A)) & 0xFFFFFF) +#define uint4korr(A) (*((unsigned long *) (A))) +#define uint5korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) +\ + (((uint32) ((uchar) (A)[1])) << 8) +\ + (((uint32) ((uchar) (A)[2])) << 16) +\ + (((uint32) ((uchar) (A)[3])) << 24)) +\ + (((ulonglong) ((uchar) (A)[4])) << 32)) +#define uint8korr(A) (*((ulonglong *) (A))) +#define sint8korr(A) (*((longlong *) (A))) +#define int2store(T,A) *((uint16*) (T))= (uint16) (A) +#define int3store(T,A) { *(T)= (uchar) ((A));\ + *(T+1)=(uchar) (((uint) (A) >> 8));\ + *(T+2)=(uchar) (((A) >> 16)); } +#define int4store(T,A) *((long *) (T))= (long) (A) +#define int5store(T,A) { *(T)= (uchar)((A));\ + *((T)+1)=(uchar) (((A) >> 8));\ + *((T)+2)=(uchar) (((A) >> 16));\ + *((T)+3)=(uchar) (((A) >> 24)); \ + *((T)+4)=(uchar) (((A) >> 32)); } +#define int8store(T,A) *((ulonglong *) (T))= (ulonglong) (A) + +#define doubleget(V,M) do { *((long *) &V) = *((long*) M); \ + *(((long *) &V)+1) = *(((long*) M)+1); } while(0) #define doublestore(T,V) do { *((long *) T) = *((long*) &V); \ - *(((long *) T)+1) = *(((long*) &V)+1); } while(0) + *(((long *) T)+1) = *(((long*) &V)+1); } while(0) #define float4get(V,M) { *((long *) &(V)) = *((long*) (M)); } #define floatstore(T,V) memcpy((byte*)(T), (byte*)(&V), sizeof(float)) #define floatget(V,M) memcpy((byte*)(&V), (byte*)(M), sizeof(float)) @@ -310,12 +310,12 @@ inline double ulonglong2double(ulonglong value) #define HAVE_PERROR #define HAVE_VFPRINT -#define HAVE_RENAME /* Have rename() as function */ -#define HAVE_BINARY_STREAMS /* Have "b" flag in streams */ -#define HAVE_LONG_JMP /* Have long jump function */ -#define HAVE_LOCKING /* have locking() call */ -#define HAVE_ERRNO_AS_DEFINE /* errno is a define */ -#define HAVE_STDLIB /* everything is include in this file */ +#define HAVE_RENAME /* Have rename() as function */ +#define HAVE_BINARY_STREAMS /* Have "b" flag in streams */ +#define HAVE_LONG_JMP /* Have long jump function */ +#define HAVE_LOCKING /* have locking() call */ +#define HAVE_ERRNO_AS_DEFINE /* errno is a define */ +#define HAVE_STDLIB /* everything is include in this file */ #define HAVE_MEMCPY #define HAVE_MEMMOVE #define HAVE_GETCWD @@ -324,12 +324,12 @@ inline double ulonglong2double(ulonglong value) #define HAVE_PUTENV #define HAVE_SELECT #define HAVE_SETLOCALE -#define HAVE_SOCKET /* Giangi */ +#define HAVE_SOCKET /* Giangi */ #define HAVE_FLOAT_H #define HAVE_LIMITS_H #define HAVE_STDDEF_H -#define HAVE_RINT /* defined in this file */ -#define NO_FCNTL_NONBLOCK /* No FCNTL */ +#define HAVE_RINT /* defined in this file */ +#define NO_FCNTL_NONBLOCK /* No FCNTL */ #define HAVE_ALLOCA #define HAVE_STRPBRK #define HAVE_STRSTR @@ -349,12 +349,12 @@ inline double ulonglong2double(ulonglong value) #endif #ifdef NOT_USED -#define HAVE_SNPRINTF /* Gave link error */ +#define HAVE_SNPRINTF /* Gave link error */ #define _snprintf snprintf #endif #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_SYS_UTIME_H #define HAVE_STRTOUL @@ -368,12 +368,12 @@ inline double ulonglong2double(ulonglong value) #ifdef _CUSTOMCONFIG_ #include <custom_conf.h> #else -#define DEFAULT_MYSQL_HOME "c:\\mysql" -#define DATADIR "c:\\mysql\\data" -#define PACKAGE "mysql" -#define DEFAULT_BASEDIR "C:\\" -#define SHAREDIR "share" -#define DEFAULT_CHARSET_HOME "C:/mysql/" +#define DEFAULT_MYSQL_HOME "c:\\mysql" +#define DATADIR "c:\\mysql\\data" +#define PACKAGE "mysql" +#define DEFAULT_BASEDIR "C:\\" +#define SHAREDIR "share" +#define DEFAULT_CHARSET_HOME "C:/mysql/" #endif #ifndef DEFAULT_HOME_ENV #define DEFAULT_HOME_ENV MYSQL_HOME @@ -384,12 +384,12 @@ inline double ulonglong2double(ulonglong value) /* File name handling */ -#define FN_LIBCHAR '\\' -#define FN_ROOTDIR "\\" -#define FN_DEVCHAR ':' -#define FN_NETWORK_DRIVES /* Uses \\ to indicate network drives */ -#define FN_NO_CASE_SENCE /* Files are not case-sensitive */ -#define OS_FILE_LIMIT 2048 +#define FN_LIBCHAR '\\' +#define FN_ROOTDIR "\\" +#define FN_DEVCHAR ':' +#define FN_NETWORK_DRIVES /* Uses \\ to indicate network drives */ +#define FN_NO_CASE_SENCE /* Files are not case-sensitive */ +#define OS_FILE_LIMIT 2048 #define DO_NOT_REMOVE_THREAD_WRAPPERS #define thread_safe_increment(V,L) InterlockedIncrement((long*) &(V)) @@ -401,10 +401,10 @@ inline double ulonglong2double(ulonglong value) #define statistic_add(V,C,L) thread_safe_add((V),(C),(L)) #else #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) \ - pthread_mutex_lock((L)); (V)-=(C); pthread_mutex_unlock((L)); -#define statistic_add(V,C,L) (V)+=(C) + pthread_mutex_lock((L)); (V)-=(C); pthread_mutex_unlock((L)); +#define statistic_add(V,C,L) (V)+=(C) #endif #define statistic_increment(V,L) thread_safe_increment((V),(L)) #define statistic_decrement(V,L) thread_safe_decrement((V),(L)) diff --git a/dep/include/mysql/errmsg.h b/dep/include/mysql/errmsg.h index 8b20b36eed7..627ac7b00cc 100644 --- a/dep/include/mysql/errmsg.h +++ b/dep/include/mysql/errmsg.h @@ -16,66 +16,66 @@ /* Error messages for MySQL clients */ /* (Error messages for the daemon are in share/language/errmsg.sys) */ -#ifdef __cplusplus +#ifdef __cplusplus extern "C" { #endif -void init_client_errs(void); -void finish_client_errs(void); -extern const char *client_errors[]; /* Error messages */ -#ifdef __cplusplus +void init_client_errs(void); +void finish_client_errs(void); +extern const char *client_errors[]; /* Error messages */ +#ifdef __cplusplus } #endif -#define CR_MIN_ERROR 2000 /* For easier client code */ -#define CR_MAX_ERROR 2999 +#define CR_MIN_ERROR 2000 /* For easier client code */ +#define CR_MAX_ERROR 2999 #if defined(OS2) && defined(MYSQL_SERVER) #define CER(X) client_errors[(X)-CR_MIN_ERROR] #elif !defined(ER) #define ER(X) client_errors[(X)-CR_MIN_ERROR] #endif -#define CLIENT_ERRMAP 2 /* Errormap used by my_error() */ +#define CLIENT_ERRMAP 2 /* Errormap used by my_error() */ /* Do not add error numbers before CR_ERROR_FIRST. */ /* If necessary to add lower numbers, change CR_ERROR_FIRST accordingly. */ -#define CR_ERROR_FIRST 2000 /*Copy first error nr.*/ -#define CR_UNKNOWN_ERROR 2000 -#define CR_SOCKET_CREATE_ERROR 2001 -#define CR_CONNECTION_ERROR 2002 -#define CR_CONN_HOST_ERROR 2003 -#define CR_IPSOCK_ERROR 2004 -#define CR_UNKNOWN_HOST 2005 -#define CR_SERVER_GONE_ERROR 2006 -#define CR_VERSION_ERROR 2007 -#define CR_OUT_OF_MEMORY 2008 -#define CR_WRONG_HOST_INFO 2009 +#define CR_ERROR_FIRST 2000 /*Copy first error nr.*/ +#define CR_UNKNOWN_ERROR 2000 +#define CR_SOCKET_CREATE_ERROR 2001 +#define CR_CONNECTION_ERROR 2002 +#define CR_CONN_HOST_ERROR 2003 +#define CR_IPSOCK_ERROR 2004 +#define CR_UNKNOWN_HOST 2005 +#define CR_SERVER_GONE_ERROR 2006 +#define CR_VERSION_ERROR 2007 +#define CR_OUT_OF_MEMORY 2008 +#define CR_WRONG_HOST_INFO 2009 #define CR_LOCALHOST_CONNECTION 2010 -#define CR_TCP_CONNECTION 2011 +#define CR_TCP_CONNECTION 2011 #define CR_SERVER_HANDSHAKE_ERR 2012 -#define CR_SERVER_LOST 2013 +#define CR_SERVER_LOST 2013 #define CR_COMMANDS_OUT_OF_SYNC 2014 #define CR_NAMEDPIPE_CONNECTION 2015 #define CR_NAMEDPIPEWAIT_ERROR 2016 #define CR_NAMEDPIPEOPEN_ERROR 2017 #define CR_NAMEDPIPESETSTATE_ERROR 2018 -#define CR_CANT_READ_CHARSET 2019 +#define CR_CANT_READ_CHARSET 2019 #define CR_NET_PACKET_TOO_LARGE 2020 -#define CR_EMBEDDED_CONNECTION 2021 +#define CR_EMBEDDED_CONNECTION 2021 #define CR_PROBE_SLAVE_STATUS 2022 #define CR_PROBE_SLAVE_HOSTS 2023 #define CR_PROBE_SLAVE_CONNECT 2024 #define CR_PROBE_MASTER_CONNECT 2025 #define CR_SSL_CONNECTION_ERROR 2026 #define CR_MALFORMED_PACKET 2027 -#define CR_WRONG_LICENSE 2028 +#define CR_WRONG_LICENSE 2028 /* new 4.1 error codes */ -#define CR_NULL_POINTER 2029 -#define CR_NO_PREPARE_STMT 2030 -#define CR_PARAMS_NOT_BOUND 2031 -#define CR_DATA_TRUNCATED 2032 +#define CR_NULL_POINTER 2029 +#define CR_NO_PREPARE_STMT 2030 +#define CR_PARAMS_NOT_BOUND 2031 +#define CR_DATA_TRUNCATED 2032 #define CR_NO_PARAMETERS_EXISTS 2033 #define CR_INVALID_PARAMETER_NO 2034 -#define CR_INVALID_BUFFER_USE 2035 +#define CR_INVALID_BUFFER_USE 2035 #define CR_UNSUPPORTED_PARAM_TYPE 2036 #define CR_SHARED_MEMORY_CONNECTION 2037 @@ -85,18 +85,18 @@ extern const char *client_errors[]; /* Error messages */ #define CR_SHARED_MEMORY_CONNECT_MAP_ERROR 2041 #define CR_SHARED_MEMORY_FILE_MAP_ERROR 2042 #define CR_SHARED_MEMORY_MAP_ERROR 2043 -#define CR_SHARED_MEMORY_EVENT_ERROR 2044 +#define CR_SHARED_MEMORY_EVENT_ERROR 2044 #define CR_SHARED_MEMORY_CONNECT_ABANDONED_ERROR 2045 #define CR_SHARED_MEMORY_CONNECT_SET_ERROR 2046 -#define CR_CONN_UNKNOW_PROTOCOL 2047 -#define CR_INVALID_CONN_HANDLE 2048 +#define CR_CONN_UNKNOW_PROTOCOL 2047 +#define CR_INVALID_CONN_HANDLE 2048 #define CR_SECURE_AUTH 2049 #define CR_FETCH_CANCELED 2050 #define CR_NO_DATA 2051 #define CR_NO_STMT_METADATA 2052 #define CR_NO_RESULT_SET 2053 #define CR_NOT_IMPLEMENTED 2054 -#define CR_SERVER_LOST_EXTENDED 2055 +#define CR_SERVER_LOST_EXTENDED 2055 #define CR_ERROR_LAST /*Copy last error nr:*/ 2055 /* Add error numbers before CR_ERROR_LAST and change it accordingly. */ diff --git a/dep/include/mysql/mysql.h b/dep/include/mysql/mysql.h index 18b82b8a943..1f106429f0d 100644 --- a/dep/include/mysql/mysql.h +++ b/dep/include/mysql/mysql.h @@ -39,14 +39,14 @@ #undef __WIN__ #endif -#ifdef __cplusplus +#ifdef __cplusplus extern "C" { #endif -#ifndef _global_h /* If not standard header */ +#ifndef _global_h /* If not standard header */ #include <sys/types.h> #ifdef __LCC__ -#include <winsock.h> /* For windows */ +#include <winsock.h> /* For windows */ #endif typedef char my_bool; #if (defined(_WIN32) || defined(_WIN64)) && !defined(__WIN__) @@ -78,24 +78,24 @@ typedef int my_socket; extern unsigned int mysql_port; extern char *mysql_unix_port; -#define CLIENT_NET_READ_TIMEOUT 365*24*3600 /* Timeout on read */ -#define CLIENT_NET_WRITE_TIMEOUT 365*24*3600 /* Timeout on write */ +#define CLIENT_NET_READ_TIMEOUT 365*24*3600 /* Timeout on read */ +#define CLIENT_NET_WRITE_TIMEOUT 365*24*3600 /* Timeout on write */ #ifdef __NETWARE__ // GCC have alternative #pragma pack(8) syntax and old gcc version not support pack(push,8), also any gcc version not support it at some paltform #if defined( __GNUC__ ) -#pragma pack(8) -#else -#pragma pack(push,8) -#endif +#pragma pack(8) +#else +#pragma pack(push,8) +#endif #endif -#define IS_PRI_KEY(n) ((n) & PRI_KEY_FLAG) -#define IS_NOT_NULL(n) ((n) & NOT_NULL_FLAG) -#define IS_BLOB(n) ((n) & BLOB_FLAG) -#define IS_NUM(t) ((t) <= FIELD_TYPE_INT24 || (t) == FIELD_TYPE_YEAR || (t) == FIELD_TYPE_NEWDECIMAL) -#define IS_NUM_FIELD(f) ((f)->flags & NUM_FLAG) +#define IS_PRI_KEY(n) ((n) & PRI_KEY_FLAG) +#define IS_NOT_NULL(n) ((n) & NOT_NULL_FLAG) +#define IS_BLOB(n) ((n) & BLOB_FLAG) +#define IS_NUM(t) ((t) <= FIELD_TYPE_INT24 || (t) == FIELD_TYPE_YEAR || (t) == FIELD_TYPE_NEWDECIMAL) +#define IS_NUM_FIELD(f) ((f)->flags & NUM_FLAG) #define INTERNAL_NUM_FIELD(f) (((f)->type <= FIELD_TYPE_INT24 && ((f)->type != FIELD_TYPE_TIMESTAMP || (f)->length == 14 || (f)->length == 8)) || (f)->type == FIELD_TYPE_YEAR) #define IS_LONGDATA(t) ((t) >= MYSQL_TYPE_TINY_BLOB && (t) <= MYSQL_TYPE_STRING) @@ -106,7 +106,7 @@ typedef struct st_mysql_field { char *table; /* Table of column if column was a field */ char *org_table; /* Org table name, if table was an alias */ char *db; /* Database for table */ - char *catalog; /* Catalog for table */ + char *catalog; /* Catalog for table */ char *def; /* Default value (set by mysql_list_fields) */ unsigned long length; /* Width of column (create length) */ unsigned long max_length; /* Max width for selected set */ @@ -123,7 +123,7 @@ typedef struct st_mysql_field { enum enum_field_types type; /* Type of field. See mysql_com.h for types */ } 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 */ #ifndef _global_h @@ -142,12 +142,12 @@ typedef unsigned long long my_ulonglong; #define ER_WARN_DATA_TRUNCATED WARN_DATA_TRUNCATED typedef struct st_mysql_rows { - struct st_mysql_rows *next; /* list of rows */ + struct st_mysql_rows *next; /* list of rows */ MYSQL_ROW data; unsigned long length; } MYSQL_ROWS; -typedef MYSQL_ROWS *MYSQL_ROW_OFFSET; /* offset to current row */ +typedef MYSQL_ROWS *MYSQL_ROW_OFFSET; /* offset to current row */ #include "my_alloc.h" @@ -161,7 +161,7 @@ typedef struct st_mysql_data { struct embedded_query_result *embedded_info; } MYSQL_DATA; -enum mysql_option +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, @@ -181,14 +181,14 @@ struct st_mysql_options { char *host,*user,*password,*unix_socket,*db; struct st_dynamic_array *init_commands; char *my_cnf_file,*my_cnf_group, *charset_dir, *charset_name; - char *ssl_key; /* PEM key file */ - char *ssl_cert; /* PEM cert file */ - char *ssl_ca; /* PEM CA file */ - char *ssl_capath; /* PEM directory of CA-s? */ - char *ssl_cipher; /* cipher to use */ + char *ssl_key; /* PEM key file */ + char *ssl_cert; /* PEM cert file */ + char *ssl_ca; /* PEM CA file */ + char *ssl_capath; /* PEM directory of CA-s? */ + char *ssl_cipher; /* cipher to use */ char *shared_memory_base_name; 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; /* On connect, find out the replication role of the server, and @@ -223,12 +223,12 @@ struct st_mysql_options { void *local_infile_userdata; }; -enum mysql_status +enum mysql_status { MYSQL_STATUS_READY,MYSQL_STATUS_GET_RESULT,MYSQL_STATUS_USE_RESULT }; -enum mysql_protocol_type +enum mysql_protocol_type { MYSQL_PROTOCOL_DEFAULT, MYSQL_PROTOCOL_TCP, MYSQL_PROTOCOL_SOCKET, MYSQL_PROTOCOL_PIPE, MYSQL_PROTOCOL_MEMORY @@ -238,7 +238,7 @@ enum mysql_protocol_type the master, the ones that go to a slave, and the adminstrative type which must happen on the pivot connectioin */ -enum mysql_rpl_type +enum mysql_rpl_type { MYSQL_RPL_MASTER, MYSQL_RPL_SLAVE, MYSQL_RPL_ADMIN }; @@ -260,32 +260,32 @@ struct st_mysql_stmt; typedef struct st_mysql { - NET net; /* Communication parameters */ - gptr connector_fd; /* ConnectorFd for SSL */ - char *host,*user,*passwd,*unix_socket,*server_version,*host_info,*info; + NET net; /* Communication parameters */ + gptr connector_fd; /* ConnectorFd for SSL */ + char *host,*user,*passwd,*unix_socket,*server_version,*host_info,*info; char *db; struct charset_info_st *charset; - MYSQL_FIELD *fields; - MEM_ROOT field_alloc; + MYSQL_FIELD *fields; + MEM_ROOT field_alloc; my_ulonglong affected_rows; - my_ulonglong insert_id; /* id if insert on table with NEXTNR */ - my_ulonglong extra_info; /* Not used */ - unsigned long thread_id; /* Id for connection in server */ + my_ulonglong insert_id; /* id if insert on table with NEXTNR */ + my_ulonglong extra_info; /* Not used */ + unsigned long thread_id; /* Id for connection in server */ unsigned long packet_length; - unsigned int port; + unsigned int port; unsigned long client_flag,server_capabilities; - unsigned int protocol_version; - unsigned int field_count; - unsigned int server_status; + unsigned int protocol_version; + unsigned int field_count; + unsigned int server_status; unsigned int server_language; - unsigned int warning_count; + unsigned int warning_count; struct st_mysql_options options; enum mysql_status status; - my_bool free_me; /* If free in mysql_close */ - 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 */ /* session-wide random string */ - char scramble[SCRAMBLE_LENGTH+1]; + char scramble[SCRAMBLE_LENGTH+1]; /* Set if this is the original connection, not a master or a slave we have @@ -306,7 +306,7 @@ typedef struct st_mysql const struct st_mysql_methods *methods; void *thd; /* - Points to boolean flag in MYSQL_RES or MYSQL_STMT. We set this flag + Points to boolean flag in MYSQL_RES or MYSQL_STMT. We set this flag from mysql_stmt_close if close had to cancel result set of this object. */ my_bool *unbuffered_fetch_owner; @@ -318,22 +318,22 @@ typedef struct st_mysql typedef struct st_mysql_res { my_ulonglong row_count; - MYSQL_FIELD *fields; - MYSQL_DATA *data; - MYSQL_ROWS *data_cursor; - unsigned long *lengths; /* column lengths of current row */ - MYSQL *handle; /* for unbuffered reads */ - MEM_ROOT field_alloc; - unsigned int field_count, current_field; - MYSQL_ROW row; /* If unbuffered read */ - MYSQL_ROW current_row; /* buffer to current row */ - my_bool eof; /* Used by mysql_fetch_row */ + MYSQL_FIELD *fields; + MYSQL_DATA *data; + MYSQL_ROWS *data_cursor; + unsigned long *lengths; /* column lengths of current row */ + MYSQL *handle; /* for unbuffered reads */ + MEM_ROOT field_alloc; + unsigned int field_count, current_field; + MYSQL_ROW row; /* If unbuffered read */ + MYSQL_ROW current_row; /* buffer to current row */ + my_bool eof; /* Used by mysql_fetch_row */ /* mysql_stmt_close() had to cancel this result */ - my_bool unbuffered_fetch_cancelled; + my_bool unbuffered_fetch_cancelled; const struct st_mysql_methods *methods; } MYSQL_RES; -#define MAX_MYSQL_MANAGER_ERR 256 +#define MAX_MYSQL_MANAGER_ERR 256 #define MAX_MYSQL_MANAGER_MSG 256 #define MANAGER_OK 200 @@ -411,7 +411,7 @@ my_ulonglong STDCALL mysql_num_rows(MYSQL_RES *res); unsigned int STDCALL mysql_num_fields(MYSQL_RES *res); my_bool STDCALL mysql_eof(MYSQL_RES *res); MYSQL_FIELD *STDCALL mysql_fetch_field_direct(MYSQL_RES *res, - unsigned int fieldnr); + unsigned int fieldnr); MYSQL_FIELD * STDCALL mysql_fetch_fields(MYSQL_RES *res); MYSQL_ROW_OFFSET STDCALL mysql_row_tell(MYSQL_RES *res); MYSQL_FIELD_OFFSET STDCALL mysql_field_tell(MYSQL_RES *res); @@ -428,39 +428,39 @@ unsigned long STDCALL mysql_thread_id(MYSQL *mysql); const char * STDCALL mysql_character_set_name(MYSQL *mysql); int STDCALL mysql_set_character_set(MYSQL *mysql, const char *csname); -MYSQL * STDCALL mysql_init(MYSQL *mysql); -my_bool STDCALL mysql_ssl_set(MYSQL *mysql, const char *key, - const char *cert, const char *ca, - const char *capath, const char *cipher); +MYSQL * STDCALL mysql_init(MYSQL *mysql); +my_bool STDCALL mysql_ssl_set(MYSQL *mysql, const char *key, + const char *cert, const char *ca, + const char *capath, const char *cipher); const char * STDCALL mysql_get_ssl_cipher(MYSQL *mysql); -my_bool STDCALL mysql_change_user(MYSQL *mysql, const char *user, - const char *passwd, const char *db); -MYSQL * STDCALL mysql_real_connect(MYSQL *mysql, const char *host, - const char *user, - const char *passwd, - const char *db, - unsigned int port, - const char *unix_socket, - unsigned long clientflag); -int STDCALL mysql_select_db(MYSQL *mysql, const char *db); -int STDCALL mysql_query(MYSQL *mysql, const char *q); -int STDCALL mysql_send_query(MYSQL *mysql, const char *q, - unsigned long length); -int STDCALL mysql_real_query(MYSQL *mysql, const char *q, - unsigned long length); +my_bool STDCALL mysql_change_user(MYSQL *mysql, const char *user, + const char *passwd, const char *db); +MYSQL * STDCALL mysql_real_connect(MYSQL *mysql, const char *host, + const char *user, + const char *passwd, + const char *db, + unsigned int port, + const char *unix_socket, + unsigned long clientflag); +int STDCALL mysql_select_db(MYSQL *mysql, const char *db); +int STDCALL mysql_query(MYSQL *mysql, const char *q); +int STDCALL mysql_send_query(MYSQL *mysql, const char *q, + unsigned long length); +int STDCALL mysql_real_query(MYSQL *mysql, const char *q, + unsigned long length); MYSQL_RES * STDCALL mysql_store_result(MYSQL *mysql); MYSQL_RES * STDCALL mysql_use_result(MYSQL *mysql); /* perform query on master */ -my_bool STDCALL mysql_master_query(MYSQL *mysql, const char *q, - unsigned long length); -my_bool STDCALL mysql_master_send_query(MYSQL *mysql, const char *q, - unsigned long length); -/* perform query on slave */ -my_bool STDCALL mysql_slave_query(MYSQL *mysql, const char *q, - unsigned long length); -my_bool STDCALL mysql_slave_send_query(MYSQL *mysql, const char *q, - unsigned long length); +my_bool STDCALL mysql_master_query(MYSQL *mysql, const char *q, + unsigned long length); +my_bool STDCALL mysql_master_send_query(MYSQL *mysql, const char *q, + unsigned long length); +/* perform query on slave */ +my_bool STDCALL mysql_slave_query(MYSQL *mysql, const char *q, + unsigned long length); +my_bool STDCALL mysql_slave_send_query(MYSQL *mysql, const char *q, + unsigned long length); void STDCALL mysql_get_character_set_info(MYSQL *mysql, MY_CHARSET_INFO *charset); @@ -473,10 +473,10 @@ mysql_set_local_infile_handler(MYSQL *mysql, int (*local_infile_init)(void **, const char *, void *), int (*local_infile_read)(void *, char *, - unsigned int), + unsigned int), void (*local_infile_end)(void *), int (*local_infile_error)(void *, char*, - unsigned int), + unsigned int), void *); void @@ -489,93 +489,93 @@ mysql_set_local_infile_default(MYSQL *mysql); */ void STDCALL mysql_enable_rpl_parse(MYSQL* mysql); void STDCALL mysql_disable_rpl_parse(MYSQL* mysql); -/* get the value of the parse flag */ +/* get the value of the parse flag */ int STDCALL mysql_rpl_parse_enabled(MYSQL* mysql); /* enable/disable reads from master */ void STDCALL mysql_enable_reads_from_master(MYSQL* mysql); void STDCALL mysql_disable_reads_from_master(MYSQL* mysql); -/* get the value of the master read flag */ -my_bool STDCALL mysql_reads_from_master_enabled(MYSQL* mysql); +/* get the value of the master read flag */ +my_bool STDCALL mysql_reads_from_master_enabled(MYSQL* mysql); -enum mysql_rpl_type STDCALL mysql_rpl_query_type(const char* q, int len); +enum mysql_rpl_type STDCALL mysql_rpl_query_type(const char* q, int len); -/* discover the master and its slaves */ -my_bool STDCALL mysql_rpl_probe(MYSQL* mysql); +/* discover the master and its slaves */ +my_bool STDCALL mysql_rpl_probe(MYSQL* mysql); /* set the master, close/free the old one, if it is not a pivot */ int STDCALL mysql_set_master(MYSQL* mysql, const char* host, - unsigned int port, - const char* user, - const char* passwd); + unsigned int port, + const char* user, + const char* passwd); int STDCALL mysql_add_slave(MYSQL* mysql, const char* host, - unsigned int port, - const char* user, - const char* passwd); + unsigned int port, + const char* user, + const char* passwd); -int STDCALL mysql_shutdown(MYSQL *mysql, +int STDCALL mysql_shutdown(MYSQL *mysql, enum mysql_enum_shutdown_level shutdown_level); -int STDCALL mysql_dump_debug_info(MYSQL *mysql); -int STDCALL mysql_refresh(MYSQL *mysql, - unsigned int refresh_options); -int STDCALL mysql_kill(MYSQL *mysql,unsigned long pid); -int STDCALL mysql_set_server_option(MYSQL *mysql, - enum enum_mysql_set_option - option); -int STDCALL mysql_ping(MYSQL *mysql); -const char * STDCALL mysql_stat(MYSQL *mysql); -const char * STDCALL mysql_get_server_info(MYSQL *mysql); -const char * STDCALL mysql_get_client_info(void); -unsigned long STDCALL mysql_get_client_version(void); -const char * STDCALL mysql_get_host_info(MYSQL *mysql); -unsigned long STDCALL mysql_get_server_version(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_tables(MYSQL *mysql,const char *wild); -MYSQL_RES * STDCALL mysql_list_processes(MYSQL *mysql); -int STDCALL mysql_options(MYSQL *mysql,enum mysql_option option, - const char *arg); -void STDCALL mysql_free_result(MYSQL_RES *result); -void STDCALL mysql_data_seek(MYSQL_RES *result, - my_ulonglong offset); +int STDCALL mysql_dump_debug_info(MYSQL *mysql); +int STDCALL mysql_refresh(MYSQL *mysql, + unsigned int refresh_options); +int STDCALL mysql_kill(MYSQL *mysql,unsigned long pid); +int STDCALL mysql_set_server_option(MYSQL *mysql, + enum enum_mysql_set_option + option); +int STDCALL mysql_ping(MYSQL *mysql); +const char * STDCALL mysql_stat(MYSQL *mysql); +const char * STDCALL mysql_get_server_info(MYSQL *mysql); +const char * STDCALL mysql_get_client_info(void); +unsigned long STDCALL mysql_get_client_version(void); +const char * STDCALL mysql_get_host_info(MYSQL *mysql); +unsigned long STDCALL mysql_get_server_version(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_tables(MYSQL *mysql,const char *wild); +MYSQL_RES * STDCALL mysql_list_processes(MYSQL *mysql); +int STDCALL mysql_options(MYSQL *mysql,enum mysql_option option, + const char *arg); +void STDCALL mysql_free_result(MYSQL_RES *result); +void STDCALL mysql_data_seek(MYSQL_RES *result, + my_ulonglong offset); MYSQL_ROW_OFFSET STDCALL mysql_row_seek(MYSQL_RES *result, - MYSQL_ROW_OFFSET offset); + MYSQL_ROW_OFFSET offset); MYSQL_FIELD_OFFSET STDCALL mysql_field_seek(MYSQL_RES *result, - MYSQL_FIELD_OFFSET offset); -MYSQL_ROW STDCALL mysql_fetch_row(MYSQL_RES *result); + MYSQL_FIELD_OFFSET offset); +MYSQL_ROW STDCALL mysql_fetch_row(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); MYSQL_RES * STDCALL mysql_list_fields(MYSQL *mysql, const char *table, - const char *wild); -unsigned long STDCALL mysql_escape_string(char *to,const char *from, - unsigned long from_length); -unsigned long STDCALL mysql_hex_string(char *to,const char *from, + const char *wild); +unsigned long STDCALL mysql_escape_string(char *to,const char *from, + unsigned long from_length); +unsigned long STDCALL mysql_hex_string(char *to,const char *from, unsigned long from_length); unsigned long STDCALL mysql_real_escape_string(MYSQL *mysql, - char *to,const char *from, - unsigned long length); -void STDCALL mysql_debug(const char *debug); -void STDCALL myodbc_remove_escape(MYSQL *mysql,char *name); -unsigned int STDCALL mysql_thread_safe(void); -my_bool STDCALL mysql_embedded(void); -MYSQL_MANAGER* STDCALL mysql_manager_init(MYSQL_MANAGER* con); + char *to,const char *from, + unsigned long length); +void STDCALL mysql_debug(const char *debug); +void STDCALL myodbc_remove_escape(MYSQL *mysql,char *name); +unsigned int STDCALL mysql_thread_safe(void); +my_bool STDCALL mysql_embedded(void); +MYSQL_MANAGER* STDCALL mysql_manager_init(MYSQL_MANAGER* con); MYSQL_MANAGER* STDCALL mysql_manager_connect(MYSQL_MANAGER* con, - const char* host, - const char* user, - const char* passwd, - unsigned int port); + const char* host, + const char* user, + const char* passwd, + unsigned int port); void STDCALL mysql_manager_close(MYSQL_MANAGER* con); int STDCALL mysql_manager_command(MYSQL_MANAGER* con, - const char* cmd, int cmd_len); + const char* cmd, int cmd_len); int STDCALL mysql_manager_fetch_line(MYSQL_MANAGER* con, - char* res_buf, - int res_buf_size); + char* res_buf, + int res_buf_size); my_bool STDCALL mysql_read_query_result(MYSQL *mysql); /* - The following definitions are added for the enhanced + The following definitions are added for the enhanced client-server protocol */ @@ -652,28 +652,28 @@ enum enum_mysql_stmt_state typedef struct st_mysql_bind { - unsigned long *length; /* output length pointer */ - my_bool *is_null; /* Pointer to null indicator */ - void *buffer; /* buffer to get/put data */ + unsigned long *length; /* output length pointer */ + my_bool *is_null; /* Pointer to null indicator */ + void *buffer; /* buffer to get/put data */ /* set this if you want to track data truncations happened during fetch */ my_bool *error; - enum enum_field_types buffer_type; /* buffer type */ + enum enum_field_types buffer_type; /* buffer type */ /* output buffer length, must be set when fetching str/binary */ unsigned long buffer_length; unsigned char *row_ptr; /* for the current data position */ unsigned long offset; /* offset position for char/binary fetch */ - unsigned long length_value; /* Used if length is 0 */ - unsigned int param_number; /* For null count and error messages */ - unsigned int pack_length; /* Internal length for packed data */ + unsigned long length_value; /* Used if length is 0 */ + unsigned int param_number; /* For null count and error messages */ + unsigned int pack_length; /* Internal length for packed data */ my_bool error_value; /* used if error is 0 */ my_bool is_unsigned; /* set if integer type is unsigned */ - 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 long_data_used; /* If used with mysql_send_long_data */ + my_bool is_null_value; /* Used if is_null is 0 */ void (*store_param_func)(NET *net, struct st_mysql_bind *param); void (*fetch_result)(struct st_mysql_bind *, MYSQL_FIELD *, unsigned char **row); void (*skip_result)(struct st_mysql_bind *, MYSQL_FIELD *, - unsigned char **row); + unsigned char **row); } MYSQL_BIND; @@ -695,9 +695,9 @@ typedef struct st_mysql_stmt mysql_stmt_fetch() calls this function to fetch one row (it's different for buffered, unbuffered and cursor fetch). */ - int (*read_row_func)(struct st_mysql_stmt *stmt, + int (*read_row_func)(struct st_mysql_stmt *stmt, unsigned char **row); - unsigned long stmt_id; /* Id for prepared statement */ + unsigned long stmt_id; /* Id for prepared statement */ unsigned long flags; /* i.e. type of cursor to open */ unsigned long prefetch_rows; /* number of rows per one COM_FETCH */ /* @@ -705,30 +705,30 @@ typedef struct st_mysql_stmt server-side cursor status for this statement. */ unsigned int server_status; - unsigned int last_errno; /* error code */ + unsigned int last_errno; /* error code */ unsigned int param_count; /* input parameter count */ unsigned int field_count; /* number of columns in result set */ enum enum_mysql_stmt_state state; /* statement state */ - char last_error[MYSQL_ERRMSG_SIZE]; /* error message */ - char sqlstate[SQLSTATE_LENGTH+1]; + char last_error[MYSQL_ERRMSG_SIZE]; /* error message */ + char sqlstate[SQLSTATE_LENGTH+1]; /* Types of input parameters should be sent to server */ my_bool send_types_to_server; my_bool bind_param_done; /* input buffers were supplied */ unsigned char bind_result_done; /* output buffers were supplied */ /* mysql_stmt_close() had to cancel this result */ - my_bool unbuffered_fetch_cancelled; + my_bool unbuffered_fetch_cancelled; /* - Is set to true if we need to calculate field->max_length for + Is set to true if we need to calculate field->max_length for metadata fields when doing mysql_stmt_store_result. */ - my_bool update_max_length; + my_bool update_max_length; } MYSQL_STMT; enum enum_stmt_attr_type { /* When doing mysql_stmt_store_result calculate max_length attribute - of statement metadata. This is to be consistent with the old API, + of statement metadata. This is to be consistent with the old API, where this was done automatically. In the new API we do that only by request because it slows down mysql_stmt_store_result sufficiently. @@ -751,18 +751,18 @@ typedef struct st_mysql_methods { my_bool (*read_query_result)(MYSQL *mysql); my_bool (*advanced_command)(MYSQL *mysql, - enum enum_server_command command, - const char *header, - unsigned long header_length, - const char *arg, - unsigned long arg_length, - my_bool skip_check, + enum enum_server_command command, + const char *header, + unsigned long header_length, + const char *arg, + unsigned long arg_length, + my_bool skip_check, MYSQL_STMT *stmt); MYSQL_DATA *(*read_rows)(MYSQL *mysql,MYSQL_FIELD *mysql_fields, - unsigned int fields); + unsigned int fields); MYSQL_RES * (*use_result)(MYSQL *mysql); - void (*fetch_lengths)(unsigned long *to, - MYSQL_ROW column, unsigned int field_count); + void (*fetch_lengths)(unsigned long *to, + MYSQL_ROW column, unsigned int field_count); void (*flush_use_result)(MYSQL *mysql); #if !defined(MYSQL_SERVER) || defined(EMBEDDED_LIBRARY) MYSQL_FIELD * (*list_fields)(MYSQL *mysql); @@ -784,7 +784,7 @@ int STDCALL mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, unsigned long length); int STDCALL mysql_stmt_execute(MYSQL_STMT *stmt); int STDCALL mysql_stmt_fetch(MYSQL_STMT *stmt); -int STDCALL mysql_stmt_fetch_column(MYSQL_STMT *stmt, MYSQL_BIND *bind_arg, +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); @@ -800,16 +800,16 @@ my_bool STDCALL mysql_stmt_bind_result(MYSQL_STMT * stmt, MYSQL_BIND * bnd); my_bool STDCALL mysql_stmt_close(MYSQL_STMT * stmt); my_bool STDCALL mysql_stmt_reset(MYSQL_STMT * stmt); my_bool STDCALL mysql_stmt_free_result(MYSQL_STMT *stmt); -my_bool STDCALL mysql_stmt_send_long_data(MYSQL_STMT *stmt, +my_bool STDCALL mysql_stmt_send_long_data(MYSQL_STMT *stmt, unsigned int param_number, - const char *data, + const char *data, unsigned long length); MYSQL_RES *STDCALL mysql_stmt_result_metadata(MYSQL_STMT *stmt); MYSQL_RES *STDCALL mysql_stmt_param_metadata(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_sqlstate(MYSQL_STMT * stmt); -MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_seek(MYSQL_STMT *stmt, +MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_seek(MYSQL_STMT *stmt, MYSQL_ROW_OFFSET offset); MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_tell(MYSQL_STMT *stmt); void STDCALL mysql_stmt_data_seek(MYSQL_STMT *stmt, my_ulonglong offset); @@ -833,11 +833,11 @@ void STDCALL mysql_close(MYSQL *sock); #define mysql_reload(mysql) mysql_refresh((mysql),REFRESH_GRANT) #ifdef USE_OLD_FUNCTIONS -MYSQL * STDCALL mysql_connect(MYSQL *mysql, const char *host, - const char *user, const char *passwd); -int STDCALL mysql_create_db(MYSQL *mysql, const char *DB); -int STDCALL mysql_drop_db(MYSQL *mysql, const char *DB); -#define mysql_reload(mysql) mysql_refresh((mysql),REFRESH_GRANT) +MYSQL * STDCALL mysql_connect(MYSQL *mysql, const char *host, + const char *user, const char *passwd); +int STDCALL mysql_create_db(MYSQL *mysql, const char *DB); +int STDCALL mysql_drop_db(MYSQL *mysql, const char *DB); +#define mysql_reload(mysql) mysql_refresh((mysql),REFRESH_GRANT) #endif #define HAVE_MYSQL_REAL_CONNECT @@ -860,11 +860,11 @@ int STDCALL mysql_drop_db(MYSQL *mysql, const char *DB); #pragma pack() #else #pragma pack(pop) -#endif +#endif #endif -#ifdef __cplusplus +#ifdef __cplusplus } #endif diff --git a/dep/include/mysql/raid.h b/dep/include/mysql/raid.h index 9d098305d14..c3b256042f5 100644 --- a/dep/include/mysql/raid.h +++ b/dep/include/mysql/raid.h @@ -57,16 +57,16 @@ extern "C" { bool is_raid(File fd); File my_raid_create(const char *FileName, int CreateFlags, int access_flags, - uint raid_type, uint raid_chunks, ulong raid_chunksize, - myf MyFlags); + uint raid_type, uint raid_chunks, ulong raid_chunksize, + myf MyFlags); File my_raid_open(const char *FileName, int Flags, - uint raid_type, uint raid_chunks, ulong raid_chunksize, - myf MyFlags); + uint raid_type, uint raid_chunks, ulong raid_chunksize, + myf MyFlags); int my_raid_rename(const char *from, const char *to, uint raid_chunks, - myf MyFlags); + myf MyFlags); int my_raid_delete(const char *from, uint raid_chunks, myf MyFlags); int my_raid_redel(const char *old_name, const char *new_name, - uint raid_chunks, myf MyFlags); + uint raid_chunks, myf MyFlags); my_off_t my_raid_seek(File fd, my_off_t pos, int whence, myf MyFlags); my_off_t my_raid_tell(File fd, myf MyFlags); @@ -75,12 +75,12 @@ extern "C" { uint my_raid_read(File Filedes, byte *Buffer, uint Count, myf MyFlags); uint my_raid_pread(File Filedes, byte *Buffer, uint Count, my_off_t offset, - myf MyFlags); + myf MyFlags); uint my_raid_pwrite(int Filedes, const byte *Buffer, uint Count, - my_off_t offset, myf MyFlags); + my_off_t offset, myf MyFlags); int my_raid_lock(File,int locktype, my_off_t start, my_off_t length, - myf MyFlags); + myf MyFlags); int my_raid_chsize(File fd, my_off_t newlength, int filler, myf MyFlags); int my_raid_close(File, myf MyFlags); int my_raid_fstat(int Filedes, struct stat *buf, myf MyFlags); @@ -89,7 +89,7 @@ extern "C" { } #ifdef USE_PRAGMA_INTERFACE -#pragma interface /* gcc class implementation */ +#pragma interface /* gcc class implementation */ #endif class RaidName { @@ -109,7 +109,7 @@ class RaidFd { RaidFd(uint raid_type, uint raid_chunks , ulong raid_chunksize); ~RaidFd(); File Create(const char *FileName, int CreateFlags, int access_flags, - myf MyFlags); + myf MyFlags); File Open(const char *FileName, int Flags, myf MyFlags); my_off_t Seek(my_off_t pos,int whence,myf MyFlags); my_off_t Tell(myf MyFlags); @@ -120,7 +120,7 @@ class RaidFd { int Fstat(int fd, MY_STAT *stat_area, myf MyFlags ); int Close(myf MyFlags); static bool IsRaid(File fd); - static DYNAMIC_ARRAY _raid_map; /* Map of RaidFD* */ + static DYNAMIC_ARRAY _raid_map; /* Map of RaidFD* */ private: uint _raid_type; /* RAID_TYPE_0 or RAID_TYPE_1 or RAID_TYPE_5 */ @@ -134,22 +134,22 @@ class RaidFd { my_off_t _position; my_off_t _size; /* Cached file size for faster seek(SEEK_END) */ File _fd; - File *_fd_vector; /* Array of File */ - off_t *_seek_vector; /* Array of cached seek positions */ + File *_fd_vector; /* Array of File */ + off_t *_seek_vector; /* Array of cached seek positions */ inline void Calculate() { DBUG_ENTER("RaidFd::_Calculate"); DBUG_PRINT("info",("_position: %lu _raid_chunksize: %lu _size: %lu", - (ulong) _position, _raid_chunksize, (ulong) _size)); + (ulong) _position, _raid_chunksize, (ulong) _size)); _total_block = (ulong) (_position / _raid_chunksize); _this_block = _total_block % _raid_chunks; /* can be 0.._raid_chunks */ _remaining_bytes = (uint) (_raid_chunksize - - (_position - _total_block * _raid_chunksize)); + (_position - _total_block * _raid_chunksize)); DBUG_PRINT("info", - ("_total_block: %lu this_block: %d _remaining_bytes: %d", - _total_block, _this_block, _remaining_bytes)); + ("_total_block: %lu this_block: %d _remaining_bytes: %d", + _total_block, _this_block, _remaining_bytes)); DBUG_VOID_RETURN; } }; diff --git a/dep/include/mysql/typelib.h b/dep/include/mysql/typelib.h index 75d170e59d3..2a62f344cd0 100644 --- a/dep/include/mysql/typelib.h +++ b/dep/include/mysql/typelib.h @@ -19,9 +19,9 @@ #include "my_alloc.h" -typedef struct st_typelib { /* Different types saved here */ - unsigned int count; /* How many types */ - const char *name; /* Name of typelib */ +typedef struct st_typelib { /* Different types saved here */ + unsigned int count; /* How many types */ + const char *name; /* Name of typelib */ const char **type_names; unsigned int *type_lengths; } TYPELIB; |
