Skip to content

Commit

Permalink
DBI: cats: remove remaining references to DBI database
Browse files Browse the repository at this point in the history
  • Loading branch information
alaaeddineelamri committed Feb 27, 2023
1 parent 8d7fffb commit 66a4296
Show file tree
Hide file tree
Showing 14 changed files with 24 additions and 135 deletions.
100 changes: 0 additions & 100 deletions core/src/cats/bdb_dbi.h

This file was deleted.

4 changes: 2 additions & 2 deletions core/src/cats/bvfs.cc
Expand Up @@ -26,7 +26,7 @@
*/
#include "include/bareos.h"

#if HAVE_MYSQL || HAVE_POSTGRESQL || HAVE_DBI
#if HAVE_MYSQL || HAVE_POSTGRESQL

# include "cats/cats.h"
# include "cats/sql.h"
Expand Down Expand Up @@ -878,4 +878,4 @@ bool Bvfs::compute_restore_list(char* fileid,
return retval;
}

#endif /* HAVE_MYSQL || HAVE_POSTGRESQL || HAVE_DBI */
#endif /* HAVE_MYSQL || HAVE_POSTGRESQL */
13 changes: 2 additions & 11 deletions core/src/cats/cats.cc
Expand Up @@ -28,7 +28,7 @@

#include "include/bareos.h"

#if HAVE_MYSQL || HAVE_POSTGRESQL || HAVE_DBI
#if HAVE_MYSQL || HAVE_POSTGRESQL

# include "cats.h"
# include "sql_pooling.h"
Expand Down Expand Up @@ -97,15 +97,6 @@ const char* BareosDb::GetType(void)
return "MySQL";
case SQL_INTERFACE_TYPE_POSTGRESQL:
return "PostgreSQL";
case SQL_INTERFACE_TYPE_DBI:
switch (db_type_) {
case SQL_TYPE_MYSQL:
return "DBI:MySQL";
case SQL_TYPE_POSTGRESQL:
return "DBI:PostgreSQL";
default:
return "DBI:Unknown";
}
default:
return "Unknown";
}
Expand Down Expand Up @@ -229,4 +220,4 @@ void BareosDb::UnescapeObject(JobControlRecord*,
dest[expected_len] = '\0';
}

#endif /* HAVE_MYSQL || HAVE_POSTGRESQL || HAVE_DBI */
#endif /* HAVE_MYSQL || HAVE_POSTGRESQL */
1 change: 0 additions & 1 deletion core/src/cats/cats.h
Expand Up @@ -447,7 +447,6 @@ typedef enum
{
SQL_INTERFACE_TYPE_MYSQL = 0,
SQL_INTERFACE_TYPE_POSTGRESQL = 1,
SQL_INTERFACE_TYPE_DBI = 4,
SQL_INTERFACE_TYPE_UNKNOWN = 99
} SQL_INTERFACETYPE;

Expand Down
7 changes: 3 additions & 4 deletions core/src/cats/cats_backends.cc
Expand Up @@ -28,7 +28,7 @@
#include "include/bareos.h"
#include "lib/edit.h"

#if HAVE_MYSQL || HAVE_POSTGRESQL || HAVE_DBI
#if HAVE_MYSQL || HAVE_POSTGRESQL

# include "cats.h"

Expand All @@ -39,8 +39,7 @@ static struct backend_interface_mapping_t {
bool partly_compare;
int interface_type_id;
} backend_interface_mappings[]
= {{"dbi", TRUE, SQL_INTERFACE_TYPE_DBI},
{"mysql", FALSE, SQL_INTERFACE_TYPE_MYSQL},
= {{"mysql", FALSE, SQL_INTERFACE_TYPE_MYSQL},
{"postgresql", FALSE, SQL_INTERFACE_TYPE_POSTGRESQL},
{NULL, FALSE, 0}};

Expand Down Expand Up @@ -298,4 +297,4 @@ BareosDb* db_init_database(JobControlRecord* jcr,

void DbFlushBackends(void) {}
# endif /* HAVE_DYNAMIC_CATS_BACKENDS */
#endif /* HAVE_MYSQL || HAVE_POSTGRESQL || HAVE_DBI */
#endif /* HAVE_MYSQL || HAVE_POSTGRESQL */
4 changes: 2 additions & 2 deletions core/src/cats/sql.cc
Expand Up @@ -32,7 +32,7 @@

#include "include/bareos.h"

#if HAVE_MYSQL || HAVE_POSTGRESQL || HAVE_DBI
#if HAVE_MYSQL || HAVE_POSTGRESQL

# include "cats.h"
# include "lib/edit.h"
Expand Down Expand Up @@ -909,4 +909,4 @@ void DbDebugPrint(JobControlRecord* jcr, FILE* fp)

mdb->DbDebugPrint(fp);
}
#endif /* HAVE_MYSQL || HAVE_POSTGRESQL || HAVE_DBI */
#endif /* HAVE_MYSQL || HAVE_POSTGRESQL */
4 changes: 2 additions & 2 deletions core/src/cats/sql_create.cc
Expand Up @@ -30,7 +30,7 @@

static const int dbglevel = 100;

#if HAVE_MYSQL || HAVE_POSTGRESQL || HAVE_DBI
#if HAVE_MYSQL || HAVE_POSTGRESQL

# include "cats.h"
# include "lib/edit.h"
Expand Down Expand Up @@ -1392,4 +1392,4 @@ bool BareosDb::CreateTapealertStatistics(JobControlRecord* jcr,
return true;
}
}
#endif /* HAVE_MYSQL || HAVE_POSTGRESQL || HAVE_DBI */
#endif /* HAVE_MYSQL || HAVE_POSTGRESQL */
2 changes: 1 addition & 1 deletion core/src/cats/sql_delete.cc
Expand Up @@ -28,7 +28,7 @@

