r51863 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r51862‎ | r51863 | r51864 >
Date:06:54, 15 June 2009
Author:tstarling
Status:deferred (Comments)
Tags:
Comment:
Remove $resultset->free() calls, as in live hack. The calls are unnecessary, removing probably fixes some bug.
Modified paths:
  • /trunk/phase3/includes/Export.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Export.php
@@ -325,7 +325,6 @@
326326 $output .= $this->writer->closePage();
327327 $this->sink->writeClosePage( $output );
328328 }
329 - $resultset->free();
330329 }
331330
332331 protected function outputLogStream( $resultset ) {
@@ -333,7 +332,6 @@
334333 $output = $this->writer->writeLogItem( $row );
335334 $this->sink->writeLogItem( $row, $output );
336335 }
337 - $resultset->free();
338336 }
339337 }
340338

Comments

#Comment by Simetrical (talk | contribs)   21:49, 15 June 2009

If Database::freeResult() is always useless in MySQL, then why don't we just make it a no-op?

#Comment by Tim Starling (talk | contribs)   22:08, 15 June 2009

It's useless in the sense that it does the same thing as unset(), except that it leaves a valid resource behind, which will give an error when you try to use it for anything. In theory there could be callers that use it for something important. We could replace them with unset() but then you'd still get an error when the variable is next used.

Status & tagging log