#39824 [Bgs->Opn]: mysql_free_result warning

From: Date: Mon, 18 Dec 2006 10:38:09 +0000
Subject: #39824 [Bgs->Opn]: mysql_free_result warning
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-106478@lists.php.net to get a copy of this message
ID: 39824 User updated by: marcos dot neves at gmail dot com Reported By: marcos dot neves at gmail dot com -Status: Bogus +Status: Open Bug Type: MySQL related Operating System: WINXP PHP Version: 5.2.0 New Comment: Hide the error msg doesn´t means the error has gone. Does this error still happens before 5.2? Why no warning before? The docs are very clear: "only needs to be called if you are concerned about how much memory is being used for queries that return large result sets. All associated result memory is automatically freed at the end of the script's execution" I hope that this "trick" of hide error messages to "fixes" then, not be used at PHP core code :( Previous Comments: ------------------------------------------------------------------------ [2006-12-18 08:38:48] tony2001@php.net Set mysql.trace_mode to Off in your php.ini. ------------------------------------------------------------------------ [2006-12-13 23:20:33] marcos dot neves at gmail dot com Description: ------------ Starting with mysql 5.2.0, mysql_free_result is required be called before end of script Reproduce code: --------------- <? mysql_connect("localhost", "root", ""); $result = mysql_query("SELECT 1 + 2"); ?> Expected result: ---------------- no warnings, the results should be disposed at end of script, as documentantion saids and as like was before. Actual result: -------------- Warning: Unknown: 1 result set(s) not freed. Use mysql_free_result to free result sets which were requested using mysql_query() in Unknown on line 0 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=39824&edit=1

« previous php.bugs (#106478) next »