diff options
author | joerg@debian.(none) <> | 2007-06-01 12:59:06 +0200 |
---|---|---|
committer | joerg@debian.(none) <> | 2007-06-01 12:59:06 +0200 |
commit | 81930fc4bf9163b334eec9707fc51127c4d5c718 (patch) | |
tree | 7adaf5bb5a13afeea9ec41f2b590b5271e32e42a | |
parent | 2c8f4f97910bec416fc9a375cf1c74be2ca395cc (diff) | |
parent | 509faa5a3b1bc271b928249795a76ebf74ff4f52 (diff) | |
download | mariadb-git-81930fc4bf9163b334eec9707fc51127c4d5c718.tar.gz |
Merge jbruehe@bk-internal.mysql.com:/home/bk/mysql-5.1
into debian.(none):/M51/merge-5.1
28 files changed, 68 insertions, 66 deletions
diff --git a/BUILD/check-cpu b/BUILD/check-cpu index 2852aa98ef3..0720a53c54d 100755 --- a/BUILD/check-cpu +++ b/BUILD/check-cpu @@ -105,6 +105,12 @@ check_cpu () { *Athlon*64*) cpu_arg="athlon64"; ;; + *Turion*) + cpu_arg="athlon64"; + ;; + *Opteron*) + cpu_arg="athlon64"; + ;; *Athlon*) cpu_arg="athlon"; ;; diff --git a/CMakeLists.txt b/CMakeLists.txt index bb5e53be20e..8b1268e0699 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -157,7 +157,7 @@ IF(EMBED_MANIFESTS) STRING(REGEX MATCH "MANIFEST:NO" tmp_manifest ${CMAKE_EXE_LINKER_FLAGS}) IF(NOT tmp_manifest) SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO") - ENDIF(tmp_manifest) + ENDIF(NOT tmp_manifest) # Set the processor architecture. IF(CMAKE_GENERATOR MATCHES "Visual Studio 8 2005 Win64") SET(PROCESSOR_ARCH "X64") diff --git a/config/ac-macros/compiler_flag.m4 b/config/ac-macros/compiler_flag.m4 index 88097c7a62e..ce2ce6cbdfa 100644 --- a/config/ac-macros/compiler_flag.m4 +++ b/config/ac-macros/compiler_flag.m4 @@ -7,7 +7,7 @@ AC_DEFUN([AC_SYS_COMPILER_FLAG], AC_CACHE_VAL(mysql_cv_option_$2, [ CFLAGS="[$]OLD_CFLAGS $1" - AC_TRY_RUN([int main(){exit(0);}],mysql_cv_option_$2=yes,mysql_cv_option_$2=no,mysql_cv_option_$2=no) + AC_TRY_LINK([int main(){exit(0);}],mysql_cv_option_$2=yes,mysql_cv_option_$2=no,mysql_cv_option_$2=no) ]) CFLAGS="[$]OLD_CFLAGS" diff --git a/config/ac-macros/misc.m4 b/config/ac-macros/misc.m4 index a20db96a950..0619a52fbbf 100644 --- a/config/ac-macros/misc.m4 +++ b/config/ac-macros/misc.m4 @@ -450,29 +450,6 @@ AC_DEFINE([HAVE_BOOL], [1], [bool is not defined by all C++ compilators]) fi ])dnl -AC_DEFUN([MYSQL_STACK_DIRECTION], - [AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction, - [AC_TRY_RUN([#include <stdlib.h> - int find_stack_direction () - { - static char *addr = 0; - auto char dummy; - if (addr == 0) - { - addr = &dummy; - return find_stack_direction (); - } - else - return (&dummy > addr) ? 1 : -1; - } - int main () - { - exit (find_stack_direction() < 0); - }], ac_cv_c_stack_direction=1, ac_cv_c_stack_direction=-1, - ac_cv_c_stack_direction=0)]) - AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction) -])dnl - AC_DEFUN([MYSQL_CHECK_LONGLONG_TO_FLOAT], [ AC_MSG_CHECKING(if conversion of longlong to float works) @@ -488,7 +465,9 @@ int main() fprintf(file,"%g\n",f); fclose(file); return (0); -}], ac_cv_conv_longlong_to_float=`cat conftestval`, ac_cv_conv_longlong_to_float=0, ifelse([$2], , , ac_cv_conv_longlong_to_float=$2))])dnl +}], ac_cv_conv_longlong_to_float=`cat conftestval`, + ac_cv_conv_longlong_to_float=0, + ac_cv_conv_longlong_to_float="yes")])dnl # Cross compiling, assume can convert if test "$ac_cv_conv_longlong_to_float" = "1" -o "$ac_cv_conv_longlong_to_float" = "yes" then ac_cv_conv_longlong_to_float=yes diff --git a/configure.in b/configure.in index 3ba8f64cad1..cb71a67126b 100644 --- a/configure.in +++ b/configure.in @@ -230,14 +230,8 @@ AC_CHECK_PROGS(YACC, ['bison -y -p MYSQL']) AC_CHECK_PROG(PDFMANUAL, pdftex, manual.pdf) AC_CHECK_PROG(DVIS, tex, manual.dvi) -AC_MSG_CHECKING("return type of sprintf") - #check the return type of sprintf -case $SYSTEM_TYPE in - *netware*) - AC_DEFINE(SPRINTF_RETURNS_INT, [1]) AC_MSG_RESULT("int") - ;; - *) +AC_MSG_CHECKING("return type of sprintf") AC_TRY_RUN([ int main() { @@ -263,10 +257,12 @@ AC_TRY_RUN([ [AC_DEFINE(SPRINTF_RETURNS_PTR, [1], [Broken sprintf]) AC_MSG_RESULT("ptr")], [AC_DEFINE(SPRINTF_RETURNS_GARBAGE, [1], [Broken sprintf]) - AC_MSG_RESULT("garbage")]) - ]) - ;; -esac + AC_MSG_RESULT("garbage")] + )], + # Cross compile, assume POSIX + [AC_DEFINE(SPRINTF_RETURNS_INT, [1], [POSIX sprintf]) + AC_MSG_RESULT("int (we assume)")] +) AC_PATH_PROG(uname_prog, uname, no) @@ -1667,6 +1663,12 @@ AC_ARG_WITH(client-ldflags, [CLIENT_EXTRA_LDFLAGS=]) AC_SUBST(CLIENT_EXTRA_LDFLAGS) +AC_ARG_WITH(mysqld-libs, + [ --with-mysqld-libs Extra libraries to link with for mysqld], + [MYSQLD_EXTRA_LIBS=$withval], + [MYSQLD_EXTRA_LIBS=]) +AC_SUBST(MYSQLD_EXTRA_LIBS) + AC_ARG_WITH(lib-ccflags, [ --with-lib-ccflags Extra CC options for libraries], [LIB_EXTRA_CCFLAGS=$withval], @@ -1784,8 +1786,6 @@ MYSQL_TYPE_ACCEPT #---END: # Figure out what type of struct rlimit to use with setrlimit MYSQL_TYPE_STRUCT_RLIMIT -# Find where the stack goes -MYSQL_STACK_DIRECTION # We want to skip alloca on irix unconditionally. It may work on some version.. MYSQL_FUNC_ALLOCA # Do struct timespec have members tv_sec or ts_sec diff --git a/include/config-netware.h b/include/config-netware.h index f287699249b..f7f494b519c 100644 --- a/include/config-netware.h +++ b/include/config-netware.h @@ -112,9 +112,6 @@ extern "C" { /* signal by closing the sockets */ #define SIGNAL_WITH_VIO_CLOSE 1 -/* On NetWare, stack grows towards lower address*/ -#define STACK_DIRECTION -1 - /* On NetWare, we need to set stack size for threads, otherwise default 16K is used */ #define NW_THD_STACKSIZE 65536 diff --git a/include/config-win.h b/include/config-win.h index 69c5b20a509..40ee3c65849 100644 --- a/include/config-win.h +++ b/include/config-win.h @@ -250,8 +250,6 @@ inline double ulonglong2double(ulonglong value) #endif -#define STACK_DIRECTION -1 - /* Optimized store functions for Intel x86 */ #ifndef _WIN64 diff --git a/mysql-test/include/federated.inc b/mysql-test/include/federated.inc index dde24cd8198..925ecdd9682 100644 --- a/mysql-test/include/federated.inc +++ b/mysql-test/include/federated.inc @@ -1,3 +1,4 @@ +--source include/have_log_bin.inc --source include/not_embedded.inc --source ./include/have_federated_db.inc diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index df39be15f05..27772ff0672 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -3770,8 +3770,7 @@ sub mysqld_arguments ($$$$) { "%s--log-slow-queries=%s-slow.log", $prefix, $log_base_path); # Check if "extra_opt" contains --skip-log-bin - my $skip_binlog= grep(/^--skip-log-bin/, @$extra_opt); - + my $skip_binlog= grep(/^--skip-log-bin/, @$extra_opt, @opt_extra_mysqld_opt); if ( $mysqld->{'type'} eq 'master' ) { if (! ($opt_skip_master_binlog || $skip_binlog) ) diff --git a/mysql-test/r/date_formats.result b/mysql-test/r/date_formats.result index 7375260d863..62eeb4b2fbf 100644 --- a/mysql-test/r/date_formats.result +++ b/mysql-test/r/date_formats.result @@ -1,14 +1,12 @@ drop table if exists t1; -SHOW GLOBAL VARIABLES LIKE "%_format%"; +SHOW GLOBAL VARIABLES WHERE Variable_name LIKE "%_format%" AND Variable_name != "binlog_format"; Variable_name Value -binlog_format <format> date_format %d.%m.%Y datetime_format %Y-%m-%d %H:%i:%s default_week_format 0 time_format %H.%i.%s -SHOW SESSION VARIABLES LIKE "%_format%"; +SHOW SESSION VARIABLES WHERE Variable_name LIKE "%_format%" AND Variable_name != "binlog_format"; Variable_name Value -binlog_format <format> date_format %d.%m.%Y datetime_format %Y-%m-%d %H:%i:%s default_week_format 0 @@ -30,9 +28,8 @@ set datetime_format= '%H:%i:%s %Y-%m-%d'; set datetime_format= '%H:%i:%s.%f %m-%d-%Y'; set datetime_format= '%h:%i:%s %p %Y-%m-%d'; set datetime_format= '%h:%i:%s.%f %p %Y-%m-%d'; -SHOW SESSION VARIABLES LIKE "%format"; +SHOW SESSION VARIABLES WHERE Variable_name LIKE "%format" AND Variable_name != "binlog_format"; Variable_name Value -binlog_format <format> date_format %m-%d-%Y datetime_format %h:%i:%s.%f %p %Y-%m-%d default_week_format 0 diff --git a/mysql-test/r/have_log_bin.require b/mysql-test/r/have_log_bin.require index cacdf8df0ce..d4fd77e4f8d 100644 --- a/mysql-test/r/have_log_bin.require +++ b/mysql-test/r/have_log_bin.require @@ -1,2 +1,2 @@ Variable_name Value -have_log_bin ON +log_bin ON diff --git a/mysql-test/t/date_formats.test b/mysql-test/t/date_formats.test index fe39cd95753..a121439c12e 100644 --- a/mysql-test/t/date_formats.test +++ b/mysql-test/t/date_formats.test @@ -6,10 +6,8 @@ drop table if exists t1; --enable_warnings ---replace_result ROW <format> STATEMENT <format> MIXED <format> -SHOW GLOBAL VARIABLES LIKE "%_format%"; ---replace_result ROW <format> STATEMENT <format> MIXED <format> -SHOW SESSION VARIABLES LIKE "%_format%"; +SHOW GLOBAL VARIABLES WHERE Variable_name LIKE "%_format%" AND Variable_name != "binlog_format"; +SHOW SESSION VARIABLES WHERE Variable_name LIKE "%_format%" AND Variable_name != "binlog_format"; # # Test setting a lot of different formats to see which formats are accepted and @@ -36,8 +34,7 @@ set datetime_format= '%H:%i:%s.%f %m-%d-%Y'; set datetime_format= '%h:%i:%s %p %Y-%m-%d'; set datetime_format= '%h:%i:%s.%f %p %Y-%m-%d'; ---replace_result ROW <format> STATEMENT <format> MIXED <format> -SHOW SESSION VARIABLES LIKE "%format"; +SHOW SESSION VARIABLES WHERE Variable_name LIKE "%format" AND Variable_name != "binlog_format"; --error 1231 SET time_format='%h:%i:%s'; diff --git a/mysql-test/t/flush_block_commit_notembedded.test b/mysql-test/t/flush_block_commit_notembedded.test index 4650a5a15a8..25eb093226e 100644 --- a/mysql-test/t/flush_block_commit_notembedded.test +++ b/mysql-test/t/flush_block_commit_notembedded.test @@ -3,6 +3,8 @@ # We verify that we did not introduce a deadlock. # This is intended to mimick how mysqldump and innobackup work. +-- source include/have_log_bin.inc + # And it requires InnoDB -- source include/not_embedded.inc -- source include/have_innodb.inc diff --git a/mysql-test/t/mysqlbinlog.test b/mysql-test/t/mysqlbinlog.test index e4cbd2938fb..f4785baa9db 100644 --- a/mysql-test/t/mysqlbinlog.test +++ b/mysql-test/t/mysqlbinlog.test @@ -2,6 +2,8 @@ # TODO: Need to look at making a row based version once the new row based client is completed. [jbm] -- source include/have_binlog_format_mixed_or_statement.inc +-- source include/have_log_bin.inc + # Embedded server doesn't support binlogging -- source include/not_embedded.inc diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test index a6f93e759dc..7b18e2d34a2 100644 --- a/mysql-test/t/mysqldump.test +++ b/mysql-test/t/mysqldump.test @@ -1,6 +1,9 @@ # Embedded server doesn't support external clients --source include/not_embedded.inc +# Binlog is required +--source include/have_log_bin.inc + --disable_warnings DROP TABLE IF EXISTS t1, `"t"1`, t1aa, t2, t2aa, t3; drop database if exists mysqldump_test_db; diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test index 057432d37fd..7d254372eab 100644 --- a/mysql-test/t/mysqltest.test +++ b/mysql-test/t/mysqltest.test @@ -1,3 +1,5 @@ +-- source include/have_log_bin.inc + # This test should work in embedded server after mysqltest is fixed -- source include/not_embedded.inc diff --git a/mysql-test/t/ps.test b/mysql-test/t/ps.test index 1fd1cc4a405..db401de26bb 100644 --- a/mysql-test/t/ps.test +++ b/mysql-test/t/ps.test @@ -1,4 +1,5 @@ -- source include/not_embedded.inc +-- source include/have_log_bin.inc # # SQL Syntax for Prepared Statements test # diff --git a/mysql-test/t/sp_trans.test b/mysql-test/t/sp_trans.test index a79f6c7e7e0..bd5e6e33cf7 100644 --- a/mysql-test/t/sp_trans.test +++ b/mysql-test/t/sp_trans.test @@ -2,6 +2,7 @@ # tests that require InnoDB... # +-- source include/have_log_bin.inc -- source include/have_innodb.inc --disable_warnings diff --git a/mysql-test/t/user_var-binlog.test b/mysql-test/t/user_var-binlog.test index 3ce01a0927b..fc534cc357a 100644 --- a/mysql-test/t/user_var-binlog.test +++ b/mysql-test/t/user_var-binlog.test @@ -3,6 +3,7 @@ # TODO: Create row based version once $MYSQL_BINLOG has new RB version # Embedded server does not support binlogging --source include/not_embedded.inc +--source include/have_log_bin.inc # Check that user variables are binlogged correctly (BUG#3875) create table t1 (a varchar(50)); diff --git a/plugin/daemon_example/Makefile.am b/plugin/daemon_example/Makefile.am index 21a86f8973e..92b1ab040fb 100644 --- a/plugin/daemon_example/Makefile.am +++ b/plugin/daemon_example/Makefile.am @@ -36,3 +36,6 @@ noinst_LIBRARIES = @plugin_daemon_example_static_target@ libdaemon_example_a_CXXFLAGS = $(AM_CFLAGS) libdaemon_example_a_CFLAGS = $(AM_CFLAGS) libdaemon_example_a_SOURCES= daemon_example.cc + +# Don't update the files from bitkeeper +%::SCCS/s.% diff --git a/plugin/fulltext/Makefile.am b/plugin/fulltext/Makefile.am index d4ec097efbd..ec033018a00 100644 --- a/plugin/fulltext/Makefile.am +++ b/plugin/fulltext/Makefile.am @@ -22,3 +22,6 @@ pkglib_LTLIBRARIES= mypluglib.la mypluglib_la_SOURCES= plugin_example.c mypluglib_la_LDFLAGS= -module -rpath $(pkglibdir) mypluglib_la_CFLAGS= -DMYSQL_DYNAMIC_PLUGIN + +# Don't update the files from bitkeeper +%::SCCS/s.% diff --git a/sql/Makefile.am b/sql/Makefile.am index d280b22f493..fdf3f88c1f8 100644 --- a/sql/Makefile.am +++ b/sql/Makefile.am @@ -38,7 +38,8 @@ mysqld_LDADD = @MYSQLD_EXTRA_LDFLAGS@ \ @pstack_libs@ \ @mysql_plugin_libs@ \ $(LDADD) $(CXXLDFLAGS) $(WRAPLIBS) @LIBDL@ \ - $(yassl_libs) $(openssl_libs) + $(yassl_libs) $(openssl_libs) \ + @MYSQLD_EXTRA_LIBS@ noinst_HEADERS = item.h item_func.h item_sum.h item_cmpfunc.h \ item_strfunc.h item_timefunc.h \ diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 13de5bcd8f5..5afd1f1a21e 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -4997,17 +4997,14 @@ bool check_merge_table_access(THD *thd, char *db, Check stack size; Send error if there isn't enough stack to continue ****************************************************************************/ -#if STACK_DIRECTION < 0 -#define used_stack(A,B) (long) (A - B) -#else -#define used_stack(A,B) (long) (B - A) -#endif +#ifndef EMBEDDED_LIBRARY + +#define used_stack(A,B) (long)(A > B ? A - B : B - A) #ifndef DBUG_OFF long max_stack_used; #endif -#ifndef EMBEDDED_LIBRARY /* Note: The 'buf' parameter is necessary, even if it is unused here. - fix_fields functions has a "dummy" buffer large enough for the diff --git a/unittest/Makefile.am b/unittest/Makefile.am index 6197586b008..65fa615fb98 100644 --- a/unittest/Makefile.am +++ b/unittest/Makefile.am @@ -25,3 +25,6 @@ test: test-verbose: HARNESS_VERBOSE=1 perl unit.pl run $(unittests) + +# Don't update the files from bitkeeper +%::SCCS/s.% diff --git a/unittest/examples/Makefile.am b/unittest/examples/Makefile.am index f3183225888..94032c00928 100644 --- a/unittest/examples/Makefile.am +++ b/unittest/examples/Makefile.am @@ -22,3 +22,5 @@ LDADD = -lmytap noinst_PROGRAMS = simple-t skip-t todo-t skip_all-t no_plan-t core-t +# Don't update the files from bitkeeper +%::SCCS/s.% diff --git a/unittest/mysys/Makefile.am b/unittest/mysys/Makefile.am index 54b3d203e10..be91ef31c9d 100644 --- a/unittest/mysys/Makefile.am +++ b/unittest/mysys/Makefile.am @@ -23,3 +23,5 @@ LDADD = $(top_builddir)/unittest/mytap/libmytap.a \ noinst_PROGRAMS = bitmap-t base64-t my_atomic-t +# Don't update the files from bitkeeper +%::SCCS/s.% diff --git a/unittest/mytap/Makefile.am b/unittest/mytap/Makefile.am index 2f77c4e3e0d..c02bcd3b49d 100644 --- a/unittest/mytap/Makefile.am +++ b/unittest/mytap/Makefile.am @@ -21,3 +21,6 @@ noinst_HEADERS = tap.h libmytap_a_SOURCES = tap.c SUBDIRS = . t + +# Don't update the files from bitkeeper +%::SCCS/s.% diff --git a/unittest/mytap/t/Makefile.am b/unittest/mytap/t/Makefile.am index 576bbafa299..e89a088bb3a 100644 --- a/unittest/mytap/t/Makefile.am +++ b/unittest/mytap/t/Makefile.am @@ -21,3 +21,5 @@ LDADD = -lmytap noinst_PROGRAMS = basic-t +# Don't update the files from bitkeeper +%::SCCS/s.% |