From 8eefd4c7f4bd87fe16822ecdc002cfed8ff894c0 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Fri, 13 Feb 2004 07:58:52 +0000 Subject: [PATCH] Add second COALESCE to sql_find -- thanks to JML git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1051 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/cats/sql_find.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bacula/src/cats/sql_find.c b/bacula/src/cats/sql_find.c index 1ff0a98c75..347c2a01bc 100644 --- a/bacula/src/cats/sql_find.c +++ b/bacula/src/cats/sql_find.c @@ -247,7 +247,7 @@ db_find_next_volume(JCR *jcr, B_DB *mdb, int item, bool InChanger, MEDIA_DBR *mr Mmsg(&mdb->cmd, "SELECT MediaId,VolumeName,VolJobs,VolFiles,VolBlocks," "VolBytes,VolMounts,VolErrors,VolWrites,MaxVolBytes,VolCapacityBytes," "VolRetention,VolUseDuration,MaxVolJobs,MaxVolFiles,Recycle,Slot," - "FirstWritten,LastWritten,VolStatus " + "FirstWritten,COALESCE(LastWritten,0),VolStatus " "FROM Media WHERE PoolId=%u AND MediaType='%s' AND VolStatus='%s' " "%s " "%s LIMIT 1", -- 2.39.5