View Issue Details

IDProjectCategoryView StatusLast Update
0000964bareos-coredirectorpublic2018-06-22 17:18
Reporterfrank Assigned To 
PriorityhighSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version17.2.5 
Fixed in Version17.2.6 
Summary0000964: Query failed: ERROR: column reference "jobbytes" is ambiguous
DescriptionPredefined query (5) in bconsole called via query command fails.

DB-Backend: PostgreSQL

---

Query failed: ERROR: column reference "jobbytes" is ambiguous

LINE 1: ...Set AS FileSet,Level,StartTime, JobFiles,ROUND(JobBytes/1...

                                                             ^



SELECT DISTINCT Job.JobId AS JobId,Client.Name AS Client, FileSet.FileSet AS FileSet,Level,StartTime, JobFiles,ROUND(JobBytes/1024.0/1024.0/1024.0,3) AS GB,Count(VolumeName) AS Volumes FROM Client,Job,JobMedia,Media,FileSet WHERE Client.Name='okmprd1118d' AND Client.ClientId=Job.ClientId AND Job.Type='B' AND Job.JobStatus IN ('T','W') AND Job.FileSetId=FileSet.FileSetId AND JobMedia.JobId=Job.JobId AND JobMedia.MediaId=Media.MediaId GROUP BY Job.JobId,Client.Name,FileSet.FileSet,Level,StartTime,JobFiles,JobBytes ORDER BY Job.StartTime;

---
Steps To ReproduceReproduced on bareos-dir Version: 17.2.5 (14 Feb 2018) x86_64-redhat-linux-gnu redhat CentOS Linux release 7.5.1804 (Core) CentOS_7 x86_64


*query

Available queries:

     1: List up to 20 places where a File is saved regardless of the directory and Client

     2: List where the most recent copies of a file with path of a Client are saved

     3: List last 20 Full Backups for a Client

     4: List all backups for a Client after a specified time

     5: List all backups for a Client and COUNT the Volumes which been used

     6: List Volume Attributes for a selected Volume

     7: List Volumes used by selected JobId

     8: List Volumes to Restore All Files

     9: List Pool Attributes for a selected Pool

    10: List total files/bytes by Job

    11: List total files/bytes by Volume

    12: List Files for a selected JobId

    13: List Jobs stored on a selected MediaId

    14: List Jobs stored for a given Volume name

    15: List Volumes Bareos thinks are in changer

    16: List Volumes likely to need replacement from age or errors

    17: List Volumes Bareos thinks are eligible for the changer

    18: List Volumes by Volume:

    19: List Volumes by Jobs:

    20: List Volumes for a jobname:

Choose a query (1-20): 5

Enter Client Name: okmprd1118d

Query failed: ERROR: column reference "jobbytes" is ambiguous

LINE 1: ...Set AS FileSet,Level,StartTime, JobFiles,ROUND(JobBytes/1...

                                                             ^



SELECT DISTINCT Job.JobId AS JobId,Client.Name AS Client, FileSet.FileSet AS FileSet,Level,StartTime, JobFiles,ROUND(JobBytes/1024.0/1024.0/1024.0,3) AS GB,Count(VolumeName) AS Volumes FROM Client,Job,JobMedia,Media,FileSet WHERE Client.Name='okmprd1118d' AND Client.ClientId=Job.ClientId AND Job.Type='B' AND Job.JobStatus IN ('T','W') AND Job.FileSetId=FileSet.FileSetId AND JobMedia.JobId=Job.JobId AND JobMedia.MediaId=Media.MediaId GROUP BY Job.JobId,Client.Name,FileSet.FileSet,Level,StartTime,JobFiles,JobBytes ORDER BY Job.StartTime;

*
TagsNo tags attached.

Relationships

child of 0000916 closedjoergs Release bareos-17.2.6 

Activities

joergs

joergs

2018-06-19 14:53

developer   ~0003045

Merged https://github.com/bareos/bareos/pull/87 that fixed this issue.

Related Changesets

bareos: master 338a81f8

2018-05-04 23:59

Daniel Néri

Ported: N/A

Details Diff
Fix ambiguous sample queries

When the JobBytes column was added to the JobMedia table (in commit
d31cd38e59f979e256370268d679d6f281ec758c), some sample queries became
ambiguous.
Affected Issues
0000964
mod - core/src/dird/query.sql Diff File

Issue History

Date Modified Username Field Change
2018-06-13 15:39 frank New Issue
2018-06-13 15:55 maik Status new => confirmed
2018-06-19 14:49 joergs Relationship added child of 0000916
2018-06-19 14:51 joergs Changeset attached => bareos master 338a81f8
2018-06-19 14:53 joergs Note Added: 0003045
2018-06-19 14:53 joergs Status confirmed => resolved
2018-06-19 14:53 joergs Resolution open => fixed
2018-06-19 14:53 joergs Assigned To => joergs
2018-06-22 17:18 joergs Assigned To joergs =>
2018-06-22 17:18 joergs Status resolved => closed
2018-06-22 17:18 joergs Fixed in Version => 17.2.6