Last modified: 2013-01-28 11:43:48 UTC
Are all (or at least most) of the various freeResult calls on DB objects superfluous? i.e. Shouldn't code scope take care of them?
There's 116 or so in phase3 alone, and no doubt, many more in extensions
r70686 looks like Chad has done most of them...
Search "->freeResult" (14 hits in 4 files) R:\Programming\SVN\mediawiki\trunk\phase3\includes\db\Database.php (1 hits) Line 2788: $this->db->freeResult( $this ); R:\Programming\SVN\mediawiki\trunk\phase3\maintenance\convertLinks.inc (3 hits) Line 60: $dbw->freeResult( $res ); Line 91: $dbw->freeResult( $res ); Line 131: $dbw->freeResult( $res ); R:\Programming\SVN\mediawiki\trunk\phase3\maintenance\convertLinks.php (3 hits) Line 83: $dbw->freeResult( $res ); Line 114: $dbw->freeResult( $res ); Line 154: $dbw->freeResult( $res ); R:\Programming\SVN\mediawiki\trunk\phase3\maintenance\storage\checkStorage.php (7 hits) Line 76: $dbr->freeResult( $res ); Line 129: $dbr->freeResult( $res ); Line 162: $dbr->freeResult( $res ); Line 183: $extDb->freeResult( $res ); Line 241: $dbr->freeResult( $res ); Line 279: $dbr->freeResult( $res ); Line 366: $extDb->freeResult( $res );
are you sure scope takes care of them?
Still valid in 1.21wmf8: $:andre\> grep -r "\->freeResult" . ./includes/db/DatabaseUtility.php: $this->db->freeResult( $this ); ./maintenance/storage/checkStorage.php: $dbr->freeResult( $res ); ./maintenance/storage/checkStorage.php: $dbr->freeResult( $res ); ./maintenance/storage/checkStorage.php: $dbr->freeResult( $res ); ./maintenance/storage/checkStorage.php: $extDb->freeResult( $res ); ./maintenance/storage/checkStorage.php: $dbr->freeResult( $res ); ./maintenance/storage/checkStorage.php: $dbr->freeResult( $res ); ./maintenance/storage/checkStorage.php: $extDb->freeResult( $res ); ./maintenance/convertLinks.php: $dbw->freeResult( $res ); ./maintenance/convertLinks.php: $dbw->freeResult( $res ); ./maintenance/convertLinks.php: $dbw->freeResult( $res );