Title: [174494] trunk/Websites/perf.webkit.org
Revision
174494
Author
[email protected]
Date
2014-10-08 19:50:04 -0700 (Wed, 08 Oct 2014)

Log Message

Another unreviewed build fix after r174475.

Don't try to insert a duplicated row into build_commits as it results in a database constraint error.

This has been caught by a test in /api/report. I don't know why I thought all tests were passing.

* public/include/report-processor.php:

Modified Paths

Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (174493 => 174494)


--- trunk/Websites/perf.webkit.org/ChangeLog	2014-10-09 01:51:25 UTC (rev 174493)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2014-10-09 02:50:04 UTC (rev 174494)
@@ -1,5 +1,15 @@
 2014-10-08  Ryosuke Niwa  <[email protected]>
 
+        Another unreviewed build fix after r174477.
+
+        Don't try to insert a duplicated row into build_commits as it results in a database constraint error.
+
+        This has been caught by a test in /api/report. I don't know why I thought all tests were passing.
+
+        * public/include/report-processor.php:
+
+2014-10-08  Ryosuke Niwa  <[email protected]>
+
         Unreviewed build fix after r174477.
 
         * init-database.sql: Removed build_commits_index since it's redundant with build_commit's primary key.

Modified: trunk/Websites/perf.webkit.org/public/include/report-processor.php (174493 => 174494)


--- trunk/Websites/perf.webkit.org/public/include/report-processor.php	2014-10-09 01:51:25 UTC (rev 174493)
+++ trunk/Websites/perf.webkit.org/public/include/report-processor.php	2014-10-09 02:50:04 UTC (rev 174494)
@@ -113,8 +113,8 @@
             if (abs($commit_row['commit_time'] - $commit_data['time']) > 1.0)
                 $this->exit_with_error('MismatchingCommitTime', array('existing' => $commit_row, 'new' => $commit_data));
 
-            if (!$this->db->insert_row('build_commits', null,
-                array('commit_build' => $build_id, 'build_commit' => $commit_row['commit_id']), null))
+            if (!$this->db->select_or_insert_row('build_commits', null,
+                array('commit_build' => $build_id, 'build_commit' => $commit_row['commit_id']), null, '*'))
                 $this->exit_with_error('FailedToRelateCommitToBuild', array('commit' => $commit_row, 'build' => $build_id));
         }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to