useful error message.
* Uploading to a protected title will allow the user to choose a new name
instead of showing an error page
+* (bug 24425) Use Database::replace instead of delete/insert in SqlBagOStuff::set
+ to avoid query errors about duplicate keynames.
=== API changes in 1.17 ===
* (bug 22738) Allow filtering by action type on query=logevent.
}
try {
$db->begin();
- $db->delete( 'objectcache', array( 'keyname' => $key ), __METHOD__ );
- $db->insert( 'objectcache',
+ // (bug 24425) use a replace if the db supports it instead of
+ // delete/insert to avoid clashes with conflicting keynames
+ $db->replace( 'objectcache', array( 'keyname' ),
array(
'keyname' => $key,
'value' => $db->encodeBlob( $this->serialize( $value ) ),