[PATCH 1/2] BUG: Check last error right after SQL query was executed
Igor Murzov
e-mail at date.by
Wed Jul 24 13:33:24 UTC 2013
If the first query fails, the second one is likely to fail too,
so actual error may be hidden by the following unclear error:
(ClientJobSchedule::Save): SQL error: ERROR: currval of sequence
"client_jobschedule_id_seq" is not yet defined in this session
---
models/clientjobschedule.php | 1 +
1 file changed, 1 insertion(+)
diff --git a/models/clientjobschedule.php b/models/clientjobschedule.php
index 8987f90..929e2b1 100644
--- a/models/clientjobschedule.php
+++ b/models/clientjobschedule.php
@@ -260,6 +260,7 @@ class ClientJobSchedule
"','".$cmakecache."','".$clientscript."','".$this->Repository."','".$this->Module."','".$this->BuildNameSuffix.
"','".$this->Tag."','".$this->BuildConfiguration."','".$description."')";
pdo_query($sql);
+ add_last_sql_error("ClientJobSchedule::Save");
$this->Id = pdo_insert_id('client_jobschedule');
add_last_sql_error("ClientJobSchedule::Save");
}
--
1.7.9.5
--MP_/vktH2BgQPTS4H3NzIoeL.Om
Content-Type: text/x-patch
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename=0002-BUG-Initialize-StartDate-when-new-build-is-scheduled.patch
More information about the CDash
mailing list