Bug 23997

Summary: sample_z3950_servers.sql is failing on MySQL 8
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Architecture, internals, and plumbingAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: dcook, lucas, martin.renvoize
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28524
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28523
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17515
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
19.11.00
Circulation function:
Bug Depends on:    
Bug Blocks: 23996    
Attachments: Bug 23997: Escape z3950servers.rank as it's a new MySQL 8 kw

Description Jonathan Druart 2019-11-08 10:42:17 UTC
koha_1       | DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'rank, syntax, encoding,recordtype) VALUES
koha_1       | ('lx2.loc.gov',210,'LCDB','','','LIBRA' at line 2 at /usr/share/perl5/DBIx/RunSQL.pm line 273.


https://dev.mysql.com/doc/refman/8.0/en/keywords.html
=> RANK (R); added in 8.0.2 (reserved)
Comment 1 Jonathan Druart 2019-11-08 10:51:00 UTC
Created attachment 95193 [details] [review]
Bug 23997: Escape z3950servers.rank as it's a new MySQL 8 kw

This patch will fix installation of Koha on MySQL 8
DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'rank, syntax, encoding,recordtype) VALUES
('lx2.loc.gov',210,'LCDB','','','LIBRA' at line 2 at /usr/share/perl5/DBIx/RunSQL.pm line 273.

https://dev.mysql.com/doc/refman/8.0/en/keywords.html
=> RANK (R); added in 8.0.2 (reserved)
Comment 2 Martin Renvoize (ashimema) 2019-11-08 11:23:06 UTC
Another good catch with a trivial fix.. Passing QA
Comment 3 Martin Renvoize (ashimema) 2019-11-08 11:23:51 UTC
Nice work!

Pushed to master for 19.11.00
Comment 4 Lucas Gass (lukeg) 2020-01-09 22:43:33 UTC
backported to 19.05.x for 19.05.07
Comment 5 David Cook 2023-03-31 00:50:10 UTC
Looks like Nick introduced a regression for this on bug 17515