Bug #38626 memory leak with materialized cursor and prepared statement

Submitted: 7 Aug 2008 11:28 Modified: 7 Aug 2008 12:36
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Prepared statements Severity:S3 (Non-critical)
Version:5.0.66a OS:Any
Assigned to: CPU Architecture:Any
Tags: memory leak, qa.sql

[7 Aug 2008 11:28] Shane Bester
Description:
after running some tests then shutting down the server i found these valgrind messages:

 4,264 (996 direct, 3,268 indirect) bytes in 1 blocks are definitely lost in loss record 7 of 8
at 0x4005400: malloc
by 0x83B1D31: my_malloc
by 0x83B23F3: alloc_root 
by 0x8287AE9: Select_materialize::send_fields
by 0x81D28D5: JOIN::exec
by 0x81D4370: mysql_select
by 0x81CFC77: handle_select
by 0x81A2266: mysql_execute_command
by 0x828690C: mysql_open_cursor
by 0x81F5902: Prepared_statement::execute
by 0x81F46A0: mysql_stmt_execute
by 0x81A1B9F: dispatch_command
 
 
 3,268 bytes in 2 blocks are indirectly lost in loss record 8 of 8
at 0x4005400: malloc 
by 0x83B1D31: my_malloc 
by 0x83B23F3: alloc_root 
by 0x815CD54: sql_alloc
by 0x811C068: Item::tmp_table_field_from_field_type
by 0x81DE0A7: create_tmp_field_from_item
by 0x81D69F7: create_tmp_table
by 0x8276550: select_union::create_result_table
by 0x8287AB8: Select_materialize::send_fields
by 0x81D28D5: JOIN::exec
by 0x81D4370: mysql_select
by 0x81CFC77: handle_select
 
see attachment for entire uncut output of valgrind.

How to repeat:
no testcase yet
[7 Aug 2008 11:31] Shane Bester
output of valgrind

Attachment: bug38626_full_valgrind_output.txt (text/plain), 22.63 KiB.

[7 Aug 2008 12:36] Shane Bester
damn, this is a duplicate of the same bug I opened a month ago! bug #37956

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.050 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.