Bug 33183: Error inserting matchpoint_components when creating record matching rules...
authorKyle Hall <kyle@bywatersolutions.com>
Thu, 9 Mar 2023 16:35:42 +0000 (11:35 -0500)
committerTomas Cohen Arazi <tomascohen@theke.io>
Thu, 16 Mar 2023 19:23:01 +0000 (16:23 -0300)
commit4628d2e81cf97951e978ae1e18a6939767ad2b09
treee4891d3512ff5ee05b9d0a392c91b0d7f1376144
parent33de3ef9dcc8d2c0b021b2da80a2c6673cd06e82
Bug 33183: Error inserting matchpoint_components when creating record matching rules with MariaDB 10.6

The word "offset" is now a keyword. At the very least we need to escape the fieldname with backticks.
It would be nice to switch to Koha::Objects for this module eventually.

C4::Matcher::_store_matchpoint(): DBI Exception: DBD::mysql::st execute failed: You have an error in
your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax
to use near 'offset, length) VALUES ('27', '1', '999'...' at line 2 at /usr/share/koha/lib/C4/Matcher.pm
line 314

Test Plan:
1) Set up Koha with MariaDB 10.6
2) Attempt to create a matching rule
3) Note the error screen
4) Apply this patch
5) Restart all the things!
6) Attempt to create another matching rule
7) No errors this time

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
C4/Matcher.pm