From f095ef5dc2bac8eebd87919f5106e30d4e21cabf Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 13 Apr 2002 12:08:12 +0300 Subject: allocated bigger blocks if it needed include/my_sys.h: memory root structures definition put in one file include/mysql.h: memory root structures definition put in one file --- include/my_alloc.h | 39 +++++++++++++++++++++++++++++++++++++++ include/my_sys.h | 21 +-------------------- include/mysql.h | 18 +----------------- 3 files changed, 41 insertions(+), 37 deletions(-) create mode 100644 include/my_alloc.h (limited to 'include') diff --git a/include/my_alloc.h b/include/my_alloc.h new file mode 100644 index 00000000000..0857c8886c5 --- /dev/null +++ b/include/my_alloc.h @@ -0,0 +1,39 @@ +/* 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; either version 2 of the License, or + (at your option) any later version. + + 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 */ + +/* + Data structures for mysys/my_alloc.c (root memory allocator) +*/ + +#ifndef ST_USED_MEM_DEFINED +#define ST_USED_MEM_DEFINED +typedef struct st_used_mem { /* struct for once_alloc (block) */ + struct st_used_mem *next; /* Next block in use */ + unsigned int left; /* memory left in block */ + unsigned int size; /* size of block */ +} USED_MEM; +typedef struct st_mem_root { + USED_MEM *free; /* blocks with free memory in it */ + 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 */ + unsigned int block_num; /* allocated blocks counter */ + + void (*error_handler)(void); +} MEM_ROOT; +#endif diff --git a/include/my_sys.h b/include/my_sys.h index 5867368198f..c4ab76a2ee0 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -464,26 +464,7 @@ typedef struct st_changeable_var { } CHANGEABLE_VAR; -/* structs for alloc_root */ - -#ifndef ST_USED_MEM_DEFINED -#define ST_USED_MEM_DEFINED -typedef struct st_used_mem { /* struct for once_alloc */ - struct st_used_mem *next; /* Next block in use */ - unsigned int left; /* memory left in block */ - unsigned int size; /* Size of block */ -} USED_MEM; - -typedef struct st_mem_root { - USED_MEM *free; - USED_MEM *used; - USED_MEM *pre_alloc; - unsigned int min_malloc; - unsigned int block_size; - - void (*error_handler)(void); -} MEM_ROOT; -#endif +#include "my_alloc.h" /* Prototypes for mysys and my_func functions */ diff --git a/include/mysql.h b/include/mysql.h index 7a16cbbe1d2..90deb791dd0 100644 --- a/include/mysql.h +++ b/include/mysql.h @@ -100,23 +100,7 @@ typedef struct st_mysql_rows { typedef MYSQL_ROWS *MYSQL_ROW_OFFSET; /* offset to current row */ -#ifndef ST_USED_MEM_DEFINED -#define ST_USED_MEM_DEFINED -typedef struct st_used_mem { /* struct for once_alloc */ - struct st_used_mem *next; /* Next block in use */ - unsigned int left; /* memory left in block */ - unsigned int size; /* size of block */ -} USED_MEM; -typedef struct st_mem_root { - USED_MEM *free; - USED_MEM *used; - USED_MEM *pre_alloc; - unsigned int min_malloc; - unsigned int block_size; - - void (*error_handler)(void); -} MEM_ROOT; -#endif +#include "my_alloc.h" typedef struct st_mysql_data { my_ulonglong rows; -- cgit v1.2.1 From 02ebecfc233414d64bdc0b855f5dff4602e7ac10 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 15 Apr 2002 16:00:05 +0300 Subject: query cache code can be excluded from server sql/mysqld.cc: fake query_cache_size parameter if query cache code excluded from server --- include/my_global.h | 8 -------- 1 file changed, 8 deletions(-) (limited to 'include') diff --git a/include/my_global.h b/include/my_global.h index 2b5c6915ad9..01910eb1342 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -1023,12 +1023,4 @@ typedef union { #define C_MODE_END #endif -/* - Now if query is taken off then tests with query cache fails - SANJA TODO: remove this when problem with mysql-test will be solved -*/ -#if defined(MYSQL_SERVER) && !defined(HAVE_QUERY_CACHE) -#define HAVE_QUERY_CACHE -#endif - #endif /* _global_h */ -- cgit v1.2.1 From 667da1396b5a20ad7b4ba94136e47e64b6368daa Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 16 Apr 2002 16:29:14 +0300 Subject: Fixed pthread_cond_timedwait() for HPUX and DCE threads Cleanup of LIBWRAP handling Docs/manual.texi: Changelog include/my_pthread.h: Fixed pthread_cond_timedwait() for HPUX and DCE threads mysys/my_pthread.c: Fixed pthread_cond_timedwait() for HPUX and DCE threads sql/item_func.cc: Fixed the GET_LOCK() works with HPUX and DCE threads sql/mysqld.cc: Cleanup of LIBWRAP handling sql/sql_parse.cc: Safety fix --- include/my_pthread.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/my_pthread.h b/include/my_pthread.h index cd72bcced83..30e9ea95e02 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -349,6 +349,13 @@ extern void my_pthread_attr_setprio(pthread_attr_t *attr, int priority); #undef HAVE_GETHOSTBYADDR_R /* No definition */ #endif +#if defined(HAVE_DEC_THREADS) +extern int my_pthread_cond_timedwait(pthread_cond_t *cond, + pthread_mutex_t *mutex, + struct timespec *abstime); +#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)) -- cgit v1.2.1 From b83e6fe1ad970c4b3192e6fdc834642cd5cde80c Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 16 Apr 2002 21:19:00 +0300 Subject: Small fix for HP-UX 10.20 with DCE threads Also --with-libwrap is tested on Linux just fine. configure.in: Small fix for HP-UX 10.20 with DCE threads include/my_pthread.h: Small fix for HP-UX 10.20 with DCE threads mysys/my_pthread.c: Small fix for HP-UX 10.20 with DCE threads --- include/my_pthread.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/my_pthread.h b/include/my_pthread.h index 30e9ea95e02..4c90882e76b 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -349,7 +349,7 @@ extern void my_pthread_attr_setprio(pthread_attr_t *attr, int priority); #undef HAVE_GETHOSTBYADDR_R /* No definition */ #endif -#if defined(HAVE_DEC_THREADS) +#if defined(HAVE_BROKEN_PTHREAD_COND_TIMEDWAIT) extern int my_pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, struct timespec *abstime); -- cgit v1.2.1 From 2ebd90b830b67c1dc2625b74398679ea01f9a3b8 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 20 Apr 2002 00:00:29 +0300 Subject: my_alloc.h included in installation --- include/Makefile.am | 2 +- include/my_sys.h | 2 +- include/mysql.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/Makefile.am b/include/Makefile.am index b943e8d76e6..0745029a41d 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -19,7 +19,7 @@ BUILT_SOURCES = mysql_version.h m_ctype.h my_config.h pkginclude_HEADERS = dbug.h m_string.h my_sys.h my_list.h \ mysql.h mysql_com.h mysqld_error.h mysql_embed.h \ my_pthread.h my_no_pthread.h raid.h errmsg.h \ - my_global.h my_net.h \ + my_global.h my_net.h my_alloc.h\ sslopt-case.h sslopt-longopts.h sslopt-usage.h \ sslopt-vars.h $(BUILT_SOURCES) noinst_HEADERS = config-win.h \ diff --git a/include/my_sys.h b/include/my_sys.h index c4ab76a2ee0..175f7a86789 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -464,7 +464,7 @@ typedef struct st_changeable_var { } CHANGEABLE_VAR; -#include "my_alloc.h" +#include /* Prototypes for mysys and my_func functions */ diff --git a/include/mysql.h b/include/mysql.h index 90deb791dd0..5bcdca636c0 100644 --- a/include/mysql.h +++ b/include/mysql.h @@ -100,7 +100,7 @@ typedef struct st_mysql_rows { typedef MYSQL_ROWS *MYSQL_ROW_OFFSET; /* offset to current row */ -#include "my_alloc.h" +#include typedef struct st_mysql_data { my_ulonglong rows; -- cgit v1.2.1 From 7abf67c5e966f6409b13774ef9297ffc7d5ae17f Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 28 Apr 2002 21:22:37 +0000 Subject: init_dynamic_array MyODBC compatibility fix --- include/my_sys.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/my_sys.h b/include/my_sys.h index 175f7a86789..3ff35763bce 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -651,9 +651,9 @@ 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 init_dynamic_array(A,B,C,D) _init_dynamic_array(A,B,C,D CALLER_INFO) -#define init_dynamic_array_ci(A,B,C,D) _init_dynamic_array(A,B,C,D ORIG_CALLER_INFO) -extern my_bool _init_dynamic_array(DYNAMIC_ARRAY *array,uint element_size, +#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) +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); -- cgit v1.2.1 From 23bf3689667890dd8da518b6478f10090a5adaf4 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 2 May 2002 18:04:21 +0300 Subject: Fixed problems with DECIMAL() type on overflow. Docs/manual.texi: Changlog configure.in: Change to version 3.23.51 Fix for OSF1 include/mysqld_error.h: Added copyright message isam/pack_isam.c: Added copyright message mysql-test/r/type_decimal.result: New test results mysql-test/t/type_decimal.test: New test results strings/Makefile.am: Added mising file --- include/mysqld_error.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/mysqld_error.h b/include/mysqld_error.h index 81e0dd1d06d..f0fb11c1832 100644 --- a/include/mysqld_error.h +++ b/include/mysqld_error.h @@ -1,4 +1,20 @@ -/* Definefile for errormessagenumbers */ +/* 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; either version 2 of the License, or + (at your option) any later version. + + 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 */ + +/* Definefile for error messagenumbers */ #define ER_HASHCHK 1000 #define ER_NISAMCHK 1001 -- cgit v1.2.1 From 7c510b93c64773b609b97f04ae2d19c84b88045b Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 3 May 2002 12:31:25 +0200 Subject: Reworked the RPM spec file and added several fixes to make the build scripts work again. BUILD/compile-pentium-max: Added "--with-embedded-server" to have the libmysqld files included in the source distribution when using "make dist" Build-tools/Do-linux-build: Only use the "--with-other-libc" parameter, if another libc actually exists, since this will also force static linking, which does not work together with OpenSSL Makefile.am: Removed hard-coded file name for TAR, let configure do this instead (many systems actually ship GNU tar installed as "tar" instead of "gtar") configure.in: Added check for GNU tar named "gtar", fall back to "tar" if "gtar" was not found (and hope, that it's a GNU tar as well - this should probably be checked more properly) include/Makefile.am: Added "my_semaphore.h" to pkginclude_HEADERS since it was missing from the distribution strings/Makefile.am: Added "longlong2str.c" since it was missing from the distribution support-files/mysql.server.sh: Added LSB-compatible header info to make init script more portable support-files/mysql.spec.sh: - Use more RPM macros (e.g. infodir, mandir) to make the spec file more portable - reorganized the installation of documentation files: let RPM take care of this - reorganized the file list: actually install man pages along with the binaries of the respective subpackage - don't include libmysqld.a in the devel subpackage as well, if we have a special "embedded" subpackage - reworked the package descriptions --- include/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/Makefile.am b/include/Makefile.am index 0745029a41d..1de98a07ef0 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -18,7 +18,7 @@ BUILT_SOURCES = mysql_version.h m_ctype.h my_config.h pkginclude_HEADERS = dbug.h m_string.h my_sys.h my_list.h \ mysql.h mysql_com.h mysqld_error.h mysql_embed.h \ - my_pthread.h my_no_pthread.h raid.h errmsg.h \ + my_semaphore.h my_pthread.h my_no_pthread.h raid.h errmsg.h \ my_global.h my_net.h my_alloc.h\ sslopt-case.h sslopt-longopts.h sslopt-usage.h \ sslopt-vars.h $(BUILT_SOURCES) -- cgit v1.2.1 From 9f8a75a168774f9ada4b2b68fc494ac514d84388 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 7 May 2002 20:35:06 +0300 Subject: Fixed some bugs in my_getopt.c, added functionality for new GET_* types, migrated mysqld.cc to use my_getopt. include/my_getopt.h: Added missing types; GET_INT, GET_UINT, GET_ULONG, GET_ULL mysys/my_getopt.c: - Fixed a bug in processing short options; variable value was set wrongly after processing it in get_one_option(), when it needed to be done before it. - Fixed a bug in setting variable values; if type was OPT_ARG, a call without argument destroyed the default value - Added functionality for new GET_* types. sql/mysqld.cc: Changed mysqld.cc to use my_getopt. --- include/my_getopt.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/my_getopt.h b/include/my_getopt.h index b3b3ee2f785..085dfaaac73 100644 --- a/include/my_getopt.h +++ b/include/my_getopt.h @@ -16,7 +16,8 @@ C_MODE_START -enum get_opt_var_type { GET_NO_ARG, GET_BOOL, GET_LONG, GET_LL, GET_STR }; +enum get_opt_var_type { GET_NO_ARG, GET_BOOL, GET_INT, GET_UINT, GET_LONG, + GET_ULONG, GET_LL, GET_ULL, GET_STR }; enum get_opt_arg_type { NO_ARG, OPT_ARG, REQUIRED_ARG }; struct my_option -- cgit v1.2.1 From 716ed1168f280cd75df310ca80d85b58339b10ef Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 12 May 2002 23:01:45 -0300 Subject: Sergei's MyODBC fix --- include/my_sys.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/my_sys.h b/include/my_sys.h index ffb3ea83b49..daebeb1cf42 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -549,9 +549,9 @@ 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 init_dynamic_array(A,B,C,D) _init_dynamic_array(A,B,C,D CALLER_INFO) -#define init_dynamic_array_ci(A,B,C,D) _init_dynamic_array(A,B,C,D ORIG_CALLER_INFO) -extern my_bool _init_dynamic_array(DYNAMIC_ARRAY *array,uint element_size, +#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) +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); -- cgit v1.2.1 From 21c1e5be444f61c96351ff7d27e955356a65c7d6 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 14 May 2002 21:41:55 +0300 Subject: - Added new type GET_STRALC to my_getopt. - Fixed some bugs, wrongly freed pointers, in some clients. - Removed unneccessary code. - Fixed some other minor bugs and added some options into variables category, which had accidently been left out earlier. client/mysql.cc: Fixed some wrong freed pointers. Removed unneccessary code. Changed some types from GET_STR to GET_STRALC. client/mysqladmin.c: Fixed some wrong freed pointers. Removed unneccessary code. Changed some types from GET_STR to GET_STRALC. client/mysqlcheck.c: Fixed some wrong freed pointers. Removed unneccessary code. Changed some types from GET_STR to GET_STRALC. client/mysqldump.c: Fixed some wrong freed pointers. Removed unneccessary code. Changed some types from GET_STR to GET_STRALC. client/mysqlimport.c: Removed unneccessary code. Fixed a bug in option --ignore-lines client/mysqlshow.c: Removed unneccessary code. include/my_getopt.h: Added new type, GET_STRALC. The name stands for GET STRING ALLOC, which means that the struct member value and u_max_value are strings that must be alloced and freed when used. The normal GET_STR works similarly otherwise, except that it's arguments are just pointers to strings, not alloced ones. mysys/my_getopt.c: Added support for GET_STRALC --- include/my_getopt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/my_getopt.h b/include/my_getopt.h index 085dfaaac73..d3644daff36 100644 --- a/include/my_getopt.h +++ b/include/my_getopt.h @@ -17,7 +17,7 @@ C_MODE_START enum get_opt_var_type { GET_NO_ARG, GET_BOOL, GET_INT, GET_UINT, GET_LONG, - GET_ULONG, GET_LL, GET_ULL, GET_STR }; + GET_ULONG, GET_LL, GET_ULL, GET_STR, GET_STRALC }; enum get_opt_arg_type { NO_ARG, OPT_ARG, REQUIRED_ARG }; struct my_option -- cgit v1.2.1 From c5bfcc9d7f3c77def9a8df65da11a6b55c2edea5 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 15 May 2002 13:50:38 +0300 Subject: Features made for Schlund plus several bug fixes. Read a manual for more detail --- include/mysql_com.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/mysql_com.h b/include/mysql_com.h index 0e54c0e992b..c30eb30f779 100644 --- a/include/mysql_com.h +++ b/include/mysql_com.h @@ -81,6 +81,7 @@ enum enum_server_command {COM_SLEEP,COM_QUIT,COM_INIT_DB,COM_QUERY, #define REFRESH_QUERY_CACHE 65536 #define REFRESH_QUERY_CACHE_FREE 0x20000L /* pack query cache */ #define REFRESH_DES_KEY_FILE 0x40000L +#define REFRESH_USER_RESOURCES 0x80000L #define CLIENT_LONG_PASSWORD 1 /* new more secure passwords */ #define CLIENT_FOUND_ROWS 2 /* Found instead of affected rows */ -- cgit v1.2.1 From 89617526c84c6d3e9fc2854ac06e8c0b1a543437 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 15 May 2002 20:24:00 +0300 Subject: Changed GET_STRALC to GET_STR_ALLOC mysys/my_getopt.c: Changed GET_STRALC to GET_STR_ALLOC Added error checking for my_strdup() --- include/my_getopt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/my_getopt.h b/include/my_getopt.h index d3644daff36..ae12e921aa0 100644 --- a/include/my_getopt.h +++ b/include/my_getopt.h @@ -17,7 +17,7 @@ C_MODE_START enum get_opt_var_type { GET_NO_ARG, GET_BOOL, GET_INT, GET_UINT, GET_LONG, - GET_ULONG, GET_LL, GET_ULL, GET_STR, GET_STRALC }; + GET_ULONG, GET_LL, GET_ULL, GET_STR, GET_STR_ALLOC }; enum get_opt_arg_type { NO_ARG, OPT_ARG, REQUIRED_ARG }; struct my_option -- cgit v1.2.1 From d2b95cd7ab5b3ed450af572e9c77cd11d3c420ba Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 16 May 2002 16:32:51 +0300 Subject: New my_gethostbyname_r() handling Changed some status variable names Fix bug in GRANT ... PASSWORD string Docs/manual.texi: Update of variable names include/my_net.h: New my_gethostbyname_r() handling include/my_pthread.h: New my_gethostbyname_r() handling libmysql/Makefile.shared: New my_gethostbyname_r() handling libmysql/libmysql.c: New my_gethostbyname_r() handling mysys/Makefile.am: New my_gethostbyname_r() handling mysys/my_pthread.c: New my_gethostbyname_r() handling mysys/my_thr_init.c: New my_gethostbyname_r() handling sql/hostname.cc: New my_gethostbyname_r() handling sql/mini_client.cc: New my_gethostbyname_r() handling sql/mysqld.cc: change some status variable names sql/sql_acl.cc: Fix bug in GRANT ... PASSWORD string --- include/my_net.h | 36 ++++++++++++++++++++++++++++++++++++ include/my_pthread.h | 25 ------------------------- 2 files changed, 36 insertions(+), 25 deletions(-) (limited to 'include') diff --git a/include/my_net.h b/include/my_net.h index 6a8e98d685c..e3db765cff7 100644 --- a/include/my_net.h +++ b/include/my_net.h @@ -36,6 +36,42 @@ extern "C" { void my_inet_ntoa(struct in_addr in, char *buf); +/* + Handling of gethostbyname_r() +*/ + +#if defined(HAVE_PTHREAD_ATTR_CREATE) || defined(_AIX) || defined(HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE) +#if !defined(HPUX) +struct hostent; +#endif /* HPUX */ +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) +#define GETHOSTBYNAME_BUFF_SIZE 2048 +#else +#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() +#elif !defined(HAVE_GETHOSTBYNAME_R) +#define GETHOSTBYNAME_BUFF_SIZE 2048 +struct hostent *my_gethostbyname_r(const char *name, + struct hostent *result, char *buffer, + int buflen, int *h_errnop); +void my_gethostbyname_r_free(); +#else +#define GETHOSTBYNAME_BUFF_SIZE 2048 +#define my_gethostbyname_r(A,B,C,D,E) gethostbyname_r((A),(B),(C),(D),(E)) +#define my_gethostbyname_r_free() +#endif /* defined(HAVE_PTHREAD_ATTR_CREATE) || defined(_AIX) || defined(HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE) */ + #ifdef __cplusplus } #endif diff --git a/include/my_pthread.h b/include/my_pthread.h index 4c90882e76b..24e73707288 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -426,31 +426,6 @@ struct tm *localtime_r(const time_t *clock, struct tm *res); #define HAVE_PTHREAD_KILL #endif -#if defined(HAVE_PTHREAD_ATTR_CREATE) || defined(_AIX) || defined(HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE) -#if !defined(HPUX) -struct hostent; -#endif /* HPUX */ -struct hostent *my_gethostbyname_r(const char *name, - struct hostent *result, char *buffer, - int buflen, int *h_errnop); -#if defined(HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE) -#define GETHOSTBYNAME_BUFF_SIZE 2048 -#else -#define GETHOSTBYNAME_BUFF_SIZE sizeof(struct hostent_data) -#endif /* defined(HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE) */ - -#else -#ifdef 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); -#else -#define GETHOSTBYNAME_BUFF_SIZE 2048 -#define my_gethostbyname_r(A,B,C,D,E) gethostbyname_r((A),(B),(C),(D),(E)) -#endif /* HAVE_GETHOSTBYNAME_R_RETURN_INT */ -#endif /* defined(HAVE_PTHREAD_ATTR_CREATE) || defined(_AIX) || defined(HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE) */ - #endif /* defined(__WIN__) */ /* safe_mutex adds checking to mutex for easier debugging */ -- cgit v1.2.1 From a34e76c66abea6c4971cbdfe3b13cda272a81ca2 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 21 May 2002 20:35:58 +0300 Subject: Fixes for gcc 3.1 Fixed bug in new code for regexp LIKE NULL BUILD/SETUP.sh: Fixes for gcc 3.1 BUILD/compile-solaris-sparc-debug: Fixes for gcc 3.1 BUILD/compile-solaris-sparc-purify: Fixes for gcc 3.1 BUILD/compile-solaris-sparc: Fixes for gcc 3.1 Docs/manual.texi: Fixed typo include/violite.h: Fixes for gcc 3.1 mysql-test/r/func_concat.result: Updated test results sql/item_cmpfunc.cc: Fixed bug in new code for regexp LIKE NULL --- include/violite.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'include') diff --git a/include/violite.h b/include/violite.h index 0f36e493b57..40da31ee1b6 100644 --- a/include/violite.h +++ b/include/violite.h @@ -153,27 +153,27 @@ my_bool vio_ssl_peer_addr(Vio* vio, char *buf); void vio_ssl_in_addr(Vio *vio, struct in_addr *in); /* Single copy for server */ +enum vio_ssl_acceptorfd_state +{ + state_connect = 1, + state_accept = 2 +}; + struct st_VioSSLAcceptorFd { SSL_CTX* ssl_context_; SSL_METHOD* ssl_method_; struct st_VioSSLAcceptorFd* session_id_context_; - enum { - state_connect = 1, - state_accept = 2 - }; - - /* function pointers which are only once for SSL server - Vio*(*sslaccept)(struct st_VioSSLAcceptorFd*,Vio*); */ }; /* One copy for client */ struct st_VioSSLConnectorFd { SSL_CTX* ssl_context_; - SSL_METHOD* ssl_method_; /* function pointers which are only once for SSL client */ + SSL_METHOD* ssl_method_; }; + void sslaccept(struct st_VioSSLAcceptorFd*, Vio*, long timeout); void sslconnect(struct st_VioSSLConnectorFd*, Vio*, long timeout); -- cgit v1.2.1 From 6a97c5912f6d28dd0aee73fd62f33a1a0511edc7 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 22 May 2002 18:16:54 +0300 Subject: Removed GNU getopt from MySQL distribution (replaced by my_getopt) BitKeeper/deleted/.del-getopt.c~a2dce359c5c071b1: Delete: mysys/getopt.c BitKeeper/deleted/.del-getopt1.c~e441714775f50c8f: Delete: mysys/getopt1.c --- include/Makefile.am | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include') diff --git a/include/Makefile.am b/include/Makefile.am index 1de98a07ef0..24d81739af3 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -28,8 +28,7 @@ noinst_HEADERS = config-win.h \ my_dir.h mysys_err.h my_base.h \ my_nosys.h my_alarm.h queues.h \ my_tree.h hash.h thr_alarm.h thr_lock.h \ - getopt.h my_getopt.h t_ctype.h violite.h md5.h \ - mysql_version.h.in + t_ctype.h violite.h md5.h mysql_version.h.in # mysql_version.h are generated SUPERCLEANFILES = mysql_version.h my_config.h -- cgit v1.2.1 From e3b5fd8696a36d06bd9993edd16ca7d51955bf15 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 27 May 2002 09:29:26 +0300 Subject: Portability fix for OSF1 BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted --- include/my_net.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'include') diff --git a/include/my_net.h b/include/my_net.h index e3db765cff7..e06a1142418 100644 --- a/include/my_net.h +++ b/include/my_net.h @@ -40,19 +40,22 @@ void my_inet_ntoa(struct in_addr in, char *buf); Handling of gethostbyname_r() */ -#if defined(HAVE_PTHREAD_ATTR_CREATE) || defined(_AIX) || defined(HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE) #if !defined(HPUX) struct hostent; #endif /* HPUX */ +#if !defined(HAVE_GETHOSTBYNAME_R) +struct hostent *my_gethostbyname_r(const char *name, + struct hostent *result, char *buffer, + int buflen, int *h_errnop); +void my_gethostbyname_r_free(); +#elif defined(HAVE_PTHREAD_ATTR_CREATE) || defined(_AIX) || defined(HAVE_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) -#define GETHOSTBYNAME_BUFF_SIZE 2048 -#else +#if !defined(HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE) #define GETHOSTBYNAME_BUFF_SIZE sizeof(struct hostent_data) -#endif /* defined(HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE) */ +#endif /* !defined(HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE) */ #elif defined(HAVE_GETHOSTBYNAME_R_RETURN_INT) #define GETHOSTBYNAME_BUFF_SIZE sizeof(struct hostent_data) @@ -60,17 +63,14 @@ struct hostent *my_gethostbyname_r(const char *name, struct hostent *result, char *buffer, int buflen, int *h_errnop); #define my_gethostbyname_r_free() -#elif !defined(HAVE_GETHOSTBYNAME_R) -#define GETHOSTBYNAME_BUFF_SIZE 2048 -struct hostent *my_gethostbyname_r(const char *name, - struct hostent *result, char *buffer, - int buflen, int *h_errnop); -void my_gethostbyname_r_free(); #else -#define GETHOSTBYNAME_BUFF_SIZE 2048 #define my_gethostbyname_r(A,B,C,D,E) gethostbyname_r((A),(B),(C),(D),(E)) #define my_gethostbyname_r_free() -#endif /* defined(HAVE_PTHREAD_ATTR_CREATE) || defined(_AIX) || defined(HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE) */ +#endif /* !defined(HAVE_GETHOSTBYNAME_R) */ + +#ifndef GETHOSTBYNAME_BUFF_SIZE +#define GETHOSTBYNAME_BUFF_SIZE 2048 +#endif #ifdef __cplusplus } -- cgit v1.2.1 From 38fad3332171b912e5342359b1dccb75ace7fbde Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 27 May 2002 10:02:00 +0300 Subject: Split raid C function to separate file to make things more portable. Fixed some portability things in my_gethostbyname_r Portability fix for type_decimal.test BUILD/SETUP.sh: Fixes for gcc 3.1 extra/resolveip.c: Cleanup include/my_net.h: Portability fix for SCO mysql-test/t/type_decimal.test: Portability fix for FreeBSD mysys/Makefile.am: Portability fix for OSF1 mysys/raid.cc: Portability fix for OSF1 --- include/my_net.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/my_net.h b/include/my_net.h index e06a1142418..6a6e2aecc27 100644 --- a/include/my_net.h +++ b/include/my_net.h @@ -72,6 +72,12 @@ struct hostent *my_gethostbyname_r(const char *name, #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 + #ifdef __cplusplus } #endif -- cgit v1.2.1 From 940a8a4020442f0d19d0137a8a847429af3f8a05 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 27 May 2002 23:21:49 +0300 Subject: Renamed stripp_sp -> strip_sp Remove end space from ENUM and SET strings mysql-test/t/type_enum.test: Test of end space in enum's Docs/manual.texi: Changelog include/my_sys.h: Renamed stripp_sp -> strip_sp mysql-test/r/type_enum.result: Test of end space in enums mysys/Makefile.am: change stripp_sp -> strip_sp mysys/mf_strip.c: change stripp_sp -> strip_sp sql/sql_db.cc: change stripp_sp -> strip_sp sql/sql_parse.cc: change stripp_sp -> strip_sp Remove end space from ENUM and SET strings --- include/my_sys.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/my_sys.h b/include/my_sys.h index daebeb1cf42..8cdc78025f3 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -494,7 +494,7 @@ extern int my_sortncmp(const char *s,uint s_len, const char *t,uint t_len); extern WF_PACK *wf_comp(my_string str); extern int wf_test(struct wild_file_pack *wf_pack,const char *name); extern void wf_end(struct wild_file_pack *buffer); -extern size_s stripp_sp(my_string str); +extern size_s strip_sp(my_string str); extern void get_date(my_string to,int timeflag,time_t use_time); extern void soundex(my_string out_pntr, my_string in_pntr,pbool remove_garbage); extern int init_record_cache(RECORD_CACHE *info,uint cachesize,File file, -- cgit v1.2.1 From a90b2f309eed146670390b7d4a31a20192685ac7 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 29 May 2002 15:07:30 +0300 Subject: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. Changed some exit code names and corresponding numbers. Fixed a bug in mysqld.cc, in replication related options. Added a global flag in my_getopt, which can be set by any program that is using my_getopt, which tells whether the client should print the error message itself, or whether my_getopt should do it. The default is that my_getopt will print the error messages. client/mysql.cc: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. client/mysqladmin.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. client/mysqlbinlog.cc: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. client/mysqlcheck.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. client/mysqldump.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. client/mysqlimport.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. client/mysqlmanager-pwgen.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. client/mysqlmanagerc.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. client/mysqlshow.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. client/mysqltest.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. client/thread_test.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. extra/my_print_defaults.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. extra/mysql_install.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. extra/perror.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. extra/resolve_stack_dump.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. extra/resolveip.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. include/my_getopt.h: Added global (flag) variable which tells my_getopt whether to print errors or just silently exit with proper error code. include/mysys_err.h: Changed exit code names and corresponding numbers. isam/isamchk.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. isam/pack_isam.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. myisam/ft_dump.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. myisam/ft_eval.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. myisam/ft_test1.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. myisam/mi_test1.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. myisam/myisamchk.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. myisam/myisampack.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. mysys/my_getopt.c: Changed exit code names and corresponding numbers. Added a flag for checking whether my_getopt should print the error message, or whether it should be printed by the client itself. sql/gen_lex_hash.cc: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. sql/mysqld.cc: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. Fixed a bug when compiling in non-debug mode, some replication related options were not enabled while they should be. This made 'make test' to fail in rpl000010 when --with-debug was not used. tools/mysqlmanager.c: Added useful exit error code for programs using my_getopt in case of an error in option handling. This can sometimes be useful in scripts. --- include/my_getopt.h | 1 + include/mysys_err.h | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) (limited to 'include') diff --git a/include/my_getopt.h b/include/my_getopt.h index ae12e921aa0..3b50fbe2ded 100644 --- a/include/my_getopt.h +++ b/include/my_getopt.h @@ -39,6 +39,7 @@ struct my_option }; extern char *disabled_my_option; +extern my_bool my_getopt_print_errors; extern int handle_options (int *argc, char ***argv, const struct my_option *longopts, diff --git a/include/mysys_err.h b/include/mysys_err.h index b3d058aff3e..a86765c74fd 100644 --- a/include/mysys_err.h +++ b/include/mysys_err.h @@ -54,7 +54,23 @@ extern const char * NEAR globerrs[]; /* my_error_messages is here */ #define EE_CANT_SYMLINK 25 #define EE_REALPATH 26 + /* exit codes for all MySQL programs */ + +#define EXIT_UNSPECIFIED_ERROR 1 +#define EXIT_UNKNOWN_OPTION 2 +#define EXIT_AMBIGUOUS_OPTION 3 +#define EXIT_NO_ARGUMENT_ALLOWED 4 +#define EXIT_ARGUMENT_REQUIRED 5 +#define EXIT_VAR_PREFIX_NOT_UNIQUE 6 +#define EXIT_UNKNOWN_VARIABLE 7 +#define EXIT_OUT_OF_MEMORY 8 +#define EXIT_UNKNOWN_SUFFIX 9 +#define EXIT_NO_PTR_TO_VARIABLE 10 +#define EXIT_CANNOT_CONNECT_TO_SERVICE 11 + + #ifdef __cplusplus } #endif #endif + -- cgit v1.2.1 From 940ab3e0317ff8ebe0fc791ab83a1718481eabd0 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 30 May 2002 15:49:32 +0300 Subject: A small fix for HP-UX when used --with-debug --- include/my_pthread.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/my_pthread.h b/include/my_pthread.h index 24e73707288..bcad292ecc9 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -349,7 +349,7 @@ extern void my_pthread_attr_setprio(pthread_attr_t *attr, int priority); #undef HAVE_GETHOSTBYADDR_R /* No definition */ #endif -#if defined(HAVE_BROKEN_PTHREAD_COND_TIMEDWAIT) +#if defined(HAVE_BROKEN_PTHREAD_COND_TIMEDWAIT) && !defined(SAFE_MUTEX) extern int my_pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, struct timespec *abstime); -- cgit v1.2.1 From 0ceaf6d2c28f4f639a0ba5c329964e4dbe71cb7f Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 31 May 2002 15:22:38 +0300 Subject: Portability fixes for SCO and HPUX Change TRUNCATE(number) to truncate towards zero for negative numbers Fix NULL handling for DESCRIBE table_name Docs/manual.texi: Update of TRUNCATE() information configure.in: Fix for HPUX extra/resolveip.c: Fix for SCO include/my_net.h: Fix for HPUX libmysql/libmysql.c: Removed warning on HPUX 10.20 mysql-test/r/func_math.result: Test of new TRUNCATE handling mysql-test/t/func_math.test: Test of new TRUNCATE handling mysys/my_gethostbyname.c: Portability fix sql/item_func.cc: Change TRUNCATE(number) to truncate towards zero for negative numbers sql/sql_show.cc: Fix NULL handling for DESCRIBE table_name --- include/my_net.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/my_net.h b/include/my_net.h index 6a6e2aecc27..a4910d8af1d 100644 --- a/include/my_net.h +++ b/include/my_net.h @@ -53,7 +53,7 @@ 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) +#if !defined(HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE) && !defined(HPUX) #define GETHOSTBYNAME_BUFF_SIZE sizeof(struct hostent_data) #endif /* !defined(HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE) */ -- cgit v1.2.1 From bdb74237346fefff8829d9f4d5f61ec48b35a8f3 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 2 Jun 2002 21:22:20 +0300 Subject: Extension of .frm file (not yet ready for push) include/m_ctype.h: cleanup include/mysqld_error.h: New error messages sql/field.cc: Extension of .frm file sql/field.h: Extension of .frm file sql/handler.h: cleanup Added CHARSET_INFO to ha_create_information sql/item_strfunc.cc: cleanup sql/lex.h: Update for FOREIGN KEYS sql/mysql_priv.h: Extension of .frm file sql/slave.cc: Fixed bug in wait_for_relay_log_space() sql/spatial.h: Cleanup sql/sql_class.h: Cleanup sql/sql_lex.h: Extension of .frm file sql/sql_parse.cc: Extension of .frm file sql/sql_show.cc: Extension of .frm file sql/sql_table.cc: Extension of .frm file sql/sql_yacc.yy: Extension of .frm file sql/table.cc: Extension of .frm file sql/unireg.cc: Extension of .frm file --- include/m_ctype.h | 80 ++++++++++++++++++++++++++------------------------ include/mysqld_error.h | 4 ++- 2 files changed, 44 insertions(+), 40 deletions(-) (limited to 'include') diff --git a/include/m_ctype.h b/include/m_ctype.h index 6e116b95428..d8593e20fd1 100644 --- a/include/m_ctype.h +++ b/include/m_ctype.h @@ -51,52 +51,54 @@ typedef struct my_uni_idx_st { typedef struct charset_info_st { - uint number; - const char *name; - uchar *ctype; - uchar *to_lower; - uchar *to_upper; - uchar *sort_order; - uint16 *tab_to_uni; - MY_UNI_IDX *tab_from_uni; + uint number; + const char *name; + uchar *ctype; + uchar *to_lower; + uchar *to_upper; + uchar *sort_order; + uint16 *tab_to_uni; + MY_UNI_IDX *tab_from_uni; - /* Collation routines */ - uint strxfrm_multiply; - int (*strnncoll)(struct charset_info_st *, - const uchar *, uint, const uchar *, uint); - int (*strnxfrm)(struct charset_info_st *, - uchar *, uint, const uchar *, uint); - my_bool (*like_range)(struct charset_info_st *, - const char *, uint, pchar, uint, - char *, char *, uint *, uint *); + /* Collation routines */ + uint strxfrm_multiply; + int (*strnncoll)(struct charset_info_st *, + const uchar *, uint, const uchar *, uint); + int (*strnxfrm)(struct charset_info_st *, + uchar *, uint, const uchar *, uint); + my_bool (*like_range)(struct charset_info_st *, + const char *, uint, pchar, uint, + char *, char *, uint *, uint *); - /* Multibyte routines */ - uint mbmaxlen; - int (*ismbchar)(struct charset_info_st *, const char *, const char *); - my_bool (*ismbhead)(struct charset_info_st *, uint); - int (*mbcharlen)(struct charset_info_st *, uint); + /* Multibyte routines */ + uint mbmaxlen; + int (*ismbchar)(struct charset_info_st *, const char *, const char *); + my_bool (*ismbhead)(struct charset_info_st *, uint); + int (*mbcharlen)(struct charset_info_st *, uint); - /* 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); + /* 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 convertion */ - void (*caseup_str)(struct charset_info_st *, char *); - void (*casedn_str)(struct charset_info_st *, char *); - void (*caseup)(struct charset_info_st *, char *, uint); - void (*casedn)(struct charset_info_st *, char *, uint); + /* Functions for case convertion */ + void (*caseup_str)(struct charset_info_st *, char *); + void (*casedn_str)(struct charset_info_st *, char *); + void (*caseup)(struct charset_info_st *, char *, uint); + void (*casedn)(struct charset_info_st *, char *, uint); - /* Functions for case comparison */ - int (*strcasecmp)(struct charset_info_st *, const char *, const char *); - int (*strncasecmp)(struct charset_info_st *, const char *, const char *, uint); + /* Functions for case comparison */ + int (*strcasecmp)(struct charset_info_st *, const char *, const char *); + int (*strncasecmp)(struct charset_info_st *, const char *, const char *, + uint); - /* Hash calculation */ - uint (*hash_caseup)(struct charset_info_st *cs, const byte *key, uint len); - void (*hash_sort)(struct charset_info_st *cs, const uchar *key, uint len, ulong *nr1, ulong *nr2); + /* Hash calculation */ + uint (*hash_caseup)(struct charset_info_st *cs, const byte *key, uint len); + void (*hash_sort)(struct charset_info_st *cs, const uchar *key, uint len, + ulong *nr1, ulong *nr2); - char max_sort_char; /* For LIKE otimization */ + char max_sort_char; /* For LIKE optimization */ } CHARSET_INFO; /* strings/ctype.c */ diff --git a/include/mysqld_error.h b/include/mysqld_error.h index c910078331e..61442247ea8 100644 --- a/include/mysqld_error.h +++ b/include/mysqld_error.h @@ -243,4 +243,6 @@ #define ER_MIXING_NOT_ALLOWED 1224 #define ER_DUP_ARGUMENT 1225 #define ER_USER_LIMIT_REACHED 1226 -#define ER_ERROR_MESSAGES 227 +#define ER_WRONG_FK_DEF 1227 +#define ER_KEY_REF_DO_NOT_MATCH_TABLE_REF 1228 +#define ER_ERROR_MESSAGES 229 -- cgit v1.2.1 From f45dc577290c7298b33ba70eba1c8a80037201ff Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 4 Jun 2002 11:32:33 +0300 Subject: Update results for new SHOW FULL COLUMNS Portability fixes include/my_tree.h: Add missing include file. mysql-test/r/select.result: Update results for new SHOW FULL COLUMNS mysql-test/r/type_blob.result: Update results for new SHOW FULL COLUMNS mysql-test/r/type_float.result: Update results for new SHOW FULL COLUMNS mysql-test/r/type_ranges.result: Update results for new SHOW FULL COLUMNS mysql-test/t/heap_btree.test: Update results for new SHOW FULL COLUMNS --- include/my_tree.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/my_tree.h b/include/my_tree.h index 826c2b7c808..90139494f94 100644 --- a/include/my_tree.h +++ b/include/my_tree.h @@ -20,6 +20,8 @@ extern "C" { #endif +#include "my_base.h" /* get 'enum ha_rkey_function' */ + #define MAX_TREE_HEIGHT 40 /* = max 1048576 leafs in tree */ #define ELEMENT_KEY(tree,element)\ (tree->offset_to_key ? (void*)((byte*) element+tree->offset_to_key) :\ -- cgit v1.2.1