2 This bug fixes the warning message that prints each time an automatic
3 Volume name is created. This fixes bug #979
5 This patch applies to Bacula version 2.2.5 (not to previous versions),
6 and can be applied with the following:
9 patch -p0 <2.2.5-newvol.patch
10 ./configure (your options)
17 Index: src/dird/newvol.c
18 ===================================================================
19 --- src/dird/newvol.c (revision 5717)
20 +++ src/dird/newvol.c (working copy)
22 mr->VolumeName[0] = 0;
23 bstrncpy(name, pr->LabelFormat, sizeof(name));
25 - Mmsg(query, "SELECT MAX(MediaId) FROM Media,POOL WHERE Pool.PoolId=%s",
26 + Mmsg(query, "SELECT MAX(MediaId) FROM Media,Pool WHERE Pool.PoolId=%s",
27 edit_int64(pr->PoolId, ed1));
28 if (!db_sql_query(jcr->db, query.c_str(), db_int64_handler, (void *)&ctx)) {
29 Jmsg(jcr, M_WARNING, 0, _("SQL failed, but ignored. ERR=%s\n"), db_strerror(jcr->db));