changeset 309:d192bfd0e752

tagging globalParameters_ as static in MySQL
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 12 Jul 2021 18:45:09 +0200
parents 6a668f5d1069
children f3eac614b32e
files Framework/Plugins/IndexUnitTests.h MySQL/UnitTests/UnitTestsMain.cpp
diffstat 2 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Framework/Plugins/IndexUnitTests.h	Mon Jul 12 17:22:53 2021 +0200
+++ b/Framework/Plugins/IndexUnitTests.h	Mon Jul 12 18:45:09 2021 +0200
@@ -44,6 +44,8 @@
 #  define HAS_REVISIONS 0
 #elif ORTHANC_ENABLE_SQLITE == 1
 #  define HAS_REVISIONS 1
+#elif ORTHANC_ENABLE_ODBC == 1
+#  define HAS_REVISIONS 1
 #else
 #  error Unknown database backend
 #endif
@@ -210,6 +212,8 @@
   db.SetClearAll(true);
 #elif ORTHANC_ENABLE_SQLITE == 1
   SQLiteIndex db(&context);  // Open in memory
+#elif ORTHANC_ENABLE_ODBC == 1
+  OdbcIndex db(&context, connectionString_);
 #else
 #  error Unsupported database backend
 #endif
--- a/MySQL/UnitTests/UnitTestsMain.cpp	Mon Jul 12 17:22:53 2021 +0200
+++ b/MySQL/UnitTests/UnitTestsMain.cpp	Mon Jul 12 18:45:09 2021 +0200
@@ -22,7 +22,7 @@
 #include "../Plugins/MySQLIndex.h"
 #include "../Plugins/MySQLStorageArea.h"
 
-OrthancDatabases::MySQLParameters globalParameters_;
+static OrthancDatabases::MySQLParameters globalParameters_;
 
 #include "../../Framework/Common/Integer64Value.h"
 #include "../../Framework/MySQL/MySQLDatabase.h"