From 96634253b7c4b8c6649f14f24b4786ac1996a40f Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 12 Feb 2004 15:53:47 +0100 Subject: [PATCH 1/5] - always use CXX=gcc (not only when using gcc 3) to avoid a dependency on libstdc++ and exceptions --- support-files/mysql.spec.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index 3ee602e7504..b69d6961f37 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -258,10 +258,11 @@ export PATH # Build the 4.0 Max binary (includes BDB and UDFs and therefore # cannot be linked statically against the patched glibc) -# If we want to compile with RAID using gcc 3, we need to use -# gcc instead of g++ to avoid linking problems (RAID code is written in C++) -test -z $CXX && test -z $CC && if gcc -v 2>&1 | grep 'gcc version 3' > /dev/null 2>&1 +# Use gcc for C and C++ code (to avoid a dependency on libstdc++ and +# including exceptions into the code +test -z $CXX && test -z $CC then + export CC="gcc" export CXX="gcc" fi @@ -573,6 +574,10 @@ fi # The spec file changelog only includes changes made to the spec file # itself %changelog +* Thu Feb 12 2004 Lenz Grimmer + +- when using gcc, _always_ use CXX=gcc + * Tue Feb 03 2004 Lenz Grimmer - added myisam_ftdump to the Server package From 99472547d45e48a4a1fa4597ac5efd4432325849 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 12 Feb 2004 16:51:52 +0100 Subject: [PATCH 2/5] - fixed broken shellcode --- support-files/mysql.spec.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index b69d6961f37..18f41ed5326 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -260,7 +260,7 @@ export PATH # Use gcc for C and C++ code (to avoid a dependency on libstdc++ and # including exceptions into the code -test -z $CXX && test -z $CC +if [ -z "$CXX" -a -z "$CC" ] then export CC="gcc" export CXX="gcc" From 9c919004589c3c2e0368104a35b039c419d5cb02 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 12 Feb 2004 17:12:08 +0100 Subject: [PATCH 3/5] - Replaced obsolete "Copyright" field with "License" in the RPM spec file support-files/mysql.spec.sh: - Replaced obsolete "Copyright" field with "License" --- support-files/mysql.spec.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index 18f41ed5326..cea9c112b8b 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -16,7 +16,7 @@ Summary(pt_BR): MySQL: Um servidor SQL r Group(pt_BR): Aplicações/Banco_de_Dados Version: @MYSQL_NO_DASH_VERSION@ Release: %{release} -Copyright: GPL +License: GPL Source: http://www.mysql.com/Downloads/MySQL-@MYSQL_BASE_VERSION@/mysql-%{mysql_version}.tar.gz URL: http://www.mysql.com/ Packager: Lenz Grimmer @@ -577,6 +577,7 @@ fi * Thu Feb 12 2004 Lenz Grimmer - when using gcc, _always_ use CXX=gcc +- replaced Copyright with License field (Copyright is obsolete) * Tue Feb 03 2004 Lenz Grimmer From df793ff9bae13bb045c9e1d829cd8e009df8af79 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 12 Feb 2004 19:33:06 +0100 Subject: [PATCH 4/5] - bumped up version number in configure.in from 4.0.18 -> 4.0.19 - Tagged ChangeSet@1.1733 as mysql-4.0.18 configure.in: - bumped up version number from 4.0.18 -> 4.0.19 --- configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.in b/configure.in index 5ed2105be89..1fa9e1c5a38 100644 --- a/configure.in +++ b/configure.in @@ -4,7 +4,7 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(sql/mysqld.cc) AC_CANONICAL_SYSTEM # The Docs Makefile.am parses this line! -AM_INIT_AUTOMAKE(mysql, 4.0.18) +AM_INIT_AUTOMAKE(mysql, 4.0.19) AM_CONFIG_HEADER(config.h) PROTOCOL_VERSION=10 From 9c8ca1fa64398ed8679b3aba3a51490ac16fa9c9 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 12 Feb 2004 23:45:39 +0400 Subject: [PATCH 5/5] fixed copying of color in SEL_ARG::clone (fixed bug #2968) mysql-test/r/select_found.result: added new tests for bugs with range optimization (bugs #2448 and #2698) mysql-test/t/select_found.test: added new tests for bugs with range optimization (bugs #2448 and #2698) --- mysql-test/r/select_found.result | 18 ++++++++++++++++++ mysql-test/t/select_found.test | 28 ++++++++++++++++++++++++++++ sql/opt_range.cc | 1 + 3 files changed, 47 insertions(+) diff --git a/mysql-test/r/select_found.result b/mysql-test/r/select_found.result index 419ffb73d59..367bdd798b4 100644 --- a/mysql-test/r/select_found.result +++ b/mysql-test/r/select_found.result @@ -188,3 +188,21 @@ select FOUND_ROWS(); FOUND_ROWS() 0 drop table t1; +CREATE TABLE t1 ( a int not null, b int not null, KEY ab(a,b) ); +INSERT INTO t1 VALUES ( 47, 1 ); +INSERT INTO t1 VALUES ( 70, 1 ); +SELECT * FROM t1 +WHERE +( +( b =1 AND a BETWEEN 14 AND 21 ) OR +( b =2 AND a BETWEEN 16 AND 18 ) OR +( b =3 AND a BETWEEN 15 AND 19 ) +); +a b +DROP TABLE t1; +CREATE TABLE t1 ( a integer, u varchar(15), r integer, key uao_idx( r, a, u)); +DELETE FROM t1 +WHERE ( r = 1 AND a IN ( 1, 2 ) AND ( u = 'w' OR u LIKE 'w/%' ) ) +OR ( r = 1 AND a IN ( 3 ) AND ( u = 'w/U' OR u LIKE 'w/U/%' ) ) +OR ( r = 1 AND a IN ( 1, 2, 3 ) AND ( u = 'w' ) ); +drop table t1; diff --git a/mysql-test/t/select_found.test b/mysql-test/t/select_found.test index f5ee4d5c010..e584fca206f 100644 --- a/mysql-test/t/select_found.test +++ b/mysql-test/t/select_found.test @@ -99,3 +99,31 @@ select FOUND_ROWS(); select SQL_CALC_FOUND_ROWS * from t1 where id > 6 limit 0, 1; select FOUND_ROWS(); drop table t1; + +# +# Other bugs with range optimization +# + +# bug #2448 + +CREATE TABLE t1 ( a int not null, b int not null, KEY ab(a,b) ); +INSERT INTO t1 VALUES ( 47, 1 ); +INSERT INTO t1 VALUES ( 70, 1 ); +SELECT * FROM t1 +WHERE +( + ( b =1 AND a BETWEEN 14 AND 21 ) OR + ( b =2 AND a BETWEEN 16 AND 18 ) OR + ( b =3 AND a BETWEEN 15 AND 19 ) +); +DROP TABLE t1; + +# bug #2698 + +CREATE TABLE t1 ( a integer, u varchar(15), r integer, key uao_idx( r, a, u)); +DELETE FROM t1 +WHERE ( r = 1 AND a IN ( 1, 2 ) AND ( u = 'w' OR u LIKE 'w/%' ) ) + OR ( r = 1 AND a IN ( 3 ) AND ( u = 'w/U' OR u LIKE 'w/U/%' ) ) + OR ( r = 1 AND a IN ( 1, 2, 3 ) AND ( u = 'w' ) ); +drop table t1; + diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 188d503b767..0ed5c447486 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -488,6 +488,7 @@ SEL_ARG *SEL_ARG::clone(SEL_ARG *new_parent,SEL_ARG **next_arg) return 0; // OOM } increment_use_count(1); + tmp->color= color; return tmp; }