break;
}
}
- $wgDatabase->freeResult( $res );
if ( !$found && $conf->DBengine != 'MyISAM' ) {
echo "<li><strong>Warning:</strong> " . htmlspecialchars( $conf->DBengine ) .
" storage engine not available, " .
$onlyAuthor = false;
}
- $dbw->freeResult( $res );
-
// Generate the summary with a '$1' placeholder
if ( $blank ) {
// The current revision is blank and the one before is also
}
}
- $dbr->freeResult( $res );
-
return $result;
}
}
}
- $dbr->freeResult( $res );
-
return $result;
}
}
$arr[$row->pl_namespace][$row->pl_title] = 1;
}
- $this->mDb->freeResult( $res );
return $arr;
}
}
$arr[$row->tl_namespace][$row->tl_title] = 1;
}
- $this->mDb->freeResult( $res );
return $arr;
}
while ( $row = $this->mDb->fetchObject( $res ) ) {
$arr[$row->il_to] = 1;
}
- $this->mDb->freeResult( $res );
return $arr;
}
while ( $row = $this->mDb->fetchObject( $res ) ) {
$arr[$row->el_to] = 1;
}
- $this->mDb->freeResult( $res );
return $arr;
}
while ( $row = $this->mDb->fetchObject( $res ) ) {
$arr[$row->cl_to] = $row->cl_sortkey;
}
- $this->mDb->freeResult( $res );
return $arr;
}
}
$arr[$row->iwl_prefix][$row->iwl_title] = 1;
}
- $this->mDb->freeResult( $res );
return $arr;
}
while ( $row = $this->mDb->fetchObject( $res ) ) {
$arr[$row->pp_propname] = $row->pp_value;
}
- $this->mDb->freeResult( $res );
return $arr;
}
if ( count( $vals ) ) {
if ( !$dbw->insert( 'querycache', $vals, __METHOD__ ) ) {
// Set result to false to indicate error
- $dbr->freeResult( $res );
$res = false;
}
}
- if ( $res ) {
- $dbr->freeResult( $res );
- }
if ( $ignoreErrors ) {
$dbw->ignoreErrors( $ignoreW );
$dbr->ignoreErrors( $ignoreR );
$item = $this->feedResult( $obj );
if( $item ) $feed->outItem( $item );
}
- $dbr->freeResult( $res );
$feed->outFooter();
return true;
$res = $dbr->select( 'recentchanges', '*', array( 'rc_id' => $rcid ), __METHOD__ );
if( $res && $dbr->numRows( $res ) > 0 ) {
$row = $dbr->fetchObject( $res );
- $dbr->freeResult( $res );
return self::newFromRow( $row );
} else {
return null;
$blurlArr[] = $tobj->getInternalURL();
}
}
- $dbr->freeResult ( $res ) ;
wfProfileOut( __METHOD__ );
return new SquidUpdate( $blurlArr );
}
}
}
- $db->freeResult( $res );
return $retVal;
}
foreach ( $res as $row )
// $data[] = Title::newFromText($wgContLang->getNSText ( NS_CATEGORY ).':'.$row->cl_to);
$data[$wgContLang->getNSText( NS_CATEGORY ) . ':' . $row->cl_to] = $this->getFullText();
- $dbr->freeResult( $res );
} else {
$data = array();
}
'wl_title' => $newtitle
);
}
- $dbw->freeResult( $res );
if( empty( $values ) ) {
// Nothing to do
}
$row = $this->fetchRow( $res );
if ( $row !== false ) {
- $this->freeResult( $res );
return reset( $row );
} else {
return false;
if ( $res === false )
return false;
if ( !$this->numRows($res) ) {
- $this->freeResult($res);
return false;
}
$obj = $this->fetchObject( $res );
- $this->freeResult( $res );
return $obj;
-
}
/**
$row = $this->fetchRow( $res );
$rows = ( isset( $row['rowcount'] ) ) ? $row['rowcount'] : 0;
}
- $this->freeResult( $res );
return $rows;
}
$result[] = $row;
}
}
- $this->freeResult($res);
return empty($result) ? false : $result;
}
$old = $this->ignoreErrors( true );
$res = $this->query( "SELECT 1 FROM $table LIMIT 1" );
$this->ignoreErrors( $old );
- if( $res ) {
- $this->freeResult( $res );
- return true;
- } else {
- return false;
- }
+ return (bool)$res;
}
/**
$sql = "SHOW COLUMNS FROM $table LIKE \"$field\";";
$res = $this->query( $sql, 'Database::textFieldSize' );
$row = $this->fetchObject( $res );
- $this->freeResult( $res );
$m = array();
if ( preg_match( '/\((.*)\)/', $row->Type, $m ) ) {
$sql = "SELECT MASTER_POS_WAIT($encFile, $encPos, $timeout)";
$res = $this->doQuery( $sql );
if ( $res && $row = $this->fetchRow( $res ) ) {
- $this->freeResult( $res );
wfProfileOut( $fname );
return $row[0];
} else {
$res = $this->query( "VALUES NEXTVAL FOR $safeseq" );
$row = $this->fetchRow( $res );
$this->mInsertId = $row[0];
- $this->freeResult( $res );
return $this->mInsertId;
*/
return null;
$res = $this->query($sql);
$row = $this->fetchObject($res);
$size = $row->size;
- $this->freeResult( $res );
return $size;
}
if ( $res ) {
$row = $this->fetchRow( $res );
if ( isset( $row['EstimateRows'] ) ) $rows = $row['EstimateRows'];
- $this->freeResult( $res );
}
return $rows;
}
$row = $this->fetchRow( $res );
$size = -1;
if ( strtolower( $row['DATA_TYPE'] ) != 'text' ) $size = $row['CHARACTER_MAXIMUM_LENGTH'];
- $this->freeResult( $res );
return $size;
}
if ( $res === false )
return false;
if ( !$this->numRows( $res ) ) {
- $this->freeResult($res);
return 0;
}
while( $plan = $this->fetchObject( $res ) ) {
$rows *= $plan->rows > 0 ? $plan->rows : 1; // avoid resetting to zero
}
-
- $this->freeResult($res);
return $rows;
}
$lockName = $this->addQuotes( $lockName );
$result = $this->query( "SELECT GET_LOCK($lockName, $timeout) AS lockstatus", $method );
$row = $this->fetchObject( $result );
- $this->freeResult( $result );
if( $row->lockstatus == 1 ) {
return true;
$res = $this->query( "SELECT $seqName.nextval FROM dual" );
$row = $this->fetchRow( $res );
$this->mInsertId = $row[0];
- $this->freeResult( $res );
return $this->mInsertId;
}
if( preg_match( '/rows=(\d+)/', $row[0], $count ) ) {
$rows = $count[1];
}
- $this->freeResult($res);
}
return $rows;
}
$res = $this->query( "SELECT nextval('$safeseq')" );
$row = $this->fetchRow( $res );
$this->mInsertId = $row[0];
- $this->freeResult( $res );
return $this->mInsertId;
}
$res = $this->query( "SELECT currval('$safeseq')" );
$row = $this->fetchRow( $res );
$currval = $row[0];
- $this->freeResult( $res );
return $currval;
}
} else {
$size=$row->size;
}
- $this->freeResult( $res );
return $size;
}
. "AND c.relkind IN ('" . implode("','", $types) . "')";
$res = $this->query( $SQL );
$count = $res ? $res->numRows() : 0;
- if ($res)
- $this->freeResult( $res );
return $count ? true : false;
}
if (!$res)
return null;
$rows = $res->numRows();
- $this->freeResult( $res );
return $rows;
}
if (!$res)
return null;
$rows = $res->numRows();
- $this->freeResult($res);
return $rows;
}
} else {
$owner = false;
}
- if ($res)
- $this->freeResult($res);
return $owner;
}
}
}
}
- $db->freeResult( $res );
wfProfileOut( __METHOD__ );
return $retVal;
}
$fname
);
if ( 0 == $dbr->numRows( $this->historyRes ) ) {
- $dbr->freeResult( $this->historyRes );
$this->historyRes = null;
return false;
}
} elseif ( $this->historyLine == 1 ) {
- $dbr->freeResult( $this->historyRes );
$this->historyRes = $dbr->select( 'oldimage', '*',
array( 'oi_name' => $this->title->getDBkey() ),
$fname,
public function resetHistory() {
$this->historyLine = 0;
if ( !is_null( $this->historyRes ) ) {
- $this->repo->getSlaveDB()->freeResult( $this->historyRes );
$this->historyRes = null;
}
}
"{$archiveBase}/{$this->newHash}{$timestamp}!{$this->newName}"
);
}
- $this->db->freeResult( $result );
}
/**
$talkFlags[$s->page_title] = true;
}
}
- $dbr->freeResult( $res );
wfProfileOut( __METHOD__ . '-db' );
while ( $row = $dbr->fetchObject( $res ) ) {
$linkBatch->addObj( Title::makeTitle( NS_TEMPLATE, $row->pl_title ));
}
-
- $dbr->freeResult( $res );
}
$set = $linkBatch->constructSet( 'lb.tl', $dbr );
$res = $dbr->query( $sql, $fname );
if ( $res ) {
$result = $dbr->fetchObject( $res );
- $dbr->freeResult( $res );
}
}
if ( !$result ) {
$pages[] = $n;
}
-
- $dbr->freeResult($res);
-
return $pages;
}
$pages[] = $n;
}
-
- $dbr->freeResult( $res );
-
return $pages;
}
if( $row !== false ) {
$hash = $row[0];
}
- $dbr->freeResult( $res );
}
# Create the input form
} else {
$ts = false;
}
- $dbr->freeResult( $res );
$sql = '';
# If we were clever, we'd use this to cache.
array_push( $images, $s );
}
}
- $dbr->freeResult( $res );
$gallery = new ImageGallery();
$firstTimestamp = null;
}
$s .= $list->endRecentChangesList();
- $dbr->freeResult( $res );
$wgOut->addHTML( $s );
}
array( 'wl_user' => $user->mId ), 'wlCountItems' );
$row = $dbr->fetchObject( $res );
$count = $row->count;
- $dbr->freeResult( $res );
# Halve to remove talk pages if needed
if( !$talk )
$row->is_image = 0;
$rows[$row->page_id] = $row;
}
- $dbr->freeResult( $plRes );
-
}
if( !$hidetrans ) {
while ( $row = $dbr->fetchObject( $tlRes ) ) {
$row->is_image = 0;
$rows[$row->page_id] = $row;
}
- $dbr->freeResult( $tlRes );
}
if( !$hideimages ) {
while ( $row = $dbr->fetchObject( $ilRes ) ) {
$row->is_image = 1;
$rows[$row->page_id] = $row;
}
- $dbr->freeResult( $ilRes );
}
// Sort by key and then change the keys to 0-based indices
$this->addChunk( $add );
}
$this->lastChunk( $add );
- $this->dbr->freeResult( $result );
$this->log( "Done converting $name." );
$this->cleanupSwaps[] = $name;
$this->addChunk( $add, $row->cur_id );
}
$this->lastChunk( $add );
- $this->dbr->freeResult( $result );
/**
* Copy revision metadata from old into revision.
$this->addChunk( $add );
}
$this->lastChunk( $add );
- $this->dbr->freeResult( $result );
/**
$this->addChunk( $add );
}
$this->lastChunk( $add );
- $this->dbr->freeResult( $result );
$this->log( "...done with cur/old -> page/revision." );
}
$this->addChunk( $add );
}
$this->lastChunk( $add );
- $this->dbr->freeResult( $result );
$this->log( 'Done converting watchlist.' );
$this->cleanupSwaps[] = 'watchlist';
}
$n++;
}
- $dbw->freeResult( $result );
$this->output( "Done! Processed $n pages.\n" );
if ( !$this->hasOption( 'fix' ) ) {
$this->output( "This was a dry run; rerun with --fix to update page_latest.\n" );
$revisions = array();
foreach ( $res as $row )
$revisions[] = $row->rev_id;
- $dbw->freeResult( $res );
$count = count( $revisions );
$this->output( "found {$count}.\n" );
$text = $title->getPrefixedText();
$this->output( "$url $text\n" );
}
- $dbr->freeResult( $result );
}
}
foreach ( $result as $row ) {
$this->outputItem( $row->il_to, $shared );
}
- $dbr->freeResult( $result );
}
/**
foreach ( $result as $row ) {
$this->outputItem( $row->img_name, $shared );
}
- $dbr->freeResult( $result );
}
function outputItem( $name, $shared ) {
}
}
$this->output( "\n" );
- $dbw->freeResult( $res );
global $slaveIndexes;
foreach ( $slaveIndexes as $i ) {
$this->output( $row->page_id . "\t" );
}
}
- $db->freeResult( $res );
}
$this->output( "\n" );
return $desync;
foreach ( $res as $row ) {
$masterIDs[] = $row->rev_id;
}
- $dbw->freeResult( $res );
$res = $db->select( 'revision', array( 'rev_id' ), array( 'rev_page' => $pageID ), __METHOD__ );
$slaveIDs = array();
foreach ( $res as $row ) {
$slaveIDs[] = $row->rev_id;
}
- $db->freeResult( $res );
if ( count( $masterIDs ) < count( $slaveIDs ) ) {
$missingIDs = array_diff( $slaveIDs, $masterIDs );
if ( count( $missingIDs ) ) {
$badRevs[] = $row->rev_id;
}
}
- $dbw->freeResult( $res );
$numBadRevs = count( $badRevs );
if ( $numBadRevs > $numGoodRevs ) {
__METHOD__ );
++$migrated;
}
- $dbr->freeResult( $result );
$delta = microtime( true ) - $start;
$rate = ( $delta == 0.0 ) ? 0.0 : $migrated / $delta;
foreach ( $result as $row ) {
$prefixes[] = $row->iw_prefix;
}
- $this->db->freeResult( $result );
return $prefixes;
}
foreach ( $result as $row ) {
$set[] = $row;
}
- $this->db->freeResult( $result );
-
return $set;
}
WHERE rev_page=$row->page_id
" );
$row2 = $dbw->fetchObject( $result2 );
- $dbw->freeResult( $result2 );
if ( $row2 ) {
if ( $row->rev_timestamp != $row2->max_timestamp ) {
if ( $found == 0 ) {
}
}
$this->log( "Finished $table... $this->updated of $this->processed rows updated" );
- $this->dbr->freeResult( $result );
}
function buildImage() {
$lastSize = 'NULL';
$new = 1; // probably true
}
- $dbw->freeResult( $res2 );
}
if ( $lastCurId == 0 ) {
$this->output( "Uhhh, something wrong? No curid\n" );
$lastSize = $size;
}
}
- $dbw->freeResult( $res );
}
/**
$dbw->query( $sql2 );
}
}
-
- $dbw->freeResult( $res );
}
/**
$u = new SearchUpdate( $s->page_id, $s->page_title, $revtext );
$u->doUpdate();
}
- $this->db->freeResult( $res );
$n += self::RTI_CHUNK_SIZE;
}
}
compressPage( $row, $extdb );
$last = $row->old_id;
}
- $dbw->freeResult( $res );
$start = $last + 1; # Deletion may leave long empty stretches
print "$start...\n";
} while( true );
array( 'old_id' => $id ), $fname );
$numMoved++;
}
- $dbr->freeResult( $res );
}
}
$fname );
while ( $row = $dbr->fetchObject( $res ) ) {
resolveStub( $row->old_id, $row->old_text, $row->old_flags );
- }
- $dbr->freeResult( $res );
-
-
+ }
}
print "100%\n";
}
$dbr = wfGetDB( DB_SLAVE );
$res = $dbr->query( $this->makeSql( $dbr ), __METHOD__ );
$row = $dbr->fetchObject( $res );
- $dbr->freeResult( $res );
return $row ? $row->pagecount : false;
}
}
$tableName = $wgDatabase->tableName( $table );
$res = $wgDatabase->query( "SELECT $field FROM $tableName LIMIT 0" );
$flags = explode( ' ', mysql_field_flags( $res->result, 0 ) );
- $wgDatabase->freeResult( $res );
if ( in_array( 'binary', $flags ) ) {
wfOut( "...$table table has correct $field encoding.\n" );
$tablename = $wgDatabase->tableName( $table );
$result = $wgDatabase->query( "SHOW COLUMNS FROM $tablename LIKE '$field'" );
$info = $wgDatabase->fetchObject( $result );
- $wgDatabase->freeResult( $result );
if ( substr( $info->Type, 0, 3 ) == 'int' ) {
wfOut( "...$field is already a full int ($info->Type).\n" );
$fname );
}
}
- $wgDatabase->freeResult( $result );
wfOut( "ok\n" );
}
);
}
- $wgDatabase->freeResult( $res );
} else {
// Fast update
$wgDatabase->insertSelect( 'templatelinks', 'pagelinks',
return null;
}
if ( !( $r = $wgDatabase->fetchRow( $res ) ) ) {
- $wgDatabase->freeResult( $res );
return null;
}
$indkey = $r[0];
$relid = intval( $r[1] );
$indkeys = explode( " ", $indkey );
- $wgDatabase->freeResult( $res );
$colnames = array();
foreach ( $indkeys as $rid ) {
return null;
}
if ( !( $row2 = $wgDatabase->fetchRow( $r2 ) ) ) {
- $wgDatabase->freeResult( $r2 );
return null;
}
$colnames[] = $row2[0];
- $wgDatabase->freeResult( $r2 );
}
return $colnames;
return null;
}
$d = $row[0];
- $wgDatabase->freeResult( $r );
return $d;
}
while ( $row = $this->db->fetchObject( $result ) ) {
$list[] = $row->user_name;
}
- $this->db->freeResult( $result );
-
return $list;
}
}
wfOut( "\n" );
}
- $this->db->freeResult( $result );
}
/**