From: Mantis B. T. <no...@bu...> - 2010-11-24 15:03:30
|
The following issue has been SUBMITTED. ====================================================================== http://bugs.bacula.org/view.php?id=1668 ====================================================================== Reported By: frimik Assigned To: ====================================================================== Project: bacula Issue ID: 1668 Category: sql Reproducibility: always Severity: major Priority: normal Status: new ====================================================================== Date Submitted: 2010-11-24 15:03 UTC Last Modified: 2010-11-24 15:03 UTC ====================================================================== Summary: restore throws SQL syntax error Description: restore current client=static02-fd restoreclient=infra01-fd select all done yes Using Catalog "MyCatalog" Automatically selected FileSet: Full Set Query failed: ??~: ERR=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '??~' at line 1 Somewhere it sends a garbage SQL Statement to the mysql server. Here's the server's general log, see 3 rows from the last: 463 Query CREATE TEMPORARY TABLE temp (JobId INTEGER UNSIGNED NOT NULL,JobTDate BIGINT UNSIGNED,ClientId INTEGER UNSIGNED,Level CHAR,JobFiles INTEGER UNSIGNED,JobBytes BIGINT UNSIGNED,StartTime TEXT,VolumeName TEXT,StartFile INTEGER UNSIGNED,VolSessionId INTEGER UNSIGNED,VolSessionTime INTEGER UNSIGNED) 463 Query CREATE TEMPORARY TABLE temp1 (JobId INTEGER UNSIGNED NOT NULL,JobTDate BIGINT UNSIGNED) 463 Query SELECT ClientId,Name,Uname,AutoPrune,FileRetention,JobRetention FROM Client WHERE Client.Name='static02-fd' 463 Query SELECT DISTINCT FileSet.FileSet FROM Job,Client,FileSet WHERE Job.FileSetId=FileSet.FileSetId AND Job.ClientId=4 AND Client.ClientId=4 ORDER BY FileSet.FileSet 463 Query SELECT FileSetId,FileSet,MD5,CreateTime FROM FileSet WHERE FileSet='Full Set' ORDER BY CreateTime DESC LIMIT 1 463 Query INSERT INTO temp1 SELECT Job.JobId,JobTdate FROM Client,Job,JobMedia,Media,FileSet WHERE Client.ClientId=4 AND Job.ClientId=4 AND Job.StartTime < '2010-11-24 15:58:00' AND Level='F' AND JobStatus IN ('T','W') AND Type='B' AND JobMedia.JobId=Job.JobId AND Media.Enabled=1 AND JobMedia.MediaId=Media.MediaId AND Job.FileSetId=FileSet.FileSetId AND FileSet.FileSet='Full Set' ORDER BY Job.JobTDate DESC LIMIT 1 463 Query INSERT INTO temp SELECT Job.JobId,Job.JobTDate,Job.ClientId,Job.Level,Job.JobFiles,Job.JobBytes,StartTime,VolumeName,JobMedia.StartFile,VolSessionId,VolSessionTime FROM temp1,Job,JobMedia,Media WHERE temp1.JobId=Job.JobId AND Level='F' AND JobStatus IN ('T','W') AND Type='B' AND Media.Enabled=1 AND JobMedia.JobId=Job.JobId AND JobMedia.MediaId=Media.MediaId 463 Query SELECT * FROM temp1 463 Query INSERT INTO temp SELECT Job.JobId,Job.JobTDate,Job.ClientId,Job.Level,Job.JobFiles,Job.JobBytes,Job.StartTime,Media.VolumeName,JobMedia.StartFile,Job.VolSessionId,Job.VolSessionTime FROM Job,JobMedia,Media,FileSet WHERE Job.JobTDate>1290519867 AND Job.StartTime<'2010-11-24 15:58:00' AND Job.ClientId=4 AND JobMedia.JobId=Job.JobId AND Media.Enabled=1 AND JobMedia.MediaId=Media.MediaId AND Job.Level='D' AND JobStatus IN ('T','W') AND Type='B' AND Job.FileSetId=FileSet.FileSetId AND FileSet.FileSet='Full Set' ORDER BY Job.JobTDate DESC LIMIT 1 463 Query SELECT * FROM temp 463 Query INSERT INTO temp SELECT Job.JobId,Job.JobTDate,Job.ClientId,Job.Level,Job.JobFiles,Job.JobBytes,Job.StartTime,Media.VolumeName,JobMedia.StartFile,Job.VolSessionId,Job.VolSessionTime FROM Job,JobMedia,Media,FileSet WHERE Job.JobTDate>1290519867 AND Job.StartTime<'2010-11-24 15:58:00' AND Job.ClientId=4 AND Media.Enabled=1 AND JobMedia.JobId=Job.JobId AND JobMedia.MediaId=Media.MediaId AND Job.Level='I' AND JobStatus IN ('T','W') AND Type='B' AND Job.FileSetId=FileSet.FileSetId AND FileSet.FileSet='Full Set' 463 Query ??~ 463 Query DROP TABLE temp 463 Query DROP TABLE temp1 ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2010-11-24 15:03 frimik New Issue ====================================================================== |