]> git.sur5r.net Git - bacula/bacula/blob - bacula/patches/2.2.5-nextvol.patch
Add rpm patches for sqlite3 scripts.
[bacula/bacula] / bacula / patches / 2.2.5-nextvol.patch
1
2   This bug fixes the warning message that prints each time an automatic
3   Volume name is created.  This fixes bug #979
4
5   This patch applies to Bacula version 2.2.5 (not to previous versions),
6   and can be applied with the following:
7
8   cd <bacula-source>
9   patch -p0 <2.2.5-newvol.patch
10   ./configure (your options)
11   make
12   ...
13   make install
14
15
16
17 Index: src/dird/newvol.c
18 ===================================================================
19 --- src/dird/newvol.c   (revision 5717)
20 +++ src/dird/newvol.c   (working copy)
21 @@ -124,7 +124,7 @@
22     mr->VolumeName[0] = 0;
23     bstrncpy(name, pr->LabelFormat, sizeof(name));
24     ctx.value = 0;
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));