From 63d27c49a98718c39ec6497c9d2d646f86ab2b29 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Fri, 7 Sep 2007 12:55:17 +0000 Subject: [PATCH] kes Apply Martin Simmons patch that should turn off the new API usage when batch insert is turned off allowing building on older PostgreSQLs. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@5489 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/ReleaseNotes | 7 ++++++- bacula/autoconf/configure.in | 2 +- bacula/src/cats/postgresql.c | 4 ++++ bacula/src/dird/ua_tree.c | 2 ++ bacula/src/lib/bsock.h | 4 +++- bacula/src/version.h | 4 ++-- bacula/technotes-2.3 | 5 +++++ 7 files changed, 23 insertions(+), 5 deletions(-) diff --git a/bacula/ReleaseNotes b/bacula/ReleaseNotes index aa4e49f319..f8247782b2 100644 --- a/bacula/ReleaseNotes +++ b/bacula/ReleaseNotes @@ -1,5 +1,5 @@ - Release Notes for Bacula 2.2.1 + Release Notes for Bacula 2.2.2 Bacula code: Total files = 520 Total lines = 195,550 (*.h *.c *.in) 82 new files, 41,221 new lines of code, 208,380 lines of change from 2.0.3 @@ -10,6 +10,11 @@ use some of the new features that affect the FD. In other words, you should not have to upgrade all your File daemons when you upgrade. There is no database upgrade needed from version 2.0.x to 2.2.0. +Version 2.2.2 is a bug fix release to 2.2.1 +- Detect if new PosgreSQL batch insert API is present. +- Correct incorrect mempool call causing Director crash. +- Update spec files for 2.2.1 release + Version 2.2.1 is mainly a minor bug fix release to version 2.2.0, the main changes since 2.2.0 are: - Fixed bugs #921, 930, and 923. diff --git a/bacula/autoconf/configure.in b/bacula/autoconf/configure.in index e5f4363b2a..554e05bd64 100644 --- a/bacula/autoconf/configure.in +++ b/bacula/autoconf/configure.in @@ -291,7 +291,7 @@ if test x$support_bat = xyes; then # if test x$QWT_INC = x; then for root in /usr /usr/local; do - for ver in qwt qwt5; do + for ver in qwt qwt5 qwt-qt4; do if test -f ${root}/include/${ver}/qwt.h; then QWT_INC="${root}/include/${ver}" if test -d ${root}/lib64/; then diff --git a/bacula/src/cats/postgresql.c b/bacula/src/cats/postgresql.c index 45d71b0167..ff73a9f9c5 100644 --- a/bacula/src/cats/postgresql.c +++ b/bacula/src/cats/postgresql.c @@ -596,6 +596,8 @@ bail_out: return id; } +#ifdef HAVE_BATCH_FILE_INSERT + int my_postgresql_batch_start(JCR *jcr, B_DB *mdb) { char *query = "COPY batch FROM STDIN"; @@ -734,6 +736,8 @@ int my_postgresql_batch_insert(JCR *jcr, B_DB *mdb, ATTR_DBR *ar) return mdb->status; } +#endif /* HAVE_BATCH_FILE_INSERT */ + /* * Escape strings so that PostgreSQL is happy on COPY * diff --git a/bacula/src/dird/ua_tree.c b/bacula/src/dird/ua_tree.c index 032c164768..616c052dc7 100644 --- a/bacula/src/dird/ua_tree.c +++ b/bacula/src/dird/ua_tree.c @@ -111,6 +111,7 @@ bool user_select_files_from_tree(TREE_CTX *tree) "remove (unmark) files to be restored. No files are initially added, unless\n" "you used the \"all\" keyword on the command line.\n" "Enter \"done\" to leave this mode.\n\n")); + if (ua->api) user->signal(BNET_START_RTREE); /* * Enter interactive command handler allowing selection * of individual files. @@ -150,6 +151,7 @@ bool user_select_files_from_tree(TREE_CTX *tree) break; } } + if (ua->api) user->signal(BNET_END_RTREE); ua->UA_sock = NULL; /* don't release restore socket */ stat = !ua->quit; ua->quit = false; diff --git a/bacula/src/lib/bsock.h b/bacula/src/lib/bsock.h index 06247da0dc..f4a90085dc 100644 --- a/bacula/src/lib/bsock.h +++ b/bacula/src/lib/bsock.h @@ -167,7 +167,9 @@ enum { BNET_ERROR_MSG = -21, /* Error message -- command failed */ BNET_INFO_MSG = -22, /* Info message -- status line */ BNET_RUN_CMD = -23, /* Run command follows */ - BNET_YESNO = -24 /* Request yes no response */ + BNET_YESNO = -24, /* Request yes no response */ + BNET_START_RTREE = -25, /* Start restore tree mode */ + BNET_END_RTREE = -26 /* End restore tree mode */ }; #define BNET_SETBUF_READ 1 /* Arg for bnet_set_buffer_size */ diff --git a/bacula/src/version.h b/bacula/src/version.h index a5f317487c..7adafd96f2 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -4,8 +4,8 @@ #undef VERSION #define VERSION "2.3.3" -#define BDATE "05 September 2007" -#define LSMDATE "05Sep07" +#define BDATE "06 September 2007" +#define LSMDATE "06Sep07" #define PROG_COPYRIGHT "Copyright (C) %d-2007 Free Software Foundation Europe e.V.\n" #define BYEAR "2007" /* year for copyright messages in progs */ diff --git a/bacula/technotes-2.3 b/bacula/technotes-2.3 index bb08001bd6..e2a6a53db6 100644 --- a/bacula/technotes-2.3 +++ b/bacula/technotes-2.3 @@ -1,6 +1,11 @@ Technical notes on version 2.3 General: +07Sep07 +kes Apply Martin Simmons patch that should turn off the new API usage + when batch insert is turned off allowing building on older + PostgreSQLs. +kes Add ./configure search in qwt-qt4 for qwt package 05Sep07 kes Remove idcache.c kes Add guid_to_name.c/h which replace idcache. -- 2.39.5