Bacula(R) - The Network Backup Solution
Copyright (C) 2000-2015 Kern Sibbald
- Copyright (C) 2009-2014 Free Software Foundation Europe e.V.
The original author of Bacula is Kern Sibbald, with contributions
from many others, a complete list can be found in the file AUTHORS.
Bacula(R) - The Network Backup Solution
Copyright (C) 2000-2015 Kern Sibbald
- Copyright (C) 2000-2014 Free Software Foundation Europe e.V.
The original author of Bacula is Kern Sibbald, with contributions
from many others, a complete list can be found in the file AUTHORS.
Bacula(R) - The Network Backup Solution
Copyright (C) 2000-2015 Kern Sibbald
- Copyright (C) 2000-2014 Free Software Foundation Europe e.V.
The original author of Bacula is Kern Sibbald, with contributions
from many others, a complete list can be found in the file AUTHORS.
Bacula(R) - The Network Backup Solution
Copyright (C) 2000-2015 Kern Sibbald
- Copyright (C) 2000-2014 Free Software Foundation Europe e.V.
The original author of Bacula is Kern Sibbald, with contributions
from many others, a complete list can be found in the file AUTHORS.
Bacula(R) - The Network Backup Solution
Copyright (C) 2000-2015 Kern Sibbald
- Copyright (C) 2003-2014 Free Software Foundation Europe e.V.
The original author of Bacula is Kern Sibbald, with contributions
from many others, a complete list can be found in the file AUTHORS.
#include "postgres_ext.h" /* needed for NAMEDATALEN */
#include "pg_config_manual.h" /* get NAMEDATALEN on version 8.3 or later */
#define __BDB_POSTGRESQL_H_ 1
-#include "bdb_postgresql.h"
+#include "bdb_postgresql.h"
#define dbglvl_dbg DT_SQL|100
#define dbglvl_info DT_SQL|50
mdb = New(BDB_POSTGRESQL());
if (!mdb) goto get_out;
- /*
- * Initialize the parent class members.
- */
+ /* Initialize the parent class members. */
mdb->m_db_name = bstrdup(db_name);
mdb->m_db_user = bstrdup(db_user);
if (db_password) {
#endif /* USE_BATCH_FILE_INSERT */
}
mdb->m_allow_transactions = mult_db_connections;
-
+
/* At this time, when mult_db_connections == true, this is for
* specific console command such as bvfs or batch mode, and we don't
* want to share a batch mode or bvfs. In the future, we can change
db_list->remove(mdb);
if (mdb->m_connected && mdb->m_db_handle) {
PQfinish(mdb->m_db_handle);
- }
+ }
if (is_rwl_valid(&mdb->m_lock)) {
rwl_destroy(&mdb->m_lock);
}
ok_out:
return retval;
}
-
+
void BDB_POSTGRESQL::sql_free_result(void)
{
BDB_POSTGRESQL *mdb = this;
Dmsg1(dbglvl_info, "sql_fetch_row finishes returning %p\n", row);
return row;
-}
+}
const char *BDB_POSTGRESQL::sql_strerror(void)
-{
+{
BDB_POSTGRESQL *mdb = this;
return PQerrorMessage(mdb->m_db_handle);
}
Bacula(R) - The Network Backup Solution
Copyright (C) 2000-2015 Kern Sibbald
- Copyright (C) 2000-2014 Free Software Foundation Europe e.V.
The original author of Bacula is Kern Sibbald, with contributions
from many others, a complete list can be found in the file AUTHORS.
Bacula(R) - The Network Backup Solution
Copyright (C) 2000-2015 Kern Sibbald
- Copyright (C) 2000-2014 Free Software Foundation Europe e.V.
The original author of Bacula is Kern Sibbald, with contributions
from many others, a complete list can be found in the file AUTHORS.
Bacula(R) - The Network Backup Solution
Copyright (C) 2000-2015 Kern Sibbald
- Copyright (C) 2000-2014 Free Software Foundation Europe e.V.
The original author of Bacula is Kern Sibbald, with contributions
from many others, a complete list can be found in the file AUTHORS.
{
SQL_ROW row;
int FilenameId = 0;
- int num_rows;
esc_name = check_pool_memory_size(esc_name, 2*fnl+2);
bdb_escape_string(jcr, esc_name, fname, fnl);
Mmsg(cmd, "SELECT FilenameId FROM Filename WHERE Name='%s'", esc_name);
if (QueryDB(jcr, cmd)) {
char ed1[30];
- num_rows = sql_num_rows();
- if (num_rows > 1) {
+ if (sql_num_rows() > 1) {
Mmsg2(errmsg, _("More than one Filename!: %s for file: %s\n"),
- edit_uint64(num_rows, ed1), fname);
+ edit_uint64(sql_num_rows(), ed1), fname);
Jmsg(jcr, M_WARNING, 0, "%s", errmsg);
}
- if (num_rows >= 1) {
+ if (sql_num_rows() >= 1) {
if ((row = sql_fetch_row()) == NULL) {
Mmsg1(errmsg, _("error fetching row: %s\n"), sql_strerror());
} else {
Bacula(R) - The Network Backup Solution
Copyright (C) 2000-2015 Kern Sibbald
- Copyright (C) 2000-2014 Free Software Foundation Europe e.V.
The original author of Bacula is Kern Sibbald, with contributions
from many others, a complete list can be found in the file AUTHORS.
Bacula(R) - The Network Backup Solution
Copyright (C) 2000-2015 Kern Sibbald
- Copyright (C) 2000-2014 Free Software Foundation Europe e.V.
The original author of Bacula is Kern Sibbald, with contributions
from many others, a complete list can be found in the file AUTHORS.
Bacula(R) - The Network Backup Solution
Copyright (C) 2000-2015 Kern Sibbald
- Copyright (C) 2000-2014 Free Software Foundation Europe e.V.
The original author of Bacula is Kern Sibbald, with contributions
from many others, a complete list can be found in the file AUTHORS.