Details
Description
This test script:
DELIMITER $$;
|
--error ER_PARSE_ERROR
|
BEGIN NOT ATOMIC |
DECLARE cur CURSOR (a INT) FOR SELECT a+1; |
OPEN cur(sp_followed_by_syntax_error(); |
CLOSE cur; |
END; |
$$
|
DELIMITER ;$$
|
makes MTR complain about a memory leak:
Warning: 280 bytes lost at 0x7fe82800aba0, allocated by T@0 at mysys/array.c:72, mysys/hash.c:99, sql/sp.cc:2331, sql/sp.cc:2646, sql/item_create.cc:2631, sql/item_create.cc:2477, sql/sql_yacc.yy:10752, sql/sql_parse.cc:10456
Warning: 280 bytes lost at 0x7fe82800aba0, allocated by T@0 at mysys/array.c:72, mysys/hash.c:99, sql/sp.cc:2331, sql/sp.cc:2646, sql/item_create.cc:2631, sql/item_create.cc:2477, sql/sql_yacc.yy:10752, sql/sql_parse.cc:10456
This is a similar problem to MDEV-30680, but the parse error happens in a different syntax context.
The problem happens in the 10.5 tree with MDEV-30680 already pushed.
Attachments
Issue Links
- relates to
-
MDEV-30680 Warning: Memory not freed: 280 on mangled query, LeakSanitizer: detected memory leaks
- Closed