Bug #22797 SQLTables does evil things with a MYSQL_RES

Submitted: 28 Sep 2006 19:09 Modified: 6 Jun 2007 11:57
Reporter: Jim Winstead Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / ODBC Severity:S3 (Non-critical)
Version:3.51r116 OS:Linux (Linux, x86_64)
Assigned to: Jim Winstead CPU Architecture:Any
Tags: SQLTables

[28 Sep 2006 19:09] Jim Winstead
Description:
The implementation of SQLTables() in C/ODBC 3.51 monkeys around with the internals of the MYSQL_RES structure to place copies of hard-coded, statically-allocated data there. This causes trouble with mysql_free_result() is then called on the structure that has been monkeyed with.

How to repeat:
For one thing, t_sqltables() in my_test2.c fails. You can also see fun errors like "Error: Freeing unallocated data at line 894, 'client.c'" in the test output.

Suggested fix:
Don't monkey with the internals of MYSQL_RES.
[16 May 2007 21:53] Jim Winstead
fix freeing of "fake" results

Attachment: bug22797.patch (application/octet-stream, text), 6.07 KiB.

[29 May 2007 19:53] Jim Winstead
The fix for this bug has been committed, and will be in 3.51.16.
[6 Jun 2007 11:57] MC Brown
A note has been added to the 3.51.16 changelog.

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

Page generated in 0.051 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.