comparison Framework/MySQL/MySQLDatabase.cpp @ 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 d1b124d116c1
children 35598014f140
comparison
equal deleted inserted replaced
235:f2b32d31fc99 236:d1d2edbbe6fb
69 { 69 {
70 throw Orthanc::OrthancException(Orthanc::ErrorCode_DatabaseUnavailable); 70 throw Orthanc::OrthancException(Orthanc::ErrorCode_DatabaseUnavailable);
71 } 71 }
72 else if (error == ER_LOCK_DEADLOCK) 72 else if (error == ER_LOCK_DEADLOCK)
73 { 73 {
74 #if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 9, 2)
74 throw Orthanc::OrthancException(Orthanc::ErrorCode_DatabaseCannotSerialize); 75 throw Orthanc::OrthancException(Orthanc::ErrorCode_DatabaseCannotSerialize);
76 #else
77 throw Orthanc::OrthancException(Orthanc::ErrorCode_Database, "Collision between multiple writers");
78 #endif
75 } 79 }
76 else 80 else
77 { 81 {
78 throw Orthanc::OrthancException(Orthanc::ErrorCode_Database); 82 throw Orthanc::OrthancException(Orthanc::ErrorCode_Database);
79 } 83 }