#include "include/bareos.h"

#if HAVE_MYSQL || HAVE_POSTGRESQL || HAVE_DBI
#if HAVE_MYSQL || HAVE_POSTGRESQL

# include "cats.h"
# include "lib/edit.h"
Expand Down
4 changes: 2 additions & 2 deletions core/src/cats/sql_find.cc
Expand Up @@ -32,7 +32,7 @@

#include "include/bareos.h"

#if HAVE_MYSQL || HAVE_POSTGRESQL || HAVE_DBI
#if HAVE_MYSQL || HAVE_POSTGRESQL

# include "cats.h"
# include "lib/edit.h"
Expand Down Expand Up @@ -621,4 +621,4 @@ int BareosDb::FindNextVolume(JobControlRecord* jcr,
Dmsg1(050, "Rtn numrows=%d\n", num_rows);
return num_rows;
}
#endif /* HAVE_MYSQL || HAVE_POSTGRESQL || HAVE_DBI */
#endif /* HAVE_MYSQL || HAVE_POSTGRESQL */
4 changes: 2 additions & 2 deletions core/src/cats/sql_get.cc
Expand Up @@ -32,7 +32,7 @@

#include "include/bareos.h"

#if HAVE_MYSQL || HAVE_POSTGRESQL || HAVE_DBI
#if HAVE_MYSQL || HAVE_POSTGRESQL

# include "cats.h"
# include "sql.h"
Expand Down Expand Up @@ -1910,4 +1910,4 @@ bool BareosDb::VerifyMediaIdsFromSingleStorage(JobControlRecord* jcr,
}


#endif /* HAVE_MYSQL || HAVE_POSTGRESQL || HAVE_DBI */
#endif /* HAVE_MYSQL || HAVE_POSTGRESQL */
4 changes: 2 additions & 2 deletions core/src/cats/sql_list.cc
Expand Up @@ -28,7 +28,7 @@

#include "include/bareos.h"

#if HAVE_MYSQL || HAVE_POSTGRESQL || HAVE_DBI
#if HAVE_MYSQL || HAVE_POSTGRESQL

# include "cats.h"
# include "lib/edit.h"
Expand Down Expand Up @@ -788,4 +788,4 @@ void BareosDb::ListFilesets(JobControlRecord* jcr,

SqlFreeResult();
}
#endif /* HAVE_MYSQL || HAVE_POSTGRESQL || HAVE_DBI */
#endif /* HAVE_MYSQL || HAVE_POSTGRESQL */
4 changes: 2 additions & 2 deletions core/src/cats/sql_pooling.cc
Expand Up @@ -28,7 +28,7 @@

#include "include/bareos.h"

#if HAVE_MYSQL || HAVE_POSTGRESQL || HAVE_DBI
#if HAVE_MYSQL || HAVE_POSTGRESQL

# include "cats.h"
# include "cats_backends.h"
Expand Down Expand Up @@ -148,4 +148,4 @@ void DbSqlClosePooledConnection(JobControlRecord* jcr, BareosDb* mdb, bool)
mdb->CloseDatabase(jcr);
}

#endif /* HAVE_MYSQL || HAVE_POSTGRESQL || HAVE_DBI */
#endif /* HAVE_MYSQL || HAVE_POSTGRESQL */
4 changes: 2 additions & 2 deletions core/src/cats/sql_query.cc
Expand Up @@ -27,7 +27,7 @@

#include "include/bareos.h"

#if HAVE_MYSQL || HAVE_POSTGRESQL || HAVE_DBI
#if HAVE_MYSQL || HAVE_POSTGRESQL

# include "cats.h"

Expand Down Expand Up @@ -155,4 +155,4 @@ bool BareosDb::SqlQuery(const char* query,

return retval;
}
#endif /* HAVE_MYSQL || HAVE_POSTGRESQL || HAVE_DBI */
#endif /* HAVE_MYSQL || HAVE_POSTGRESQL */
4 changes: 2 additions & 2 deletions core/src/cats/sql_update.cc
Expand Up @@ -28,7 +28,7 @@

#include "include/bareos.h"

#if HAVE_MYSQL || HAVE_POSTGRESQL || HAVE_DBI
#if HAVE_MYSQL || HAVE_POSTGRESQL

# include "cats.h"
# include "lib/edit.h"
Expand Down Expand Up @@ -573,4 +573,4 @@ void BareosDb::UpgradeCopies(const char* jobids)

SqlQuery("DROP TABLE cpy_tmp");
}
#endif /* HAVE_MYSQL || HAVE_POSTGRESQL || HAVE_DBI */
#endif /* HAVE_MYSQL || HAVE_POSTGRESQL */

0 comments on commit 66a4296

Please sign in to comment.