MySQ Error code: 1787,Statement violates GTID consistency

Hi Everybody,

I deployed orthanc in k8s using helm chart and used mysql as the database,but I got an error when deleting image files,error message from orthanc log:

E0104 09:10:16.033659 PluginsManager.cpp:153] MySQL error (1787,HY000): Statement violates GTID consistency: CREATE TEMPORARY TABLE and DROP TEMPORARY TABLE can only be executed outside transactional context. These statements are also not allowed in a function or trigger because functions and triggers are also considered to be multi-statement transactions.
E0104 09:10:16.034126 PluginsManager.cpp:153] Exception in database back-end: Error with the database engine
E0104 09:10:16.034171 PluginsManager.cpp:153] Exception in database back-end: Bad sequence of calls

  • the doker image version: osimis/orthanc:23.11.1
  • mysql version: 5.7

Hi,

It seems that the latest version of the MySQL plugin is incompatible with MySQL 5.7 probably since we have introduced multiple writers. In our integration tests, we are using MySQL 8.0.

BTW, I can read that MySQL 5.7 has reached end of support in October 2023 so it looks like the right time to switch to a newer version.

Best regards,

Alain.

1 Like

Thank you for response.

Yes,it worked when I used mysql 8.0 .
However, mysql 5.7 still has a very high usage rate, what do I need to do to use mysql 5.7?

The problem appears to be caused by orthanc executing the CREATE TEMPORARY TABLE or DROP TEMPORARY TABLE statements in the transaction, right?

Thanks。

Feel free to modify the plugin code to make it work with MySQL 5.7 or go back to old unmaintained version of the plugin.

OK,Thank you.