[MDEV-6013] MySQL Bug#59331 filesort with priority queue: handling of out-of-memory Created: 2014-04-02  Updated: 2022-09-08

Status: Open
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.0.10
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Sergey Vojtovich Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
PartOf
is part of MDEV-4784 merge test cases from 5.6 Stalled

 Description   

Test case for MySQL "Bug#59331 filesort with priority queue: handling of out-of-memory" fails in 10.0.

In fact this bug is fixed in 10.0, but there are two problems causing test case to fail:
1. Debug point "bounded_queue_init_fail" probe wasn't merged.
2. "simulate_out_of_memory" probe of my_malloc doesn't report error causing assertion failure.

Please merge test and fix mentioned above issues.

--echo #
--echo # Bug#59331 filesort with priority queue: handling of out-of-memory
--echo #
 
CREATE TABLE t1(f0 int auto_increment primary key, f1 int, f2 varchar(200));
INSERT INTO t1(f1, f2) VALUES
(0,"0"),(1,"1"),(2,"2"),(3,"3"),(4,"4"),(5,"5"),
(6,"6"),(7,"7"),(8,"8"),(9,"9"),(10,"10");
 
set debug= '+d,bounded_queue_init_fail';
--replace_regex /Needed [0-9]* bytes/Needed NN bytes/
--error 5
SELECT * FROM t1 ORDER BY f1 ASC, f0 LIMIT 1;
SET session debug= @old_debug;
 
DROP TABLE t1;


Generated at Thu Feb 08 07:08:43 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.