changeset 236:d1d2edbbe6fb

MySQL: fix backward compatibility with SDK <= 1.9.1
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 08 Apr 2021 12:00:01 +0200
parents f2b32d31fc99
children 35598014f140
files Framework/MySQL/MySQLDatabase.cpp
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Framework/MySQL/MySQLDatabase.cpp	Thu Apr 08 11:42:32 2021 +0200
+++ b/Framework/MySQL/MySQLDatabase.cpp	Thu Apr 08 12:00:01 2021 +0200
@@ -71,7 +71,11 @@
       }
       else if (error == ER_LOCK_DEADLOCK)
       {
+#if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 9, 2)
         throw Orthanc::OrthancException(Orthanc::ErrorCode_DatabaseCannotSerialize);
+#else
+        throw Orthanc::OrthancException(Orthanc::ErrorCode_Database, "Collision between multiple writers");
+#endif
       } 
       else
       {