r17916 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r17915‎ | r17916 | r17917 >
Date:22:11, 24 November 2006
Author:brion
Status:old
Tags:
Comment:
* Use INSERT IGNORE for db-based BagOStuff add/insert, for more memcache-like
behavior when keys already exist on add (instead of dying with an error...)
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/BagOStuff.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/BagOStuff.php
@@ -390,7 +390,8 @@
391391 }
392392 function _doinsert($t, $v) {
393393 $dbw =& wfGetDB( DB_MASTER );
394 - return $dbw->insert($t, $v, 'MediaWikiBagOStuff::_doinsert');
 394+ return $dbw->insert($t, $v, 'MediaWikiBagOStuff::_doinsert',
 395+ array( 'IGNORE' ) );
395396 }
396397 function _fetchobject($result) {
397398 $dbw =& wfGetDB( DB_MASTER );
Index: trunk/phase3/RELEASE-NOTES
@@ -215,6 +215,8 @@
216216 * Added placeholders for text injection by hooks to EditPage.php
217217 * (bug 8009) Automatic edit summary for redirects is not filled for edits in existing pages
218218 * Installer support for experimental MySQL 4.1/5.0 binary-safe schema
 219+* Use INSERT IGNORE for db-based BagOStuff add/insert, for more memcache-like
 220+ behavior when keys already exist on add (instead of dying with an error...)
219221
220222
221223 == Languages updated ==