Bugzilla – Attachment 148025 Details for
Bug 33183
Error inserting matchpoint_components when creating record matching rules with MariaDB 10.6
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33183: Error inserting matchpoint_components when creating record matching rules with MariaDB 10.6
Bug-33183-Error-inserting-matchpointcomponents-whe.patch (text/plain), 1.75 KB, created by
Katrin Fischer
on 2023-03-09 18:47:12 UTC
(
hide
)
Description:
Bug 33183: Error inserting matchpoint_components when creating record matching rules with MariaDB 10.6
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2023-03-09 18:47:12 UTC
Size:
1.75 KB
patch
obsolete
>From 8f8c62f74c5249dc8742acc9c6598a7901f1ea0b Mon Sep 17 00:00:00 2001 >From: Kyle Hall <kyle@bywatersolutions.com> >Date: Thu, 9 Mar 2023 11:35:42 -0500 >Subject: [PATCH] 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> >--- > C4/Matcher.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/Matcher.pm b/C4/Matcher.pm >index 77716f736c..7322c14417 100644 >--- a/C4/Matcher.pm >+++ b/C4/Matcher.pm >@@ -342,7 +342,7 @@ sub _store_matchpoint { > foreach my $component (@{ $matchpoint->{'components'} }) { > $seqnum++; > $sth = $dbh->prepare_cached("INSERT INTO matchpoint_components >- (matchpoint_id, sequence, tag, subfields, offset, length) >+ (matchpoint_id, sequence, tag, subfields, `offset`, length) > VALUES (?, ?, ?, ?, ?, ?)"); > $sth->bind_param(1, $matchpoint_id); > $sth->bind_param(2, $seqnum); >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33183
:
148017
|
148025
|
148222