Bugzilla – Attachment 100369 Details for
Bug 24593
Rewrite MARC21 optional data to YAML
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24593: (followup) fix sql statements
Bug-24593-followup-fix-sql-statements.patch (text/plain), 4.04 KB, created by
Jonathan Druart
on 2020-03-09 12:22:25 UTC
(
hide
)
Description:
Bug 24593: (followup) fix sql statements
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-03-09 12:22:25 UTC
Size:
4.04 KB
patch
obsolete
>From 3faa7e1103d76c17682850f059e6894e9702c0a5 Mon Sep 17 00:00:00 2001 >From: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >Date: Wed, 4 Mar 2020 11:31:29 -0300 >Subject: [PATCH] Bug 24593: (followup) fix sql statements > >Original inserted values depends on the order of insertion. >This patch rewrites the sql statements to make them order >independent > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > .../marc21_default_matching_rules.yml | 25 ++++++++++--------- > 1 file changed, 13 insertions(+), 12 deletions(-) > >diff --git a/installer/data/mysql/en/marcflavour/marc21/optional/marc21_default_matching_rules.yml b/installer/data/mysql/en/marcflavour/marc21/optional/marc21_default_matching_rules.yml >index 7dd48f20a6..838360e601 100644 >--- a/installer/data/mysql/en/marcflavour/marc21/optional/marc21_default_matching_rules.yml >+++ b/installer/data/mysql/en/marcflavour/marc21/optional/marc21_default_matching_rules.yml >@@ -48,22 +48,23 @@ tables: > threshold: 1000 > > sql_statements: >- - "INSERT INTO matchpoints (matcher_id, search_index, score) SELECT MAX(matcher_id), 'isbn', 1000 FROM marc_matchers;" >- - "INSERT INTO matcher_matchpoints SELECT MAX(matcher_id), MAX(matchpoint_id) FROM matchpoints;" >- - "INSERT INTO matchpoint_components (matchpoint_id, sequence, tag, subfields) SELECT MAX(matchpoint_id), 1, '020', 'a' FROM matchpoints;" >+ - "INSERT INTO matchpoints (matcher_id, search_index, score) SELECT matcher_id, 'isbn', 1000 FROM marc_matchers WHERE code = 'ISBN';" >+ - "INSERT INTO matcher_matchpoints SELECT matcher_id, matchpoint_id FROM matchpoints WHERE search_index = 'isbn';" >+ - "INSERT INTO matchpoint_components (matchpoint_id, sequence, tag, subfields) >+ SELECT matchpoint_id, 1, '020', 'a' FROM matchpoints WHERE search_index = 'isbn';" > - "INSERT INTO matchpoint_component_norms (matchpoint_component_id, sequence, norm_routine) >- SELECT MAX(matchpoint_component_id), 1, 'ISBN' FROM matchpoint_components;" >+ SELECT matchpoint_component_id, 1, 'ISBN' FROM matchpoint_components WHERE tag = '020';" > >- - "INSERT INTO matchpoints (matcher_id, search_index, score) SELECT MAX(matcher_id), 'issn', 1000 FROM marc_matchers;" >- - "INSERT INTO matcher_matchpoints SELECT MAX(matcher_id), MAX(matchpoint_id) FROM matchpoints;" >+ - "INSERT INTO matchpoints (matcher_id, search_index, score) SELECT matcher_id, 'issn', 1000 FROM marc_matchers WHERE code = 'ISSN';" >+ - "INSERT INTO matcher_matchpoints SELECT matcher_id, matchpoint_id FROM matchpoints WHERE search_index = 'issn';" > - "INSERT INTO matchpoint_components (matchpoint_id, sequence, tag, subfields) >- SELECT MAX(matchpoint_id), 1, '022', 'a' FROM matchpoints;" >+ SELECT matchpoint_id, 1, '022', 'a' FROM matchpoints WHERE search_index = 'issn';" > - "INSERT INTO matchpoint_component_norms (matchpoint_component_id, sequence, norm_routine) >- SELECT MAX(matchpoint_component_id), 1, 'ISSN' FROM matchpoint_components;" >+ SELECT matchpoint_component_id, 1, 'ISSN' FROM matchpoint_components WHERE tag = '022';" > >- - "INSERT INTO matchpoints (matcher_id, search_index, score) SELECT MAX(matcher_id), 'local-number', 1000 FROM marc_matchers;" >- - "INSERT INTO matcher_matchpoints SELECT MAX(matcher_id), MAX(matchpoint_id) FROM matchpoints;" >+ - "INSERT INTO matchpoints (matcher_id, search_index, score) SELECT matcher_id, 'local-number', 1000 FROM marc_matchers WHERE code = 'KohaBiblio';" >+ - "INSERT INTO matcher_matchpoints SELECT matcher_id, matchpoint_id FROM matchpoints WHERE search_index = 'local-number';" > - "INSERT INTO matchpoint_components (matchpoint_id, sequence, tag, subfields) >- SELECT MAX(matchpoint_id), 1, '999', 'c' FROM matchpoints;" >+ SELECT matchpoint_id, 1, '999', 'c' FROM matchpoints WHERE search_index = 'local-number';" > - "INSERT INTO matchpoint_component_norms (matchpoint_component_id, sequence, norm_routine) >- SELECT MAX(matchpoint_component_id), 1, 'Biblionumber' FROM matchpoint_components;" >+ SELECT matchpoint_component_id, 1, 'Biblionumber' FROM matchpoint_components WHERE tag = '999';" >-- >2.20.1
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 24593
:
98494
|
98495
|
98496
|
99416
|
99417
|
99418
|
100139
|
100366
|
100367
|
100368
| 100369