summaryrefslogtreecommitdiff
path: root/mysql-test/t/partition_order.test
diff options
context:
space:
mode:
authormikael/pappa@dator5.(none) <>2006-07-15 03:38:34 -0400
committermikael/pappa@dator5.(none) <>2006-07-15 03:38:34 -0400
commitcfc65ef720dba90fbc9b81a214a5dc0b8e053105 (patch)
treeede5cd0e0f036a508ee80dc255e3d3b8c7518a0c /mysql-test/t/partition_order.test
parent4e23f9756db632803342705e5f2bbfc979d6cb01 (diff)
downloadmariadb-git-cfc65ef720dba90fbc9b81a214a5dc0b8e053105.tar.gz
BUG#20389: Crash when using index scan in reverse order
Diffstat (limited to 'mysql-test/t/partition_order.test')
-rw-r--r--mysql-test/t/partition_order.test18
1 files changed, 17 insertions, 1 deletions
diff --git a/mysql-test/t/partition_order.test b/mysql-test/t/partition_order.test
index 1e1b3339d64..ad956361d00 100644
--- a/mysql-test/t/partition_order.test
+++ b/mysql-test/t/partition_order.test
@@ -818,11 +818,27 @@ partitions 2
# Insert a couple of tuples
INSERT into t1 values (1, 1);
INSERT into t1 values (5, NULL);
-INSERT into t1 values (2, 5);
+INSERT into t1 values (2, 4);
+INSERT into t1 values (3, 3);
+INSERT into t1 values (4, 5);
+INSERT into t1 values (7, 1);
+INSERT into t1 values (6, 6);
INSERT into t1 values (30, 4);
INSERT into t1 values (35, 2);
INSERT into t1 values (40, NULL);
select * from t1 force index (b) where b < 10 OR b IS NULL order by b;
+select * from t1 force index (b) where b < 10 ORDER BY b;
+select * from t1 force index (b) where b < 10 ORDER BY b DESC;
+drop table t1;
+create table t1 (a int not null, b int, c varchar(20), key (a,b,c))
+partition by range (b)
+(partition p0 values less than (5),
+ partition p1 values less than (10));
+INSERT into t1 values (1,1,'1'),(2,2,'2'),(1,3,'3'),(2,4,'4'),(1,5,'5');
+INSERT into t1 values (2,6,'6'),(1,7,'7'),(2,8,'8'),(1,9,'9');
+INSERT into t1 values (1, NULL, NULL), (2, NULL, '10');
+select * from t1 where a = 1 order by a desc, b desc;
+select * from t1 where a = 1 order by b desc;
drop table t1;