Issue200

Title MySQL 4.2: fields messed up in /changes route with
Priority wish Status resolved
Superseder Nosy List admin
Assigned To
Keywords Plugin - Other

Created on 2021-07-22.19:02:17 by admin, last changed by admin.

Messages
msg942 (view) Author: admin Date: 2021-07-22.19:02:17
[Bugzilla user: am@orthanc.team]
[Bugzilla date: 2021-07-22T17:02:17+00:00]

Based on this discussion: https://groups.google.com/d/msgid/orthanc-users/62cc2944-01f4-45f9-b4f3-e975b4838cban%40googlegroups.com?utm_medium=email&utm_source=footer

Reproduced by uploading a single file in Orthanc with this setup: https://bitbucket.org/osimis/orthanc-setup-samples/src/master/docker/mysql/ whith osimis/orthanc:20.7.3 (Orthanc 1.9.6 + MySQL 4.2)

Date and Id fields are messed up:

   "Changes" : [
      {
         "ChangeType" : "NewInstance",
         "Date" : "d25a2988-18ed3bb0-91145bbc-d206c9ed-2df92569",
         "ID" : "20210717T215245",
         "Path" : "/instances/20210717T215245",
         "ResourceType" : "Instance",
         "Seq" : 1
      },
msg943 (view) Author: admin Date: 2021-07-22.19:04:25
[Bugzilla user: am@orthanc.team]
[Bugzilla date: 2021-07-22T17:04:25+00:00]

Note: the issue does not happen with MySQL 4.1.  The issue does not happen with Orthanc 1.9.6 and latest PGSQL plugin -> it seems to be due to v4.2 of MySQL.
msg944 (view) Author: admin Date: 2021-07-22.19:12:42
[Bugzilla user: am@orthanc.team]
[Bugzilla date: 2021-07-22T17:12:42+00:00]

PGSL is still at version 4.0 so it might not be affected by Database plugin framework in general.

I guess this commit looks like a good candidate for being the culprit:
https://hg.orthanc-server.com/orthanc-databases/rev/f3eac614b32e
msg945 (view) Author: admin Date: 2021-07-22.19:17:17
[Bugzilla user: s.jodogne@gmail.com]
[Bugzilla date: 2021-07-22T17:17:17+00:00]

Added an integration test to check this issue:
https://hg.orthanc-server.com/orthanc-tests/rev/77455e156112
msg946 (view) Author: admin Date: 2021-07-22.19:25:40
[Bugzilla user: s.jodogne@gmail.com]
[Bugzilla date: 2021-07-22T17:25:40+00:00]

This is fixed by the following changeset:
https://hg.orthanc-server.com/orthanc-databases/rev/4454545bb265
History
Date User Action Args
2026-07-29 15:51:28admincreate