Loading Build-tools/Do-compile +9 −3 Original line number Diff line number Diff line Loading @@ -2,12 +2,12 @@ use Getopt::Long; $opt_distribution=$opt_user=$opt_result=$opt_config_options=$opt_config_env=""; $opt_dbd_options=$opt_perl_options=$opt_suffix=""; $opt_dbd_options=$opt_perl_options=$opt_make_options=$opt_suffix=""; $opt_tmp=$opt_version_suffix=""; $opt_help=$opt_Information=$opt_delete=$opt_debug=$opt_stage=$opt_rsh_mail=$opt_no_test=$opt_no_perl=$opt_with_low_memory=$opt_fast_benchmark=$opt_static_client=$opt_static_server=$opt_static_perl=$opt_sur=$opt_with_small_disk=$opt_local_perl=$opt_tcpip=$opt_build_thread=$opt_no_mysqltest=$opt_use_old_distribution=$opt_enable_shared=$opt_no_crash_me=$opt_no_strip=0; $opt_innodb=$opt_bdb=0; GetOptions("Information","help","distribution=s","user=s","result=s","delete","no-test","no-mysqltest","perl-files=s","debug","config-options=s","config-env=s","stage=i","rsh-mail","with-low-memory","fast-benchmark","tmp=s","static-client","static-server","static-perl","no-perl","local-perl","perl-options=s","sur","with-small-disk","dbd-options=s","tcpip","suffix=s","build-thread=i","innodb","bdb","use-old-distribution","enable-shared","no-crash-me","no-strip","version-suffix=s", "with-other-libc=s") || usage(); GetOptions("Information","help","distribution=s","user=s","result=s","delete","no-test","no-mysqltest","perl-files=s","debug","config-options=s","config-env=s","stage=i","rsh-mail","with-low-memory","fast-benchmark","tmp=s","static-client","static-server","static-perl","no-perl","local-perl","perl-options=s","make-options=s", "sur","with-small-disk","dbd-options=s","tcpip","suffix=s","build-thread=i","innodb","bdb","use-old-distribution","enable-shared","no-crash-me","no-strip","version-suffix=s", "with-other-libc=s") || usage(); usage() if ($opt_help || $opt_Information); usage() if (!$opt_distribution); Loading Loading @@ -172,8 +172,11 @@ if ($opt_stage <= 1) if ($opt_stage <= 2) { my ($command); unlink($opt_distribution) if ($opt_delete && !$opt_use_old_distribution); safe_system("$make"); $command=$make; $command.= " $opt_make_options" if (defined($opt_make_options) && $opt_make_options ne ""); safe_system($command); } # Loading Loading @@ -368,6 +371,9 @@ To set up the environment, like 'CC=cc CXX=gcc CXXFLAGS=-O3' --dbd-options 'options' Options for Makefile.PL when configuring msql-mysql-modules. --make-options 'options' Options to make after configure. (Like 'CXXLD=gcc') --version-suffix suffix Can be used to set a suffix (normally 'com' or '-max') for a distribution Loading Docs/manual.texi +60 −57 Original line number Diff line number Diff line Loading @@ -5710,7 +5710,8 @@ FreeBSD 2.x with the included MIT-pthreads package. @xref{FreeBSD}. @item FreeBSD 3.x and 4.x with native threads. @xref{FreeBSD}. @item HP-UX 10.20 with the included MIT-pthreads package. @xref{HP-UX 10.20}. HP-UX 10.20 with the DCE threads or the included MIT-pthreads package. @xref{HP-UX 10.20}. @item HP-UX 11.x with the native threads. @xref{HP-UX 11.x}. @item Loading Loading @@ -10396,25 +10397,15 @@ compiler, because @code{gcc} produces better code! We recommend using gcc 2.95 on HP-UX. Don't use high optimisation flags (like -O6) as this may not be safe on HP-UX. Note that MIT-pthreads can't be compiled with the HP-UX compiler because it can't compile @code{.S} (assembler) files. The following configure line should work: The following configure line should work with gcc 2.95: @example CFLAGS="-DHPUX -I/opt/dce/include -fpic" \ CXXFLAGS="-DHPUX -I/opt/dce/include -felide-constructors -fno-exceptions \ CFLAGS="-I/opt/dce/include -fpic" \ CXXFLAGS="-I/opt/dce/include -felide-constructors -fno-exceptions \ -fno-rtti" CXX=gcc ./configure --with-pthread \ --with-named-thread-libs='-ldce' --prefix=/usr/local/mysql --disable-shared @end example If you are compiling @code{gcc} 2.95 yourself, you should NOT link it with the DCE libraries (@code{libdce.a} or @code{libcma.a}) if you want to compile MySQL with MIT-pthreads. If you mix the DCE and MIT-pthreads packages you will get a @code{mysqld} to which you cannot connect. Remove the DCE libraries while you compile @code{gcc} 2.95! @node HP-UX 11.x, IBM-AIX, HP-UX 10.20, Other Unix Notes @subsubsection HP-UX Version 11.x Notes Loading Loading @@ -14146,9 +14137,9 @@ IP address to bind to. Directory where character sets are. @xref{Character sets}. @item --chroot=path Chroot @code{mysqld} daemon during startup. Recommended security measure. It will somewhat limit @code{LOAD DATA INFILE} and @code{SELECT ... INTO OUTFILE} though. Put @code{mysqld} daemon in chroot environment at startup. Recommended security measure. It somewhat limits @code{LOAD DATA INFILE} and @code{SELECT ... INTO OUTFILE} though. @item --core-file Write a core file if @code{mysqld} dies. For some systems you must also Loading Loading @@ -28290,7 +28281,7 @@ in ANSI mode. @xref{ANSI mode}. @multitable @columnfractions .15 .15 .70 @item @strong{Identifier} @tab @strong{Max length} @tab @strong{Allowed characters} @item Database @tab 64 @tab Any character that is allowed in a directory name except @samp{/} or @samp{.}. @item Database @tab 64 @tab Any character that is allowed in a directory name except @samp{/}, @samp{\} or @samp{.}. @item Table @tab 64 @tab Any character that is allowed in a file name, except @samp{/} or @samp{.}. @item Column @tab 64 @tab All characters. @item Alias @tab 255 @tab All characters. Loading Loading @@ -30746,6 +30737,22 @@ mysql> SELECT 1 && 0; mysql> SELECT 1 && NULL; -> NULL @end example @findex XOR, logical @item XOR Logical XOR. For non-@code{NULL} operands, evaluates to @code{1} if only one of the operators is non-zero. Produces @code{NULL} if either operand is @code{NULL}: @example mysql> SELECT 1 XOR 1; -> 0 mysql> SELECT 1 XOR 0; -> 1 mysql> SELECT 1 XOR NULL; -> NULL @end example @code{a XOR b} is equal to @code{(a AND (NOT b)) OR ((NOT a) and b)}. @end table Loading Loading @@ -32817,7 +32824,7 @@ The result is an unsigned 64-bit integer. @findex & (bitwise AND) @findex AND, bitwise @item & Bitwise AND: Bitwise AND @example mysql> SELECT 29 & 15; -> 13 Loading @@ -32825,6 +32832,21 @@ mysql> SELECT 29 & 15; The result is an unsigned 64-bit integer. @findex ^ (bitwise XOR) @findex XOR, bitwise @item ^ Bitwise XOR @example mysql> SELECT 1 ^ 1; -> 0 mysql> SELECT 1 ^ 0; -> 1 mysql> SELECT 11 ^ 3; -> 8 @end example The result is an unsigned 64-bit integer. @findex << (left shift) @item << Shifts a longlong (@code{BIGINT}) number to the left: Loading Loading @@ -33215,6 +33237,8 @@ string to perform cooperative advisory locking: @example mysql> SELECT GET_LOCK("lock1",10); -> 1 mysql> SELECT IS_FREE_LOCK("lock2"); -> 1 mysql> SELECT GET_LOCK("lock2",10); -> 1 mysql> SELECT RELEASE_LOCK("lock2"); Loading @@ -33239,6 +33263,13 @@ been released. The @code{DO} statement is convinient to use with @code{RELEASE_LOCK()}. @xref{DO}. @findex IS_FREE_LOCK() @item IS_FREE_LOCK(str) Checks if the the lock named @code{str} is free to use (i.e., not locked). Returns @code{1} if the lock is free (no one is using the lock), @code{0} if the lock is in use, and @code{NULL} on errors (like incorrect arguments). @findex BENCHMARK() @item BENCHMARK(count,expr) The @code{BENCHMARK()} function executes the expression @code{expr} Loading Loading @@ -49578,47 +49609,19 @@ Our TODO section contains what we plan to have in 4.0. @xref{TODO MySQL 4.0}. @itemize @bullet @item Added binary XOR. The one that with a query like : @example SELECT 11 ^ 3; @end example returns 8. Based on code contributed by Hartmut Holzgraefe @email{hartmut@@six.de}. Changed @code{--chroot=path} option to execute @code{chroot()} immediately after all options have been parsed. @item Added logical XOR. The one that with a query like: @example SELECT 1 XOR 1; @end example returns 0; Based on code contributed by Hartmut Holzgraefe @email{hartmut@@six.de}. Don't allow database names that contain @samp{\}. @item Add function @code{CHECK_LOCK("lock_name")}. This function returns a value indicating whether or not the lock with the given name is available. It does not attempt to acquire a lock. It is used like this: @example SELECT CHECK_LOCK("some_lock"); @end example @code{CHECK_LOCK()} returns 1 if the lock is available, 0 if the lock is held by any process (including the current process), and @code{NULL} if an error occurs. @code{lower_case_table_names} now also affects created and dropped databases. @item Added @code{XOR} operator (logical and bitwise @code{XOR}) with @code{^} as a synonym for bitwise @code{XOR}. Added function @code{IS_FREE_LOCK("lock_name")}. Based on code contributed by Hartmut Holzgraefe @email{hartmut@@six.de}. @item Removed @code{mysql_ssl_clear()}, as this was not needed. Removed @code{mysql_ssl_clear()}, as it was not needed. @item @code{DECIMAL} and @code{NUMERIC} types can now read exponential numbers. @item Loading Loading @@ -50225,7 +50228,7 @@ Added @code{@@@@VERSION} as a synonym for @code{VERSION()}. @item @code{SHOW VARIABLES LIKE 'xxx'} is now case-insensitive. @item Fixed timeout for @code{GET_LOCK()} on HPUX with DCE threads. Fixed timeout for @code{GET_LOCK()} on HP-UX with DCE threads. @item Fixed memory allocation bug in the glibc library used to build Linux binaries, which caused mysqld to die in 'free()'. acinclude.m4 +6 −4 Original line number Diff line number Diff line Loading @@ -1211,8 +1211,10 @@ changequote(, )dnl hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*) changequote([, ])dnl if test "$GCC" = yes; then if $CC -v 2>&1 | grep 'version 2.95' > /dev/null 2>&1; then ac_cv_sys_largefile_CFLAGS=-D__STDC_EXT__ fi fi ;; # IRIX 6.2 and later require cc -n32. changequote(, )dnl Loading client/mysql.cc +3 −7 Original line number Diff line number Diff line Loading @@ -1269,12 +1269,10 @@ You can turn off this feature to get a quicker startup with -A\n\n"); /* for gnu readline */ #ifndef HAVE_INDEX #ifdef __cplusplus extern "C" { #endif extern char *index(const char *,pchar c),*rindex(const char *,pchar); extern char *index(const char *,int c),*rindex(const char *,int); char *index(const char *s,pchar c) char *index(const char *s,int c) { for (;;) { Loading @@ -1283,7 +1281,7 @@ char *index(const char *s,pchar c) } } char *rindex(const char *s,pchar c) char *rindex(const char *s,int c) { reg3 char *t; Loading @@ -1291,10 +1289,8 @@ char *rindex(const char *s,pchar c) do if (*s == (char) c) t = (char*) s; while (*s++); return (char*) t; } #ifdef __cplusplus } #endif #endif #endif /* HAVE_READLINE */ Loading client/mysqlbinlog.cc +2 −0 Original line number Diff line number Diff line Loading @@ -552,3 +552,5 @@ int main(int argc, char** argv) #else #include "log_event.cc" #endif FIX_GCC_LINKING_PROBLEM Loading
Build-tools/Do-compile +9 −3 Original line number Diff line number Diff line Loading @@ -2,12 +2,12 @@ use Getopt::Long; $opt_distribution=$opt_user=$opt_result=$opt_config_options=$opt_config_env=""; $opt_dbd_options=$opt_perl_options=$opt_suffix=""; $opt_dbd_options=$opt_perl_options=$opt_make_options=$opt_suffix=""; $opt_tmp=$opt_version_suffix=""; $opt_help=$opt_Information=$opt_delete=$opt_debug=$opt_stage=$opt_rsh_mail=$opt_no_test=$opt_no_perl=$opt_with_low_memory=$opt_fast_benchmark=$opt_static_client=$opt_static_server=$opt_static_perl=$opt_sur=$opt_with_small_disk=$opt_local_perl=$opt_tcpip=$opt_build_thread=$opt_no_mysqltest=$opt_use_old_distribution=$opt_enable_shared=$opt_no_crash_me=$opt_no_strip=0; $opt_innodb=$opt_bdb=0; GetOptions("Information","help","distribution=s","user=s","result=s","delete","no-test","no-mysqltest","perl-files=s","debug","config-options=s","config-env=s","stage=i","rsh-mail","with-low-memory","fast-benchmark","tmp=s","static-client","static-server","static-perl","no-perl","local-perl","perl-options=s","sur","with-small-disk","dbd-options=s","tcpip","suffix=s","build-thread=i","innodb","bdb","use-old-distribution","enable-shared","no-crash-me","no-strip","version-suffix=s", "with-other-libc=s") || usage(); GetOptions("Information","help","distribution=s","user=s","result=s","delete","no-test","no-mysqltest","perl-files=s","debug","config-options=s","config-env=s","stage=i","rsh-mail","with-low-memory","fast-benchmark","tmp=s","static-client","static-server","static-perl","no-perl","local-perl","perl-options=s","make-options=s", "sur","with-small-disk","dbd-options=s","tcpip","suffix=s","build-thread=i","innodb","bdb","use-old-distribution","enable-shared","no-crash-me","no-strip","version-suffix=s", "with-other-libc=s") || usage(); usage() if ($opt_help || $opt_Information); usage() if (!$opt_distribution); Loading Loading @@ -172,8 +172,11 @@ if ($opt_stage <= 1) if ($opt_stage <= 2) { my ($command); unlink($opt_distribution) if ($opt_delete && !$opt_use_old_distribution); safe_system("$make"); $command=$make; $command.= " $opt_make_options" if (defined($opt_make_options) && $opt_make_options ne ""); safe_system($command); } # Loading Loading @@ -368,6 +371,9 @@ To set up the environment, like 'CC=cc CXX=gcc CXXFLAGS=-O3' --dbd-options 'options' Options for Makefile.PL when configuring msql-mysql-modules. --make-options 'options' Options to make after configure. (Like 'CXXLD=gcc') --version-suffix suffix Can be used to set a suffix (normally 'com' or '-max') for a distribution Loading
Docs/manual.texi +60 −57 Original line number Diff line number Diff line Loading @@ -5710,7 +5710,8 @@ FreeBSD 2.x with the included MIT-pthreads package. @xref{FreeBSD}. @item FreeBSD 3.x and 4.x with native threads. @xref{FreeBSD}. @item HP-UX 10.20 with the included MIT-pthreads package. @xref{HP-UX 10.20}. HP-UX 10.20 with the DCE threads or the included MIT-pthreads package. @xref{HP-UX 10.20}. @item HP-UX 11.x with the native threads. @xref{HP-UX 11.x}. @item Loading Loading @@ -10396,25 +10397,15 @@ compiler, because @code{gcc} produces better code! We recommend using gcc 2.95 on HP-UX. Don't use high optimisation flags (like -O6) as this may not be safe on HP-UX. Note that MIT-pthreads can't be compiled with the HP-UX compiler because it can't compile @code{.S} (assembler) files. The following configure line should work: The following configure line should work with gcc 2.95: @example CFLAGS="-DHPUX -I/opt/dce/include -fpic" \ CXXFLAGS="-DHPUX -I/opt/dce/include -felide-constructors -fno-exceptions \ CFLAGS="-I/opt/dce/include -fpic" \ CXXFLAGS="-I/opt/dce/include -felide-constructors -fno-exceptions \ -fno-rtti" CXX=gcc ./configure --with-pthread \ --with-named-thread-libs='-ldce' --prefix=/usr/local/mysql --disable-shared @end example If you are compiling @code{gcc} 2.95 yourself, you should NOT link it with the DCE libraries (@code{libdce.a} or @code{libcma.a}) if you want to compile MySQL with MIT-pthreads. If you mix the DCE and MIT-pthreads packages you will get a @code{mysqld} to which you cannot connect. Remove the DCE libraries while you compile @code{gcc} 2.95! @node HP-UX 11.x, IBM-AIX, HP-UX 10.20, Other Unix Notes @subsubsection HP-UX Version 11.x Notes Loading Loading @@ -14146,9 +14137,9 @@ IP address to bind to. Directory where character sets are. @xref{Character sets}. @item --chroot=path Chroot @code{mysqld} daemon during startup. Recommended security measure. It will somewhat limit @code{LOAD DATA INFILE} and @code{SELECT ... INTO OUTFILE} though. Put @code{mysqld} daemon in chroot environment at startup. Recommended security measure. It somewhat limits @code{LOAD DATA INFILE} and @code{SELECT ... INTO OUTFILE} though. @item --core-file Write a core file if @code{mysqld} dies. For some systems you must also Loading Loading @@ -28290,7 +28281,7 @@ in ANSI mode. @xref{ANSI mode}. @multitable @columnfractions .15 .15 .70 @item @strong{Identifier} @tab @strong{Max length} @tab @strong{Allowed characters} @item Database @tab 64 @tab Any character that is allowed in a directory name except @samp{/} or @samp{.}. @item Database @tab 64 @tab Any character that is allowed in a directory name except @samp{/}, @samp{\} or @samp{.}. @item Table @tab 64 @tab Any character that is allowed in a file name, except @samp{/} or @samp{.}. @item Column @tab 64 @tab All characters. @item Alias @tab 255 @tab All characters. Loading Loading @@ -30746,6 +30737,22 @@ mysql> SELECT 1 && 0; mysql> SELECT 1 && NULL; -> NULL @end example @findex XOR, logical @item XOR Logical XOR. For non-@code{NULL} operands, evaluates to @code{1} if only one of the operators is non-zero. Produces @code{NULL} if either operand is @code{NULL}: @example mysql> SELECT 1 XOR 1; -> 0 mysql> SELECT 1 XOR 0; -> 1 mysql> SELECT 1 XOR NULL; -> NULL @end example @code{a XOR b} is equal to @code{(a AND (NOT b)) OR ((NOT a) and b)}. @end table Loading Loading @@ -32817,7 +32824,7 @@ The result is an unsigned 64-bit integer. @findex & (bitwise AND) @findex AND, bitwise @item & Bitwise AND: Bitwise AND @example mysql> SELECT 29 & 15; -> 13 Loading @@ -32825,6 +32832,21 @@ mysql> SELECT 29 & 15; The result is an unsigned 64-bit integer. @findex ^ (bitwise XOR) @findex XOR, bitwise @item ^ Bitwise XOR @example mysql> SELECT 1 ^ 1; -> 0 mysql> SELECT 1 ^ 0; -> 1 mysql> SELECT 11 ^ 3; -> 8 @end example The result is an unsigned 64-bit integer. @findex << (left shift) @item << Shifts a longlong (@code{BIGINT}) number to the left: Loading Loading @@ -33215,6 +33237,8 @@ string to perform cooperative advisory locking: @example mysql> SELECT GET_LOCK("lock1",10); -> 1 mysql> SELECT IS_FREE_LOCK("lock2"); -> 1 mysql> SELECT GET_LOCK("lock2",10); -> 1 mysql> SELECT RELEASE_LOCK("lock2"); Loading @@ -33239,6 +33263,13 @@ been released. The @code{DO} statement is convinient to use with @code{RELEASE_LOCK()}. @xref{DO}. @findex IS_FREE_LOCK() @item IS_FREE_LOCK(str) Checks if the the lock named @code{str} is free to use (i.e., not locked). Returns @code{1} if the lock is free (no one is using the lock), @code{0} if the lock is in use, and @code{NULL} on errors (like incorrect arguments). @findex BENCHMARK() @item BENCHMARK(count,expr) The @code{BENCHMARK()} function executes the expression @code{expr} Loading Loading @@ -49578,47 +49609,19 @@ Our TODO section contains what we plan to have in 4.0. @xref{TODO MySQL 4.0}. @itemize @bullet @item Added binary XOR. The one that with a query like : @example SELECT 11 ^ 3; @end example returns 8. Based on code contributed by Hartmut Holzgraefe @email{hartmut@@six.de}. Changed @code{--chroot=path} option to execute @code{chroot()} immediately after all options have been parsed. @item Added logical XOR. The one that with a query like: @example SELECT 1 XOR 1; @end example returns 0; Based on code contributed by Hartmut Holzgraefe @email{hartmut@@six.de}. Don't allow database names that contain @samp{\}. @item Add function @code{CHECK_LOCK("lock_name")}. This function returns a value indicating whether or not the lock with the given name is available. It does not attempt to acquire a lock. It is used like this: @example SELECT CHECK_LOCK("some_lock"); @end example @code{CHECK_LOCK()} returns 1 if the lock is available, 0 if the lock is held by any process (including the current process), and @code{NULL} if an error occurs. @code{lower_case_table_names} now also affects created and dropped databases. @item Added @code{XOR} operator (logical and bitwise @code{XOR}) with @code{^} as a synonym for bitwise @code{XOR}. Added function @code{IS_FREE_LOCK("lock_name")}. Based on code contributed by Hartmut Holzgraefe @email{hartmut@@six.de}. @item Removed @code{mysql_ssl_clear()}, as this was not needed. Removed @code{mysql_ssl_clear()}, as it was not needed. @item @code{DECIMAL} and @code{NUMERIC} types can now read exponential numbers. @item Loading Loading @@ -50225,7 +50228,7 @@ Added @code{@@@@VERSION} as a synonym for @code{VERSION()}. @item @code{SHOW VARIABLES LIKE 'xxx'} is now case-insensitive. @item Fixed timeout for @code{GET_LOCK()} on HPUX with DCE threads. Fixed timeout for @code{GET_LOCK()} on HP-UX with DCE threads. @item Fixed memory allocation bug in the glibc library used to build Linux binaries, which caused mysqld to die in 'free()'.
acinclude.m4 +6 −4 Original line number Diff line number Diff line Loading @@ -1211,8 +1211,10 @@ changequote(, )dnl hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*) changequote([, ])dnl if test "$GCC" = yes; then if $CC -v 2>&1 | grep 'version 2.95' > /dev/null 2>&1; then ac_cv_sys_largefile_CFLAGS=-D__STDC_EXT__ fi fi ;; # IRIX 6.2 and later require cc -n32. changequote(, )dnl Loading
client/mysql.cc +3 −7 Original line number Diff line number Diff line Loading @@ -1269,12 +1269,10 @@ You can turn off this feature to get a quicker startup with -A\n\n"); /* for gnu readline */ #ifndef HAVE_INDEX #ifdef __cplusplus extern "C" { #endif extern char *index(const char *,pchar c),*rindex(const char *,pchar); extern char *index(const char *,int c),*rindex(const char *,int); char *index(const char *s,pchar c) char *index(const char *s,int c) { for (;;) { Loading @@ -1283,7 +1281,7 @@ char *index(const char *s,pchar c) } } char *rindex(const char *s,pchar c) char *rindex(const char *s,int c) { reg3 char *t; Loading @@ -1291,10 +1289,8 @@ char *rindex(const char *s,pchar c) do if (*s == (char) c) t = (char*) s; while (*s++); return (char*) t; } #ifdef __cplusplus } #endif #endif #endif /* HAVE_READLINE */ Loading
client/mysqlbinlog.cc +2 −0 Original line number Diff line number Diff line Loading @@ -552,3 +552,5 @@ int main(int argc, char** argv) #else #include "log_event.cc" #endif FIX_GCC_LINKING_PROBLEM