diff options
author | Build Team <bteam@astra04> | 2008-11-25 03:04:58 +0100 |
---|---|---|
committer | Build Team <bteam@astra04> | 2008-11-25 03:04:58 +0100 |
commit | 74b354091946336ea8663652d4744b43a2c996e3 (patch) | |
tree | 57f8f30a0ae780070c1c0bd5177f2a2a6a3382ee | |
parent | bfba620e45a74e458dd121f5f2e838760d80cd19 (diff) | |
download | mariadb-git-74b354091946336ea8663652d4744b43a2c996e3.tar.gz |
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
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | client/mysqlslap.c | 4 | ||||
-rw-r--r-- | mysql-test/r/partition.result | 12 | ||||
-rw-r--r-- | mysql-test/t/partition.test | 15 | ||||
-rw-r--r-- | sql/ha_partition.cc | 3 | ||||
-rw-r--r-- | storage/archive/archive_reader.c | 4 | ||||
-rw-r--r-- | storage/ndb/test/run-test/atrt.hpp | 3 | ||||
-rw-r--r-- | storage/ndb/test/tools/connect.cpp | 3 | ||||
-rw-r--r-- | 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 @@ -15,6 +15,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 <build@mysql.com> @@ -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 |