Skip to content
Commits on Source (4)
repo: 7cea966b682978aa285eb9b3a7a9cff81df464b3
node: 3424a54ca2ee52448369fd249af954d225164e62
branch: OrthancPostgreSQL-3.1
node: 5c69c2a14c9703680df34ced9f6cb1a4c1e72dad
branch: OrthancPostgreSQL-3.2
latesttag: null
latesttagdistance: 112
changessincelatesttag: 124
latesttagdistance: 117
changessincelatesttag: 130
......@@ -115,6 +115,12 @@ namespace OrthancDatabases
Orthanc::GlobalProperty property,
const std::string& utf8)
{
// This version of "SetGlobalProperty()" (with an explicit
// transaction) is called internally by the plugin to set a global
// property during the initialization of the database. (TODO:
// Could be replaced by the version with an implicit transaction
// to avoid code redundancy).
if (db.GetDialect() == Dialect_SQLite)
{
Query query("INSERT OR REPLACE INTO GlobalProperties VALUES (${property}, ${value})", false);
......@@ -164,6 +170,11 @@ namespace OrthancDatabases
Orthanc::GlobalProperty property,
const std::string& utf8)
{
// This version of "SetGlobalProperty()" (without an explicit
// transaction) is called by Orthanc during its execution. Orthanc
// manages the transaction at a higher level, but this transaction
// is always present.
if (manager.GetDialect() == Dialect_SQLite)
{
DatabaseManager::CachedStatement statement(
......
......@@ -1847,10 +1847,13 @@ namespace OrthancPlugins
sprintf(info,
"Performance warning: The database index plugin was compiled "
"against an old version of the Orthanc SDK (%d.%d.%d): "
"Consider upgrading to version 1.5.4 of the Orthanc SDK",
"Consider upgrading to version %d.%d.%d of the Orthanc SDK",
ORTHANC_PLUGINS_MINIMAL_MAJOR_NUMBER,
ORTHANC_PLUGINS_MINIMAL_MINOR_NUMBER,
ORTHANC_PLUGINS_MINIMAL_REVISION_NUMBER);
ORTHANC_PLUGINS_MINIMAL_REVISION_NUMBER,
ORTHANC_OPTIMAL_VERSION_MAJOR,
ORTHANC_OPTIMAL_VERSION_MINOR,
ORTHANC_OPTIMAL_VERSION_REVISION);
OrthancPluginLogWarning(context, info);
}
......
......@@ -65,9 +65,16 @@ namespace OrthancDatabases
return false;
}
if (OrthancPluginCheckVersionAdvanced(context, 1, 5, 4) == 1)
if (OrthancPluginCheckVersionAdvanced(context, 1, 4, 0) == 1)
{
ImplicitTransaction::SetErrorOnDoubleExecution(true);
}
if (OrthancPluginCheckVersionAdvanced(context,
ORTHANC_OPTIMAL_VERSION_MAJOR,
ORTHANC_OPTIMAL_VERSION_MINOR,
ORTHANC_OPTIMAL_VERSION_REVISION) == 1)
{
isOptimal = true;
}
......@@ -110,9 +117,12 @@ namespace OrthancDatabases
int minor = boost::lexical_cast<int>(tokens[1]);
int revision = boost::lexical_cast<int>(tokens[2]);
isOptimal = (major > 1 ||
(major == 1 && minor > 5) ||
(major == 1 && minor == 5 && revision >= 4));
isOptimal = (major > ORTHANC_OPTIMAL_VERSION_MAJOR ||
(major == ORTHANC_OPTIMAL_VERSION_MAJOR &&
minor > ORTHANC_OPTIMAL_VERSION_MINOR) ||
(major == ORTHANC_OPTIMAL_VERSION_MAJOR &&
minor == ORTHANC_OPTIMAL_VERSION_MINOR &&
revision >= ORTHANC_OPTIMAL_VERSION_REVISION));
}
}
......@@ -121,7 +131,10 @@ namespace OrthancDatabases
{
LOG(WARNING) << "Performance warning in " << dbms
<< " index: Your version of Orthanc ("
<< context->orthancVersion << ") should be upgraded to 1.5.4 "
<< context->orthancVersion << ") should be upgraded to "
<< ORTHANC_OPTIMAL_VERSION_MAJOR << "."
<< ORTHANC_OPTIMAL_VERSION_MINOR << "."
<< ORTHANC_OPTIMAL_VERSION_REVISION
<< " to benefit from best performance";
}
......
......@@ -200,7 +200,7 @@ namespace OrthancDatabases
// "Although there is no libpq function for deleting a
// prepared statement, the SQL DEALLOCATE statement can be
// used for that purpose."
//database_.Execute("DEALLOCATE " + id_);
database_.Execute("DEALLOCATE \"" + id_ + "\"");
}
id_.clear();
......
cmake_minimum_required(VERSION 2.8)
project(OrthancPostgreSQL)
set(ORTHANC_PLUGIN_VERSION "3.1")
set(ORTHANC_PLUGIN_VERSION "3.2")
set(ORTHANC_OPTIMAL_VERSION_MAJOR 1)
set(ORTHANC_OPTIMAL_VERSION_MINOR 5)
set(ORTHANC_OPTIMAL_VERSION_REVISION 4)
if (ORTHANC_PLUGIN_VERSION STREQUAL "mainline")
set(ORTHANC_FRAMEWORK_VERSION "mainline")
set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "hg")
else()
set(ORTHANC_FRAMEWORK_VERSION "1.5.4")
set(ORTHANC_FRAMEWORK_VERSION "${ORTHANC_OPTIMAL_VERSION_MAJOR}.${ORTHANC_OPTIMAL_VERSION_MINOR}.${ORTHANC_OPTIMAL_VERSION_REVISION}")
set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "web")
endif()
......
......@@ -2,6 +2,12 @@ Pending changes in the mainline
===============================
Release 3.2 (2019-03-01)
========================
* Explicit deallocation of prepared statements
Release 3.1 (2019-02-08)
========================
......
......@@ -44,9 +44,25 @@ else ()
endif()
if (NOT DEFINED ORTHANC_OPTIMAL_VERSION_MAJOR)
message(FATAL_ERROR "ORTHANC_OPTIMAL_VERSION_MAJOR is not defined")
endif()
if (NOT DEFINED ORTHANC_OPTIMAL_VERSION_MINOR)
message(FATAL_ERROR "ORTHANC_OPTIMAL_VERSION_MINOR is not defined")
endif()
if (NOT DEFINED ORTHANC_OPTIMAL_VERSION_REVISION)
message(FATAL_ERROR "ORTHANC_OPTIMAL_VERSION_REVISION is not defined")
endif()
add_definitions(
-DHAS_ORTHANC_EXCEPTION=1
-DORTHANC_ENABLE_PLUGINS=1
-DORTHANC_OPTIMAL_VERSION_MAJOR=${ORTHANC_OPTIMAL_VERSION_MAJOR}
-DORTHANC_OPTIMAL_VERSION_MINOR=${ORTHANC_OPTIMAL_VERSION_MINOR}
-DORTHANC_OPTIMAL_VERSION_REVISION=${ORTHANC_OPTIMAL_VERSION_REVISION}
)
......
......@@ -101,6 +101,8 @@ if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "hg" OR
set(ORTHANC_FRAMEWORK_MD5 "bf2f5ed1adb8b0fc5f10d278e68e1dfe")
elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.5.4")
set(ORTHANC_FRAMEWORK_MD5 "404baef5d4c43e7c5d9410edda8ef5a5")
elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.5.5")
set(ORTHANC_FRAMEWORK_MD5 "cfc437e0687ae4bd725fd93dc1f08bc4")
endif()
endif()
endif()
......
# LSB_CC=gcc-4.8 LSB_CXX=g++-4.8 cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=../Resources/LinuxStandardBaseToolchain.cmake -DUSE_LEGACY_JSONCPP=ON
# LSB_CC=gcc-4.8 LSB_CXX=g++-4.8 cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=../Resources/LinuxStandardBaseToolchain.cmake -DUSE_LEGACY_JSONCPP=ON -DUSE_LEGACY_LIBICU=ON -DBOOST_LOCALE_BACKEND=icu
INCLUDE(CMakeForceCompiler)
......
orthanc-postgresql (3.2-1) unstable; urgency=medium
* New upstream version
-- Sebastien Jodogne <s.jodogne@gmail.com> Fri, 01 Mar 2019 17:23:17 +0100
orthanc-postgresql (3.1-1) unstable; urgency=medium
* New upstream version
......
......@@ -15,7 +15,7 @@ Build-Depends: cmake,
unzip,
uuid-dev,
zlib1g-dev
Standards-Version: 4.3.0
Standards-Version: 4.3.0.3
Vcs-Browser: https://salsa.debian.org/med-team/orthanc-postgresql
Vcs-Git: https://salsa.debian.org/med-team/orthanc-postgresql.git
Homepage: https://www.orthanc-server.com/static.php?page=postgresql
......