From a21f8a0e57a3d0eabf24ac8f4fccb6f563ecc3b1 Mon Sep 17 00:00:00 2001 From: "kent.boortz@sun.com" <> Date: Thu, 6 Nov 2008 19:38:19 +0100 Subject: [PATCH 01/18] Back merges from 6.0.8 - Removed some copy/paste between debug and normal build in RPM spec - Removed "mysql_upgrade_shell" from RPM build - Removed use of "grep -q" in "configure.in", not portable - Improved test to disable ABI check not to accidently run for icc Other changes - Added make file test targets 'test-bt-fast' and 'test-bt-debug-fast' - Reenabled "jp" test suite run --- Makefile.am | 21 +++++++++++-- config/ac-macros/ha_ndbcluster.m4 | 2 +- configure.in | 8 ++--- support-files/mysql.spec.sh | 51 ++++++++++++++----------------- 4 files changed, 46 insertions(+), 36 deletions(-) diff --git a/Makefile.am b/Makefile.am index c0a5334a032..26670c42305 100644 --- a/Makefile.am +++ b/Makefile.am @@ -159,6 +159,8 @@ test-bt: @PERL@ ./mysql-test-run.pl --force --comment=partitions --suite=parts -cd mysql-test ; MTR_BUILD_THREAD=auto \ @PERL@ ./mysql-test-run.pl --force --comment=stress --suite=stress + -cd mysql-test ; MTR_BUILD_THREAD=auto \ + @PERL@ ./mysql-test-run.pl --force --comment=jp --suite=jp -if [ -d mysql-test/suite/nist ] ; then \ cd mysql-test ; MTR_BUILD_THREAD=auto \ @PERL@ ./mysql-test-run.pl --comment=nist --force --suite=nist ; \ @@ -175,15 +177,28 @@ test-bt: echo "no program found for 'embedded' tests - skipped testing" ; \ fi -# Re-enable the "jp" suite when bug#28563 is fixed -# -cd mysql-test ; MTR_BUILD_THREAD=auto \ -# @PERL@ ./mysql-test-run.pl --force --comment=jp --suite=jp +test-bt-fast: + -cd mysql-test ; MTR_BUILD_THREAD=auto \ + @PERL@ ./mysql-test-run.pl --comment=ps --force --timer \ + --skip-ndbcluster --ps-protocol + -if [ -e bin/ndbd -o -e storage/ndb/src/kernel/ndbd ] ; then \ + cd mysql-test ; \ + MTR_BUILD_THREAD=auto \ + @PERL@ ./mysql-test-run.pl --comment=ndb --force --timer \ + --with-ndbcluster-only ; \ + else \ + echo "no program found for 'ndbcluster' tests - skipped testing" ; \ + fi + -cd mysql-test ; MTR_BUILD_THREAD=auto \ + @PERL@ ./mysql-test-run.pl --force --comment=stress --suite=stress test-bt-debug: -cd mysql-test ; MTR_BUILD_THREAD=auto \ @PERL@ ./mysql-test-run.pl --comment=debug --force --timer \ --skip-ndbcluster --skip-rpl --report-features +test-bt-debug-fast: + # Keep these for a while test-pl: test test-full-pl: test-full diff --git a/config/ac-macros/ha_ndbcluster.m4 b/config/ac-macros/ha_ndbcluster.m4 index 9df96a7750b..5ee136f2266 100644 --- a/config/ac-macros/ha_ndbcluster.m4 +++ b/config/ac-macros/ha_ndbcluster.m4 @@ -280,7 +280,7 @@ AC_DEFUN([MYSQL_SETUP_NDBCLUSTER], [ esac # libndbclient versioning when linked with GNU ld. - if $LD --version 2>/dev/null|grep -q GNU; then + if $LD --version 2>/dev/null|grep GNU >/dev/null 2>&1 ; then NDB_LD_VERSION_SCRIPT="-Wl,--version-script=\$(top_builddir)/storage/ndb/src/libndb.ver" AC_CONFIG_FILES(storage/ndb/src/libndb.ver) fi diff --git a/configure.in b/configure.in index 63ab547f70d..c57c1efee9f 100644 --- a/configure.in +++ b/configure.in @@ -377,7 +377,7 @@ fi MYSQL_PROG_AR # libmysqlclient versioning when linked with GNU ld. -if $LD --version 2>/dev/null|grep -q GNU; then +if $LD --version 2>/dev/null| grep GNU >/dev/null 2>&1; then LD_VERSION_SCRIPT="-Wl,--version-script=\$(top_builddir)/libmysql/libmysql.ver" AC_CONFIG_FILES(libmysql/libmysql.ver) fi @@ -449,11 +449,11 @@ AC_SUBST(PERL5) # Enable the abi_check rule only if gcc is available -if expr "$CC" : ".*gcc.*" +if test "$GCC" != "yes" || expr "$CC" : ".*icc.*" then - ABI_CHECK="abi_check" -else ABI_CHECK="" +else + ABI_CHECK="abi_check" fi AC_SUBST(ABI_CHECK) diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index e7c090484b7..812b5958b91 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -279,7 +279,20 @@ sh -c "PATH=\"${MYSQL_BUILD_PATH:-$PATH}\" \ --mandir=%{_mandir} \ --enable-thread-safe-client \ --with-readline \ - " + --with-innodb \ +%if %{CLUSTER_BUILD} + --with-ndbcluster \ +%else + --without-ndbcluster \ +%endif + --with-archive-storage-engine \ + --with-csv-storage-engine \ + --with-blackhole-storage-engine \ + --with-federated-storage-engine \ + --with-partition \ + --with-big-tables \ + --enable-shared \ + " make } @@ -306,6 +319,8 @@ mkdir -p $RBR%{_libdir}/mysql PATH=${MYSQL_BUILD_PATH:-/bin:/usr/bin} export PATH +# Build the Debug binary. + # Use gcc for C and C++ code (to avoid a dependency on libstdc++ and # including exceptions into the code if [ -z "$CXX" -a -z "$CC" ] @@ -333,20 +348,8 @@ CXXFLAGS=`echo $CXXFLAGS | sed -e 's/-O[0-9]* //' -e 's/-unroll2 //' -e 's/-ip / cd mysql-debug-%{mysql_version} && CFLAGS=\"$CFLAGS\" \ CXXFLAGS=\"$CXXFLAGS\" \ -BuildMySQL "--enable-shared \ +BuildMySQL "\ --with-debug \ - --with-innodb \ -%if %{CLUSTER_BUILD} - --with-ndbcluster \ -%else - --without-ndbcluster \ -%endif - --with-archive-storage-engine \ - --with-csv-storage-engine \ - --with-blackhole-storage-engine \ - --with-federated-storage-engine \ - --with-partition \ - --with-big-tables \ --with-comment=\"MySQL Community Server - Debug (GPL)\"") # We might want to save the config log file @@ -366,20 +369,8 @@ fi (cd mysql-release-%{mysql_version} && CFLAGS=\"$CFLAGS\" \ CXXFLAGS=\"$CXXFLAGS\" \ -BuildMySQL "--enable-shared \ - --with-innodb \ -%if %{CLUSTER_BUILD} - --with-ndbcluster \ -%else - --without-ndbcluster \ -%endif - --with-archive-storage-engine \ - --with-csv-storage-engine \ - --with-blackhole-storage-engine \ - --with-federated-storage-engine \ - --with-partition \ +BuildMySQL "\ --with-embedded-server \ - --with-big-tables \ --with-comment=\"MySQL Community Server (GPL)\"") # We might want to save the config log file if test -n "$MYSQL_CONFLOG_DEST" @@ -700,7 +691,6 @@ fi %attr(755, root, root) %{_bindir}/msql2mysql %attr(755, root, root) %{_bindir}/mysql %attr(755, root, root) %{_bindir}/mysql_find_rows -%attr(755, root, root) %{_bindir}/mysql_upgrade_shell %attr(755, root, root) %{_bindir}/mysql_waitpid %attr(755, root, root) %{_bindir}/mysqlaccess %attr(755, root, root) %{_bindir}/mysqladmin @@ -840,6 +830,11 @@ fi # itself - note that they must be ordered by date (important when # merging BK trees) %changelog +* Thu Nov 06 2008 Kent Boortz + +- Removed "mysql_upgrade_shell" +- Removed some copy/paste between debug and normal build + * Thu Nov 06 2008 Joerg Bruehe - Modify CFLAGS and CXXFLAGS such that a debug build is not optimized. From c81061e458570846723672c942c12aa15bfef146 Mon Sep 17 00:00:00 2001 From: Joerg Bruehe Date: Fri, 7 Nov 2008 18:38:40 +0100 Subject: [PATCH 02/18] "spec" file for RPM builds: Fix yesterday's patch so that it also works for the last flag. Still part of the fix for bug#40546. --- support-files/mysql.spec.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index dc80d379b83..7bb35e6072e 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -320,8 +320,12 @@ do # We are in a subshell, so we can modify variables just for one run. if test "$servertype" != ' ' then - CFLAGS=`echo $CFLAGS | sed -e 's/-O[0-9]* //' -e 's/-unroll2 //' -e 's/-ip //'` - CXXFLAGS=`echo $CXXFLAGS | sed -e 's/-O[0-9]* //' -e 's/-unroll2 //' -e 's/-ip //'` + CFLAGS=`echo " $CFLAGS " | \ + sed -e 's/ -O[0-9]* / /' -e 's/ -unroll2 / /' -e 's/ -ip / /' \ + -e 's/^ //' -e 's/ $//'` + CXXFLAGS=`echo " $CXXFLAGS " | \ + sed -e 's/ -O[0-9]* / /' -e 's/ -unroll2 / /' -e 's/ -ip / /' \ + -e 's/^ //' -e 's/ $//'` fi BuildMySQL "\ @@ -807,6 +811,10 @@ fi # itself - note that they must be ordered by date (important when # merging BK trees) %changelog +* Fri Nov 07 2008 Joerg Bruehe + +- Correct yesterday's fix, so that it also works for the last flag. + * Thu Nov 06 2008 Joerg Bruehe - Modify CFLAGS and CXXFLAGS such that a debug build is not optimized. From 827bae532bbb783ae0edf595ed359d4e739c43f1 Mon Sep 17 00:00:00 2001 From: Build Team Date: Sun, 9 Nov 2008 03:14:35 +0100 Subject: [PATCH 03/18] Added the default configure COMMUNITY_SERVER and ENABLED_PROFILING to the Windows configuration file "include/config-win.h". --- include/config-win.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/config-win.h b/include/config-win.h index cc2b2767663..e0e754e5c09 100644 --- a/include/config-win.h +++ b/include/config-win.h @@ -371,6 +371,9 @@ inline double ulonglong2double(ulonglong value) #define HAVE_OPENSSL 1 #define HAVE_YASSL 1 +#define COMMUNITY_SERVER 1 +#define ENABLED_PROFILING 1 + /* Define charsets you want */ /* #undef HAVE_CHARSET_armscii8 */ /* #undef HAVE_CHARSET_ascii */ From 366adeab08308aa8431b1c2363cf02226a1ad6b9 Mon Sep 17 00:00:00 2001 From: Build Team Date: Mon, 10 Nov 2008 21:21:49 +0100 Subject: [PATCH 04/18] Added "Sun Microsystems, Inc." to copyright headers on files modified since Oct 1st --- Makefile.am | 2 +- client/mysqldump.c | 2 +- include/config-win.h | 2 +- include/hash.h | 2 +- include/thr_lock.h | 2 +- mysql-test/lib/mtr_report.pl | 2 +- mysys/hash.c | 2 +- sql/event_db_repository.cc | 2 +- sql/event_parse_data.cc | 2 +- sql/event_parse_data.h | 2 +- sql/field.cc | 2 +- sql/field.h | 2 +- sql/ha_partition.cc | 2 +- sql/ha_partition.h | 2 +- sql/handler.cc | 2 +- sql/handler.h | 2 +- sql/item.cc | 2 +- sql/item.h | 2 +- sql/item_func.cc | 2 +- sql/item_func.h | 2 +- sql/lock.cc | 2 +- sql/log.cc | 2 +- sql/log_event.cc | 2 +- sql/mysql_priv.h | 2 +- sql/mysqld.cc | 2 +- sql/opt_range.cc | 2 +- sql/partition_info.h | 2 +- sql/set_var.cc | 2 +- sql/sp_head.cc | 2 +- sql/sql_base.cc | 2 +- sql/sql_cache.cc | 2 +- sql/sql_class.cc | 2 +- sql/sql_class.h | 2 +- sql/sql_insert.cc | 2 +- sql/sql_lex.cc | 2 +- sql/sql_lex.h | 2 +- sql/sql_parse.cc | 2 +- sql/sql_partition.cc | 2 +- sql/sql_select.cc | 2 +- sql/sql_show.cc | 2 +- sql/sql_show.h | 2 +- sql/sql_table.cc | 2 +- sql/sql_union.cc | 2 +- sql/sql_update.cc | 2 +- sql/sql_yacc.yy | 2 +- sql/table.cc | 2 +- sql/table.h | 2 +- storage/blackhole/ha_blackhole.cc | 2 +- storage/blackhole/ha_blackhole.h | 2 +- 49 files changed, 49 insertions(+), 49 deletions(-) diff --git a/Makefile.am b/Makefile.am index 26670c42305..f3b9c29da1f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,4 @@ -# Copyright (C) 2000-2006 MySQL AB +# Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/client/mysqldump.c b/client/mysqldump.c index c068b2ff16e..44c53a0e4c2 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/include/config-win.h b/include/config-win.h index e0e754e5c09..c111d14a17a 100644 --- a/include/config-win.h +++ b/include/config-win.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/include/hash.h b/include/hash.h index 1f094d48585..f4b82454b81 100644 --- a/include/hash.h +++ b/include/hash.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/include/thr_lock.h b/include/thr_lock.h index 77d428d1805..c7754ada299 100644 --- a/include/thr_lock.h +++ b/include/thr_lock.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/mysql-test/lib/mtr_report.pl b/mysql-test/lib/mtr_report.pl index 3c78c3ca064..d02409d4cde 100644 --- a/mysql-test/lib/mtr_report.pl +++ b/mysql-test/lib/mtr_report.pl @@ -1,5 +1,5 @@ # -*- cperl -*- -# Copyright (C) 2004-2006 MySQL AB +# Copyright 2004-2008 MySQL AB, 2008 Sun Microsystems, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/mysys/hash.c b/mysys/hash.c index 65a60c9e341..dd2d589e509 100644 --- a/mysys/hash.c +++ b/mysys/hash.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/event_db_repository.cc b/sql/event_db_repository.cc index c26b740d24a..9a253d74546 100644 --- a/sql/event_db_repository.cc +++ b/sql/event_db_repository.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2004-2006 MySQL AB +/* Copyright 2004-2008 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/event_parse_data.cc b/sql/event_parse_data.cc index df419e92d0d..63ecc3006dd 100644 --- a/sql/event_parse_data.cc +++ b/sql/event_parse_data.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2003 MySQL AB +/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/event_parse_data.h b/sql/event_parse_data.h index 87a800c2078..8b42eb23937 100644 --- a/sql/event_parse_data.h +++ b/sql/event_parse_data.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2003 MySQL AB +/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/field.cc b/sql/field.cc index a03beb4e8af..8a70377920c 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2006 MySQL AB +/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/field.h b/sql/field.h index 81905cc64ae..d24dd9355b0 100644 --- a/sql/field.h +++ b/sql/field.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2006 MySQL AB +/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index 303a2c152fb..4fe143bb9ed 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2005 MySQL AB +/* Copyright 2005-2008 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/ha_partition.h b/sql/ha_partition.h index 685f057dfce..8aa4c3d7d78 100644 --- a/sql/ha_partition.h +++ b/sql/ha_partition.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2005 MySQL AB +/* Copyright 2005-2008 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/handler.cc b/sql/handler.cc index 035a06c6f05..e124d97d9d1 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2006 MySQL AB +/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/handler.h b/sql/handler.h index b7d4d689d40..3958748f058 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2006 MySQL AB +/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/item.cc b/sql/item.cc index 93d00c287ae..61ae78a9386 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2006 MySQL AB +/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/item.h b/sql/item.h index 00a2759a739..81ca1bccae3 100644 --- a/sql/item.h +++ b/sql/item.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2006 MySQL AB +/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/item_func.cc b/sql/item_func.cc index d7e6fc1f8f2..9c41b70eade 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2003 MySQL AB +/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/item_func.h b/sql/item_func.h index d84abdb6e56..ede08245319 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2006 MySQL AB +/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/lock.cc b/sql/lock.cc index faddb8c586c..f36e8d605d3 100644 --- a/sql/lock.cc +++ b/sql/lock.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2006 MySQL AB +/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/log.cc b/sql/log.cc index fb8669a5731..a36a0c14d07 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2003 MySQL AB +/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/log_event.cc b/sql/log_event.cc index 0d03593946d..51e124227a4 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2004 MySQL AB +/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index d11f2838e3a..f07a01cc8d8 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2003 MySQL AB +/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/mysqld.cc b/sql/mysqld.cc index d59ea8eca45..57f6ae7bc40 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2003 MySQL AB +/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/opt_range.cc b/sql/opt_range.cc index f228551b586..ccf6cbf745a 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2006 MySQL AB +/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/partition_info.h b/sql/partition_info.h index 703b92305b1..415f955d5d4 100644 --- a/sql/partition_info.h +++ b/sql/partition_info.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 MySQL AB +/* Copyright 2006-2008 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/set_var.cc b/sql/set_var.cc index a62cafc3873..17585f17dfe 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2003 MySQL AB +/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/sp_head.cc b/sql/sp_head.cc index 534cd0a7ca1..ef6cb556f4c 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2002 MySQL AB +/* Copyright 2002-2008 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/sql_base.cc b/sql/sql_base.cc index f18ee0ec562..9038b4d4125 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2006 MySQL AB +/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc index 81d0d447ac1..2fca739f667 100644 --- a/sql/sql_cache.cc +++ b/sql/sql_cache.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 12b773c91d0..da24b1cf39d 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2006 MySQL AB +/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/sql_class.h b/sql/sql_class.h index f5cf31d1030..d726ce90521 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2006 MySQL AB +/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 8762d3dc8fa..ecdbcda1616 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2006 MySQL AB +/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 4ac73baa992..b2caec86db9 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2006 MySQL AB +/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 53ae984e795..a93ad4f2312 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2006 MySQL AB +/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 704c16cfdec..8a4dd1f0812 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2003 MySQL AB +/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index a45664a9767..41bbd90fabb 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2005, 2006 MySQL AB +/* Copyright 2005-2008 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 102809f9f64..032517234c6 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2006 MySQL AB +/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/sql_show.cc b/sql/sql_show.cc index fc2c2548cc4..6cdc3b1fa99 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2004 MySQL AB +/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/sql_show.h b/sql/sql_show.h index 3baaef00a7d..fa067a46033 100644 --- a/sql/sql_show.h +++ b/sql/sql_show.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 MySQL AB +/* Copyright 2006-2008 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/sql_table.cc b/sql/sql_table.cc index c866fdfc173..ae30b91f7de 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2004 MySQL AB +/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/sql_union.cc b/sql/sql_union.cc index 2f3282f58f6..fd3036e3d80 100644 --- a/sql/sql_union.cc +++ b/sql/sql_union.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2003 MySQL AB +/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/sql_update.cc b/sql/sql_update.cc index 197e5290aba..ff47f5e4cd7 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2006 MySQL AB +/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 8d9b3a2d4b5..6965f43b42c 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2003 MySQL AB +/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/table.cc b/sql/table.cc index 89714e4e47e..9d06992a3a9 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2006 MySQL AB +/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/table.h b/sql/table.h index ccd6b60664e..38a66f9f426 100644 --- a/sql/table.h +++ b/sql/table.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2006 MySQL AB +/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/blackhole/ha_blackhole.cc b/storage/blackhole/ha_blackhole.cc index 1a1a0d02375..357496fe095 100644 --- a/storage/blackhole/ha_blackhole.cc +++ b/storage/blackhole/ha_blackhole.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2005 MySQL AB +/* Copyright 2005-2008 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/storage/blackhole/ha_blackhole.h b/storage/blackhole/ha_blackhole.h index 085840cce43..289e449be10 100644 --- a/storage/blackhole/ha_blackhole.h +++ b/storage/blackhole/ha_blackhole.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2005 MySQL AB +/* Copyright 2005-2008 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by From 906e12124cf9f4fbee0c54af9b473f1b2eddcd01 Mon Sep 17 00:00:00 2001 From: "kent.boortz@sun.com" <> Date: Fri, 14 Nov 2008 17:29:38 +0100 Subject: [PATCH 05/18] Changes of copyright output from "--version" and similar. Changes of copyright in RPM spec file. --- client/mysql.cc | 2 +- client/mysqladmin.cc | 4 ++-- client/mysqlimport.c | 2 +- client/mysqlshow.c | 2 +- sql/gen_lex_hash.cc | 2 +- storage/archive/archive_reader.c | 2 +- storage/myisam/myisampack.c | 2 +- storage/ndb/docs/doxygen/postdoxy.pl | 4 ++-- strings/conf_to_src.c | 2 +- support-files/mysql.spec.sh | 36 +++++++++++++++++----------- 10 files changed, 33 insertions(+), 25 deletions(-) diff --git a/client/mysql.cc b/client/mysql.cc index 024194d81f6..2d1a3bbedea 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -1535,7 +1535,7 @@ static void usage(int version) if (version) return; printf("\ -Copyright (C) 2000-2008 MySQL AB\n\ +Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.\n\ This software comes with ABSOLUTELY NO WARRANTY. This is free software,\n\ and you are welcome to modify and redistribute it under the GPL license\n"); printf("Usage: %s [OPTIONS] [database]\n", my_progname); diff --git a/client/mysqladmin.cc b/client/mysqladmin.cc index b3b699f61fd..4111670bad3 100644 --- a/client/mysqladmin.cc +++ b/client/mysqladmin.cc @@ -634,7 +634,7 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv) case ADMIN_VER: new_line=1; print_version(); - puts("Copyright (C) 2000-2006 MySQL AB"); + puts("Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc."); puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n"); printf("Server version\t\t%s\n", mysql_get_server_info(mysql)); printf("Protocol version\t%d\n", mysql_get_proto_info(mysql)); @@ -1023,7 +1023,7 @@ static void print_version(void) static void usage(void) { print_version(); - puts("Copyright (C) 2000-2006 MySQL AB"); + puts("Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc."); puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n"); puts("Administration program for the mysqld daemon."); printf("Usage: %s [OPTIONS] command command....\n", my_progname); diff --git a/client/mysqlimport.c b/client/mysqlimport.c index ac3b0e8efba..09ba27b287a 100644 --- a/client/mysqlimport.c +++ b/client/mysqlimport.c @@ -193,7 +193,7 @@ static void print_version(void) static void usage(void) { print_version(); - puts("Copyright (C) 2000-2006 MySQL AB"); + puts("Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc."); puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n"); printf("\ Loads tables from text files in various formats. The base name of the\n\ diff --git a/client/mysqlshow.c b/client/mysqlshow.c index 167ff5c6198..0e696aed211 100644 --- a/client/mysqlshow.c +++ b/client/mysqlshow.c @@ -249,7 +249,7 @@ static void print_version(void) static void usage(void) { print_version(); - puts("Copyright (C) 2000-2006 MySQL AB"); + puts("Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc."); puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n"); puts("Shows the structure of a mysql database (databases,tables and columns)\n"); printf("Usage: %s [OPTIONS] [database [table [column]]]\n",my_progname); diff --git a/sql/gen_lex_hash.cc b/sql/gen_lex_hash.cc index 7b2395673eb..214ee4c99d2 100644 --- a/sql/gen_lex_hash.cc +++ b/sql/gen_lex_hash.cc @@ -451,7 +451,7 @@ int main(int argc,char **argv) printf("/*\n\n Do " "not " "edit " "this " "file " "directly!\n\n*/\n"); printf("\ -/* Copyright (C) 2001-2004 MySQL AB\n\ +/* Copyright 2001-2008 MySQL AB, 2008 Sun Microsystems, Inc.\n\ \n\ This program is free software; you can redistribute it and/or modify\n\ it under the terms of the GNU General Public License as published by\n\ diff --git a/storage/archive/archive_reader.c b/storage/archive/archive_reader.c index bfc01073161..18764151775 100644 --- a/storage/archive/archive_reader.c +++ b/storage/archive/archive_reader.c @@ -374,7 +374,7 @@ static struct my_option my_long_options[] = static void usage(void) { print_version(); - puts("Copyright (C) 2007 MySQL AB"); + puts("Copyright 2007-2008 MySQL AB, 2008 Sun Microsystems, Inc."); puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\ \nand you are welcome to modify and redistribute it under the GPL \ license\n"); diff --git a/storage/myisam/myisampack.c b/storage/myisam/myisampack.c index 0ca6a10fad4..908c32e48d3 100644 --- a/storage/myisam/myisampack.c +++ b/storage/myisam/myisampack.c @@ -300,7 +300,7 @@ static void print_version(void) static void usage(void) { print_version(); - puts("Copyright (C) 2002 MySQL AB"); + puts("Copyright 2002-2008 MySQL AB, 2008 Sun Microsystems, Inc."); puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,"); puts("and you are welcome to modify and redistribute it under the GPL license\n"); diff --git a/storage/ndb/docs/doxygen/postdoxy.pl b/storage/ndb/docs/doxygen/postdoxy.pl index ad0edb44a31..3bf54e4ff75 100755 --- a/storage/ndb/docs/doxygen/postdoxy.pl +++ b/storage/ndb/docs/doxygen/postdoxy.pl @@ -81,9 +81,9 @@ open (OUTFILE, "> ${destdir}/doxygen.sty.new") while () { if (/\\rfoot/) { - print OUTFILE "\\rfoot[\\fancyplain{}{\\bfseries\\small \\copyright~Copyright 2003-2004 MySQL AB\\hfill support-cluster\@mysql.com}]{}\n"; + print OUTFILE "\\rfoot[\\fancyplain{}{\\bfseries\\small \\copyright~Copyright 2003-2008 MySQL AB, 2008 Sun Microsystems, Inc.\\hfill support-cluster\@mysql.com}]{}\n"; } elsif (/\\lfoot/) { - print OUTFILE "\\lfoot[]{\\fancyplain{}{\\bfseries\\small support-cluster\@mysql.com\\hfill \\copyright~Copyright 2003-2004 MySQL AB}}\n"; + print OUTFILE "\\lfoot[]{\\fancyplain{}{\\bfseries\\small support-cluster\@mysql.com\\hfill \\copyright~Copyright 2003-2008 MySQL AB, 2008 Sun Microsystems, Inc.}}\n"; } else { print OUTFILE; } diff --git a/strings/conf_to_src.c b/strings/conf_to_src.c index dc2a300a2ec..7e742050aa8 100644 --- a/strings/conf_to_src.c +++ b/strings/conf_to_src.c @@ -249,7 +249,7 @@ static void fprint_copyright(FILE *file) { fprintf(file, -"/* Copyright (C) 2000-2007 MySQL AB\n" +"/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.\n" "\n" " This program is free software; you can redistribute it and/or modify\n" " it under the terms of the GNU General Public License as published by\n" diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index 790e7c830ac..937fdbc3789 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -1,4 +1,4 @@ -# Copyright (C) 2000-2007 MySQL AB +# Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,7 +15,11 @@ # MA 02110-1301 USA. %define mysql_version @VERSION@ -%define mysql_vendor MySQL AB + +# NOTE: "vendor" is used in upgrade/downgrade check, so you can't +# change these, has to be exactly as is. +%define mysql_old_vendor MySQL AB +%define mysql_vendor Sun Microsystems, Inc. # use "rpmbuild --with static" or "rpm --define '_with_static 1'" (for RPM 3.x) # to enable static linking (off by default) @@ -37,8 +41,7 @@ %else %define release 0.glibc23 %endif -%define license GPL -%define mysqld_user mysql +%define mysqld_user mysql %define mysqld_group mysql %define server_suffix -standard %define mysqldatadir /var/lib/mysql @@ -71,10 +74,10 @@ Summary: MySQL: a very fast and reliable SQL database server Group: Applications/Databases Version: @MYSQL_NO_DASH_VERSION@ Release: %{release} -License: %{license} +License: Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Under GPL license as shown in the Description field. Source: http://www.mysql.com/Downloads/MySQL-@MYSQL_BASE_VERSION@/mysql-%{mysql_version}.tar.gz URL: http://www.mysql.com/ -Packager: MySQL Production Engineering Team +Packager: Sun Microsystems, Inc. Product Engineering Team Vendor: %{mysql_vendor} Provides: msqlormysql MySQL-server mysql BuildRequires: ncurses-devel @@ -90,9 +93,11 @@ The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, and robust SQL (Structured Query Language) database server. MySQL Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. MySQL is a trademark of -MySQL AB. +Sun Microsystems, Inc. + +Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. All rights reserved. +Use is subject to license terms. -Copyright (C) 2000-2007 MySQL AB This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to modify and redistribute it under the GPL license. @@ -112,9 +117,11 @@ The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, and robust SQL (Structured Query Language) database server. MySQL Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. MySQL is a trademark of -MySQL AB. +Sun Microsystems, Inc. + +Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. All rights reserved. +Use is subject to license terms. -Copyright (C) 2000-2007 MySQL AB This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to modify and redistribute it under the GPL license. @@ -455,6 +462,7 @@ installed=`rpm -q --whatprovides mysql-server 2> /dev/null` if [ $? -eq 0 -a -n "$installed" ]; then vendor=`rpm -q --queryformat='%{VENDOR}' "$installed" 2>&1` version=`rpm -q --queryformat='%{VERSION}' "$installed" 2>&1` + myoldvendor='%{mysql_old_vendor}' myvendor='%{mysql_vendor}' myversion='%{mysql_version}' @@ -466,12 +474,12 @@ if [ $? -eq 0 -a -n "$installed" ]; then [ -z "$new_family" ] && new_family="" error_text= - if [ "$vendor" != "$myvendor" ]; then + if [ "$vendor" != "$myoldvendor" -a "$vendor" != "$myvendor" ]; then error_text="$error_text The current MySQL server package is provided by a different -vendor ($vendor) than $myvendor. Some files may be installed -to different locations, including log files and the service -startup script in %{_sysconfdir}/init.d/. +vendor ($vendor) than $myoldvendor or $myvendor. +Some files may be installed to different locations, including log +files and the service startup script in %{_sysconfdir}/init.d/. " fi From d2c4816716a8b75ffb51014c2ac604d44b94c912 Mon Sep 17 00:00:00 2001 From: Build Team Date: Tue, 25 Nov 2008 03:04:58 +0100 Subject: [PATCH 06/18] mysql-test/r/partition.result mysql-test/t/partition.test sql/ha_partition.cc Bug#40954: Crash in MyISAM index code with concurrency test using partitioned tables Problem was usage of read_range_first with an empty key. Solution was to not to give a key if it was empty. (real author Mattias Jonsson) storage/archive/archive_reader.c client/mysqlslap.c Aligned the copyright texts output from "--version" of tools, to let internal tools be able to change them if needed. storage/ndb/test/tools/connect.cpp storage/ndb/test/run-test/atrt.hpp Corrected a few GPL headers not restricted to GPL version 2 Makefile.am Added missing --report-features to the 'test-bt-fast' target support-files/mysql.spec.sh Reversed the removal of the "%define license GPL" in as internal tools depended on it --- Makefile.am | 2 +- client/mysqlslap.c | 4 +--- mysql-test/r/partition.result | 12 ++++++++++++ mysql-test/t/partition.test | 15 +++++++++++++++ sql/ha_partition.cc | 3 ++- storage/archive/archive_reader.c | 4 +--- storage/ndb/test/run-test/atrt.hpp | 3 +-- storage/ndb/test/tools/connect.cpp | 3 +-- support-files/mysql.spec.sh | 7 ++++--- 9 files changed, 38 insertions(+), 15 deletions(-) diff --git a/Makefile.am b/Makefile.am index f3b9c29da1f..6d38ac4c7cb 100644 --- a/Makefile.am +++ b/Makefile.am @@ -180,7 +180,7 @@ test-bt: test-bt-fast: -cd mysql-test ; MTR_BUILD_THREAD=auto \ @PERL@ ./mysql-test-run.pl --comment=ps --force --timer \ - --skip-ndbcluster --ps-protocol + --skip-ndbcluster --ps-protocol --report-features -if [ -e bin/ndbd -o -e storage/ndb/src/kernel/ndbd ] ; then \ cd mysql-test ; \ MTR_BUILD_THREAD=auto \ diff --git a/client/mysqlslap.c b/client/mysqlslap.c index 5ca0b1cd207..9ba912d646c 100644 --- a/client/mysqlslap.c +++ b/client/mysqlslap.c @@ -688,9 +688,7 @@ static void usage(void) { print_version(); puts("Copyright (C) 2005 MySQL AB"); - puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\ - \nand you are welcome to modify and redistribute it under the GPL \ - license\n"); + puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n"); puts("Run a query multiple times against the server\n"); printf("Usage: %s [OPTIONS]\n",my_progname); print_defaults("my",load_default_groups); diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result index 289a24685ff..013663965ae 100644 --- a/mysql-test/r/partition.result +++ b/mysql-test/r/partition.result @@ -1,4 +1,16 @@ drop table if exists t1, t2; +CREATE TABLE t1 ( +pk INT NOT NULL AUTO_INCREMENT, +PRIMARY KEY (pk) +) +/*!50100 PARTITION BY HASH (pk) +PARTITIONS 2 */; +INSERT INTO t1 VALUES (NULL); +INSERT INTO t1 VALUES (NULL); +INSERT INTO t1 VALUES (NULL); +SELECT * FROM t1 WHERE pk < 0 ORDER BY pk; +pk +DROP TABLE t1; CREATE TABLE t1 (a INT NOT NULL, KEY(a)) PARTITION BY RANGE(a) (PARTITION p1 VALUES LESS THAN (200), PARTITION pmax VALUES LESS THAN MAXVALUE); diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test index e016f72e75b..8648b8d5622 100644 --- a/mysql-test/t/partition.test +++ b/mysql-test/t/partition.test @@ -14,6 +14,21 @@ drop table if exists t1, t2; --enable_warnings +# +# Bug#40954: Crash if range search and order by. +# +CREATE TABLE t1 ( + pk INT NOT NULL AUTO_INCREMENT, + PRIMARY KEY (pk) +) +/*!50100 PARTITION BY HASH (pk) +PARTITIONS 2 */; +INSERT INTO t1 VALUES (NULL); +INSERT INTO t1 VALUES (NULL); +INSERT INTO t1 VALUES (NULL); +SELECT * FROM t1 WHERE pk < 0 ORDER BY pk; +DROP TABLE t1; + # # Bug#40494: Crash MYSQL server crashes on range access with partitioning # and order by diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index 4fe143bb9ed..d262fbefbe7 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -4429,7 +4429,8 @@ int ha_partition::handle_ordered_index_scan(uchar *buf, bool reverse_order) This can only read record to table->record[0], as it was set when the table was being opened. We have to memcpy data ourselves. */ - error= file->read_range_first(&m_start_key, end_range, eq_range, TRUE); + error= file->read_range_first(m_start_key.key? &m_start_key: NULL, + end_range, eq_range, TRUE); memcpy(rec_buf_ptr, table->record[0], m_rec_length); reverse_order= FALSE; break; diff --git a/storage/archive/archive_reader.c b/storage/archive/archive_reader.c index 18764151775..84d4e318b49 100644 --- a/storage/archive/archive_reader.c +++ b/storage/archive/archive_reader.c @@ -375,9 +375,7 @@ static void usage(void) { print_version(); puts("Copyright 2007-2008 MySQL AB, 2008 Sun Microsystems, Inc."); - puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\ - \nand you are welcome to modify and redistribute it under the GPL \ - license\n"); + puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n"); puts("Read and modify Archive files directly\n"); printf("Usage: %s [OPTIONS] file_to_be_looked_at [file_for_backup]\n", my_progname); print_defaults("my", load_default_groups); diff --git a/storage/ndb/test/run-test/atrt.hpp b/storage/ndb/test/run-test/atrt.hpp index 14d2dccd245..db26bd9bfc0 100644 --- a/storage/ndb/test/run-test/atrt.hpp +++ b/storage/ndb/test/run-test/atrt.hpp @@ -2,8 +2,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. + the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/storage/ndb/test/tools/connect.cpp b/storage/ndb/test/tools/connect.cpp index 2d3ac34d3e8..278dbe833ea 100644 --- a/storage/ndb/test/tools/connect.cpp +++ b/storage/ndb/test/tools/connect.cpp @@ -2,8 +2,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. + the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index 937fdbc3789..a535e778281 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -41,6 +41,7 @@ %else %define release 0.glibc23 %endif +%define license GPL %define mysqld_user mysql %define mysqld_group mysql %define server_suffix -standard @@ -74,7 +75,7 @@ Summary: MySQL: a very fast and reliable SQL database server Group: Applications/Databases Version: @MYSQL_NO_DASH_VERSION@ Release: %{release} -License: Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Under GPL license as shown in the Description field. +License: Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Under %{license} license as shown in the Description field. Source: http://www.mysql.com/Downloads/MySQL-@MYSQL_BASE_VERSION@/mysql-%{mysql_version}.tar.gz URL: http://www.mysql.com/ Packager: Sun Microsystems, Inc. Product Engineering Team @@ -361,7 +362,7 @@ CFLAGS="$CFLAGS" \ CXXFLAGS="$CXXFLAGS" \ BuildMySQL "\ --with-debug \ - --with-comment=\"MySQL Community Server - Debug (GPL)\"") + --with-comment=\"MySQL Community Server - Debug (%{license})\"") # We might want to save the config log file if test -n "$MYSQL_DEBUGCONFLOG_DEST" @@ -382,7 +383,7 @@ CFLAGS="$CFLAGS" \ CXXFLAGS="$CXXFLAGS" \ BuildMySQL "\ --with-embedded-server \ - --with-comment=\"MySQL Community Server (GPL)\"") + --with-comment=\"MySQL Community Server (%{license})\"") # We might want to save the config log file if test -n "$MYSQL_CONFLOG_DEST" then From 3742489c3797b14ac3c4453ef4058b5a87a62442 Mon Sep 17 00:00:00 2001 From: "timothy.smith@sun.com" <> Date: Wed, 3 Dec 2008 05:11:48 +0100 Subject: [PATCH 07/18] Remove bashisms from BUILD/compile-dist and configure.in, so Bootstrap works on Solaris box; force GNU make in compile-dist; remove unportable "grep -q" from configure.in --- BUILD/compile-dist | 36 ++++++++++++++++++++++++++++-------- configure.in | 28 ++++++++++++++++------------ 2 files changed, 44 insertions(+), 20 deletions(-) diff --git a/BUILD/compile-dist b/BUILD/compile-dist index 613f2643c56..7c2dbe00dc5 100755 --- a/BUILD/compile-dist +++ b/BUILD/compile-dist @@ -15,30 +15,49 @@ autoconf (cd bdb/dist && sh s_all) (cd innobase && aclocal && autoheader && aclocal && automake && autoconf) +gmake= +for x in gmake gnumake make; do + if $x --version 2>/dev/null | grep GNU > /dev/null; then + gmake=$x + break; + fi +done + +if [ -z "$gmake" ]; then + # Our build may not depend on GNU make, but I wouldn't count on it + echo "Please install GNU make, and ensure it is in your path as gnumake, gmake, or make" >&2 + exit 2 +fi + # Default to gcc for CC and CXX if test -z "$CXX" ; then - export CXX=gcc + export CXX + CXX=gcc # Set some required compile options if test -z "$CXXFLAGS" ; then - export CXXFLAGS="-felide-constructors -fno-exceptions -fno-rtti" + export CXXFLAGS + CXXFLAGS="-felide-constructors -fno-exceptions -fno-rtti" fi fi if test -z "$CC" ; then - export CC=gcc + export CC + CC=gcc fi # Use ccache, if available if ccache -V > /dev/null 2>&1 then - if ! (echo "$CC" | grep "ccache" > /dev/null) + if echo "$CC" | grep -v ccache > /dev/null then - export CC="ccache $CC" + export CC + CC="ccache $CC" fi - if ! (echo "$CXX" | grep "ccache" > /dev/null) + if echo "$CXX" | grep -v ccache > /dev/null then - export CXX="ccache $CXX" + export CXX + CXX="ccache $CXX" fi fi @@ -50,4 +69,5 @@ fi --enable-thread-safe-client \ --with-extra-charsets=complex \ --with-ndbcluster -make + +$gmake diff --git a/configure.in b/configure.in index 83220a879f0..448d3c90a26 100644 --- a/configure.in +++ b/configure.in @@ -409,7 +409,7 @@ fi MYSQL_PROG_AR # libmysqlclient versioning when linked with GNU ld. -if $LD --version 2>/dev/null|grep -q GNU; then +if $LD --version 2>/dev/null|grep GNU > /dev/null; then LD_VERSION_SCRIPT="-Wl,--version-script=\$(top_builddir)/libmysql/libmysql.ver" AC_CONFIG_FILES(libmysql/libmysql.ver) fi @@ -437,11 +437,13 @@ dnl Find paths to some shell programs AC_PATH_PROG(LN, ln, ln) # This must be able to take a -f flag like normal unix ln. AC_PATH_PROG(LN_CP_F, ln, ln) -if ! ( expr "$SYSTEM_TYPE" : ".*netware.*" > /dev/null ); then -# If ln -f does not exists use -s (AFS systems) -if test -n "$LN_CP_F"; then - LN_CP_F="$LN_CP_F -s" -fi +if expr "$SYSTEM_TYPE" : ".*netware.*" > /dev/null; then + : +else + # If ln -f does not exists use -s (AFS systems) + if test -n "$LN_CP_F"; then + LN_CP_F="$LN_CP_F -s" + fi fi AC_PATH_PROG(MV, mv, mv) @@ -1940,14 +1942,16 @@ MYSQL_CHECK_IN_ADDR_T # Do the c++ compiler have a bool type MYSQL_CXX_BOOL # Check some common bugs with gcc 2.8.# on sparc -if ! ( expr "$SYSTEM_TYPE" : ".*netware.*" > /dev/null ); then -MYSQL_CHECK_LONGLONG_TO_FLOAT -if test "$ac_cv_conv_longlong_to_float" != "yes" -then - AC_MSG_ERROR([Your compiler cannot convert a longlong value to a float! +if expr "$SYSTEM_TYPE" : ".*netware.*" > /dev/null; then + : +else + MYSQL_CHECK_LONGLONG_TO_FLOAT + if test "$ac_cv_conv_longlong_to_float" != "yes" + then + AC_MSG_ERROR([Your compiler cannot convert a longlong value to a float! If you are using gcc 2.8.# you should upgrade to egcs 1.0.3 or newer and try again]) -fi + fi fi AC_CHECK_TYPES([sigset_t, off_t], [], [], [#include ]) AC_CHECK_TYPES([size_t], [], [], [#include ]) From ff1161eb585aab4662834ced18ffaddb2ff2ffd8 Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Fri, 12 Dec 2008 15:10:56 +0100 Subject: [PATCH 08/18] Bug #31983 Running mysql-test from RPM fails for NDB Added $glob_basedir/sbin to search path for relevant binaries --- mysql-test/mysql-test-run.pl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 268dd3fbd16..add0d6cc22e 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -1508,15 +1508,21 @@ sub executable_setup_ndb () { "$glob_basedir/storage/ndb", "$glob_basedir/bin"); + # Some might be found in sbin, not bin. + my $daemon_path= mtr_file_exists("$glob_basedir/ndb", + "$glob_basedir/storage/ndb", + "$glob_basedir/sbin", + "$glob_basedir/bin"); + $exe_ndbd= mtr_exe_maybe_exists("$ndb_path/src/kernel/ndbd", - "$ndb_path/ndbd"); + "$daemon_path/ndbd"); $exe_ndb_mgm= mtr_exe_maybe_exists("$ndb_path/src/mgmclient/ndb_mgm", "$ndb_path/ndb_mgm"); $exe_ndb_mgmd= mtr_exe_maybe_exists("$ndb_path/src/mgmsrv/ndb_mgmd", - "$ndb_path/ndb_mgmd"); + "$daemon_path/ndb_mgmd"); $exe_ndb_waiter= mtr_exe_maybe_exists("$ndb_path/tools/ndb_waiter", "$ndb_path/ndb_waiter"); From 4effc0bc9a28ef7bd0065f22f6d8468e70ab4aaf Mon Sep 17 00:00:00 2001 From: Mattias Jonsson Date: Fri, 19 Dec 2008 09:23:15 +0100 Subject: [PATCH 09/18] Bug#36312: InnoDB DATA_FREE BUG? Problem is that DATA_FREE in SHOW TABLE STATUS is not correct when not using innodb_file_per_table. The solution is to use I_S.PARTITIONS instead. This is only a small fix for correcting mean record length and always return 0 if the table is empty. --- sql/ha_partition.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index 47d2d36ac8d..c8b068ca2be 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -4815,7 +4815,7 @@ int ha_partition::info(uint flag) /* Calculates statistical variables records: Estimate of number records in table - We report sum (always at least 2) + We report sum (always at least 2 if not empty) deleted: Estimate of number holes in the table due to deletes We report sum @@ -4854,13 +4854,13 @@ int ha_partition::info(uint flag) stats.check_time= file->stats.check_time; } } while (*(++file_array)); - if (stats.records < 2 && + if (stats.records && stats.records < 2 && !(m_file[0]->ha_table_flags() & HA_STATS_RECORDS_IS_EXACT)) stats.records= 2; if (stats.records > 0) stats.mean_rec_length= (ulong) (stats.data_file_length / stats.records); else - stats.mean_rec_length= 1; //? What should we set here + stats.mean_rec_length= 0; } if (flag & HA_STATUS_CONST) { From b89aaffb250ea37fb76ba1b98a29bc5e76e9daab Mon Sep 17 00:00:00 2001 From: Kent Boortz Date: Sun, 28 Dec 2008 07:57:09 +0100 Subject: [PATCH 10/18] Increased thread stack size to 128K, as this is the minimum (Bug#41577) --- support-files/my-small.cnf.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/support-files/my-small.cnf.sh b/support-files/my-small.cnf.sh index cf2ebed463c..24c08408b46 100644 --- a/support-files/my-small.cnf.sh +++ b/support-files/my-small.cnf.sh @@ -34,7 +34,7 @@ sort_buffer_size = 64K read_buffer_size = 256K read_rnd_buffer_size = 256K net_buffer_length = 2K -thread_stack = 64K +thread_stack = 128K # Don't listen on a TCP/IP port at all. This can be a security enhancement, # if all processes that need to connect to mysqld run on the same host. From 54e3ab8afff0dce77c6b9bb002c54fe5931260d6 Mon Sep 17 00:00:00 2001 From: Kent Boortz Date: Sun, 28 Dec 2008 08:00:23 +0100 Subject: [PATCH 11/18] Make sure cluster builds include all charsets --- support-files/mysql.spec.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index a535e778281..7c08fdf4734 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -272,7 +272,11 @@ sh -c "PATH=\"${MYSQL_BUILD_PATH:-$PATH}\" \ --with-unix-socket-path=/var/lib/mysql/mysql.sock \ --with-pic \ --prefix=/ \ +%if %{CLUSTER_BUILD} --with-extra-charsets=all \ +%else + --with-extra-charsets=complex \ +%endif %if %{YASSL_BUILD} --with-ssl \ %endif From 7ac7726509e282d600643998ad8edc5bab5be35f Mon Sep 17 00:00:00 2001 From: Mattias Jonsson Date: Sun, 28 Dec 2008 12:33:49 +0100 Subject: [PATCH 12/18] Bug#40972: some sql execution lead the whole databse crashing Problem was an errornous date that lead to end partition was before the start, leading to a crash. Solution was to check greater or equal instead of only equal between start and end partition. NOTE: partitioning pruning handles incorrect dates differently than index lookup, which can give different results in a partitioned table versus a non partitioned table for queries having 'bad' dates in the where clause. --- mysql-test/r/partition_pruning.result | 12 ++++++++++++ mysql-test/t/partition_pruning.test | 16 ++++++++++++++++ sql/sql_partition.cc | 4 ++-- 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/partition_pruning.result b/mysql-test/r/partition_pruning.result index b153ad9ad47..26ddc92e97b 100644 --- a/mysql-test/r/partition_pruning.result +++ b/mysql-test/r/partition_pruning.result @@ -1,4 +1,16 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +CREATE TABLE t1 +(a INT NOT NULL AUTO_INCREMENT, +b DATETIME, +PRIMARY KEY (a,b), +KEY (b)) +PARTITION BY RANGE (to_days(b)) +(PARTITION p0 VALUES LESS THAN (733681) COMMENT = 'LESS THAN 2008-10-01', +PARTITION p1 VALUES LESS THAN (733712) COMMENT = 'LESS THAN 2008-11-01', +PARTITION pX VALUES LESS THAN MAXVALUE); +SELECT a,b FROM t1 WHERE b >= '2008-12-01' AND b < '2009-12-00'; +a b +DROP TABLE t1; create table t1 ( a int not null) partition by hash(a) partitions 2; insert into t1 values (1),(2),(3); explain select * from t1 where a=5 and a=6; diff --git a/mysql-test/t/partition_pruning.test b/mysql-test/t/partition_pruning.test index 31008d2b011..ad102062ef8 100644 --- a/mysql-test/t/partition_pruning.test +++ b/mysql-test/t/partition_pruning.test @@ -8,6 +8,22 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; --enable_warnings +# +# Bug#40972: some sql execution lead the whole database crashing +# +# Setup so the start is at partition pX and end is at p1 +# Pruning does handle 'bad' dates differently. +CREATE TABLE t1 +(a INT NOT NULL AUTO_INCREMENT, + b DATETIME, + PRIMARY KEY (a,b), + KEY (b)) +PARTITION BY RANGE (to_days(b)) +(PARTITION p0 VALUES LESS THAN (733681) COMMENT = 'LESS THAN 2008-10-01', + PARTITION p1 VALUES LESS THAN (733712) COMMENT = 'LESS THAN 2008-11-01', + PARTITION pX VALUES LESS THAN MAXVALUE); +SELECT a,b FROM t1 WHERE b >= '2008-12-01' AND b < '2009-12-00'; +DROP TABLE t1; # Check if we can infer from condition on partition fields that # no records will match. diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index c1df5552eb9..9096a2b91ef 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -6760,7 +6760,7 @@ int get_part_iter_for_interval_via_mapping(partition_info *part_info, store_key_image_to_rec(field, max_value, field_len); bool include_endp= !test(flags & NEAR_MAX); part_iter->part_nums.end= get_endpoint(part_info, 0, include_endp); - if (part_iter->part_nums.start == part_iter->part_nums.end && + if (part_iter->part_nums.start >= part_iter->part_nums.end && !part_iter->ret_null_part) return 0; /* No partitions */ } @@ -6938,7 +6938,7 @@ int get_part_iter_for_interval_via_walking(partition_info *part_info, uint32 get_next_partition_id_range(PARTITION_ITERATOR* part_iter) { - if (part_iter->part_nums.cur == part_iter->part_nums.end) + if (part_iter->part_nums.cur >= part_iter->part_nums.end) { part_iter->part_nums.cur= part_iter->part_nums.start; return NOT_A_PARTITION_ID; From e56284128f628691dff3541d326b819b87eda571 Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Mon, 5 Jan 2009 12:37:56 +0200 Subject: [PATCH 13/18] Reverted the fix for bug #25830 because of omissions and non-complete test case. --- mysql-test/r/lowercase_utf8.result | 9 --------- mysql-test/t/lowercase_utf8-master.opt | 4 ---- mysql-test/t/lowercase_utf8.test | 9 --------- sql/sql_show.cc | 17 ++++------------- 4 files changed, 4 insertions(+), 35 deletions(-) delete mode 100644 mysql-test/r/lowercase_utf8.result delete mode 100644 mysql-test/t/lowercase_utf8-master.opt delete mode 100644 mysql-test/t/lowercase_utf8.test diff --git a/mysql-test/r/lowercase_utf8.result b/mysql-test/r/lowercase_utf8.result deleted file mode 100644 index 043226e1f64..00000000000 --- a/mysql-test/r/lowercase_utf8.result +++ /dev/null @@ -1,9 +0,0 @@ -set names utf8; -create table `Ö` (id int); -show tables from test like 'Ö'; -Tables_in_test (Ö) -ö -show tables from test like 'ö'; -Tables_in_test (ö) -ö -drop table `Ö`; diff --git a/mysql-test/t/lowercase_utf8-master.opt b/mysql-test/t/lowercase_utf8-master.opt deleted file mode 100644 index 1b70aa33023..00000000000 --- a/mysql-test/t/lowercase_utf8-master.opt +++ /dev/null @@ -1,4 +0,0 @@ ---lower-case-table-names=1 --character-set-server=utf8 - - - diff --git a/mysql-test/t/lowercase_utf8.test b/mysql-test/t/lowercase_utf8.test deleted file mode 100644 index 01b154598fd..00000000000 --- a/mysql-test/t/lowercase_utf8.test +++ /dev/null @@ -1,9 +0,0 @@ -# -# Bug#25830 SHOW TABLE STATUS behaves differently depending on table name -# -set names utf8; -create table `Ö` (id int); -show tables from test like 'Ö'; -show tables from test like 'ö'; -drop table `Ö`; - diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 2d8d6b13d4e..d6bb3427fe4 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -287,17 +287,11 @@ find_files(THD *thd, List *files, const char *db, #ifndef NO_EMBEDDED_ACCESS_CHECKS uint col_access=thd->col_access; #endif - uint wild_length= 0; TABLE_LIST table_list; DBUG_ENTER("find_files"); - if (wild) - { - if (!wild[0]) - wild= 0; - else - wild_length= strlen(wild); - } + if (wild && !wild[0]) + wild=0; bzero((char*) &table_list,sizeof(table_list)); @@ -346,11 +340,8 @@ find_files(THD *thd, List *files, const char *db, { if (lower_case_table_names) { - if (my_wildcmp(files_charset_info, - file->name, file->name + strlen(file->name), - wild, wild + wild_length, - wild_prefix, wild_one, wild_many)) - continue; + if (wild_case_compare(files_charset_info, file->name, wild)) + continue; } else if (wild_compare(file->name,wild,0)) continue; From ece07248f4cd7b6db4d352adf5be719d23ce2d85 Mon Sep 17 00:00:00 2001 From: Patrick Crews Date: Mon, 5 Jan 2009 12:10:22 -0500 Subject: [PATCH 14/18] Bug#38833: mysql-test-run needs diff. Problem w/ error handling in calling diff on Windows. Added function to check for diff and return an error message if the utility is not present. Previously, the way we did this didn't work on Windows, but did work on *Nix systems. --- client/mysqltest.c | 81 +++++++++++++++++++++++++++++++++++----------- 1 file changed, 63 insertions(+), 18 deletions(-) diff --git a/client/mysqltest.c b/client/mysqltest.c index 9c7c4d62f6f..d73cf78d9d4 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -1329,6 +1329,35 @@ static int run_tool(const char *tool_path, DYNAMIC_STRING *ds_res, ...) DBUG_RETURN(ret); } +/* + Test if diff is present. This is needed on Windows systems + as the OS returns 1 whether diff is successful or if it is + not present. + + We run diff -v and look for output in stdout. + We don't redirect stderr to stdout to make for a simplified check + Windows will output '"diff"' is not recognized... to stderr if it is + not present. +*/ + +int diff_check() +{ + char buf[512]= {0}; + FILE *res_file; + char *cmd = "diff -v"; + int have_diff = 0; + + if (!(res_file= popen(cmd, "r"))) + die("popen(\"%s\", \"r\") failed", cmd); + +/* if diff is not present, nothing will be in stdout to increment have_diff */ + if (fgets(buf, sizeof(buf), res_file)) + { + have_diff += 1; + } + pclose(res_file); + return have_diff; +} /* Show the diff of two files using the systems builtin diff @@ -1348,34 +1377,51 @@ void show_diff(DYNAMIC_STRING* ds, { DYNAMIC_STRING ds_tmp; + int have_diff = 0; if (init_dynamic_string(&ds_tmp, "", 256, 256)) die("Out of memory"); + + /* determine if we have diff on Windows + needs special processing due to return values + on that OS + */ + have_diff = diff_check(); - /* First try with unified diff */ - if (run_tool("diff", - &ds_tmp, /* Get output from diff in ds_tmp */ - "-u", - filename1, - filename2, - "2>&1", - NULL) > 1) /* Most "diff" tools return >1 if error */ + if (have_diff) { - dynstr_set(&ds_tmp, ""); - - /* Fallback to context diff with "diff -c" */ + /* First try with unified diff */ if (run_tool("diff", &ds_tmp, /* Get output from diff in ds_tmp */ - "-c", + "-u", filename1, filename2, "2>&1", NULL) > 1) /* Most "diff" tools return >1 if error */ { - /* - Fallback to dump both files to result file and inform - about installing "diff" - */ + dynstr_set(&ds_tmp, ""); + + /* Fallback to context diff with "diff -c" */ + if (run_tool("diff", + &ds_tmp, /* Get output from diff in ds_tmp */ + "-c", + filename1, + filename2, + "2>&1", + NULL) > 1) /* Most "diff" tools return >1 if error */ + { + have_diff= 1; + } + } + } + +if (!(have_diff)) + { + /* + Fallback to dump both files to result file and inform + about installing "diff" + */ + dynstr_set(&ds_tmp, ""); dynstr_append(&ds_tmp, @@ -1399,8 +1445,7 @@ void show_diff(DYNAMIC_STRING* ds, dynstr_append(&ds_tmp, " >>>\n"); cat_file(&ds_tmp, filename2); dynstr_append(&ds_tmp, "<<<<\n"); - } - } + } if (ds) { From dc5a0f4481e09fa7423231c154e1bb1a8f8c55d1 Mon Sep 17 00:00:00 2001 From: Davi Arnaut Date: Wed, 7 Jan 2009 10:11:37 -0200 Subject: [PATCH 15/18] Bug#41348: INSERT INTO tbl SELECT * FROM temp_tbl overwrites locking type of temp table The problem is that INSERT INTO .. SELECT FROM .. and CREATE TABLE .. SELECT FROM a temporary table could inadvertently overwrite the locking type of the temporary table. The lock type of temporary tables should be a write lock by default. The solution is to reset the lock type of temporary tables back to its default value after they are used in a statement. --- mysql-test/r/innodb_mysql.result | 21 ++++++++++++++++ mysql-test/r/temp_table.result | 16 +++++++++++++ mysql-test/t/innodb_mysql.test | 41 ++++++++++++++++++++++++++++++++ mysql-test/t/temp_table.test | 31 ++++++++++++++++++++++++ sql/sql_base.cc | 23 +++++++++++++++++- 5 files changed, 131 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/innodb_mysql.result b/mysql-test/r/innodb_mysql.result index 075b4f84f2d..a1116a78bda 100644 --- a/mysql-test/r/innodb_mysql.result +++ b/mysql-test/r/innodb_mysql.result @@ -1767,4 +1767,25 @@ ref NULL rows 6 Extra Using where; Using index DROP TABLE foo, bar, foo2; +DROP TABLE IF EXISTS t1,t3,t2; +DROP FUNCTION IF EXISTS f1; +CREATE FUNCTION f1() RETURNS VARCHAR(250) +BEGIN +return 'hhhhhhh' ; +END| +CREATE TABLE t1 (a VARCHAR(20), b VARCHAR(20), c VARCHAR(20)) ENGINE=INNODB; +BEGIN WORK; +CREATE TEMPORARY TABLE t2 (a VARCHAR(20), b VARCHAR(20), c varchar(20)) ENGINE=INNODB; +CREATE TEMPORARY TABLE t3 LIKE t2; +INSERT INTO t1 VALUES ('a','b',NULL),('c','d',NULL),('e','f',NULL); +SET @stmt := CONCAT('INSERT INTO t2 SELECT tbl.a, tbl.b, f1()',' FROM t1 tbl'); +PREPARE stmt1 FROM @stmt; +SET @stmt := CONCAT('INSERT INTO t3', ' SELECT * FROM t2'); +PREPARE stmt3 FROM @stmt; +EXECUTE stmt1; +COMMIT; +DEALLOCATE PREPARE stmt1; +DEALLOCATE PREPARE stmt3; +DROP TABLE t1,t3,t2; +DROP FUNCTION f1; End of 5.1 tests diff --git a/mysql-test/r/temp_table.result b/mysql-test/r/temp_table.result index 6df09463d02..ba6b9f81a2d 100644 --- a/mysql-test/r/temp_table.result +++ b/mysql-test/r/temp_table.result @@ -194,4 +194,20 @@ DELETE FROM t1; SELECT * FROM t1; a b DROP TABLE t1; +DROP TABLE IF EXISTS t1,t2; +DROP FUNCTION IF EXISTS f1; +CREATE TEMPORARY TABLE t1 (a INT); +CREATE TEMPORARY TABLE t2 LIKE t1; +CREATE FUNCTION f1() RETURNS INT +BEGIN +return 1; +END| +INSERT INTO t2 SELECT * FROM t1; +INSERT INTO t1 SELECT f1(); +CREATE TABLE t3 SELECT * FROM t1; +INSERT INTO t1 SELECT f1(); +UPDATE t1,t2 SET t1.a = t2.a; +INSERT INTO t2 SELECT f1(); +DROP TABLE t1,t2,t3; +DROP FUNCTION f1; End of 5.1 tests diff --git a/mysql-test/t/innodb_mysql.test b/mysql-test/t/innodb_mysql.test index 1f9c08ac43b..5a2e115a98d 100644 --- a/mysql-test/t/innodb_mysql.test +++ b/mysql-test/t/innodb_mysql.test @@ -91,4 +91,45 @@ INSERT INTO foo2 SELECT * FROM foo; DROP TABLE foo, bar, foo2; +# +# Bug#41348: INSERT INTO tbl SELECT * FROM temp_tbl overwrites locking type of temp table +# + +--disable_warnings +DROP TABLE IF EXISTS t1,t3,t2; +DROP FUNCTION IF EXISTS f1; +--enable_warnings + +DELIMITER |; +CREATE FUNCTION f1() RETURNS VARCHAR(250) + BEGIN + return 'hhhhhhh' ; + END| +DELIMITER ;| + +CREATE TABLE t1 (a VARCHAR(20), b VARCHAR(20), c VARCHAR(20)) ENGINE=INNODB; + +BEGIN WORK; + +CREATE TEMPORARY TABLE t2 (a VARCHAR(20), b VARCHAR(20), c varchar(20)) ENGINE=INNODB; +CREATE TEMPORARY TABLE t3 LIKE t2; + +INSERT INTO t1 VALUES ('a','b',NULL),('c','d',NULL),('e','f',NULL); + +SET @stmt := CONCAT('INSERT INTO t2 SELECT tbl.a, tbl.b, f1()',' FROM t1 tbl'); +PREPARE stmt1 FROM @stmt; + +SET @stmt := CONCAT('INSERT INTO t3', ' SELECT * FROM t2'); +PREPARE stmt3 FROM @stmt; + +EXECUTE stmt1; + +COMMIT; + +DEALLOCATE PREPARE stmt1; +DEALLOCATE PREPARE stmt3; + +DROP TABLE t1,t3,t2; +DROP FUNCTION f1; + --echo End of 5.1 tests diff --git a/mysql-test/t/temp_table.test b/mysql-test/t/temp_table.test index 4ab8a982e63..2bfa4936c91 100644 --- a/mysql-test/t/temp_table.test +++ b/mysql-test/t/temp_table.test @@ -204,4 +204,35 @@ DELETE FROM t1; SELECT * FROM t1; DROP TABLE t1; +# +# Bug#41348: INSERT INTO tbl SELECT * FROM temp_tbl overwrites locking type of temp table +# + +--disable_warnings +DROP TABLE IF EXISTS t1,t2; +DROP FUNCTION IF EXISTS f1; +--enable_warnings + +CREATE TEMPORARY TABLE t1 (a INT); +CREATE TEMPORARY TABLE t2 LIKE t1; + +DELIMITER |; +CREATE FUNCTION f1() RETURNS INT + BEGIN + return 1; + END| +DELIMITER ;| + +INSERT INTO t2 SELECT * FROM t1; +INSERT INTO t1 SELECT f1(); + +CREATE TABLE t3 SELECT * FROM t1; +INSERT INTO t1 SELECT f1(); + +UPDATE t1,t2 SET t1.a = t2.a; +INSERT INTO t2 SELECT f1(); + +DROP TABLE t1,t2,t3; +DROP FUNCTION f1; + --echo End of 5.1 tests diff --git a/sql/sql_base.cc b/sql/sql_base.cc index ea664cd5091..6db9f1df0f2 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -1111,6 +1111,27 @@ static void mark_temp_tables_as_free_for_reuse(THD *thd) */ if (table->child_l || table->parent) detach_merge_children(table, TRUE); + /* + Reset temporary table lock type to it's default value (TL_WRITE). + + Statements such as INSERT INTO .. SELECT FROM tmp, CREATE TABLE + .. SELECT FROM tmp and UPDATE may under some circumstances modify + the lock type of the tables participating in the statement. This + isn't a problem for non-temporary tables since their lock type is + reset at every open, but the same does not occur for temporary + tables for historical reasons. + + Furthermore, the lock type of temporary tables is not really that + important because they can only be used by one query at a time and + not even twice in a query -- a temporary table is represented by + only one TABLE object. Nonetheless, it's safer from a maintenance + point of view to reset the lock type of this singleton TABLE object + as to not cause problems when the table is reused. + + Even under LOCK TABLES mode its okay to reset the lock type as + LOCK TABLES is allowed (but ignored) for a temporary table. + */ + table->reginfo.lock_type= TL_WRITE; } } } @@ -4681,7 +4702,7 @@ int open_tables(THD *thd, TABLE_LIST **start, uint *counter, uint flags) else if (tables->lock_type == TL_READ_DEFAULT) tables->table->reginfo.lock_type= read_lock_type_for_table(thd, tables->table); - else if (tables->table->s->tmp_table == NO_TMP_TABLE) + else tables->table->reginfo.lock_type= tables->lock_type; } tables->table->grant= tables->grant; From b2944d215c7e2532edfed85ef6b109b37f5b7a11 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Wed, 7 Jan 2009 13:44:32 +0100 Subject: [PATCH 16/18] fix misspelling --- sql/mysqld.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 022dbdbe7e3..1e9d942b1dd 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -230,7 +230,7 @@ extern "C" sig_handler handle_segfault(int sig); #if defined(__linux__) #define ENABLE_TEMP_POOL 1 #else -#define ENABLE_TEMP_TOOL 0 +#define ENABLE_TEMP_POOL 0 #endif /* Constants */ From e6100a222d187819d92c63ae5b1e29907ce8f0da Mon Sep 17 00:00:00 2001 From: Timothy Smith Date: Thu, 8 Jan 2009 03:06:54 +0100 Subject: [PATCH 17/18] Fix a few problems after latest bunch of InnoDB snapshot changes: The binlog_innodb test was sensitive to what tests ran before it. Now run FLUSH STATUS before performing operations that need to be checked. sys_var_thd_ulong::update() was improperly casting an option value from ulonglong to ulong before comparing it to the max allowed value. On systems where ulong and ulonglong are of different size, this caused values greater than ULONG_MAX to wrap around (not be truncated to ULONG_MAX, which appears to have been the intention of the original coder), and caused some checks to work incorrectly. This wasn't generally visible to the user, because later checks would prevent the wrapped-around value from being used. But it caused warning messages to differ between 32- and 64-bit platforms. Fix is to just remove the cast. Also added a DBUG_ASSERT to ensure that the value really is capped properly before finally stuffing it into the ulong. --- mysql-test/suite/binlog/r/binlog_innodb.result | 7 ++++--- mysql-test/suite/binlog/t/binlog_innodb.test | 1 + sql/set_var.cc | 5 +++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/mysql-test/suite/binlog/r/binlog_innodb.result b/mysql-test/suite/binlog/r/binlog_innodb.result index 896d8f734fc..919ac33ef35 100644 --- a/mysql-test/suite/binlog/r/binlog_innodb.result +++ b/mysql-test/suite/binlog/r/binlog_innodb.result @@ -113,16 +113,17 @@ master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ DROP TABLE t1; +flush status; show status like "binlog_cache_use"; Variable_name Value -Binlog_cache_use 13 +Binlog_cache_use 0 show status like "binlog_cache_disk_use"; Variable_name Value Binlog_cache_disk_use 0 create table t1 (a int) engine=innodb; show status like "binlog_cache_use"; Variable_name Value -Binlog_cache_use 14 +Binlog_cache_use 1 show status like "binlog_cache_disk_use"; Variable_name Value Binlog_cache_disk_use 1 @@ -131,7 +132,7 @@ delete from t1; commit; show status like "binlog_cache_use"; Variable_name Value -Binlog_cache_use 15 +Binlog_cache_use 2 show status like "binlog_cache_disk_use"; Variable_name Value Binlog_cache_disk_use 1 diff --git a/mysql-test/suite/binlog/t/binlog_innodb.test b/mysql-test/suite/binlog/t/binlog_innodb.test index df99e3786ee..f84fd65226a 100644 --- a/mysql-test/suite/binlog/t/binlog_innodb.test +++ b/mysql-test/suite/binlog/t/binlog_innodb.test @@ -101,6 +101,7 @@ DROP TABLE t1; # Actually this test has nothing to do with innodb per se, it just requires # transactional table. # +flush status; show status like "binlog_cache_use"; show status like "binlog_cache_disk_use"; diff --git a/sql/set_var.cc b/sql/set_var.cc index a371c1113ef..308735f52f2 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -1527,14 +1527,14 @@ bool sys_var_thd_ulong::update(THD *thd, set_var *var) ulonglong tmp= var->save_result.ulonglong_value; /* Don't use bigger value than given with --maximum-variable-name=.. */ - if ((ulong) tmp > max_system_variables.*offset) + if (tmp > max_system_variables.*offset) { throw_bounds_warning(thd, TRUE, TRUE, name, (longlong) tmp); tmp= max_system_variables.*offset; } if (option_limits) - tmp= (ulong) fix_unsigned(thd, tmp, option_limits); + tmp= fix_unsigned(thd, tmp, option_limits); #if SIZEOF_LONG < SIZEOF_LONG_LONG else if (tmp > ULONG_MAX) { @@ -1543,6 +1543,7 @@ bool sys_var_thd_ulong::update(THD *thd, set_var *var) } #endif + DBUG_ASSERT(tmp <= ULONG_MAX); if (var->type == OPT_GLOBAL) global_system_variables.*offset= (ulong) tmp; else From 8c29445872cb63896518c8c5202bd88815778432 Mon Sep 17 00:00:00 2001 From: Horst Hunger Date: Thu, 8 Jan 2009 19:13:57 +0100 Subject: [PATCH 18/18] Patch for bug#36875: Inserted review results. --- mysql-test/include/have_32bit.inc | 2 +- mysql-test/include/have_64bit.inc | 2 +- .../sys_vars/inc/sort_buffer_size_basic.inc | 52 ++++++++++------ .../r/sort_buffer_size_basic_32.result | 60 +++++++++---------- .../r/sort_buffer_size_basic_64.result | 60 +++++++++---------- 5 files changed, 97 insertions(+), 79 deletions(-) diff --git a/mysql-test/include/have_32bit.inc b/mysql-test/include/have_32bit.inc index b09a813967d..66684fb5325 100644 --- a/mysql-test/include/have_32bit.inc +++ b/mysql-test/include/have_32bit.inc @@ -11,6 +11,6 @@ eval SET @@global.sort_buffer_size = $save; --enable_query_log if (!$mach32) { - skip Need a 32 bit machine; + skip Need a 32 bit machine/binary; } diff --git a/mysql-test/include/have_64bit.inc b/mysql-test/include/have_64bit.inc index 31529a0c9d4..cbba5e1d338 100644 --- a/mysql-test/include/have_64bit.inc +++ b/mysql-test/include/have_64bit.inc @@ -9,6 +9,6 @@ eval SET @@session.sort_buffer_size = $save; --enable_query_log if (!$mach64) { - skip Need a 64 bit machine; + skip Need a 64 binary ; } diff --git a/mysql-test/suite/sys_vars/inc/sort_buffer_size_basic.inc b/mysql-test/suite/sys_vars/inc/sort_buffer_size_basic.inc index 10acf709386..19d8b442c2c 100644 --- a/mysql-test/suite/sys_vars/inc/sort_buffer_size_basic.inc +++ b/mysql-test/suite/sys_vars/inc/sort_buffer_size_basic.inc @@ -40,9 +40,12 @@ # Save initial value # ############################################################# -# due to differences when running on Windows (bug filed) +# due to differences when running on Windows (Bug#36695) --source include/not_windows.inc +let $kbrange32 = BETWEEN 32776 AND 32999; +let $mbrange2 = BETWEEN 2097116 AND 2100000; + --disable_warnings SET @start_global_value = @@global.sort_buffer_size; @@ -55,11 +58,13 @@ SET @start_session_value = @@session.sort_buffer_size; SET @@global.sort_buffer_size = 1000; SET @@global.sort_buffer_size = DEFAULT; -SELECT @@global.sort_buffer_size >= 2097116 AND @@global.sort_buffer_size < 3000000; +eval +SELECT @@global.sort_buffer_size $mbrange2; SET @@session.sort_buffer_size = 2000; SET @@session.sort_buffer_size = DEFAULT; -SELECT @@session.sort_buffer_size >= 2097116 AND @@session.sort_buffer_size < 3000000; +eval +SELECT @@session.sort_buffer_size $mbrange2; --echo '#--------------------FN_DYNVARS_151_02-------------------------#' @@ -68,10 +73,12 @@ SELECT @@session.sort_buffer_size >= 2097116 AND @@session.sort_buffer_size < 30 ###################################################################### SET @@global.sort_buffer_size = DEFAULT; -SELECT @@global.sort_buffer_size >= 2097116 AND @@global.sort_buffer_size < 3000000; +eval +SELECT @@global.sort_buffer_size $mbrange2; SET @@session.sort_buffer_size = DEFAULT; -SELECT @@session.sort_buffer_size >= 2097116 AND @@session.sort_buffer_size < 3000000; +eval +SELECT @@session.sort_buffer_size $mbrange2; --echo '#--------------------FN_DYNVARS_151_03-------------------------#' @@ -80,9 +87,11 @@ SELECT @@session.sort_buffer_size >= 2097116 AND @@session.sort_buffer_size < 30 ################################################################################ SET @@global.sort_buffer_size = 32776; -SELECT @@global.sort_buffer_size >= 32776 AND @@global.sort_buffer_size < 33000; +eval +SELECT @@global.sort_buffer_size $kbrange32; SET @@global.sort_buffer_size = 32777; -SELECT @@global.sort_buffer_size >= 32776 AND @@global.sort_buffer_size < 33000; +eval +SELECT @@global.sort_buffer_size $kbrange32; SET @@global.sort_buffer_size = 4294967295; SELECT @@global.sort_buffer_size; SET @@global.sort_buffer_size = 4294967294; @@ -94,9 +103,11 @@ SELECT @@global.sort_buffer_size; ################################################################################### SET @@session.sort_buffer_size = 32776; -SELECT @@session.sort_buffer_size >= 32776 AND @@session.sort_buffer_size < 33000; +eval +SELECT @@session.sort_buffer_size $kbrange32; SET @@session.sort_buffer_size = 32777; -SELECT @@session.sort_buffer_size >= 32776 AND @@session.sort_buffer_size < 33000; +eval +SELECT @@session.sort_buffer_size $kbrange32; SET @@session.sort_buffer_size = 4294967295; SELECT @@session.sort_buffer_size; SET @@session.sort_buffer_size = 4294967294; @@ -109,9 +120,11 @@ SELECT @@session.sort_buffer_size; ################################################################## SET @@global.sort_buffer_size = 32775; -SELECT @@global.sort_buffer_size >= 32776 AND @@global.sort_buffer_size < 33000; +eval +SELECT @@global.sort_buffer_size $kbrange32; SET @@global.sort_buffer_size = -1024; -SELECT @@global.sort_buffer_size >= 32776 AND @@global.sort_buffer_size < 33000; +eval +SELECT @@global.sort_buffer_size $kbrange32; SET @@global.sort_buffer_size = 4294967296; SELECT @@global.sort_buffer_size; --Error ER_PARSE_ERROR @@ -122,9 +135,11 @@ SET @@global.sort_buffer_size = test; SELECT @@global.sort_buffer_size; SET @@session.sort_buffer_size = 32775; -SELECT @@session.sort_buffer_size >= 32776 AND @@session.sort_buffer_size < 33000; +eval +SELECT @@session.sort_buffer_size $kbrange32; SET @@session.sort_buffer_size = -2; -SELECT @@session.sort_buffer_size >= 32776 AND @@session.sort_buffer_size < 33000; +eval +SELECT @@session.sort_buffer_size $kbrange32; --Error ER_PARSE_ERROR SET @@session.sort_buffer_size = 65530.34.; SET @@session.sort_buffer_size = 4294967296; @@ -148,7 +163,7 @@ SELECT @@global.sort_buffer_size = VARIABLE_VALUE FROM #################################################################### SELECT @@session.sort_buffer_size = VARIABLE_VALUE FROM - INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='sort_buffer_size'; +INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='sort_buffer_size'; --echo '#------------------FN_DYNVARS_151_08-----------------------#' @@ -157,9 +172,11 @@ SELECT @@session.sort_buffer_size = VARIABLE_VALUE FROM #################################################################### SET @@global.sort_buffer_size = TRUE; -SELECT @@global.sort_buffer_size >= 32776 AND @@global.sort_buffer_size < 33000; +eval +SELECT @@global.sort_buffer_size $kbrange32; SET @@global.sort_buffer_size = FALSE; -SELECT @@global.sort_buffer_size >= 32776 AND @@global.sort_buffer_size < 33000; +eval +SELECT @@global.sort_buffer_size $kbrange32; --echo '#---------------------FN_DYNVARS_151_09----------------------#' #################################################################################### @@ -185,7 +202,8 @@ SELECT @@local.sort_buffer_size = @@session.sort_buffer_size; ################################################################################### SET sort_buffer_size = 9100; -SELECT @@sort_buffer_size >= 32776 AND @@sort_buffer_size < 33000; +eval +SELECT @@sort_buffer_size $kbrange32; --Error ER_UNKNOWN_TABLE SELECT local.sort_buffer_size; --Error ER_UNKNOWN_TABLE diff --git a/mysql-test/suite/sys_vars/r/sort_buffer_size_basic_32.result b/mysql-test/suite/sys_vars/r/sort_buffer_size_basic_32.result index 353ea9dee8c..9d3eadcc26f 100644 --- a/mysql-test/suite/sys_vars/r/sort_buffer_size_basic_32.result +++ b/mysql-test/suite/sys_vars/r/sort_buffer_size_basic_32.result @@ -3,31 +3,31 @@ SET @start_session_value = @@session.sort_buffer_size; '#--------------------FN_DYNVARS_151_01-------------------------#' SET @@global.sort_buffer_size = 1000; SET @@global.sort_buffer_size = DEFAULT; -SELECT @@global.sort_buffer_size >= 2097116 AND @@global.sort_buffer_size < 3000000; -@@global.sort_buffer_size >= 2097116 AND @@global.sort_buffer_size < 3000000 +SELECT @@global.sort_buffer_size BETWEEN 2097116 AND 2100000; +@@global.sort_buffer_size BETWEEN 2097116 AND 2100000 1 SET @@session.sort_buffer_size = 2000; SET @@session.sort_buffer_size = DEFAULT; -SELECT @@session.sort_buffer_size >= 2097116 AND @@session.sort_buffer_size < 3000000; -@@session.sort_buffer_size >= 2097116 AND @@session.sort_buffer_size < 3000000 +SELECT @@session.sort_buffer_size BETWEEN 2097116 AND 2100000; +@@session.sort_buffer_size BETWEEN 2097116 AND 2100000 1 '#--------------------FN_DYNVARS_151_02-------------------------#' SET @@global.sort_buffer_size = DEFAULT; -SELECT @@global.sort_buffer_size >= 2097116 AND @@global.sort_buffer_size < 3000000; -@@global.sort_buffer_size >= 2097116 AND @@global.sort_buffer_size < 3000000 +SELECT @@global.sort_buffer_size BETWEEN 2097116 AND 2100000; +@@global.sort_buffer_size BETWEEN 2097116 AND 2100000 1 SET @@session.sort_buffer_size = DEFAULT; -SELECT @@session.sort_buffer_size >= 2097116 AND @@session.sort_buffer_size < 3000000; -@@session.sort_buffer_size >= 2097116 AND @@session.sort_buffer_size < 3000000 +SELECT @@session.sort_buffer_size BETWEEN 2097116 AND 2100000; +@@session.sort_buffer_size BETWEEN 2097116 AND 2100000 1 '#--------------------FN_DYNVARS_151_03-------------------------#' SET @@global.sort_buffer_size = 32776; -SELECT @@global.sort_buffer_size >= 32776 AND @@global.sort_buffer_size < 33000; -@@global.sort_buffer_size >= 32776 AND @@global.sort_buffer_size < 33000 +SELECT @@global.sort_buffer_size BETWEEN 32776 AND 32999; +@@global.sort_buffer_size BETWEEN 32776 AND 32999 1 SET @@global.sort_buffer_size = 32777; -SELECT @@global.sort_buffer_size >= 32776 AND @@global.sort_buffer_size < 33000; -@@global.sort_buffer_size >= 32776 AND @@global.sort_buffer_size < 33000 +SELECT @@global.sort_buffer_size BETWEEN 32776 AND 32999; +@@global.sort_buffer_size BETWEEN 32776 AND 32999 1 SET @@global.sort_buffer_size = 4294967295; SELECT @@global.sort_buffer_size; @@ -39,12 +39,12 @@ SELECT @@global.sort_buffer_size; 4294967294 '#--------------------FN_DYNVARS_151_04-------------------------#' SET @@session.sort_buffer_size = 32776; -SELECT @@session.sort_buffer_size >= 32776 AND @@session.sort_buffer_size < 33000; -@@session.sort_buffer_size >= 32776 AND @@session.sort_buffer_size < 33000 +SELECT @@session.sort_buffer_size BETWEEN 32776 AND 32999; +@@session.sort_buffer_size BETWEEN 32776 AND 32999 1 SET @@session.sort_buffer_size = 32777; -SELECT @@session.sort_buffer_size >= 32776 AND @@session.sort_buffer_size < 33000; -@@session.sort_buffer_size >= 32776 AND @@session.sort_buffer_size < 33000 +SELECT @@session.sort_buffer_size BETWEEN 32776 AND 32999; +@@session.sort_buffer_size BETWEEN 32776 AND 32999 1 SET @@session.sort_buffer_size = 4294967295; SELECT @@session.sort_buffer_size; @@ -56,12 +56,12 @@ SELECT @@session.sort_buffer_size; 4294967294 '#------------------FN_DYNVARS_151_05-----------------------#' SET @@global.sort_buffer_size = 32775; -SELECT @@global.sort_buffer_size >= 32776 AND @@global.sort_buffer_size < 33000; -@@global.sort_buffer_size >= 32776 AND @@global.sort_buffer_size < 33000 +SELECT @@global.sort_buffer_size BETWEEN 32776 AND 32999; +@@global.sort_buffer_size BETWEEN 32776 AND 32999 1 SET @@global.sort_buffer_size = -1024; -SELECT @@global.sort_buffer_size >= 32776 AND @@global.sort_buffer_size < 33000; -@@global.sort_buffer_size >= 32776 AND @@global.sort_buffer_size < 33000 +SELECT @@global.sort_buffer_size BETWEEN 32776 AND 32999; +@@global.sort_buffer_size BETWEEN 32776 AND 32999 1 SET @@global.sort_buffer_size = 4294967296; SELECT @@global.sort_buffer_size; @@ -78,12 +78,12 @@ SELECT @@global.sort_buffer_size; @@global.sort_buffer_size 4294967295 SET @@session.sort_buffer_size = 32775; -SELECT @@session.sort_buffer_size >= 32776 AND @@session.sort_buffer_size < 33000; -@@session.sort_buffer_size >= 32776 AND @@session.sort_buffer_size < 33000 +SELECT @@session.sort_buffer_size BETWEEN 32776 AND 32999; +@@session.sort_buffer_size BETWEEN 32776 AND 32999 1 SET @@session.sort_buffer_size = -2; -SELECT @@session.sort_buffer_size >= 32776 AND @@session.sort_buffer_size < 33000; -@@session.sort_buffer_size >= 32776 AND @@session.sort_buffer_size < 33000 +SELECT @@session.sort_buffer_size BETWEEN 32776 AND 32999; +@@session.sort_buffer_size BETWEEN 32776 AND 32999 1 SET @@session.sort_buffer_size = 65530.34.; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1 @@ -105,12 +105,12 @@ INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='sort_buffer_size'; 1 '#------------------FN_DYNVARS_151_08-----------------------#' SET @@global.sort_buffer_size = TRUE; -SELECT @@global.sort_buffer_size >= 32776 AND @@global.sort_buffer_size < 33000; -@@global.sort_buffer_size >= 32776 AND @@global.sort_buffer_size < 33000 +SELECT @@global.sort_buffer_size BETWEEN 32776 AND 32999; +@@global.sort_buffer_size BETWEEN 32776 AND 32999 1 SET @@global.sort_buffer_size = FALSE; -SELECT @@global.sort_buffer_size >= 32776 AND @@global.sort_buffer_size < 33000; -@@global.sort_buffer_size >= 32776 AND @@global.sort_buffer_size < 33000 +SELECT @@global.sort_buffer_size BETWEEN 32776 AND 32999; +@@global.sort_buffer_size BETWEEN 32776 AND 32999 1 '#---------------------FN_DYNVARS_151_09----------------------#' SET @@global.sort_buffer_size = 9000; @@ -127,8 +127,8 @@ SELECT @@local.sort_buffer_size = @@session.sort_buffer_size; 1 '#---------------------FN_DYNVARS_151_11----------------------#' SET sort_buffer_size = 9100; -SELECT @@sort_buffer_size >= 32776 AND @@sort_buffer_size < 33000; -@@sort_buffer_size >= 32776 AND @@sort_buffer_size < 33000 +SELECT @@sort_buffer_size BETWEEN 32776 AND 32999; +@@sort_buffer_size BETWEEN 32776 AND 32999 1 SELECT local.sort_buffer_size; ERROR 42S02: Unknown table 'local' in field list diff --git a/mysql-test/suite/sys_vars/r/sort_buffer_size_basic_64.result b/mysql-test/suite/sys_vars/r/sort_buffer_size_basic_64.result index 3708f88f889..c993c8a0a88 100644 --- a/mysql-test/suite/sys_vars/r/sort_buffer_size_basic_64.result +++ b/mysql-test/suite/sys_vars/r/sort_buffer_size_basic_64.result @@ -3,31 +3,31 @@ SET @start_session_value = @@session.sort_buffer_size; '#--------------------FN_DYNVARS_151_01-------------------------#' SET @@global.sort_buffer_size = 1000; SET @@global.sort_buffer_size = DEFAULT; -SELECT @@global.sort_buffer_size >= 2097116 AND @@global.sort_buffer_size < 3000000; -@@global.sort_buffer_size >= 2097116 AND @@global.sort_buffer_size < 3000000 +SELECT @@global.sort_buffer_size BETWEEN 2097116 AND 2100000; +@@global.sort_buffer_size BETWEEN 2097116 AND 2100000 1 SET @@session.sort_buffer_size = 2000; SET @@session.sort_buffer_size = DEFAULT; -SELECT @@session.sort_buffer_size >= 2097116 AND @@session.sort_buffer_size < 3000000; -@@session.sort_buffer_size >= 2097116 AND @@session.sort_buffer_size < 3000000 +SELECT @@session.sort_buffer_size BETWEEN 2097116 AND 2100000; +@@session.sort_buffer_size BETWEEN 2097116 AND 2100000 1 '#--------------------FN_DYNVARS_151_02-------------------------#' SET @@global.sort_buffer_size = DEFAULT; -SELECT @@global.sort_buffer_size >= 2097116 AND @@global.sort_buffer_size < 3000000; -@@global.sort_buffer_size >= 2097116 AND @@global.sort_buffer_size < 3000000 +SELECT @@global.sort_buffer_size BETWEEN 2097116 AND 2100000; +@@global.sort_buffer_size BETWEEN 2097116 AND 2100000 1 SET @@session.sort_buffer_size = DEFAULT; -SELECT @@session.sort_buffer_size >= 2097116 AND @@session.sort_buffer_size < 3000000; -@@session.sort_buffer_size >= 2097116 AND @@session.sort_buffer_size < 3000000 +SELECT @@session.sort_buffer_size BETWEEN 2097116 AND 2100000; +@@session.sort_buffer_size BETWEEN 2097116 AND 2100000 1 '#--------------------FN_DYNVARS_151_03-------------------------#' SET @@global.sort_buffer_size = 32776; -SELECT @@global.sort_buffer_size >= 32776 AND @@global.sort_buffer_size < 33000; -@@global.sort_buffer_size >= 32776 AND @@global.sort_buffer_size < 33000 +SELECT @@global.sort_buffer_size BETWEEN 32776 AND 32999; +@@global.sort_buffer_size BETWEEN 32776 AND 32999 1 SET @@global.sort_buffer_size = 32777; -SELECT @@global.sort_buffer_size >= 32776 AND @@global.sort_buffer_size < 33000; -@@global.sort_buffer_size >= 32776 AND @@global.sort_buffer_size < 33000 +SELECT @@global.sort_buffer_size BETWEEN 32776 AND 32999; +@@global.sort_buffer_size BETWEEN 32776 AND 32999 1 SET @@global.sort_buffer_size = 4294967295; SELECT @@global.sort_buffer_size; @@ -39,12 +39,12 @@ SELECT @@global.sort_buffer_size; 4294967294 '#--------------------FN_DYNVARS_151_04-------------------------#' SET @@session.sort_buffer_size = 32776; -SELECT @@session.sort_buffer_size >= 32776 AND @@session.sort_buffer_size < 33000; -@@session.sort_buffer_size >= 32776 AND @@session.sort_buffer_size < 33000 +SELECT @@session.sort_buffer_size BETWEEN 32776 AND 32999; +@@session.sort_buffer_size BETWEEN 32776 AND 32999 1 SET @@session.sort_buffer_size = 32777; -SELECT @@session.sort_buffer_size >= 32776 AND @@session.sort_buffer_size < 33000; -@@session.sort_buffer_size >= 32776 AND @@session.sort_buffer_size < 33000 +SELECT @@session.sort_buffer_size BETWEEN 32776 AND 32999; +@@session.sort_buffer_size BETWEEN 32776 AND 32999 1 SET @@session.sort_buffer_size = 4294967295; SELECT @@session.sort_buffer_size; @@ -56,12 +56,12 @@ SELECT @@session.sort_buffer_size; 4294967294 '#------------------FN_DYNVARS_151_05-----------------------#' SET @@global.sort_buffer_size = 32775; -SELECT @@global.sort_buffer_size >= 32776 AND @@global.sort_buffer_size < 33000; -@@global.sort_buffer_size >= 32776 AND @@global.sort_buffer_size < 33000 +SELECT @@global.sort_buffer_size BETWEEN 32776 AND 32999; +@@global.sort_buffer_size BETWEEN 32776 AND 32999 1 SET @@global.sort_buffer_size = -1024; -SELECT @@global.sort_buffer_size >= 32776 AND @@global.sort_buffer_size < 33000; -@@global.sort_buffer_size >= 32776 AND @@global.sort_buffer_size < 33000 +SELECT @@global.sort_buffer_size BETWEEN 32776 AND 32999; +@@global.sort_buffer_size BETWEEN 32776 AND 32999 1 SET @@global.sort_buffer_size = 4294967296; SELECT @@global.sort_buffer_size; @@ -78,12 +78,12 @@ SELECT @@global.sort_buffer_size; @@global.sort_buffer_size 4294967296 SET @@session.sort_buffer_size = 32775; -SELECT @@session.sort_buffer_size >= 32776 AND @@session.sort_buffer_size < 33000; -@@session.sort_buffer_size >= 32776 AND @@session.sort_buffer_size < 33000 +SELECT @@session.sort_buffer_size BETWEEN 32776 AND 32999; +@@session.sort_buffer_size BETWEEN 32776 AND 32999 1 SET @@session.sort_buffer_size = -2; -SELECT @@session.sort_buffer_size >= 32776 AND @@session.sort_buffer_size < 33000; -@@session.sort_buffer_size >= 32776 AND @@session.sort_buffer_size < 33000 +SELECT @@session.sort_buffer_size BETWEEN 32776 AND 32999; +@@session.sort_buffer_size BETWEEN 32776 AND 32999 1 SET @@session.sort_buffer_size = 65530.34.; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.' at line 1 @@ -105,12 +105,12 @@ INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='sort_buffer_size'; 1 '#------------------FN_DYNVARS_151_08-----------------------#' SET @@global.sort_buffer_size = TRUE; -SELECT @@global.sort_buffer_size >= 32776 AND @@global.sort_buffer_size < 33000; -@@global.sort_buffer_size >= 32776 AND @@global.sort_buffer_size < 33000 +SELECT @@global.sort_buffer_size BETWEEN 32776 AND 32999; +@@global.sort_buffer_size BETWEEN 32776 AND 32999 1 SET @@global.sort_buffer_size = FALSE; -SELECT @@global.sort_buffer_size >= 32776 AND @@global.sort_buffer_size < 33000; -@@global.sort_buffer_size >= 32776 AND @@global.sort_buffer_size < 33000 +SELECT @@global.sort_buffer_size BETWEEN 32776 AND 32999; +@@global.sort_buffer_size BETWEEN 32776 AND 32999 1 '#---------------------FN_DYNVARS_151_09----------------------#' SET @@global.sort_buffer_size = 9000; @@ -127,8 +127,8 @@ SELECT @@local.sort_buffer_size = @@session.sort_buffer_size; 1 '#---------------------FN_DYNVARS_151_11----------------------#' SET sort_buffer_size = 9100; -SELECT @@sort_buffer_size >= 32776 AND @@sort_buffer_size < 33000; -@@sort_buffer_size >= 32776 AND @@sort_buffer_size < 33000 +SELECT @@sort_buffer_size BETWEEN 32776 AND 32999; +@@sort_buffer_size BETWEEN 32776 AND 32999 1 SELECT local.sort_buffer_size; ERROR 42S02: Unknown table 'local' in field list