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:
@ -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
|
||||
|
Reference in New Issue
Block a user