[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-tracker] [Bug #2879] mysql_free_result() raises warnings i
From: |
nobody |
Subject: |
[Phpgroupware-tracker] [Bug #2879] mysql_free_result() raises warnings in class.db_mysql.inc.php, in db->free() |
Date: |
Fri, 21 Mar 2003 17:20:36 -0500 |
=================== BUG #2879: LATEST MODIFICATIONS ==================
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=2879&group_id=509
Changes by: Dave Hall <address@hidden>
Date: Sat 03/22/03 at 09:20 (Australia/Melbourne)
What | Removed | Added
---------------------------------------------------------------------------
Bug Group | None | 0.9.14.001 release
Priority | None | Normal
Resolution | None | Invalid
Assigned to | None | skwashd
Status | Open | Closed
Reproducibility | None | Every Time
Summary | mysql_free_result() raises warnings in
class.db_mysql.inc.php, in db::free() | mysql_free_result() raises warnings in
class.db_mysql.inc.php, in db->free()
------------------ Additional Follow-up Comments ----------------------------
I looked into this one a bit. It turns out that it is not a bug. I have
confirmed this with other devs too. Geek speak follows ...
Sometimes apps clone the global db object to make it easier to work with, like
so:
$this->db = $GLOBALS['phpgw']->db;
If there is a 'unfreed' query result in memory when the object is cloned that
handle is also cloned. The next time a query is called it is automatically
freed by a call to db->free().
Due to the db object being cloned, the db class may attempt to free the same
handle twice. The @ supresses any error when freeing the handle, partially for
this reason.
I hope this makes sesnse.
=================== BUG #2879: FULL BUG SNAPSHOT ===================
Submitted by: davidpbrady Project: phpGroupWare
Submitted on: Thu 03/20/03 at 18:27
Category: API - phpGWapi Bug Group: 0.9.14.001 release
Severity: 5 - Major Priority: Normal
Resolution: Invalid Assigned to: skwashd
Status: Closed Component Version: None
Platform Version: Linux - RedHat Reproducibility: Every Time
Summary: mysql_free_result() raises warnings in class.db_mysql.inc.php, in
db->free()
Original Submission: In class.db_mysql.inc.php, in class db, function free(),
the following line of code raises tons of warnings:
@mysql_free_result($this->Query_ID);
Because of the @, the warnings are suppressed, but warning-catcher tools (such
as phpunit) will log the failure. Removing the @ produces a TON of warning
messages:
Warning: mysql_free_result(): 6 is not a valid MySQL result resource in
/usr/local/apache/htdocs/phpgroupware/phpgwapi/inc/class.db_mysql.inc.php on
line 172
The result resource number changes, but the number of warnings is staggering.
This indicates that the results are not being freed when we expect them
to--they are either already freed, or we've mislabeled them and they aren't
getting freed until PHP finishes the entire script.
This may be related to bug #1192, "MYSQL raise 50% CPU and httpd 45% when
asking 2000 tickets"
Follow-up Comments
*******************
-------------------------------------------------------
Date: Sat 03/22/03 at 09:20 By: skwashd
I looked into this one a bit. It turns out that it is not a bug. I have
confirmed this with other devs too. Geek speak follows ...
Sometimes apps clone the global db object to make it easier to work with, like
so:
$this->db = $GLOBALS['phpgw']->db;
If there is a 'unfreed' query result in memory when the object is cloned that
handle is also cloned. The next time a query is called it is automatically
freed by a call to db->free().
Due to the db object being cloned, the db class may attempt to free the same
handle twice. The @ supresses any error when freeing the handle, partially for
this reason.
I hope this makes sesnse.
-------------------------------------------------------
Date: Thu 03/20/03 at 18:40 By: davidpbrady
Submission error - reproducibility is 'Every Time'. Severity is only major on
large-scale systems.
CC list is empty
No files currently attached
For detailed info, follow this link:
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=2879&group_id=509
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-tracker] [Bug #2879] mysql_free_result() raises warnings in class.db_mysql.inc.php, in db->free(),
nobody <=