Bugzilla – Attachment 87590 Details for
Bug 19670
search_marc_map.marc_field should have COLLATE= utf8mb4_bin
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19670: Change Collation of marc_field to allow mixed case mappings
Bug-19670-Change-Collation-of-marcfield-to-allow-m.patch (text/plain), 2.52 KB, created by
Katrin Fischer
on 2019-04-09 09:17:15 UTC
(
hide
)
Description:
Bug 19670: Change Collation of marc_field to allow mixed case mappings
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2019-04-09 09:17:15 UTC
Size:
2.52 KB
patch
obsolete
>From 4b047cb2ecb506abe3b27905512dc1acb6d18202 Mon Sep 17 00:00:00 2001 >From: Ere Maijala <ere.maijala@helsinki.fi> >Date: Thu, 14 Mar 2019 14:33:18 +0200 >Subject: [PATCH] Bug 19670: Change Collation of marc_field to allow mixed case > mappings > >Test plan: >1. Apply patch and update database >2. Verify that you can add a search field mapping for both 100a and 100A. >3. Verify that the above also works with a newly-created database. > >Signed-off-by: Michal Denar <black23@gmail.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > installer/data/mysql/atomicupdate/bug_19670.perl | 13 +++++++++++++ > installer/data/mysql/kohastructure.sql | 2 +- > 2 files changed, 14 insertions(+), 1 deletion(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_19670.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_19670.perl b/installer/data/mysql/atomicupdate/bug_19670.perl >new file mode 100644 >index 0000000000..fbe9e911aa >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_19670.perl >@@ -0,0 +1,13 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ my $table_sth = $dbh->prepare('SHOW CREATE TABLE `search_marc_map`'); >+ $table_sth->execute(); >+ my @table = $table_sth->fetchrow_array(); >+ unless ( $table[1] =~ /`marc_field`.*COLLATE utf8mb4_bin/ ) { #catches utf8mb4 collated tables >+ $dbh->do("ALTER TABLE `search_marc_map` MODIFY `marc_field` VARCHAR(255) NOT NULL COLLATE utf8mb4_bin COMMENT 'the MARC specifier for this field'"); >+ } >+ >+ # Always end with this (adjust the bug info) >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug 19670 - Change collation of marc_field to allow mixed case search field mappings)\n"; >+} >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 6d7a4d28e1..177360d2cb 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -1491,7 +1491,7 @@ CREATE TABLE `search_marc_map` ( > id int(11) NOT NULL AUTO_INCREMENT, > index_name ENUM('biblios','authorities') NOT NULL COMMENT 'what storage index this map is for', > marc_type ENUM('marc21', 'unimarc', 'normarc') NOT NULL COMMENT 'what MARC type this map is for', >- marc_field VARCHAR(255) NOT NULL COMMENT 'the MARC specifier for this field', >+ marc_field VARCHAR(255) NOT NULL COLLATE utf8mb4_bin COMMENT 'the MARC specifier for this field', > PRIMARY KEY(`id`), > UNIQUE key `index_name` (`index_name`, `marc_field` (191), `marc_type`), > INDEX (`index_name`) >-- >2.11.0
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 19670
:
86599
|
87240
|
87379
|
87558
| 87590