* Silently ignore errors on profiling table update.
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 2 May 2006 23:52:15 +0000 (23:52 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 2 May 2006 23:52:15 +0000 (23:52 +0000)
RELEASE-NOTES
includes/Profiling.php

index 530a361..dd6b33a 100644 (file)
@@ -189,6 +189,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 5796) We require MySQL >=4.0.14
 * Add 'EmailConfirmed' hook
 * New findhooks.php script to find undocumented hooks.
+* Silently ignore errors on profiling table update.
+
 
 == Compatibility ==
 
index 54c8ff1..52d8de8 100644 (file)
@@ -325,6 +325,7 @@ class Profiler {
                $dbw = & wfGetDB(DB_MASTER);
                if (!is_object($dbw))
                        return false;
+               $errorState = $dbw->ignoreErrors( true );
                $profiling = $dbw->tableName('profiling');
 
                $name = substr($name, 0, 255);
@@ -343,6 +344,7 @@ class Profiler {
                //     "ON DUPLICATE KEY UPDATE ".
                //     "pf_count=pf_count + VALUES(pf_count), ".
                //     "pf_time=pf_time + VALUES(pf_time)";
+               $dbw->ignoreErrors( $errorState );
        }
 
        /**