summaryrefslogtreecommitdiff
path: root/mysql-test/t/delete.test
diff options
context:
space:
mode:
authorunknown <sergefp@mysql.com>2007-09-10 16:26:51 +0400
committerunknown <sergefp@mysql.com>2007-09-10 16:26:51 +0400
commit732f05a642279a569c6ed2b67fafff05b9de76c3 (patch)
treea047b9f282dae4ad808feaba2b70309d45ec7bfa /mysql-test/t/delete.test
parent10012b36feb18180892201b4afdd995e9e0f1a0a (diff)
downloadmariadb-git-732f05a642279a569c6ed2b67fafff05b9de76c3.tar.gz
BUG#30385: Server crash when deleting with ORDER BY and LIMIT
in get_index_for_order(), don't walk over the end of the index key parts when matching index description and needed ordering. mysql-test/r/delete.result: BUG#30385: Testcase mysql-test/t/delete.test: BUG#30385: Testcase
Diffstat (limited to 'mysql-test/t/delete.test')
-rw-r--r--mysql-test/t/delete.test13
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/t/delete.test b/mysql-test/t/delete.test
index 301b2cdbb99..fdbb96e0c2f 100644
--- a/mysql-test/t/delete.test
+++ b/mysql-test/t/delete.test
@@ -184,4 +184,17 @@ delete from t1 where (@a:= f1) order by f1 limit 1;
select @a;
drop table t1;
+# BUG#30385 "Server crash when deleting with order by and limit"
+CREATE TABLE t1 (
+ `date` date ,
+ `time` time ,
+ `seq` int(10) unsigned NOT NULL auto_increment,
+ PRIMARY KEY (`seq`),
+ KEY `seq` (`seq`),
+ KEY `time` (`time`),
+ KEY `date` (`date`)
+);
+DELETE FROM t1 ORDER BY date ASC, time ASC LIMIT 1;
+drop table t1;
+
--echo End of 4.1 tests