From 71eeb2baae089b5eb57c2d08141388a0e767752e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=B5=A9=E6=96=8C?= Date: Sat, 6 May 2017 21:26:58 +0800 Subject: [PATCH] more --- trunk/core/judged/judged.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/trunk/core/judged/judged.cc b/trunk/core/judged/judged.cc index bf337c5b20b..319edb8b023 100644 --- a/trunk/core/judged/judged.cc +++ b/trunk/core/judged/judged.cc @@ -340,7 +340,7 @@ int _get_jobs_mysql(int * jobs) { jobs[i++] = atoi(row[0]); } - if(res!=NULL){ + if(res!=NULL&&!executesql("commit")){ mysql_free_result(res); // free the memory res=NULL; } @@ -436,8 +436,9 @@ int work() { //sleep_time=sleep_tmp; /* get the database info */ - if (!get_jobs(jobs)) - retcnt = 0; + if (!get_jobs(jobs)){ + return 0; + } /* exec the submit */ for (int j = 0; jobs[j] > 0; j++) { runid = jobs[j];