View Issue Details [ Jump to Notes ] | [ Print ] |
ID | Project | Category | View Status | Date Submitted | Last Update |
0008113 | CDash | | public | 2008-11-18 04:47 | 2008-11-18 09:47 |
|
Reporter | Michal Cihar | |
Assigned To | Julien Jomier | |
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | | OS Version | |
Product Version | 1.3 | |
Target Version | | Fixed in Version | 1.4 | |
|
Summary | 0008113: Wrong SQL query leads to not storing results |
Description | get_build_id function wrongly creates SQL, which leads in failure from database engine and it is then unable to store further results (eg. coverage tests) for a program. Attached patch fixes this. |
Tags | No tags attached. |
|
Attached Files | cdash-sql.patch [^] (745 bytes) 2008-11-18 04:47 [Show Content] [Hide Content]Index: common.php
===================================================================
--- common.php (revision 1265)
+++ common.php (working copy)
@@ -464,10 +464,10 @@
$buildname = pdo_real_escape_string($buildname);
$stamp = pdo_real_escape_string($stamp);
- $sql = "SELECT id FROM build WHERE name='$buildname' AND stamp='$stamp'";
- $sql .= " AND projectid='$projectid'";
+ $sql = "SELECT build.id AS id FROM build,site WHERE build.name='$buildname' AND build.stamp='$stamp'";
+ $sql .= " AND build.projectid='$projectid'";
$sql .= " AND build.siteid=site.id AND site.name='$sitename'";
- $sql .= " ORDER BY id DESC";
+ $sql .= " ORDER BY build.id DESC";
$build = pdo_query($sql);
if(pdo_num_rows($build)>0)
{
|
|