mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
[10375] Updated MySQL client libs to 5.1.49
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
80cef02190
commit
ce46397940
44 changed files with 3265 additions and 2105 deletions
|
|
@ -8,6 +8,8 @@ MaNGOS 0.17 (??? ??? 2010)
|
|||
|
||||
==== Server Features ====
|
||||
|
||||
* Improved: Updated MySQL client libs to 5.1.49.
|
||||
|
||||
==== Statistics ====
|
||||
* Fixed Bugs: ??? tickets and many bugs reported at forum resolved
|
||||
* Total number of changes: ??? revisions (??? commits)
|
||||
|
|
|
|||
1
NEWS
1
NEWS
|
|
@ -15,6 +15,7 @@ http://mangos.lighthouseapp.com/
|
|||
|
||||
Version 0.17
|
||||
* Under discussion.
|
||||
* MySQL client libs updated to MySQL 5.1.49
|
||||
* Upgrade to client version 3.3.5a (build 12340).
|
||||
|
||||
Version 0.16
|
||||
|
|
|
|||
|
|
@ -1,141 +0,0 @@
|
|||
/* Copyright (C) 2000 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
/* Header for NetWare compatible with MySQL */
|
||||
|
||||
#ifndef _config_netware_h
|
||||
#define _config_netware_h
|
||||
|
||||
/* required headers */
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <screen.h>
|
||||
#include <limits.h>
|
||||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
#include <pthread.h>
|
||||
#include <termios.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* required adjustments */
|
||||
#undef HAVE_READDIR_R
|
||||
#undef HAVE_RWLOCK_INIT
|
||||
#undef HAVE_SCHED_H
|
||||
#undef HAVE_SYS_MMAN_H
|
||||
#undef HAVE_SYNCH_H
|
||||
#undef HAVE_MMAP
|
||||
#undef HAVE_RINT
|
||||
|
||||
#define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1
|
||||
#define HAVE_PTHREAD_SIGMASK 1
|
||||
#define HAVE_PTHREAD_YIELD_ZERO_ARG 1
|
||||
#define HAVE_BROKEN_REALPATH 1
|
||||
|
||||
/* changes made to make use of LibC-June-2004 for building purpose */
|
||||
#undef HAVE_POSIX_SIGNALS
|
||||
#undef HAVE_PTHREAD_ATTR_SETSCOPE
|
||||
#undef HAVE_ALLOC_A
|
||||
#undef HAVE_FINITE
|
||||
#undef HAVE_GETPWNAM
|
||||
#undef HAVE_GETPWUID
|
||||
#undef HAVE_PTHREAD_SETSCHEDPARAM
|
||||
#undef HAVE_READLINK
|
||||
#undef HAVE_STPCPY
|
||||
/* changes end */
|
||||
|
||||
/* no libc crypt() function */
|
||||
#ifdef HAVE_OPENSSL
|
||||
#define HAVE_CRYPT 1
|
||||
#else
|
||||
#undef HAVE_CRYPT
|
||||
#endif /* HAVE_OPENSSL */
|
||||
|
||||
/* Netware has an ancient zlib */
|
||||
#undef HAVE_COMPRESS
|
||||
#define HAVE_COMPRESS
|
||||
#undef HAVE_ARCHIVE_DB
|
||||
|
||||
/* include the old function apis */
|
||||
#define USE_OLD_FUNCTIONS 1
|
||||
|
||||
/* no case sensitivity */
|
||||
#define FN_NO_CASE_SENCE 1
|
||||
|
||||
/* the thread alarm is not used */
|
||||
#define DONT_USE_THR_ALARM 1
|
||||
|
||||
/* signals do not interrupt sockets */
|
||||
#define SIGNALS_DONT_BREAK_READ 1
|
||||
|
||||
/* signal by closing the sockets */
|
||||
#define SIGNAL_WITH_VIO_CLOSE 1
|
||||
|
||||
/* On NetWare, stack grows towards lower address*/
|
||||
#define STACK_DIRECTION -1
|
||||
|
||||
/* On NetWare, we need to set stack size for threads, otherwise default 16K is used */
|
||||
#define NW_THD_STACKSIZE 65536
|
||||
|
||||
/* On NetWare, to fix the problem with the deletion of open files */
|
||||
#define CANT_DELETE_OPEN_FILES 1
|
||||
|
||||
#define FN_LIBCHAR '\\'
|
||||
#define FN_ROOTDIR "\\"
|
||||
#define FN_DEVCHAR ':'
|
||||
|
||||
/* default directory information */
|
||||
#define DEFAULT_MYSQL_HOME "sys:/mysql"
|
||||
#define PACKAGE "mysql"
|
||||
#define DEFAULT_BASEDIR "sys:/"
|
||||
#define SHAREDIR "share/"
|
||||
#define DEFAULT_CHARSET_HOME "sys:/mysql/"
|
||||
#define DATADIR "data/"
|
||||
|
||||
/* 64-bit file system calls */
|
||||
#define SIZEOF_OFF_T 8
|
||||
#define off_t off64_t
|
||||
#define chsize chsize64
|
||||
#define ftruncate ftruncate64
|
||||
#define lseek lseek64
|
||||
#define pread pread64
|
||||
#define pwrite pwrite64
|
||||
#define tell tell64
|
||||
|
||||
/* do not use the extended time in LibC sys\stat.h */
|
||||
#define _POSIX_SOURCE
|
||||
|
||||
/* Some macros for portability */
|
||||
|
||||
#define set_timespec(ABSTIME,SEC) { (ABSTIME).tv_sec=time(NULL)+(SEC); (ABSTIME).tv_nsec=0; }
|
||||
|
||||
/* extra protection against CPU Hogs on NetWare */
|
||||
#define NETWARE_YIELD pthread_yield()
|
||||
/* Screen mode for help texts */
|
||||
#define NETWARE_SET_SCREEN_MODE(A) setscreenmode(A)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _config_netware_h */
|
||||
|
|
@ -1,835 +0,0 @@
|
|||
/* Copyright (C) 2000 MySQL AB & Yuri Dario
|
||||
All the above parties has a full, independent copyright to
|
||||
the following code, including the right to use the code in
|
||||
any manner without any demands from the other parties.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; version 2
|
||||
of the License.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
||||
MA 02111-1307, USA */
|
||||
|
||||
/* Defines for OS2 to make it compatible for MySQL */
|
||||
|
||||
#ifndef __CONFIG_OS2_H__
|
||||
#define __CONFIG_OS2_H__
|
||||
|
||||
#include <os2.h>
|
||||
#include <math.h>
|
||||
#include <io.h>
|
||||
#include <types.h>
|
||||
|
||||
/* Define to name of system eg solaris*/
|
||||
#define SYSTEM_TYPE "IBM OS/2 Warp"
|
||||
/* Define to machine type name eg sun10 */
|
||||
#define MACHINE_TYPE "i686"
|
||||
/* Name of package */
|
||||
#define PACKAGE "mysql"
|
||||
/* Version number of package */
|
||||
#define VERSION MYSQL_SERVER_VERSION
|
||||
/* 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 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 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 O_NONBLOCK 0x10
|
||||
|
||||
#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 sleep(A) DosSleep((A)*1000)
|
||||
#define closesocket(A) soclose(A)
|
||||
|
||||
#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 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 HUGE_PTR
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
double _cdecl rint( double nr);
|
||||
|
||||
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)
|
||||
|
||||
void* dlopen( char* path, int flag);
|
||||
char* dlerror( void);
|
||||
void* dlsym( void* hmod, char* fn);
|
||||
void dlclose( void* hmod);
|
||||
|
||||
/* Some typedefs */
|
||||
typedef unsigned long long os_off_t;
|
||||
|
||||
/* config.h. Generated automatically by configure. */
|
||||
/* config.h.in. Generated automatically from configure.in by autoheader. */
|
||||
|
||||
/* Define if using alloca.c. */
|
||||
/* #undef C_ALLOCA */
|
||||
|
||||
/* Define to empty if the keyword does not work. */
|
||||
/* #undef const */
|
||||
|
||||
/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
|
||||
This function is required for alloca.c support on those systems. */
|
||||
/* #undef CRAY_STACKSEG_END */
|
||||
|
||||
/* Define if you have alloca, as a function or macro. */
|
||||
#define HAVE_ALLOCA 1
|
||||
|
||||
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
|
||||
/* #define HAVE_ALLOCA_H 1 */
|
||||
|
||||
/* Define if you don't have vprintf but do have _doprnt. */
|
||||
/* #undef HAVE_DOPRNT */
|
||||
|
||||
/* Define if you have a working `mmap' system call. */
|
||||
/* #undef HAVE_MMAP */
|
||||
|
||||
/* Define if system calls automatically restart after interruption
|
||||
by a signal. */
|
||||
/* #undef HAVE_RESTARTABLE_SYSCALLS */
|
||||
|
||||
/* 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 HAVE_SYS_WAIT_H 1 */
|
||||
|
||||
/* Define if you don't have tm_zone but do have the external array
|
||||
tzname. */
|
||||
#define HAVE_TZNAME 1
|
||||
|
||||
/* Define if utime(file, NULL) sets file's timestamp to the present. */
|
||||
#define HAVE_UTIME_NULL 1
|
||||
|
||||
/* Define if you have the vprintf function. */
|
||||
#define HAVE_VPRINTF 1
|
||||
|
||||
/* Define as __inline if that's what the C compiler calls it. */
|
||||
/* #undef inline */
|
||||
|
||||
/* 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 RETSIGTYPE void
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> doesn't define. */
|
||||
/* #undef size_t */
|
||||
|
||||
/* If using the C implementation of alloca, define if you know the
|
||||
direction of stack growth for your system; otherwise it will be
|
||||
automatically deduced at run-time.
|
||||
STACK_DIRECTION > 0 => grows toward higher addresses
|
||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||
STACK_DIRECTION = 0 => direction of growth unknown
|
||||
*/
|
||||
#define STACK_DIRECTION -1
|
||||
|
||||
/* 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 STDC_HEADERS 1
|
||||
|
||||
/* Define if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#define TIME_WITH_SYS_TIME 1
|
||||
|
||||
/* Define if your <sys/time.h> declares struct tm. */
|
||||
/* #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). */
|
||||
/* #undef WORDS_BIGENDIAN */
|
||||
|
||||
/* Version of .frm files */
|
||||
#define DOT_FRM_VERSION 6
|
||||
|
||||
/* READLINE: */
|
||||
#define FIONREAD_IN_SYS_IOCTL 1
|
||||
|
||||
/* READLINE: Define if your system defines TIOCGWINSZ in sys/ioctl.h. */
|
||||
/* #undef GWINSZ_IN_SYS_IOCTL */
|
||||
|
||||
/* Do we have FIONREAD */
|
||||
#define FIONREAD_IN_SYS_IOCTL 1
|
||||
|
||||
/* atomic_add() from <asm/atomic.h> (Linux only) */
|
||||
/* #undef HAVE_ATOMIC_ADD */
|
||||
|
||||
/* atomic_sub() from <asm/atomic.h> (Linux only) */
|
||||
/* #undef HAVE_ATOMIC_SUB */
|
||||
|
||||
/* bool is not defined by all C++ compilators */
|
||||
#define HAVE_BOOL 1
|
||||
|
||||
/* Have berkeley db installed */
|
||||
/* #define HAVE_BERKELEY_DB 1 */
|
||||
|
||||
/* DSB style signals ? */
|
||||
/* #undef HAVE_BSD_SIGNALS */
|
||||
|
||||
/* Can netinet be included */
|
||||
/* #undef HAVE_BROKEN_NETINET_INCLUDES */
|
||||
|
||||
/* READLINE: */
|
||||
/* #undef HAVE_BSD_SIGNALS */
|
||||
|
||||
/* ZLIB and compress: */
|
||||
#define HAVE_COMPRESS 1
|
||||
|
||||
/* Define if we are using OSF1 DEC threads */
|
||||
/* #undef HAVE_DEC_THREADS */
|
||||
|
||||
/* Define if we are using OSF1 DEC threads on 3.2 */
|
||||
/* #undef HAVE_DEC_3_2_THREADS */
|
||||
|
||||
/* fp_except from ieeefp.h */
|
||||
/* #undef HAVE_FP_EXCEPT */
|
||||
|
||||
/* READLINE: */
|
||||
/* #undef HAVE_GETPW_DECLS */
|
||||
|
||||
/* Solaris define gethostbyname_r with 5 arguments. glibc2 defines
|
||||
this with 6 arguments */
|
||||
/* #undef HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE */
|
||||
|
||||
/* In OSF 4.0f the 3'd argument to gethostname_r is hostent_data * */
|
||||
/* #undef HAVE_GETHOSTBYNAME_R_RETURN_INT */
|
||||
|
||||
/* Define if int8, int16 and int32 types exist */
|
||||
/* #undef HAVE_INT_8_16_32 */
|
||||
|
||||
/* Define if have -lwrap */
|
||||
/* #undef HAVE_LIBWRAP */
|
||||
|
||||
/* Define if we are using Xavier Leroy's LinuxThreads */
|
||||
/* #undef HAVE_LINUXTHREADS */
|
||||
|
||||
/* Do we use user level threads */
|
||||
/* #undef HAVE_mit_thread */
|
||||
|
||||
/* For some non posix threads */
|
||||
/* #undef HAVE_NONPOSIX_PTHREAD_GETSPECIFIC */
|
||||
|
||||
/* For some non posix threads */
|
||||
/* #undef HAVE_NONPOSIX_PTHREAD_MUTEX_INIT */
|
||||
|
||||
/* READLINE: */
|
||||
#define HAVE_POSIX_SIGNALS 0
|
||||
|
||||
/* sigwait with one argument */
|
||||
/* #undef HAVE_NONPOSIX_SIGWAIT */
|
||||
|
||||
/* pthread_attr_setscope */
|
||||
#define HAVE_PTHREAD_ATTR_SETSCOPE 1
|
||||
|
||||
/* POSIX readdir_r */
|
||||
/* #undef HAVE_READDIR_R */
|
||||
|
||||
/* POSIX sigwait */
|
||||
/* #undef HAVE_SIGWAIT */
|
||||
|
||||
/* crypt */
|
||||
#define HAVE_CRYPT 1
|
||||
|
||||
/* Solaris define gethostbyaddr_r with 7 arguments. glibc2 defines
|
||||
this with 8 arguments */
|
||||
/* #undef HAVE_SOLARIS_STYLE_GETHOST */
|
||||
|
||||
/* Timespec has a ts_sec instead of tv_sev */
|
||||
#define HAVE_TIMESPEC_TS_SEC 1
|
||||
|
||||
/* Have the tzname variable */
|
||||
#define HAVE_TZNAME 1
|
||||
|
||||
/* Define if the system files define uchar */
|
||||
/* #undef HAVE_UCHAR */
|
||||
|
||||
/* Define if the system files define uint */
|
||||
/* #undef HAVE_UINT */
|
||||
|
||||
/* Define if the system files define ulong */
|
||||
/* #undef HAVE_ULONG */
|
||||
|
||||
/* UNIXWARE7 threads are not posix */
|
||||
/* #undef HAVE_UNIXWARE7_THREADS */
|
||||
|
||||
/* new UNIXWARE7 threads that are not yet posix */
|
||||
/* #undef HAVE_UNIXWARE7_POSIX */
|
||||
|
||||
/* READLINE: */
|
||||
/* #undef HAVE_USG_SIGHOLD */
|
||||
|
||||
/* Define if want -lwrap */
|
||||
/* #undef LIBWRAP */
|
||||
|
||||
/* mysql client protocoll version */
|
||||
#define PROTOCOL_VERSION 10
|
||||
|
||||
/* Define if qsort returns void */
|
||||
#define QSORT_TYPE_IS_VOID 1
|
||||
|
||||
/* Define as the return type of qsort (int or void). */
|
||||
#define RETQSORTTYPE void
|
||||
|
||||
/* Define as the base type of the last arg to accept */
|
||||
#define SOCKET_SIZE_TYPE int
|
||||
|
||||
/* Last argument to get/setsockopt */
|
||||
/* #undef SOCKOPT_OPTLEN_TYPE */
|
||||
|
||||
/* #undef SPEED_T_IN_SYS_TYPES */
|
||||
/* #undef SPRINTF_RETURNS_PTR */
|
||||
#define SPRINTF_RETURNS_INT 1
|
||||
/* #undef SPRINTF_RETURNS_GARBAGE */
|
||||
|
||||
/* #undef STRUCT_DIRENT_HAS_D_FILENO */
|
||||
#define STRUCT_DIRENT_HAS_D_INO 1
|
||||
|
||||
/* Define if you want to have threaded code. This may be undef on client code */
|
||||
#define THREAD 1
|
||||
|
||||
/* Should be client be thread safe */
|
||||
/* #undef THREAD_SAFE_CLIENT */
|
||||
|
||||
/* READLINE: */
|
||||
/* #undef TIOCSTAT_IN_SYS_IOCTL */
|
||||
|
||||
/* Use multi-byte character routines */
|
||||
/* #undef USE_MB */
|
||||
/* #undef USE_MB_IDENT */
|
||||
|
||||
/* Use MySQL RAID */
|
||||
/* #undef USE_RAID */
|
||||
|
||||
/* Use strcoll() functions when comparing and sorting. */
|
||||
/* #undef USE_STRCOLL */
|
||||
|
||||
/* READLINE: */
|
||||
#define VOID_SIGHANDLER 1
|
||||
|
||||
/* The number of bytes in a char. */
|
||||
#define SIZEOF_CHAR 1
|
||||
|
||||
/* The number of bytes in a int. */
|
||||
#define SIZEOF_INT 4
|
||||
|
||||
/* The number of bytes in a long. */
|
||||
#define SIZEOF_LONG 4
|
||||
|
||||
/* The number of bytes in a long long. */
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
|
||||
/* Define if you have the alarm function. */
|
||||
#define HAVE_ALARM 1
|
||||
|
||||
/* Define if you have the atod function. */
|
||||
/* #undef HAVE_ATOD */
|
||||
|
||||
/* Define if you have the bcmp function. */
|
||||
#define HAVE_BCMP 1
|
||||
|
||||
/* Define if you have the bfill function. */
|
||||
/* #undef HAVE_BFILL */
|
||||
|
||||
/* Define if you have the bmove function. */
|
||||
/* #undef HAVE_BMOVE */
|
||||
|
||||
/* Define if you have the bzero function. */
|
||||
#define HAVE_BZERO 1
|
||||
|
||||
/* Define if you have the chsize function. */
|
||||
#define HAVE_CHSIZE 1
|
||||
|
||||
/* Define if you have the cuserid function. */
|
||||
/* #define HAVE_CUSERID 1 */
|
||||
|
||||
/* Define if you have the dlerror function. */
|
||||
#define HAVE_DLERROR 1
|
||||
|
||||
/* Define if you have the dlopen function. */
|
||||
#define HAVE_DLOPEN 1
|
||||
|
||||
/* Define if you have the fchmod function. */
|
||||
/* #undef HAVE_FCHMOD */
|
||||
|
||||
/* Define if you have the fcntl function. */
|
||||
/* #define HAVE_FCNTL 1 */
|
||||
|
||||
/* Define if you have the fconvert function. */
|
||||
/* #undef HAVE_FCONVERT */
|
||||
|
||||
/* Define if you have the finite function. */
|
||||
/* #undef HAVE_FINITE */
|
||||
|
||||
/* Define if you have the fpresetsticky function. */
|
||||
/* #undef HAVE_FPRESETSTICKY */
|
||||
|
||||
/* Define if you have the fpsetmask function. */
|
||||
/* #undef HAVE_FPSETMASK */
|
||||
|
||||
/* Define if you have the fseeko function. */
|
||||
/* #undef HAVE_FSEEKO */
|
||||
|
||||
/* Define if you have the ftruncate function. */
|
||||
/* #define HAVE_FTRUNCATE 1 */
|
||||
|
||||
/* Define if you have the getcwd function. */
|
||||
#define HAVE_GETCWD 1
|
||||
|
||||
/* Define if you have the gethostbyaddr_r function. */
|
||||
/* #undef HAVE_GETHOSTBYADDR_R */
|
||||
|
||||
/* Define if you have the gethostbyname_r function. */
|
||||
/* #undef HAVE_GETHOSTBYNAME_R */
|
||||
|
||||
/* Define if you have the getpagesize function. */
|
||||
#define HAVE_GETPAGESIZE 1
|
||||
|
||||
/* Define if you have the getpass function. */
|
||||
/*#define HAVE_GETPASS 1 */
|
||||
|
||||
/* Define if you have the getpassphrase function. */
|
||||
/* #undef HAVE_GETPASSPHRASE */
|
||||
|
||||
/* Define if you have the getpwnam function. */
|
||||
/* #define HAVE_GETPWNAM 1 */
|
||||
|
||||
/* Define if you have the getpwuid function. */
|
||||
/* #define HAVE_GETPWUID 1 */
|
||||
|
||||
/* Define if you have the getrlimit function. */
|
||||
/* #undef HAVE_GETRLIMIT */
|
||||
|
||||
/* Define if you have the getrusage function. */
|
||||
/* #undef HAVE_GETRUSAGE */
|
||||
|
||||
/* Define if you have the getwd function. */
|
||||
#define HAVE_GETWD 1
|
||||
|
||||
/* Define to 1 if you have the `gmtime_r' function. */
|
||||
#define HAVE_GMTIME_R 1
|
||||
|
||||
/* Define if you have the index function. */
|
||||
#define HAVE_INDEX 1
|
||||
|
||||
/* Define if you have the initgroups function. */
|
||||
/* #undef HAVE_INITGROUPS */
|
||||
|
||||
/* Define if you have the localtime_r function. */
|
||||
#define HAVE_LOCALTIME_R 1
|
||||
|
||||
/* Define if you have the locking function. */
|
||||
/* #undef HAVE_LOCKING */
|
||||
|
||||
/* Define if you have the longjmp function. */
|
||||
#define HAVE_LONGJMP 1
|
||||
|
||||
/* Define if you have the lrand48 function. */
|
||||
/* #undef HAVE_LRAND48 */
|
||||
|
||||
/* Define if you have the lstat function. */
|
||||
/* #undef HAVE_LSTAT */
|
||||
|
||||
/* Define if you have the madvise function. */
|
||||
/* #undef HAVE_MADVISE */
|
||||
|
||||
/* Define if you have the memcpy function. */
|
||||
#define HAVE_MEMCPY 1
|
||||
|
||||
/* Define if you have the memmove function. */
|
||||
#define HAVE_MEMMOVE 1
|
||||
|
||||
/* Define if you have the mkstemp function. */
|
||||
/* #define HAVE_MKSTEMP 1 */
|
||||
|
||||
/* Define if you have the mlockall function. */
|
||||
/* #undef HAVE_MLOCKALL */
|
||||
|
||||
/* Define if you have the perror function. */
|
||||
#define HAVE_PERROR 1
|
||||
|
||||
/* Define if you have the poll function. */
|
||||
/* #undef HAVE_POLL */
|
||||
|
||||
/* Define if you have the pread function. */
|
||||
/* #undef HAVE_PREAD */
|
||||
|
||||
/* Define if you have the pthread_attr_create function. */
|
||||
/* #undef HAVE_PTHREAD_ATTR_CREATE */
|
||||
|
||||
/* Define if you have the pthread_attr_setprio function. */
|
||||
#define HAVE_PTHREAD_ATTR_SETPRIO 1
|
||||
|
||||
/* Define if you have the pthread_attr_setschedparam function. */
|
||||
/* #undef HAVE_PTHREAD_ATTR_SETSCHEDPARAM */
|
||||
|
||||
/* Define if you have the pthread_attr_setstacksize function. */
|
||||
#define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1
|
||||
|
||||
/* Define if you have the pthread_condattr_create function. */
|
||||
/* #undef HAVE_PTHREAD_CONDATTR_CREATE */
|
||||
|
||||
/* Define if you have the pthread_getsequence_np function. */
|
||||
/* #undef HAVE_PTHREAD_GETSEQUENCE_NP */
|
||||
|
||||
/* Define if you have the pthread_init function. */
|
||||
/* #undef HAVE_PTHREAD_INIT */
|
||||
|
||||
/* Define if you have the pthread_rwlock_rdlock function. */
|
||||
/* #undef HAVE_PTHREAD_RWLOCK_RDLOCK */
|
||||
|
||||
/* Define if you have the pthread_setprio function. */
|
||||
#define HAVE_PTHREAD_SETPRIO 1
|
||||
|
||||
/* Define if you have the pthread_setprio_np function. */
|
||||
/* #undef HAVE_PTHREAD_SETPRIO_NP */
|
||||
|
||||
/* Define if you have the pthread_setschedparam function. */
|
||||
/* #undef HAVE_PTHREAD_SETSCHEDPARAM */
|
||||
|
||||
/* Define if you have the pthread_sigmask function. */
|
||||
#define HAVE_PTHREAD_SIGMASK 1
|
||||
|
||||
/* Define if you have the putenv function. */
|
||||
#define HAVE_PUTENV 1
|
||||
|
||||
/* Define if you have the readlink function. */
|
||||
/* #undef HAVE_READLINK */
|
||||
|
||||
/* Define if you have the realpath function. */
|
||||
/* #undef HAVE_REALPATH */
|
||||
|
||||
/* Define if you have the rename function. */
|
||||
#define HAVE_RENAME 1
|
||||
|
||||
/* Define if you have the rint function. */
|
||||
#define HAVE_RINT 1
|
||||
|
||||
/* Define if you have the rwlock_init function. */
|
||||
/* #undef HAVE_RWLOCK_INIT */
|
||||
|
||||
/* Define if you have the select function. */
|
||||
#define HAVE_SELECT 1
|
||||
|
||||
/* Define if you have the setenv function. */
|
||||
/* #undef HAVE_SETENV */
|
||||
|
||||
/* Define if you have the setlocale function. */
|
||||
#define HAVE_SETLOCALE 1
|
||||
|
||||
/* Define if you have the setupterm function. */
|
||||
/* #undef HAVE_SETUPTERM */
|
||||
|
||||
/* Define if you have the sighold function. */
|
||||
/* #undef HAVE_SIGHOLD */
|
||||
|
||||
/* Define if you have the sigset function. */
|
||||
/* #undef HAVE_SIGSET */
|
||||
|
||||
/* Define if you have the sigthreadmask function. */
|
||||
/* #undef HAVE_SIGTHREADMASK */
|
||||
|
||||
/* Define if you have the snprintf function. */
|
||||
/* #define HAVE_SNPRINTF 1 */
|
||||
|
||||
/* Define if you have the socket function. */
|
||||
#define HAVE_SOCKET 1
|
||||
|
||||
/* Define if you have the stpcpy function. */
|
||||
/* #undef HAVE_STPCPY */
|
||||
|
||||
/* Define if you have the strcasecmp function. */
|
||||
/* #undef HAVE_STRCASECMP */
|
||||
|
||||
/* Define if you have the strcoll function. */
|
||||
#define HAVE_STRCOLL 1
|
||||
|
||||
/* Define if you have the strerror function. */
|
||||
#define HAVE_STRERROR 1
|
||||
|
||||
/* Define if you have the strnlen function. */
|
||||
/* #undef HAVE_STRNLEN */
|
||||
|
||||
/* Define if you have the strpbrk function. */
|
||||
#define HAVE_STRPBRK 1
|
||||
|
||||
/* Define if you have the strstr function. */
|
||||
#define HAVE_STRSTR 1
|
||||
|
||||
/* Define if you have the strtok_r function. */
|
||||
/* #undef HAVE_STRTOK_R */
|
||||
|
||||
/* Define if you have the strtol function. */
|
||||
#define HAVE_STRTOL 1
|
||||
|
||||
/* Define if you have the strtoul function. */
|
||||
#define HAVE_STRTOUL 1
|
||||
|
||||
/* Define if you have the strtoull function. */
|
||||
/* #undef HAVE_STRTOULL */
|
||||
|
||||
/* Define if you have the tcgetattr function. */
|
||||
#define HAVE_TCGETATTR 1
|
||||
|
||||
/* Define if you have the tell function. */
|
||||
#define HAVE_TELL 1
|
||||
|
||||
/* Define if you have the tempnam function. */
|
||||
#define HAVE_TEMPNAM 1
|
||||
|
||||
/* Define if you have the thr_setconcurrency function. */
|
||||
/* #undef HAVE_THR_SETCONCURRENCY */
|
||||
|
||||
/* Define if you have the vidattr function. */
|
||||
/* #undef HAVE_VIDATTR */
|
||||
|
||||
/* Define if you have the <alloca.h> header file. */
|
||||
/* #define HAVE_ALLOCA_H 1 */
|
||||
|
||||
/* Define if you have the <arpa/inet.h> header file. */
|
||||
#define HAVE_ARPA_INET_H 1
|
||||
|
||||
/* Define if you have the <asm/termbits.h> header file. */
|
||||
/* #undef HAVE_ASM_TERMBITS_H */
|
||||
|
||||
/* Define if you have the <crypt.h> header file. */
|
||||
#define HAVE_CRYPT_H 1
|
||||
|
||||
/* Define if you have the <curses.h> header file. */
|
||||
/* #define HAVE_CURSES_H 1 */
|
||||
|
||||
/* Define if you have the <dirent.h> header file. */
|
||||
/* #define HAVE_DIRENT_H 1 */
|
||||
|
||||
/* Define if you have the <fcntl.h> header file. */
|
||||
#define HAVE_FCNTL_H 1
|
||||
|
||||
/* Define if you have the <float.h> header file. */
|
||||
#define HAVE_FLOAT_H 1
|
||||
|
||||
/* Define if you have the <floatingpoint.h> header file. */
|
||||
/* #undef HAVE_FLOATINGPOINT_H */
|
||||
|
||||
/* Define if you have the <grp.h> header file. */
|
||||
/* #define HAVE_GRP_H 1 */
|
||||
|
||||
/* Define if you have the <ieeefp.h> header file. */
|
||||
/* #undef HAVE_IEEEFP_H */
|
||||
|
||||
/* Define if you have the <limits.h> header file. */
|
||||
#define HAVE_LIMITS_H 1
|
||||
|
||||
/* Define if you have the <locale.h> header file. */
|
||||
#define HAVE_LOCALE_H 1
|
||||
|
||||
/* Define if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define if you have the <ndir.h> header file. */
|
||||
/* #undef HAVE_NDIR_H */
|
||||
|
||||
/* Define if you have the <netinet/in.h> header file. */
|
||||
#define HAVE_NETINET_IN_H 1
|
||||
|
||||
/* Define if you have the <paths.h> header file. */
|
||||
/* #undef HAVE_PATHS_H */
|
||||
|
||||
/* Define if you have the <pwd.h> header file. */
|
||||
/* #define HAVE_PWD_H 1 */
|
||||
|
||||
/* Define if you have the <sched.h> header file. */
|
||||
/* #undef HAVE_SCHED_H */
|
||||
|
||||
/* Define if you have the <select.h> header file. */
|
||||
/* #undef HAVE_SELECT_H */
|
||||
|
||||
/* Define if you have the <stdarg.h> header file. */
|
||||
#define HAVE_STDARG_H 1
|
||||
|
||||
/* Define if you have the <stddef.h> header file. */
|
||||
#define HAVE_STDDEF_H 1
|
||||
|
||||
/* Define if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define if you have the <strings.h> header file. */
|
||||
/* #define HAVE_STRINGS_H 1 */
|
||||
|
||||
/* Define if you have the <synch.h> header file. */
|
||||
/* #undef HAVE_SYNCH_H */
|
||||
|
||||
/* Define if you have the <sys/dir.h> header file. */
|
||||
/* #define HAVE_SYS_DIR_H 1 */
|
||||
|
||||
/* Define if you have the <sys/file.h> header file. */
|
||||
/* #define HAVE_SYS_FILE_H 1 */
|
||||
|
||||
/* Define if you have the <sys/ioctl.h> header file. */
|
||||
#define HAVE_SYS_IOCTL_H 1
|
||||
|
||||
/* Define if you have the <sys/mman.h> header file. */
|
||||
/* #undef HAVE_SYS_MMAN_H */
|
||||
|
||||
/* Define if you have the <sys/ndir.h> header file. */
|
||||
/* #undef HAVE_SYS_NDIR_H */
|
||||
|
||||
/* Define if you have the <sys/pte.h> header file. */
|
||||
/* #undef HAVE_SYS_PTE_H */
|
||||
|
||||
/* Define if you have the <sys/ptem.h> header file. */
|
||||
/* #undef HAVE_SYS_PTEM_H */
|
||||
|
||||
/* Define if you have the <sys/select.h> header file. */
|
||||
#define HAVE_SYS_SELECT_H 1
|
||||
|
||||
/* Define if you have the <sys/socket.h> header file. */
|
||||
#define HAVE_SYS_SOCKET_H 1
|
||||
|
||||
/* Define if you have the <sys/stream.h> header file. */
|
||||
/* #undef HAVE_SYS_STREAM_H */
|
||||
|
||||
/* Define if you have the <sys/timeb.h> header file. */
|
||||
#define HAVE_SYS_TIMEB_H 1
|
||||
|
||||
/* Define if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define if you have the <sys/un.h> header file. */
|
||||
#define HAVE_SYS_UN_H 1
|
||||
|
||||
/* 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. */
|
||||
/* #undef HAVE_SYS_VADVISE_H */
|
||||
|
||||
/* Define if you have the <sys/wait.h> header file. */
|
||||
/* #define HAVE_SYS_WAIT_H 1 */
|
||||
|
||||
/* Define if you have the <term.h> header file. */
|
||||
/* #undef HAVE_TERM_H */
|
||||
|
||||
/* Define if you have the <termbits.h> header file. */
|
||||
/* #undef HAVE_TERMBITS_H */
|
||||
|
||||
/* Define if you have the <termcap.h> header file. */
|
||||
/* #define HAVE_TERMCAP_H 1 */
|
||||
|
||||
/* Define if you have the <termio.h> header file. */
|
||||
/* /#define HAVE_TERMIO_H 1 */
|
||||
|
||||
/* Define if you have the <termios.h> header file. */
|
||||
/* #define HAVE_TERMIOS_H 1 */
|
||||
|
||||
/* Define if you have the <unistd.h> header file. */
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
/* Define if you have the <utime.h> header file. */
|
||||
#define HAVE_UTIME_H 1
|
||||
|
||||
/* Define if you have the <varargs.h> header file. */
|
||||
#define HAVE_VARARGS_H 1
|
||||
|
||||
/* Define if you have the bind library (-lbind). */
|
||||
/* #undef HAVE_LIBBIND */
|
||||
|
||||
/* Define if you have the c_r library (-lc_r). */
|
||||
/* #undef HAVE_LIBC_R */
|
||||
|
||||
/* Define if you have the compat library (-lcompat). */
|
||||
/* #undef HAVE_LIBCOMPAT */
|
||||
|
||||
/* Define if you have the crypt library (-lcrypt). */
|
||||
#define HAVE_LIBCRYPT 1
|
||||
|
||||
/* Define if you have the dl library (-ldl). */
|
||||
#define HAVE_LIBDL 1
|
||||
|
||||
/* 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). */
|
||||
/* #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). */
|
||||
/* #undef HAVE_LIBPTHREAD */
|
||||
|
||||
/* Define if you have the socket library (-lsocket). */
|
||||
/* #undef HAVE_LIBSOCKET */
|
||||
|
||||
/* Number of bits in a file offset, on hosts where this is settable. */
|
||||
/* #undef _FILE_OFFSET_BITS */
|
||||
|
||||
/* Define to make fseeko etc. visible, on some hosts. */
|
||||
/* #undef _LARGEFILE_SOURCE */
|
||||
|
||||
/* Define for large files, on AIX-style hosts. */
|
||||
/* #undef _LARGE_FILES */
|
||||
|
||||
#endif /* __CONFIG_OS2_H__ */
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2000 MySQL AB
|
||||
/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -15,14 +15,7 @@
|
|||
|
||||
/* Defines for Win32 to make it compatible for MySQL */
|
||||
|
||||
#ifdef __WIN2000__
|
||||
/* We have to do this define before including windows.h to get the AWE API
|
||||
functions */
|
||||
#define _WIN32_WINNT 0x0500
|
||||
#else
|
||||
/* Get NT 4.0 functions */
|
||||
#define _WIN32_WINNT 0x0400
|
||||
#endif
|
||||
#define BIG_TABLES
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 1400
|
||||
/* Avoid endless warnings about sprintf() etc. being unsafe. */
|
||||
|
|
@ -30,13 +23,11 @@ functions */
|
|||
#endif
|
||||
|
||||
#include <sys/locking.h>
|
||||
#include <windows.h>
|
||||
#include <math.h> /* Because of rint() */
|
||||
#include <winsock2.h>
|
||||
#include <fcntl.h>
|
||||
#include <io.h>
|
||||
#include <malloc.h>
|
||||
|
||||
#define BIG_TABLES 1
|
||||
#define HAVE_SMEM 1
|
||||
|
||||
#if defined(_WIN64) || defined(WIN64)
|
||||
|
|
@ -98,7 +89,7 @@ functions */
|
|||
#define O_SHORT_LIVED 0
|
||||
#define SH_DENYNO _SH_DENYNO
|
||||
#else
|
||||
#define O_BINARY _O_BINARY /* compability with MSDOS */
|
||||
#define O_BINARY _O_BINARY /* compability with older style names */
|
||||
#define FILE_BINARY _O_BINARY /* my_fopen in binary mode */
|
||||
#define O_TEMPORARY _O_TEMPORARY
|
||||
#define O_SHORT_LIVED _O_SHORT_LIVED
|
||||
|
|
@ -125,12 +116,12 @@ functions */
|
|||
|
||||
/* Type information */
|
||||
|
||||
#if defined(__EMX__) || !defined(HAVE_UINT)
|
||||
#if !defined(HAVE_UINT)
|
||||
#undef HAVE_UINT
|
||||
#define HAVE_UINT
|
||||
typedef unsigned short ushort;
|
||||
typedef unsigned int uint;
|
||||
#endif /* defined(__EMX__) || !defined(HAVE_UINT) */
|
||||
#endif /* !defined(HAVE_UINT) */
|
||||
|
||||
typedef unsigned __int64 ulonglong; /* Microsofts 64 bit types */
|
||||
typedef __int64 longlong;
|
||||
|
|
@ -157,25 +148,24 @@ typedef uint rf_SetTimer;
|
|||
|
||||
#define Socket_defined
|
||||
#define my_socket SOCKET
|
||||
#define bool BOOL
|
||||
#define SIGPIPE SIGINT
|
||||
#define RETQSORTTYPE void
|
||||
#define QSORT_TYPE_IS_VOID
|
||||
#define RETSIGTYPE void
|
||||
#define SOCKET_SIZE_TYPE int
|
||||
#define my_socket_defined
|
||||
#define bool_defined
|
||||
#define byte_defined
|
||||
#define HUGE_PTR
|
||||
#define STDCALL __stdcall /* Used by libmysql.dll */
|
||||
#define isnan(X) _isnan(X)
|
||||
#define finite(X) _finite(X)
|
||||
|
||||
#ifndef UNDEF_THREAD_HACK
|
||||
#ifndef MYSQL_CLIENT_NO_THREADS
|
||||
#define THREAD
|
||||
#endif
|
||||
#define VOID_SIGHANDLER
|
||||
#define SIZEOF_CHAR 1
|
||||
#define SIZEOF_INT 4
|
||||
#define SIZEOF_LONG 4
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#define SIZEOF_OFF_T 8
|
||||
|
|
@ -197,11 +187,6 @@ typedef uint rf_SetTimer;
|
|||
#define SIGNAL_WITH_VIO_CLOSE
|
||||
#endif
|
||||
|
||||
/* Use all character sets in MySQL */
|
||||
#define USE_MB 1
|
||||
#define USE_MB_IDENT 1
|
||||
#define USE_STRCOLL 1
|
||||
|
||||
/* All windows servers should support .sym files */
|
||||
#undef USE_SYMDIR
|
||||
#define USE_SYMDIR
|
||||
|
|
@ -209,6 +194,9 @@ typedef uint rf_SetTimer;
|
|||
/* If LOAD DATA LOCAL INFILE should be enabled by default */
|
||||
#define ENABLED_LOCAL_INFILE 1
|
||||
|
||||
/* If query profiling should be enabled by default */
|
||||
#define ENABLED_PROFILING 1
|
||||
|
||||
/* Convert some simple functions to Posix */
|
||||
|
||||
#define my_sigset(A,B) signal((A),(B))
|
||||
|
|
@ -225,13 +213,6 @@ typedef uint rf_SetTimer;
|
|||
#define inline __inline
|
||||
#endif /* __cplusplus */
|
||||
|
||||
inline double rint(double nr)
|
||||
{
|
||||
double f = floor(nr);
|
||||
double c = ceil(nr);
|
||||
return (((c-nr) >= (nr-f)) ? f :c);
|
||||
}
|
||||
|
||||
#ifdef _WIN64
|
||||
#define ulonglong2double(A) ((double) (ulonglong) (A))
|
||||
#define my_off_t2double(A) ((double) (my_off_t) (A))
|
||||
|
|
@ -247,66 +228,24 @@ inline double ulonglong2double(ulonglong value)
|
|||
#define my_off_t2double(A) ulonglong2double(A)
|
||||
#endif /* _WIN64 */
|
||||
|
||||
inline ulonglong double2ulonglong(double d)
|
||||
{
|
||||
double t= d - (double) 0x8000000000000000ULL;
|
||||
|
||||
if (t >= 0)
|
||||
return ((ulonglong) t) + 0x8000000000000000ULL;
|
||||
return (ulonglong) d;
|
||||
}
|
||||
|
||||
#if SIZEOF_OFF_T > 4
|
||||
#define lseek(A,B,C) _lseeki64((A),(longlong) (B),(C))
|
||||
#define tell(A) _telli64(A)
|
||||
#endif
|
||||
|
||||
|
||||
#define STACK_DIRECTION -1
|
||||
|
||||
/* 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)))
|
||||
/*
|
||||
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 doublestore(T,V) do { *((long *) T) = *((long*) &V); \
|
||||
*(((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))
|
||||
#define float8get(V,M) doubleget((V),(M))
|
||||
#define float4store(V,M) memcpy((byte*) V,(byte*) (&M),sizeof(float))
|
||||
#define float8store(V,M) doublestore((V),(M))
|
||||
#endif /* _WIN64 */
|
||||
/* Difference between GetSystemTimeAsFileTime() and now() */
|
||||
#define OFFSET_TO_EPOCH ULL(116444736000000000)
|
||||
|
||||
#define HAVE_PERROR
|
||||
#define HAVE_VFPRINT
|
||||
|
|
@ -328,7 +267,6 @@ inline double ulonglong2double(ulonglong value)
|
|||
#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_ALLOCA
|
||||
#define HAVE_STRPBRK
|
||||
|
|
@ -341,7 +279,14 @@ inline double ulonglong2double(ulonglong value)
|
|||
#define SPRINTF_RETURNS_INT
|
||||
#define HAVE_SETFILEPOINTER
|
||||
#define HAVE_VIO_READ_BUFF
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 1400
|
||||
/* strnlen() appeared in Studio 2005 */
|
||||
#define HAVE_STRNLEN
|
||||
#endif
|
||||
#define HAVE_WINSOCK2
|
||||
|
||||
#define strcasecmp stricmp
|
||||
#define strncasecmp strnicmp
|
||||
|
||||
#ifndef __NT__
|
||||
#undef FILE_SHARE_DELETE
|
||||
|
|
@ -368,13 +313,15 @@ inline double ulonglong2double(ulonglong value)
|
|||
#ifdef _CUSTOMCONFIG_
|
||||
#include <custom_conf.h>
|
||||
#else
|
||||
#ifndef CMAKE_CONFIGD
|
||||
#define DEFAULT_MYSQL_HOME "c:\\mysql"
|
||||
#define DATADIR "c:\\mysql\\data"
|
||||
#define MYSQL_DATADIR "c:\\mysql\\data"
|
||||
#define PACKAGE "mysql"
|
||||
#define DEFAULT_BASEDIR "C:\\"
|
||||
#define SHAREDIR "share"
|
||||
#define DEFAULT_CHARSET_HOME "C:/mysql/"
|
||||
#endif
|
||||
#endif
|
||||
#ifndef DEFAULT_HOME_ENV
|
||||
#define DEFAULT_HOME_ENV MYSQL_HOME
|
||||
#endif
|
||||
|
|
@ -398,63 +345,68 @@ inline double ulonglong2double(ulonglong value)
|
|||
#ifdef __NT__ /* This should also work on Win98 but .. */
|
||||
#define thread_safe_add(V,C,L) InterlockedExchangeAdd((long*) &(V),(C))
|
||||
#define thread_safe_sub(V,C,L) InterlockedExchangeAdd((long*) &(V),-(long) (C))
|
||||
#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));
|
||||
#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)
|
||||
#endif
|
||||
#define statistic_increment(V,L) thread_safe_increment((V),(L))
|
||||
#define statistic_decrement(V,L) thread_safe_decrement((V),(L))
|
||||
|
||||
#define shared_memory_buffer_length 16000
|
||||
#define default_shared_memory_base_name "MYSQL"
|
||||
|
||||
#define MYSQL_DEFAULT_CHARSET_NAME "latin1"
|
||||
#define MYSQL_DEFAULT_COLLATION_NAME "latin1_swedish_ci"
|
||||
|
||||
#define HAVE_SPATIAL 1
|
||||
#define HAVE_RTREE_KEYS 1
|
||||
|
||||
#define HAVE_OPENSSL 1
|
||||
#define HAVE_YASSL 1
|
||||
|
||||
/* Define charsets you want */
|
||||
/* #undef HAVE_CHARSET_armscii8 */
|
||||
/* #undef HAVE_CHARSET_ascii */
|
||||
#define COMMUNITY_SERVER 1
|
||||
#define ENABLED_PROFILING 1
|
||||
|
||||
/*
|
||||
Our Windows binaries include all character sets which MySQL supports.
|
||||
Any changes to the available character sets must also go into
|
||||
config/ac-macros/character_sets.m4
|
||||
*/
|
||||
|
||||
#define MYSQL_DEFAULT_CHARSET_NAME "latin1"
|
||||
#define MYSQL_DEFAULT_COLLATION_NAME "latin1_swedish_ci"
|
||||
|
||||
#define USE_MB 1
|
||||
#define USE_MB_IDENT 1
|
||||
#define USE_STRCOLL 1
|
||||
|
||||
#define HAVE_CHARSET_armscii8
|
||||
#define HAVE_CHARSET_ascii
|
||||
#define HAVE_CHARSET_big5 1
|
||||
#define HAVE_CHARSET_cp1250 1
|
||||
/* #undef HAVE_CHARSET_cp1251 */
|
||||
/* #undef HAVE_CHARSET_cp1256 */
|
||||
/* #undef HAVE_CHARSET_cp1257 */
|
||||
/* #undef HAVE_CHARSET_cp850 */
|
||||
/* #undef HAVE_CHARSET_cp852 */
|
||||
/* #undef HAVE_CHARSET_cp866 */
|
||||
#define HAVE_CHARSET_cp1251
|
||||
#define HAVE_CHARSET_cp1256
|
||||
#define HAVE_CHARSET_cp1257
|
||||
#define HAVE_CHARSET_cp850
|
||||
#define HAVE_CHARSET_cp852
|
||||
#define HAVE_CHARSET_cp866
|
||||
#define HAVE_CHARSET_cp932 1
|
||||
/* #undef HAVE_CHARSET_dec8 */
|
||||
#define HAVE_CHARSET_dec8
|
||||
#define HAVE_CHARSET_eucjpms 1
|
||||
#define HAVE_CHARSET_euckr 1
|
||||
#define HAVE_CHARSET_gb2312 1
|
||||
#define HAVE_CHARSET_gbk 1
|
||||
/* #undef HAVE_CHARSET_greek */
|
||||
/* #undef HAVE_CHARSET_hebrew */
|
||||
/* #undef HAVE_CHARSET_hp8 */
|
||||
/* #undef HAVE_CHARSET_keybcs2 */
|
||||
/* #undef HAVE_CHARSET_koi8r */
|
||||
/* #undef HAVE_CHARSET_koi8u */
|
||||
#define HAVE_CHARSET_geostd8
|
||||
#define HAVE_CHARSET_greek
|
||||
#define HAVE_CHARSET_hebrew
|
||||
#define HAVE_CHARSET_hp8
|
||||
#define HAVE_CHARSET_keybcs2
|
||||
#define HAVE_CHARSET_koi8r
|
||||
#define HAVE_CHARSET_koi8u
|
||||
#define HAVE_CHARSET_latin1 1
|
||||
#define HAVE_CHARSET_latin2 1
|
||||
/* #undef HAVE_CHARSET_latin5 */
|
||||
/* #undef HAVE_CHARSET_latin7 */
|
||||
/* #undef HAVE_CHARSET_macce */
|
||||
/* #undef HAVE_CHARSET_macroman */
|
||||
#define HAVE_CHARSET_latin5
|
||||
#define HAVE_CHARSET_latin7
|
||||
#define HAVE_CHARSET_macce
|
||||
#define HAVE_CHARSET_macroman
|
||||
#define HAVE_CHARSET_sjis 1
|
||||
/* #undef HAVE_CHARSET_swe7 */
|
||||
#define HAVE_CHARSET_swe7
|
||||
#define HAVE_CHARSET_tis620 1
|
||||
#define HAVE_CHARSET_ucs2 1
|
||||
#define HAVE_CHARSET_ujis 1
|
||||
#define HAVE_CHARSET_utf8 1
|
||||
#define HAVE_UCA_COLLATIONS 1
|
||||
|
||||
#define HAVE_UCA_COLLATIONS 1
|
||||
#define HAVE_BOOL 1
|
||||
|
|
|
|||
107
dep/include/mysql/decimal.h
Normal file
107
dep/include/mysql/decimal.h
Normal file
|
|
@ -0,0 +1,107 @@
|
|||
/* Copyright (C) 2000 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#ifndef _decimal_h
|
||||
#define _decimal_h
|
||||
|
||||
typedef enum
|
||||
{TRUNCATE=0, HALF_EVEN, HALF_UP, CEILING, FLOOR}
|
||||
decimal_round_mode;
|
||||
typedef int32 decimal_digit_t;
|
||||
|
||||
typedef struct st_decimal_t {
|
||||
int intg, frac, len;
|
||||
my_bool sign;
|
||||
decimal_digit_t *buf;
|
||||
} decimal_t;
|
||||
|
||||
int internal_str2dec(const char *from, decimal_t *to, char **end,
|
||||
my_bool fixed);
|
||||
int decimal2string(decimal_t *from, char *to, int *to_len,
|
||||
int fixed_precision, int fixed_decimals,
|
||||
char filler);
|
||||
int decimal2ulonglong(decimal_t *from, ulonglong *to);
|
||||
int ulonglong2decimal(ulonglong from, decimal_t *to);
|
||||
int decimal2longlong(decimal_t *from, longlong *to);
|
||||
int longlong2decimal(longlong from, decimal_t *to);
|
||||
int decimal2double(decimal_t *from, double *to);
|
||||
int double2decimal(double from, decimal_t *to);
|
||||
int decimal_actual_fraction(decimal_t *from);
|
||||
int decimal2bin(decimal_t *from, uchar *to, int precision, int scale);
|
||||
int bin2decimal(const uchar *from, decimal_t *to, int precision, int scale);
|
||||
|
||||
int decimal_size(int precision, int scale);
|
||||
int decimal_bin_size(int precision, int scale);
|
||||
int decimal_result_size(decimal_t *from1, decimal_t *from2, char op,
|
||||
int param);
|
||||
|
||||
int decimal_intg(decimal_t *from);
|
||||
int decimal_add(decimal_t *from1, decimal_t *from2, decimal_t *to);
|
||||
int decimal_sub(decimal_t *from1, decimal_t *from2, decimal_t *to);
|
||||
int decimal_cmp(decimal_t *from1, decimal_t *from2);
|
||||
int decimal_mul(decimal_t *from1, decimal_t *from2, decimal_t *to);
|
||||
int decimal_div(decimal_t *from1, decimal_t *from2, decimal_t *to,
|
||||
int scale_incr);
|
||||
int decimal_mod(decimal_t *from1, decimal_t *from2, decimal_t *to);
|
||||
int decimal_round(decimal_t *from, decimal_t *to, int new_scale,
|
||||
decimal_round_mode mode);
|
||||
int decimal_is_zero(decimal_t *from);
|
||||
void max_decimal(int precision, int frac, decimal_t *to);
|
||||
|
||||
#define string2decimal(A,B,C) internal_str2dec((A), (B), (C), 0)
|
||||
#define string2decimal_fixed(A,B,C) internal_str2dec((A), (B), (C), 1)
|
||||
|
||||
/* set a decimal_t to zero */
|
||||
|
||||
#define decimal_make_zero(dec) do { \
|
||||
(dec)->buf[0]=0; \
|
||||
(dec)->intg=1; \
|
||||
(dec)->frac=0; \
|
||||
(dec)->sign=0; \
|
||||
} while(0)
|
||||
|
||||
/*
|
||||
returns the length of the buffer to hold string representation
|
||||
of the decimal (including decimal dot, possible sign and \0)
|
||||
*/
|
||||
|
||||
#define decimal_string_size(dec) (((dec)->intg ? (dec)->intg : 1) + \
|
||||
(dec)->frac + ((dec)->frac > 0) + 2)
|
||||
|
||||
/* negate a decimal */
|
||||
#define decimal_neg(dec) do { (dec)->sign^=1; } while(0)
|
||||
|
||||
/*
|
||||
conventions:
|
||||
|
||||
decimal_smth() == 0 -- everything's ok
|
||||
decimal_smth() <= 1 -- result is usable, but precision loss is possible
|
||||
decimal_smth() <= 2 -- result can be unusable, most significant digits
|
||||
could've been lost
|
||||
decimal_smth() > 2 -- no result was generated
|
||||
*/
|
||||
|
||||
#define E_DEC_OK 0
|
||||
#define E_DEC_TRUNCATED 1
|
||||
#define E_DEC_OVERFLOW 2
|
||||
#define E_DEC_DIV_ZERO 4
|
||||
#define E_DEC_BAD_NUM 8
|
||||
#define E_DEC_OOM 16
|
||||
|
||||
#define E_DEC_ERROR 31
|
||||
#define E_DEC_FATAL_ERROR 30
|
||||
|
||||
#endif
|
||||
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
/* Error messages for MySQL clients */
|
||||
/* (Error messages for the daemon are in share/language/errmsg.sys) */
|
||||
/* (Error messages for the daemon are in sql/share/errmsg.txt) */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
@ -28,9 +28,7 @@ extern const char *client_errors[]; /* Error messages */
|
|||
|
||||
#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)
|
||||
#if !defined(ER)
|
||||
#define ER(X) client_errors[(X)-CR_MIN_ERROR]
|
||||
#endif
|
||||
#define CLIENT_ERRMAP 2 /* Errormap used by my_error() */
|
||||
|
|
@ -97,6 +95,8 @@ extern const char *client_errors[]; /* Error messages */
|
|||
#define CR_NO_RESULT_SET 2053
|
||||
#define CR_NOT_IMPLEMENTED 2054
|
||||
#define CR_SERVER_LOST_EXTENDED 2055
|
||||
#define CR_ERROR_LAST /*Copy last error nr:*/ 2055
|
||||
#define CR_STMT_CLOSED 2056
|
||||
#define CR_NEW_STMT_METADATA 2057
|
||||
#define CR_ERROR_LAST /*Copy last error nr:*/ 2057
|
||||
/* Add error numbers before CR_ERROR_LAST and change it accordingly. */
|
||||
|
||||
|
|
|
|||
143
dep/include/mysql/keycache.h
Normal file
143
dep/include/mysql/keycache.h
Normal file
|
|
@ -0,0 +1,143 @@
|
|||
/* Copyright (C) 2003 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
/* Key cache variable structures */
|
||||
|
||||
#ifndef _keycache_h
|
||||
#define _keycache_h
|
||||
C_MODE_START
|
||||
|
||||
/* declare structures that is used by st_key_cache */
|
||||
|
||||
struct st_block_link;
|
||||
typedef struct st_block_link BLOCK_LINK;
|
||||
struct st_keycache_page;
|
||||
typedef struct st_keycache_page KEYCACHE_PAGE;
|
||||
struct st_hash_link;
|
||||
typedef struct st_hash_link HASH_LINK;
|
||||
|
||||
/* info about requests in a waiting queue */
|
||||
typedef struct st_keycache_wqueue
|
||||
{
|
||||
struct st_my_thread_var *last_thread; /* circular list of waiting threads */
|
||||
} KEYCACHE_WQUEUE;
|
||||
|
||||
#define CHANGED_BLOCKS_HASH 128 /* must be power of 2 */
|
||||
|
||||
/*
|
||||
The key cache structure
|
||||
It also contains read-only statistics parameters.
|
||||
*/
|
||||
|
||||
typedef struct st_key_cache
|
||||
{
|
||||
my_bool key_cache_inited;
|
||||
my_bool in_resize; /* true during resize operation */
|
||||
my_bool resize_in_flush; /* true during flush of resize operation */
|
||||
my_bool can_be_used; /* usage of cache for read/write is allowed */
|
||||
size_t key_cache_mem_size; /* specified size of the cache memory */
|
||||
uint key_cache_block_size; /* size of the page buffer of a cache block */
|
||||
ulong min_warm_blocks; /* min number of warm blocks; */
|
||||
ulong age_threshold; /* age threshold for hot blocks */
|
||||
ulonglong keycache_time; /* total number of block link operations */
|
||||
uint hash_entries; /* max number of entries in the hash table */
|
||||
int hash_links; /* max number of hash links */
|
||||
int hash_links_used; /* number of hash links currently used */
|
||||
int disk_blocks; /* max number of blocks in the cache */
|
||||
ulong blocks_used; /* maximum number of concurrently used blocks */
|
||||
ulong blocks_unused; /* number of currently unused blocks */
|
||||
ulong blocks_changed; /* number of currently dirty blocks */
|
||||
ulong warm_blocks; /* number of blocks in warm sub-chain */
|
||||
ulong cnt_for_resize_op; /* counter to block resize operation */
|
||||
long blocks_available; /* number of blocks available in the LRU chain */
|
||||
HASH_LINK **hash_root; /* arr. of entries into hash table buckets */
|
||||
HASH_LINK *hash_link_root; /* memory for hash table links */
|
||||
HASH_LINK *free_hash_list; /* list of free hash links */
|
||||
BLOCK_LINK *free_block_list; /* list of free blocks */
|
||||
BLOCK_LINK *block_root; /* memory for block links */
|
||||
uchar HUGE_PTR *block_mem; /* memory for block buffers */
|
||||
BLOCK_LINK *used_last; /* ptr to the last block of the LRU chain */
|
||||
BLOCK_LINK *used_ins; /* ptr to the insertion block in LRU chain */
|
||||
pthread_mutex_t cache_lock; /* to lock access to the cache structure */
|
||||
KEYCACHE_WQUEUE resize_queue; /* threads waiting during resize operation */
|
||||
/*
|
||||
Waiting for a zero resize count. Using a queue for symmetry though
|
||||
only one thread can wait here.
|
||||
*/
|
||||
KEYCACHE_WQUEUE waiting_for_resize_cnt;
|
||||
KEYCACHE_WQUEUE waiting_for_hash_link; /* waiting for a free hash link */
|
||||
KEYCACHE_WQUEUE waiting_for_block; /* requests waiting for a free block */
|
||||
BLOCK_LINK *changed_blocks[CHANGED_BLOCKS_HASH]; /* hash for dirty file bl.*/
|
||||
BLOCK_LINK *file_blocks[CHANGED_BLOCKS_HASH]; /* hash for other file bl.*/
|
||||
|
||||
/*
|
||||
The following variables are and variables used to hold parameters for
|
||||
initializing the key cache.
|
||||
*/
|
||||
|
||||
ulonglong param_buff_size; /* size the memory allocated for the cache */
|
||||
ulong param_block_size; /* size of the blocks in the key cache */
|
||||
ulong param_division_limit; /* min. percentage of warm blocks */
|
||||
ulong param_age_threshold; /* determines when hot block is downgraded */
|
||||
|
||||
/* Statistics variables. These are reset in reset_key_cache_counters(). */
|
||||
ulong global_blocks_changed; /* number of currently dirty blocks */
|
||||
ulonglong global_cache_w_requests;/* number of write requests (write hits) */
|
||||
ulonglong global_cache_write; /* number of writes from cache to files */
|
||||
ulonglong global_cache_r_requests;/* number of read requests (read hits) */
|
||||
ulonglong global_cache_read; /* number of reads from files to cache */
|
||||
|
||||
int blocks; /* max number of blocks in the cache */
|
||||
my_bool in_init; /* Set to 1 in MySQL during init/resize */
|
||||
} KEY_CACHE;
|
||||
|
||||
/* The default key cache */
|
||||
extern KEY_CACHE dflt_key_cache_var, *dflt_key_cache;
|
||||
|
||||
extern int init_key_cache(KEY_CACHE *keycache, uint key_cache_block_size,
|
||||
size_t use_mem, uint division_limit,
|
||||
uint age_threshold);
|
||||
extern int resize_key_cache(KEY_CACHE *keycache, uint key_cache_block_size,
|
||||
size_t use_mem, uint division_limit,
|
||||
uint age_threshold);
|
||||
extern void change_key_cache_param(KEY_CACHE *keycache, uint division_limit,
|
||||
uint age_threshold);
|
||||
extern uchar *key_cache_read(KEY_CACHE *keycache,
|
||||
File file, my_off_t filepos, int level,
|
||||
uchar *buff, uint length,
|
||||
uint block_length,int return_buffer);
|
||||
extern int key_cache_insert(KEY_CACHE *keycache,
|
||||
File file, my_off_t filepos, int level,
|
||||
uchar *buff, uint length);
|
||||
extern int key_cache_write(KEY_CACHE *keycache,
|
||||
File file, my_off_t filepos, int level,
|
||||
uchar *buff, uint length,
|
||||
uint block_length,int force_write);
|
||||
extern int flush_key_blocks(KEY_CACHE *keycache,
|
||||
int file, enum flush_type type);
|
||||
extern void end_key_cache(KEY_CACHE *keycache, my_bool cleanup);
|
||||
|
||||
/* Functions to handle multiple key caches */
|
||||
extern my_bool multi_keycache_init(void);
|
||||
extern void multi_keycache_free(void);
|
||||
extern KEY_CACHE *multi_key_cache_search(uchar *key, uint length);
|
||||
extern my_bool multi_key_cache_set(const uchar *key, uint length,
|
||||
KEY_CACHE *key_cache);
|
||||
extern void multi_key_cache_change(KEY_CACHE *old_data,
|
||||
KEY_CACHE *new_data);
|
||||
extern int reset_key_cache_counters(const char *name,
|
||||
KEY_CACHE *key_cache);
|
||||
C_MODE_END
|
||||
#endif /* _keycache_h */
|
||||
|
|
@ -49,6 +49,13 @@ typedef struct unicase_info_st
|
|||
extern MY_UNICASE_INFO *my_unicase_default[256];
|
||||
extern MY_UNICASE_INFO *my_unicase_turkish[256];
|
||||
|
||||
typedef struct uni_ctype_st
|
||||
{
|
||||
uchar pctype;
|
||||
uchar *ctype;
|
||||
} MY_UNI_CTYPE;
|
||||
|
||||
extern MY_UNI_CTYPE my_uni_ctype[256];
|
||||
|
||||
/* wm_wc and wc_mb return codes */
|
||||
#define MY_CS_ILSEQ 0 /* Wrong by sequence: wb_wc */
|
||||
|
|
@ -78,7 +85,8 @@ extern MY_UNICASE_INFO *my_unicase_turkish[256];
|
|||
#define MY_CS_READY 256 /* if a charset is initialized */
|
||||
#define MY_CS_AVAILABLE 512 /* If either compiled-in or loaded*/
|
||||
#define MY_CS_CSSORT 1024 /* if case sensitive sort order */
|
||||
#define MY_CS_PUREASCII 2048 /* if a charset is pure ascii */
|
||||
#define MY_CS_HIDDEN 2048 /* don't display in SHOW */
|
||||
#define MY_CS_PUREASCII 4096 /* if a charset is pure ascii */
|
||||
#define MY_CHARSET_UNDEFINED 0
|
||||
|
||||
/* Character repertoire flags */
|
||||
|
|
@ -123,22 +131,22 @@ struct charset_info_st;
|
|||
/* See strings/CHARSET_INFO.txt for information about this structure */
|
||||
typedef struct my_collation_handler_st
|
||||
{
|
||||
my_bool (*init)(struct charset_info_st *, void *(*alloc)(uint));
|
||||
my_bool (*init)(struct charset_info_st *, void *(*alloc)(size_t));
|
||||
/* Collation routines */
|
||||
int (*strnncoll)(struct charset_info_st *,
|
||||
const uchar *, uint, const uchar *, uint, my_bool);
|
||||
const uchar *, size_t, const uchar *, size_t, my_bool);
|
||||
int (*strnncollsp)(struct charset_info_st *,
|
||||
const uchar *, uint, const uchar *, uint,
|
||||
const uchar *, size_t, const uchar *, size_t,
|
||||
my_bool diff_if_only_endspace_difference);
|
||||
int (*strnxfrm)(struct charset_info_st *,
|
||||
uchar *, uint, const uchar *, uint);
|
||||
uint (*strnxfrmlen)(struct charset_info_st *, uint);
|
||||
size_t (*strnxfrm)(struct charset_info_st *,
|
||||
uchar *, size_t, const uchar *, size_t);
|
||||
size_t (*strnxfrmlen)(struct charset_info_st *, size_t);
|
||||
my_bool (*like_range)(struct charset_info_st *,
|
||||
const char *s, uint s_length,
|
||||
const char *s, size_t s_length,
|
||||
pchar w_prefix, pchar w_one, pchar w_many,
|
||||
uint res_length,
|
||||
size_t res_length,
|
||||
char *min_str, char *max_str,
|
||||
uint *min_len, uint *max_len);
|
||||
size_t *min_len, size_t *max_len);
|
||||
int (*wildcmp)(struct charset_info_st *,
|
||||
const char *str,const char *str_end,
|
||||
const char *wildstr,const char *wildend,
|
||||
|
|
@ -147,14 +155,14 @@ typedef struct my_collation_handler_st
|
|||
int (*strcasecmp)(struct charset_info_st *, const char *, const char *);
|
||||
|
||||
uint (*instr)(struct charset_info_st *,
|
||||
const char *b, uint b_length,
|
||||
const char *s, uint s_length,
|
||||
const char *b, size_t b_length,
|
||||
const char *s, size_t s_length,
|
||||
my_match_t *match, uint nmatch);
|
||||
|
||||
/* Hash calculation */
|
||||
void (*hash_sort)(struct charset_info_st *cs, const uchar *key, uint len,
|
||||
void (*hash_sort)(struct charset_info_st *cs, const uchar *key, size_t len,
|
||||
ulong *nr1, ulong *nr2);
|
||||
my_bool (*propagate)(struct charset_info_st *cs, const uchar *str, uint len);
|
||||
my_bool (*propagate)(struct charset_info_st *cs, const uchar *str, size_t len);
|
||||
} MY_COLLATION_HANDLER;
|
||||
|
||||
extern MY_COLLATION_HANDLER my_collation_mb_bin_handler;
|
||||
|
|
@ -162,64 +170,76 @@ extern MY_COLLATION_HANDLER my_collation_8bit_bin_handler;
|
|||
extern MY_COLLATION_HANDLER my_collation_8bit_simple_ci_handler;
|
||||
extern MY_COLLATION_HANDLER my_collation_ucs2_uca_handler;
|
||||
|
||||
/* Some typedef to make it easy for C++ to make function pointers */
|
||||
typedef int (*my_charset_conv_mb_wc)(struct charset_info_st *, my_wc_t *,
|
||||
const uchar *, const uchar *);
|
||||
typedef int (*my_charset_conv_wc_mb)(struct charset_info_st *, my_wc_t,
|
||||
uchar *, uchar *);
|
||||
typedef size_t (*my_charset_conv_case)(struct charset_info_st *,
|
||||
char *, size_t, char *, size_t);
|
||||
|
||||
|
||||
/* See strings/CHARSET_INFO.txt about information on this structure */
|
||||
typedef struct my_charset_handler_st
|
||||
{
|
||||
my_bool (*init)(struct charset_info_st *, void *(*alloc)(uint));
|
||||
my_bool (*init)(struct charset_info_st *, void *(*alloc)(size_t));
|
||||
/* Multibyte routines */
|
||||
int (*ismbchar)(struct charset_info_st *, const char *, const char *);
|
||||
int (*mbcharlen)(struct charset_info_st *, uint);
|
||||
uint (*numchars)(struct charset_info_st *, const char *b, const char *e);
|
||||
uint (*charpos)(struct charset_info_st *, const char *b, const char *e, uint pos);
|
||||
uint (*well_formed_len)(struct charset_info_st *,
|
||||
uint (*ismbchar)(struct charset_info_st *, const char *, const char *);
|
||||
uint (*mbcharlen)(struct charset_info_st *, uint c);
|
||||
size_t (*numchars)(struct charset_info_st *, const char *b, const char *e);
|
||||
size_t (*charpos)(struct charset_info_st *, const char *b, const char *e,
|
||||
size_t pos);
|
||||
size_t (*well_formed_len)(struct charset_info_st *,
|
||||
const char *b,const char *e,
|
||||
uint nchars, int *error);
|
||||
uint (*lengthsp)(struct charset_info_st *, const char *ptr, uint length);
|
||||
uint (*numcells)(struct charset_info_st *, const char *b, const char *e);
|
||||
size_t nchars, int *error);
|
||||
size_t (*lengthsp)(struct charset_info_st *, const char *ptr, size_t length);
|
||||
size_t (*numcells)(struct charset_info_st *, const char *b, const char *e);
|
||||
|
||||
/* Unicode convertion */
|
||||
int (*mb_wc)(struct charset_info_st *cs,my_wc_t *wc,
|
||||
const unsigned char *s,const unsigned char *e);
|
||||
int (*wc_mb)(struct charset_info_st *cs,my_wc_t wc,
|
||||
unsigned char *s,unsigned char *e);
|
||||
|
||||
/* Functions for case and sort convertion */
|
||||
uint (*caseup_str)(struct charset_info_st *, char *);
|
||||
uint (*casedn_str)(struct charset_info_st *, char *);
|
||||
uint (*caseup)(struct charset_info_st *, char *src, uint srclen,
|
||||
char *dst, uint dstlen);
|
||||
uint (*casedn)(struct charset_info_st *, char *src, uint srclen,
|
||||
char *dst, uint dstlen);
|
||||
/* Unicode conversion */
|
||||
my_charset_conv_mb_wc mb_wc;
|
||||
my_charset_conv_wc_mb wc_mb;
|
||||
|
||||
/* CTYPE scanner */
|
||||
int (*ctype)(struct charset_info_st *cs, int *ctype,
|
||||
const uchar *s, const uchar *e);
|
||||
|
||||
/* Functions for case and sort conversion */
|
||||
size_t (*caseup_str)(struct charset_info_st *, char *);
|
||||
size_t (*casedn_str)(struct charset_info_st *, char *);
|
||||
|
||||
my_charset_conv_case caseup;
|
||||
my_charset_conv_case casedn;
|
||||
|
||||
/* Charset dependant snprintf() */
|
||||
int (*snprintf)(struct charset_info_st *, char *to, uint n, const char *fmt,
|
||||
...) ATTRIBUTE_FORMAT_FPTR(printf, 4, 5);
|
||||
int (*long10_to_str)(struct charset_info_st *, char *to, uint n, int radix,
|
||||
long int val);
|
||||
int (*longlong10_to_str)(struct charset_info_st *, char *to, uint n,
|
||||
int radix, longlong val);
|
||||
size_t (*snprintf)(struct charset_info_st *, char *to, size_t n,
|
||||
const char *fmt,
|
||||
...) ATTRIBUTE_FORMAT_FPTR(printf, 4, 5);
|
||||
size_t (*long10_to_str)(struct charset_info_st *, char *to, size_t n,
|
||||
int radix, long int val);
|
||||
size_t (*longlong10_to_str)(struct charset_info_st *, char *to, size_t n,
|
||||
int radix, longlong val);
|
||||
|
||||
void (*fill)(struct charset_info_st *, char *to, uint len, int fill);
|
||||
void (*fill)(struct charset_info_st *, char *to, size_t len, int fill);
|
||||
|
||||
/* String-to-number convertion routines */
|
||||
long (*strntol)(struct charset_info_st *, const char *s, uint l,
|
||||
/* String-to-number conversion routines */
|
||||
long (*strntol)(struct charset_info_st *, const char *s, size_t l,
|
||||
int base, char **e, int *err);
|
||||
ulong (*strntoul)(struct charset_info_st *, const char *s, uint l,
|
||||
ulong (*strntoul)(struct charset_info_st *, const char *s, size_t l,
|
||||
int base, char **e, int *err);
|
||||
longlong (*strntoll)(struct charset_info_st *, const char *s, uint l,
|
||||
longlong (*strntoll)(struct charset_info_st *, const char *s, size_t l,
|
||||
int base, char **e, int *err);
|
||||
ulonglong (*strntoull)(struct charset_info_st *, const char *s, uint l,
|
||||
ulonglong (*strntoull)(struct charset_info_st *, const char *s, size_t l,
|
||||
int base, char **e, int *err);
|
||||
double (*strntod)(struct charset_info_st *, char *s, uint l, char **e,
|
||||
double (*strntod)(struct charset_info_st *, char *s, size_t l, char **e,
|
||||
int *err);
|
||||
longlong (*strtoll10)(struct charset_info_st *cs,
|
||||
const char *nptr, char **endptr, int *error);
|
||||
ulonglong (*strntoull10rnd)(struct charset_info_st *cs,
|
||||
const char *str, uint length, int unsigned_fl,
|
||||
const char *str, size_t length,
|
||||
int unsigned_fl,
|
||||
char **endptr, int *error);
|
||||
ulong (*scan)(struct charset_info_st *, const char *b, const char *e,
|
||||
int sq);
|
||||
size_t (*scan)(struct charset_info_st *, const char *b, const char *e,
|
||||
int sq);
|
||||
} MY_CHARSET_HANDLER;
|
||||
|
||||
extern MY_CHARSET_HANDLER my_charset_8bit_handler;
|
||||
|
|
@ -262,9 +282,10 @@ typedef struct charset_info_st
|
|||
MY_COLLATION_HANDLER *coll;
|
||||
|
||||
} CHARSET_INFO;
|
||||
#define ILLEGAL_CHARSET_INFO_NUMBER (~0U)
|
||||
|
||||
|
||||
extern CHARSET_INFO my_charset_bin;
|
||||
extern MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_bin;
|
||||
extern CHARSET_INFO my_charset_big5_chinese_ci;
|
||||
extern CHARSET_INFO my_charset_big5_bin;
|
||||
extern CHARSET_INFO my_charset_cp932_japanese_ci;
|
||||
|
|
@ -277,7 +298,7 @@ extern CHARSET_INFO my_charset_gb2312_chinese_ci;
|
|||
extern CHARSET_INFO my_charset_gb2312_bin;
|
||||
extern CHARSET_INFO my_charset_gbk_chinese_ci;
|
||||
extern CHARSET_INFO my_charset_gbk_bin;
|
||||
extern CHARSET_INFO my_charset_latin1;
|
||||
extern MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_latin1;
|
||||
extern CHARSET_INFO my_charset_latin1_german2_ci;
|
||||
extern CHARSET_INFO my_charset_latin1_bin;
|
||||
extern CHARSET_INFO my_charset_latin2_czech_ci;
|
||||
|
|
@ -294,63 +315,67 @@ extern CHARSET_INFO my_charset_utf8_general_ci;
|
|||
extern CHARSET_INFO my_charset_utf8_unicode_ci;
|
||||
extern CHARSET_INFO my_charset_utf8_bin;
|
||||
extern CHARSET_INFO my_charset_cp1250_czech_ci;
|
||||
extern MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_filename;
|
||||
|
||||
/* declarations for simple charsets */
|
||||
extern int my_strnxfrm_simple(CHARSET_INFO *, uchar *, uint, const uchar *,
|
||||
uint);
|
||||
uint my_strnxfrmlen_simple(CHARSET_INFO *, uint);
|
||||
extern int my_strnncoll_simple(CHARSET_INFO *, const uchar *, uint,
|
||||
const uchar *, uint, my_bool);
|
||||
extern size_t my_strnxfrm_simple(CHARSET_INFO *, uchar *, size_t,
|
||||
const uchar *, size_t);
|
||||
size_t my_strnxfrmlen_simple(CHARSET_INFO *, size_t);
|
||||
extern int my_strnncoll_simple(CHARSET_INFO *, const uchar *, size_t,
|
||||
const uchar *, size_t, my_bool);
|
||||
|
||||
extern int my_strnncollsp_simple(CHARSET_INFO *, const uchar *, uint,
|
||||
const uchar *, uint,
|
||||
extern int my_strnncollsp_simple(CHARSET_INFO *, const uchar *, size_t,
|
||||
const uchar *, size_t,
|
||||
my_bool diff_if_only_endspace_difference);
|
||||
|
||||
extern void my_hash_sort_simple(CHARSET_INFO *cs,
|
||||
const uchar *key, uint len,
|
||||
const uchar *key, size_t len,
|
||||
ulong *nr1, ulong *nr2);
|
||||
|
||||
extern uint my_lengthsp_8bit(CHARSET_INFO *cs, const char *ptr, uint length);
|
||||
extern size_t my_lengthsp_8bit(CHARSET_INFO *cs, const char *ptr, size_t length);
|
||||
|
||||
extern uint my_instr_simple(struct charset_info_st *,
|
||||
const char *b, uint b_length,
|
||||
const char *s, uint s_length,
|
||||
const char *b, size_t b_length,
|
||||
const char *s, size_t s_length,
|
||||
my_match_t *match, uint nmatch);
|
||||
|
||||
|
||||
/* Functions for 8bit */
|
||||
extern uint my_caseup_str_8bit(CHARSET_INFO *, char *);
|
||||
extern uint my_casedn_str_8bit(CHARSET_INFO *, char *);
|
||||
extern uint my_caseup_8bit(CHARSET_INFO *, char *src, uint srclen,
|
||||
char *dst, uint dstlen);
|
||||
extern uint my_casedn_8bit(CHARSET_INFO *, char *src, uint srclen,
|
||||
char *dst, uint dstlen);
|
||||
extern size_t my_caseup_str_8bit(CHARSET_INFO *, char *);
|
||||
extern size_t my_casedn_str_8bit(CHARSET_INFO *, char *);
|
||||
extern size_t my_caseup_8bit(CHARSET_INFO *, char *src, size_t srclen,
|
||||
char *dst, size_t dstlen);
|
||||
extern size_t my_casedn_8bit(CHARSET_INFO *, char *src, size_t srclen,
|
||||
char *dst, size_t dstlen);
|
||||
|
||||
extern int my_strcasecmp_8bit(CHARSET_INFO * cs, const char *, const char *);
|
||||
|
||||
int my_mb_wc_8bit(CHARSET_INFO *cs,my_wc_t *wc, const uchar *s,const uchar *e);
|
||||
int my_wc_mb_8bit(CHARSET_INFO *cs,my_wc_t wc, uchar *s, uchar *e);
|
||||
|
||||
ulong my_scan_8bit(CHARSET_INFO *cs, const char *b, const char *e, int sq);
|
||||
int my_mb_ctype_8bit(CHARSET_INFO *,int *, const uchar *,const uchar *);
|
||||
int my_mb_ctype_mb(CHARSET_INFO *,int *, const uchar *,const uchar *);
|
||||
|
||||
int my_snprintf_8bit(struct charset_info_st *, char *to, uint n,
|
||||
const char *fmt, ...)
|
||||
size_t my_scan_8bit(CHARSET_INFO *cs, const char *b, const char *e, int sq);
|
||||
|
||||
size_t my_snprintf_8bit(struct charset_info_st *, char *to, size_t n,
|
||||
const char *fmt, ...)
|
||||
ATTRIBUTE_FORMAT(printf, 4, 5);
|
||||
|
||||
long my_strntol_8bit(CHARSET_INFO *, const char *s, uint l, int base,
|
||||
long my_strntol_8bit(CHARSET_INFO *, const char *s, size_t l, int base,
|
||||
char **e, int *err);
|
||||
ulong my_strntoul_8bit(CHARSET_INFO *, const char *s, size_t l, int base,
|
||||
char **e, int *err);
|
||||
ulong my_strntoul_8bit(CHARSET_INFO *, const char *s, uint l, int base,
|
||||
longlong my_strntoll_8bit(CHARSET_INFO *, const char *s, size_t l, int base,
|
||||
char **e, int *err);
|
||||
longlong my_strntoll_8bit(CHARSET_INFO *, const char *s, uint l, int base,
|
||||
ulonglong my_strntoull_8bit(CHARSET_INFO *, const char *s, size_t l, int base,
|
||||
char **e, int *err);
|
||||
ulonglong my_strntoull_8bit(CHARSET_INFO *, const char *s, uint l, int base,
|
||||
char **e, int *err);
|
||||
double my_strntod_8bit(CHARSET_INFO *, char *s, uint l,char **e,
|
||||
double my_strntod_8bit(CHARSET_INFO *, char *s, size_t l,char **e,
|
||||
int *err);
|
||||
int my_long10_to_str_8bit(CHARSET_INFO *, char *to, uint l, int radix,
|
||||
long int val);
|
||||
int my_longlong10_to_str_8bit(CHARSET_INFO *, char *to, uint l, int radix,
|
||||
longlong val);
|
||||
size_t my_long10_to_str_8bit(CHARSET_INFO *, char *to, size_t l, int radix,
|
||||
long int val);
|
||||
size_t my_longlong10_to_str_8bit(CHARSET_INFO *, char *to, size_t l, int radix,
|
||||
longlong val);
|
||||
|
||||
longlong my_strtoll10_8bit(CHARSET_INFO *cs,
|
||||
const char *nptr, char **endptr, int *error);
|
||||
|
|
@ -358,34 +383,34 @@ longlong my_strtoll10_ucs2(CHARSET_INFO *cs,
|
|||
const char *nptr, char **endptr, int *error);
|
||||
|
||||
ulonglong my_strntoull10rnd_8bit(CHARSET_INFO *cs,
|
||||
const char *str, uint length, int unsigned_fl,
|
||||
char **endptr, int *error);
|
||||
const char *str, size_t length, int
|
||||
unsigned_fl, char **endptr, int *error);
|
||||
ulonglong my_strntoull10rnd_ucs2(CHARSET_INFO *cs,
|
||||
const char *str, uint length, int unsigned_fl,
|
||||
char **endptr, int *error);
|
||||
const char *str, size_t length,
|
||||
int unsigned_fl, char **endptr, int *error);
|
||||
|
||||
void my_fill_8bit(CHARSET_INFO *cs, char* to, uint l, int fill);
|
||||
void my_fill_8bit(CHARSET_INFO *cs, char* to, size_t l, int fill);
|
||||
|
||||
my_bool my_like_range_simple(CHARSET_INFO *cs,
|
||||
const char *ptr, uint ptr_length,
|
||||
const char *ptr, size_t ptr_length,
|
||||
pbool escape, pbool w_one, pbool w_many,
|
||||
uint res_length,
|
||||
size_t res_length,
|
||||
char *min_str, char *max_str,
|
||||
uint *min_length, uint *max_length);
|
||||
size_t *min_length, size_t *max_length);
|
||||
|
||||
my_bool my_like_range_mb(CHARSET_INFO *cs,
|
||||
const char *ptr, uint ptr_length,
|
||||
const char *ptr, size_t ptr_length,
|
||||
pbool escape, pbool w_one, pbool w_many,
|
||||
uint res_length,
|
||||
size_t res_length,
|
||||
char *min_str, char *max_str,
|
||||
uint *min_length, uint *max_length);
|
||||
size_t *min_length, size_t *max_length);
|
||||
|
||||
my_bool my_like_range_ucs2(CHARSET_INFO *cs,
|
||||
const char *ptr, uint ptr_length,
|
||||
const char *ptr, size_t ptr_length,
|
||||
pbool escape, pbool w_one, pbool w_many,
|
||||
uint res_length,
|
||||
size_t res_length,
|
||||
char *min_str, char *max_str,
|
||||
uint *min_length, uint *max_length);
|
||||
size_t *min_length, size_t *max_length);
|
||||
|
||||
|
||||
int my_wildcmp_8bit(CHARSET_INFO *,
|
||||
|
|
@ -398,35 +423,35 @@ int my_wildcmp_bin(CHARSET_INFO *,
|
|||
const char *wildstr,const char *wildend,
|
||||
int escape, int w_one, int w_many);
|
||||
|
||||
uint my_numchars_8bit(CHARSET_INFO *, const char *b, const char *e);
|
||||
uint my_numcells_8bit(CHARSET_INFO *, const char *b, const char *e);
|
||||
uint my_charpos_8bit(CHARSET_INFO *, const char *b, const char *e, uint pos);
|
||||
uint my_well_formed_len_8bit(CHARSET_INFO *, const char *b, const char *e,
|
||||
uint pos, int *error);
|
||||
int my_mbcharlen_8bit(CHARSET_INFO *, uint c);
|
||||
size_t my_numchars_8bit(CHARSET_INFO *, const char *b, const char *e);
|
||||
size_t my_numcells_8bit(CHARSET_INFO *, const char *b, const char *e);
|
||||
size_t my_charpos_8bit(CHARSET_INFO *, const char *b, const char *e, size_t pos);
|
||||
size_t my_well_formed_len_8bit(CHARSET_INFO *, const char *b, const char *e,
|
||||
size_t pos, int *error);
|
||||
uint my_mbcharlen_8bit(CHARSET_INFO *, uint c);
|
||||
|
||||
|
||||
/* Functions for multibyte charsets */
|
||||
extern uint my_caseup_str_mb(CHARSET_INFO *, char *);
|
||||
extern uint my_casedn_str_mb(CHARSET_INFO *, char *);
|
||||
extern uint my_caseup_mb(CHARSET_INFO *, char *src, uint srclen,
|
||||
char *dst, uint dstlen);
|
||||
extern uint my_casedn_mb(CHARSET_INFO *, char *src, uint srclen,
|
||||
char *dst, uint dstlen);
|
||||
extern size_t my_caseup_str_mb(CHARSET_INFO *, char *);
|
||||
extern size_t my_casedn_str_mb(CHARSET_INFO *, char *);
|
||||
extern size_t my_caseup_mb(CHARSET_INFO *, char *src, size_t srclen,
|
||||
char *dst, size_t dstlen);
|
||||
extern size_t my_casedn_mb(CHARSET_INFO *, char *src, size_t srclen,
|
||||
char *dst, size_t dstlen);
|
||||
extern int my_strcasecmp_mb(CHARSET_INFO * cs,const char *, const char *);
|
||||
|
||||
int my_wildcmp_mb(CHARSET_INFO *,
|
||||
const char *str,const char *str_end,
|
||||
const char *wildstr,const char *wildend,
|
||||
int escape, int w_one, int w_many);
|
||||
uint my_numchars_mb(CHARSET_INFO *, const char *b, const char *e);
|
||||
uint my_numcells_mb(CHARSET_INFO *, const char *b, const char *e);
|
||||
uint my_charpos_mb(CHARSET_INFO *, const char *b, const char *e, uint pos);
|
||||
uint my_well_formed_len_mb(CHARSET_INFO *, const char *b, const char *e,
|
||||
uint pos, int *error);
|
||||
size_t my_numchars_mb(CHARSET_INFO *, const char *b, const char *e);
|
||||
size_t my_numcells_mb(CHARSET_INFO *, const char *b, const char *e);
|
||||
size_t my_charpos_mb(CHARSET_INFO *, const char *b, const char *e, size_t pos);
|
||||
size_t my_well_formed_len_mb(CHARSET_INFO *, const char *b, const char *e,
|
||||
size_t pos, int *error);
|
||||
uint my_instr_mb(struct charset_info_st *,
|
||||
const char *b, uint b_length,
|
||||
const char *s, uint s_length,
|
||||
const char *b, size_t b_length,
|
||||
const char *s, size_t s_length,
|
||||
my_match_t *match, uint nmatch);
|
||||
|
||||
int my_wildcmp_unicode(CHARSET_INFO *cs,
|
||||
|
|
@ -435,16 +460,19 @@ int my_wildcmp_unicode(CHARSET_INFO *cs,
|
|||
int escape, int w_one, int w_many,
|
||||
MY_UNICASE_INFO **weights);
|
||||
|
||||
extern my_bool my_parse_charset_xml(const char *bug, uint len,
|
||||
extern my_bool my_parse_charset_xml(const char *bug, size_t len,
|
||||
int (*add)(CHARSET_INFO *cs));
|
||||
extern char *my_strchr(CHARSET_INFO *cs, const char *str, const char *end,
|
||||
pchar c);
|
||||
|
||||
my_bool my_propagate_simple(CHARSET_INFO *cs, const uchar *str, uint len);
|
||||
my_bool my_propagate_complex(CHARSET_INFO *cs, const uchar *str, uint len);
|
||||
my_bool my_propagate_simple(CHARSET_INFO *cs, const uchar *str, size_t len);
|
||||
my_bool my_propagate_complex(CHARSET_INFO *cs, const uchar *str, size_t len);
|
||||
|
||||
|
||||
uint my_string_repertoire(CHARSET_INFO *cs, const char *str, ulong len);
|
||||
my_bool my_charset_is_ascii_based(CHARSET_INFO *cs);
|
||||
my_bool my_charset_is_8bit_pure_ascii(CHARSET_INFO *cs);
|
||||
uint my_charset_repertoire(CHARSET_INFO *cs);
|
||||
|
||||
|
||||
#define _MY_U 01 /* Upper case */
|
||||
|
|
|
|||
|
|
@ -33,25 +33,12 @@
|
|||
/* need by my_vsnprintf */
|
||||
#include <stdarg.h>
|
||||
|
||||
/* Correct some things for UNIXWARE7 */
|
||||
#ifdef HAVE_UNIXWARE7_THREADS
|
||||
#undef HAVE_STRINGS_H
|
||||
#undef HAVE_MEMORY_H
|
||||
#define HAVE_MEMCPY
|
||||
#ifndef HAVE_MEMMOVE
|
||||
#define HAVE_MEMMOVE
|
||||
#endif
|
||||
#undef HAVE_BCMP
|
||||
#undef bcopy
|
||||
#undef bcmp
|
||||
#undef bzero
|
||||
#endif /* HAVE_UNIXWARE7_THREADS */
|
||||
#ifdef _AIX
|
||||
#undef HAVE_BCMP
|
||||
#endif
|
||||
|
||||
/* This is needed for the definitions of bzero... on solaris */
|
||||
#if defined(HAVE_STRINGS_H) && !defined(HAVE_mit_thread)
|
||||
#if defined(HAVE_STRINGS_H)
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
|
|
@ -80,10 +67,10 @@
|
|||
# define bcopy(s, d, n) memcpy((d), (s), (n))
|
||||
# define bcmp(A,B,C) memcmp((A),(B),(C))
|
||||
# define bzero(A,B) memset((A),0,(B))
|
||||
# define bmove_align(A,B,C) memcpy((A),(B),(C))
|
||||
# define bmove_align(A,B,C) memcpy((A),(B),(C))
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus) && !defined(OS2)
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
|
@ -94,7 +81,7 @@ extern "C" {
|
|||
extern void *(*my_str_malloc)(size_t);
|
||||
extern void (*my_str_free)(void *);
|
||||
|
||||
#if defined(HAVE_STPCPY) && !defined(HAVE_mit_thread)
|
||||
#if defined(HAVE_STPCPY)
|
||||
#define strmov(A,B) stpcpy((A),(B))
|
||||
#ifndef stpcpy
|
||||
extern char *stpcpy(char *, const char *); /* For AIX with gcc 2.95.3 */
|
||||
|
|
@ -108,9 +95,7 @@ extern char NEAR _dig_vec_lower[];
|
|||
/* Defined in strtod.c */
|
||||
extern const double log_10[309];
|
||||
|
||||
#ifdef BAD_STRING_COMPILER
|
||||
#define strmov(A,B) (memccpy(A,B,0,INT_MAX)-1)
|
||||
#else
|
||||
#ifndef strmov
|
||||
#define strmov_overlapp(A,B) strmov(A,B)
|
||||
#define strmake_overlapp(A,B,C) strmake(A,B,C)
|
||||
#endif
|
||||
|
|
@ -121,12 +106,6 @@ extern const double log_10[309];
|
|||
#define memcpy_fixed(A,B,C) memcpy((A),(B),(C))
|
||||
#endif
|
||||
|
||||
#ifdef MSDOS
|
||||
#undef bmove_align
|
||||
#define bmove512(A,B,C) bmove_align(A,B,C)
|
||||
extern void bmove_align(gptr dst,const gptr src,uint len);
|
||||
#endif
|
||||
|
||||
#if (!defined(USE_BMOVE512) || defined(HAVE_purify)) && !defined(bmove512)
|
||||
#define bmove512(A,B,C) memcpy(A,B,C)
|
||||
#endif
|
||||
|
|
@ -134,59 +113,58 @@ extern void bmove_align(gptr dst,const gptr src,uint len);
|
|||
/* Prototypes for string functions */
|
||||
|
||||
#if !defined(bfill) && !defined(HAVE_BFILL)
|
||||
extern void bfill(gptr dst,uint len,pchar fill);
|
||||
extern void bfill(uchar *dst,size_t len,pchar fill);
|
||||
#endif
|
||||
|
||||
#if !defined(bzero) && !defined(HAVE_BZERO)
|
||||
extern void bzero(gptr dst,uint len);
|
||||
extern void bzero(uchar * dst,size_t len);
|
||||
#endif
|
||||
|
||||
#if !defined(bcmp) && !defined(HAVE_BCMP)
|
||||
extern int bcmp(const char *s1,const char *s2,uint len);
|
||||
extern size_t bcmp(const uchar *s1,const uchar *s2,size_t len);
|
||||
#endif
|
||||
#ifdef HAVE_purify
|
||||
extern int my_bcmp(const char *s1,const char *s2,uint len);
|
||||
extern size_t my_bcmp(const uchar *s1,const uchar *s2,size_t len);
|
||||
#undef bcmp
|
||||
#define bcmp(A,B,C) my_bcmp((A),(B),(C))
|
||||
#endif
|
||||
#endif /* HAVE_purify */
|
||||
|
||||
#ifndef bmove512
|
||||
extern void bmove512(gptr dst,const gptr src,uint len);
|
||||
extern void bmove512(uchar *dst,const uchar *src,size_t len);
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_BMOVE) && !defined(bmove)
|
||||
extern void bmove(char *dst, const char *src,uint len);
|
||||
extern void bmove(uuchar *dst, const uchar *src,size_t len);
|
||||
#endif
|
||||
|
||||
extern void bmove_upp(char *dst,const char *src,uint len);
|
||||
extern void bchange(char *dst,uint old_len,const char *src,
|
||||
uint new_len,uint tot_len);
|
||||
extern void strappend(char *s,uint len,pchar fill);
|
||||
extern void bmove_upp(uchar *dst,const uchar *src,size_t len);
|
||||
extern void bchange(uchar *dst,size_t old_len,const uchar *src,
|
||||
size_t new_len,size_t tot_len);
|
||||
extern void strappend(char *s,size_t len,pchar fill);
|
||||
extern char *strend(const char *s);
|
||||
extern char *strcend(const char *, pchar);
|
||||
extern char *strfield(char *src,int fields,int chars,int blanks,
|
||||
int tabch);
|
||||
extern char *strfill(my_string s,uint len,pchar fill);
|
||||
extern uint strinstr(const char *str,const char *search);
|
||||
extern uint r_strinstr(reg1 my_string str,int from, reg4 my_string search);
|
||||
extern char *strfill(char * s,size_t len,pchar fill);
|
||||
extern size_t strinstr(const char *str,const char *search);
|
||||
extern size_t r_strinstr(const char *str, size_t from, const char *search);
|
||||
extern char *strkey(char *dst,char *head,char *tail,char *flags);
|
||||
extern char *strmake(char *dst,const char *src,uint length);
|
||||
#ifndef strmake_overlapp
|
||||
extern char *strmake_overlapp(char *dst,const char *src, uint length);
|
||||
#endif
|
||||
extern char *strmake(char *dst,const char *src,size_t length);
|
||||
|
||||
#ifndef strmov
|
||||
extern char *strmov(char *dst,const char *src);
|
||||
#else
|
||||
extern char *strmov_overlapp(char *dst,const char *src);
|
||||
#endif
|
||||
extern char *strnmov(char *dst,const char *src,uint n);
|
||||
extern char *strnmov(char *dst,const char *src,size_t n);
|
||||
extern char *strsuff(const char *src,const char *suffix);
|
||||
extern char *strcont(const char *src,const char *set);
|
||||
extern char *strxcat _VARARGS((char *dst,const char *src, ...));
|
||||
extern char *strxmov _VARARGS((char *dst,const char *src, ...));
|
||||
extern char *strxcpy _VARARGS((char *dst,const char *src, ...));
|
||||
extern char *strxncat _VARARGS((char *dst,uint len, const char *src, ...));
|
||||
extern char *strxnmov _VARARGS((char *dst,uint len, const char *src, ...));
|
||||
extern char *strxncpy _VARARGS((char *dst,uint len, const char *src, ...));
|
||||
extern char *strxncat _VARARGS((char *dst,size_t len, const char *src, ...));
|
||||
extern char *strxnmov _VARARGS((char *dst,size_t len, const char *src, ...));
|
||||
extern char *strxncpy _VARARGS((char *dst,size_t len, const char *src, ...));
|
||||
|
||||
/* Prototypes of normal stringfunctions (with may ours) */
|
||||
|
||||
|
|
@ -201,7 +179,7 @@ extern size_t strlen(const char *);
|
|||
#endif
|
||||
#endif
|
||||
#ifndef HAVE_STRNLEN
|
||||
extern uint strnlen(const char *s, uint n);
|
||||
extern size_t strnlen(const char *s, size_t n);
|
||||
#endif
|
||||
|
||||
#if !defined(__cplusplus)
|
||||
|
|
@ -246,7 +224,7 @@ longlong my_strtoll10(const char *nptr, char **endptr, int *error);
|
|||
#ifdef HAVE_LONG_LONG
|
||||
extern char *longlong2str(longlong val,char *dst,int radix);
|
||||
extern char *longlong10_to_str(longlong val,char *dst,int radix);
|
||||
#if (!defined(HAVE_STRTOULL) || defined(HAVE_mit_thread)) || defined(NO_STRTOLL_PROTO)
|
||||
#if (!defined(HAVE_STRTOULL) || defined(NO_STRTOLL_PROTO))
|
||||
extern longlong strtoll(const char *str, char **ptr, int base);
|
||||
extern ulonglong strtoull(const char *str, char **ptr, int base);
|
||||
#endif
|
||||
|
|
@ -255,12 +233,31 @@ extern ulonglong strtoull(const char *str, char **ptr, int base);
|
|||
|
||||
/* my_vsnprintf.c */
|
||||
|
||||
extern int my_vsnprintf( char *str, size_t n,
|
||||
const char *format, va_list ap );
|
||||
extern int my_snprintf(char *to, size_t n, const char *fmt, ...)
|
||||
extern size_t my_vsnprintf(char *str, size_t n,
|
||||
const char *format, va_list ap);
|
||||
extern size_t my_snprintf(char *to, size_t n, const char *fmt, ...)
|
||||
ATTRIBUTE_FORMAT(printf, 3, 4);
|
||||
|
||||
#if defined(__cplusplus) && !defined(OS2)
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
LEX_STRING -- a pair of a C-string and its length.
|
||||
*/
|
||||
|
||||
#ifndef _my_plugin_h
|
||||
/* This definition must match the one given in mysql/plugin.h */
|
||||
struct st_mysql_lex_string
|
||||
{
|
||||
char *str;
|
||||
size_t length;
|
||||
};
|
||||
#endif
|
||||
typedef struct st_mysql_lex_string LEX_STRING;
|
||||
|
||||
#define STRING_WITH_LEN(X) (X), ((size_t) (sizeof(X) - 1))
|
||||
#define USTRING_WITH_LEN(X) ((uchar*) X), ((size_t) (sizeof(X) - 1))
|
||||
#define C_STRING_WITH_LEN(X) ((char *) (X)), ((size_t) (sizeof(X) - 1))
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -37,8 +37,8 @@ typedef struct st_mem_root
|
|||
USED_MEM *used; /* blocks almost without free memory */
|
||||
USED_MEM *pre_alloc; /* preallocated block */
|
||||
/* if block have less memory it will be put in 'used' list */
|
||||
unsigned int min_malloc;
|
||||
unsigned int block_size; /* initial block size */
|
||||
size_t min_malloc;
|
||||
size_t block_size; /* initial block size */
|
||||
unsigned int block_num; /* allocated blocks counter */
|
||||
/*
|
||||
first free block in queue test counter (if it exceed
|
||||
|
|
|
|||
63
dep/include/mysql/my_attribute.h
Normal file
63
dep/include/mysql/my_attribute.h
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
/* Copyright (C) 2000-2003 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
/*
|
||||
Helper macros used for setting different __attributes__
|
||||
on functions in a portable fashion
|
||||
*/
|
||||
|
||||
#ifndef _my_attribute_h
|
||||
#define _my_attribute_h
|
||||
|
||||
/*
|
||||
Disable __attribute__() on gcc < 2.7, g++ < 3.4, and non-gcc compilers.
|
||||
Some forms of __attribute__ are actually supported in earlier versions of
|
||||
g++, but we just disable them all because we only use them to generate
|
||||
compilation warnings.
|
||||
*/
|
||||
#ifndef __attribute__
|
||||
# if !defined(__GNUC__)
|
||||
# define __attribute__(A)
|
||||
# elif GCC_VERSION < 2008
|
||||
# define __attribute__(A)
|
||||
# elif defined(__cplusplus) && GCC_VERSION < 3004
|
||||
# define __attribute__(A)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
__attribute__((format(...))) is only supported in gcc >= 2.8 and g++ >= 3.4
|
||||
But that's already covered by the __attribute__ tests above, so this is
|
||||
just a convenience macro.
|
||||
*/
|
||||
#ifndef ATTRIBUTE_FORMAT
|
||||
# define ATTRIBUTE_FORMAT(style, m, n) __attribute__((format(style, m, n)))
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
__attribute__((format(...))) on a function pointer is not supported
|
||||
until gcc 3.1
|
||||
*/
|
||||
#ifndef ATTRIBUTE_FORMAT_FPTR
|
||||
# if (GCC_VERSION >= 3001)
|
||||
# define ATTRIBUTE_FORMAT_FPTR(style, m, n) ATTRIBUTE_FORMAT(style, m, n)
|
||||
# else
|
||||
# define ATTRIBUTE_FORMAT_FPTR(style, m, n)
|
||||
# endif /* GNUC >= 3.1 */
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
|
@ -16,19 +16,45 @@
|
|||
#ifndef _dbug_h
|
||||
#define _dbug_h
|
||||
|
||||
#if defined(__cplusplus) && !defined(DBUG_OFF)
|
||||
class Dbug_violation_helper
|
||||
{
|
||||
public:
|
||||
inline Dbug_violation_helper() :
|
||||
_entered(TRUE)
|
||||
{ }
|
||||
|
||||
inline ~Dbug_violation_helper()
|
||||
{
|
||||
assert(!_entered);
|
||||
}
|
||||
|
||||
inline void leave()
|
||||
{
|
||||
_entered= FALSE;
|
||||
}
|
||||
|
||||
private:
|
||||
bool _entered;
|
||||
};
|
||||
#endif /* C++ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#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);
|
||||
struct _db_code_state_;
|
||||
extern int _db_keyword_(struct _db_code_state_ *cs, const char *keyword);
|
||||
extern int _db_strict_keyword_(const char *keyword);
|
||||
extern int _db_explain_(struct _db_code_state_ *cs, char *buf, size_t len);
|
||||
extern int _db_explain_init_(char *buf, size_t len);
|
||||
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_(struct _db_code_state_ *cs, const char *control);
|
||||
extern void _db_set_init_(const char *control);
|
||||
extern void _db_enter_(const char *_func_,const char *_file_,uint _line_,
|
||||
const char **_sfunc_,const char **_sfile_,
|
||||
uint *_slevel_, char ***);
|
||||
|
|
@ -37,68 +63,94 @@ extern void _db_return_(uint _line_,const char **_sfunc_,const char **_sfile_,
|
|||
extern void _db_pargs_(uint _line_,const char *keyword);
|
||||
extern void _db_doprnt_ _VARARGS((const char *format,...))
|
||||
ATTRIBUTE_FORMAT(printf, 1, 2);
|
||||
extern void _db_dump_(uint _line_,const char *keyword,const char *memory,
|
||||
uint length);
|
||||
extern void _db_output_(uint flag);
|
||||
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 void _db_lock_file_(void);
|
||||
extern void _db_unlock_file_(void);
|
||||
extern FILE *_db_fp_(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
#define DBUG_ENTER(a) \
|
||||
const char *_db_func_, *_db_file_; \
|
||||
uint _db_level_; \
|
||||
char **_db_framep_; \
|
||||
Dbug_violation_helper dbug_violation_helper; \
|
||||
_db_enter_ (a, __FILE__, __LINE__, &_db_func_, &_db_file_, \
|
||||
&_db_level_, &_db_framep_)
|
||||
#define DBUG_VIOLATION_HELPER_LEAVE dbug_violation_helper.leave()
|
||||
|
||||
#else /* C */
|
||||
|
||||
#define DBUG_ENTER(a) \
|
||||
const char *_db_func_, *_db_file_; \
|
||||
uint _db_level_; \
|
||||
char **_db_framep_; \
|
||||
_db_enter_ (a, __FILE__, __LINE__, &_db_func_, &_db_file_, \
|
||||
&_db_level_, &_db_framep_)
|
||||
#define DBUG_VIOLATION_HELPER_LEAVE do { } while(0)
|
||||
|
||||
#endif /* C++ */
|
||||
|
||||
#define DBUG_ENTER(a) const char *_db_func_, *_db_file_; uint _db_level_; \
|
||||
char **_db_framep_; \
|
||||
_db_enter_ (a,__FILE__,__LINE__,&_db_func_,&_db_file_,&_db_level_, \
|
||||
&_db_framep_)
|
||||
#define DBUG_LEAVE \
|
||||
(_db_return_ (__LINE__, &_db_func_, &_db_file_, &_db_level_))
|
||||
#define DBUG_RETURN(a1) {DBUG_LEAVE; return(a1);}
|
||||
#define DBUG_VOID_RETURN {DBUG_LEAVE; return;}
|
||||
DBUG_VIOLATION_HELPER_LEAVE; \
|
||||
_db_return_ (__LINE__, &_db_func_, &_db_file_, &_db_level_)
|
||||
#define DBUG_RETURN(a1) do {DBUG_LEAVE; return(a1);} while(0)
|
||||
#define DBUG_VOID_RETURN do {DBUG_LEAVE; return;} while(0)
|
||||
#define DBUG_EXECUTE(keyword,a1) \
|
||||
{if (_db_on_) {if (_db_keyword_ (keyword)) { a1 }}}
|
||||
do {if (_db_keyword_(0, (keyword))) { a1 }} while(0)
|
||||
#define DBUG_EXECUTE_IF(keyword,a1) \
|
||||
do {if (_db_strict_keyword_ (keyword)) { a1 } } while(0)
|
||||
#define DBUG_EVALUATE(keyword,a1,a2) \
|
||||
(_db_keyword_(0,(keyword)) ? (a1) : (a2))
|
||||
#define DBUG_EVALUATE_IF(keyword,a1,a2) \
|
||||
(_db_strict_keyword_((keyword)) ? (a1) : (a2))
|
||||
#define DBUG_PRINT(keyword,arglist) \
|
||||
{if (_db_on_) {_db_pargs_(__LINE__,keyword); _db_doprnt_ 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_PROCESS(a1) (_db_process_ = a1)
|
||||
#define DBUG_FILE (_db_fp_)
|
||||
#define DBUG_SET(a1) _db_set_ (0, (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)\
|
||||
{if (_db_on_) {_db_dump_(__LINE__,keyword,a1,a2);}}
|
||||
#define DBUG_IN_USE (_db_fp_ && _db_fp_ != stderr)
|
||||
#define DEBUGGER_OFF _no_db_=1;_db_on_=0;
|
||||
#define DEBUGGER_ON _no_db_=0
|
||||
#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_OUTPUT(A) { _db_output_(A); }
|
||||
#define DBUG_LOCK_FILE _db_lock_file_()
|
||||
#define DBUG_UNLOCK_FILE _db_unlock_file_()
|
||||
#define DBUG_ASSERT(A) assert(A)
|
||||
#define DBUG_EXECUTE_IF(keyword,a1) \
|
||||
{if (_db_on_) {if (_db_strict_keyword_ (keyword)) { a1 }}}
|
||||
#define DBUG_EXPLAIN(buf,len) _db_explain_(0, (buf),(len))
|
||||
#define DBUG_EXPLAIN_INITIAL(buf,len) _db_explain_init_((buf),(len))
|
||||
#define IF_DBUG(A) A
|
||||
#else /* No debugger */
|
||||
|
||||
#define DBUG_ENTER(a1)
|
||||
#define DBUG_RETURN(a1) return(a1)
|
||||
#define DBUG_VOID_RETURN return
|
||||
#define DBUG_EXECUTE(keyword,a1) {}
|
||||
#define DBUG_EXECUTE_IF(keyword,a1) {}
|
||||
#define DBUG_PRINT(keyword,arglist) {}
|
||||
#define DBUG_PUSH(a1) {}
|
||||
#define DBUG_POP() {}
|
||||
#define DBUG_PROCESS(a1) {}
|
||||
#define DBUG_FILE (stderr)
|
||||
#define DBUG_SETJMP setjmp
|
||||
#define DBUG_LONGJMP longjmp
|
||||
#define DBUG_DUMP(keyword,a1,a2) {}
|
||||
#define DBUG_IN_USE 0
|
||||
#define DEBUGGER_OFF
|
||||
#define DEBUGGER_ON
|
||||
#define DBUG_END()
|
||||
#define DBUG_LOCK_FILE
|
||||
#define DBUG_UNLOCK_FILE
|
||||
#define DBUG_OUTPUT(A)
|
||||
#define DBUG_ASSERT(A) {}
|
||||
#define DBUG_LEAVE
|
||||
#define DBUG_VIOLATION_HELPER_LEAVE
|
||||
#define DBUG_RETURN(a1) do { return(a1); } while(0)
|
||||
#define DBUG_VOID_RETURN do { return; } while(0)
|
||||
#define DBUG_EXECUTE(keyword,a1) do { } while(0)
|
||||
#define DBUG_EXECUTE_IF(keyword,a1) do { } while(0)
|
||||
#define DBUG_EVALUATE(keyword,a1,a2) (a2)
|
||||
#define DBUG_EVALUATE_IF(keyword,a1,a2) (a2)
|
||||
#define DBUG_PRINT(keyword,arglist) do { } while(0)
|
||||
#define DBUG_PUSH(a1)
|
||||
#define DBUG_SET(a1) do { } while(0)
|
||||
#define DBUG_SET_INITIAL(a1) do { } while(0)
|
||||
#define DBUG_POP()
|
||||
#define DBUG_PROCESS(a1)
|
||||
#define DBUG_SETJMP(a1) setjmp(a1)
|
||||
#define DBUG_LONGJMP(a1) longjmp(a1)
|
||||
#define DBUG_DUMP(keyword,a1,a2) do { } while(0)
|
||||
#define DBUG_END()
|
||||
#define DBUG_ASSERT(A) do { } while(0)
|
||||
#define DBUG_LOCK_FILE
|
||||
#define DBUG_FILE (stderr)
|
||||
#define DBUG_UNLOCK_FILE
|
||||
#define DBUG_EXPLAIN(buf,len)
|
||||
#define DBUG_EXPLAIN_INITIAL(buf,len)
|
||||
#define IF_DBUG(A)
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
|
|
|
|||
105
dep/include/mysql/my_dir.h
Normal file
105
dep/include/mysql/my_dir.h
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
/* Copyright (C) 2000 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#ifndef _my_dir_h
|
||||
#define _my_dir_h
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef MY_DIR_H
|
||||
#define MY_DIR_H
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
/* Defines for my_dir and my_stat */
|
||||
|
||||
#define MY_S_IFMT S_IFMT /* type of file */
|
||||
#define MY_S_IFDIR S_IFDIR /* directory */
|
||||
#define MY_S_IFCHR S_IFCHR /* character special */
|
||||
#define MY_S_IFBLK S_IFBLK /* block special */
|
||||
#define MY_S_IFREG S_IFREG /* regular */
|
||||
#define MY_S_IFIFO S_IFIFO /* fifo */
|
||||
#define MY_S_ISUID S_ISUID /* set user id on execution */
|
||||
#define MY_S_ISGID S_ISGID /* set group id on execution */
|
||||
#define MY_S_ISVTX S_ISVTX /* save swapped text even after use */
|
||||
#define MY_S_IREAD S_IREAD /* read permission, owner */
|
||||
#define MY_S_IWRITE S_IWRITE /* write permission, owner */
|
||||
#define MY_S_IEXEC S_IEXEC /* execute/search permission, owner */
|
||||
|
||||
#define MY_S_ISDIR(m) (((m) & MY_S_IFMT) == MY_S_IFDIR)
|
||||
#define MY_S_ISCHR(m) (((m) & MY_S_IFMT) == MY_S_IFCHR)
|
||||
#define MY_S_ISBLK(m) (((m) & MY_S_IFMT) == MY_S_IFBLK)
|
||||
#define MY_S_ISREG(m) (((m) & MY_S_IFMT) == MY_S_IFREG)
|
||||
#define MY_S_ISFIFO(m) (((m) & MY_S_IFMT) == MY_S_IFIFO)
|
||||
|
||||
#define MY_DONT_SORT 512 /* my_lib; Don't sort files */
|
||||
#define MY_WANT_STAT 1024 /* my_lib; stat files */
|
||||
|
||||
/* typedefs for my_dir & my_stat */
|
||||
|
||||
#ifdef USE_MY_STAT_STRUCT
|
||||
|
||||
typedef struct my_stat
|
||||
{
|
||||
dev_t st_dev; /* major & minor device numbers */
|
||||
ino_t st_ino; /* inode number */
|
||||
ushort st_mode; /* file permissons (& suid sgid .. bits) */
|
||||
short st_nlink; /* number of links to file */
|
||||
ushort st_uid; /* user id */
|
||||
ushort st_gid; /* group id */
|
||||
dev_t st_rdev; /* more major & minor device numbers (???) */
|
||||
off_t st_size; /* size of file */
|
||||
time_t st_atime; /* time for last read */
|
||||
time_t st_mtime; /* time for last contens modify */
|
||||
time_t st_ctime; /* time for last inode or contents modify */
|
||||
} MY_STAT;
|
||||
|
||||
#else
|
||||
|
||||
#define MY_STAT struct stat /* Orginal struct have what we need */
|
||||
|
||||
#endif /* USE_MY_STAT_STRUCT */
|
||||
|
||||
/* Struct describing one file returned from my_dir */
|
||||
typedef struct fileinfo
|
||||
{
|
||||
char *name;
|
||||
MY_STAT *mystat;
|
||||
} FILEINFO;
|
||||
|
||||
typedef struct st_my_dir /* Struct returned from my_dir */
|
||||
{
|
||||
/*
|
||||
These members are just copies of parts of DYNAMIC_ARRAY structure,
|
||||
which is allocated right after the end of MY_DIR structure (MEM_ROOT
|
||||
for storing names is also resides there). We've left them here because
|
||||
we don't want to change code that uses my_dir.
|
||||
*/
|
||||
struct fileinfo *dir_entry;
|
||||
uint number_off_files;
|
||||
} MY_DIR;
|
||||
|
||||
extern MY_DIR *my_dir(const char *path,myf MyFlags);
|
||||
extern void my_dirend(MY_DIR *buffer);
|
||||
extern MY_STAT *my_stat(const char *path, MY_STAT *stat_area, myf my_flags);
|
||||
extern int my_fstat(int filenr, MY_STAT *stat_area, myf MyFlags);
|
||||
|
||||
#endif /* MY_DIR_H */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
@ -29,46 +29,62 @@ C_MODE_START
|
|||
#define GET_STR 9
|
||||
#define GET_STR_ALLOC 10
|
||||
#define GET_DISABLED 11
|
||||
#define GET_ENUM 12
|
||||
#define GET_SET 13
|
||||
#define GET_DOUBLE 14
|
||||
|
||||
#define GET_ASK_ADDR 128
|
||||
#define GET_TYPE_MASK 127
|
||||
|
||||
enum get_opt_arg_type { NO_ARG, OPT_ARG, REQUIRED_ARG };
|
||||
|
||||
struct st_typelib;
|
||||
|
||||
struct my_option
|
||||
{
|
||||
const char *name; /* Name of the option */
|
||||
int id; /* unique id or short option */
|
||||
const char *comment; /* option comment, for autom. --help */
|
||||
gptr *value; /* The variable value */
|
||||
gptr *u_max_value; /* The user def. max variable value */
|
||||
const char **str_values; /* Pointer to possible values */
|
||||
ulong var_type;
|
||||
void *value; /* The variable value */
|
||||
void *u_max_value; /* The user def. max variable value */
|
||||
struct st_typelib *typelib; /* Pointer to possible values */
|
||||
ulong var_type; /* Must match the variable type */
|
||||
enum get_opt_arg_type arg_type;
|
||||
longlong def_value; /* Default value */
|
||||
longlong min_value; /* Min allowed value */
|
||||
longlong max_value; /* Max allowed value */
|
||||
longlong sub_size; /* Subtract this from given value */
|
||||
long block_size; /* Value should be a mult. of this */
|
||||
int app_type; /* To be used by an application */
|
||||
void *app_type; /* To be used by an application */
|
||||
};
|
||||
|
||||
typedef my_bool (* my_get_one_option) (int, const struct my_option *, char * );
|
||||
typedef void (* my_error_reporter) (enum loglevel level, const char *format, ... );
|
||||
typedef my_bool (*my_get_one_option)(int, const struct my_option *, char *);
|
||||
typedef void (*my_error_reporter)(enum loglevel level, const char *format, ...);
|
||||
/**
|
||||
Used to retrieve a reference to the object (variable) that holds the value
|
||||
for the given option. For example, if var_type is GET_UINT, the function
|
||||
must return a pointer to a variable of type uint. A argument is stored in
|
||||
the location pointed to by the returned pointer.
|
||||
*/
|
||||
typedef void *(*my_getopt_value)(const char *, uint, const struct my_option *,
|
||||
int *);
|
||||
|
||||
extern char *disabled_my_option;
|
||||
extern my_bool my_getopt_print_errors;
|
||||
extern my_bool my_getopt_skip_unknown;
|
||||
extern my_error_reporter my_getopt_error_reporter;
|
||||
|
||||
extern int handle_options (int *argc, char ***argv,
|
||||
const struct my_option *longopts, my_get_one_option);
|
||||
extern void my_cleanup_options(const struct my_option *options);
|
||||
extern void my_print_help(const struct my_option *options);
|
||||
extern void my_print_variables(const struct my_option *options);
|
||||
extern void my_getopt_register_get_addr(gptr* (*func_addr)(const char *, uint,
|
||||
const struct my_option *));
|
||||
extern void my_getopt_register_get_addr(my_getopt_value);
|
||||
|
||||
ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *optp,
|
||||
bool *fixed);
|
||||
my_bool *fix);
|
||||
longlong getopt_ll_limit_value(longlong, const struct my_option *,
|
||||
my_bool *fix);
|
||||
my_bool getopt_compare_strings(const char *s, const char *t, uint length);
|
||||
|
||||
C_MODE_END
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -33,11 +33,11 @@ extern LIST *list_cons(void *data,LIST *root);
|
|||
extern LIST *list_reverse(LIST *root);
|
||||
extern void list_free(LIST *root,unsigned int free_data);
|
||||
extern unsigned int list_length(LIST *);
|
||||
extern int list_walk(LIST *,list_walk_action action,gptr argument);
|
||||
extern int list_walk(LIST *,list_walk_action action,unsigned char * argument);
|
||||
|
||||
#define list_rest(a) ((a)->next)
|
||||
#define list_push(a,b) (a)=list_cons((b),(a))
|
||||
#define list_pop(A) {LIST *old=(A); (A)=list_delete(old,old) ; my_free((gptr) old,MYF(MY_FAE)); }
|
||||
#define list_pop(A) {LIST *old=(A); (A)=list_delete(old,old) ; my_free((unsigned char *) old,MYF(MY_FAE)); }
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
|||
128
dep/include/mysql/my_net.h
Normal file
128
dep/include/mysql/my_net.h
Normal file
|
|
@ -0,0 +1,128 @@
|
|||
/* Copyright (C) 2000 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
/*
|
||||
thread safe version of some common functions:
|
||||
my_inet_ntoa
|
||||
|
||||
This file is also used to make handling of sockets and ioctl()
|
||||
portable accross systems.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef _my_net_h
|
||||
#define _my_net_h
|
||||
C_MODE_START
|
||||
|
||||
#include <errno.h>
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
#ifdef HAVE_POLL
|
||||
#include <sys/poll.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_IOCTL_H
|
||||
#include <sys/ioctl.h>
|
||||
#endif
|
||||
|
||||
#if !defined(__WIN__) && !defined(HAVE_BROKEN_NETINET_INCLUDES) && !defined(__BEOS__) && !defined(__NETWARE__)
|
||||
#include <netinet/in_systm.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/ip.h>
|
||||
#if !defined(alpha_linux_port)
|
||||
#include <netinet/tcp.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__WIN__)
|
||||
#define O_NONBLOCK 1 /* For emulation of fcntl() */
|
||||
|
||||
/*
|
||||
SHUT_RDWR is called SD_BOTH in windows and
|
||||
is defined to 2 in winsock2.h
|
||||
#define SD_BOTH 0x02
|
||||
*/
|
||||
#define SHUT_RDWR 0x02
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
On OSes which don't have the in_addr_t, we guess that using uint32 is the best
|
||||
possible choice. We guess this from the fact that on HP-UX64bit & FreeBSD64bit
|
||||
& Solaris64bit, in_addr_t is equivalent to uint32. And on Linux32bit too.
|
||||
*/
|
||||
#ifndef HAVE_IN_ADDR_T
|
||||
#define in_addr_t uint32
|
||||
#endif
|
||||
|
||||
/* On some operating systems (e.g. Solaris) INADDR_NONE is not defined */
|
||||
#ifndef INADDR_NONE
|
||||
#define INADDR_NONE -1 /* Error value from inet_addr */
|
||||
#endif
|
||||
|
||||
/* Thread safe or portable version of some functions */
|
||||
|
||||
void my_inet_ntoa(struct in_addr in, char *buf);
|
||||
|
||||
/*
|
||||
Handling of gethostbyname_r()
|
||||
*/
|
||||
|
||||
#if !defined(HPUX10)
|
||||
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_GETHOSTBYNAME_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(HPUX10)
|
||||
#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 */
|
||||
#ifdef SCO
|
||||
#undef h_errno
|
||||
#define h_errno errno
|
||||
#endif
|
||||
|
||||
C_MODE_END
|
||||
#endif
|
||||
58
dep/include/mysql/my_no_pthread.h
Normal file
58
dep/include/mysql/my_no_pthread.h
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
/* Copyright (C) 2000 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
|
||||
#if !defined(_my_no_pthread_h) && !defined(THREAD)
|
||||
#define _my_no_pthread_h
|
||||
|
||||
|
||||
/*
|
||||
This block is to access some thread-related type definitions
|
||||
even in builds which do not need thread functions,
|
||||
as some variables (based on these types) are declared
|
||||
even in non-threaded builds.
|
||||
Case in point: 'mf_keycache.c'
|
||||
*/
|
||||
#if defined(__WIN__)
|
||||
#else /* Normal threads */
|
||||
#include <pthread.h>
|
||||
|
||||
#endif /* defined(__WIN__) */
|
||||
|
||||
|
||||
/*
|
||||
This undefs some pthread mutex locks when one isn't using threads
|
||||
to make thread safe code, that should also work in single thread
|
||||
environment, easier to use.
|
||||
*/
|
||||
#define pthread_mutex_init(A,B)
|
||||
#define pthread_mutex_lock(A)
|
||||
#define pthread_mutex_unlock(A)
|
||||
#define pthread_mutex_destroy(A)
|
||||
#define my_rwlock_init(A,B)
|
||||
#define rw_rdlock(A)
|
||||
#define rw_wrlock(A)
|
||||
#define rw_unlock(A)
|
||||
#define rwlock_destroy(A)
|
||||
|
||||
typedef int my_pthread_once_t;
|
||||
#define MY_PTHREAD_ONCE_INIT 0
|
||||
#define MY_PTHREAD_ONCE_DONE 1
|
||||
|
||||
#define my_pthread_once(C,F) do { \
|
||||
if (*(C) != MY_PTHREAD_ONCE_DONE) { F(); *(C)= MY_PTHREAD_ONCE_DONE; } \
|
||||
} while(0)
|
||||
|
||||
#endif
|
||||
|
|
@ -18,7 +18,6 @@
|
|||
#ifndef _my_pthread_h
|
||||
#define _my_pthread_h
|
||||
|
||||
#include <errno.h>
|
||||
#ifndef ETIME
|
||||
#define ETIME ETIMEDOUT /* For FreeBSD */
|
||||
#endif
|
||||
|
|
@ -30,19 +29,8 @@ extern "C" {
|
|||
#define EXTERNC
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#if defined(__WIN__) || defined(OS2)
|
||||
|
||||
#ifdef OS2
|
||||
typedef ULONG HANDLE;
|
||||
typedef ULONG DWORD;
|
||||
typedef int sigset_t;
|
||||
#endif
|
||||
|
||||
#ifdef OS2
|
||||
typedef HMTX pthread_mutex_t;
|
||||
#else
|
||||
#if defined(__WIN__)
|
||||
typedef CRITICAL_SECTION pthread_mutex_t;
|
||||
#endif
|
||||
typedef HANDLE pthread_t;
|
||||
typedef struct thread_attr {
|
||||
DWORD dwStackSize ;
|
||||
|
|
@ -74,15 +62,17 @@ typedef struct {
|
|||
|
||||
} pthread_cond_t;
|
||||
|
||||
|
||||
typedef int pthread_mutexattr_t;
|
||||
#define win_pthread_self my_thread_var->pthread_self
|
||||
#ifdef OS2
|
||||
#define pthread_handler_t EXTERNC void * _Optlink
|
||||
typedef void * (_Optlink *pthread_handler)(void *);
|
||||
#else
|
||||
#define pthread_self() win_pthread_self
|
||||
#define pthread_handler_t EXTERNC void * __cdecl
|
||||
typedef void * (__cdecl *pthread_handler)(void *);
|
||||
#endif
|
||||
|
||||
typedef volatile LONG my_pthread_once_t;
|
||||
#define MY_PTHREAD_ONCE_INIT 0
|
||||
#define MY_PTHREAD_ONCE_INPROGRESS 1
|
||||
#define MY_PTHREAD_ONCE_DONE 2
|
||||
|
||||
/*
|
||||
Struct and macros to be used in combination with the
|
||||
|
|
@ -129,21 +119,26 @@ int pthread_attr_init(pthread_attr_t *connect_att);
|
|||
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_destroy(pthread_attr_t *connect_att);
|
||||
int my_pthread_once(my_pthread_once_t *once_control,void (*init_routine)(void));
|
||||
struct tm *localtime_r(const time_t *timep,struct tm *tmp);
|
||||
struct tm *gmtime_r(const time_t *timep,struct tm *tmp);
|
||||
|
||||
|
||||
void pthread_exit(void *a); /* was #define pthread_exit(A) ExitThread(A)*/
|
||||
|
||||
#ifndef OS2
|
||||
#define ETIMEDOUT 145 /* Win32 doesn't have this */
|
||||
#define getpid() GetCurrentThreadId()
|
||||
#endif
|
||||
#define pthread_self() win_pthread_self
|
||||
#define HAVE_LOCALTIME_R 1
|
||||
#define _REENTRANT 1
|
||||
#define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1
|
||||
|
||||
/*
|
||||
Windows has two ways to use thread local storage. The most efficient
|
||||
is using __declspec(thread), but that does not work properly when
|
||||
used in a .dll that is loaded at runtime, after program load. So for
|
||||
libmysql.dll and libmysqld.dll we define USE_TLS in order to use the
|
||||
TlsXxx() API instead, which works in all cases.
|
||||
*/
|
||||
#ifdef USE_TLS /* For LIBMYSQL.DLL */
|
||||
#undef SAFE_MUTEX /* This will cause conflicts */
|
||||
#define pthread_key(T,V) DWORD V
|
||||
|
|
@ -166,23 +161,15 @@ void pthread_exit(void *a); /* was #define pthread_exit(A) ExitThread(A)*/
|
|||
#endif /* USE_TLS */
|
||||
|
||||
#define pthread_equal(A,B) ((A) == (B))
|
||||
#ifdef OS2
|
||||
extern int pthread_mutex_init (pthread_mutex_t *, const pthread_mutexattr_t *);
|
||||
extern int pthread_mutex_lock (pthread_mutex_t *);
|
||||
extern int pthread_mutex_unlock (pthread_mutex_t *);
|
||||
extern int pthread_mutex_destroy (pthread_mutex_t *);
|
||||
#define my_pthread_setprio(A,B) DosSetPriority(PRTYS_THREAD,PRTYC_NOCHANGE, B, A)
|
||||
#define pthread_kill(A,B) raise(B)
|
||||
#define pthread_exit(A) pthread_dummy()
|
||||
#else
|
||||
#define pthread_mutex_init(A,B) (InitializeCriticalSection(A),0)
|
||||
#define pthread_mutex_lock(A) (EnterCriticalSection(A),0)
|
||||
#define pthread_mutex_trylock(A) win_pthread_mutex_trylock((A))
|
||||
#define pthread_mutex_unlock(A) LeaveCriticalSection(A)
|
||||
#define pthread_mutex_destroy(A) DeleteCriticalSection(A)
|
||||
#define my_pthread_setprio(A,B) SetThreadPriority(GetCurrentThread(), (B))
|
||||
#define pthread_kill(A,B) pthread_dummy(ESRCH)
|
||||
#endif /* OS2 */
|
||||
#define pthread_kill(A,B) pthread_dummy((A) ? 0 : ESRCH)
|
||||
|
||||
#define pthread_join(A,B) (WaitForSingleObject((A), INFINITE) != WAIT_OBJECT_0)
|
||||
|
||||
/* Dummy defines for easier code */
|
||||
#define pthread_attr_setdetachstate(A,B) pthread_dummy(0)
|
||||
|
|
@ -194,68 +181,6 @@ extern int pthread_mutex_destroy (pthread_mutex_t *);
|
|||
|
||||
#define my_pthread_getprio(thread_id) pthread_dummy(0)
|
||||
|
||||
#elif defined(HAVE_UNIXWARE7_THREADS)
|
||||
|
||||
#include <thread.h>
|
||||
#include <synch.h>
|
||||
|
||||
#ifndef _REENTRANT
|
||||
#define _REENTRANT
|
||||
#endif
|
||||
|
||||
#define HAVE_NONPOSIX_SIGWAIT
|
||||
#define pthread_t thread_t
|
||||
#define pthread_cond_t cond_t
|
||||
#define pthread_mutex_t mutex_t
|
||||
#define pthread_key_t thread_key_t
|
||||
typedef int pthread_attr_t; /* Needed by Unixware 7.0.0 */
|
||||
|
||||
#define pthread_key_create(A,B) thr_keycreate((A),(B))
|
||||
#define pthread_key_delete(A) thr_keydelete(A)
|
||||
|
||||
#define pthread_handler_t EXTERNC void *
|
||||
#define pthread_key(T,V) pthread_key_t V
|
||||
|
||||
void * my_pthread_getspecific_imp(pthread_key_t key);
|
||||
#define my_pthread_getspecific(A,B) ((A) my_pthread_getspecific_imp(B))
|
||||
#define my_pthread_getspecific_ptr(T,V) my_pthread_getspecific(T,V)
|
||||
|
||||
#define pthread_setspecific(A,B) thr_setspecific(A,B)
|
||||
#define my_pthread_setspecific_ptr(T,V) pthread_setspecific(T,V)
|
||||
|
||||
#define pthread_create(A,B,C,D) thr_create(NULL,65536L,(C),(D),THR_DETACHED,(A))
|
||||
#define pthread_cond_init(a,b) cond_init((a),USYNC_THREAD,NULL)
|
||||
#define pthread_cond_destroy(a) cond_destroy(a)
|
||||
#define pthread_cond_signal(a) cond_signal(a)
|
||||
#define pthread_cond_wait(a,b) cond_wait((a),(b))
|
||||
#define pthread_cond_timedwait(a,b,c) cond_timedwait((a),(b),(c))
|
||||
#define pthread_cond_broadcast(a) cond_broadcast(a)
|
||||
|
||||
#define pthread_mutex_init(a,b) mutex_init((a),USYNC_THREAD,NULL)
|
||||
#define pthread_mutex_lock(a) mutex_lock(a)
|
||||
#define pthread_mutex_unlock(a) mutex_unlock(a)
|
||||
#define pthread_mutex_destroy(a) mutex_destroy(a)
|
||||
|
||||
#define pthread_self() thr_self()
|
||||
#define pthread_exit(A) thr_exit(A)
|
||||
#define pthread_equal(A,B) (((A) == (B)) ? 1 : 0)
|
||||
#define pthread_kill(A,B) thr_kill((A),(B))
|
||||
#define HAVE_PTHREAD_KILL
|
||||
|
||||
#define pthread_sigmask(A,B,C) thr_sigsetmask((A),(B),(C))
|
||||
|
||||
extern int my_sigwait(const sigset_t *set,int *sig);
|
||||
|
||||
#define pthread_detach_this_thread() pthread_dummy(0)
|
||||
|
||||
#define pthread_attr_init(A) pthread_dummy(0)
|
||||
#define pthread_attr_destroy(A) pthread_dummy(0)
|
||||
#define pthread_attr_setscope(A,B) pthread_dummy(0)
|
||||
#define pthread_attr_setdetachstate(A,B) pthread_dummy(0)
|
||||
#define my_pthread_setprio(A,B) pthread_dummy (0)
|
||||
#define my_pthread_getprio(A) pthread_dummy (0)
|
||||
#define my_pthread_attr_setprio(A,B) pthread_dummy(0)
|
||||
|
||||
#else /* Normal threads */
|
||||
|
||||
#ifdef HAVE_rts_threads
|
||||
|
|
@ -276,9 +201,6 @@ extern int my_sigwait(const sigset_t *set,int *sig);
|
|||
#ifdef HAVE_SYNCH_H
|
||||
#include <synch.h>
|
||||
#endif
|
||||
#if defined(__EMX__) && (!defined(EMX_PTHREAD_REV) || (EMX_PTHREAD_REV < 2))
|
||||
#error Requires at least rev 2 of EMX pthreads library.
|
||||
#endif
|
||||
|
||||
#ifdef __NETWARE__
|
||||
void my_pthread_exit(void *status);
|
||||
|
|
@ -294,6 +216,10 @@ extern int my_pthread_getprio(pthread_t thread_id);
|
|||
#define pthread_handler_t EXTERNC void *
|
||||
typedef void *(* pthread_handler)(void *);
|
||||
|
||||
#define my_pthread_once_t pthread_once_t
|
||||
#define MY_PTHREAD_ONCE_INIT PTHREAD_ONCE_INIT
|
||||
#define my_pthread_once(C,F) pthread_once(C,F)
|
||||
|
||||
/* Test first for RTS or FSU threads */
|
||||
|
||||
#if defined(PTHREAD_SCOPE_GLOBAL) && !defined(PTHREAD_SCOPE_SYSTEM)
|
||||
|
|
@ -304,21 +230,6 @@ extern int my_pthread_create_detached;
|
|||
#define PTHREAD_SCOPE_SYSTEM PTHREAD_SCOPE_GLOBAL
|
||||
#define PTHREAD_SCOPE_PROCESS PTHREAD_SCOPE_LOCAL
|
||||
#define USE_ALARM_THREAD
|
||||
#elif defined(HAVE_mit_thread)
|
||||
#define USE_ALARM_THREAD
|
||||
#undef HAVE_LOCALTIME_R
|
||||
#define HAVE_LOCALTIME_R
|
||||
#undef HAVE_GMTIME_R
|
||||
#define HAVE_GMTIME_R
|
||||
#undef HAVE_PTHREAD_ATTR_SETSCOPE
|
||||
#define HAVE_PTHREAD_ATTR_SETSCOPE
|
||||
#undef HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE /* If we are running linux */
|
||||
#undef HAVE_RWLOCK_T
|
||||
#undef HAVE_RWLOCK_INIT
|
||||
#undef HAVE_PTHREAD_RWLOCK_RDLOCK
|
||||
#undef HAVE_SNPRINTF
|
||||
|
||||
#define my_pthread_attr_setprio(A,B)
|
||||
#endif /* defined(PTHREAD_SCOPE_GLOBAL) && !defined(PTHREAD_SCOPE_SYSTEM) */
|
||||
|
||||
#if defined(_BSDI_VERSION) && _BSDI_VERSION < 199910
|
||||
|
|
@ -346,7 +257,7 @@ extern int my_pthread_cond_init(pthread_cond_t *mp,
|
|||
#define pthread_sigmask(A,B,C) sigthreadmask((A),(B),(C))
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_SIGWAIT) && !defined(HAVE_mit_thread) && !defined(HAVE_rts_threads) && !defined(sigwait) && !defined(alpha_linux_port) && !defined(HAVE_NONPOSIX_SIGWAIT) && !defined(HAVE_DEC_3_2_THREADS) && !defined(_AIX)
|
||||
#if !defined(HAVE_SIGWAIT) && !defined(HAVE_rts_threads) && !defined(sigwait) && !defined(alpha_linux_port) && !defined(HAVE_NONPOSIX_SIGWAIT) && !defined(HAVE_DEC_3_2_THREADS) && !defined(_AIX)
|
||||
int sigwait(sigset_t *setp, int *sigp); /* Use our implemention */
|
||||
#endif
|
||||
|
||||
|
|
@ -378,6 +289,8 @@ int sigwait(sigset_t *setp, int *sigp); /* Use our implemention */
|
|||
#define my_pthread_setprio(A,B) pthread_setprio_np((A),(B))
|
||||
#elif defined(HAVE_PTHREAD_SETPRIO)
|
||||
#define my_pthread_setprio(A,B) pthread_setprio((A),(B))
|
||||
#elif defined(HAVE_PTHREAD_SETSCHEDPRIO)
|
||||
#define my_pthread_setprio(A,B) pthread_setschedprio((A),(B))
|
||||
#else
|
||||
extern void my_pthread_setprio(pthread_t thread_id,int prior);
|
||||
#endif
|
||||
|
|
@ -403,15 +316,12 @@ extern int my_pthread_cond_timedwait(pthread_cond_t *cond,
|
|||
#define pthread_cond_timedwait(A,B,C) my_pthread_cond_timedwait((A),(B),(C))
|
||||
#endif
|
||||
|
||||
#if defined(OS2)
|
||||
#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)
|
||||
#if !defined( HAVE_NONPOSIX_PTHREAD_GETSPECIFIC)
|
||||
#define my_pthread_getspecific(A,B) ((A) pthread_getspecific(B))
|
||||
#else
|
||||
#define my_pthread_getspecific(A,B) ((A) my_pthread_getspecific_imp(B))
|
||||
void *my_pthread_getspecific_imp(pthread_key_t key);
|
||||
#endif /* OS2 */
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_LOCALTIME_R
|
||||
struct tm *localtime_r(const time_t *clock, struct tm *res);
|
||||
|
|
@ -445,14 +355,14 @@ struct tm *gmtime_r(const time_t *clock, struct tm *res);
|
|||
#define pthread_attr_setdetachstate(A,B) pthread_dummy(0)
|
||||
#define pthread_create(A,B,C,D) pthread_create((A),*(B),(C),(D))
|
||||
#define pthread_sigmask(A,B,C) sigprocmask((A),(B),(C))
|
||||
#define pthread_kill(A,B) pthread_dummy(ESRCH)
|
||||
#define pthread_kill(A,B) pthread_dummy((A) ? 0 : ESRCH)
|
||||
#undef pthread_detach_this_thread
|
||||
#define pthread_detach_this_thread() { pthread_t tmp=pthread_self() ; pthread_detach(&tmp); }
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_DARWIN5_THREADS
|
||||
#define pthread_sigmask(A,B,C) sigprocmask((A),(B),(C))
|
||||
#define pthread_kill(A,B) pthread_dummy(ESRCH)
|
||||
#define pthread_kill(A,B) pthread_dummy((A) ? 0 : ESRCH)
|
||||
#define pthread_condattr_init(A) pthread_dummy(0)
|
||||
#define pthread_condattr_destroy(A) pthread_dummy(0)
|
||||
#undef pthread_detach_this_thread
|
||||
|
|
@ -472,7 +382,7 @@ struct tm *gmtime_r(const time_t *clock, struct tm *res);
|
|||
#ifndef pthread_sigmask
|
||||
#define pthread_sigmask(A,B,C) sigprocmask((A),(B),(C))
|
||||
#endif
|
||||
#define pthread_kill(A,B) pthread_dummy(ESRCH)
|
||||
#define pthread_kill(A,B) pthread_dummy((A) ? 0 : ESRCH)
|
||||
#undef pthread_detach_this_thread
|
||||
#define pthread_detach_this_thread() { pthread_t tmp=pthread_self() ; pthread_detach(&tmp); }
|
||||
#elif !defined(__NETWARE__) /* HAVE_PTHREAD_ATTR_CREATE && !HAVE_SIGWAIT */
|
||||
|
|
@ -616,6 +526,39 @@ void safe_mutex_end(FILE *file);
|
|||
#define safe_mutex_assert_not_owner(mp)
|
||||
#endif /* SAFE_MUTEX */
|
||||
|
||||
#if defined(MY_PTHREAD_FASTMUTEX) && !defined(SAFE_MUTEX)
|
||||
typedef struct st_my_pthread_fastmutex_t
|
||||
{
|
||||
pthread_mutex_t mutex;
|
||||
uint spins;
|
||||
uint rng_state;
|
||||
} my_pthread_fastmutex_t;
|
||||
void fastmutex_global_init(void);
|
||||
|
||||
int my_pthread_fastmutex_init(my_pthread_fastmutex_t *mp,
|
||||
const pthread_mutexattr_t *attr);
|
||||
int my_pthread_fastmutex_lock(my_pthread_fastmutex_t *mp);
|
||||
|
||||
#undef pthread_mutex_init
|
||||
#undef pthread_mutex_lock
|
||||
#undef pthread_mutex_unlock
|
||||
#undef pthread_mutex_destroy
|
||||
#undef pthread_mutex_wait
|
||||
#undef pthread_mutex_timedwait
|
||||
#undef pthread_mutex_t
|
||||
#undef pthread_cond_wait
|
||||
#undef pthread_cond_timedwait
|
||||
#undef pthread_mutex_trylock
|
||||
#define pthread_mutex_init(A,B) my_pthread_fastmutex_init((A),(B))
|
||||
#define pthread_mutex_lock(A) my_pthread_fastmutex_lock(A)
|
||||
#define pthread_mutex_unlock(A) pthread_mutex_unlock(&(A)->mutex)
|
||||
#define pthread_mutex_destroy(A) pthread_mutex_destroy(&(A)->mutex)
|
||||
#define pthread_cond_wait(A,B) pthread_cond_wait((A),&(B)->mutex)
|
||||
#define pthread_cond_timedwait(A,B,C) pthread_cond_timedwait((A),&(B)->mutex,(C))
|
||||
#define pthread_mutex_trylock(A) pthread_mutex_trylock(&(A)->mutex)
|
||||
#define pthread_mutex_t my_pthread_fastmutex_t
|
||||
#endif /* defined(MY_PTHREAD_FASTMUTEX) && !defined(SAFE_MUTEX) */
|
||||
|
||||
/* READ-WRITE thread locking */
|
||||
|
||||
#ifdef HAVE_BROKEN_RWLOCK /* For OpenUnix */
|
||||
|
|
@ -704,12 +647,14 @@ extern pthread_mutexattr_t my_errorcheck_mutexattr;
|
|||
#define ESRCH 1
|
||||
#endif
|
||||
|
||||
typedef ulong my_thread_id;
|
||||
|
||||
extern my_bool my_thread_global_init(void);
|
||||
extern void my_thread_global_end(void);
|
||||
extern my_bool my_thread_init(void);
|
||||
extern void my_thread_end(void);
|
||||
extern const char *my_thread_name(void);
|
||||
extern long my_thread_id(void);
|
||||
extern my_thread_id my_thread_dbug_id(void);
|
||||
extern int pthread_no_free(void *);
|
||||
extern int pthread_dummy(int);
|
||||
|
||||
|
|
@ -736,14 +681,14 @@ struct st_my_thread_var
|
|||
pthread_mutex_t * volatile current_mutex;
|
||||
pthread_cond_t * volatile current_cond;
|
||||
pthread_t pthread_self;
|
||||
long id;
|
||||
my_thread_id id;
|
||||
int cmp_length;
|
||||
int volatile abort;
|
||||
my_bool init;
|
||||
struct st_my_thread_var *next,**prev;
|
||||
void *opt_info;
|
||||
#ifndef DBUG_OFF
|
||||
gptr dbug;
|
||||
void *dbug;
|
||||
char name[THREAD_NAME_SIZE+1];
|
||||
#endif
|
||||
};
|
||||
|
|
@ -765,33 +710,68 @@ extern uint my_thread_end_wait_time;
|
|||
|
||||
extern uint thd_lib_detected;
|
||||
|
||||
/* statistics_xxx functions are for not essential statistic */
|
||||
/*
|
||||
thread_safe_xxx functions are for critical statistic or counters.
|
||||
The implementation is guaranteed to be thread safe, on all platforms.
|
||||
Note that the calling code should *not* assume the counter is protected
|
||||
by the mutex given, as the implementation of these helpers may change
|
||||
to use my_atomic operations instead.
|
||||
*/
|
||||
|
||||
/*
|
||||
Warning:
|
||||
When compiling without threads, this file is not included.
|
||||
See the *other* declarations of thread_safe_xxx in include/my_global.h
|
||||
|
||||
Second warning:
|
||||
See include/config-win.h, for yet another implementation.
|
||||
*/
|
||||
#ifdef THREAD
|
||||
#ifndef thread_safe_increment
|
||||
#ifdef HAVE_ATOMIC_ADD
|
||||
#define thread_safe_increment(V,L) atomic_inc((atomic_t*) &V)
|
||||
#define thread_safe_decrement(V,L) atomic_dec((atomic_t*) &V)
|
||||
#define thread_safe_add(V,C,L) atomic_add((C),(atomic_t*) &V)
|
||||
#define thread_safe_sub(V,C,L) atomic_sub((C),(atomic_t*) &V)
|
||||
#else
|
||||
#define thread_safe_increment(V,L) \
|
||||
(pthread_mutex_lock((L)), (V)++, pthread_mutex_unlock((L)))
|
||||
#define thread_safe_decrement(V,L) \
|
||||
(pthread_mutex_lock((L)), (V)--, pthread_mutex_unlock((L)))
|
||||
#define thread_safe_add(V,C,L) (pthread_mutex_lock((L)), (V)+=(C), pthread_mutex_unlock((L)))
|
||||
#endif
|
||||
|
||||
#ifndef thread_safe_add
|
||||
#define thread_safe_add(V,C,L) \
|
||||
(pthread_mutex_lock((L)), (V)+=(C), pthread_mutex_unlock((L)))
|
||||
#define thread_safe_sub(V,C,L) \
|
||||
(pthread_mutex_lock((L)), (V)-=(C), pthread_mutex_unlock((L)))
|
||||
#endif /* HAVE_ATOMIC_ADD */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
statistics_xxx functions are for non critical statistic,
|
||||
maintained in global variables.
|
||||
When compiling with SAFE_STATISTICS:
|
||||
- race conditions can not occur.
|
||||
- some locking occurs, which may cause performance degradation.
|
||||
|
||||
When compiling without SAFE_STATISTICS:
|
||||
- race conditions can occur, making the result slightly inaccurate.
|
||||
- the lock given is not honored.
|
||||
*/
|
||||
#ifdef SAFE_STATISTICS
|
||||
#define statistic_increment(V,L) thread_safe_increment((V),(L))
|
||||
#define statistic_decrement(V,L) thread_safe_decrement((V),(L))
|
||||
#define statistic_add(V,C,L) thread_safe_add((V),(C),(L))
|
||||
#define statistic_increment(V,L) thread_safe_increment((V),(L))
|
||||
#define statistic_decrement(V,L) thread_safe_decrement((V),(L))
|
||||
#define statistic_add(V,C,L) thread_safe_add((V),(C),(L))
|
||||
#define statistic_sub(V,C,L) thread_safe_sub((V),(C),(L))
|
||||
#else
|
||||
#define statistic_decrement(V,L) (V)--
|
||||
#define statistic_increment(V,L) (V)++
|
||||
#define statistic_add(V,C,L) (V)+=(C)
|
||||
#define statistic_sub(V,C,L) (V)-=(C)
|
||||
#endif /* SAFE_STATISTICS */
|
||||
#endif /* thread_safe_increment */
|
||||
|
||||
/*
|
||||
No locking needed, the counter is owned by the thread
|
||||
*/
|
||||
#define status_var_increment(V) (V)++
|
||||
#define status_var_decrement(V) (V)--
|
||||
#define status_var_add(V,C) (V)+=(C)
|
||||
#define status_var_sub(V,C) (V)-=(C)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,6 +25,19 @@ typedef struct my_aio_result {
|
|||
} my_aio_result;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_VALGRIND
|
||||
# include <valgrind/memcheck.h>
|
||||
# define MEM_UNDEFINED(a,len) VALGRIND_MAKE_MEM_UNDEFINED(a,len)
|
||||
# define MEM_NOACCESS(a,len) VALGRIND_MAKE_MEM_NOACCESS(a,len)
|
||||
# define MEM_CHECK_ADDRESSABLE(a,len) VALGRIND_CHECK_MEM_IS_ADDRESSABLE(a,len)
|
||||
# define MEM_CHECK_DEFINED(a,len) VALGRIND_CHECK_MEM_IS_DEFINED(a,len)
|
||||
#else /* HAVE_VALGRIND */
|
||||
# define MEM_UNDEFINED(a,len) ((void) 0)
|
||||
# define MEM_NOACCESS(a,len) ((void) 0)
|
||||
# define MEM_CHECK_ADDRESSABLE(a,len) ((void) 0)
|
||||
# define MEM_CHECK_DEFINED(a,len) ((void) 0)
|
||||
#endif /* HAVE_VALGRIND */
|
||||
|
||||
#ifndef THREAD
|
||||
extern int NEAR my_errno; /* Last error in mysys */
|
||||
#else
|
||||
|
|
@ -37,11 +50,9 @@ extern int NEAR my_errno; /* Last error in mysys */
|
|||
|
||||
#define MYSYS_PROGRAM_USES_CURSES() { error_handler_hook = my_message_curses; mysys_uses_curses=1; }
|
||||
#define MYSYS_PROGRAM_DONT_USE_CURSES() { error_handler_hook = my_message_no_curses; mysys_uses_curses=0;}
|
||||
#define MY_INIT(name); { my_progname= name; my_init(); }
|
||||
#define MY_INIT(name) { my_progname= name; my_init(); }
|
||||
|
||||
#define ERRMSGSIZE (SC_MAXWIDTH) /* Max length of a error message */
|
||||
#define NRERRBUFFS (2) /* Buffers for parameters */
|
||||
#define MY_FILE_ERROR ((uint) ~0)
|
||||
#define MY_FILE_ERROR ((size_t) -1)
|
||||
|
||||
/* General bitmaps for my_func's */
|
||||
#define MY_FFNF 1 /* Fatal if file not found */
|
||||
|
|
@ -51,6 +62,7 @@ extern int NEAR my_errno; /* Last error in mysys */
|
|||
#define MY_WME 16 /* Write message on error */
|
||||
#define MY_WAIT_IF_FULL 32 /* Wait and try again if disk full error */
|
||||
#define MY_IGNORE_BADFD 32 /* my_sync: ignore 'bad descriptor' errors */
|
||||
#define MY_SYNC_DIR 1024 /* my_create/delete/rename: sync directory */
|
||||
#define MY_RAID 64 /* Support for RAID */
|
||||
#define MY_FULL_IO 512 /* For my_read - loop intil I/O is complete */
|
||||
#define MY_DONT_CHECK_FILESIZE 128 /* Option to init_io_cache() */
|
||||
|
|
@ -68,11 +80,16 @@ extern int NEAR my_errno; /* Last error in mysys */
|
|||
#define MY_HOLD_ON_ERROR 256 /* my_realloc() ; Return old ptr on error */
|
||||
#define MY_DONT_OVERWRITE_FILE 1024 /* my_copy: Don't overwrite file */
|
||||
#define MY_THREADSAFE 2048 /* my_seek(): lock fd mutex */
|
||||
#define MY_SYNC 4096 /* my_copy(): sync dst file */
|
||||
|
||||
#define MY_CHECK_ERROR 1 /* Params to my_end; Check open-close */
|
||||
#define MY_GIVE_INFO 2 /* Give time info about process*/
|
||||
#define MY_DONT_FREE_DBUG 4 /* Do not call DBUG_END() in my_end() */
|
||||
|
||||
#define MY_REMOVE_NONE 0 /* Params for modify_defaults_file */
|
||||
#define MY_REMOVE_OPTION 1
|
||||
#define MY_REMOVE_SECTION 2
|
||||
|
||||
#define ME_HIGHBYTE 8 /* Shift for colours */
|
||||
#define ME_NOCUR 1 /* Don't use curses message */
|
||||
#define ME_OLDWIN 2 /* Use old window */
|
||||
|
|
@ -85,6 +102,9 @@ extern int NEAR my_errno; /* Last error in mysys */
|
|||
#define ME_COLOUR1 ((1 << ME_HIGHBYTE)) /* Possibly error-colours */
|
||||
#define ME_COLOUR2 ((2 << ME_HIGHBYTE))
|
||||
#define ME_COLOUR3 ((3 << ME_HIGHBYTE))
|
||||
#define ME_FATALERROR 1024 /* Fatal statement error */
|
||||
#define ME_NO_WARNING_FOR_ERROR 2048 /* Don't push a warning for error */
|
||||
#define ME_NO_SP_HANDLER 4096 /* Don't call stored routine error handlers */
|
||||
|
||||
/* Bits in last argument to fn_format */
|
||||
#define MY_REPLACE_DIR 1 /* replace dir in name with 'dir' */
|
||||
|
|
@ -95,6 +115,8 @@ extern int NEAR my_errno; /* Last error in mysys */
|
|||
#define MY_RETURN_REAL_PATH 32 /* return full path for file */
|
||||
#define MY_SAFE_PATH 64 /* Return NULL if too long path */
|
||||
#define MY_RELATIVE_PATH 128 /* name is relative to 'dir' */
|
||||
#define MY_APPEND_EXT 256 /* add 'ext' as additional extension*/
|
||||
|
||||
|
||||
/* My seek flags */
|
||||
#define MY_SEEK_SET 0
|
||||
|
|
@ -131,8 +153,8 @@ extern int NEAR my_errno; /* Last error in mysys */
|
|||
#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 my_strdup_with_length(A,B,C) _my_strdup_with_length((A),(B),__FILE__,__LINE__,C)
|
||||
#define TRASH(A,B) bfill(A, B, 0x8F)
|
||||
#define my_strndup(A,B,C) _my_strndup((A),(B),__FILE__,__LINE__,C)
|
||||
#define TRASH(A,B) do { bfill(A, B, 0x8F); MEM_UNDEFINED(A, B); } while (0)
|
||||
#define QUICK_SAFEMALLOC sf_malloc_quick=1
|
||||
#define NORMAL_SAFEMALLOC sf_malloc_quick=0
|
||||
extern uint sf_malloc_prehunc,sf_malloc_endhunc,sf_malloc_quick;
|
||||
|
|
@ -144,29 +166,39 @@ extern ulonglong sf_malloc_mem_limit;
|
|||
#else
|
||||
#define my_checkmalloc()
|
||||
#undef TERMINATE
|
||||
#define TERMINATE(A) {}
|
||||
#define TERMINATE(A,B) {}
|
||||
#define QUICK_SAFEMALLOC
|
||||
#define NORMAL_SAFEMALLOC
|
||||
extern gptr my_malloc(size_t Size, myf MyFlags);
|
||||
extern void *my_malloc(size_t Size,myf MyFlags);
|
||||
#define my_malloc_ci(SZ,FLAG) my_malloc( SZ, FLAG )
|
||||
extern gptr my_realloc(gptr oldpoint,uint Size,myf MyFlags);
|
||||
extern void my_no_flags_free(gptr ptr);
|
||||
extern gptr my_memdup(const byte *from, size_t length, myf MyFlags);
|
||||
extern void *my_realloc(void *oldpoint, size_t Size, myf MyFlags);
|
||||
extern void my_no_flags_free(void *ptr);
|
||||
extern void *my_memdup(const void *from,size_t length,myf MyFlags);
|
||||
extern char *my_strdup(const char *from,myf MyFlags);
|
||||
extern char *my_strdup_with_length(const char *from, size_t length,
|
||||
myf MyFlags);
|
||||
extern char *my_strndup(const char *from, size_t length,
|
||||
myf MyFlags);
|
||||
/* we do use FG (as a no-op) in below so that a typo on FG is caught */
|
||||
#define my_free(PTR,FG) ((void)FG,my_no_flags_free(PTR))
|
||||
#define CALLER_INFO_PROTO /* nothing */
|
||||
#define CALLER_INFO /* nothing */
|
||||
#define ORIG_CALLER_INFO /* nothing */
|
||||
#define TRASH(A,B) /* nothing */
|
||||
#define TRASH(A,B) do{MEM_CHECK_ADDRESSABLE(A,B);MEM_UNDEFINED(A,B);} while (0)
|
||||
#endif
|
||||
|
||||
#if defined(ENABLED_DEBUG_SYNC)
|
||||
extern void (*debug_sync_C_callback_ptr)(const char *, size_t);
|
||||
#define DEBUG_SYNC_C(_sync_point_name_) do { \
|
||||
if (debug_sync_C_callback_ptr != NULL) \
|
||||
(*debug_sync_C_callback_ptr)(STRING_WITH_LEN(_sync_point_name_)); } \
|
||||
while(0)
|
||||
#else
|
||||
#define DEBUG_SYNC_C(_sync_point_name_)
|
||||
#endif /* defined(ENABLED_DEBUG_SYNC) */
|
||||
|
||||
#ifdef HAVE_LARGE_PAGES
|
||||
extern uint my_get_large_page_size(void);
|
||||
extern gptr my_large_malloc(size_t size, myf my_flags);
|
||||
extern void my_large_free(gptr ptr, myf my_flags);
|
||||
extern uchar * my_large_malloc(size_t size, myf my_flags);
|
||||
extern void my_large_free(uchar * ptr, myf my_flags);
|
||||
#else
|
||||
#define my_get_large_page_size() (0)
|
||||
#define my_large_malloc(A,B) my_malloc_lock((A),(B))
|
||||
|
|
@ -191,22 +223,6 @@ extern void my_large_free(gptr ptr, myf my_flags);
|
|||
#define my_afree(PTR) my_free(PTR,MYF(MY_WME))
|
||||
#endif /* HAVE_ALLOCA */
|
||||
|
||||
#ifdef MSDOS
|
||||
#ifdef __ZTC__
|
||||
void * __CDECL halloc(long count,size_t length);
|
||||
void __CDECL hfree(void *ptr);
|
||||
#endif
|
||||
#if defined(USE_HALLOC)
|
||||
#if defined(_VCM_) || defined(M_IC80386)
|
||||
#undef USE_HALLOC
|
||||
#endif
|
||||
#endif
|
||||
#ifdef USE_HALLOC
|
||||
#define malloc(a) halloc((long) (a),1)
|
||||
#define free(a) hfree(a)
|
||||
#endif
|
||||
#endif /* MSDOS */
|
||||
|
||||
#ifndef errno /* did we already get it? */
|
||||
#ifdef HAVE_ERRNO_AS_DEFINE
|
||||
#include <errno.h> /* errno is a define */
|
||||
|
|
@ -214,7 +230,6 @@ void __CDECL hfree(void *ptr);
|
|||
extern int errno; /* declare errno */
|
||||
#endif
|
||||
#endif /* #ifndef errno */
|
||||
extern char NEAR errbuff[NRERRBUFFS][ERRMSGSIZE];
|
||||
extern char *home_dir; /* Home directory for user */
|
||||
extern const char *my_progname; /* program-name (printed in errors) */
|
||||
extern char NEAR curr_dir[]; /* Current directory for user */
|
||||
|
|
@ -222,6 +237,7 @@ 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,
|
||||
myf MyFlags);
|
||||
extern uint my_file_limit;
|
||||
extern ulong my_thread_stack_size;
|
||||
|
||||
#ifdef HAVE_LARGE_PAGES
|
||||
extern my_bool my_use_large_pages;
|
||||
|
|
@ -229,12 +245,13 @@ extern uint my_large_page_size;
|
|||
#endif
|
||||
|
||||
/* charsets */
|
||||
extern CHARSET_INFO *default_charset_info;
|
||||
extern CHARSET_INFO *all_charsets[256];
|
||||
extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *default_charset_info;
|
||||
extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *all_charsets[256];
|
||||
extern CHARSET_INFO compiled_charsets[];
|
||||
|
||||
/* statistics */
|
||||
extern ulong my_file_opened,my_stream_opened, my_tmp_file_created;
|
||||
extern ulong my_file_total_opened;
|
||||
extern uint mysys_usage_id;
|
||||
extern my_bool my_init_done;
|
||||
|
||||
|
|
@ -244,13 +261,13 @@ extern void (*my_sigtstp_cleanup)(void),
|
|||
(*my_sigtstp_restart)(void),
|
||||
(*my_abort_hook)(int);
|
||||
/* Executed when comming from shell */
|
||||
extern int NEAR my_umask, /* Default creation mask */
|
||||
NEAR my_umask_dir,
|
||||
extern MYSQL_PLUGIN_IMPORT int NEAR my_umask; /* Default creation mask */
|
||||
extern int NEAR my_umask_dir,
|
||||
NEAR my_recived_signals, /* Signals we have got */
|
||||
NEAR my_safe_to_handle_signal, /* Set when allowed to SIGTSTP */
|
||||
NEAR my_dont_interrupt; /* call remember_intr when set */
|
||||
extern my_bool NEAR mysys_uses_curses, my_use_symdir;
|
||||
extern ulong sf_malloc_cur_memory, sf_malloc_max_memory;
|
||||
extern size_t sf_malloc_cur_memory, sf_malloc_max_memory;
|
||||
|
||||
extern ulong my_default_record_cache_size;
|
||||
extern my_bool NEAR my_disable_locking,NEAR my_disable_async_io,
|
||||
|
|
@ -268,7 +285,7 @@ typedef struct wild_file_pack /* Struct to hold info when selecting files */
|
|||
{
|
||||
uint wilds; /* How many wildcards */
|
||||
uint not_pos; /* Start of not-theese-files */
|
||||
my_string *wild; /* Pointer to wildcards */
|
||||
char * *wild; /* Pointer to wildcards */
|
||||
} WF_PACK;
|
||||
|
||||
enum loglevel {
|
||||
|
|
@ -285,7 +302,14 @@ enum cache_type
|
|||
|
||||
enum flush_type
|
||||
{
|
||||
FLUSH_KEEP, FLUSH_RELEASE, FLUSH_IGNORE_CHANGED, FLUSH_FORCE_WRITE
|
||||
FLUSH_KEEP, /* flush block and keep it in the cache */
|
||||
FLUSH_RELEASE, /* flush block and remove it from the cache */
|
||||
FLUSH_IGNORE_CHANGED, /* remove block from the cache */
|
||||
/*
|
||||
As my_disable_flush_pagecache_blocks is always 0, the following option
|
||||
is strictly equivalent to FLUSH_KEEP
|
||||
*/
|
||||
FLUSH_FORCE_WRITE
|
||||
};
|
||||
|
||||
typedef struct st_record_cache /* Used when cacheing records */
|
||||
|
|
@ -294,7 +318,7 @@ typedef struct st_record_cache /* Used when cacheing records */
|
|||
int rc_seek,error,inited;
|
||||
uint rc_length,read_length,reclength;
|
||||
my_off_t rc_record_pos,end_of_file;
|
||||
byte *rc_buff,*rc_buff2,*rc_pos,*rc_end,*rc_request_pos;
|
||||
uchar *rc_buff,*rc_buff2,*rc_pos,*rc_end,*rc_request_pos;
|
||||
#ifdef HAVE_AIOWAIT
|
||||
int use_async_io;
|
||||
my_aio_result aio_result;
|
||||
|
|
@ -310,7 +334,7 @@ enum file_type
|
|||
|
||||
struct st_my_file_info
|
||||
{
|
||||
my_string name;
|
||||
char * name;
|
||||
enum file_type type;
|
||||
#if defined(THREAD) && !defined(HAVE_PREAD)
|
||||
pthread_mutex_t mutex;
|
||||
|
|
@ -321,7 +345,7 @@ extern struct st_my_file_info *my_file_info;
|
|||
|
||||
typedef struct st_dynamic_array
|
||||
{
|
||||
char *buffer;
|
||||
uchar *buffer;
|
||||
uint elements,max_element;
|
||||
uint alloc_increment;
|
||||
uint size_of_element;
|
||||
|
|
@ -340,7 +364,7 @@ typedef struct st_my_tmpdir
|
|||
typedef struct st_dynamic_string
|
||||
{
|
||||
char *str;
|
||||
uint length,max_length,alloc_increment;
|
||||
size_t length,max_length,alloc_increment;
|
||||
} DYNAMIC_STRING;
|
||||
|
||||
struct st_io_cache;
|
||||
|
|
@ -356,8 +380,8 @@ typedef struct st_io_cache_share
|
|||
my_off_t pos_in_file;
|
||||
/* If a synchronized write cache is the source of the data. */
|
||||
struct st_io_cache *source_cache;
|
||||
byte *buffer; /* The read buffer. */
|
||||
byte *read_end; /* Behind last valid byte of buffer. */
|
||||
uchar *buffer; /* The read buffer. */
|
||||
uchar *read_end; /* Behind last valid byte of buffer. */
|
||||
int running_threads; /* threads not in lock. */
|
||||
int total_threads; /* threads sharing the cache. */
|
||||
int error; /* Last error. */
|
||||
|
|
@ -370,7 +394,7 @@ typedef struct st_io_cache_share
|
|||
|
||||
typedef struct st_io_cache /* Used when cacheing files */
|
||||
{
|
||||
/* Offset in file corresponding to the first byte of byte* buffer. */
|
||||
/* Offset in file corresponding to the first byte of uchar* buffer. */
|
||||
my_off_t pos_in_file;
|
||||
/*
|
||||
The offset of end of file for READ_CACHE and WRITE_CACHE.
|
||||
|
|
@ -379,26 +403,26 @@ typedef struct st_io_cache /* Used when cacheing files */
|
|||
*/
|
||||
my_off_t end_of_file;
|
||||
/* Points to current read position in the buffer */
|
||||
byte *read_pos;
|
||||
uchar *read_pos;
|
||||
/* the non-inclusive boundary in the buffer for the currently valid read */
|
||||
byte *read_end;
|
||||
byte *buffer; /* The read buffer */
|
||||
uchar *read_end;
|
||||
uchar *buffer; /* The read buffer */
|
||||
/* Used in ASYNC_IO */
|
||||
byte *request_pos;
|
||||
uchar *request_pos;
|
||||
|
||||
/* Only used in WRITE caches and in SEQ_READ_APPEND to buffer writes */
|
||||
byte *write_buffer;
|
||||
uchar *write_buffer;
|
||||
/*
|
||||
Only used in SEQ_READ_APPEND, and points to the current read position
|
||||
in the write buffer. Note that reads in SEQ_READ_APPEND caches can
|
||||
happen from both read buffer (byte* buffer) and write buffer
|
||||
(byte* write_buffer).
|
||||
happen from both read buffer (uchar* buffer) and write buffer
|
||||
(uchar* write_buffer).
|
||||
*/
|
||||
byte *append_read_pos;
|
||||
uchar *append_read_pos;
|
||||
/* Points to current write position in the write buffer */
|
||||
byte *write_pos;
|
||||
uchar *write_pos;
|
||||
/* The non-inclusive boundary of the valid write area */
|
||||
byte *write_end;
|
||||
uchar *write_end;
|
||||
|
||||
/*
|
||||
Current_pos and current_end are convenience variables used by
|
||||
|
|
@ -406,7 +430,7 @@ typedef struct st_io_cache /* Used when cacheing files */
|
|||
current_pos points to &write_pos, and current_end to &write_end in a
|
||||
WRITE_CACHE, and &read_pos and &read_end respectively otherwise
|
||||
*/
|
||||
byte **current_pos, **current_end;
|
||||
uchar **current_pos, **current_end;
|
||||
#ifdef THREAD
|
||||
/*
|
||||
The lock is for append buffer used in SEQ_READ_APPEND cache
|
||||
|
|
@ -430,12 +454,12 @@ typedef struct st_io_cache /* Used when cacheing files */
|
|||
my_b_read() will call read_function to fetch the data. read_function
|
||||
must never be invoked directly.
|
||||
*/
|
||||
int (*read_function)(struct st_io_cache *,byte *,uint);
|
||||
int (*read_function)(struct st_io_cache *,uchar *,size_t);
|
||||
/*
|
||||
Same idea as in the case of read_function, except my_b_write() needs to
|
||||
be replaced with my_b_append() for a SEQ_READ_APPEND cache
|
||||
*/
|
||||
int (*write_function)(struct st_io_cache *,const byte *,uint);
|
||||
int (*write_function)(struct st_io_cache *,const uchar *,size_t);
|
||||
/*
|
||||
Specifies the type of the cache. Depending on the type of the cache
|
||||
certain operations might not be available and yield unpredicatable
|
||||
|
|
@ -470,9 +494,9 @@ typedef struct st_io_cache /* Used when cacheing files */
|
|||
*/
|
||||
int seek_not_done,error;
|
||||
/* buffer_length is memory size allocated for buffer or write_buffer */
|
||||
uint buffer_length;
|
||||
size_t buffer_length;
|
||||
/* read_length is the same as buffer_length except when we use async io */
|
||||
uint read_length;
|
||||
size_t read_length;
|
||||
myf myflags; /* Flags used to my_read/my_write */
|
||||
/*
|
||||
alloced_buffer is 1 if the buffer was allocated by init_io_cache() and
|
||||
|
|
@ -511,7 +535,7 @@ typedef int (*qsort2_cmp)(const void *, const void *, const void *);
|
|||
((info)->write_pos + (Count) <=(info)->write_end ?\
|
||||
(memcpy((info)->write_pos, (Buffer), (size_t)(Count)),\
|
||||
((info)->write_pos+=(Count)),0) : \
|
||||
(*(info)->write_function)((info),(Buffer),(Count)))
|
||||
(*(info)->write_function)((info),(uchar *)(Buffer),(Count)))
|
||||
|
||||
#define my_b_get(info) \
|
||||
((info)->read_pos != (info)->read_end ?\
|
||||
|
|
@ -528,19 +552,19 @@ typedef int (*qsort2_cmp)(const void *, const void *, const void *);
|
|||
(((info)->read_end=(info)->read_pos),(*(info)->read_function)(info,0,0))
|
||||
|
||||
#define my_b_tell(info) ((info)->pos_in_file + \
|
||||
(uint) (*(info)->current_pos - (info)->request_pos))
|
||||
(size_t) (*(info)->current_pos - (info)->request_pos))
|
||||
|
||||
#define my_b_get_buffer_start(info) (info)->request_pos
|
||||
#define my_b_get_bytes_in_buffer(info) (char*) (info)->read_end - \
|
||||
(char*) my_b_get_buffer_start(info)
|
||||
#define my_b_get_pos_in_file(info) (info)->pos_in_file
|
||||
|
||||
|
||||
/* tell write offset in the SEQ_APPEND cache */
|
||||
int my_b_copy_to_file(IO_CACHE *cache, FILE *file);
|
||||
my_off_t my_b_append_tell(IO_CACHE* info);
|
||||
my_off_t my_b_safe_tell(IO_CACHE* info); /* picks the correct tell() */
|
||||
|
||||
#define my_b_bytes_in_cache(info) (uint) (*(info)->current_end - \
|
||||
#define my_b_bytes_in_cache(info) (size_t) (*(info)->current_end - \
|
||||
*(info)->current_pos)
|
||||
|
||||
typedef uint32 ha_checksum;
|
||||
|
|
@ -557,23 +581,24 @@ typedef int (*Process_option_func)(void *ctx, const char *group_name,
|
|||
extern int my_copy(const char *from,const char *to,myf MyFlags);
|
||||
extern int my_append(const char *from,const char *to,myf MyFlags);
|
||||
extern int my_delete(const char *name,myf MyFlags);
|
||||
extern int my_getwd(my_string buf,uint size,myf MyFlags);
|
||||
extern int my_getwd(char * buf,size_t size,myf MyFlags);
|
||||
extern int my_setwd(const char *dir,myf MyFlags);
|
||||
extern int my_lock(File fd,int op,my_off_t start, my_off_t length,myf MyFlags);
|
||||
extern gptr my_once_alloc(uint Size,myf MyFlags);
|
||||
extern void *my_once_alloc(size_t Size,myf MyFlags);
|
||||
extern void my_once_free(void);
|
||||
extern char *my_once_strdup(const char *src,myf myflags);
|
||||
extern char *my_once_memdup(const char *src, uint len, myf myflags);
|
||||
extern void *my_once_memdup(const void *src, size_t len, myf myflags);
|
||||
extern File my_open(const char *FileName,int Flags,myf MyFlags);
|
||||
extern File my_register_filename(File fd, const char *FileName,
|
||||
enum file_type type_of_file,
|
||||
uint error_message_number, myf MyFlags);
|
||||
extern File my_create(const char *FileName,int CreateFlags,
|
||||
int AccsesFlags, myf MyFlags);
|
||||
int AccessFlags, myf MyFlags);
|
||||
extern int my_close(File Filedes,myf MyFlags);
|
||||
extern File my_dup(File file, 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_is_symlink(const char *filename);
|
||||
extern int my_realpath(char *to, const char *filename, myf MyFlags);
|
||||
extern File my_create_with_symlink(const char *linkname, const char *filename,
|
||||
int createflags, int access_flags,
|
||||
|
|
@ -581,39 +606,39 @@ extern File my_create_with_symlink(const char *linkname, const char *filename,
|
|||
extern int my_delete_with_symlink(const char *name, myf MyFlags);
|
||||
extern int my_rename_with_symlink(const char *from,const char *to,myf MyFlags);
|
||||
extern int my_symlink(const char *content, const char *linkname, myf MyFlags);
|
||||
extern uint my_read(File Filedes,byte *Buffer,uint Count,myf MyFlags);
|
||||
extern uint my_pread(File Filedes,byte *Buffer,uint Count,my_off_t offset,
|
||||
extern size_t my_read(File Filedes,uchar *Buffer,size_t Count,myf MyFlags);
|
||||
extern size_t my_pread(File Filedes,uchar *Buffer,size_t Count,my_off_t offset,
|
||||
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_tell(File fd,myf MyFlags);
|
||||
extern uint my_write(File Filedes,const byte *Buffer,uint Count,
|
||||
extern size_t my_write(File Filedes,const uchar *Buffer,size_t Count,
|
||||
myf MyFlags);
|
||||
extern uint my_pwrite(File Filedes,const byte *Buffer,uint Count,
|
||||
extern size_t my_pwrite(File Filedes,const uchar *Buffer,size_t Count,
|
||||
my_off_t offset,myf MyFlags);
|
||||
extern uint my_fread(FILE *stream,byte *Buffer,uint Count,myf MyFlags);
|
||||
extern uint my_fwrite(FILE *stream,const byte *Buffer,uint Count,
|
||||
extern size_t my_fread(FILE *stream,uchar *Buffer,size_t Count,myf MyFlags);
|
||||
extern size_t my_fwrite(FILE *stream,const uchar *Buffer,size_t Count,
|
||||
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 gptr _mymalloc(size_t uSize, const char *sFile,
|
||||
extern void *_mymalloc(size_t uSize,const char *sFile,
|
||||
uint uLine, myf MyFlag);
|
||||
extern gptr _myrealloc(gptr pPtr, size_t uSize, const char *sFile,
|
||||
uint uLine, myf MyFlag);
|
||||
extern gptr my_multi_malloc _VARARGS((myf MyFlags, ...));
|
||||
extern void _myfree(gptr pPtr, const char *sFile, uint uLine, myf MyFlag);
|
||||
extern int _sanity(const char *sFile,unsigned int uLine);
|
||||
extern gptr _my_memdup(const byte *from, size_t length,
|
||||
const char *sFile, uint uLine, myf MyFlag);
|
||||
extern my_string _my_strdup(const char *from, const char *sFile, uint uLine,
|
||||
myf MyFlag);
|
||||
extern char *_my_strdup_with_length(const char *from, size_t length,
|
||||
const char *sFile, uint uLine,
|
||||
myf MyFlag);
|
||||
extern void *_myrealloc(void *pPtr,size_t uSize,const char *sFile,
|
||||
uint uLine, myf MyFlag);
|
||||
extern void * my_multi_malloc _VARARGS((myf MyFlags, ...));
|
||||
extern void _myfree(void *pPtr,const char *sFile,uint uLine, myf MyFlag);
|
||||
extern int _sanity(const char *sFile, uint uLine);
|
||||
extern void *_my_memdup(const void *from, size_t length,
|
||||
const char *sFile, uint uLine,myf MyFlag);
|
||||
extern char * _my_strdup(const char *from, const char *sFile, uint uLine,
|
||||
myf MyFlag);
|
||||
extern char *_my_strndup(const char *from, size_t length,
|
||||
const char *sFile, uint uLine,
|
||||
myf MyFlag);
|
||||
|
||||
/* implemented in my_memmem.c */
|
||||
extern void *my_memmem(const void *haystack, size_t haystacklen,
|
||||
const void *needle, size_t needlelen);
|
||||
const void *needle, size_t needlelen);
|
||||
|
||||
|
||||
#ifdef __WIN__
|
||||
|
|
@ -623,6 +648,7 @@ extern File my_sopen(const char *path, int oflag, int shflag, int pmode);
|
|||
#define my_access access
|
||||
#endif
|
||||
extern int check_if_legal_filename(const char *path);
|
||||
extern int check_if_legal_tablename(const char *path);
|
||||
|
||||
#if defined(__WIN__) && defined(__NT__)
|
||||
extern int nt_share_delete(const char *name,myf MyFlags);
|
||||
|
|
@ -632,14 +658,17 @@ extern int nt_share_delete(const char *name,myf MyFlags);
|
|||
#endif
|
||||
|
||||
#ifndef TERMINATE
|
||||
extern void TERMINATE(FILE *file);
|
||||
extern void TERMINATE(FILE *file, uint flag);
|
||||
#endif
|
||||
extern void init_glob_errs(void);
|
||||
extern void wait_for_free_space(const char *filename, int errors);
|
||||
extern FILE *my_fopen(const char *FileName,int Flags,myf MyFlags);
|
||||
extern FILE *my_fdopen(File Filedes,const char *name, int Flags,myf MyFlags);
|
||||
extern int my_fclose(FILE *fd,myf MyFlags);
|
||||
extern int my_chsize(File fd,my_off_t newlength, int filler, myf MyFlags);
|
||||
extern int my_sync(File fd, myf my_flags);
|
||||
extern int my_sync_dir(const char *dir_name, myf my_flags);
|
||||
extern int my_sync_dir_by_file(const char *file_name, myf my_flags);
|
||||
extern int my_error _VARARGS((int nr,myf MyFlags, ...));
|
||||
extern int my_printf_error _VARARGS((uint my_err, const char *format,
|
||||
myf MyFlags, ...))
|
||||
|
|
@ -653,7 +682,7 @@ extern my_bool my_init(void);
|
|||
extern void my_end(int infoflag);
|
||||
extern int my_redel(const char *from, const char *to, int MyFlags);
|
||||
extern int my_copystat(const char *from, const char *to, int MyFlags);
|
||||
extern my_string my_filename(File fd);
|
||||
extern char * my_filename(File fd);
|
||||
|
||||
#ifndef THREAD
|
||||
extern void dont_break(void);
|
||||
|
|
@ -663,140 +692,159 @@ extern void allow_break(void);
|
|||
#define allow_break()
|
||||
#endif
|
||||
|
||||
#ifdef EXTRA_DEBUG
|
||||
void my_print_open_files(void);
|
||||
#else
|
||||
#define my_print_open_files()
|
||||
#endif
|
||||
|
||||
extern my_bool init_tmpdir(MY_TMPDIR *tmpdir, const char *pathlist);
|
||||
extern char *my_tmpdir(MY_TMPDIR *tmpdir);
|
||||
extern void free_tmpdir(MY_TMPDIR *tmpdir);
|
||||
|
||||
extern void my_remember_signal(int signal_number,sig_handler (*func)(int));
|
||||
extern uint dirname_part(my_string to,const char *name);
|
||||
extern uint dirname_length(const char *name);
|
||||
extern size_t dirname_part(char * to,const char *name, size_t *to_res_length);
|
||||
extern size_t dirname_length(const char *name);
|
||||
#define base_name(A) (A+dirname_length(A))
|
||||
extern int test_if_hard_path(const char *dir_name);
|
||||
extern my_bool has_path(const char *name);
|
||||
extern char *convert_dirname(char *to, const char *from, const char *from_end);
|
||||
extern void to_unix_path(my_string name);
|
||||
extern my_string fn_ext(const char *name);
|
||||
extern my_string fn_same(my_string toname,const char *name,int flag);
|
||||
extern my_string fn_format(my_string to,const char *name,const char *dir,
|
||||
extern void to_unix_path(char * name);
|
||||
extern char * fn_ext(const char *name);
|
||||
extern char * fn_same(char * toname,const char *name,int flag);
|
||||
extern char * fn_format(char * to,const char *name,const char *dir,
|
||||
const char *form, uint flag);
|
||||
extern size_s strlength(const char *str);
|
||||
extern void pack_dirname(my_string to,const char *from);
|
||||
extern uint unpack_dirname(my_string to,const char *from);
|
||||
extern uint cleanup_dirname(my_string to,const char *from);
|
||||
extern uint system_filename(my_string to,const char *from);
|
||||
extern uint unpack_filename(my_string to,const char *from);
|
||||
extern my_string intern_filename(my_string to,const char *from);
|
||||
extern my_string directory_file_name(my_string dst, const char *src);
|
||||
extern int pack_filename(my_string to, const char *name, size_s max_length);
|
||||
extern my_string my_path(my_string to,const char *progname,
|
||||
extern size_t strlength(const char *str);
|
||||
extern void pack_dirname(char * to,const char *from);
|
||||
extern size_t normalize_dirname(char * to, const char *from);
|
||||
extern size_t unpack_dirname(char * to,const char *from);
|
||||
extern size_t cleanup_dirname(char * to,const char *from);
|
||||
extern size_t system_filename(char * to,const char *from);
|
||||
extern size_t unpack_filename(char * to,const char *from);
|
||||
extern char * intern_filename(char * to,const char *from);
|
||||
extern char * directory_file_name(char * dst, const char *src);
|
||||
extern int pack_filename(char * to, const char *name, size_t max_length);
|
||||
extern char * my_path(char * to,const char *progname,
|
||||
const char *own_pathname_part);
|
||||
extern my_string my_load_path(my_string to, const char *path,
|
||||
extern char * my_load_path(char * to, const char *path,
|
||||
const char *own_path_prefix);
|
||||
extern int wild_compare(const char *str,const char *wildstr,pbool str_is_pattern);
|
||||
extern WF_PACK *wf_comp(my_string str);
|
||||
extern int wild_compare(const char *str,const char *wildstr,
|
||||
pbool str_is_pattern);
|
||||
extern WF_PACK *wf_comp(char * str);
|
||||
extern int wf_test(struct wild_file_pack *wf_pack,const char *name);
|
||||
extern void wf_end(struct wild_file_pack *buffer);
|
||||
extern size_s strip_sp(my_string str);
|
||||
extern my_bool array_append_string_unique(const char *str,
|
||||
const char **array, size_t size);
|
||||
extern void get_date(my_string to,int timeflag,time_t use_time);
|
||||
extern void soundex(CHARSET_INFO *, my_string out_pntr, my_string in_pntr,pbool remove_garbage);
|
||||
extern int init_record_cache(RECORD_CACHE *info,uint cachesize,File file,
|
||||
uint reclength,enum cache_type type,
|
||||
extern void get_date(char * to,int timeflag,time_t use_time);
|
||||
extern void soundex(CHARSET_INFO *, char * out_pntr, char * in_pntr,
|
||||
pbool remove_garbage);
|
||||
extern int init_record_cache(RECORD_CACHE *info,size_t cachesize,File file,
|
||||
size_t reclength,enum cache_type type,
|
||||
pbool use_async_io);
|
||||
extern int read_cache_record(RECORD_CACHE *info,byte *to);
|
||||
extern int read_cache_record(RECORD_CACHE *info,uchar *to);
|
||||
extern int end_record_cache(RECORD_CACHE *info);
|
||||
extern int write_cache_record(RECORD_CACHE *info,my_off_t filepos,
|
||||
const byte *record,uint length);
|
||||
const uchar *record,size_t length);
|
||||
extern int flush_write_cache(RECORD_CACHE *info);
|
||||
extern long my_clock(void);
|
||||
extern sig_handler sigtstp_handler(int signal_number);
|
||||
extern void handle_recived_signals(void);
|
||||
|
||||
extern sig_handler my_set_alarm_variable(int signo);
|
||||
extern void my_string_ptr_sort(void *base,uint items,size_s size);
|
||||
extern void my_string_ptr_sort(uchar *base,uint items,size_t size);
|
||||
extern void radixsort_for_str_ptr(uchar* base[], uint number_of_elements,
|
||||
size_s size_of_element,uchar *buffer[]);
|
||||
size_t size_of_element,uchar *buffer[]);
|
||||
extern qsort_t my_qsort(void *base_ptr, size_t total_elems, size_t size,
|
||||
qsort_cmp cmp);
|
||||
extern qsort_t my_qsort2(void *base_ptr, size_t total_elems, size_t size,
|
||||
qsort2_cmp cmp, void *cmp_argument);
|
||||
extern qsort2_cmp get_ptr_compare(uint);
|
||||
void my_store_ptr(byte *buff, uint pack_length, my_off_t pos);
|
||||
my_off_t my_get_ptr(byte *ptr, uint pack_length);
|
||||
extern int init_io_cache(IO_CACHE *info,File file,uint cachesize,
|
||||
extern qsort2_cmp get_ptr_compare(size_t);
|
||||
void my_store_ptr(uchar *buff, size_t pack_length, my_off_t pos);
|
||||
my_off_t my_get_ptr(uchar *ptr, size_t pack_length);
|
||||
extern int init_io_cache(IO_CACHE *info,File file,size_t cachesize,
|
||||
enum cache_type type,my_off_t seek_offset,
|
||||
pbool use_async_io, myf cache_myflags);
|
||||
extern my_bool reinit_io_cache(IO_CACHE *info,enum cache_type type,
|
||||
my_off_t seek_offset,pbool use_async_io,
|
||||
pbool clear_cache);
|
||||
extern void setup_io_cache(IO_CACHE* info);
|
||||
extern int _my_b_read(IO_CACHE *info,byte *Buffer,uint Count);
|
||||
extern int _my_b_read(IO_CACHE *info,uchar *Buffer,size_t Count);
|
||||
#ifdef THREAD
|
||||
extern int _my_b_read_r(IO_CACHE *info,byte *Buffer,uint Count);
|
||||
extern int _my_b_read_r(IO_CACHE *info,uchar *Buffer,size_t Count);
|
||||
extern void init_io_cache_share(IO_CACHE *read_cache, IO_CACHE_SHARE *cshare,
|
||||
IO_CACHE *write_cache, uint num_threads);
|
||||
extern void remove_io_thread(IO_CACHE *info);
|
||||
#endif
|
||||
extern int _my_b_seq_read(IO_CACHE *info,byte *Buffer,uint Count);
|
||||
extern int _my_b_net_read(IO_CACHE *info,byte *Buffer,uint Count);
|
||||
extern int _my_b_seq_read(IO_CACHE *info,uchar *Buffer,size_t Count);
|
||||
extern int _my_b_net_read(IO_CACHE *info,uchar *Buffer,size_t Count);
|
||||
extern int _my_b_get(IO_CACHE *info);
|
||||
extern int _my_b_async_read(IO_CACHE *info,byte *Buffer,uint Count);
|
||||
extern int _my_b_write(IO_CACHE *info,const byte *Buffer,uint Count);
|
||||
extern int my_b_append(IO_CACHE *info,const byte *Buffer,uint Count);
|
||||
extern int my_b_safe_write(IO_CACHE *info,const byte *Buffer,uint Count);
|
||||
extern int _my_b_async_read(IO_CACHE *info,uchar *Buffer,size_t Count);
|
||||
extern int _my_b_write(IO_CACHE *info,const uchar *Buffer,size_t Count);
|
||||
extern int my_b_append(IO_CACHE *info,const uchar *Buffer,size_t Count);
|
||||
extern int my_b_safe_write(IO_CACHE *info,const uchar *Buffer,size_t Count);
|
||||
|
||||
extern int my_block_write(IO_CACHE *info, const byte *Buffer,
|
||||
uint Count, my_off_t pos);
|
||||
extern int my_block_write(IO_CACHE *info, const uchar *Buffer,
|
||||
size_t Count, my_off_t pos);
|
||||
extern int my_b_flush_io_cache(IO_CACHE *info, int need_append_buffer_lock);
|
||||
|
||||
#define flush_io_cache(info) my_b_flush_io_cache((info),1)
|
||||
|
||||
extern int end_io_cache(IO_CACHE *info);
|
||||
extern uint my_b_fill(IO_CACHE *info);
|
||||
extern size_t my_b_fill(IO_CACHE *info);
|
||||
extern void my_b_seek(IO_CACHE *info,my_off_t pos);
|
||||
extern uint my_b_gets(IO_CACHE *info, char *to, uint max_length);
|
||||
extern size_t my_b_gets(IO_CACHE *info, char *to, size_t max_length);
|
||||
extern my_off_t my_b_filelength(IO_CACHE *info);
|
||||
extern 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 size_t my_b_printf(IO_CACHE *info, const char* fmt, ...);
|
||||
extern size_t my_b_vprintf(IO_CACHE *info, const char* fmt, va_list ap);
|
||||
extern my_bool open_cached_file(IO_CACHE *cache,const char *dir,
|
||||
const char *prefix, uint cache_size,
|
||||
const char *prefix, size_t cache_size,
|
||||
myf cache_myflags);
|
||||
extern my_bool real_open_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,
|
||||
int mode, myf MyFlags);
|
||||
#define my_init_dynamic_array(A,B,C,D) init_dynamic_array(A,B,C,D CALLER_INFO)
|
||||
#define my_init_dynamic_array_ci(A,B,C,D) init_dynamic_array(A,B,C,D ORIG_CALLER_INFO)
|
||||
#define my_init_dynamic_array(A,B,C,D) init_dynamic_array2(A,B,NULL,C,D CALLER_INFO)
|
||||
#define my_init_dynamic_array_ci(A,B,C,D) init_dynamic_array2(A,B,NULL,C,D ORIG_CALLER_INFO)
|
||||
#define my_init_dynamic_array2(A,B,C,D,E) init_dynamic_array2(A,B,C,D,E CALLER_INFO)
|
||||
#define my_init_dynamic_array2_ci(A,B,C,D,E) init_dynamic_array2(A,B,C,D,E ORIG_CALLER_INFO)
|
||||
extern my_bool init_dynamic_array2(DYNAMIC_ARRAY *array,uint element_size,
|
||||
void *init_buffer, uint init_alloc,
|
||||
uint alloc_increment
|
||||
CALLER_INFO_PROTO);
|
||||
/* init_dynamic_array() function is deprecated */
|
||||
extern my_bool init_dynamic_array(DYNAMIC_ARRAY *array,uint element_size,
|
||||
uint init_alloc,uint alloc_increment
|
||||
CALLER_INFO_PROTO);
|
||||
extern my_bool insert_dynamic(DYNAMIC_ARRAY *array,gptr element);
|
||||
extern byte *alloc_dynamic(DYNAMIC_ARRAY *array);
|
||||
extern byte *pop_dynamic(DYNAMIC_ARRAY*);
|
||||
extern my_bool set_dynamic(DYNAMIC_ARRAY *array,gptr element,uint array_index);
|
||||
extern void get_dynamic(DYNAMIC_ARRAY *array,gptr element,uint array_index);
|
||||
extern my_bool insert_dynamic(DYNAMIC_ARRAY *array,uchar * element);
|
||||
extern uchar *alloc_dynamic(DYNAMIC_ARRAY *array);
|
||||
extern uchar *pop_dynamic(DYNAMIC_ARRAY*);
|
||||
extern my_bool set_dynamic(DYNAMIC_ARRAY *array,uchar * element,uint array_index);
|
||||
extern my_bool allocate_dynamic(DYNAMIC_ARRAY *array, uint max_elements);
|
||||
extern void get_dynamic(DYNAMIC_ARRAY *array,uchar * element,uint array_index);
|
||||
extern void delete_dynamic(DYNAMIC_ARRAY *array);
|
||||
extern void delete_dynamic_element(DYNAMIC_ARRAY *array, uint array_index);
|
||||
extern void freeze_size(DYNAMIC_ARRAY *array);
|
||||
extern int get_index_dynamic(DYNAMIC_ARRAY *array, uchar * element);
|
||||
#define dynamic_array_ptr(array,array_index) ((array)->buffer+(array_index)*(array)->size_of_element)
|
||||
#define dynamic_element(array,array_index,type) ((type)((array)->buffer) +(array_index))
|
||||
#define push_dynamic(A,B) insert_dynamic(A,B)
|
||||
#define push_dynamic(A,B) insert_dynamic((A),(B))
|
||||
#define reset_dynamic(array) ((array)->elements= 0)
|
||||
#define sort_dynamic(A,cmp) my_qsort((A)->buffer, (A)->elements, (A)->size_of_element, (cmp))
|
||||
|
||||
extern my_bool init_dynamic_string(DYNAMIC_STRING *str, const char *init_str,
|
||||
uint init_alloc,uint alloc_increment);
|
||||
size_t init_alloc,size_t alloc_increment);
|
||||
extern my_bool dynstr_append(DYNAMIC_STRING *str, const char *append);
|
||||
my_bool dynstr_append_mem(DYNAMIC_STRING *str, const char *append,
|
||||
uint length);
|
||||
size_t length);
|
||||
extern my_bool dynstr_append_os_quoted(DYNAMIC_STRING *str, const char *append,
|
||||
...);
|
||||
extern my_bool dynstr_set(DYNAMIC_STRING *str, const char *init_str);
|
||||
extern my_bool dynstr_realloc(DYNAMIC_STRING *str, ulong additional_size);
|
||||
extern my_bool dynstr_realloc(DYNAMIC_STRING *str, size_t additional_size);
|
||||
extern my_bool dynstr_trunc(DYNAMIC_STRING *str, size_t n);
|
||||
extern void dynstr_free(DYNAMIC_STRING *str);
|
||||
#ifdef HAVE_MLOCK
|
||||
extern byte *my_malloc_lock(uint length,myf flags);
|
||||
extern void my_free_lock(byte *ptr,myf flags);
|
||||
extern void *my_malloc_lock(size_t length,myf flags);
|
||||
extern void my_free_lock(void *ptr,myf flags);
|
||||
#else
|
||||
#define my_malloc_lock(A,B) my_malloc((A),(B))
|
||||
#define my_free_lock(A,B) my_free((A),(B))
|
||||
|
|
@ -804,45 +852,55 @@ extern void my_free_lock(byte *ptr,myf flags);
|
|||
#define alloc_root_inited(A) ((A)->min_malloc != 0)
|
||||
#define ALLOC_ROOT_MIN_BLOCK_SIZE (MALLOC_OVERHEAD + sizeof(USED_MEM) + 8)
|
||||
#define clear_alloc_root(A) do { (A)->free= (A)->used= (A)->pre_alloc= 0; (A)->min_malloc=0;} while(0)
|
||||
extern void init_alloc_root(MEM_ROOT *mem_root, uint block_size,
|
||||
uint pre_alloc_size);
|
||||
extern gptr alloc_root(MEM_ROOT *mem_root,unsigned int Size);
|
||||
extern gptr multi_alloc_root(MEM_ROOT *mem_root, ...);
|
||||
extern void init_alloc_root(MEM_ROOT *mem_root, size_t block_size,
|
||||
size_t pre_alloc_size);
|
||||
extern void *alloc_root(MEM_ROOT *mem_root, size_t Size);
|
||||
extern void *multi_alloc_root(MEM_ROOT *mem_root, ...);
|
||||
extern void free_root(MEM_ROOT *root, myf MyFLAGS);
|
||||
extern void set_prealloc_root(MEM_ROOT *root, char *ptr);
|
||||
extern void reset_root_defaults(MEM_ROOT *mem_root, uint block_size,
|
||||
uint prealloc_size);
|
||||
extern void reset_root_defaults(MEM_ROOT *mem_root, size_t block_size,
|
||||
size_t prealloc_size);
|
||||
extern char *strdup_root(MEM_ROOT *root,const char *str);
|
||||
extern char *strmake_root(MEM_ROOT *root,const char *str,uint len);
|
||||
extern char *memdup_root(MEM_ROOT *root,const char *str,uint len);
|
||||
extern char *strmake_root(MEM_ROOT *root,const char *str,size_t len);
|
||||
extern void *memdup_root(MEM_ROOT *root,const void *str, size_t len);
|
||||
extern int get_defaults_options(int argc, char **argv,
|
||||
char **defaults, char **extra_defaults,
|
||||
char **group_suffix);
|
||||
extern int my_load_defaults(const char *conf_file, const char **groups,
|
||||
int *argc, char ***argv, const char ***);
|
||||
extern int load_defaults(const char *conf_file, const char **groups,
|
||||
int *argc, char ***argv);
|
||||
int *argc, char ***argv);
|
||||
extern int modify_defaults_file(const char *file_location, const char *option,
|
||||
const char *option_value,
|
||||
const char *section_name, int remove_option);
|
||||
extern int my_search_option_files(const char *conf_file, int *argc,
|
||||
char ***argv, uint *args_used,
|
||||
Process_option_func func, void *func_ctx);
|
||||
Process_option_func func, void *func_ctx,
|
||||
const char **default_directories);
|
||||
extern void free_defaults(char **argv);
|
||||
extern void my_print_default_files(const char *conf_file);
|
||||
extern void print_defaults(const char *conf_file, const char **groups);
|
||||
extern my_bool my_compress(byte *, ulong *, ulong *);
|
||||
extern my_bool my_uncompress(byte *, ulong *, ulong *);
|
||||
extern byte *my_compress_alloc(const byte *packet, ulong *len, ulong *complen);
|
||||
extern ha_checksum my_checksum(ha_checksum crc, const byte *mem, uint count);
|
||||
extern uint my_bit_log2(ulong value);
|
||||
extern uint my_count_bits(ulonglong v);
|
||||
extern uint my_count_bits_ushort(ushort v);
|
||||
extern my_bool my_compress(uchar *, size_t *, size_t *);
|
||||
extern my_bool my_uncompress(uchar *, size_t , size_t *);
|
||||
extern uchar *my_compress_alloc(const uchar *packet, size_t *len,
|
||||
size_t *complen);
|
||||
extern int packfrm(uchar *, size_t, uchar **, size_t *);
|
||||
extern int unpackfrm(uchar **, size_t *, const uchar *);
|
||||
|
||||
extern ha_checksum my_checksum(ha_checksum crc, const uchar *mem,
|
||||
size_t count);
|
||||
extern void my_sleep(ulong m_seconds);
|
||||
extern ulong crc32(ulong crc, const uchar *buf, uint len);
|
||||
extern uint my_set_max_open_files(uint files);
|
||||
void my_free_open_file_info(void);
|
||||
|
||||
ulonglong my_getsystime(void);
|
||||
my_bool my_gethwaddr(uchar *to);
|
||||
extern time_t my_time(myf flags);
|
||||
extern ulonglong my_getsystime(void);
|
||||
extern ulonglong my_micro_time();
|
||||
extern ulonglong my_micro_time_and_time(time_t *time_arg);
|
||||
time_t my_time_possible_from_micro(ulonglong microtime);
|
||||
extern my_bool my_gethwaddr(uchar *to);
|
||||
extern int my_getncpus();
|
||||
|
||||
#ifdef HAVE_SYS_MMAN_H
|
||||
#include <sys/mman.h>
|
||||
|
|
@ -850,15 +908,24 @@ my_bool my_gethwaddr(uchar *to);
|
|||
#ifndef MAP_NOSYNC
|
||||
#define MAP_NOSYNC 0
|
||||
#endif
|
||||
#ifndef MAP_NORESERVE
|
||||
#define MAP_NORESERVE 0 /* For irix and AIX */
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MMAP64
|
||||
#define my_mmap(a,b,c,d,e,f) mmap64(a,b,c,d,e,f)
|
||||
#else
|
||||
#define my_mmap(a,b,c,d,e,f) mmap(a,b,c,d,e,f)
|
||||
#endif
|
||||
#define my_munmap(a,b) munmap((a),(b))
|
||||
|
||||
#else
|
||||
/* not a complete set of mmap() flags, but only those that nesessary */
|
||||
#define PROT_READ 1
|
||||
#define PROT_WRITE 2
|
||||
#define MAP_NORESERVE 0
|
||||
#define MAP_SHARED 0x0001
|
||||
#define MAP_PRIVATE 0x0002
|
||||
#define MAP_NOSYNC 0x0800
|
||||
#define MAP_FAILED ((void *)-1)
|
||||
#define MS_SYNC 0x0000
|
||||
|
|
@ -889,24 +956,29 @@ extern CHARSET_INFO *get_charset(uint cs_number, myf flags);
|
|||
extern CHARSET_INFO *get_charset_by_name(const char *cs_name, myf flags);
|
||||
extern CHARSET_INFO *get_charset_by_csname(const char *cs_name,
|
||||
uint cs_flags, myf my_flags);
|
||||
extern CHARSET_INFO *get_compatible_charset_with_ctype(CHARSET_INFO
|
||||
*original_cs);
|
||||
|
||||
extern my_bool resolve_charset(const char *cs_name,
|
||||
CHARSET_INFO *default_cs,
|
||||
CHARSET_INFO **cs);
|
||||
extern my_bool resolve_collation(const char *cl_name,
|
||||
CHARSET_INFO *default_cl,
|
||||
CHARSET_INFO **cl);
|
||||
extern void free_charsets(void);
|
||||
extern char *get_charsets_dir(char *buf);
|
||||
extern my_bool my_charset_same(CHARSET_INFO *cs1, CHARSET_INFO *cs2);
|
||||
extern my_bool init_compiled_charsets(myf flags);
|
||||
extern void add_compiled_collation(CHARSET_INFO *cs);
|
||||
extern ulong escape_string_for_mysql(CHARSET_INFO *charset_info,
|
||||
char *to, ulong to_length,
|
||||
const char *from, ulong length);
|
||||
extern size_t escape_string_for_mysql(CHARSET_INFO *charset_info,
|
||||
char *to, size_t to_length,
|
||||
const char *from, size_t length);
|
||||
#ifdef __WIN__
|
||||
#define BACKSLASH_MBTAIL
|
||||
/* File system character set */
|
||||
extern CHARSET_INFO *fs_character_set(void);
|
||||
#endif
|
||||
extern ulong escape_quotes_for_mysql(CHARSET_INFO *charset_info,
|
||||
char *to, ulong to_length,
|
||||
const char *from, ulong length);
|
||||
extern size_t escape_quotes_for_mysql(CHARSET_INFO *charset_info,
|
||||
char *to, size_t to_length,
|
||||
const char *from, size_t length);
|
||||
|
||||
extern void thd_increment_bytes_sent(ulong length);
|
||||
extern void thd_increment_bytes_received(ulong length);
|
||||
|
|
@ -923,7 +995,7 @@ int my_security_attr_create(SECURITY_ATTRIBUTES **psa, const char **perror,
|
|||
void my_security_attr_free(SECURITY_ATTRIBUTES *sa);
|
||||
|
||||
/* implemented in my_conio.c */
|
||||
char* my_cgets(char *string, unsigned long clen, unsigned long* plen);
|
||||
char* my_cgets(char *string, size_t clen, size_t* plen);
|
||||
|
||||
#endif
|
||||
#ifdef __NETWARE__
|
||||
|
|
@ -932,5 +1004,4 @@ void netware_reg_user(const char *ip, const char *user,
|
|||
#endif
|
||||
|
||||
C_MODE_END
|
||||
#include "raid.h"
|
||||
#endif /* _my_sys_h */
|
||||
|
|
|
|||
89
dep/include/mysql/my_xml.h
Normal file
89
dep/include/mysql/my_xml.h
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
/* Copyright (C) 2000 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
|
||||
#ifndef _my_xml_h
|
||||
#define _my_xml_h
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
#define MY_XML_OK 0
|
||||
#define MY_XML_ERROR 1
|
||||
|
||||
/*
|
||||
A flag whether to use absolute tag names in call-back functions,
|
||||
like "a", "a.b" and "a.b.c" (used in character set file parser),
|
||||
or relative names like "a", "b" and "c".
|
||||
*/
|
||||
#define MY_XML_FLAG_RELATIVE_NAMES 1
|
||||
|
||||
/*
|
||||
A flag whether to skip normilization of text values before calling
|
||||
call-back functions: i.e. skip leading/trailing spaces,
|
||||
\r, \n, \t characters.
|
||||
*/
|
||||
#define MY_XML_FLAG_SKIP_TEXT_NORMALIZATION 2
|
||||
|
||||
enum my_xml_node_type
|
||||
{
|
||||
MY_XML_NODE_TAG, /* can have TAG, ATTR and TEXT children */
|
||||
MY_XML_NODE_ATTR, /* can have TEXT children */
|
||||
MY_XML_NODE_TEXT /* cannot have children */
|
||||
};
|
||||
|
||||
typedef struct xml_stack_st
|
||||
{
|
||||
int flags;
|
||||
enum my_xml_node_type current_node_type;
|
||||
char errstr[128];
|
||||
char attr[128];
|
||||
char *attrend;
|
||||
const char *beg;
|
||||
const char *cur;
|
||||
const char *end;
|
||||
void *user_data;
|
||||
int (*enter)(struct xml_stack_st *st,const char *val, size_t len);
|
||||
int (*value)(struct xml_stack_st *st,const char *val, size_t len);
|
||||
int (*leave_xml)(struct xml_stack_st *st,const char *val, size_t len);
|
||||
} MY_XML_PARSER;
|
||||
|
||||
void my_xml_parser_create(MY_XML_PARSER *st);
|
||||
void my_xml_parser_free(MY_XML_PARSER *st);
|
||||
int my_xml_parse(MY_XML_PARSER *st,const char *str, size_t len);
|
||||
|
||||
void my_xml_set_value_handler(MY_XML_PARSER *st, int (*)(MY_XML_PARSER *,
|
||||
const char *,
|
||||
size_t len));
|
||||
void my_xml_set_enter_handler(MY_XML_PARSER *st, int (*)(MY_XML_PARSER *,
|
||||
const char *,
|
||||
size_t len));
|
||||
void my_xml_set_leave_handler(MY_XML_PARSER *st, int (*)(MY_XML_PARSER *,
|
||||
const char *,
|
||||
size_t len));
|
||||
void my_xml_set_user_data(MY_XML_PARSER *st, void *);
|
||||
|
||||
size_t my_xml_error_pos(MY_XML_PARSER *st);
|
||||
uint my_xml_error_lineno(MY_XML_PARSER *st);
|
||||
|
||||
const char *my_xml_error_string(MY_XML_PARSER *st);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _my_xml_h */
|
||||
|
|
@ -46,7 +46,7 @@ extern "C" {
|
|||
#ifndef _global_h /* If not standard header */
|
||||
#include <sys/types.h>
|
||||
#ifdef __LCC__
|
||||
#include <winsock.h> /* For windows */
|
||||
#include <winsock2.h> /* For windows */
|
||||
#endif
|
||||
typedef char my_bool;
|
||||
#if (defined(_WIN32) || defined(_WIN64)) && !defined(__WIN__)
|
||||
|
|
@ -57,7 +57,6 @@ typedef char my_bool;
|
|||
#else
|
||||
#define STDCALL __stdcall
|
||||
#endif
|
||||
typedef char * gptr;
|
||||
|
||||
#ifndef my_socket_defined
|
||||
#ifdef __WIN__
|
||||
|
|
@ -71,7 +70,6 @@ typedef int my_socket;
|
|||
#include "mysql_version.h"
|
||||
#include "mysql_com.h"
|
||||
#include "mysql_time.h"
|
||||
#include "typelib.h"
|
||||
|
||||
#include "my_list.h" /* for LISTs used in 'MYSQL' and 'MYSQL_STMT' */
|
||||
|
||||
|
|
@ -94,9 +92,9 @@ extern char *mysql_unix_port;
|
|||
#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(t) ((t) <= MYSQL_TYPE_INT24 || (t) == MYSQL_TYPE_YEAR || (t) == MYSQL_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 INTERNAL_NUM_FIELD(f) (((f)->type <= MYSQL_TYPE_INT24 && ((f)->type != MYSQL_TYPE_TIMESTAMP || (f)->length == 14 || (f)->length == 8)) || (f)->type == MYSQL_TYPE_YEAR)
|
||||
#define IS_LONGDATA(t) ((t) >= MYSQL_TYPE_TINY_BLOB && (t) <= MYSQL_TYPE_STRING)
|
||||
|
||||
|
||||
|
|
@ -121,6 +119,7 @@ typedef struct st_mysql_field {
|
|||
unsigned int decimals; /* Number of decimals in field */
|
||||
unsigned int charsetnr; /* Character set */
|
||||
enum enum_field_types type; /* Type of field. See mysql_com.h for types */
|
||||
void *extension;
|
||||
} MYSQL_FIELD;
|
||||
|
||||
typedef char **MYSQL_ROW; /* return data as array of strings */
|
||||
|
|
@ -136,6 +135,8 @@ typedef unsigned long long my_ulonglong;
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#include "typelib.h"
|
||||
|
||||
#define MYSQL_COUNT_ERROR (~(my_ulonglong) 0)
|
||||
|
||||
/* backward compatibility define - to be removed eventually */
|
||||
|
|
@ -153,12 +154,13 @@ typedef MYSQL_ROWS *MYSQL_ROW_OFFSET; /* offset to current row */
|
|||
|
||||
typedef struct embedded_query_result EMBEDDED_QUERY_RESULT;
|
||||
typedef struct st_mysql_data {
|
||||
MYSQL_ROWS *data;
|
||||
struct embedded_query_result *embedded_info;
|
||||
MEM_ROOT alloc;
|
||||
my_ulonglong rows;
|
||||
unsigned int fields;
|
||||
MYSQL_ROWS *data;
|
||||
MEM_ROOT alloc;
|
||||
/* extra info for embedded library */
|
||||
struct embedded_query_result *embedded_info;
|
||||
void *extension;
|
||||
} MYSQL_DATA;
|
||||
|
||||
enum mysql_option
|
||||
|
|
@ -221,6 +223,7 @@ struct st_mysql_options {
|
|||
void (*local_infile_end)(void *);
|
||||
int (*local_infile_error)(void *, char *, unsigned int);
|
||||
void *local_infile_userdata;
|
||||
void *extension;
|
||||
};
|
||||
|
||||
enum mysql_status
|
||||
|
|
@ -261,9 +264,9 @@ 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;
|
||||
char *db;
|
||||
unsigned char *connector_fd; /* ConnectorFd for SSL */
|
||||
char *host,*user,*passwd,*unix_socket,*server_version,*host_info;
|
||||
char *info, *db;
|
||||
struct charset_info_st *charset;
|
||||
MYSQL_FIELD *fields;
|
||||
MEM_ROOT field_alloc;
|
||||
|
|
@ -310,27 +313,28 @@ typedef struct st_mysql
|
|||
from mysql_stmt_close if close had to cancel result set of this object.
|
||||
*/
|
||||
my_bool *unbuffered_fetch_owner;
|
||||
#if defined(EMBEDDED_LIBRARY) || defined(EMBEDDED_LIBRARY_COMPATIBLE) || MYSQL_VERSION_ID >= 50100
|
||||
/* needed for embedded server - no net buffer to store the 'info' */
|
||||
char *info_buffer;
|
||||
#endif
|
||||
void *extension;
|
||||
} MYSQL;
|
||||
|
||||
|
||||
typedef struct st_mysql_res {
|
||||
my_ulonglong row_count;
|
||||
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;
|
||||
const struct st_mysql_methods *methods;
|
||||
MYSQL_ROW row; /* If unbuffered read */
|
||||
MYSQL_ROW current_row; /* buffer to current row */
|
||||
MEM_ROOT field_alloc;
|
||||
unsigned int field_count, current_field;
|
||||
my_bool eof; /* Used by mysql_fetch_row */
|
||||
/* mysql_stmt_close() had to cancel this result */
|
||||
my_bool unbuffered_fetch_cancelled;
|
||||
const struct st_mysql_methods *methods;
|
||||
void *extension;
|
||||
} MYSQL_RES;
|
||||
|
||||
#define MAX_MYSQL_MANAGER_ERR 256
|
||||
|
|
@ -350,21 +354,23 @@ typedef struct st_mysql_res {
|
|||
typedef struct st_mysql_manager
|
||||
{
|
||||
NET net;
|
||||
char *host,*user,*passwd;
|
||||
char *host, *user, *passwd;
|
||||
char *net_buf, *net_buf_pos, *net_data_end;
|
||||
unsigned int port;
|
||||
my_bool free_me;
|
||||
my_bool eof;
|
||||
int cmd_status;
|
||||
int last_errno;
|
||||
char* net_buf,*net_buf_pos,*net_data_end;
|
||||
int net_buf_size;
|
||||
my_bool free_me;
|
||||
my_bool eof;
|
||||
char last_error[MAX_MYSQL_MANAGER_ERR];
|
||||
void *extension;
|
||||
} MYSQL_MANAGER;
|
||||
|
||||
typedef struct st_mysql_parameters
|
||||
{
|
||||
unsigned long *p_max_allowed_packet;
|
||||
unsigned long *p_net_buffer_length;
|
||||
void *extension;
|
||||
} MYSQL_PARAMETERS;
|
||||
|
||||
#if !defined(MYSQL_SERVER) && !defined(EMBEDDED_LIBRARY)
|
||||
|
|
@ -379,6 +385,7 @@ typedef struct st_mysql_parameters
|
|||
*/
|
||||
int STDCALL mysql_server_init(int argc, char **argv, char **groups);
|
||||
void STDCALL mysql_server_end(void);
|
||||
|
||||
/*
|
||||
mysql_server_init/end need to be called when using libmysqld or
|
||||
libmysqlclient (exactly, mysql_server_init() is called by mysql_init() so
|
||||
|
|
@ -535,7 +542,7 @@ 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);
|
||||
const void *arg);
|
||||
void STDCALL mysql_free_result(MYSQL_RES *result);
|
||||
void STDCALL mysql_data_seek(MYSQL_RES *result,
|
||||
my_ulonglong offset);
|
||||
|
|
@ -657,23 +664,24 @@ typedef struct st_mysql_bind
|
|||
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 */
|
||||
/* 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 */
|
||||
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 */
|
||||
void (*store_param_func)(NET *net, struct st_mysql_bind *param);
|
||||
void (*fetch_result)(struct st_mysql_bind *, MYSQL_FIELD *,
|
||||
unsigned char **row);
|
||||
void (*skip_result)(struct st_mysql_bind *, MYSQL_FIELD *,
|
||||
unsigned char **row);
|
||||
/* output buffer length, must be set when fetching str/binary */
|
||||
unsigned long buffer_length;
|
||||
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 */
|
||||
enum enum_field_types buffer_type; /* buffer type */
|
||||
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 */
|
||||
void *extension;
|
||||
} MYSQL_BIND;
|
||||
|
||||
|
||||
|
|
@ -688,15 +696,15 @@ typedef struct st_mysql_stmt
|
|||
MYSQL_FIELD *fields; /* result set metadata */
|
||||
MYSQL_DATA result; /* cached result set */
|
||||
MYSQL_ROWS *data_cursor; /* current row in cached result */
|
||||
/* copy of mysql->affected_rows after statement execution */
|
||||
my_ulonglong affected_rows;
|
||||
my_ulonglong insert_id; /* copy of mysql->insert_id */
|
||||
/*
|
||||
mysql_stmt_fetch() calls this function to fetch one row (it's different
|
||||
for buffered, unbuffered and cursor fetch).
|
||||
*/
|
||||
int (*read_row_func)(struct st_mysql_stmt *stmt,
|
||||
unsigned char **row);
|
||||
/* copy of mysql->affected_rows after statement execution */
|
||||
my_ulonglong affected_rows;
|
||||
my_ulonglong insert_id; /* copy of mysql->insert_id */
|
||||
unsigned long stmt_id; /* Id for prepared statement */
|
||||
unsigned long flags; /* i.e. type of cursor to open */
|
||||
unsigned long prefetch_rows; /* number of rows per one COM_FETCH */
|
||||
|
|
@ -722,6 +730,7 @@ typedef struct st_mysql_stmt
|
|||
metadata fields when doing mysql_stmt_store_result.
|
||||
*/
|
||||
my_bool update_max_length;
|
||||
void *extension;
|
||||
} MYSQL_STMT;
|
||||
|
||||
enum enum_stmt_attr_type
|
||||
|
|
@ -752,9 +761,9 @@ 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,
|
||||
const unsigned char *header,
|
||||
unsigned long header_length,
|
||||
const char *arg,
|
||||
const unsigned char *arg,
|
||||
unsigned long arg_length,
|
||||
my_bool skip_check,
|
||||
MYSQL_STMT *stmt);
|
||||
|
|
@ -847,10 +856,10 @@ int STDCALL mysql_drop_db(MYSQL *mysql, const char *DB);
|
|||
*/
|
||||
|
||||
#define simple_command(mysql, command, arg, length, skip_check) \
|
||||
(*(mysql)->methods->advanced_command)(mysql, command, NullS, \
|
||||
(*(mysql)->methods->advanced_command)(mysql, command, 0, \
|
||||
0, arg, length, skip_check, NULL)
|
||||
#define stmt_command(mysql, command, arg, length, stmt) \
|
||||
(*(mysql)->methods->advanced_command)(mysql, command, NullS, \
|
||||
(*(mysql)->methods->advanced_command)(mysql, command, 0, \
|
||||
0, arg, length, 1, stmt)
|
||||
|
||||
#ifdef __NETWARE__
|
||||
|
|
|
|||
|
|
@ -20,9 +20,13 @@
|
|||
#ifndef _mysql_com_h
|
||||
#define _mysql_com_h
|
||||
|
||||
#define NAME_LEN 64 /* Field/table name length */
|
||||
#define HOSTNAME_LENGTH 60
|
||||
#define USERNAME_LENGTH 16
|
||||
#define SYSTEM_CHARSET_MBMAXLEN 3
|
||||
#define NAME_CHAR_LEN 64 /* Field/table name length */
|
||||
#define USERNAME_CHAR_LENGTH 16
|
||||
#define NAME_LEN (NAME_CHAR_LEN*SYSTEM_CHARSET_MBMAXLEN)
|
||||
#define USERNAME_LENGTH (USERNAME_CHAR_LENGTH*SYSTEM_CHARSET_MBMAXLEN)
|
||||
|
||||
#define SERVER_VERSION_LENGTH 60
|
||||
#define SQLSTATE_LENGTH 5
|
||||
|
||||
|
|
@ -56,7 +60,7 @@ enum enum_server_command
|
|||
COM_TIME, COM_DELAYED_INSERT, COM_CHANGE_USER, COM_BINLOG_DUMP,
|
||||
COM_TABLE_DUMP, COM_CONNECT_OUT, COM_REGISTER_SLAVE,
|
||||
COM_STMT_PREPARE, COM_STMT_EXECUTE, COM_STMT_SEND_LONG_DATA, COM_STMT_CLOSE,
|
||||
COM_STMT_RESET, COM_SET_OPTION, COM_STMT_FETCH,
|
||||
COM_STMT_RESET, COM_SET_OPTION, COM_STMT_FETCH, COM_DAEMON,
|
||||
/* don't forget to update const char *command_name[] in sql_parse.cc */
|
||||
|
||||
/* Must be last */
|
||||
|
|
@ -90,11 +94,16 @@ enum enum_server_command
|
|||
#define TIMESTAMP_FLAG 1024 /* Field is a timestamp */
|
||||
#define SET_FLAG 2048 /* field is a set */
|
||||
#define NO_DEFAULT_VALUE_FLAG 4096 /* Field doesn't have default value */
|
||||
#define ON_UPDATE_NOW_FLAG 8192 /* Field is set to NOW on UPDATE */
|
||||
#define NUM_FLAG 32768 /* Field is num (for clients) */
|
||||
#define PART_KEY_FLAG 16384 /* Intern; Part of some key */
|
||||
#define GROUP_FLAG 32768 /* Intern: Group field */
|
||||
#define UNIQUE_FLAG 65536 /* Intern: Used by sql_yacc */
|
||||
#define BINCMP_FLAG 131072 /* Intern: Used by sql_yacc */
|
||||
#define GET_FIXED_FIELDS_FLAG (1 << 18) /* Used to get fields in item tree */
|
||||
#define FIELD_IN_PART_FUNC_FLAG (1 << 19)/* Field part of partition func */
|
||||
#define FIELD_IN_ADD_INDEX (1<< 20) /* Intern: Field used in ADD INDEX */
|
||||
#define FIELD_IS_RENAMED (1<< 21) /* Intern: Field is being renamed */
|
||||
|
||||
#define REFRESH_GRANT 1 /* Refresh grant tables */
|
||||
#define REFRESH_LOG 2 /* Start on new log file */
|
||||
|
|
@ -139,24 +148,74 @@ enum enum_server_command
|
|||
#define CLIENT_SSL_VERIFY_SERVER_CERT (1UL << 30)
|
||||
#define CLIENT_REMEMBER_OPTIONS (1UL << 31)
|
||||
|
||||
/* Gather all possible capabilites (flags) supported by the server */
|
||||
#define CLIENT_ALL_FLAGS (CLIENT_LONG_PASSWORD | \
|
||||
CLIENT_FOUND_ROWS | \
|
||||
CLIENT_LONG_FLAG | \
|
||||
CLIENT_CONNECT_WITH_DB | \
|
||||
CLIENT_NO_SCHEMA | \
|
||||
CLIENT_COMPRESS | \
|
||||
CLIENT_ODBC | \
|
||||
CLIENT_LOCAL_FILES | \
|
||||
CLIENT_IGNORE_SPACE | \
|
||||
CLIENT_PROTOCOL_41 | \
|
||||
CLIENT_INTERACTIVE | \
|
||||
CLIENT_SSL | \
|
||||
CLIENT_IGNORE_SIGPIPE | \
|
||||
CLIENT_TRANSACTIONS | \
|
||||
CLIENT_RESERVED | \
|
||||
CLIENT_SECURE_CONNECTION | \
|
||||
CLIENT_MULTI_STATEMENTS | \
|
||||
CLIENT_MULTI_RESULTS | \
|
||||
CLIENT_SSL_VERIFY_SERVER_CERT | \
|
||||
CLIENT_REMEMBER_OPTIONS)
|
||||
|
||||
/*
|
||||
Switch off the flags that are optional and depending on build flags
|
||||
If any of the optional flags is supported by the build it will be switched
|
||||
on before sending to the client during the connection handshake.
|
||||
*/
|
||||
#define CLIENT_BASIC_FLAGS (((CLIENT_ALL_FLAGS & ~CLIENT_SSL) \
|
||||
& ~CLIENT_COMPRESS) \
|
||||
& ~CLIENT_SSL_VERIFY_SERVER_CERT)
|
||||
|
||||
#define SERVER_STATUS_IN_TRANS 1 /* Transaction has started */
|
||||
#define SERVER_STATUS_AUTOCOMMIT 2 /* Server in auto_commit mode */
|
||||
#define SERVER_MORE_RESULTS_EXISTS 8 /* Multi query - next query exists */
|
||||
#define SERVER_QUERY_NO_GOOD_INDEX_USED 16
|
||||
#define SERVER_QUERY_NO_INDEX_USED 32
|
||||
/*
|
||||
/**
|
||||
The server was able to fulfill the clients request and opened a
|
||||
read-only non-scrollable cursor for a query. This flag comes
|
||||
in reply to COM_STMT_EXECUTE and COM_STMT_FETCH commands.
|
||||
*/
|
||||
#define SERVER_STATUS_CURSOR_EXISTS 64
|
||||
/*
|
||||
/**
|
||||
This flag is sent when a read-only cursor is exhausted, in reply to
|
||||
COM_STMT_FETCH command.
|
||||
*/
|
||||
#define SERVER_STATUS_LAST_ROW_SENT 128
|
||||
#define SERVER_STATUS_DB_DROPPED 256 /* A database was dropped */
|
||||
#define SERVER_STATUS_NO_BACKSLASH_ESCAPES 512
|
||||
/**
|
||||
Sent to the client if after a prepared statement reprepare
|
||||
we discovered that the new statement returns a different
|
||||
number of result set columns.
|
||||
*/
|
||||
#define SERVER_STATUS_METADATA_CHANGED 1024
|
||||
|
||||
/**
|
||||
Server status flags that must be cleared when starting
|
||||
execution of a new SQL statement.
|
||||
Flags from this set are only added to the
|
||||
current server status by the execution engine, but
|
||||
never removed -- the execution engine expects them
|
||||
to disappear automagically by the next command.
|
||||
*/
|
||||
#define SERVER_STATUS_CLEAR_SET (SERVER_QUERY_NO_GOOD_INDEX_USED| \
|
||||
SERVER_QUERY_NO_INDEX_USED|\
|
||||
SERVER_MORE_RESULTS_EXISTS|\
|
||||
SERVER_STATUS_METADATA_CHANGED)
|
||||
|
||||
#define MYSQL_ERRMSG_SIZE 512
|
||||
#define NET_READ_TIMEOUT 30 /* Timeout on read */
|
||||
|
|
@ -165,6 +224,7 @@ enum enum_server_command
|
|||
|
||||
#define ONLY_KILL_QUERY 1
|
||||
|
||||
|
||||
struct st_vio; /* Only C */
|
||||
typedef struct st_vio Vio;
|
||||
|
||||
|
|
@ -174,53 +234,62 @@ typedef struct st_vio Vio;
|
|||
#define MAX_INT_WIDTH 10 /* Max width for a LONG w.o. sign */
|
||||
#define MAX_BIGINT_WIDTH 20 /* Max width for a LONGLONG */
|
||||
#define MAX_CHAR_WIDTH 255 /* Max length for a CHAR colum */
|
||||
#define MAX_BLOB_WIDTH 8192 /* Default width for blob */
|
||||
#define MAX_BLOB_WIDTH 16777216 /* Default width for blob */
|
||||
|
||||
typedef struct st_net {
|
||||
#if !defined(CHECK_EMBEDDED_DIFFERENCES) || !defined(EMBEDDED_LIBRARY)
|
||||
Vio* vio;
|
||||
Vio *vio;
|
||||
unsigned char *buff,*buff_end,*write_pos,*read_pos;
|
||||
my_socket fd; /* For Perl DBI/dbd */
|
||||
unsigned long max_packet,max_packet_size;
|
||||
unsigned int pkt_nr,compress_pkt_nr;
|
||||
unsigned int write_timeout, read_timeout, retry_count;
|
||||
int fcntl;
|
||||
my_bool compress;
|
||||
/*
|
||||
The following variable is set if we are doing several queries in one
|
||||
command ( as in LOAD TABLE ... FROM MASTER ),
|
||||
and do not want to confuse the client with OK at the wrong time
|
||||
*/
|
||||
unsigned long remain_in_buf,length, buf_length, where_b;
|
||||
unsigned long max_packet,max_packet_size;
|
||||
unsigned int pkt_nr,compress_pkt_nr;
|
||||
unsigned int write_timeout, read_timeout, retry_count;
|
||||
int fcntl;
|
||||
unsigned int *return_status;
|
||||
unsigned char reading_or_writing;
|
||||
char save_char;
|
||||
my_bool no_send_ok; /* For SPs and other things that do multiple stmts */
|
||||
my_bool no_send_eof; /* For SPs' first version read-only cursors */
|
||||
/*
|
||||
Set if OK packet is already sent, and we do not need to send error
|
||||
messages
|
||||
*/
|
||||
my_bool no_send_error;
|
||||
my_bool unused0; /* Please remove with the next incompatible ABI change. */
|
||||
my_bool unused; /* Please remove with the next incompatible ABI change */
|
||||
my_bool compress;
|
||||
my_bool unused1; /* Please remove with the next incompatible ABI change. */
|
||||
/*
|
||||
Pointer to query object in query cache, do not equal NULL (0) for
|
||||
queries in cache that have not stored its results yet
|
||||
*/
|
||||
#endif
|
||||
char last_error[MYSQL_ERRMSG_SIZE], sqlstate[SQLSTATE_LENGTH+1];
|
||||
unsigned int last_errno;
|
||||
unsigned char error;
|
||||
|
||||
/*
|
||||
'query_cache_query' should be accessed only via query cache
|
||||
functions and methods to maintain proper locking.
|
||||
*/
|
||||
gptr query_cache_query;
|
||||
|
||||
my_bool report_error; /* We should report error (we have unreported error) */
|
||||
unsigned char *query_cache_query;
|
||||
unsigned int last_errno;
|
||||
unsigned char error;
|
||||
my_bool unused2; /* Please remove with the next incompatible ABI change. */
|
||||
my_bool return_errno;
|
||||
/** Client library error message buffer. Actually belongs to struct MYSQL. */
|
||||
char last_error[MYSQL_ERRMSG_SIZE];
|
||||
/** Client library sqlstate buffer. Set along with the error message. */
|
||||
char sqlstate[SQLSTATE_LENGTH+1];
|
||||
void *extension;
|
||||
#if defined(MYSQL_SERVER) && !defined(EMBEDDED_LIBRARY)
|
||||
/*
|
||||
Controls whether a big packet should be skipped.
|
||||
|
||||
Initially set to FALSE by default. Unauthenticated sessions must have
|
||||
this set to FALSE so that the server can't be tricked to read packets
|
||||
indefinitely.
|
||||
*/
|
||||
my_bool skip_big_packet;
|
||||
#endif
|
||||
} NET;
|
||||
|
||||
|
||||
#define packet_error (~(unsigned long) 0)
|
||||
|
||||
enum enum_field_types { MYSQL_TYPE_DECIMAL, MYSQL_TYPE_TINY,
|
||||
|
|
@ -335,14 +404,14 @@ extern "C" {
|
|||
my_bool my_net_init(NET *net, Vio* vio);
|
||||
void my_net_local_init(NET *net);
|
||||
void net_end(NET *net);
|
||||
void net_clear(NET *net);
|
||||
my_bool net_realloc(NET *net, unsigned long length);
|
||||
void net_clear(NET *net, my_bool clear_buffer);
|
||||
my_bool net_realloc(NET *net, size_t length);
|
||||
my_bool net_flush(NET *net);
|
||||
my_bool my_net_write(NET *net,const char *packet,unsigned long len);
|
||||
my_bool my_net_write(NET *net,const unsigned char *packet, size_t len);
|
||||
my_bool net_write_command(NET *net,unsigned char command,
|
||||
const char *header, unsigned long head_len,
|
||||
const char *packet, unsigned long len);
|
||||
int net_real_write(NET *net,const char *packet,unsigned long len);
|
||||
const unsigned char *header, size_t head_len,
|
||||
const unsigned char *packet, size_t len);
|
||||
int net_real_write(NET *net,const unsigned char *packet, size_t len);
|
||||
unsigned long my_net_read(NET *net);
|
||||
|
||||
#ifdef _global_h
|
||||
|
|
@ -381,6 +450,7 @@ typedef struct st_udf_args
|
|||
char *maybe_null; /* Set to 1 for all maybe_null args */
|
||||
char **attributes; /* Pointer to attribute name */
|
||||
unsigned long *attribute_lengths; /* Length of attribute arguments */
|
||||
void *extension;
|
||||
} UDF_ARGS;
|
||||
|
||||
/* This holds information about the result */
|
||||
|
|
@ -392,6 +462,7 @@ typedef struct st_udf_init
|
|||
unsigned long max_length; /* For string functions */
|
||||
char *ptr; /* free pointer for function data */
|
||||
my_bool const_item; /* 1 if function always returns the same value */
|
||||
void *extension;
|
||||
} UDF_INIT;
|
||||
/*
|
||||
TODO: add a notion for determinism of the UDF.
|
||||
|
|
@ -436,24 +507,18 @@ char *octet2hex(char *to, const char *str, unsigned int len);
|
|||
|
||||
/* end of password.c */
|
||||
|
||||
char *get_tty_password(char *opt_message);
|
||||
char *get_tty_password(const char *opt_message);
|
||||
const char *mysql_errno_to_sqlstate(unsigned int mysql_errno);
|
||||
|
||||
/* Some other useful functions */
|
||||
|
||||
my_bool my_init(void);
|
||||
extern int modify_defaults_file(const char *file_location, const char *option,
|
||||
const char *option_value,
|
||||
const char *section_name, int remove_option);
|
||||
int load_defaults(const char *conf_file, const char **groups,
|
||||
int *argc, char ***argv);
|
||||
my_bool my_thread_init(void);
|
||||
void my_thread_end(void);
|
||||
|
||||
#ifdef _global_h
|
||||
ulong STDCALL net_field_length(uchar **packet);
|
||||
my_ulonglong net_field_length_ll(uchar **packet);
|
||||
char *net_store_length(char *pkg, ulonglong length);
|
||||
uchar *net_store_length(uchar *pkg, ulonglong length);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@
|
|||
/* TODO HF add #undef HAVE_VIO if we don't want client in embedded library */
|
||||
|
||||
#undef HAVE_PSTACK /* No stacktrace */
|
||||
#undef HAVE_DLOPEN /* No udf functions */
|
||||
#undef HAVE_OPENSSL
|
||||
#undef HAVE_SMEM /* No shared memory */
|
||||
#undef HAVE_NDBCLUSTER_DB /* No NDB cluster */
|
||||
|
|
|
|||
|
|
@ -9,11 +9,11 @@
|
|||
#include <custom_conf.h>
|
||||
#else
|
||||
#define PROTOCOL_VERSION 10
|
||||
#define MYSQL_SERVER_VERSION "5.0.56"
|
||||
#define MYSQL_BASE_VERSION "mysqld-5.0"
|
||||
#define MYSQL_SERVER_VERSION "5.1.49"
|
||||
#define MYSQL_BASE_VERSION "mysqld-5.1"
|
||||
#define MYSQL_SERVER_SUFFIX_DEF "-nt"
|
||||
#define FRM_VER 6
|
||||
#define MYSQL_VERSION_ID 50056
|
||||
#define MYSQL_VERSION_ID 50149
|
||||
#define MYSQL_PORT 3306
|
||||
#define MYSQL_PORT_DEFAULT 0
|
||||
#define MYSQL_UNIX_ADDR "/tmp/mysql.sock"
|
||||
|
|
|
|||
643
dep/include/mysql/mysqld_ername.h
Normal file
643
dep/include/mysql/mysqld_ername.h
Normal file
|
|
@ -0,0 +1,643 @@
|
|||
/* Autogenerated file, please don't edit */
|
||||
|
||||
{ "ER_HASHCHK", 1000 },
|
||||
{ "ER_NISAMCHK", 1001 },
|
||||
{ "ER_NO", 1002 },
|
||||
{ "ER_YES", 1003 },
|
||||
{ "ER_CANT_CREATE_FILE", 1004 },
|
||||
{ "ER_CANT_CREATE_TABLE", 1005 },
|
||||
{ "ER_CANT_CREATE_DB", 1006 },
|
||||
{ "ER_DB_CREATE_EXISTS", 1007 },
|
||||
{ "ER_DB_DROP_EXISTS", 1008 },
|
||||
{ "ER_DB_DROP_DELETE", 1009 },
|
||||
{ "ER_DB_DROP_RMDIR", 1010 },
|
||||
{ "ER_CANT_DELETE_FILE", 1011 },
|
||||
{ "ER_CANT_FIND_SYSTEM_REC", 1012 },
|
||||
{ "ER_CANT_GET_STAT", 1013 },
|
||||
{ "ER_CANT_GET_WD", 1014 },
|
||||
{ "ER_CANT_LOCK", 1015 },
|
||||
{ "ER_CANT_OPEN_FILE", 1016 },
|
||||
{ "ER_FILE_NOT_FOUND", 1017 },
|
||||
{ "ER_CANT_READ_DIR", 1018 },
|
||||
{ "ER_CANT_SET_WD", 1019 },
|
||||
{ "ER_CHECKREAD", 1020 },
|
||||
{ "ER_DISK_FULL", 1021 },
|
||||
{ "ER_DUP_KEY", 1022 },
|
||||
{ "ER_ERROR_ON_CLOSE", 1023 },
|
||||
{ "ER_ERROR_ON_READ", 1024 },
|
||||
{ "ER_ERROR_ON_RENAME", 1025 },
|
||||
{ "ER_ERROR_ON_WRITE", 1026 },
|
||||
{ "ER_FILE_USED", 1027 },
|
||||
{ "ER_FILSORT_ABORT", 1028 },
|
||||
{ "ER_FORM_NOT_FOUND", 1029 },
|
||||
{ "ER_GET_ERRNO", 1030 },
|
||||
{ "ER_ILLEGAL_HA", 1031 },
|
||||
{ "ER_KEY_NOT_FOUND", 1032 },
|
||||
{ "ER_NOT_FORM_FILE", 1033 },
|
||||
{ "ER_NOT_KEYFILE", 1034 },
|
||||
{ "ER_OLD_KEYFILE", 1035 },
|
||||
{ "ER_OPEN_AS_READONLY", 1036 },
|
||||
{ "ER_OUTOFMEMORY", 1037 },
|
||||
{ "ER_OUT_OF_SORTMEMORY", 1038 },
|
||||
{ "ER_UNEXPECTED_EOF", 1039 },
|
||||
{ "ER_CON_COUNT_ERROR", 1040 },
|
||||
{ "ER_OUT_OF_RESOURCES", 1041 },
|
||||
{ "ER_BAD_HOST_ERROR", 1042 },
|
||||
{ "ER_HANDSHAKE_ERROR", 1043 },
|
||||
{ "ER_DBACCESS_DENIED_ERROR", 1044 },
|
||||
{ "ER_ACCESS_DENIED_ERROR", 1045 },
|
||||
{ "ER_NO_DB_ERROR", 1046 },
|
||||
{ "ER_UNKNOWN_COM_ERROR", 1047 },
|
||||
{ "ER_BAD_NULL_ERROR", 1048 },
|
||||
{ "ER_BAD_DB_ERROR", 1049 },
|
||||
{ "ER_TABLE_EXISTS_ERROR", 1050 },
|
||||
{ "ER_BAD_TABLE_ERROR", 1051 },
|
||||
{ "ER_NON_UNIQ_ERROR", 1052 },
|
||||
{ "ER_SERVER_SHUTDOWN", 1053 },
|
||||
{ "ER_BAD_FIELD_ERROR", 1054 },
|
||||
{ "ER_WRONG_FIELD_WITH_GROUP", 1055 },
|
||||
{ "ER_WRONG_GROUP_FIELD", 1056 },
|
||||
{ "ER_WRONG_SUM_SELECT", 1057 },
|
||||
{ "ER_WRONG_VALUE_COUNT", 1058 },
|
||||
{ "ER_TOO_LONG_IDENT", 1059 },
|
||||
{ "ER_DUP_FIELDNAME", 1060 },
|
||||
{ "ER_DUP_KEYNAME", 1061 },
|
||||
{ "ER_DUP_ENTRY", 1062 },
|
||||
{ "ER_WRONG_FIELD_SPEC", 1063 },
|
||||
{ "ER_PARSE_ERROR", 1064 },
|
||||
{ "ER_EMPTY_QUERY", 1065 },
|
||||
{ "ER_NONUNIQ_TABLE", 1066 },
|
||||
{ "ER_INVALID_DEFAULT", 1067 },
|
||||
{ "ER_MULTIPLE_PRI_KEY", 1068 },
|
||||
{ "ER_TOO_MANY_KEYS", 1069 },
|
||||
{ "ER_TOO_MANY_KEY_PARTS", 1070 },
|
||||
{ "ER_TOO_LONG_KEY", 1071 },
|
||||
{ "ER_KEY_COLUMN_DOES_NOT_EXITS", 1072 },
|
||||
{ "ER_BLOB_USED_AS_KEY", 1073 },
|
||||
{ "ER_TOO_BIG_FIELDLENGTH", 1074 },
|
||||
{ "ER_WRONG_AUTO_KEY", 1075 },
|
||||
{ "ER_READY", 1076 },
|
||||
{ "ER_NORMAL_SHUTDOWN", 1077 },
|
||||
{ "ER_GOT_SIGNAL", 1078 },
|
||||
{ "ER_SHUTDOWN_COMPLETE", 1079 },
|
||||
{ "ER_FORCING_CLOSE", 1080 },
|
||||
{ "ER_IPSOCK_ERROR", 1081 },
|
||||
{ "ER_NO_SUCH_INDEX", 1082 },
|
||||
{ "ER_WRONG_FIELD_TERMINATORS", 1083 },
|
||||
{ "ER_BLOBS_AND_NO_TERMINATED", 1084 },
|
||||
{ "ER_TEXTFILE_NOT_READABLE", 1085 },
|
||||
{ "ER_FILE_EXISTS_ERROR", 1086 },
|
||||
{ "ER_LOAD_INFO", 1087 },
|
||||
{ "ER_ALTER_INFO", 1088 },
|
||||
{ "ER_WRONG_SUB_KEY", 1089 },
|
||||
{ "ER_CANT_REMOVE_ALL_FIELDS", 1090 },
|
||||
{ "ER_CANT_DROP_FIELD_OR_KEY", 1091 },
|
||||
{ "ER_INSERT_INFO", 1092 },
|
||||
{ "ER_UPDATE_TABLE_USED", 1093 },
|
||||
{ "ER_NO_SUCH_THREAD", 1094 },
|
||||
{ "ER_KILL_DENIED_ERROR", 1095 },
|
||||
{ "ER_NO_TABLES_USED", 1096 },
|
||||
{ "ER_TOO_BIG_SET", 1097 },
|
||||
{ "ER_NO_UNIQUE_LOGFILE", 1098 },
|
||||
{ "ER_TABLE_NOT_LOCKED_FOR_WRITE", 1099 },
|
||||
{ "ER_TABLE_NOT_LOCKED", 1100 },
|
||||
{ "ER_BLOB_CANT_HAVE_DEFAULT", 1101 },
|
||||
{ "ER_WRONG_DB_NAME", 1102 },
|
||||
{ "ER_WRONG_TABLE_NAME", 1103 },
|
||||
{ "ER_TOO_BIG_SELECT", 1104 },
|
||||
{ "ER_UNKNOWN_ERROR", 1105 },
|
||||
{ "ER_UNKNOWN_PROCEDURE", 1106 },
|
||||
{ "ER_WRONG_PARAMCOUNT_TO_PROCEDURE", 1107 },
|
||||
{ "ER_WRONG_PARAMETERS_TO_PROCEDURE", 1108 },
|
||||
{ "ER_UNKNOWN_TABLE", 1109 },
|
||||
{ "ER_FIELD_SPECIFIED_TWICE", 1110 },
|
||||
{ "ER_INVALID_GROUP_FUNC_USE", 1111 },
|
||||
{ "ER_UNSUPPORTED_EXTENSION", 1112 },
|
||||
{ "ER_TABLE_MUST_HAVE_COLUMNS", 1113 },
|
||||
{ "ER_RECORD_FILE_FULL", 1114 },
|
||||
{ "ER_UNKNOWN_CHARACTER_SET", 1115 },
|
||||
{ "ER_TOO_MANY_TABLES", 1116 },
|
||||
{ "ER_TOO_MANY_FIELDS", 1117 },
|
||||
{ "ER_TOO_BIG_ROWSIZE", 1118 },
|
||||
{ "ER_STACK_OVERRUN", 1119 },
|
||||
{ "ER_WRONG_OUTER_JOIN", 1120 },
|
||||
{ "ER_NULL_COLUMN_IN_INDEX", 1121 },
|
||||
{ "ER_CANT_FIND_UDF", 1122 },
|
||||
{ "ER_CANT_INITIALIZE_UDF", 1123 },
|
||||
{ "ER_UDF_NO_PATHS", 1124 },
|
||||
{ "ER_UDF_EXISTS", 1125 },
|
||||
{ "ER_CANT_OPEN_LIBRARY", 1126 },
|
||||
{ "ER_CANT_FIND_DL_ENTRY", 1127 },
|
||||
{ "ER_FUNCTION_NOT_DEFINED", 1128 },
|
||||
{ "ER_HOST_IS_BLOCKED", 1129 },
|
||||
{ "ER_HOST_NOT_PRIVILEGED", 1130 },
|
||||
{ "ER_PASSWORD_ANONYMOUS_USER", 1131 },
|
||||
{ "ER_PASSWORD_NOT_ALLOWED", 1132 },
|
||||
{ "ER_PASSWORD_NO_MATCH", 1133 },
|
||||
{ "ER_UPDATE_INFO", 1134 },
|
||||
{ "ER_CANT_CREATE_THREAD", 1135 },
|
||||
{ "ER_WRONG_VALUE_COUNT_ON_ROW", 1136 },
|
||||
{ "ER_CANT_REOPEN_TABLE", 1137 },
|
||||
{ "ER_INVALID_USE_OF_NULL", 1138 },
|
||||
{ "ER_REGEXP_ERROR", 1139 },
|
||||
{ "ER_MIX_OF_GROUP_FUNC_AND_FIELDS", 1140 },
|
||||
{ "ER_NONEXISTING_GRANT", 1141 },
|
||||
{ "ER_TABLEACCESS_DENIED_ERROR", 1142 },
|
||||
{ "ER_COLUMNACCESS_DENIED_ERROR", 1143 },
|
||||
{ "ER_ILLEGAL_GRANT_FOR_TABLE", 1144 },
|
||||
{ "ER_GRANT_WRONG_HOST_OR_USER", 1145 },
|
||||
{ "ER_NO_SUCH_TABLE", 1146 },
|
||||
{ "ER_NONEXISTING_TABLE_GRANT", 1147 },
|
||||
{ "ER_NOT_ALLOWED_COMMAND", 1148 },
|
||||
{ "ER_SYNTAX_ERROR", 1149 },
|
||||
{ "ER_DELAYED_CANT_CHANGE_LOCK", 1150 },
|
||||
{ "ER_TOO_MANY_DELAYED_THREADS", 1151 },
|
||||
{ "ER_ABORTING_CONNECTION", 1152 },
|
||||
{ "ER_NET_PACKET_TOO_LARGE", 1153 },
|
||||
{ "ER_NET_READ_ERROR_FROM_PIPE", 1154 },
|
||||
{ "ER_NET_FCNTL_ERROR", 1155 },
|
||||
{ "ER_NET_PACKETS_OUT_OF_ORDER", 1156 },
|
||||
{ "ER_NET_UNCOMPRESS_ERROR", 1157 },
|
||||
{ "ER_NET_READ_ERROR", 1158 },
|
||||
{ "ER_NET_READ_INTERRUPTED", 1159 },
|
||||
{ "ER_NET_ERROR_ON_WRITE", 1160 },
|
||||
{ "ER_NET_WRITE_INTERRUPTED", 1161 },
|
||||
{ "ER_TOO_LONG_STRING", 1162 },
|
||||
{ "ER_TABLE_CANT_HANDLE_BLOB", 1163 },
|
||||
{ "ER_TABLE_CANT_HANDLE_AUTO_INCREMENT", 1164 },
|
||||
{ "ER_DELAYED_INSERT_TABLE_LOCKED", 1165 },
|
||||
{ "ER_WRONG_COLUMN_NAME", 1166 },
|
||||
{ "ER_WRONG_KEY_COLUMN", 1167 },
|
||||
{ "ER_WRONG_MRG_TABLE", 1168 },
|
||||
{ "ER_DUP_UNIQUE", 1169 },
|
||||
{ "ER_BLOB_KEY_WITHOUT_LENGTH", 1170 },
|
||||
{ "ER_PRIMARY_CANT_HAVE_NULL", 1171 },
|
||||
{ "ER_TOO_MANY_ROWS", 1172 },
|
||||
{ "ER_REQUIRES_PRIMARY_KEY", 1173 },
|
||||
{ "ER_NO_RAID_COMPILED", 1174 },
|
||||
{ "ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE", 1175 },
|
||||
{ "ER_KEY_DOES_NOT_EXITS", 1176 },
|
||||
{ "ER_CHECK_NO_SUCH_TABLE", 1177 },
|
||||
{ "ER_CHECK_NOT_IMPLEMENTED", 1178 },
|
||||
{ "ER_CANT_DO_THIS_DURING_AN_TRANSACTION", 1179 },
|
||||
{ "ER_ERROR_DURING_COMMIT", 1180 },
|
||||
{ "ER_ERROR_DURING_ROLLBACK", 1181 },
|
||||
{ "ER_ERROR_DURING_FLUSH_LOGS", 1182 },
|
||||
{ "ER_ERROR_DURING_CHECKPOINT", 1183 },
|
||||
{ "ER_NEW_ABORTING_CONNECTION", 1184 },
|
||||
{ "ER_DUMP_NOT_IMPLEMENTED", 1185 },
|
||||
{ "ER_FLUSH_MASTER_BINLOG_CLOSED", 1186 },
|
||||
{ "ER_INDEX_REBUILD", 1187 },
|
||||
{ "ER_MASTER", 1188 },
|
||||
{ "ER_MASTER_NET_READ", 1189 },
|
||||
{ "ER_MASTER_NET_WRITE", 1190 },
|
||||
{ "ER_FT_MATCHING_KEY_NOT_FOUND", 1191 },
|
||||
{ "ER_LOCK_OR_ACTIVE_TRANSACTION", 1192 },
|
||||
{ "ER_UNKNOWN_SYSTEM_VARIABLE", 1193 },
|
||||
{ "ER_CRASHED_ON_USAGE", 1194 },
|
||||
{ "ER_CRASHED_ON_REPAIR", 1195 },
|
||||
{ "ER_WARNING_NOT_COMPLETE_ROLLBACK", 1196 },
|
||||
{ "ER_TRANS_CACHE_FULL", 1197 },
|
||||
{ "ER_SLAVE_MUST_STOP", 1198 },
|
||||
{ "ER_SLAVE_NOT_RUNNING", 1199 },
|
||||
{ "ER_BAD_SLAVE", 1200 },
|
||||
{ "ER_MASTER_INFO", 1201 },
|
||||
{ "ER_SLAVE_THREAD", 1202 },
|
||||
{ "ER_TOO_MANY_USER_CONNECTIONS", 1203 },
|
||||
{ "ER_SET_CONSTANTS_ONLY", 1204 },
|
||||
{ "ER_LOCK_WAIT_TIMEOUT", 1205 },
|
||||
{ "ER_LOCK_TABLE_FULL", 1206 },
|
||||
{ "ER_READ_ONLY_TRANSACTION", 1207 },
|
||||
{ "ER_DROP_DB_WITH_READ_LOCK", 1208 },
|
||||
{ "ER_CREATE_DB_WITH_READ_LOCK", 1209 },
|
||||
{ "ER_WRONG_ARGUMENTS", 1210 },
|
||||
{ "ER_NO_PERMISSION_TO_CREATE_USER", 1211 },
|
||||
{ "ER_UNION_TABLES_IN_DIFFERENT_DIR", 1212 },
|
||||
{ "ER_LOCK_DEADLOCK", 1213 },
|
||||
{ "ER_TABLE_CANT_HANDLE_FT", 1214 },
|
||||
{ "ER_CANNOT_ADD_FOREIGN", 1215 },
|
||||
{ "ER_NO_REFERENCED_ROW", 1216 },
|
||||
{ "ER_ROW_IS_REFERENCED", 1217 },
|
||||
{ "ER_CONNECT_TO_MASTER", 1218 },
|
||||
{ "ER_QUERY_ON_MASTER", 1219 },
|
||||
{ "ER_ERROR_WHEN_EXECUTING_COMMAND", 1220 },
|
||||
{ "ER_WRONG_USAGE", 1221 },
|
||||
{ "ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT", 1222 },
|
||||
{ "ER_CANT_UPDATE_WITH_READLOCK", 1223 },
|
||||
{ "ER_MIXING_NOT_ALLOWED", 1224 },
|
||||
{ "ER_DUP_ARGUMENT", 1225 },
|
||||
{ "ER_USER_LIMIT_REACHED", 1226 },
|
||||
{ "ER_SPECIFIC_ACCESS_DENIED_ERROR", 1227 },
|
||||
{ "ER_LOCAL_VARIABLE", 1228 },
|
||||
{ "ER_GLOBAL_VARIABLE", 1229 },
|
||||
{ "ER_NO_DEFAULT", 1230 },
|
||||
{ "ER_WRONG_VALUE_FOR_VAR", 1231 },
|
||||
{ "ER_WRONG_TYPE_FOR_VAR", 1232 },
|
||||
{ "ER_VAR_CANT_BE_READ", 1233 },
|
||||
{ "ER_CANT_USE_OPTION_HERE", 1234 },
|
||||
{ "ER_NOT_SUPPORTED_YET", 1235 },
|
||||
{ "ER_MASTER_FATAL_ERROR_READING_BINLOG", 1236 },
|
||||
{ "ER_SLAVE_IGNORED_TABLE", 1237 },
|
||||
{ "ER_INCORRECT_GLOBAL_LOCAL_VAR", 1238 },
|
||||
{ "ER_WRONG_FK_DEF", 1239 },
|
||||
{ "ER_KEY_REF_DO_NOT_MATCH_TABLE_REF", 1240 },
|
||||
{ "ER_OPERAND_COLUMNS", 1241 },
|
||||
{ "ER_SUBQUERY_NO_1_ROW", 1242 },
|
||||
{ "ER_UNKNOWN_STMT_HANDLER", 1243 },
|
||||
{ "ER_CORRUPT_HELP_DB", 1244 },
|
||||
{ "ER_CYCLIC_REFERENCE", 1245 },
|
||||
{ "ER_AUTO_CONVERT", 1246 },
|
||||
{ "ER_ILLEGAL_REFERENCE", 1247 },
|
||||
{ "ER_DERIVED_MUST_HAVE_ALIAS", 1248 },
|
||||
{ "ER_SELECT_REDUCED", 1249 },
|
||||
{ "ER_TABLENAME_NOT_ALLOWED_HERE", 1250 },
|
||||
{ "ER_NOT_SUPPORTED_AUTH_MODE", 1251 },
|
||||
{ "ER_SPATIAL_CANT_HAVE_NULL", 1252 },
|
||||
{ "ER_COLLATION_CHARSET_MISMATCH", 1253 },
|
||||
{ "ER_SLAVE_WAS_RUNNING", 1254 },
|
||||
{ "ER_SLAVE_WAS_NOT_RUNNING", 1255 },
|
||||
{ "ER_TOO_BIG_FOR_UNCOMPRESS", 1256 },
|
||||
{ "ER_ZLIB_Z_MEM_ERROR", 1257 },
|
||||
{ "ER_ZLIB_Z_BUF_ERROR", 1258 },
|
||||
{ "ER_ZLIB_Z_DATA_ERROR", 1259 },
|
||||
{ "ER_CUT_VALUE_GROUP_CONCAT", 1260 },
|
||||
{ "ER_WARN_TOO_FEW_RECORDS", 1261 },
|
||||
{ "ER_WARN_TOO_MANY_RECORDS", 1262 },
|
||||
{ "ER_WARN_NULL_TO_NOTNULL", 1263 },
|
||||
{ "ER_WARN_DATA_OUT_OF_RANGE", 1264 },
|
||||
{ "WARN_DATA_TRUNCATED", 1265 },
|
||||
{ "ER_WARN_USING_OTHER_HANDLER", 1266 },
|
||||
{ "ER_CANT_AGGREGATE_2COLLATIONS", 1267 },
|
||||
{ "ER_DROP_USER", 1268 },
|
||||
{ "ER_REVOKE_GRANTS", 1269 },
|
||||
{ "ER_CANT_AGGREGATE_3COLLATIONS", 1270 },
|
||||
{ "ER_CANT_AGGREGATE_NCOLLATIONS", 1271 },
|
||||
{ "ER_VARIABLE_IS_NOT_STRUCT", 1272 },
|
||||
{ "ER_UNKNOWN_COLLATION", 1273 },
|
||||
{ "ER_SLAVE_IGNORED_SSL_PARAMS", 1274 },
|
||||
{ "ER_SERVER_IS_IN_SECURE_AUTH_MODE", 1275 },
|
||||
{ "ER_WARN_FIELD_RESOLVED", 1276 },
|
||||
{ "ER_BAD_SLAVE_UNTIL_COND", 1277 },
|
||||
{ "ER_MISSING_SKIP_SLAVE", 1278 },
|
||||
{ "ER_UNTIL_COND_IGNORED", 1279 },
|
||||
{ "ER_WRONG_NAME_FOR_INDEX", 1280 },
|
||||
{ "ER_WRONG_NAME_FOR_CATALOG", 1281 },
|
||||
{ "ER_WARN_QC_RESIZE", 1282 },
|
||||
{ "ER_BAD_FT_COLUMN", 1283 },
|
||||
{ "ER_UNKNOWN_KEY_CACHE", 1284 },
|
||||
{ "ER_WARN_HOSTNAME_WONT_WORK", 1285 },
|
||||
{ "ER_UNKNOWN_STORAGE_ENGINE", 1286 },
|
||||
{ "ER_WARN_DEPRECATED_SYNTAX", 1287 },
|
||||
{ "ER_NON_UPDATABLE_TABLE", 1288 },
|
||||
{ "ER_FEATURE_DISABLED", 1289 },
|
||||
{ "ER_OPTION_PREVENTS_STATEMENT", 1290 },
|
||||
{ "ER_DUPLICATED_VALUE_IN_TYPE", 1291 },
|
||||
{ "ER_TRUNCATED_WRONG_VALUE", 1292 },
|
||||
{ "ER_TOO_MUCH_AUTO_TIMESTAMP_COLS", 1293 },
|
||||
{ "ER_INVALID_ON_UPDATE", 1294 },
|
||||
{ "ER_UNSUPPORTED_PS", 1295 },
|
||||
{ "ER_GET_ERRMSG", 1296 },
|
||||
{ "ER_GET_TEMPORARY_ERRMSG", 1297 },
|
||||
{ "ER_UNKNOWN_TIME_ZONE", 1298 },
|
||||
{ "ER_WARN_INVALID_TIMESTAMP", 1299 },
|
||||
{ "ER_INVALID_CHARACTER_STRING", 1300 },
|
||||
{ "ER_WARN_ALLOWED_PACKET_OVERFLOWED", 1301 },
|
||||
{ "ER_CONFLICTING_DECLARATIONS", 1302 },
|
||||
{ "ER_SP_NO_RECURSIVE_CREATE", 1303 },
|
||||
{ "ER_SP_ALREADY_EXISTS", 1304 },
|
||||
{ "ER_SP_DOES_NOT_EXIST", 1305 },
|
||||
{ "ER_SP_DROP_FAILED", 1306 },
|
||||
{ "ER_SP_STORE_FAILED", 1307 },
|
||||
{ "ER_SP_LILABEL_MISMATCH", 1308 },
|
||||
{ "ER_SP_LABEL_REDEFINE", 1309 },
|
||||
{ "ER_SP_LABEL_MISMATCH", 1310 },
|
||||
{ "ER_SP_UNINIT_VAR", 1311 },
|
||||
{ "ER_SP_BADSELECT", 1312 },
|
||||
{ "ER_SP_BADRETURN", 1313 },
|
||||
{ "ER_SP_BADSTATEMENT", 1314 },
|
||||
{ "ER_UPDATE_LOG_DEPRECATED_IGNORED", 1315 },
|
||||
{ "ER_UPDATE_LOG_DEPRECATED_TRANSLATED", 1316 },
|
||||
{ "ER_QUERY_INTERRUPTED", 1317 },
|
||||
{ "ER_SP_WRONG_NO_OF_ARGS", 1318 },
|
||||
{ "ER_SP_COND_MISMATCH", 1319 },
|
||||
{ "ER_SP_NORETURN", 1320 },
|
||||
{ "ER_SP_NORETURNEND", 1321 },
|
||||
{ "ER_SP_BAD_CURSOR_QUERY", 1322 },
|
||||
{ "ER_SP_BAD_CURSOR_SELECT", 1323 },
|
||||
{ "ER_SP_CURSOR_MISMATCH", 1324 },
|
||||
{ "ER_SP_CURSOR_ALREADY_OPEN", 1325 },
|
||||
{ "ER_SP_CURSOR_NOT_OPEN", 1326 },
|
||||
{ "ER_SP_UNDECLARED_VAR", 1327 },
|
||||
{ "ER_SP_WRONG_NO_OF_FETCH_ARGS", 1328 },
|
||||
{ "ER_SP_FETCH_NO_DATA", 1329 },
|
||||
{ "ER_SP_DUP_PARAM", 1330 },
|
||||
{ "ER_SP_DUP_VAR", 1331 },
|
||||
{ "ER_SP_DUP_COND", 1332 },
|
||||
{ "ER_SP_DUP_CURS", 1333 },
|
||||
{ "ER_SP_CANT_ALTER", 1334 },
|
||||
{ "ER_SP_SUBSELECT_NYI", 1335 },
|
||||
{ "ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG", 1336 },
|
||||
{ "ER_SP_VARCOND_AFTER_CURSHNDLR", 1337 },
|
||||
{ "ER_SP_CURSOR_AFTER_HANDLER", 1338 },
|
||||
{ "ER_SP_CASE_NOT_FOUND", 1339 },
|
||||
{ "ER_FPARSER_TOO_BIG_FILE", 1340 },
|
||||
{ "ER_FPARSER_BAD_HEADER", 1341 },
|
||||
{ "ER_FPARSER_EOF_IN_COMMENT", 1342 },
|
||||
{ "ER_FPARSER_ERROR_IN_PARAMETER", 1343 },
|
||||
{ "ER_FPARSER_EOF_IN_UNKNOWN_PARAMETER", 1344 },
|
||||
{ "ER_VIEW_NO_EXPLAIN", 1345 },
|
||||
{ "ER_FRM_UNKNOWN_TYPE", 1346 },
|
||||
{ "ER_WRONG_OBJECT", 1347 },
|
||||
{ "ER_NONUPDATEABLE_COLUMN", 1348 },
|
||||
{ "ER_VIEW_SELECT_DERIVED", 1349 },
|
||||
{ "ER_VIEW_SELECT_CLAUSE", 1350 },
|
||||
{ "ER_VIEW_SELECT_VARIABLE", 1351 },
|
||||
{ "ER_VIEW_SELECT_TMPTABLE", 1352 },
|
||||
{ "ER_VIEW_WRONG_LIST", 1353 },
|
||||
{ "ER_WARN_VIEW_MERGE", 1354 },
|
||||
{ "ER_WARN_VIEW_WITHOUT_KEY", 1355 },
|
||||
{ "ER_VIEW_INVALID", 1356 },
|
||||
{ "ER_SP_NO_DROP_SP", 1357 },
|
||||
{ "ER_SP_GOTO_IN_HNDLR", 1358 },
|
||||
{ "ER_TRG_ALREADY_EXISTS", 1359 },
|
||||
{ "ER_TRG_DOES_NOT_EXIST", 1360 },
|
||||
{ "ER_TRG_ON_VIEW_OR_TEMP_TABLE", 1361 },
|
||||
{ "ER_TRG_CANT_CHANGE_ROW", 1362 },
|
||||
{ "ER_TRG_NO_SUCH_ROW_IN_TRG", 1363 },
|
||||
{ "ER_NO_DEFAULT_FOR_FIELD", 1364 },
|
||||
{ "ER_DIVISION_BY_ZERO", 1365 },
|
||||
{ "ER_TRUNCATED_WRONG_VALUE_FOR_FIELD", 1366 },
|
||||
{ "ER_ILLEGAL_VALUE_FOR_TYPE", 1367 },
|
||||
{ "ER_VIEW_NONUPD_CHECK", 1368 },
|
||||
{ "ER_VIEW_CHECK_FAILED", 1369 },
|
||||
{ "ER_PROCACCESS_DENIED_ERROR", 1370 },
|
||||
{ "ER_RELAY_LOG_FAIL", 1371 },
|
||||
{ "ER_PASSWD_LENGTH", 1372 },
|
||||
{ "ER_UNKNOWN_TARGET_BINLOG", 1373 },
|
||||
{ "ER_IO_ERR_LOG_INDEX_READ", 1374 },
|
||||
{ "ER_BINLOG_PURGE_PROHIBITED", 1375 },
|
||||
{ "ER_FSEEK_FAIL", 1376 },
|
||||
{ "ER_BINLOG_PURGE_FATAL_ERR", 1377 },
|
||||
{ "ER_LOG_IN_USE", 1378 },
|
||||
{ "ER_LOG_PURGE_UNKNOWN_ERR", 1379 },
|
||||
{ "ER_RELAY_LOG_INIT", 1380 },
|
||||
{ "ER_NO_BINARY_LOGGING", 1381 },
|
||||
{ "ER_RESERVED_SYNTAX", 1382 },
|
||||
{ "ER_WSAS_FAILED", 1383 },
|
||||
{ "ER_DIFF_GROUPS_PROC", 1384 },
|
||||
{ "ER_NO_GROUP_FOR_PROC", 1385 },
|
||||
{ "ER_ORDER_WITH_PROC", 1386 },
|
||||
{ "ER_LOGGING_PROHIBIT_CHANGING_OF", 1387 },
|
||||
{ "ER_NO_FILE_MAPPING", 1388 },
|
||||
{ "ER_WRONG_MAGIC", 1389 },
|
||||
{ "ER_PS_MANY_PARAM", 1390 },
|
||||
{ "ER_KEY_PART_0", 1391 },
|
||||
{ "ER_VIEW_CHECKSUM", 1392 },
|
||||
{ "ER_VIEW_MULTIUPDATE", 1393 },
|
||||
{ "ER_VIEW_NO_INSERT_FIELD_LIST", 1394 },
|
||||
{ "ER_VIEW_DELETE_MERGE_VIEW", 1395 },
|
||||
{ "ER_CANNOT_USER", 1396 },
|
||||
{ "ER_XAER_NOTA", 1397 },
|
||||
{ "ER_XAER_INVAL", 1398 },
|
||||
{ "ER_XAER_RMFAIL", 1399 },
|
||||
{ "ER_XAER_OUTSIDE", 1400 },
|
||||
{ "ER_XAER_RMERR", 1401 },
|
||||
{ "ER_XA_RBROLLBACK", 1402 },
|
||||
{ "ER_NONEXISTING_PROC_GRANT", 1403 },
|
||||
{ "ER_PROC_AUTO_GRANT_FAIL", 1404 },
|
||||
{ "ER_PROC_AUTO_REVOKE_FAIL", 1405 },
|
||||
{ "ER_DATA_TOO_LONG", 1406 },
|
||||
{ "ER_SP_BAD_SQLSTATE", 1407 },
|
||||
{ "ER_STARTUP", 1408 },
|
||||
{ "ER_LOAD_FROM_FIXED_SIZE_ROWS_TO_VAR", 1409 },
|
||||
{ "ER_CANT_CREATE_USER_WITH_GRANT", 1410 },
|
||||
{ "ER_WRONG_VALUE_FOR_TYPE", 1411 },
|
||||
{ "ER_TABLE_DEF_CHANGED", 1412 },
|
||||
{ "ER_SP_DUP_HANDLER", 1413 },
|
||||
{ "ER_SP_NOT_VAR_ARG", 1414 },
|
||||
{ "ER_SP_NO_RETSET", 1415 },
|
||||
{ "ER_CANT_CREATE_GEOMETRY_OBJECT", 1416 },
|
||||
{ "ER_FAILED_ROUTINE_BREAK_BINLOG", 1417 },
|
||||
{ "ER_BINLOG_UNSAFE_ROUTINE", 1418 },
|
||||
{ "ER_BINLOG_CREATE_ROUTINE_NEED_SUPER", 1419 },
|
||||
{ "ER_EXEC_STMT_WITH_OPEN_CURSOR", 1420 },
|
||||
{ "ER_STMT_HAS_NO_OPEN_CURSOR", 1421 },
|
||||
{ "ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG", 1422 },
|
||||
{ "ER_NO_DEFAULT_FOR_VIEW_FIELD", 1423 },
|
||||
{ "ER_SP_NO_RECURSION", 1424 },
|
||||
{ "ER_TOO_BIG_SCALE", 1425 },
|
||||
{ "ER_TOO_BIG_PRECISION", 1426 },
|
||||
{ "ER_M_BIGGER_THAN_D", 1427 },
|
||||
{ "ER_WRONG_LOCK_OF_SYSTEM_TABLE", 1428 },
|
||||
{ "ER_CONNECT_TO_FOREIGN_DATA_SOURCE", 1429 },
|
||||
{ "ER_QUERY_ON_FOREIGN_DATA_SOURCE", 1430 },
|
||||
{ "ER_FOREIGN_DATA_SOURCE_DOESNT_EXIST", 1431 },
|
||||
{ "ER_FOREIGN_DATA_STRING_INVALID_CANT_CREATE", 1432 },
|
||||
{ "ER_FOREIGN_DATA_STRING_INVALID", 1433 },
|
||||
{ "ER_CANT_CREATE_FEDERATED_TABLE", 1434 },
|
||||
{ "ER_TRG_IN_WRONG_SCHEMA", 1435 },
|
||||
{ "ER_STACK_OVERRUN_NEED_MORE", 1436 },
|
||||
{ "ER_TOO_LONG_BODY", 1437 },
|
||||
{ "ER_WARN_CANT_DROP_DEFAULT_KEYCACHE", 1438 },
|
||||
{ "ER_TOO_BIG_DISPLAYWIDTH", 1439 },
|
||||
{ "ER_XAER_DUPID", 1440 },
|
||||
{ "ER_DATETIME_FUNCTION_OVERFLOW", 1441 },
|
||||
{ "ER_CANT_UPDATE_USED_TABLE_IN_SF_OR_TRG", 1442 },
|
||||
{ "ER_VIEW_PREVENT_UPDATE", 1443 },
|
||||
{ "ER_PS_NO_RECURSION", 1444 },
|
||||
{ "ER_SP_CANT_SET_AUTOCOMMIT", 1445 },
|
||||
{ "ER_MALFORMED_DEFINER", 1446 },
|
||||
{ "ER_VIEW_FRM_NO_USER", 1447 },
|
||||
{ "ER_VIEW_OTHER_USER", 1448 },
|
||||
{ "ER_NO_SUCH_USER", 1449 },
|
||||
{ "ER_FORBID_SCHEMA_CHANGE", 1450 },
|
||||
{ "ER_ROW_IS_REFERENCED_2", 1451 },
|
||||
{ "ER_NO_REFERENCED_ROW_2", 1452 },
|
||||
{ "ER_SP_BAD_VAR_SHADOW", 1453 },
|
||||
{ "ER_TRG_NO_DEFINER", 1454 },
|
||||
{ "ER_OLD_FILE_FORMAT", 1455 },
|
||||
{ "ER_SP_RECURSION_LIMIT", 1456 },
|
||||
{ "ER_SP_PROC_TABLE_CORRUPT", 1457 },
|
||||
{ "ER_SP_WRONG_NAME", 1458 },
|
||||
{ "ER_TABLE_NEEDS_UPGRADE", 1459 },
|
||||
{ "ER_SP_NO_AGGREGATE", 1460 },
|
||||
{ "ER_MAX_PREPARED_STMT_COUNT_REACHED", 1461 },
|
||||
{ "ER_VIEW_RECURSIVE", 1462 },
|
||||
{ "ER_NON_GROUPING_FIELD_USED", 1463 },
|
||||
{ "ER_TABLE_CANT_HANDLE_SPKEYS", 1464 },
|
||||
{ "ER_NO_TRIGGERS_ON_SYSTEM_SCHEMA", 1465 },
|
||||
{ "ER_REMOVED_SPACES", 1466 },
|
||||
{ "ER_AUTOINC_READ_FAILED", 1467 },
|
||||
{ "ER_USERNAME", 1468 },
|
||||
{ "ER_HOSTNAME", 1469 },
|
||||
{ "ER_WRONG_STRING_LENGTH", 1470 },
|
||||
{ "ER_NON_INSERTABLE_TABLE", 1471 },
|
||||
{ "ER_ADMIN_WRONG_MRG_TABLE", 1472 },
|
||||
{ "ER_TOO_HIGH_LEVEL_OF_NESTING_FOR_SELECT", 1473 },
|
||||
{ "ER_NAME_BECOMES_EMPTY", 1474 },
|
||||
{ "ER_AMBIGUOUS_FIELD_TERM", 1475 },
|
||||
{ "ER_FOREIGN_SERVER_EXISTS", 1476 },
|
||||
{ "ER_FOREIGN_SERVER_DOESNT_EXIST", 1477 },
|
||||
{ "ER_ILLEGAL_HA_CREATE_OPTION", 1478 },
|
||||
{ "ER_PARTITION_REQUIRES_VALUES_ERROR", 1479 },
|
||||
{ "ER_PARTITION_WRONG_VALUES_ERROR", 1480 },
|
||||
{ "ER_PARTITION_MAXVALUE_ERROR", 1481 },
|
||||
{ "ER_PARTITION_SUBPARTITION_ERROR", 1482 },
|
||||
{ "ER_PARTITION_SUBPART_MIX_ERROR", 1483 },
|
||||
{ "ER_PARTITION_WRONG_NO_PART_ERROR", 1484 },
|
||||
{ "ER_PARTITION_WRONG_NO_SUBPART_ERROR", 1485 },
|
||||
{ "ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR", 1486 },
|
||||
{ "ER_NO_CONST_EXPR_IN_RANGE_OR_LIST_ERROR", 1487 },
|
||||
{ "ER_FIELD_NOT_FOUND_PART_ERROR", 1488 },
|
||||
{ "ER_LIST_OF_FIELDS_ONLY_IN_HASH_ERROR", 1489 },
|
||||
{ "ER_INCONSISTENT_PARTITION_INFO_ERROR", 1490 },
|
||||
{ "ER_PARTITION_FUNC_NOT_ALLOWED_ERROR", 1491 },
|
||||
{ "ER_PARTITIONS_MUST_BE_DEFINED_ERROR", 1492 },
|
||||
{ "ER_RANGE_NOT_INCREASING_ERROR", 1493 },
|
||||
{ "ER_INCONSISTENT_TYPE_OF_FUNCTIONS_ERROR", 1494 },
|
||||
{ "ER_MULTIPLE_DEF_CONST_IN_LIST_PART_ERROR", 1495 },
|
||||
{ "ER_PARTITION_ENTRY_ERROR", 1496 },
|
||||
{ "ER_MIX_HANDLER_ERROR", 1497 },
|
||||
{ "ER_PARTITION_NOT_DEFINED_ERROR", 1498 },
|
||||
{ "ER_TOO_MANY_PARTITIONS_ERROR", 1499 },
|
||||
{ "ER_SUBPARTITION_ERROR", 1500 },
|
||||
{ "ER_CANT_CREATE_HANDLER_FILE", 1501 },
|
||||
{ "ER_BLOB_FIELD_IN_PART_FUNC_ERROR", 1502 },
|
||||
{ "ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF", 1503 },
|
||||
{ "ER_NO_PARTS_ERROR", 1504 },
|
||||
{ "ER_PARTITION_MGMT_ON_NONPARTITIONED", 1505 },
|
||||
{ "ER_FOREIGN_KEY_ON_PARTITIONED", 1506 },
|
||||
{ "ER_DROP_PARTITION_NON_EXISTENT", 1507 },
|
||||
{ "ER_DROP_LAST_PARTITION", 1508 },
|
||||
{ "ER_COALESCE_ONLY_ON_HASH_PARTITION", 1509 },
|
||||
{ "ER_REORG_HASH_ONLY_ON_SAME_NO", 1510 },
|
||||
{ "ER_REORG_NO_PARAM_ERROR", 1511 },
|
||||
{ "ER_ONLY_ON_RANGE_LIST_PARTITION", 1512 },
|
||||
{ "ER_ADD_PARTITION_SUBPART_ERROR", 1513 },
|
||||
{ "ER_ADD_PARTITION_NO_NEW_PARTITION", 1514 },
|
||||
{ "ER_COALESCE_PARTITION_NO_PARTITION", 1515 },
|
||||
{ "ER_REORG_PARTITION_NOT_EXIST", 1516 },
|
||||
{ "ER_SAME_NAME_PARTITION", 1517 },
|
||||
{ "ER_NO_BINLOG_ERROR", 1518 },
|
||||
{ "ER_CONSECUTIVE_REORG_PARTITIONS", 1519 },
|
||||
{ "ER_REORG_OUTSIDE_RANGE", 1520 },
|
||||
{ "ER_PARTITION_FUNCTION_FAILURE", 1521 },
|
||||
{ "ER_PART_STATE_ERROR", 1522 },
|
||||
{ "ER_LIMITED_PART_RANGE", 1523 },
|
||||
{ "ER_PLUGIN_IS_NOT_LOADED", 1524 },
|
||||
{ "ER_WRONG_VALUE", 1525 },
|
||||
{ "ER_NO_PARTITION_FOR_GIVEN_VALUE", 1526 },
|
||||
{ "ER_FILEGROUP_OPTION_ONLY_ONCE", 1527 },
|
||||
{ "ER_CREATE_FILEGROUP_FAILED", 1528 },
|
||||
{ "ER_DROP_FILEGROUP_FAILED", 1529 },
|
||||
{ "ER_TABLESPACE_AUTO_EXTEND_ERROR", 1530 },
|
||||
{ "ER_WRONG_SIZE_NUMBER", 1531 },
|
||||
{ "ER_SIZE_OVERFLOW_ERROR", 1532 },
|
||||
{ "ER_ALTER_FILEGROUP_FAILED", 1533 },
|
||||
{ "ER_BINLOG_ROW_LOGGING_FAILED", 1534 },
|
||||
{ "ER_BINLOG_ROW_WRONG_TABLE_DEF", 1535 },
|
||||
{ "ER_BINLOG_ROW_RBR_TO_SBR", 1536 },
|
||||
{ "ER_EVENT_ALREADY_EXISTS", 1537 },
|
||||
{ "ER_EVENT_STORE_FAILED", 1538 },
|
||||
{ "ER_EVENT_DOES_NOT_EXIST", 1539 },
|
||||
{ "ER_EVENT_CANT_ALTER", 1540 },
|
||||
{ "ER_EVENT_DROP_FAILED", 1541 },
|
||||
{ "ER_EVENT_INTERVAL_NOT_POSITIVE_OR_TOO_BIG", 1542 },
|
||||
{ "ER_EVENT_ENDS_BEFORE_STARTS", 1543 },
|
||||
{ "ER_EVENT_EXEC_TIME_IN_THE_PAST", 1544 },
|
||||
{ "ER_EVENT_OPEN_TABLE_FAILED", 1545 },
|
||||
{ "ER_EVENT_NEITHER_M_EXPR_NOR_M_AT", 1546 },
|
||||
{ "ER_COL_COUNT_DOESNT_MATCH_CORRUPTED", 1547 },
|
||||
{ "ER_CANNOT_LOAD_FROM_TABLE", 1548 },
|
||||
{ "ER_EVENT_CANNOT_DELETE", 1549 },
|
||||
{ "ER_EVENT_COMPILE_ERROR", 1550 },
|
||||
{ "ER_EVENT_SAME_NAME", 1551 },
|
||||
{ "ER_EVENT_DATA_TOO_LONG", 1552 },
|
||||
{ "ER_DROP_INDEX_FK", 1553 },
|
||||
{ "ER_WARN_DEPRECATED_SYNTAX_WITH_VER", 1554 },
|
||||
{ "ER_CANT_WRITE_LOCK_LOG_TABLE", 1555 },
|
||||
{ "ER_CANT_LOCK_LOG_TABLE", 1556 },
|
||||
{ "ER_FOREIGN_DUPLICATE_KEY", 1557 },
|
||||
{ "ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE", 1558 },
|
||||
{ "ER_TEMP_TABLE_PREVENTS_SWITCH_OUT_OF_RBR", 1559 },
|
||||
{ "ER_STORED_FUNCTION_PREVENTS_SWITCH_BINLOG_FORMAT", 1560 },
|
||||
{ "ER_NDB_CANT_SWITCH_BINLOG_FORMAT", 1561 },
|
||||
{ "ER_PARTITION_NO_TEMPORARY", 1562 },
|
||||
{ "ER_PARTITION_CONST_DOMAIN_ERROR", 1563 },
|
||||
{ "ER_PARTITION_FUNCTION_IS_NOT_ALLOWED", 1564 },
|
||||
{ "ER_DDL_LOG_ERROR", 1565 },
|
||||
{ "ER_NULL_IN_VALUES_LESS_THAN", 1566 },
|
||||
{ "ER_WRONG_PARTITION_NAME", 1567 },
|
||||
{ "ER_CANT_CHANGE_TX_ISOLATION", 1568 },
|
||||
{ "ER_DUP_ENTRY_AUTOINCREMENT_CASE", 1569 },
|
||||
{ "ER_EVENT_MODIFY_QUEUE_ERROR", 1570 },
|
||||
{ "ER_EVENT_SET_VAR_ERROR", 1571 },
|
||||
{ "ER_PARTITION_MERGE_ERROR", 1572 },
|
||||
{ "ER_CANT_ACTIVATE_LOG", 1573 },
|
||||
{ "ER_RBR_NOT_AVAILABLE", 1574 },
|
||||
{ "ER_BASE64_DECODE_ERROR", 1575 },
|
||||
{ "ER_EVENT_RECURSION_FORBIDDEN", 1576 },
|
||||
{ "ER_EVENTS_DB_ERROR", 1577 },
|
||||
{ "ER_ONLY_INTEGERS_ALLOWED", 1578 },
|
||||
{ "ER_UNSUPORTED_LOG_ENGINE", 1579 },
|
||||
{ "ER_BAD_LOG_STATEMENT", 1580 },
|
||||
{ "ER_CANT_RENAME_LOG_TABLE", 1581 },
|
||||
{ "ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT", 1582 },
|
||||
{ "ER_WRONG_PARAMETERS_TO_NATIVE_FCT", 1583 },
|
||||
{ "ER_WRONG_PARAMETERS_TO_STORED_FCT", 1584 },
|
||||
{ "ER_NATIVE_FCT_NAME_COLLISION", 1585 },
|
||||
{ "ER_DUP_ENTRY_WITH_KEY_NAME", 1586 },
|
||||
{ "ER_BINLOG_PURGE_EMFILE", 1587 },
|
||||
{ "ER_EVENT_CANNOT_CREATE_IN_THE_PAST", 1588 },
|
||||
{ "ER_EVENT_CANNOT_ALTER_IN_THE_PAST", 1589 },
|
||||
{ "ER_SLAVE_INCIDENT", 1590 },
|
||||
{ "ER_NO_PARTITION_FOR_GIVEN_VALUE_SILENT", 1591 },
|
||||
{ "ER_BINLOG_UNSAFE_STATEMENT", 1592 },
|
||||
{ "ER_SLAVE_FATAL_ERROR", 1593 },
|
||||
{ "ER_SLAVE_RELAY_LOG_READ_FAILURE", 1594 },
|
||||
{ "ER_SLAVE_RELAY_LOG_WRITE_FAILURE", 1595 },
|
||||
{ "ER_SLAVE_CREATE_EVENT_FAILURE", 1596 },
|
||||
{ "ER_SLAVE_MASTER_COM_FAILURE", 1597 },
|
||||
{ "ER_BINLOG_LOGGING_IMPOSSIBLE", 1598 },
|
||||
{ "ER_VIEW_NO_CREATION_CTX", 1599 },
|
||||
{ "ER_VIEW_INVALID_CREATION_CTX", 1600 },
|
||||
{ "ER_SR_INVALID_CREATION_CTX", 1601 },
|
||||
{ "ER_TRG_CORRUPTED_FILE", 1602 },
|
||||
{ "ER_TRG_NO_CREATION_CTX", 1603 },
|
||||
{ "ER_TRG_INVALID_CREATION_CTX", 1604 },
|
||||
{ "ER_EVENT_INVALID_CREATION_CTX", 1605 },
|
||||
{ "ER_TRG_CANT_OPEN_TABLE", 1606 },
|
||||
{ "ER_CANT_CREATE_SROUTINE", 1607 },
|
||||
{ "ER_SLAVE_AMBIGOUS_EXEC_MODE", 1608 },
|
||||
{ "ER_NO_FORMAT_DESCRIPTION_EVENT_BEFORE_BINLOG_STATEMENT", 1609 },
|
||||
{ "ER_SLAVE_CORRUPT_EVENT", 1610 },
|
||||
{ "ER_LOAD_DATA_INVALID_COLUMN", 1611 },
|
||||
{ "ER_LOG_PURGE_NO_FILE", 1612 },
|
||||
{ "ER_XA_RBTIMEOUT", 1613 },
|
||||
{ "ER_XA_RBDEADLOCK", 1614 },
|
||||
{ "ER_NEED_REPREPARE", 1615 },
|
||||
{ "ER_DELAYED_NOT_SUPPORTED", 1616 },
|
||||
{ "WARN_NO_MASTER_INFO", 1617 },
|
||||
{ "WARN_OPTION_IGNORED", 1618 },
|
||||
{ "WARN_PLUGIN_DELETE_BUILTIN", 1619 },
|
||||
{ "WARN_PLUGIN_BUSY", 1620 },
|
||||
{ "ER_VARIABLE_IS_READONLY", 1621 },
|
||||
{ "ER_WARN_ENGINE_TRANSACTION_ROLLBACK", 1622 },
|
||||
{ "ER_SLAVE_HEARTBEAT_FAILURE", 1623 },
|
||||
{ "ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE", 1624 },
|
||||
{ "ER_NDB_REPLICATION_SCHEMA_ERROR", 1625 },
|
||||
{ "ER_CONFLICT_FN_PARSE_ERROR", 1626 },
|
||||
{ "ER_EXCEPTIONS_WRITE_ERROR", 1627 },
|
||||
{ "ER_TOO_LONG_TABLE_COMMENT", 1628 },
|
||||
{ "ER_TOO_LONG_FIELD_COMMENT", 1629 },
|
||||
{ "ER_FUNC_INEXISTENT_NAME_COLLISION", 1630 },
|
||||
{ "ER_DATABASE_NAME", 1631 },
|
||||
{ "ER_TABLE_NAME", 1632 },
|
||||
{ "ER_PARTITION_NAME", 1633 },
|
||||
{ "ER_SUBPARTITION_NAME", 1634 },
|
||||
{ "ER_TEMPORARY_NAME", 1635 },
|
||||
{ "ER_RENAMED_NAME", 1636 },
|
||||
{ "ER_TOO_MANY_CONCURRENT_TRXS", 1637 },
|
||||
{ "WARN_NON_ASCII_SEPARATOR_NOT_IMPLEMENTED", 1638 },
|
||||
{ "ER_DEBUG_SYNC_TIMEOUT", 1639 },
|
||||
{ "ER_DEBUG_SYNC_HIT_LIMIT", 1640 },
|
||||
|
|
@ -477,4 +477,169 @@
|
|||
#define ER_TOO_HIGH_LEVEL_OF_NESTING_FOR_SELECT 1473
|
||||
#define ER_NAME_BECOMES_EMPTY 1474
|
||||
#define ER_AMBIGUOUS_FIELD_TERM 1475
|
||||
#define ER_ERROR_LAST 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
|
||||
#define ER_PARTITION_SUBPART_MIX_ERROR 1483
|
||||
#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
|
||||
#define ER_FIELD_NOT_FOUND_PART_ERROR 1488
|
||||
#define ER_LIST_OF_FIELDS_ONLY_IN_HASH_ERROR 1489
|
||||
#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
|
||||
#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
|
||||
#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
|
||||
#define ER_BINLOG_ROW_RBR_TO_SBR 1536
|
||||
#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
|
||||
#define ER_EVENT_DROP_FAILED 1541
|
||||
#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
|
||||
#define ER_COL_COUNT_DOESNT_MATCH_CORRUPTED 1547
|
||||
#define ER_CANNOT_LOAD_FROM_TABLE 1548
|
||||
#define ER_EVENT_CANNOT_DELETE 1549
|
||||
#define ER_EVENT_COMPILE_ERROR 1550
|
||||
#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
|
||||
#define ER_CANT_WRITE_LOCK_LOG_TABLE 1555
|
||||
#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
|
||||
#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
|
||||
#define ER_DUP_ENTRY_AUTOINCREMENT_CASE 1569
|
||||
#define ER_EVENT_MODIFY_QUEUE_ERROR 1570
|
||||
#define ER_EVENT_SET_VAR_ERROR 1571
|
||||
#define ER_PARTITION_MERGE_ERROR 1572
|
||||
#define ER_CANT_ACTIVATE_LOG 1573
|
||||
#define ER_RBR_NOT_AVAILABLE 1574
|
||||
#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_SLAVE_AMBIGOUS_EXEC_MODE 1608
|
||||
#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
|
||||
#define ER_SLAVE_HEARTBEAT_FAILURE 1623
|
||||
#define ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE 1624
|
||||
#define ER_NDB_REPLICATION_SCHEMA_ERROR 1625
|
||||
#define ER_CONFLICT_FN_PARSE_ERROR 1626
|
||||
#define ER_EXCEPTIONS_WRITE_ERROR 1627
|
||||
#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_ERROR_LAST 1640
|
||||
|
|
|
|||
|
|
@ -1,158 +0,0 @@
|
|||
/* Copyright (C) 2000 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
/* Parser needs these defines always, even if USE_RAID is not defined */
|
||||
#define RAID_TYPE_0 1 /* Striping */
|
||||
#define RAID_TYPE_x 2 /* Some new modes */
|
||||
#define RAID_TYPE_y 3
|
||||
|
||||
#define RAID_DEFAULT_CHUNKS 4
|
||||
#define RAID_DEFAULT_CHUNKSIZE 256*1024 /* 256kB */
|
||||
|
||||
C_MODE_START
|
||||
#define my_raid_type(raid_type) raid_type_string[(int)(raid_type)]
|
||||
extern const char *raid_type_string[];
|
||||
C_MODE_END
|
||||
|
||||
#ifdef DONT_USE_RAID
|
||||
#undef USE_RAID
|
||||
#endif
|
||||
#if defined(USE_RAID)
|
||||
|
||||
#include "my_dir.h"
|
||||
|
||||
/* Trap all occurences of my_...() in source and use our wrapper around this function */
|
||||
|
||||
#ifdef MAP_TO_USE_RAID
|
||||
#define my_read(A,B,C,D) my_raid_read(A,B,C,D)
|
||||
#define my_write(A,B,C,D) my_raid_write(A,B,C,D)
|
||||
#define my_pwrite(A,B,C,D,E) my_raid_pwrite(A,B,C,D,E)
|
||||
#define my_pread(A,B,C,D,E) my_raid_pread(A,B,C,D,E)
|
||||
#define my_chsize(A,B,C,D) my_raid_chsize(A,B,C,D)
|
||||
#define my_close(A,B) my_raid_close(A,B)
|
||||
#define my_tell(A,B) my_raid_tell(A,B)
|
||||
#define my_seek(A,B,C,D) my_raid_seek(A,B,C,D)
|
||||
#define my_lock(A,B,C,D,E) my_raid_lock(A,B,C,D,E)
|
||||
#define my_fstat(A,B,C) my_raid_fstat(A,B,C)
|
||||
#endif /* MAP_TO_USE_RAID */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void init_raid(void);
|
||||
void end_raid(void);
|
||||
|
||||
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);
|
||||
File my_raid_open(const char *FileName, int Flags,
|
||||
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);
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
uint my_raid_write(File,const byte *Buffer, uint Count, myf MyFlags);
|
||||
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);
|
||||
uint my_raid_pwrite(int Filedes, const byte *Buffer, uint Count,
|
||||
my_off_t offset, myf MyFlags);
|
||||
|
||||
int my_raid_lock(File,int locktype, my_off_t start, my_off_t length,
|
||||
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);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
#ifdef USE_PRAGMA_INTERFACE
|
||||
#pragma interface /* gcc class implementation */
|
||||
#endif
|
||||
|
||||
class RaidName {
|
||||
public:
|
||||
RaidName(const char *FileName);
|
||||
~RaidName();
|
||||
bool IsRaid();
|
||||
int Rename(const char * from, const char * to, myf MyFlags);
|
||||
private:
|
||||
uint _raid_type; /* RAID_TYPE_0 or RAID_TYPE_1 or RAID_TYPE_5 */
|
||||
uint _raid_chunks; /* 1..n */
|
||||
ulong _raid_chunksize; /* 1..n in bytes */
|
||||
};
|
||||
|
||||
class RaidFd {
|
||||
public:
|
||||
RaidFd(uint raid_type, uint raid_chunks , ulong raid_chunksize);
|
||||
~RaidFd();
|
||||
File Create(const char *FileName, int CreateFlags, int access_flags,
|
||||
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);
|
||||
int Write(const byte *Buffer, uint Count, myf MyFlags);
|
||||
int Read(const byte *Buffer, uint Count, myf MyFlags);
|
||||
int Lock(int locktype, my_off_t start, my_off_t length, myf MyFlags);
|
||||
int Chsize(File fd, my_off_t newlength, int filler, myf MyFlags);
|
||||
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* */
|
||||
private:
|
||||
|
||||
uint _raid_type; /* RAID_TYPE_0 or RAID_TYPE_1 or RAID_TYPE_5 */
|
||||
uint _raid_chunks; /* 1..n */
|
||||
ulong _raid_chunksize; /* 1..n in bytes */
|
||||
|
||||
ulong _total_block; /* We are operating with block no x (can be 0..many). */
|
||||
uint _this_block; /* can be 0.._raid_chunks */
|
||||
uint _remaining_bytes; /* Maximum bytes that can be written in this block */
|
||||
|
||||
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 */
|
||||
|
||||
inline void Calculate()
|
||||
{
|
||||
DBUG_ENTER("RaidFd::_Calculate");
|
||||
DBUG_PRINT("info",("_position: %lu _raid_chunksize: %lu _size: %lu",
|
||||
(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));
|
||||
DBUG_PRINT("info",
|
||||
("_total_block: %lu this_block: %d _remaining_bytes: %d",
|
||||
_total_block, _this_block, _remaining_bytes));
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* __cplusplus */
|
||||
#endif /* USE_RAID */
|
||||
50
dep/include/mysql/sql_common.h
Normal file
50
dep/include/mysql/sql_common.h
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
/* Copyright (C) 2003-2004, 2006 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
|
||||
extern const char *unknown_sqlstate;
|
||||
extern const char *cant_connect_sqlstate;
|
||||
extern const char *not_error_sqlstate;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern CHARSET_INFO *default_client_charset_info;
|
||||
MYSQL_FIELD *unpack_fields(MYSQL_DATA *data,MEM_ROOT *alloc,uint fields,
|
||||
my_bool default_value, uint server_capabilities);
|
||||
void free_rows(MYSQL_DATA *cur);
|
||||
void free_old_query(MYSQL *mysql);
|
||||
void end_server(MYSQL *mysql);
|
||||
my_bool mysql_reconnect(MYSQL *mysql);
|
||||
void mysql_read_default_options(struct st_mysql_options *options,
|
||||
const char *filename,const char *group);
|
||||
my_bool
|
||||
cli_advanced_command(MYSQL *mysql, enum enum_server_command command,
|
||||
const unsigned char *header, ulong header_length,
|
||||
const unsigned char *arg, ulong arg_length,
|
||||
my_bool skip_check, MYSQL_STMT *stmt);
|
||||
unsigned long cli_safe_read(MYSQL *mysql);
|
||||
void net_clear_error(NET *net);
|
||||
void set_stmt_errmsg(MYSQL_STMT *stmt, NET *net);
|
||||
void set_stmt_error(MYSQL_STMT *stmt, int errcode, const char *sqlstate,
|
||||
const char *err);
|
||||
void set_mysql_error(MYSQL *mysql, int errcode, const char *sqlstate);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#define protocol_41(A) ((A)->server_capabilities & CLIENT_PROTOCOL_41)
|
||||
|
||||
211
dep/include/mysql/sql_state.h
Normal file
211
dep/include/mysql/sql_state.h
Normal file
|
|
@ -0,0 +1,211 @@
|
|||
/* Autogenerated file, please don't edit */
|
||||
|
||||
{ ER_DUP_KEY ,"23000", "" },
|
||||
{ ER_OUTOFMEMORY ,"HY001", "S1001" },
|
||||
{ ER_OUT_OF_SORTMEMORY ,"HY001", "S1001" },
|
||||
{ ER_CON_COUNT_ERROR ,"08004", "" },
|
||||
{ ER_BAD_HOST_ERROR ,"08S01", "" },
|
||||
{ ER_HANDSHAKE_ERROR ,"08S01", "" },
|
||||
{ ER_DBACCESS_DENIED_ERROR ,"42000", "" },
|
||||
{ ER_ACCESS_DENIED_ERROR ,"28000", "" },
|
||||
{ ER_NO_DB_ERROR ,"3D000", "" },
|
||||
{ ER_UNKNOWN_COM_ERROR ,"08S01", "" },
|
||||
{ ER_BAD_NULL_ERROR ,"23000", "" },
|
||||
{ ER_BAD_DB_ERROR ,"42000", "" },
|
||||
{ ER_TABLE_EXISTS_ERROR ,"42S01", "" },
|
||||
{ ER_BAD_TABLE_ERROR ,"42S02", "" },
|
||||
{ ER_NON_UNIQ_ERROR ,"23000", "" },
|
||||
{ ER_SERVER_SHUTDOWN ,"08S01", "" },
|
||||
{ ER_BAD_FIELD_ERROR ,"42S22", "S0022" },
|
||||
{ ER_WRONG_FIELD_WITH_GROUP ,"42000", "S1009" },
|
||||
{ ER_WRONG_GROUP_FIELD ,"42000", "S1009" },
|
||||
{ ER_WRONG_SUM_SELECT ,"42000", "S1009" },
|
||||
{ ER_WRONG_VALUE_COUNT ,"21S01", "" },
|
||||
{ ER_TOO_LONG_IDENT ,"42000", "S1009" },
|
||||
{ ER_DUP_FIELDNAME ,"42S21", "S1009" },
|
||||
{ ER_DUP_KEYNAME ,"42000", "S1009" },
|
||||
{ ER_DUP_ENTRY ,"23000", "S1009" },
|
||||
{ ER_WRONG_FIELD_SPEC ,"42000", "S1009" },
|
||||
{ ER_PARSE_ERROR ,"42000", "s1009" },
|
||||
{ ER_EMPTY_QUERY ,"42000", "" },
|
||||
{ ER_NONUNIQ_TABLE ,"42000", "S1009" },
|
||||
{ ER_INVALID_DEFAULT ,"42000", "S1009" },
|
||||
{ ER_MULTIPLE_PRI_KEY ,"42000", "S1009" },
|
||||
{ ER_TOO_MANY_KEYS ,"42000", "S1009" },
|
||||
{ ER_TOO_MANY_KEY_PARTS ,"42000", "S1009" },
|
||||
{ ER_TOO_LONG_KEY ,"42000", "S1009" },
|
||||
{ ER_KEY_COLUMN_DOES_NOT_EXITS ,"42000", "S1009" },
|
||||
{ ER_BLOB_USED_AS_KEY ,"42000", "S1009" },
|
||||
{ ER_TOO_BIG_FIELDLENGTH ,"42000", "S1009" },
|
||||
{ ER_WRONG_AUTO_KEY ,"42000", "S1009" },
|
||||
{ ER_FORCING_CLOSE ,"08S01", "" },
|
||||
{ ER_IPSOCK_ERROR ,"08S01", "" },
|
||||
{ ER_NO_SUCH_INDEX ,"42S12", "S1009" },
|
||||
{ ER_WRONG_FIELD_TERMINATORS ,"42000", "S1009" },
|
||||
{ ER_BLOBS_AND_NO_TERMINATED ,"42000", "S1009" },
|
||||
{ ER_CANT_REMOVE_ALL_FIELDS ,"42000", "" },
|
||||
{ ER_CANT_DROP_FIELD_OR_KEY ,"42000", "" },
|
||||
{ ER_BLOB_CANT_HAVE_DEFAULT ,"42000", "" },
|
||||
{ ER_WRONG_DB_NAME ,"42000", "" },
|
||||
{ ER_WRONG_TABLE_NAME ,"42000", "" },
|
||||
{ ER_TOO_BIG_SELECT ,"42000", "" },
|
||||
{ ER_UNKNOWN_PROCEDURE ,"42000", "" },
|
||||
{ ER_WRONG_PARAMCOUNT_TO_PROCEDURE ,"42000", "" },
|
||||
{ ER_UNKNOWN_TABLE ,"42S02", "" },
|
||||
{ ER_FIELD_SPECIFIED_TWICE ,"42000", "" },
|
||||
{ ER_UNSUPPORTED_EXTENSION ,"42000", "" },
|
||||
{ ER_TABLE_MUST_HAVE_COLUMNS ,"42000", "" },
|
||||
{ ER_UNKNOWN_CHARACTER_SET ,"42000", "" },
|
||||
{ ER_TOO_BIG_ROWSIZE ,"42000", "" },
|
||||
{ ER_WRONG_OUTER_JOIN ,"42000", "" },
|
||||
{ ER_NULL_COLUMN_IN_INDEX ,"42000", "" },
|
||||
{ ER_PASSWORD_ANONYMOUS_USER ,"42000", "" },
|
||||
{ ER_PASSWORD_NOT_ALLOWED ,"42000", "" },
|
||||
{ ER_PASSWORD_NO_MATCH ,"42000", "" },
|
||||
{ ER_WRONG_VALUE_COUNT_ON_ROW ,"21S01", "" },
|
||||
{ ER_INVALID_USE_OF_NULL ,"22004", "" },
|
||||
{ ER_REGEXP_ERROR ,"42000", "" },
|
||||
{ ER_MIX_OF_GROUP_FUNC_AND_FIELDS ,"42000", "" },
|
||||
{ ER_NONEXISTING_GRANT ,"42000", "" },
|
||||
{ ER_TABLEACCESS_DENIED_ERROR ,"42000", "" },
|
||||
{ ER_COLUMNACCESS_DENIED_ERROR ,"42000", "" },
|
||||
{ ER_ILLEGAL_GRANT_FOR_TABLE ,"42000", "" },
|
||||
{ ER_GRANT_WRONG_HOST_OR_USER ,"42000", "" },
|
||||
{ ER_NO_SUCH_TABLE ,"42S02", "" },
|
||||
{ ER_NONEXISTING_TABLE_GRANT ,"42000", "" },
|
||||
{ ER_NOT_ALLOWED_COMMAND ,"42000", "" },
|
||||
{ ER_SYNTAX_ERROR ,"42000", "" },
|
||||
{ ER_ABORTING_CONNECTION ,"08S01", "" },
|
||||
{ ER_NET_PACKET_TOO_LARGE ,"08S01", "" },
|
||||
{ ER_NET_READ_ERROR_FROM_PIPE ,"08S01", "" },
|
||||
{ ER_NET_FCNTL_ERROR ,"08S01", "" },
|
||||
{ ER_NET_PACKETS_OUT_OF_ORDER ,"08S01", "" },
|
||||
{ ER_NET_UNCOMPRESS_ERROR ,"08S01", "" },
|
||||
{ ER_NET_READ_ERROR ,"08S01", "" },
|
||||
{ ER_NET_READ_INTERRUPTED ,"08S01", "" },
|
||||
{ ER_NET_ERROR_ON_WRITE ,"08S01", "" },
|
||||
{ ER_NET_WRITE_INTERRUPTED ,"08S01", "" },
|
||||
{ ER_TOO_LONG_STRING ,"42000", "" },
|
||||
{ ER_TABLE_CANT_HANDLE_BLOB ,"42000", "" },
|
||||
{ ER_TABLE_CANT_HANDLE_AUTO_INCREMENT ,"42000", "" },
|
||||
{ ER_WRONG_COLUMN_NAME ,"42000", "" },
|
||||
{ ER_WRONG_KEY_COLUMN ,"42000", "" },
|
||||
{ ER_DUP_UNIQUE ,"23000", "" },
|
||||
{ ER_BLOB_KEY_WITHOUT_LENGTH ,"42000", "" },
|
||||
{ ER_PRIMARY_CANT_HAVE_NULL ,"42000", "" },
|
||||
{ ER_TOO_MANY_ROWS ,"42000", "" },
|
||||
{ ER_REQUIRES_PRIMARY_KEY ,"42000", "" },
|
||||
{ ER_KEY_DOES_NOT_EXITS ,"42000", "S1009" },
|
||||
{ ER_CHECK_NO_SUCH_TABLE ,"42000", "" },
|
||||
{ ER_CHECK_NOT_IMPLEMENTED ,"42000", "" },
|
||||
{ ER_CANT_DO_THIS_DURING_AN_TRANSACTION ,"25000", "" },
|
||||
{ ER_NEW_ABORTING_CONNECTION ,"08S01", "" },
|
||||
{ ER_MASTER_NET_READ ,"08S01", "" },
|
||||
{ ER_MASTER_NET_WRITE ,"08S01", "" },
|
||||
{ ER_TOO_MANY_USER_CONNECTIONS ,"42000", "" },
|
||||
{ ER_READ_ONLY_TRANSACTION ,"25000", "" },
|
||||
{ ER_NO_PERMISSION_TO_CREATE_USER ,"42000", "" },
|
||||
{ ER_LOCK_DEADLOCK ,"40001", "" },
|
||||
{ ER_NO_REFERENCED_ROW ,"23000", "" },
|
||||
{ ER_ROW_IS_REFERENCED ,"23000", "" },
|
||||
{ ER_CONNECT_TO_MASTER ,"08S01", "" },
|
||||
{ ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT ,"21000", "" },
|
||||
{ ER_USER_LIMIT_REACHED ,"42000", "" },
|
||||
{ ER_SPECIFIC_ACCESS_DENIED_ERROR ,"42000", "" },
|
||||
{ ER_NO_DEFAULT ,"42000", "" },
|
||||
{ ER_WRONG_VALUE_FOR_VAR ,"42000", "" },
|
||||
{ ER_WRONG_TYPE_FOR_VAR ,"42000", "" },
|
||||
{ ER_CANT_USE_OPTION_HERE ,"42000", "" },
|
||||
{ ER_NOT_SUPPORTED_YET ,"42000", "" },
|
||||
{ ER_WRONG_FK_DEF ,"42000", "" },
|
||||
{ ER_OPERAND_COLUMNS ,"21000", "" },
|
||||
{ ER_SUBQUERY_NO_1_ROW ,"21000", "" },
|
||||
{ ER_ILLEGAL_REFERENCE ,"42S22", "" },
|
||||
{ ER_DERIVED_MUST_HAVE_ALIAS ,"42000", "" },
|
||||
{ ER_SELECT_REDUCED ,"01000", "" },
|
||||
{ ER_TABLENAME_NOT_ALLOWED_HERE ,"42000", "" },
|
||||
{ ER_NOT_SUPPORTED_AUTH_MODE ,"08004", "" },
|
||||
{ ER_SPATIAL_CANT_HAVE_NULL ,"42000", "" },
|
||||
{ ER_COLLATION_CHARSET_MISMATCH ,"42000", "" },
|
||||
{ ER_WARN_TOO_FEW_RECORDS ,"01000", "" },
|
||||
{ ER_WARN_TOO_MANY_RECORDS ,"01000", "" },
|
||||
{ ER_WARN_NULL_TO_NOTNULL ,"22004", "" },
|
||||
{ ER_WARN_DATA_OUT_OF_RANGE ,"22003", "" },
|
||||
{ WARN_DATA_TRUNCATED ,"01000", "" },
|
||||
{ ER_WRONG_NAME_FOR_INDEX ,"42000", "" },
|
||||
{ ER_WRONG_NAME_FOR_CATALOG ,"42000", "" },
|
||||
{ ER_UNKNOWN_STORAGE_ENGINE ,"42000", "" },
|
||||
{ ER_TRUNCATED_WRONG_VALUE ,"22007", "" },
|
||||
{ ER_SP_NO_RECURSIVE_CREATE ,"2F003", "" },
|
||||
{ ER_SP_ALREADY_EXISTS ,"42000", "" },
|
||||
{ ER_SP_DOES_NOT_EXIST ,"42000", "" },
|
||||
{ ER_SP_LILABEL_MISMATCH ,"42000", "" },
|
||||
{ ER_SP_LABEL_REDEFINE ,"42000", "" },
|
||||
{ ER_SP_LABEL_MISMATCH ,"42000", "" },
|
||||
{ ER_SP_UNINIT_VAR ,"01000", "" },
|
||||
{ ER_SP_BADSELECT ,"0A000", "" },
|
||||
{ ER_SP_BADRETURN ,"42000", "" },
|
||||
{ ER_SP_BADSTATEMENT ,"0A000", "" },
|
||||
{ ER_UPDATE_LOG_DEPRECATED_IGNORED ,"42000", "" },
|
||||
{ ER_UPDATE_LOG_DEPRECATED_TRANSLATED ,"42000", "" },
|
||||
{ ER_QUERY_INTERRUPTED ,"70100", "" },
|
||||
{ ER_SP_WRONG_NO_OF_ARGS ,"42000", "" },
|
||||
{ ER_SP_COND_MISMATCH ,"42000", "" },
|
||||
{ ER_SP_NORETURN ,"42000", "" },
|
||||
{ ER_SP_NORETURNEND ,"2F005", "" },
|
||||
{ ER_SP_BAD_CURSOR_QUERY ,"42000", "" },
|
||||
{ ER_SP_BAD_CURSOR_SELECT ,"42000", "" },
|
||||
{ ER_SP_CURSOR_MISMATCH ,"42000", "" },
|
||||
{ ER_SP_CURSOR_ALREADY_OPEN ,"24000", "" },
|
||||
{ ER_SP_CURSOR_NOT_OPEN ,"24000", "" },
|
||||
{ ER_SP_UNDECLARED_VAR ,"42000", "" },
|
||||
{ ER_SP_FETCH_NO_DATA ,"02000", "" },
|
||||
{ ER_SP_DUP_PARAM ,"42000", "" },
|
||||
{ ER_SP_DUP_VAR ,"42000", "" },
|
||||
{ ER_SP_DUP_COND ,"42000", "" },
|
||||
{ ER_SP_DUP_CURS ,"42000", "" },
|
||||
{ ER_SP_SUBSELECT_NYI ,"0A000", "" },
|
||||
{ ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG ,"0A000", "" },
|
||||
{ ER_SP_VARCOND_AFTER_CURSHNDLR ,"42000", "" },
|
||||
{ ER_SP_CURSOR_AFTER_HANDLER ,"42000", "" },
|
||||
{ ER_SP_CASE_NOT_FOUND ,"20000", "" },
|
||||
{ ER_DIVISION_BY_ZERO ,"22012", "" },
|
||||
{ ER_ILLEGAL_VALUE_FOR_TYPE ,"22007", "" },
|
||||
{ ER_PROCACCESS_DENIED_ERROR ,"42000", "" },
|
||||
{ ER_XAER_NOTA ,"XAE04", "" },
|
||||
{ ER_XAER_INVAL ,"XAE05", "" },
|
||||
{ ER_XAER_RMFAIL ,"XAE07", "" },
|
||||
{ ER_XAER_OUTSIDE ,"XAE09", "" },
|
||||
{ ER_XAER_RMERR ,"XAE03", "" },
|
||||
{ ER_XA_RBROLLBACK ,"XA100", "" },
|
||||
{ ER_NONEXISTING_PROC_GRANT ,"42000", "" },
|
||||
{ ER_DATA_TOO_LONG ,"22001", "" },
|
||||
{ ER_SP_BAD_SQLSTATE ,"42000", "" },
|
||||
{ ER_CANT_CREATE_USER_WITH_GRANT ,"42000", "" },
|
||||
{ ER_SP_DUP_HANDLER ,"42000", "" },
|
||||
{ ER_SP_NOT_VAR_ARG ,"42000", "" },
|
||||
{ ER_SP_NO_RETSET ,"0A000", "" },
|
||||
{ ER_CANT_CREATE_GEOMETRY_OBJECT ,"22003", "" },
|
||||
{ ER_TOO_BIG_SCALE ,"42000", "S1009" },
|
||||
{ ER_TOO_BIG_PRECISION ,"42000", "S1009" },
|
||||
{ ER_M_BIGGER_THAN_D ,"42000", "S1009" },
|
||||
{ ER_TOO_LONG_BODY ,"42000", "S1009" },
|
||||
{ ER_TOO_BIG_DISPLAYWIDTH ,"42000", "S1009" },
|
||||
{ ER_XAER_DUPID ,"XAE08", "" },
|
||||
{ ER_DATETIME_FUNCTION_OVERFLOW ,"22008", "" },
|
||||
{ ER_ROW_IS_REFERENCED_2 ,"23000", "" },
|
||||
{ ER_NO_REFERENCED_ROW_2 ,"23000", "" },
|
||||
{ ER_SP_BAD_VAR_SHADOW ,"42000", "" },
|
||||
{ ER_SP_WRONG_NAME ,"42000", "" },
|
||||
{ ER_SP_NO_AGGREGATE ,"42000", "" },
|
||||
{ ER_MAX_PREPARED_STMT_COUNT_REACHED ,"42000", "" },
|
||||
{ ER_NON_GROUPING_FIELD_USED ,"42000", "" },
|
||||
{ ER_FOREIGN_DUPLICATE_KEY ,"23000", "S1009" },
|
||||
{ ER_CANT_CHANGE_TX_ISOLATION ,"25001", "" },
|
||||
{ ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT ,"42000", "" },
|
||||
{ ER_WRONG_PARAMETERS_TO_NATIVE_FCT ,"42000", "" },
|
||||
{ ER_WRONG_PARAMETERS_TO_STORED_FCT ,"42000", "" },
|
||||
{ ER_DUP_ENTRY_WITH_KEY_NAME ,"23000", "S1009" },
|
||||
{ ER_XA_RBTIMEOUT ,"XA106", "" },
|
||||
{ ER_XA_RBDEADLOCK ,"XA102", "" },
|
||||
{ ER_FUNC_INEXISTENT_NAME_COLLISION ,"42000", "" },
|
||||
28
dep/include/mysql/sslopt-case.h
Normal file
28
dep/include/mysql/sslopt-case.h
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
/* Copyright (C) 2000 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#ifdef HAVE_OPENSSL
|
||||
case OPT_SSL_KEY:
|
||||
case OPT_SSL_CERT:
|
||||
case OPT_SSL_CA:
|
||||
case OPT_SSL_CAPATH:
|
||||
case OPT_SSL_CIPHER:
|
||||
/*
|
||||
Enable use of SSL if we are using any ssl option
|
||||
One can disable SSL later by using --skip-ssl or --ssl=0
|
||||
*/
|
||||
opt_use_ssl= 1;
|
||||
break;
|
||||
#endif
|
||||
46
dep/include/mysql/sslopt-longopts.h
Normal file
46
dep/include/mysql/sslopt-longopts.h
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
/* Copyright (C) 2000 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#ifdef HAVE_OPENSSL
|
||||
|
||||
{"ssl", OPT_SSL_SSL,
|
||||
"Enable SSL for connection (automatically enabled with other flags)."
|
||||
"Disable with --skip-ssl.", &opt_use_ssl, &opt_use_ssl, 0, GET_BOOL,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"ssl-ca", OPT_SSL_CA,
|
||||
"CA file in PEM format (check OpenSSL docs, implies --ssl).",
|
||||
&opt_ssl_ca, &opt_ssl_ca, 0, GET_STR, REQUIRED_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
{"ssl-capath", OPT_SSL_CAPATH,
|
||||
"CA directory (check OpenSSL docs, implies --ssl).",
|
||||
&opt_ssl_capath, &opt_ssl_capath, 0, GET_STR, REQUIRED_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
{"ssl-cert", OPT_SSL_CERT, "X509 cert in PEM format (implies --ssl).",
|
||||
&opt_ssl_cert, &opt_ssl_cert, 0, GET_STR, REQUIRED_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
{"ssl-cipher", OPT_SSL_CIPHER, "SSL cipher to use (implies --ssl).",
|
||||
&opt_ssl_cipher, &opt_ssl_cipher, 0, GET_STR, REQUIRED_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
{"ssl-key", OPT_SSL_KEY, "X509 key in PEM format (implies --ssl).",
|
||||
&opt_ssl_key, &opt_ssl_key, 0, GET_STR, REQUIRED_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
#ifdef MYSQL_CLIENT
|
||||
{"ssl-verify-server-cert", OPT_SSL_VERIFY_SERVER_CERT,
|
||||
"Verify server's \"Common Name\" in its cert against hostname used "
|
||||
"when connecting. This option is disabled by default.",
|
||||
&opt_ssl_verify_server_cert, &opt_ssl_verify_server_cert,
|
||||
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
#endif /* HAVE_OPENSSL */
|
||||
31
dep/include/mysql/sslopt-vars.h
Normal file
31
dep/include/mysql/sslopt-vars.h
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
/* Copyright (C) 2000 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#ifdef HAVE_OPENSSL
|
||||
#ifdef SSL_VARS_NOT_STATIC
|
||||
#define SSL_STATIC
|
||||
#else
|
||||
#define SSL_STATIC static
|
||||
#endif
|
||||
SSL_STATIC my_bool opt_use_ssl = 0;
|
||||
SSL_STATIC char *opt_ssl_ca = 0;
|
||||
SSL_STATIC char *opt_ssl_capath = 0;
|
||||
SSL_STATIC char *opt_ssl_cert = 0;
|
||||
SSL_STATIC char *opt_ssl_cipher = 0;
|
||||
SSL_STATIC char *opt_ssl_key = 0;
|
||||
#ifdef MYSQL_CLIENT
|
||||
SSL_STATIC my_bool opt_ssl_verify_server_cert= 0;
|
||||
#endif
|
||||
#endif
|
||||
|
|
@ -26,7 +26,10 @@ typedef struct st_typelib { /* Different types saved here */
|
|||
unsigned int *type_lengths;
|
||||
} TYPELIB;
|
||||
|
||||
extern int find_type(char *x,TYPELIB *typelib,unsigned int full_name);
|
||||
extern my_ulonglong find_typeset(char *x, TYPELIB *typelib,int *error_position);
|
||||
extern int find_type_or_exit(const char *x, TYPELIB *typelib,
|
||||
const char *option);
|
||||
extern int find_type(char *x, const TYPELIB *typelib, unsigned int full_name);
|
||||
extern void make_type(char *to,unsigned int nr,TYPELIB *typelib);
|
||||
extern const char *get_type(TYPELIB *typelib,unsigned int nr);
|
||||
extern TYPELIB *copy_typelib(MEM_ROOT *root, TYPELIB *from);
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "10374"
|
||||
#define REVISION_NR "10375"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue