1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

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
This commit is contained in:
unknown
2007-09-10 16:26:51 +04:00
parent 10012b36fe
commit 732f05a642
3 changed files with 26 additions and 1 deletions

View File

@ -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