Index: trunk/phase3/includes/BagOStuff.php |
— | — | @@ -307,8 +307,9 @@ |
308 | 308 | } |
309 | 309 | try { |
310 | 310 | $db->begin(); |
311 | | - $db->delete( 'objectcache', array( 'keyname' => $key ), __METHOD__ ); |
312 | | - $db->insert( 'objectcache', |
| 311 | + // (bug 24425) use a replace if the db supports it instead of |
| 312 | + // delete/insert to avoid clashes with conflicting keynames |
| 313 | + $db->replace( 'objectcache', array( 'keyname' ), |
313 | 314 | array( |
314 | 315 | 'keyname' => $key, |
315 | 316 | 'value' => $db->encodeBlob( $this->serialize( $value ) ), |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -258,6 +258,8 @@ |
259 | 259 | useful error message. |
260 | 260 | * Uploading to a protected title will allow the user to choose a new name |
261 | 261 | instead of showing an error page |
| 262 | +* (bug 24425) Use Database::replace instead of delete/insert in SqlBagOStuff::set |
| 263 | + to avoid query errors about duplicate keynames. |
262 | 264 | |
263 | 265 | === API changes in 1.17 === |
264 | 266 | * (bug 22738) Allow filtering by action type on query=logevent. |