Bug 200 - MySQL 4.2: fields messed up in /changes route with
Summary: MySQL 4.2: fields messed up in /changes route with
Status: RESOLVED FIXED
Alias: None
Product: Orthanc
Classification: Unclassified
Component: Plugin - Other (show other bugs)
Version: unspecified
Hardware: PC Windows
: --- enhancement
Assignee: Sébastien Jodogne
URL:
Depends on:
Blocks:
 
Reported: 2021-07-22 19:02 CEST by Alain Mazy
Modified: 2021-07-22 19:25 CEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alain Mazy 2021-07-22 19:02:17 CEST
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
      },
Comment 1 Alain Mazy 2021-07-22 19:04:25 CEST
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.
Comment 2 Alain Mazy 2021-07-22 19:12:42 CEST
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
Comment 3 Sébastien Jodogne 2021-07-22 19:17:17 CEST
Added an integration test to check this issue:
https://hg.orthanc-server.com/orthanc-tests/rev/77455e156112
Comment 4 Sébastien Jodogne 2021-07-22 19:25:40 CEST
This is fixed by the following changeset:
https://hg.orthanc-server.com/orthanc-databases/rev/4454545bb265