Mercurial > hg > orthanc-databases
changeset 290:2790bafe3b3d
cppcheck
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 30 Jun 2021 08:23:27 +0200 |
parents | 0868500060f3 |
children | 1f5b11661bf5 d5f1c9498a84 |
files | MySQL/Plugins/MySQLIndex.cpp |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/MySQL/Plugins/MySQLIndex.cpp Wed Jun 30 08:19:52 2021 +0200 +++ b/MySQL/Plugins/MySQLIndex.cpp Wed Jun 30 08:23:27 2021 +0200 @@ -138,8 +138,6 @@ * transaction). **/ - int version = 0; - { DatabaseManager::Transaction t(manager, TransactionType_ReadWrite); @@ -156,6 +154,8 @@ ThrowCannotCreateTrigger(); } + int version = 0; + if (!LookupGlobalIntegerProperty(version, manager, MISSING_SERVER_IDENTIFIER, Orthanc::GlobalProperty_DatabaseSchemaVersion)) { SetGlobalIntegerProperty(manager, MISSING_SERVER_IDENTIFIER, Orthanc::GlobalProperty_DatabaseSchemaVersion, expectedVersion);