Mercurial > hg > orthanc-databases
diff Framework/MySQL/MySQLStatement.cpp @ 46:6a574d810b98
Compatibility with MySQL 8.0
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 18 Jul 2018 12:27:40 +0200 |
parents | b2ff1cd2907a |
children | 714c5d2bee76 |
line wrap: on
line diff
--- a/Framework/MySQL/MySQLStatement.cpp Tue Jul 17 08:50:53 2018 +0200 +++ b/Framework/MySQL/MySQLStatement.cpp Wed Jul 18 12:27:40 2018 +0200 @@ -151,6 +151,7 @@ case 45: // utf8mb4_general_ci case 46: // utf8mb4_bin case 224: // utf8mb4_unicode_ci => RECOMMENDED collation + case 255: // utf8mb4_0900_ai_ci => necessary for MySQL 8.0 // https://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci orthancType_ = ValueType_Utf8String; break; @@ -395,6 +396,19 @@ } + MySQLStatement::~MySQLStatement() + { + try + { + Close(); + } + catch (Orthanc::OrthancException&) + { + // Ignore possible exceptions due to connection loss + } + } + + MYSQL_STMT* MySQLStatement::GetObject() { if (statement_ == NULL)