diff options
143 files changed, 261 insertions, 179 deletions
diff --git a/Docs/manual.texi b/Docs/manual.texi index da18aa1ca5c..e73ed09ef37 100644 --- a/Docs/manual.texi +++ b/Docs/manual.texi @@ -9958,6 +9958,13 @@ CC=fcc CFLAGS="-O -K fast -K lib -K omitfp -Kpreex -D_GNU_SOURCE -DCONST=const - MySQL needs at least Linux Version 2.0. +@strong{WARNING}: +We have have reports from some MySQL users that they have got serious +stability problems with MySQL with Linux kernel 2.2.14. If you are +using this kernel you should upgrade to 2.2.19 (or newer) or to a 2.4 +kernel. If you have a multi-cpu box, then you should seriously consider +using 2.4 as this will give you a significant speed boost. + The binary release is linked with @code{-static}, which means you do not normally need to worry about which version of the system libraries you have. You need not install LinuxThreads, either. A program linked with @@ -28091,6 +28098,9 @@ You can always store an exact integer value in a @code{BIGINT} column by storing it as a string, as there is in this case there will be no intermediate double representation. @item +In MySQL 4.0 you can use integers to store big unsigned values in a +@code{BIGINT} string. +@item @samp{-}, @samp{+}, and @samp{*} will use @code{BIGINT} arithmetic when both arguments are @code{INTEGER} values! This means that if you multiply two big integers (or results from functions that return @@ -29151,7 +29161,9 @@ certain circumstances: @item If you insert an invalid value into an @code{ENUM} (that is, a string not present in the list of allowed values), the empty string is inserted -instead as a special error value. +instead as a special error value. This string can be distinguished from a +'normal' empty string by the fact that this string has the numerical value +0. More about this later. @item If an @code{ENUM} is declared @code{NULL}, @code{NULL} is also a legal value @@ -46933,6 +46945,8 @@ Our TODO section contains what we plan to have in 4.0. @xref{TODO MySQL 4.0}. @itemize @bullet @item +Fixed handling of big unsigned bigint constants. +@item New character set @code{latin_de} which provides correct German sorting. @item @code{TRUNCATE TABLE} and @code{DELETE FROM table_name} are now separate diff --git a/client/client_priv.h b/client/client_priv.h index 7bee03a8ab5..64ded3ed7f3 100644 --- a/client/client_priv.h +++ b/client/client_priv.h @@ -16,7 +16,7 @@ /* Common defines for all clients */ -#include <global.h> +#include <my_global.h> #include <my_sys.h> #include <m_string.h> #include <mysql.h> diff --git a/client/completion_hash.cc b/client/completion_hash.cc index 006427f0295..74ff3083197 100644 --- a/client/completion_hash.cc +++ b/client/completion_hash.cc @@ -22,7 +22,7 @@ * Small portability changes by Monty. Changed also to use my_malloc/my_free */ -#include <global.h> +#include <my_global.h> #include <m_string.h> #undef SAFEMALLOC // Speed things up #include <my_sys.h> diff --git a/client/errmsg.c b/client/errmsg.c index 9f67a15dcb2..012158a6e30 100644 --- a/client/errmsg.c +++ b/client/errmsg.c @@ -18,7 +18,7 @@ /* Error messages for MySQL clients */ /* error messages for the demon is in share/language/errmsg.sys */ -#include <global.h> +#include <my_global.h> #include <my_sys.h> #include "errmsg.h" diff --git a/client/get_password.c b/client/get_password.c index 25069a14b75..e47cf7b3783 100644 --- a/client/get_password.c +++ b/client/get_password.c @@ -19,7 +19,7 @@ ** Ask for a password from tty ** This is an own file to avoid conflicts with curses */ -#include <global.h> +#include <my_global.h> #include <my_sys.h> #include "mysql.h" #include <m_string.h> diff --git a/client/mysqldump.c b/client/mysqldump.c index 9d8e15a7942..9d80fd9a6c9 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -39,7 +39,7 @@ #define DUMP_VERSION "8.16" -#include <global.h> +#include <my_global.h> #include <my_sys.h> #include <m_string.h> #include <m_ctype.h> diff --git a/client/mysqlshow.c b/client/mysqlshow.c index 199318abc2f..8bce1203df8 100644 --- a/client/mysqlshow.c +++ b/client/mysqlshow.c @@ -18,7 +18,7 @@ #define SHOW_VERSION "8.3" -#include <global.h> +#include <my_global.h> #include <my_sys.h> #include <m_string.h> #include "mysql.h" diff --git a/client/mysqltest.c b/client/mysqltest.c index f269dd373c6..a021478d737 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -45,7 +45,7 @@ #define MTEST_VERSION "1.10" -#include <global.h> +#include <my_global.h> #include <my_sys.h> #include <m_string.h> #include <mysql.h> diff --git a/client/password.c b/client/password.c index 0fd5861873a..cb658f32022 100644 --- a/client/password.c +++ b/client/password.c @@ -35,7 +35,7 @@ This saves a hashed number as a string in the password field. *****************************************************************************/ -#include <global.h> +#include <my_global.h> #include <my_sys.h> #include <m_string.h> #include "mysql.h" diff --git a/client/readline.cc b/client/readline.cc index f0312b089e5..f390be466ab 100644 --- a/client/readline.cc +++ b/client/readline.cc @@ -17,7 +17,7 @@ /* readline for batch mode */ -#include <global.h> +#include <my_global.h> #include <my_sys.h> #include <m_string.h> #include "my_readline.h" diff --git a/client/sql_string.cc b/client/sql_string.cc index 4b9ebef21f1..d749dbee978 100644 --- a/client/sql_string.cc +++ b/client/sql_string.cc @@ -21,7 +21,7 @@ #pragma implementation // gcc: Class implementation #endif -#include <global.h> +#include <my_global.h> #include <my_sys.h> #include <m_string.h> #include <m_ctype.h> diff --git a/client/thimble.cc b/client/thimble.cc index 6d1e8a85559..4a4227b3c71 100644 --- a/client/thimble.cc +++ b/client/thimble.cc @@ -2,7 +2,7 @@ #include <stdio.h> #include <stdlib.h> #include <unistd.h> -#include "my_global.h" +#include "my_my_global.h" static void spawn_stern_thread(pthread_t *t); static int act_goofy(void); diff --git a/client/thread_test.c b/client/thread_test.c index 41adb23c408..06c6424de66 100644 --- a/client/thread_test.c +++ b/client/thread_test.c @@ -15,7 +15,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ -#include <global.h> +#include <my_global.h> #ifndef THREAD diff --git a/dbug/dbug.c b/dbug/dbug.c index cfe4ca161c6..378e0369230 100644 --- a/dbug/dbug.c +++ b/dbug/dbug.c @@ -69,7 +69,7 @@ #ifdef DBUG_OFF #undef DBUG_OFF #endif -#include <global.h> +#include <my_global.h> #include <m_string.h> #include <errno.h> #if defined(MSDOS) || defined(__WIN__) diff --git a/dbug/dbug_analyze.c b/dbug/dbug_analyze.c index bcee5230527..de228c64aa5 100644 --- a/dbug/dbug_analyze.c +++ b/dbug/dbug_analyze.c @@ -49,7 +49,7 @@ * if invoked with -v flag. */ -#include <global.h> +#include <my_global.h> #include <m_string.h> static char *my_name; diff --git a/dbug/example1.c b/dbug/example1.c index 932e269cc4c..e468f065796 100644 --- a/dbug/example1.c +++ b/dbug/example1.c @@ -1,5 +1,5 @@ -#include <global.h> +#include <my_global.h> main (argc, argv) int argc; diff --git a/dbug/example2.c b/dbug/example2.c index 482691a8a74..5e5f14f0e7e 100644 --- a/dbug/example2.c +++ b/dbug/example2.c @@ -1,5 +1,5 @@ -#include <global.h> +#include <my_global.h> int debug = 0; diff --git a/dbug/example3.c b/dbug/example3.c index b504edf2e61..f177c07425d 100644 --- a/dbug/example3.c +++ b/dbug/example3.c @@ -1,5 +1,5 @@ -#include <global.h> +#include <my_global.h> main (argc, argv) int argc; diff --git a/dbug/factorial.c b/dbug/factorial.c index 0dda5c7459e..56197aef29e 100644 --- a/dbug/factorial.c +++ b/dbug/factorial.c @@ -2,7 +2,7 @@ #undef DBUG_OFF #endif -#include <global.h> +#include <my_global.h> int factorial ( register int value) diff --git a/dbug/main.c b/dbug/main.c index 863b4d319c2..da56c00feb3 100644 --- a/dbug/main.c +++ b/dbug/main.c @@ -2,7 +2,7 @@ #undef DBUG_OFF #endif -#include <global.h> /* This includes dbug.h */ +#include <my_global.h> /* This includes dbug.h */ int main (argc, argv) int argc; diff --git a/dbug/sanity.c b/dbug/sanity.c index d287a468028..df43fc14ba9 100644 --- a/dbug/sanity.c +++ b/dbug/sanity.c @@ -1,6 +1,6 @@ /* Declarate _sanity() if not declared in main program */ -#include <global.h> +#include <my_global.h> extern int _sanity(const char *file,uint line); diff --git a/extra/comp_err.c b/extra/comp_err.c index f7b68ff0891..71b20371142 100644 --- a/extra/comp_err.c +++ b/extra/comp_err.c @@ -17,7 +17,7 @@ /* Saves all errmesg in a header file, updated by me, in a compact file */ -#include <global.h> +#include <my_global.h> #include <m_ctype.h> #include <my_sys.h> #include <m_string.h> diff --git a/extra/my_print_defaults.c b/extra/my_print_defaults.c index 316d91ef7b3..4f4b9fecb51 100644 --- a/extra/my_print_defaults.c +++ b/extra/my_print_defaults.c @@ -22,7 +22,7 @@ ** Written by Monty */ -#include <global.h> +#include <my_global.h> #include <my_sys.h> #include <getopt.h> diff --git a/extra/perror.c b/extra/perror.c index 5fc1f75785b..28a1d217f3e 100644 --- a/extra/perror.c +++ b/extra/perror.c @@ -19,7 +19,7 @@ #define PERROR_VERSION "2.6" -#include <global.h> +#include <my_global.h> #include <my_sys.h> #include <m_string.h> #include <errno.h> diff --git a/extra/replace.c b/extra/replace.c index ef3abda5cc5..358186e27a6 100644 --- a/extra/replace.c +++ b/extra/replace.c @@ -38,7 +38,7 @@ */ #define DONT_USE_RAID -#include <global.h> +#include <my_global.h> #include <m_ctype.h> #include <my_sys.h> #include <m_string.h> diff --git a/extra/resolve_stack_dump.c b/extra/resolve_stack_dump.c index bda23a41efd..94be4a5654a 100644 --- a/extra/resolve_stack_dump.c +++ b/extra/resolve_stack_dump.c @@ -20,7 +20,7 @@ */ #define DONT_USE_RAID -#include <global.h> +#include <my_global.h> #include <m_ctype.h> #include <my_sys.h> #include <m_string.h> diff --git a/extra/resolveip.c b/extra/resolveip.c index d6cfee9bb4c..fbd9fe65523 100644 --- a/extra/resolveip.c +++ b/extra/resolveip.c @@ -19,7 +19,7 @@ #define RESOLVE_VERSION "2.0" -#include <global.h> +#include <my_global.h> #include <sys/types.h> #include <sys/socket.h> #ifndef HAVE_BROKEN_NETINET_INCLUDES diff --git a/fs/libmysqlfs.h b/fs/libmysqlfs.h index 5af78b4c6d6..0e95daaa791 100644 --- a/fs/libmysqlfs.h +++ b/fs/libmysqlfs.h @@ -16,7 +16,7 @@ */ #include "CorbaFS.h" -#include <global.h> +#include <my_global.h> #include <my_sys.h> #include <m_string.h> #include <m_ctype.h> diff --git a/fs/mysqlcorbafs.h b/fs/mysqlcorbafs.h index 4fd76598d7f..4074d0e07b4 100644 --- a/fs/mysqlcorbafs.h +++ b/fs/mysqlcorbafs.h @@ -16,7 +16,7 @@ */ #include "CorbaFS.h" -#include <global.h> +#include <my_global.h> #include <my_sys.h> #include <m_string.h> #include <m_ctype.h> diff --git a/heap/hp_test1.c b/heap/hp_test1.c index f44752af3bc..2357fdafa05 100644 --- a/heap/hp_test1.c +++ b/heap/hp_test1.c @@ -20,7 +20,7 @@ raderas. */ -#include <global.h> +#include <my_global.h> #include <my_sys.h> #include <m_string.h> #include "heap.h" diff --git a/include/Makefile.am b/include/Makefile.am index f3685b51cd3..0821afeb01d 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -22,7 +22,7 @@ pkginclude_HEADERS = dbug.h m_string.h my_sys.h mysql.h mysql_com.h \ my_global.h my_net.h \ sslopt-case.h sslopt-longopts.h sslopt-usage.h \ sslopt-vars.h $(BUILT_SOURCES) -noinst_HEADERS = global.h config-win.h \ +noinst_HEADERS = config-win.h \ nisam.h heap.h merge.h my_bitmap.h\ myisam.h myisampack.h myisammrg.h ft_global.h\ my_dir.h mysys_err.h my_base.h \ @@ -32,12 +32,12 @@ noinst_HEADERS = global.h config-win.h \ mysql_version.h.in # mysql_version.h are generated -SUPERCLEANFILES = mysql_version.h my_global.h my_config.h +SUPERCLEANFILES = mysql_version.h my_config.h # Some include files that may be moved and patched by configure DISTCLEANFILES = sched.h -all-local: my_global.h my_config.h +all-local: my_config.h # Since we include my_config.h it better exist from the beginning link_sources: @@ -48,11 +48,6 @@ link_sources: my_config.h: ../config.h $(CP) ../config.h my_config.h -# This should be changed in the source and removed. -my_global.h: global.h - $(RM) -f my_global.h - $(CP) global.h my_global.h - # These files should not be included in distributions since they are # generated by configure from the .h.in files dist-hook: diff --git a/include/m_ctype.h b/include/m_ctype.h index 645c07b79ae..b41323e10b9 100644 --- a/include/m_ctype.h +++ b/include/m_ctype.h @@ -17,7 +17,7 @@ /* A better inplementation of the UNIX ctype(3) library. - Notes: global.h should be included before ctype.h + Notes: my_global.h should be included before ctype.h */ #ifndef _m_ctype_h diff --git a/include/my_base.h b/include/my_base.h index e677f448c57..c4c1a0763fd 100644 --- a/include/my_base.h +++ b/include/my_base.h @@ -24,7 +24,7 @@ #ifndef stdin /* Included first in handler */ #define USES_TYPES /* my_dir with sys/types is included */ #define CHSIZE_USED -#include <global.h> +#include <my_global.h> #include <my_dir.h> /* This includes types */ #include <my_sys.h> #include <m_string.h> diff --git a/innobase/include/univ.i b/innobase/include/univ.i index f3e3b22bb3d..d36b4ca9b8b 100644 --- a/innobase/include/univ.i +++ b/innobase/include/univ.i @@ -36,7 +36,7 @@ be defined: /* Include two header files from MySQL to make the Unix flavor used in compiling more Posix-compatible. We assume that 'innobase' is a subdirectory of 'mysql'. */ -#include <global.h> +#include <my_global.h> #include <my_pthread.h> /* Include <sys/stat.h> to get S_I... macros defined for os0file.c */ diff --git a/libmysql/dll.c b/libmysql/dll.c index d1a23794025..5cd01e9c5df 100644 --- a/libmysql/dll.c +++ b/libmysql/dll.c @@ -19,7 +19,7 @@ ** Handling initialization of the dll library */ -#include <global.h> +#include <my_global.h> #include <my_sys.h> #include <my_pthread.h> diff --git a/libmysql/errmsg.c b/libmysql/errmsg.c index 55e2f8164ed..8a1069a4afb 100644 --- a/libmysql/errmsg.c +++ b/libmysql/errmsg.c @@ -18,7 +18,7 @@ /* Error messages for MySQL clients */ /* error messages for the daemon is in share/language/errmsg.sys */ -#include <global.h> +#include <my_global.h> #include <my_sys.h> #include "errmsg.h" diff --git a/libmysql/get_password.c b/libmysql/get_password.c index 989de9dd11a..4941c9b43d3 100644 --- a/libmysql/get_password.c +++ b/libmysql/get_password.c @@ -19,7 +19,7 @@ ** Ask for a password from tty ** This is an own file to avoid conflicts with curses */ -#include <global.h> +#include <my_global.h> #include <my_sys.h> #include "mysql.h" #include <m_string.h> diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index e7705ee20e4..c1bc589e9d4 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -15,7 +15,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ -#include <global.h> +#include <my_global.h> #if defined(__WIN__) || defined(_WIN32) || defined(_WIN64) #include <winsock.h> #include <odbcinst.h> @@ -70,7 +70,7 @@ my_string mysql_unix_port=0; #endif #if defined(MSDOS) || defined(__WIN__) -// socket_errno is defined in global.h for all platforms +// socket_errno is defined in my_global.h for all platforms #define perror(A) #else #include <errno.h> diff --git a/libmysql/net.c b/libmysql/net.c index 9b9ce1c4048..1f21fd2f2f9 100644 --- a/libmysql/net.c +++ b/libmysql/net.c @@ -30,7 +30,7 @@ #ifdef __WIN__ #include <winsock.h> #endif -#include <global.h> +#include <my_global.h> #include <mysql_com.h> #include <violite.h> #include <my_sys.h> diff --git a/libmysql/password.c b/libmysql/password.c index 0fd5861873a..cb658f32022 100644 --- a/libmysql/password.c +++ b/libmysql/password.c @@ -35,7 +35,7 @@ This saves a hashed number as a string in the password field. *****************************************************************************/ -#include <global.h> +#include <my_global.h> #include <my_sys.h> #include <m_string.h> #include "mysql.h" diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index 739f1fc7fe7..015ca7b7287 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -12,7 +12,7 @@ * modified is included with the above copyright notice. * */ -#include "global.h" +#include "my_global.h" #include "my_pthread.h" #include "sys/types.h" #include "../regex/regex.h" diff --git a/libmysqld/lib_vio.c b/libmysqld/lib_vio.c index fd4eb4ac29f..e86e6c7e8da 100644 --- a/libmysqld/lib_vio.c +++ b/libmysqld/lib_vio.c @@ -22,7 +22,7 @@ the file descriptior. */ -#include <global.h> +#include <my_global.h> #ifndef HAVE_VIO /* is Vio suppored by the Vio lib ? */ diff --git a/libmysqld/libmysqld.c b/libmysqld/libmysqld.c index 0e66ceb2f40..53a05a24265 100644 --- a/libmysqld/libmysqld.c +++ b/libmysqld/libmysqld.c @@ -16,7 +16,7 @@ MA 02111-1307, USA */ #define DONT_USE_RAID -#include <global.h> +#include <my_global.h> #if defined(__WIN__) || defined(_WIN32) || defined(_WIN64) #include <winsock.h> #include <odbcinst.h> diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh index e876eb2264d..e20eb4e0869 100644 --- a/mysql-test/mysql-test-run.sh +++ b/mysql-test/mysql-test-run.sh @@ -128,7 +128,7 @@ DO_GDB="" DO_DDD="" DO_CLIENT_GDB="" SLEEP_TIME=2 -CHARACTER_SET=latin1_de +CHARACTER_SET=latin1 DBUSER="" while test $# -gt 0; do diff --git a/mysql-test/r/ctype_latin1_de.result b/mysql-test/r/ctype_latin1_de.result index 71bed79891a..44a1757209e 100644 --- a/mysql-test/r/ctype_latin1_de.result +++ b/mysql-test/r/ctype_latin1_de.result @@ -9,6 +9,8 @@ aeae 33 ääa 32 aeb 6 Äc 5 +é 38 +É 39 eä 28 o 37 oc 15 @@ -36,8 +38,6 @@ ueb 12 üc 7 uf 13 uü 29 -é 38 -É 39 a b a 35 ac 2 @@ -49,6 +49,8 @@ aeae 33 ääa 32 aeb 6 Äc 5 +é 38 +É 39 eä 28 o 37 oc 15 @@ -76,11 +78,7 @@ ueb 12 üc 7 uf 13 uü 29 -é 38 -É 39 a -É -é uü uf üc @@ -108,6 +106,8 @@ od oc o eä +É +é Äc aeb ääa @@ -121,11 +121,11 @@ a Table Op Msg_type Msg_text test.t1 check status OK a b +ö 14 Öa 16 Öc 19 öo 30 a b -é 38 É 39 a b a 35 @@ -166,3 +166,10 @@ strcmp('ßa','ss') strcmp('ssa','ß') strcmp('sssb','sßa') strcmp('ß','s') 1 1 1 1 strcmp('u','öa') strcmp('u','ö') 1 1 +a +abc +abcd +a +test +a +test diff --git a/mysql-test/r/func_like.result b/mysql-test/r/func_like.result index 78bede19762..a6c28daae88 100644 --- a/mysql-test/r/func_like.result +++ b/mysql-test/r/func_like.result @@ -2,6 +2,9 @@ a abc abcd a +abc +abcd +a test a test diff --git a/mysql-test/t/ctype_latin1_de.test b/mysql-test/t/ctype_latin1_de.test index 1df700340da..d39d7f6e5dd 100644 --- a/mysql-test/t/ctype_latin1_de.test +++ b/mysql-test/t/ctype_latin1_de.test @@ -14,7 +14,7 @@ select a,b from t1 order by upper(a),b; select a from t1 order by a desc; check table t1; select * from t1 where a like "ö%"; -select * from t1 where a like "%É%"; +select * from t1 where a like binary "%É%"; select * from t1 where a like "%Á%"; select * from t1 where a like "%U%"; select * from t1 where a like "%ss%"; @@ -34,3 +34,13 @@ select strcmp('af','ä'),strcmp('ä','a'),strcmp('aeq','ää'),strcmp('aeaeq','ää'); select strcmp('ßa','ss'),strcmp('ssa','ß'),strcmp('sssb','sßa'),strcmp('ß','s'); select strcmp('u','öa'),strcmp('u','ö'); +# +# Some other simple tests with the current character set +# + +create table t1 (a varchar(10), key(a)); +insert into t1 values ("a"),("abc"),("abcd"),("hello"),("test"); +select * from t1 where a like "abc%"; +select * from t1 where a like "test%"; +select * from t1 where a like "te_t"; +drop table t1; diff --git a/mysql-test/t/func_like.test b/mysql-test/t/func_like.test index d160b04176c..e0f1f0db9ce 100644 --- a/mysql-test/t/func_like.test +++ b/mysql-test/t/func_like.test @@ -2,9 +2,11 @@ # Test of like # +drop table if exists t1; create table t1 (a varchar(10), key(a)); insert into t1 values ("a"),("abc"),("abcd"),("hello"),("test"); select * from t1 where a like "abc%"; +select * from t1 where a like "ABC%"; select * from t1 where a like "test%"; select * from t1 where a like "te_t"; drop table t1; diff --git a/mysys/checksum.c b/mysys/checksum.c index 00861853945..0da40d1ab4a 100644 --- a/mysys/checksum.c +++ b/mysys/checksum.c @@ -17,7 +17,7 @@ /* Calculate a long checksum for a memoryblock. Used to verify pack_isam */ -#include <global.h> +#include <my_global.h> #include "my_sys.h" ulong checksum(const byte *mem, uint count) diff --git a/mysys/getopt.c b/mysys/getopt.c index 774cf3b82f4..35db805d997 100644 --- a/mysys/getopt.c +++ b/mysys/getopt.c @@ -46,7 +46,7 @@ Cambridge, MA 02139, USA. */ #endif #endif -#include <global.h> /* Changes for mysys */ +#include <my_global.h> /* Changes for mysys */ #include <m_string.h> /* Comment out all this code if we are using the GNU C Library, and are not diff --git a/mysys/getopt1.c b/mysys/getopt1.c index bff76d6e5b2..15f3c8f544b 100644 --- a/mysys/getopt1.c +++ b/mysys/getopt1.c @@ -24,7 +24,7 @@ Cambridge, MA 02139, USA. */ #include <config.h> #endif -#include <global.h> +#include <my_global.h> #include "getopt.h" #if (!defined (__STDC__) || !__STDC__) && !defined(MSDOS) && !defined(OS2) diff --git a/mysys/make-conf.c b/mysys/make-conf.c index 9db766574e2..0a2a1a7b195 100644 --- a/mysys/make-conf.c +++ b/mysys/make-conf.c @@ -34,7 +34,7 @@ #define CH_INCLUDE STRINGIZE(CH_SRC) /* aaaah, that's better */ -#include <my_global.h> +#include <my_my_global.h> #include CH_INCLUDE #include <stdio.h> diff --git a/mysys/my_alloc.c b/mysys/my_alloc.c index 0c61d2ede3c..fe9431ff57a 100644 --- a/mysys/my_alloc.c +++ b/mysys/my_alloc.c @@ -17,7 +17,7 @@ /* Routines to handle mallocing of results which will be freed the same time */ -#include <global.h> +#include <my_global.h> #include <my_sys.h> #include <m_string.h> diff --git a/mysys/my_clock.c b/mysys/my_clock.c index e7d1758fa2e..332bf1ed38d 100644 --- a/mysys/my_clock.c +++ b/mysys/my_clock.c @@ -16,7 +16,7 @@ MA 02111-1307, USA */ #define USES_TYPES -#include "global.h" +#include "my_global.h" #if !defined(_MSC_VER) && !defined(__BORLANDC__) && !defined(OS2) #include "mysys_priv.h" diff --git a/mysys/my_compress.c b/mysys/my_compress.c index 11204562ac8..3f93e55af9c 100644 --- a/mysys/my_compress.c +++ b/mysys/my_compress.c @@ -17,7 +17,7 @@ /* Written by Sinisa Milivojevic <sinisa@mysql.com> */ -#include <global.h> +#include <my_global.h> #ifdef HAVE_COMPRESS #include <my_sys.h> #include <zlib.h> diff --git a/mysys/mysys_priv.h b/mysys/mysys_priv.h index 20fda270658..f203466accd 100644 --- a/mysys/mysys_priv.h +++ b/mysys/mysys_priv.h @@ -15,7 +15,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ -#include <global.h> +#include <my_global.h> #include <my_sys.h> #ifdef USE_SYSTEM_WRAPPERS diff --git a/mysys/test_charset.c b/mysys/test_charset.c index 6a5183d2cd3..96050c368c1 100644 --- a/mysys/test_charset.c +++ b/mysys/test_charset.c @@ -15,7 +15,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ -#include <global.h> +#include <my_global.h> #include <m_ctype.h> #include <my_sys.h> #include <mysql_version.h> diff --git a/mysys/testhash.c b/mysys/testhash.c index a8fbf800595..703f5b1b7d7 100644 --- a/mysys/testhash.c +++ b/mysys/testhash.c @@ -17,7 +17,7 @@ /* Test av hash libarary: stor test */ -#include <global.h> +#include <my_global.h> #include <my_sys.h> #include <hash.h> #include <m_string.h> diff --git a/mysys/thr_alarm.c b/mysys/thr_alarm.c index f51f27b7f51..2f29e742026 100644 --- a/mysys/thr_alarm.c +++ b/mysys/thr_alarm.c @@ -15,7 +15,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ -#include <global.h> +#include <my_global.h> #if defined(THREAD) && !defined(DONT_USE_THR_ALARM) #include <errno.h> diff --git a/mysys/thr_mutex.c b/mysys/thr_mutex.c index fa7ae4f1e82..340f1461823 100644 --- a/mysys/thr_mutex.c +++ b/mysys/thr_mutex.c @@ -17,7 +17,7 @@ /* This makes a wrapper for mutex handling to make it easier to debug mutex */ -#include <global.h> +#include <my_global.h> #if defined(HAVE_LINUXTHREADS) && !defined (__USE_UNIX98) #define __USE_UNIX98 /* To get rw locks under Linux */ #endif diff --git a/regex/debug.c b/regex/debug.c index 8c6fd14a209..35279941d48 100644 --- a/regex/debug.c +++ b/regex/debug.c @@ -1,4 +1,4 @@ -#include <global.h> +#include <my_global.h> #include <m_ctype.h> #include <m_string.h> #include <sys/types.h> diff --git a/regex/main.c b/regex/main.c index 4b607f401ca..eac7293bf45 100644 --- a/regex/main.c +++ b/regex/main.c @@ -1,4 +1,4 @@ -#include <global.h> +#include <my_global.h> #include <m_string.h> #include <sys/types.h> #include <regex.h> diff --git a/regex/regcomp.c b/regex/regcomp.c index 048f45ca71c..688b8ce7464 100644 --- a/regex/regcomp.c +++ b/regex/regcomp.c @@ -1,4 +1,4 @@ -#include <global.h> +#include <my_global.h> #include <m_string.h> #include <m_ctype.h> #include <regex.h> diff --git a/regex/regerror.c b/regex/regerror.c index a356912564a..4a28f6e9d24 100644 --- a/regex/regerror.c +++ b/regex/regerror.c @@ -1,4 +1,4 @@ -#include <global.h> +#include <my_global.h> #include <m_string.h> #include <m_ctype.h> #include <regex.h> diff --git a/regex/regexec.c b/regex/regexec.c index 853bd7aa263..7f2704f8214 100644 --- a/regex/regexec.c +++ b/regex/regexec.c @@ -5,7 +5,7 @@ * macros that code uses. This lets the same code operate on two different * representations for state sets. */ -#include <global.h> +#include <my_global.h> #include <m_string.h> #include <m_ctype.h> #include <regex.h> diff --git a/regex/regexp.c b/regex/regexp.c index 706208a6b25..8ddf90f2943 100644 --- a/regex/regexp.c +++ b/regex/regexp.c @@ -58,7 +58,7 @@ */ /* Headers */ -#include "global.h" +#include "my_global.h" #include <ctype.h> #include "regexp.h" #ifdef __WIN__ diff --git a/regex/regfree.c b/regex/regfree.c index a0dd8087a45..6ab50735075 100644 --- a/regex/regfree.c +++ b/regex/regfree.c @@ -1,4 +1,4 @@ -#include <global.h> +#include <my_global.h> #include <sys/types.h> #include <stdio.h> #include <stdlib.h> diff --git a/regex/reginit.c b/regex/reginit.c index b5815e7d01c..06a48b16243 100644 --- a/regex/reginit.c +++ b/regex/reginit.c @@ -1,6 +1,6 @@ /* Init cclasses array from ctypes */ -#include <global.h> +#include <my_global.h> #include <m_ctype.h> #include <m_string.h> #include "cclass.h" diff --git a/sql/cache_manager.cc b/sql/cache_manager.cc index 9ea25315f8c..9aec222909a 100644 --- a/sql/cache_manager.cc +++ b/sql/cache_manager.cc @@ -18,7 +18,7 @@ #pragma implementation /* gcc: Class implementation */ #endif -#include <global.h> +#include <my_global.h> #include <my_sys.h> #include "cache_manager.h" diff --git a/sql/gen_lex_hash.cc b/sql/gen_lex_hash.cc index 36683c0f239..722f5226980 100644 --- a/sql/gen_lex_hash.cc +++ b/sql/gen_lex_hash.cc @@ -16,7 +16,7 @@ #define NO_YACC_SYMBOLS -#include <global.h> +#include <my_global.h> #include <my_sys.h> #include <m_string.h> #ifndef __GNU_LIBRARY__ diff --git a/sql/ha_berkeley.cc b/sql/ha_berkeley.cc index 9a437607729..d0f927732ad 100644 --- a/sql/ha_berkeley.cc +++ b/sql/ha_berkeley.cc @@ -365,11 +365,9 @@ berkeley_cmp_packed_key(DB *file, const DBT *new_key, const DBT *saved_key) { if (*new_key_ptr != *saved_key_ptr++) return ((int) *new_key_ptr - (int) saved_key_ptr[-1]); + key_length--; if (!*new_key_ptr++) - { - key_length--; continue; - } } if ((cmp=key_part->field->pack_cmp(new_key_ptr,saved_key_ptr, key_part->length))) @@ -1399,7 +1397,7 @@ int ha_berkeley::index_read_idx(byte * buf, uint keynr, const byte * key, statistic_increment(ha_read_key_count,&LOCK_status); DBUG_ENTER("index_read_idx"); current_row.flags=DB_DBT_REALLOC; - active_index= -1; + active_index= (uint) -1; DBUG_RETURN(read_row(key_file[keynr]->get(key_file[keynr], transaction, pack_key(&last_key, keynr, key_buff, key, key_len), diff --git a/sql/ha_gemini.h b/sql/ha_gemini.h index 96c0cdd4241..006401271c6 100644 --- a/sql/ha_gemini.h +++ b/sql/ha_gemini.h @@ -19,7 +19,7 @@ #pragma interface /* gcc class implementation */ #endif -#include "gem_global.h" +#include "gem_my_global.h" #include "dstd.h" #include "dsmpub.h" diff --git a/sql/handler.cc b/sql/handler.cc index f790417cf79..0c7f1c9c2b1 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -839,14 +839,16 @@ int ha_create_table(const char *name, HA_CREATE_INFO *create_info, } error=table.file->create(name,&table,create_info); VOID(closefrm(&table)); - if (error) { - if (table.db_type == DB_TYPE_INNOBASE) { + if (error) + { + if (table.db_type == DB_TYPE_INNODB) + { /* Creation of InnoDB table cannot fail because of an OS error: put error as the number */ my_error(ER_CANT_CREATE_TABLE,MYF(ME_BELL+ME_WAITTANG),name,error); - } else { - my_error(ER_CANT_CREATE_TABLE,MYF(ME_BELL+ME_WAITTANG),name,my_errno); } + else + my_error(ER_CANT_CREATE_TABLE,MYF(ME_BELL+ME_WAITTANG),name,my_errno); } DBUG_RETURN(error != 0); } diff --git a/sql/item.cc b/sql/item.cc index c0cdac51b1e..d5961fe1733 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -231,6 +231,22 @@ void Item_int::print(String *str) str->append(name); } +String *Item_uint::val_str(String *str) +{ + str->set((ulonglong) value); + return str; +} + +void Item_uint::print(String *str) +{ + if (!name) + { + str_value.set((ulonglong) value); + name=str_value.c_ptr(); + } + str->append(name); +} + String *Item_real::val_str(String *str) { @@ -317,6 +333,12 @@ void Item_int::make_field(Send_field *tmp_field) init_make_field(tmp_field,FIELD_TYPE_LONGLONG); } +void Item_uint::make_field(Send_field *tmp_field) +{ + init_make_field(tmp_field,FIELD_TYPE_LONGLONG); + tmp_field->flags|= UNSIGNED_FLAG; +} + void Item_real::make_field(Send_field *tmp_field) { init_make_field(tmp_field,FIELD_TYPE_DOUBLE); diff --git a/sql/item.h b/sql/item.h index 9ad633d9278..98abdc834d9 100644 --- a/sql/item.h +++ b/sql/item.h @@ -181,6 +181,19 @@ public: }; +class Item_uint :public Item_int +{ +public: + Item_uint(const char *str_arg, uint length) : + Item_int(str_arg, (longlong) strtoull(str_arg,(char**) 0,10), length) {} + double val() { return ulonglong2double(value); } + String *val_str(String*); + void make_field(Send_field *field); + Item *new_item() { return new Item_uint(name,max_length); } + void print(String *str); +}; + + class Item_real :public Item { public: diff --git a/sql/matherr.c b/sql/matherr.c index 8523a78ce94..ed18438cd0c 100644 --- a/sql/matherr.c +++ b/sql/matherr.c @@ -16,7 +16,7 @@ /* Fix that we got POSTFIX_ERROR when doing unreasonable math (not core) */ -#include <global.h> +#include <my_global.h> #include <errno.h> /* Fix that we gets POSTFIX_ERROR when error in math */ diff --git a/sql/md5.c b/sql/md5.c index 66b96b92ab2..a4ff75d469a 100644 --- a/sql/md5.c +++ b/sql/md5.c @@ -28,7 +28,7 @@ documentation and/or software. Replace of MD5_memset and MD5_memcpy with memset & memcpy */ -#include <global.h> +#include <my_global.h> #include <m_string.h> #include "md5.h" diff --git a/sql/mini_client.cc b/sql/mini_client.cc index 09944959673..24c414a8f8b 100644 --- a/sql/mini_client.cc +++ b/sql/mini_client.cc @@ -40,7 +40,7 @@ inline int local_thr_alarm(my_bool *A,int B __attribute__((unused)),ALARM *C __a #define thr_got_alarm(A) 0 #endif -#include <global.h> +#include <my_global.h> #include <mysql_com.h> #include <violite.h> #include <my_sys.h> diff --git a/sql/my_lock.c b/sql/my_lock.c index 7025682d40e..19d38fd9c79 100644 --- a/sql/my_lock.c +++ b/sql/my_lock.c @@ -19,7 +19,7 @@ #else #undef MAP_TO_USE_RAID /* Avoid RAID mappings */ -#include <global.h> +#include <my_global.h> #include <my_sys.h> #include <mysys_err.h> #include <my_pthread.h> diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 8e38c8174a4..74bb3411773 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -17,7 +17,7 @@ #ifndef _MYSQL_PRIV_H #define _MYSQL_PRIV_H -#include <global.h> +#include <my_global.h> #include <my_sys.h> #include <m_string.h> #include "mysql_version.h" diff --git a/sql/net_serv.cc b/sql/net_serv.cc index fded2c3ce32..960ff5cc7bf 100644 --- a/sql/net_serv.cc +++ b/sql/net_serv.cc @@ -30,7 +30,7 @@ #ifdef __WIN__ #include <winsock.h> #endif -#include <global.h> +#include <my_global.h> #include <mysql_com.h> #include <violite.h> #include <my_sys.h> diff --git a/sql/password.c b/sql/password.c index 1c88aabcce2..1db94e0db8a 100644 --- a/sql/password.c +++ b/sql/password.c @@ -34,7 +34,7 @@ This saves a hashed number as a string in the password field. *****************************************************************************/ -#include <global.h> +#include <my_global.h> #include <my_sys.h> #include <m_string.h> #include "mysql.h" diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index bfda57a06ad..c3f98713c45 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -337,7 +337,8 @@ static const char *longlong_str="9223372036854775807"; static const uint longlong_len=19; static const char *signed_longlong_str="-9223372036854775808"; static const uint signed_longlong_len=19; - +static const char *unsigned_longlong_str="18446744073709551615"; +static const uint unsigned_longlong_len=20; inline static uint int_token(const char *str,uint length) { @@ -393,7 +394,13 @@ inline static uint int_token(const char *str,uint length) else if (length < longlong_len) return LONG_NUM; else if (length > longlong_len) - return REAL_NUM; + { + if (length > unsigned_longlong_len) + return REAL_NUM; + cmp=unsigned_longlong_str; + smaller=ULONGLONG_NUM; + bigger=REAL_NUM; + } else { cmp=longlong_str; diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 7806bef7163..b51e9ab5a73 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -17,7 +17,7 @@ /* Function with list databases, tables or fields */ -#include "global.h" +#include "my_global.h" #include "mysql_priv.h" #include "sql_select.h" // For select_describe #include "sql_acl.h" diff --git a/sql/sql_string.cc b/sql/sql_string.cc index e6cdd089bf1..5aecb3bc158 100644 --- a/sql/sql_string.cc +++ b/sql/sql_string.cc @@ -21,7 +21,7 @@ #pragma implementation // gcc: Class implementation #endif -#include <global.h> +#include <my_global.h> #include <my_sys.h> #include <m_string.h> #include <m_ctype.h> diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 2318a6d309e..6a54c3cdd36 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -43,7 +43,7 @@ inline Item *or_or_concat(Item* A, Item* B) %union { int num; ulong ulong_num; - ulonglong ulonglong_num; + ulonglong ulonglong_number; LEX_STRING lex_str; LEX_STRING *lex_str_ptr; LEX_SYMBOL symbol; @@ -349,6 +349,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize); %token TINYBLOB %token TINYINT %token TINYTEXT +%token ULONGLONG_NUM %token UNSIGNED %token VARBINARY %token VARCHAR @@ -465,7 +466,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize); %type <lex_str> IDENT TEXT_STRING REAL_NUM FLOAT_NUM NUM LONG_NUM HEX_NUM LEX_HOSTNAME - field_ident select_alias ident ident_or_text + ULONGLONG_NUM field_ident select_alias ident ident_or_text %type <lex_str_ptr> opt_table_alias @@ -488,8 +489,8 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize); %type <ulong_num> ULONG_NUM raid_types -%type <ulonglong_num> - ULONGLONG_NUM +%type <ulonglong_number> + ulonglong_num %type <item> literal text_literal insert_ident group_ident order_ident @@ -652,7 +653,7 @@ master_def: Lex->mi.port = $3; } | - MASTER_LOG_POS_SYM EQ ULONGLONG_NUM + MASTER_LOG_POS_SYM EQ ulonglong_num { Lex->mi.pos = $3; } @@ -766,12 +767,12 @@ create_table_options: create_table_option: TYPE_SYM EQ table_types { Lex->create_info.db_type= $3; } - | MAX_ROWS EQ ULONGLONG_NUM { Lex->create_info.max_rows= $3; } - | MIN_ROWS EQ ULONGLONG_NUM { Lex->create_info.min_rows= $3; } + | MAX_ROWS EQ ulonglong_num { Lex->create_info.max_rows= $3; } + | MIN_ROWS EQ ulonglong_num { Lex->create_info.min_rows= $3; } | AVG_ROW_LENGTH EQ ULONG_NUM { Lex->create_info.avg_row_length=$3; } | PASSWORD EQ TEXT_STRING { Lex->create_info.password=$3.str; } | COMMENT_SYM EQ TEXT_STRING { Lex->create_info.comment=$3.str; } - | AUTO_INC EQ ULONGLONG_NUM { Lex->create_info.auto_increment_value=$3; Lex->create_info.used_fields|= HA_CREATE_USED_AUTO;} + | AUTO_INC EQ ulonglong_num { Lex->create_info.auto_increment_value=$3; Lex->create_info.used_fields|= HA_CREATE_USED_AUTO;} | PACK_KEYS_SYM EQ ULONG_NUM { Lex->create_info.table_options|= $3 ? HA_OPTION_PACK_KEYS : HA_OPTION_NO_PACK_KEYS; } | CHECKSUM_SYM EQ ULONG_NUM { Lex->create_info.table_options|= $3 ? HA_OPTION_CHECKSUM : HA_OPTION_NO_CHECKSUM; } | DELAY_KEY_WRITE_SYM EQ ULONG_NUM { Lex->create_info.table_options|= $3 ? HA_OPTION_DELAY_KEY_WRITE : HA_OPTION_NO_DELAY_KEY_WRITE; } @@ -2047,16 +2048,18 @@ delete_limit_clause: { Select->select_limit= HA_POS_ERROR; } - | LIMIT ULONGLONG_NUM + | LIMIT ulonglong_num { Select->select_limit= (ha_rows) $2; } ULONG_NUM: NUM { $$= strtoul($1.str,NULL,10); } + | ULONGLONG_NUM { $$= (ulonglong) strtoul($1.str,NULL,10); } | REAL_NUM { $$= strtoul($1.str,NULL,10); } | FLOAT_NUM { $$= strtoul($1.str,NULL,10); } -ULONGLONG_NUM: +ulonglong_num: NUM { $$= (ulonglong) strtoul($1.str,NULL,10); } + | ULONGLONG_NUM { $$= (ulonglong) strtoul($1.str,NULL,10); } | LONG_NUM { $$= strtoull($1.str,NULL,10); } | REAL_NUM { $$= strtoull($1.str,NULL,10); } | FLOAT_NUM { $$= strtoull($1.str,NULL,10); } @@ -2417,7 +2420,7 @@ show_param: YYABORT; } | NEW_SYM MASTER_SYM FOR_SYM SLAVE WITH MASTER_LOG_FILE_SYM EQ - TEXT_STRING AND MASTER_LOG_POS_SYM EQ ULONGLONG_NUM AND + TEXT_STRING AND MASTER_LOG_POS_SYM EQ ulonglong_num AND MASTER_LOG_SEQ_SYM EQ ULONG_NUM AND MASTER_SERVER_ID_SYM EQ ULONG_NUM { @@ -2499,7 +2502,7 @@ binlog_in: binlog_from: /* empty */ { Lex->mi.pos = 4; /* skip magic number */ } - | FROM ULONGLONG_NUM { Lex->mi.pos = $2; } + | FROM ulonglong_num { Lex->mi.pos = $2; } /* A Oracle compatible synonym for show */ @@ -2705,6 +2708,7 @@ literal: text_literal { $$ = $1; } | NUM { $$ = new Item_int($1.str, (longlong) atol($1.str),$1.length); } | LONG_NUM { $$ = new Item_int($1.str); } + | ULONGLONG_NUM { $$ = new Item_uint($1.str, $1.length); } | REAL_NUM { $$ = new Item_real($1.str, $1.length); } | FLOAT_NUM { $$ = new Item_float($1.str, $1.length); } | NULL_SYM { $$ = new Item_null(); @@ -2993,11 +2997,11 @@ option_value: { current_thd->user_time=0; } - | LAST_INSERT_ID equal ULONGLONG_NUM + | LAST_INSERT_ID equal ulonglong_num { current_thd->insert_id($3); } - | INSERT_ID equal ULONGLONG_NUM + | INSERT_ID equal ulonglong_num { current_thd->next_insert_id=$3; } diff --git a/sql/stacktrace.c b/sql/stacktrace.c index 81d8debc27a..32bc37f5500 100644 --- a/sql/stacktrace.c +++ b/sql/stacktrace.c @@ -14,7 +14,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include <global.h> +#include <my_global.h> #include "stacktrace.h" #include <signal.h> #include <my_pthread.h> diff --git a/sql/udf_example.cc b/sql/udf_example.cc index bf3aa3d0074..3a528a9ad3a 100644 --- a/sql/udf_example.cc +++ b/sql/udf_example.cc @@ -103,7 +103,7 @@ #include <stdio.h> #include <string.h> #else -#include <global.h> +#include <my_global.h> #include <my_sys.h> #endif #include <mysql.h> diff --git a/strings/atof.c b/strings/atof.c index 1ce16027089..1284695d287 100644 --- a/strings/atof.c +++ b/strings/atof.c @@ -23,7 +23,7 @@ Must be inited with init_my_atof to handle possibly overflows. */ -#include <global.h> +#include <my_global.h> #ifdef USE_MY_ATOF /* Skipp if we don't want it */ #include <m_ctype.h> #include <floatingpoint.h> diff --git a/strings/bchange.c b/strings/bchange.c index 99066cf1e95..68b1434de4f 100644 --- a/strings/bchange.c +++ b/strings/bchange.c @@ -25,7 +25,7 @@ src in a buffer with tot_length bytes. */ -#include <global.h> +#include <my_global.h> #include "m_string.h" void bchange(register char *dst, uint old_length, register const char *src, uint new_length, uint tot_length) diff --git a/strings/bcmp.c b/strings/bcmp.c index 3dce5025b64..5f872afc709 100644 --- a/strings/bcmp.c +++ b/strings/bcmp.c @@ -22,7 +22,7 @@ Now only used with purify. */ -#include <global.h> +#include <my_global.h> #include "m_string.h" #if !defined(bcmp) && !defined(HAVE_BCMP) diff --git a/strings/bfill.c b/strings/bfill.c index ac5d3096b14..59dc4d273b4 100644 --- a/strings/bfill.c +++ b/strings/bfill.c @@ -12,7 +12,7 @@ code is presented for your interest and amusement. */ -#include <global.h> +#include <my_global.h> #include "m_string.h" #if !defined(bfill) && !defined(HAVE_BFILL) diff --git a/strings/bmove.c b/strings/bmove.c index f63ff0bd4f8..d8ba5478eb0 100644 --- a/strings/bmove.c +++ b/strings/bmove.c @@ -19,7 +19,7 @@ code is presented for your interest and amusement. */ -#include <global.h> +#include <my_global.h> #include "m_string.h" #if !defined(HAVE_BMOVE) && !defined(bmove) diff --git a/strings/bmove512.c b/strings/bmove512.c index 11dc282d05c..7b62ce3a5f0 100644 --- a/strings/bmove512.c +++ b/strings/bmove512.c @@ -27,7 +27,7 @@ fastest way to move a mutiple of 512 byte. */ -#include <global.h> +#include <my_global.h> #include "m_string.h" #ifndef bmove512 diff --git a/strings/bmove_upp.c b/strings/bmove_upp.c index af6575ebf41..5b8f27385de 100644 --- a/strings/bmove_upp.c +++ b/strings/bmove_upp.c @@ -24,7 +24,7 @@ "src-len" to the destination "dst-len" counting downwards. */ -#include <global.h> +#include <my_global.h> #include "m_string.h" #if defined(MC68000) && defined(DS90) diff --git a/strings/ctype-big5.c b/strings/ctype-big5.c index cccf6730046..cf43e6ed61c 100644 --- a/strings/ctype-big5.c +++ b/strings/ctype-big5.c @@ -28,7 +28,7 @@ * .configure. mbmaxlen_big5=2 */ -#include <global.h> +#include <my_global.h> #include "m_string.h" #include "m_ctype.h" diff --git a/strings/ctype-czech.c b/strings/ctype-czech.c index b47eaf3a63f..d3a3e11d310 100644 --- a/strings/ctype-czech.c +++ b/strings/ctype-czech.c @@ -67,7 +67,7 @@ #ifdef REAL_MYSQL -#include <global.h> +#include <my_global.h> #include "m_string.h" #else @@ -427,7 +427,7 @@ my_bool my_like_range_czech(const char *ptr,uint ptr_length,pchar escape, * * definition table reworked by Jaromir Dolecek <dolecek@ics.muni.cz> */ -#include <global.h> +#include <my_global.h> #include "m_string.h" uchar NEAR ctype_czech[257] = { diff --git a/strings/ctype-euc_kr.c b/strings/ctype-euc_kr.c index df6f8c496bc..68beb574062 100644 --- a/strings/ctype-euc_kr.c +++ b/strings/ctype-euc_kr.c @@ -27,7 +27,7 @@ * .configure. mbmaxlen_euc_kr=2 */ -#include <global.h> +#include <my_global.h> #include "m_string.h" uchar NEAR ctype_euc_kr[257] = diff --git a/strings/ctype-gb2312.c b/strings/ctype-gb2312.c index a587d72905e..9bf3b464e5d 100644 --- a/strings/ctype-gb2312.c +++ b/strings/ctype-gb2312.c @@ -25,7 +25,7 @@ * .configure. mbmaxlen_gb2312=2 */ -#include <global.h> +#include <my_global.h> #include "m_string.h" uchar NEAR ctype_gb2312[257] = diff --git a/strings/ctype-gbk.c b/strings/ctype-gbk.c index a5d55789bb8..3f08b039b9d 100644 --- a/strings/ctype-gbk.c +++ b/strings/ctype-gbk.c @@ -28,7 +28,7 @@ */ -#include <global.h> +#include <my_global.h> #include "m_string.h" #include "m_ctype.h" diff --git a/strings/ctype-latin1_de.c b/strings/ctype-latin1_de.c index fa32c6d21f7..afdf4a28d03 100644 --- a/strings/ctype-latin1_de.c +++ b/strings/ctype-latin1_de.c @@ -33,7 +33,7 @@ * .configure. strxfrm_multiply_latin1_de=2 */ -#include <global.h> +#include <my_global.h> #include "m_string.h" #include "m_ctype.h" @@ -320,11 +320,11 @@ my_bool my_like_range_latin1_de(const char *ptr, uint ptr_length, char *min_org = min_str; char *min_end = min_str + res_length; - for (; ptr != end && min_str != min_end; ++ptr) + for (; ptr != end && min_str != min_end; ptr++) { if (*ptr == escape && ptr + 1 != end) { - ++ptr; /* Skip escape */ + ptr++; /* Skip escape */ *min_str++ = *max_str++ = *ptr; continue; } @@ -339,7 +339,7 @@ my_bool my_like_range_latin1_de(const char *ptr, uint ptr_length, *min_length = (uint)(min_str - min_org); *max_length = res_length; do { - *min_str++ = min_sort_char; + *min_str++ = ' '; // Because if key compression *max_str++ = max_sort_char; } while (min_str != min_end); return 0; @@ -347,10 +347,15 @@ my_bool my_like_range_latin1_de(const char *ptr, uint ptr_length, *min_str++ = *max_str++ = *ptr; } *min_length = *max_length = (uint) (min_str - min_org); - while (min_str != min_end) + + /* Temporary fix for handling wild_one at end of string (key compression) */ { - *min_str++ = ' '; /* For proper key compression */ - *max_str++ = ' '; + char *tmp; + for (tmp= min_str ; tmp > min_org && tmp[-1] == '\0';) + *--tmp=' '; } + + while (min_str != min_end) + *min_str++ = *max_str++ = ' '; // Because if key compression return 0; } diff --git a/strings/ctype-sjis.c b/strings/ctype-sjis.c index 9f23d69eb12..ba2c7c3c1e5 100644 --- a/strings/ctype-sjis.c +++ b/strings/ctype-sjis.c @@ -18,7 +18,7 @@ /* This file is for Shift JIS charset, and created by tommy@valley.ne.jp. */ -#include <global.h> +#include <my_global.h> #include "m_string.h" #include "m_ctype.h" diff --git a/strings/ctype-tis620.c b/strings/ctype-tis620.c index 1c0acc38e24..736bfbd810f 100644 --- a/strings/ctype-tis620.c +++ b/strings/ctype-tis620.c @@ -27,7 +27,7 @@ * .configure. strxfrm_multiply_tis620=4 */ -#include <global.h> +#include <my_global.h> #include <my_sys.h> #include "m_string.h" #include "m_ctype.h" diff --git a/strings/ctype-ujis.c b/strings/ctype-ujis.c index d994a2e5e96..d5d48c31309 100644 --- a/strings/ctype-ujis.c +++ b/strings/ctype-ujis.c @@ -8,7 +8,7 @@ * .configure. mbmaxlen_ujis=3 */ -#include <global.h> +#include <my_global.h> #include "m_string.h" uchar NEAR ctype_ujis[257] = diff --git a/strings/ctype.c b/strings/ctype.c index a0e183a89d6..b343ff44bcd 100644 --- a/strings/ctype.c +++ b/strings/ctype.c @@ -15,7 +15,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ -#include <global.h> +#include <my_global.h> #include <m_ctype.h> #include <m_string.h> diff --git a/strings/do_ctype.c b/strings/do_ctype.c index e05926bf8d3..d035acf2915 100644 --- a/strings/do_ctype.c +++ b/strings/do_ctype.c @@ -22,7 +22,7 @@ #undef DBUG_OFF #endif -#include <global.h> +#include <my_global.h> #include <ctype.h> #include <my_sys.h> #include "m_string.h" diff --git a/strings/int2str.c b/strings/int2str.c index 4003e8a6167..813daee2f5c 100644 --- a/strings/int2str.c +++ b/strings/int2str.c @@ -39,7 +39,7 @@ itoa assumes that 10 -base numbers are allways signed and other arn't. */ -#include <global.h> +#include <my_global.h> #include "m_string.h" char NEAR _dig_vec[] = diff --git a/strings/is_prefix.c b/strings/is_prefix.c index d3f2b148de2..5fb29f87ceb 100644 --- a/strings/is_prefix.c +++ b/strings/is_prefix.c @@ -23,7 +23,7 @@ A empty t is allways a prefix. */ -#include <global.h> +#include <my_global.h> #include "m_string.h" int is_prefix(register const char *s, register const char *t) diff --git a/strings/llstr.c b/strings/llstr.c index 470645a4f65..3e935c699fb 100644 --- a/strings/llstr.c +++ b/strings/llstr.c @@ -26,7 +26,7 @@ */ -#include <global.h> +#include <my_global.h> #include "m_string.h" char *llstr(longlong value,char *buff) diff --git a/strings/longlong2str.c b/strings/longlong2str.c index 5c4eaf98c85..fe4d419a6d6 100644 --- a/strings/longlong2str.c +++ b/strings/longlong2str.c @@ -39,7 +39,7 @@ itoa assumes that 10 -base numbers are allways signed and other arn't. */ -#include <global.h> +#include <my_global.h> #include "m_string.h" #if defined(HAVE_LONG_LONG) && !defined(longlong2str) && !defined(HAVE_LONGLONG2STR) diff --git a/strings/r_strinstr.c b/strings/r_strinstr.c index 882a4eda412..364102cc1ac 100644 --- a/strings/r_strinstr.c +++ b/strings/r_strinstr.c @@ -24,7 +24,7 @@ the pattern counted from the begining of the string. */ -#include <global.h> +#include <my_global.h> #include "m_string.h" uint r_strinstr(reg1 my_string str,int from, reg4 my_string search) diff --git a/strings/str2int.c b/strings/str2int.c index 55fcd56adb9..7f42b0280ce 100644 --- a/strings/str2int.c +++ b/strings/str2int.c @@ -39,7 +39,7 @@ call has no problems. */ -#include <global.h> +#include <my_global.h> #include "m_string.h" #include "m_ctype.h" #include "my_sys.h" /* defines errno */ diff --git a/strings/str_test.c b/strings/str_test.c index bd54bc6d806..feaa1bc487d 100644 --- a/strings/str_test.c +++ b/strings/str_test.c @@ -17,7 +17,7 @@ /* Test of all stringfunktions that is coded in assembler */ -#include <global.h> +#include <my_global.h> #include <stdarg.h> #include "m_string.h" diff --git a/strings/strappend.c b/strings/strappend.c index d5defaeb0bf..d1c8ce97f43 100644 --- a/strings/strappend.c +++ b/strings/strappend.c @@ -25,7 +25,7 @@ trunked. The des+len character is allways set to NULL. */ -#include <global.h> +#include <my_global.h> #include "m_string.h" diff --git a/strings/strcend.c b/strings/strcend.c index 246b81d7f7b..d4a41ca5311 100644 --- a/strings/strcend.c +++ b/strings/strcend.c @@ -24,7 +24,7 @@ occurs, or a pointer to the end-null of s if c does not occur in s. */ -#include <global.h> +#include <my_global.h> #include "m_string.h" #if defined(MC68000) && defined(DS90) diff --git a/strings/strcont.c b/strings/strcont.c index 5c7d5d2e55f..d4e903a1763 100644 --- a/strings/strcont.c +++ b/strings/strcont.c @@ -26,7 +26,7 @@ */ -#include <global.h> +#include <my_global.h> #include "m_string.h" my_string strcont(reg1 const char *str,reg2 const char *set) diff --git a/strings/strend.c b/strings/strend.c index 18b9d1fbd0d..56bc4ade829 100644 --- a/strings/strend.c +++ b/strings/strend.c @@ -10,7 +10,7 @@ Beware: the asm version works only if strlen(s) < 65535. */ -#include <global.h> +#include <my_global.h> #include "m_string.h" #if VaxAsm diff --git a/strings/strfill.c b/strings/strfill.c index ef0ccb567d1..2f9bfc137b3 100644 --- a/strings/strfill.c +++ b/strings/strfill.c @@ -25,7 +25,7 @@ strfill() returns pointer to dest+len; */ -#include <global.h> +#include <my_global.h> #include "m_string.h" my_string strfill(my_string s,uint len,pchar fill) diff --git a/strings/strings-not-used.h b/strings/strings-not-used.h index fa4dff318f5..3514cce6ec5 100644 --- a/strings/strings-not-used.h +++ b/strings/strings-not-used.h @@ -13,7 +13,7 @@ #ifndef NullS -#include <global.h> /* Define standar vars */ +#include <my_global.h> /* Define standar vars */ #include "m_string.h" #define NUL '\0' diff --git a/strings/strinstr.c b/strings/strinstr.c index e1d502f4004..8ebd6afb3df 100644 --- a/strings/strinstr.c +++ b/strings/strinstr.c @@ -27,7 +27,7 @@ char is 1. */ -#include <global.h> +#include <my_global.h> #include "m_string.h" uint strinstr(reg1 const char *str,reg4 const char *search) diff --git a/strings/strmake.c b/strings/strmake.c index d4edce689a5..6f02e4007c8 100644 --- a/strings/strmake.c +++ b/strings/strmake.c @@ -25,7 +25,7 @@ strmake() returns pointer to closing null; */ -#include <global.h> +#include <my_global.h> #include "m_string.h" #ifdef BAD_STRING_COMPILER diff --git a/strings/strmov.c b/strings/strmov.c index 8f5beb41f41..5502c40b7ec 100644 --- a/strings/strmov.c +++ b/strings/strmov.c @@ -23,7 +23,7 @@ into dst, which seems useful. */ -#include <global.h> +#include <my_global.h> #include "m_string.h" #ifdef BAD_STRING_COMPILER diff --git a/strings/strnlen.c b/strings/strnlen.c index 3d625f7d48a..b630edecee6 100644 --- a/strings/strnlen.c +++ b/strings/strnlen.c @@ -22,7 +22,7 @@ strnlen(s, len) returns the length of s or len if s is longer than len. */ -#include <global.h> +#include <my_global.h> #include "m_string.h" #ifndef HAVE_STRNLEN diff --git a/strings/strnmov.c b/strings/strnmov.c index ffc4a62f75e..5b3e3b3b7cf 100644 --- a/strings/strnmov.c +++ b/strings/strnmov.c @@ -22,7 +22,7 @@ truncated. */ -#include <global.h> +#include <my_global.h> #include "m_string.h" char *strnmov(register char *dst, register const char *src, uint n) diff --git a/strings/strstr.c b/strings/strstr.c index 572bf88c95c..00355bc8165 100644 --- a/strings/strstr.c +++ b/strings/strstr.c @@ -10,7 +10,7 @@ */ -#include <global.h> +#include <my_global.h> #include "m_string.h" #ifndef HAVE_STRSTR diff --git a/strings/strto.c b/strings/strto.c index 64b1c9a5ae9..adada98e143 100644 --- a/strings/strto.c +++ b/strings/strto.c @@ -36,7 +36,7 @@ it can be compiled with the UNSIGNED and/or LONGLONG flag set */ -#include <global.h> +#include <my_global.h> #include "m_string.h" #include "m_ctype.h" #include "my_sys.h" /* defines errno */ diff --git a/strings/strtol.c b/strings/strtol.c index 87fe0d22cf3..912c42ba3cf 100644 --- a/strings/strtol.c +++ b/strings/strtol.c @@ -17,7 +17,7 @@ /* This defines strtol() if neaded */ -#include <global.h> +#include <my_global.h> #if !defined(MSDOS) && !defined(HAVE_STRTOL) && !defined(__WIN__) #include "strto.c" #endif diff --git a/strings/strtoll.c b/strings/strtoll.c index 678c28649ef..6050eba28b0 100644 --- a/strings/strtoll.c +++ b/strings/strtoll.c @@ -17,7 +17,7 @@ /* This is defines strtoll() if neaded */ -#include <global.h> +#include <my_global.h> #include <m_string.h> #if !defined(HAVE_STRTOLL) && defined(HAVE_LONG_LONG) #define USE_LONGLONG diff --git a/strings/strtoul.c b/strings/strtoul.c index e49a9ebea6a..ac9313f67da 100644 --- a/strings/strtoul.c +++ b/strings/strtoul.c @@ -17,7 +17,7 @@ /* This is defines strtoul() if neaded */ -#include <global.h> +#include <my_global.h> #if !defined(MSDOS) && !defined(HAVE_STRTOUL) #define USE_UNSIGNED #include "strto.c" diff --git a/strings/strtoull.c b/strings/strtoull.c index 74dab95b801..104885e70d0 100644 --- a/strings/strtoull.c +++ b/strings/strtoull.c @@ -17,7 +17,7 @@ /* This is defines strtoull() */ -#include <global.h> +#include <my_global.h> #include <m_string.h> #if !defined(HAVE_STRTOULL) && defined(HAVE_LONG_LONG) #define USE_UNSIGNED diff --git a/strings/strxmov.c b/strings/strxmov.c index 7ee1d303ee8..c1a7d1c4058 100644 --- a/strings/strxmov.c +++ b/strings/strxmov.c @@ -13,7 +13,7 @@ character pointer, or not the same bit pattern as NullS. */ -#include <global.h> +#include <my_global.h> #include "m_string.h" #include <stdarg.h> diff --git a/strings/strxnmov.c b/strings/strxnmov.c index b55a2e0ab79..c8c14394e84 100644 --- a/strings/strxnmov.c +++ b/strings/strxnmov.c @@ -20,7 +20,7 @@ needed. */ -#include <global.h> +#include <my_global.h> #include "m_string.h" #include <stdarg.h> diff --git a/strings/udiv.c b/strings/udiv.c index 07af323a706..3efba5e149e 100644 --- a/strings/udiv.c +++ b/strings/udiv.c @@ -17,7 +17,7 @@ /* Do udiv and urem if machine dosn't have it */ -#include <global.h> +#include <my_global.h> #include <math.h> unsigned long udiv(long unsigned int a, long unsigned int b) diff --git a/tools/mysqlmanager.c b/tools/mysqlmanager.c index 3572dde67d3..29ff1d50d6c 100644 --- a/tools/mysqlmanager.c +++ b/tools/mysqlmanager.c @@ -20,7 +20,7 @@ * Sasha Pachev <sasha@mysql.com> **/ -#include <global.h> +#include <my_global.h> #include <my_sys.h> #include <m_string.h> #include <mysql.h> diff --git a/vio/test-ssl b/vio/test-ssl Binary files differindex fefa3fce263..16b841f9268 100755 --- a/vio/test-ssl +++ b/vio/test-ssl diff --git a/vio/test-ssl.c b/vio/test-ssl.c index f47655c99ab..0ae90f5001f 100644 --- a/vio/test-ssl.c +++ b/vio/test-ssl.c @@ -1,4 +1,4 @@ -#include <global.h> +#include <my_global.h> #ifdef HAVE_OPENSSL #include <my_sys.h> #include <m_string.h> diff --git a/vio/test-sslclient.c b/vio/test-sslclient.c index 7abac7dad9f..c19a3589009 100644 --- a/vio/test-sslclient.c +++ b/vio/test-sslclient.c @@ -1,4 +1,4 @@ -#include <global.h> +#include <my_global.h> #ifdef HAVE_OPENSSL #include <my_sys.h> #include <m_string.h> diff --git a/vio/test-sslserver.c b/vio/test-sslserver.c index ad4f653ffa6..bad141dff17 100644 --- a/vio/test-sslserver.c +++ b/vio/test-sslserver.c @@ -1,4 +1,4 @@ -#include <global.h> +#include <my_global.h> #ifdef HAVE_OPENSSL #include <my_sys.h> #include <m_string.h> diff --git a/vio/vio.c b/vio/vio.c index 96cb0c31ef6..15a12bb958d 100644 --- a/vio/vio.c +++ b/vio/vio.c @@ -22,7 +22,7 @@ */ #define DONT_MAP_VIO -#include <global.h> +#include <my_global.h> #include <mysql_com.h> #include <violite.h> diff --git a/vio/viosocket.c b/vio/viosocket.c index d5573cdfa64..667e9b2b118 100644 --- a/vio/viosocket.c +++ b/vio/viosocket.c @@ -23,7 +23,7 @@ */ #define DONT_MAP_VIO -#include <global.h> +#include <my_global.h> #include <mysql_com.h> #include <errno.h> diff --git a/vio/viossl.c b/vio/viossl.c index 8b1a51845be..c6f70081d18 100644 --- a/vio/viossl.c +++ b/vio/viossl.c @@ -22,7 +22,7 @@ the file descriptior. */ -#include <global.h> +#include <my_global.h> #ifdef HAVE_OPENSSL diff --git a/vio/viosslfactories.c b/vio/viosslfactories.c index ebfb860d0ca..077807726fe 100644 --- a/vio/viosslfactories.c +++ b/vio/viosslfactories.c @@ -16,7 +16,7 @@ MA 02111-1307, USA */ -#include <global.h> +#include <my_global.h> #ifdef HAVE_OPENSSL diff --git a/vio/viotest-ssl.c b/vio/viotest-ssl.c index 02d47a11294..5cdbd12a3db 100644 --- a/vio/viotest-ssl.c +++ b/vio/viotest-ssl.c @@ -1,4 +1,4 @@ -#include <global.h> +#include <my_global.h> #ifdef HAVE_OPENSSL #include <my_sys.h> #include <m_string.h> |