Bug #19112 don't call mysql_free_result() inside the scope will got segmentation error
Submitted: 15 Apr 2006 4:25 Modified: 17 Apr 2006 15:51
Reporter: chang chao Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.20 OS:Linux (linux)
Assigned to: CPU Architecture:Any

[15 Apr 2006 4:25] chang chao
Description:
  u must be call mysql_free_result() inside the scope of the function that called mysql_store_result(),  else u will got segmentation fault error on other code segment of allocating memory.

  if u don't call mysql_free_result() before exit the scope , u will got this error.

i think this is a very serious issue on mysql linux version, maybe only on version 5.0.20.

  i just write a sample code to test this bug, in the code, just call mysql relation function, and got segmentation error on following code of allocating memory..

How to repeat:
easy to repeat, just call mysql_free_result outside of the scope of call mysql_store_result, and following code do some job(at least 20 lines code), and 
u will got this error.
[15 Apr 2006 8:12] Valeriy Kravchuk
Thank you for a problem report. Please, send your complete test case.
[17 Apr 2006 15:28] chang chao
sorry, its my fault, my code following mysql relation statements write data execeed allocated memory size, and if remark mysql section, will not broken,
but its not really mysql problem, and now i already resoloved it, thanks.
[17 Apr 2006 15:51] MySQL Verification Team
According reporter last comment.