From: rniwa@webkit.org Date: Thu, 9 Oct 2014 02:50:04 +0000 (+0000) Subject: Another unreviewed build fix after r174475. X-Git-Url: https://git.webkit.org/?p=WebKit-https.git;a=commitdiff_plain;h=d37bf0e9f3b4cea7d4af8eef065768262ef8a3f8 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: git-svn-id: https://svn.webkit.org/repository/webkit/trunk@174494 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- diff --git a/Websites/perf.webkit.org/ChangeLog b/Websites/perf.webkit.org/ChangeLog index 0d28e78b65d9..fe6b755028b9 100644 --- a/Websites/perf.webkit.org/ChangeLog +++ b/Websites/perf.webkit.org/ChangeLog @@ -1,3 +1,13 @@ +2014-10-08 Ryosuke Niwa + + 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 Unreviewed build fix after r174477. diff --git a/Websites/perf.webkit.org/public/include/report-processor.php b/Websites/perf.webkit.org/public/include/report-processor.php index 162b3a53e0b3..233cda28f072 100644 --- a/Websites/perf.webkit.org/public/include/report-processor.php +++ b/Websites/perf.webkit.org/public/include/report-processor.php @@ -113,8 +113,8 @@ class ReportProcessor { 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)); }