Closed (fixed)
Project:
Zeitgeist
Version:
4.7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Feb 2007 at 09:31 UTC
Updated:
19 Dec 2007 at 15:59 UTC
Right now ZG has a call to a MySQL dependent function to clear resultset at the end of _zeitgeist_block_latest function. Instead, the call should check for $db_type and call the proper handler instead. For example:
global $db_type;
switch ($db_type) {
case 'mysql':
mysql_free_result($q);
break;
case 'mysqli':
mysqli_free_result($q);
break;
case 'pgsql':
//TODO: What is pgsql function?
break;
}
This code is tested and ready to commit, except for pgsql function...
Comments
Comment #1
fgmYou're right, this needs to be fixed. However, we can't let it partly done. The PG function looks like it could be
pg_free_result.However, the best way would be to use a DB-independence function. It's a bit strange not to find a
db_free_resultor something like it in Drupal. Did we miss something ?Comment #2
fgmWell,
db_free_resultdoesn't seem to be existing or planned, so I've added it in here. It can be removed when/if core gets an implementation of this function someday.Fix is included in today's version. Please try it.
Comment #3
(not verified) commentedComment #4
GabiAPF commentedFor postgreSQL it should be:
pg_free_result($q);