summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <timothy.smith@sun.com>2008-11-27 00:02:10 +0100
committerBuild Team <bteam@astra04>2008-11-27 00:02:10 +0100
commit96e0bf50d942258722b25e9d17d209d40eaacd28 (patch)
tree8b74eb8ccd3df7d27cd2c237daeafaf3222fb7eb /mysql-test
parent3d0798d07de937c857c255ce9bfb8c24e10b25e4 (diff)
parent74b354091946336ea8663652d4744b43a2c996e3 (diff)
downloadmariadb-git-96e0bf50d942258722b25e9d17d209d40eaacd28.tar.gz
Merge from mysql-5.1.30-release
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/lib/mtr_report.pl2
-rw-r--r--mysql-test/r/partition.result12
-rw-r--r--mysql-test/t/partition.test15
3 files changed, 28 insertions, 1 deletions
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/mysql-test/r/partition.result b/mysql-test/r/partition.result
index adb055dd5e5..93684ba05e5 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 e8df2b01a94..6a12e4a4d12 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
#