changeset 86:d16e94157efe db-changes

integration mainline->db-changes
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 10 Jan 2019 18:04:27 +0100
parents 1012fe77241c (current diff) b96446b8718b (diff)
children 48d445f756db
files
diffstat 4 files changed, 25 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MySQL/NEWS	Thu Jan 10 18:04:12 2019 +0100
+++ b/MySQL/NEWS	Thu Jan 10 18:04:27 2019 +0100
@@ -2,6 +2,7 @@
 ===============================
 
 * Characters "$" and "_" are allowed in MySQL database identifiers
+* Fix serialization of jobs if many of them
 
 
 Release 1.1 (2018-07-18)
--- a/MySQL/Plugins/MySQLIndex.cpp	Thu Jan 10 18:04:12 2019 +0100
+++ b/MySQL/Plugins/MySQLIndex.cpp	Thu Jan 10 18:04:27 2019 +0100
@@ -116,7 +116,19 @@
         SetGlobalIntegerProperty(*db, t, Orthanc::GlobalProperty_DatabasePatchLevel, revision);
       }
 
-      if (revision != 1)
+      if (revision == 1)
+      {
+        // The serialization of jobs as a global property can lead to
+        // very long values => switch to the LONGTEXT type that can
+        // store up to 4GB:
+        // https://stackoverflow.com/a/13932834/881731
+        db->Execute("ALTER TABLE GlobalProperties MODIFY value LONGTEXT", false);
+
+        revision = 2;
+        SetGlobalIntegerProperty(*db, t, Orthanc::GlobalProperty_DatabasePatchLevel, revision);
+      }
+
+      if (revision != 2)
       {
         LOG(ERROR) << "MySQL plugin is incompatible with database schema revision: " << revision;
         throw Orthanc::OrthancException(Orthanc::ErrorCode_Database);        
--- a/Resources/CMake/DatabasesFrameworkConfiguration.cmake	Thu Jan 10 18:04:12 2019 +0100
+++ b/Resources/CMake/DatabasesFrameworkConfiguration.cmake	Thu Jan 10 18:04:27 2019 +0100
@@ -30,6 +30,10 @@
   set(ENABLE_CRYPTO_OPTIONS ON)
   set(ENABLE_SSL ON)
   set(ENABLE_ZLIB ON)
+
+  if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
+    set(ENABLE_OPENSSL_ENGINES ON)
+  endif()
 endif()
 
 if (ENABLE_MYSQL_BACKEND)
--- a/Resources/CMake/PostgreSQLConfiguration.cmake	Thu Jan 10 18:04:12 2019 +0100
+++ b/Resources/CMake/PostgreSQLConfiguration.cmake	Thu Jan 10 18:04:27 2019 +0100
@@ -123,6 +123,13 @@
         )
     endif()
     
+    if (ENABLE_SSL)
+      add_definitions(
+        -DHAVE_LIBSSL=1
+        -DUSE_OPENSSL=1
+        )
+    endif()
+
   elseif(CROSS_COMPILING)
     message(FATAL_ERROR "Cannot auto-generate the configuration file cross-compiling")
     
@@ -229,7 +236,6 @@
       check_include_files("sys/socket.h;netinet/tcp.h" HAVE_NETINET_TCP_H)
     endif()
 
-
     if (ENABLE_SSL)
       set(HAVE_LIBSSL 1)
       set(HAVE_SSL_GET_CURRENT_COMPRESSION 1)