# HG changeset patch # User Sebastien Jodogne # Date 1725878650 -7200 # Node ID 12f1c52650815f678cc5dbffc8345ad0d8a16353 # Parent a8bf2d6e86efd6377255c0ca7b7a09604b1f19b8# Parent aff02ad9fbbc281769e8c5afb6f6d6acbd013eb7 integration mainline->find-refactoring diff -r a8bf2d6e86ef -r 12f1c5265081 Framework/Plugins/DatabaseBackendAdapterV4.cpp --- a/Framework/Plugins/DatabaseBackendAdapterV4.cpp Mon Sep 09 08:46:34 2024 +0200 +++ b/Framework/Plugins/DatabaseBackendAdapterV4.cpp Mon Sep 09 12:44:10 2024 +0200 @@ -561,8 +561,6 @@ IndexBackend& backend, DatabaseManager& manager) { - Orthanc::DatabaseConstraints lookup; - size_t countValues = 0; for (int i = 0; i < request.lookup().size(); i++) @@ -574,6 +572,8 @@ std::vector values; values.reserve(countValues); + Orthanc::DatabaseConstraints lookup; + for (int i = 0; i < request.lookup().size(); i++) { const Orthanc::DatabasePluginMessages::DatabaseConstraint& constraint = request.lookup(i); diff -r a8bf2d6e86ef -r 12f1c5265081 Framework/Plugins/IDatabaseBackend.h --- a/Framework/Plugins/IDatabaseBackend.h Mon Sep 09 08:46:34 2024 +0200 +++ b/Framework/Plugins/IDatabaseBackend.h Mon Sep 09 12:44:10 2024 +0200 @@ -293,7 +293,7 @@ #if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1 virtual void LookupResources(IDatabaseBackendOutput& output, DatabaseManager& manager, - Orthanc::DatabaseConstraints& lookup, + const Orthanc::DatabaseConstraints& lookup, OrthancPluginResourceType queryLevel, const std::set& labels, // New in Orthanc 1.12.0 Orthanc::LabelsConstraint labelsConstraint, // New in Orthanc 1.12.0 diff -r a8bf2d6e86ef -r 12f1c5265081 Framework/Plugins/IndexBackend.cpp --- a/Framework/Plugins/IndexBackend.cpp Mon Sep 09 08:46:34 2024 +0200 +++ b/Framework/Plugins/IndexBackend.cpp Mon Sep 09 12:44:10 2024 +0200 @@ -2244,7 +2244,7 @@ // New primitive since Orthanc 1.5.2 void IndexBackend::LookupResources(IDatabaseBackendOutput& output, DatabaseManager& manager, - Orthanc::DatabaseConstraints& lookup, + const Orthanc::DatabaseConstraints& lookup, OrthancPluginResourceType queryLevel_, const std::set& labels, Orthanc::LabelsConstraint labelsConstraint, diff -r a8bf2d6e86ef -r 12f1c5265081 Framework/Plugins/IndexBackend.h --- a/Framework/Plugins/IndexBackend.h Mon Sep 09 08:46:34 2024 +0200 +++ b/Framework/Plugins/IndexBackend.h Mon Sep 09 12:44:10 2024 +0200 @@ -312,7 +312,7 @@ // New primitive since Orthanc 1.5.2 virtual void LookupResources(IDatabaseBackendOutput& output, DatabaseManager& manager, - Orthanc::DatabaseConstraints& lookup, + const Orthanc::DatabaseConstraints& lookup, OrthancPluginResourceType queryLevel, const std::set& labels, Orthanc::LabelsConstraint labelsConstraint, diff -r a8bf2d6e86ef -r 12f1c5265081 MySQL/NEWS --- a/MySQL/NEWS Mon Sep 09 08:46:34 2024 +0200 +++ b/MySQL/NEWS Mon Sep 09 12:44:10 2024 +0200 @@ -3,6 +3,7 @@ * Added support for ExtendedChanges: - changes?type=...&to=... +* Fixed a memory leak when executing non cached SQL statements (rarely used) Release 5.2 (2024-06-06) diff -r a8bf2d6e86ef -r 12f1c5265081 Odbc/NEWS --- a/Odbc/NEWS Mon Sep 09 08:46:34 2024 +0200 +++ b/Odbc/NEWS Mon Sep 09 12:44:10 2024 +0200 @@ -11,6 +11,7 @@ - changes?type=...&to=... * Fix bug 224, error when using LIMIT with MSSQLServer https://orthanc.uclouvain.be/bugs/show_bug.cgi?id=224 +* Fixed a memory leak when executing non cached SQL statements (rarely used) Release 1.2 (2024-03-06) diff -r a8bf2d6e86ef -r 12f1c5265081 PostgreSQL/NEWS --- a/PostgreSQL/NEWS Mon Sep 09 08:46:34 2024 +0200 +++ b/PostgreSQL/NEWS Mon Sep 09 12:44:10 2024 +0200 @@ -15,6 +15,7 @@ - merged BEGIN and SET TRANSACTION statements - reduced the number of round-trips between Orthanc and the PostgreSQL server: - e.g: when receiving an instance in an existing series, reduced the number of SQL queries from 13 to 9 +* Fixed a memory leak when executing non cached SQL statements (rarely used) Release 6.2 (2024-03-25) diff -r a8bf2d6e86ef -r 12f1c5265081 Resources/Orthanc/CMake/Compiler.cmake diff -r a8bf2d6e86ef -r 12f1c5265081 Resources/Orthanc/Databases/DatabaseConstraint.cpp diff -r a8bf2d6e86ef -r 12f1c5265081 Resources/Orthanc/Databases/DatabaseConstraint.h diff -r a8bf2d6e86ef -r 12f1c5265081 Resources/Orthanc/Databases/ISqlLookupFormatter.cpp diff -r a8bf2d6e86ef -r 12f1c5265081 Resources/Orthanc/Databases/ISqlLookupFormatter.h diff -r a8bf2d6e86ef -r 12f1c5265081 TODO --- a/TODO Mon Sep 09 08:46:34 2024 +0200 +++ b/TODO Mon Sep 09 12:44:10 2024 +0200 @@ -58,6 +58,7 @@ * MySQL performance => implement GlobalProperty_GetTotalSizeIsFast: https://groups.google.com/d/msg/orthanc-users/kSR4a110zDo/D7e4ITR8BwAJ + https://discourse.orthanc-server.org/t/when-running-housekeeping-mysqld-exe-searching-and-dicom-transfer-is-slow/4921/9 * Add index to speed up wildcard search, as already done in PostgreSQL: