From: Brion Vibber Date: Fri, 28 Oct 2005 06:26:16 +0000 (+0000) Subject: * MySQL 5.0 strict mode fix for moving unwatched pages X-Git-Tag: 1.6.0~1290 X-Git-Url: http://git.cyclocoop.org/url?a=commitdiff_plain;h=cc1fd0263a8cfed6ae7acb488956f6063dc62d63;p=lhc%2Fweb%2Fwiklou.git * MySQL 5.0 strict mode fix for moving unwatched pages It was doing an empty REPLACE, which apparently is unpopular. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 9ce790bd20..e132b2f48f 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -180,6 +180,7 @@ fully support the editing toolbar, but was found to be too confusing. * Fail gracefully on invalid namespace in Special:Newpages * (bug 3806) Gracefully fall back to client-side scaling on |thumb| image that passes $wgMaxImageArea +* MySQL 5.0 strict mode fix for moving unwatched pages === Caveats === diff --git a/includes/WatchedItem.php b/includes/WatchedItem.php index fbbc366b10..2b01a31bf9 100644 --- a/includes/WatchedItem.php +++ b/includes/WatchedItem.php @@ -160,6 +160,11 @@ class WatchedItem { ); } $dbw->freeResult( $res ); + + if( empty( $values ) ) { + // Nothing to do + return true; + } # Perform replace # Note that multi-row replace is very efficient for MySQL but may be inefficient for