Bug 26042 - Koha/ItemTypes.t and Koha/Patrons.t are failing with latest MariaDB
Summary: Koha/ItemTypes.t and Koha/Patrons.t are failing with latest MariaDB
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal
Assignee: Chris Cormack
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 25551
  Show dependency treegraph
 
Reported: 2020-07-22 10:41 UTC by Jonathan Druart
Modified: 2021-06-14 21:29 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2020-07-22 10:41:36 UTC
Failing on Master_D9_MDB_Latest
https://jenkins.koha-community.org/job/Koha_Master_D9_MDB_Latest/346/consoleFull

But I recreate on D10 locally.

The test is failing with:
#   Failed test 'item types should be sorted by translated description'
#   at t/db_dependent/Koha/ItemTypes.t line 137.
#          got: 'b translated itemtype desc'
#     expected: 'a translated itemtype desc'
# Looks like you failed 1 test of 24.

The generated query is (without the full field list):
SELECT `me`.`itemtype`, COALESCE( `localization`.`translation`, `me`.`description` ) AS `translated_description` FROM `itemtypes` `me` LEFT JOIN (SELECT localization_id, code, lang, translation FROM localization WHERE entity='itemtypes') `localization` ON ( `localization`.`lang` = 'en' AND `me`.`itemtype` = `localization`.`code` ) ORDER BY `translated_description`;

I have removed the transaction and run the query in the MariaDB CLI:
*************************** 1. row ***************************
              itemtype: type1
translated_description: b translated itemtype desc
*************************** 2. row ***************************
              itemtype: type2
translated_description: a translated itemtype desc
*************************** 3. row ***************************
              itemtype: type3
translated_description: description
*************************** 4. row ***************************
              itemtype: woR9bd5
translated_description: nlHDyp


MariaDB version is: 10.5.4-MariaDB-1:10.5.4+maria~focal
Comment 1 Jonathan Druart 2020-07-24 10:08:10 UTC
Note that Patrons.t is also failing

#   Failed test 'Return first guarantor alphabetically'
#   at t/db_dependent/Koha/Patrons.t line 233.
#          got: '2000000361'
#     expected: '2000000365'

#   Failed test 'Return second guarantor alphabetically'
#   at t/db_dependent/Koha/Patrons.t line 234.
#          got: '2000000362'
#     expected: '2000000364'

#   Failed test 'Return third guarantor alphabetically'
#   at t/db_dependent/Koha/Patrons.t line 235.
#          got: '2000000365'
#     expected: '2000000363'

#   Failed test 'Return fourth guarantor alphabetically'
#   at t/db_dependent/Koha/Patrons.t line 236.
#          got: '2000000364'
#     expected: '2000000362'

#   Failed test 'Return fifth guarantor alphabetically'
#   at t/db_dependent/Koha/Patrons.t line 237.
#          got: '2000000363'
#     expected: '2000000361'
# Looks like you failed 5 tests of 13.
Comment 2 Victor Grousset/tuxayo 2020-07-27 18:47:09 UTC
It doesn't look random since all builds of Koha_Master_D9_MDB_Latest failed since the upgrade 10.4=>10.5.
Should it be linked to an omnibus for MariaDB 10.5 support? (I can do it)

If I'm not mistaken there is at least one other MariaDB 10.5 known bug.
Comment 3 Jonathan Druart 2020-08-13 07:02:31 UTC
("Auto")Fixed since today, version is now 10.5.5-MariaDB-1:10.5.5+maria~focal