php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28620 unexpected mysql-free-result warning (with mysql.trace_mode set to 1)
Submitted: 2004-06-03 11:31 UTC Modified: 2004-06-03 12:48 UTC
From: mike at cma dot ee Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 4.3.7RC1 OS: Redhat 7.1 2.4.2-2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mike at cma dot ee
New email:
PHP Version: OS:

 

 [2004-06-03 11:31 UTC] mike at cma dot ee
Description:
------------
If mysql.trace_mode is set to 1 the code produces a warning:

Warning: (null)() [function.mysql-free-result]: 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.

Reproduce code:
---------------
<?
mysql_connect('anyhost', 'anyusr', 'anypass');
mysql_select_db('anydb');
$qResult = mysql_query("SELECT UID FROM Users LIMIT 1");
$aRow = mysql_fetch_assoc($qResult);
?>

Expected result:
----------------
No warning should be displayed


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-06-03 11:38 UTC] mike at cma dot ee
Maybe it should show the warning.
But line number must be correct.. not in Unknown line 0.
 [2004-06-03 12:48 UTC] derick@php.net
It is correct behavior, the line number does no longer exist at the end of the request, and there is no way to asssociate this information either.
 [2022-10-29 02:32 UTC] Elise at porsche dot com
I have got the same bug as well when I was designing my website (https://vascarabag.com/product/new-posc-luxury-leather-women-handbag/)github.com . Can anyone help me to solve it?
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Aug 28 04:00:03 2025 UTC