/* just lock one row corresponding to job in table jobs
- * lock_mode: 0 = in share mode / 1 = for update
+ * lock_mode: 0 = lock in share mode / 1 = for update
*/
int edg_wll_LockJobRow(edg_wll_Context ctx, glite_jobid_const_t job, int lock_mode)
{
if (lock_mode)
trio_asprintf(&stmt, "select count(*) from jobs where jobid='%|Ss' for update", jobid_md5);
else
- trio_asprintf(&stmt, "select count(*) from jobs where jobid='%|Ss' in share mode", jobid_md5);
+ trio_asprintf(&stmt, "select count(*) from jobs where jobid='%|Ss' lock in share mode", jobid_md5);
if ((nr = edg_wll_ExecSQL(ctx,stmt,&sh)) < 0) goto cleanup;
if (nr == 0) {
edg_wll_ResetError(ctx);
- jobstat.pub.owner = NULL;
+ memset(&jobstat, 0, sizeof(jobstat));
string_jobid = edg_wlc_JobIdUnparse(job);
if (string_jobid == NULL || stat == NULL)
return edg_wll_SetError(ctx,EINVAL, NULL);