#39824 [Opn->Bgs]: mysql_free_result warning

From: Date: Mon, 18 Dec 2006 10:47:36 +0000
Subject: #39824 [Opn->Bgs]: mysql_free_result warning
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-106481@lists.php.net to get a copy of this message
ID: 39824 Updated by: tony2001@php.net Reported By: marcos dot neves at gmail dot com -Status: Open +Status: Bogus Bug Type: MySQL related Operating System: WINXP PHP Version: 5.2.0 New Comment: >Does this error still happens before 5.2? Sure it does. Just enable trace_mode and you'll see it. >Why no warning before? Because you did not enable mysql.trace_mode before. Previous Comments: ------------------------------------------------------------------------ [2006-12-18 10:38:08] marcos dot neves at gmail dot com 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 :( ------------------------------------------------------------------------ [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 (#106481) next »