Bug #31115 | Memory leak with ODBC 5.1 driver | ||
---|---|---|---|
Submitted: | 20 Sep 2007 15:45 | Modified: | 13 Nov 2007 11:58 |
Reporter: | vha x | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / ODBC | Severity: | S3 (Non-critical) |
Version: | 5.1.0 alpha | OS: | Windows |
Assigned to: | Jess Balint | CPU Architecture: | Any |
[20 Sep 2007 15:45]
vha x
[20 Sep 2007 16:27]
Jess Balint
How are you measuring the memory use? What is the final memory use for the program using both drivers?
[20 Sep 2007 16:34]
vha x
Memory usage is seen in the task manager. for ODBC 3.51, MemUsage = 3804K, VM Size = 2488K for ODBC 5.1, MemUsage = 347260K, VM Size = 346708K
[25 Sep 2007 16:51]
MySQL Verification Team
Thank you for the bug report.
[9 Oct 2007 17:26]
Jess Balint
Index: C:/Work/odbc_g2/driver/handle.c =================================================================== --- C:/Work/odbc_g2/driver/handle.c (revision 813) +++ C:/Work/odbc_g2/driver/handle.c (revision 814) @@ -483,6 +483,14 @@ reset_ptr(stmt->ard->array_status_ptr); reset_ptr(stmt->stmt_options.rowStatusPtr_ex); /* TODO what else to reset? */ + delete_dynamic(&stmt->apd->records); + delete_dynamic(&stmt->ipd->records); + delete_dynamic(&stmt->ard->records); + delete_dynamic(&stmt->ird->records); + x_free(stmt->apd); + x_free(stmt->ard); + x_free(stmt->ipd); + x_free(stmt->ird); x_free(stmt->cursor.name); x_free(stmt->bind);
[13 Nov 2007 0:09]
Jess Balint
Patch committed and will appear in 5.1.1 release.
[13 Nov 2007 11:58]
MC Brown
A note has been added to the 5.1.1 changelog. Memory usage would increase considerably.