* (bug 15172) 'Go' button of Special:Recentchanges now on the same line as the
last input element (like Special:Watchlist too)
* (bug 15351) Fix fatal error for invalid section fragments in autocomments
+* Fixed intermittent deadlock errors involving objectcache table queries.
+ Use a separate database connection for the objectcache table to avoid
+ long-lasting locks on that table.
=== API changes in 1.14 ===
$exptime += time();
$exp = $this->_fromunixtime($exptime);
}
- $this->delete( $key );
+ $this->_begin();
+ $this->_query(
+ "DELETE FROM $0 WHERE keyname='$1'", $key );
$this->_doinsert($this->getTableName(), array(
'keyname' => $key,
'value' => $this->_blobencode($this->_serialize($value)),
'exptime' => $exp
));
+ $this->_commit();
return true; /* ? */
}
if ( $this->_readonly() ) {
return false;
}
+ $this->_begin();
$this->_query(
"DELETE FROM $0 WHERE keyname='$1'", $key );
+ $this->_commit();
return true; /* ? */
}
abstract function _readonly();
+ function _begin() {}
+ function _commit() {}
+
function _freeresult($result) {
/* stub */
return false;
return false;
}
$now = $this->_fromunixtime( time() );
+ $this->_begin();
$this->_query( "DELETE FROM $0 WHERE exptime < '$now'" );
+ $this->_commit();
}
function deleteall() {
if ( $this->_readonly() ) {
return false;
}
+ $this->_begin();
$this->_query( "DELETE FROM $0" );
+ $this->_commit();
}
/**
*/
class MediaWikiBagOStuff extends SqlBagOStuff {
var $tableInitialised = false;
+ var $lb, $db;
function _getDB(){
- static $db;
- if( !isset( $db ) )
- $db = wfGetDB( DB_MASTER );
- return $db;
+ if ( !isset( $this->lb ) ) {
+ $this->lb = wfGetLBFactory()->newMainLB();
+ $this->db = $this->lb->getConnection( DB_MASTER );
+ $this->db->clearFlag( DBO_TRX );
+ }
+ return $this->db;
+ }
+ function _begin() {
+ $this->_getDB()->begin();
+ }
+ function _commit() {
+ $this->_getDB()->commit();
}
function _doquery($sql) {
return $this->_getDB()->query( $sql, __METHOD__ );