Page MenuHomePhabricator

PHP warning on Saving Page Edit (MySQL result sets not freed)
Closed, InvalidPublic

Description

Author: posty

Description:
With mysql.trace_mode = on set in the php.ini file the following warning is recorded to the php error log when saving a page:

PHP Warning: Unknown: 2 result set(s) not freed. Use mysql_free_result to free result sets which were requested using mysql_query() in Unknown on line 0


Version: 1.15.x
Severity: trivial
OS: Linux
Platform: Other

Details

Reference
bz21099

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:54 PM
bzimport set Reference to bz21099.
bzimport added a subscriber: Unknown Object (MLST).

I know Tim's mentioned before that we don't need to free results (CCing him), but is this really a problem? mysql.trace_mode is a debugging tool afaik, not something that should be run on live sites. INVALID?

Yeah, my analysis that this warning, and the advice in the PHP manual, both result from a misconception on the part of the author of the mysql module. Testing shows that resources are freed when the reference count of the zval goes to zero, e.g. on unset().