/**
* Fetch data from given URL
* @param $url String: an url of the form DB://cluster/id or DB://cluster/id/itemid for concatened storage.
+ * @return mixed
*/
function fetchFromURL( $url ) {
$path = explode( '/', $url );
wfDebug( "ExternalStoreDB::fetchBlob cache miss on $cacheID\n" );
$dbr =& $this->getSlave( $cluster );
- $ret = $dbr->selectField( $this->getTable( $dbr ), 'blob_text', array( 'blob_id' => $id ) );
+ $ret = $dbr->selectField( $this->getTable( $dbr ), 'blob_text', array( 'blob_id' => $id ), __METHOD__ );
if ( $ret === false ) {
wfDebugLog( 'ExternalStoreDB', "ExternalStoreDB::fetchBlob master fallback on $cacheID\n" );
// Try the master
$dbw =& $this->getMaster( $cluster );
- $ret = $dbw->selectField( $this->getTable( $dbw ), 'blob_text', array( 'blob_id' => $id ) );
+ $ret = $dbw->selectField( $this->getTable( $dbw ), 'blob_text', array( 'blob_id' => $id ), __METHOD__ );
if( $ret === false) {
wfDebugLog( 'ExternalStoreDB', "ExternalStoreDB::fetchBlob master failed to find $cacheID\n" );
}
throw new MWException( __METHOD__.': no insert ID' );
}
if ( $dbw->getFlag( DBO_TRX ) ) {
- $dbw->commit();
+ $dbw->commit( __METHOD__ );
}
return "DB://$cluster/$id";
}