Bugzilla – Attachment 35333 Details for
Bug 13577
The correct COLLATE is not set to all DB tables
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 13577: Add the utf8_unicode_ci COLLATE to all tables
PASSED-QA-Bug-13577-Add-the-utf8unicodeci-COLLATE-.patch (text/plain), 3.01 KB, created by
Kyle M Hall (khall)
on 2015-01-16 16:47:15 UTC
(
hide
)
Description:
[PASSED QA] Bug 13577: Add the utf8_unicode_ci COLLATE to all tables
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2015-01-16 16:47:15 UTC
Size:
3.01 KB
patch
obsolete
>From 6fb8a3e974e88fc61e46174bad8568809b9c2275 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Wed, 14 Jan 2015 09:54:40 +0100 >Subject: [PATCH] [PASSED QA] Bug 13577: Add the utf8_unicode_ci COLLATE to all tables > >Bug 11944 added the COLLATE=utf8_unicode_ci to all DB tables. >But some new tables have been created between the write of the patch set >and the push to master. >So these new tables don't have the correct collate. > >Test plan: >0/ Reproduce the error: >mysql> create database koha_test CHARACTER SET utf8 COLLATE utf8_unicode_ci; >mysql koha_test < installer/data/mysql/kohastructure.sql > >It will boom with: >ERROR 1005 (HY000) at line 3493: Can't create table `koha_test`.`items_search_fields` >(errno: 150 "Foreign key constraint is incorrectly formed") > >1/ Apply the patch, destroy the DB and recreate it: >mysql> create database koha_test CHARACTER SET utf8 COLLATE utf8_unicode_ci; >mysql> drop database koha_test; >mysql koha_test < installer/data/mysql/kohastructure.sql >All tables should be inserted without any error. > >Signed-off-by: Paola Rossi <paola.rossi@cineca.it> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > installer/data/mysql/kohastructure.sql | 8 ++++---- > 1 files changed, 4 insertions(+), 4 deletions(-) > >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index facde44..82868e7 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -371,7 +371,7 @@ CREATE TABLE borrower_sync ( > PRIMARY KEY (borrowersyncid), > KEY borrowernumber (borrowernumber), > CONSTRAINT borrower_sync_ibfk_1 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE >-) ENGINE=InnoDB DEFAULT CHARSET=utf8; >+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; > > > -- >@@ -3014,7 +3014,7 @@ CREATE TABLE aqcontacts ( > PRIMARY KEY (id), > CONSTRAINT booksellerid_aqcontacts_fk FOREIGN KEY (booksellerid) > REFERENCES aqbooksellers (id) ON DELETE CASCADE ON UPDATE CASCADE >-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; >+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1; > > -- > -- Table structure for table 'aqcontract' >@@ -3483,7 +3483,7 @@ CREATE TABLE IF NOT EXISTS columns_settings ( > cannot_be_toggled int(1) NOT NULL DEFAULT 0, > is_hidden int(1) NOT NULL DEFAULT 0, > PRIMARY KEY(module, page, tablename, columnname) >-) ENGINE=InnoDB DEFAULT CHARSET=utf8; >+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; > > -- > -- Table structure for table 'items_search_fields' >@@ -3500,7 +3500,7 @@ CREATE TABLE items_search_fields ( > CONSTRAINT items_search_fields_authorised_values_category > FOREIGN KEY (authorised_values_category) REFERENCES authorised_values (category) > ON DELETE SET NULL ON UPDATE CASCADE >-) ENGINE=InnoDB DEFAULT CHARSET=utf8; >+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; > > /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; > /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; >-- >1.7.2.5
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 13577
:
35176
|
35182
| 35333 |
35384