[Bug 23487] New: Utf8mb4 collation causes problems with missing tables when upgrading the database
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23487 Bug ID: 23487 Summary: Utf8mb4 collation causes problems with missing tables when upgrading the database Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: andreas.hedstrom.mace@sub.su.se QA Contact: testopia@bugs.koha-community.org Changing the default encoding to utf8mb4 and collation to utf8mb4_unicode_ci, can create duplicate unique keys as it ignores differences in accented characters vs non-accented characters. An example would be the Swedish letter ö, which is treated like the letter o. More is discussed here: https://stackoverflow.com/questions/47119794/mysql-mariadb-unable-to-handle-... When upgrading a large database to any version with the new encoding and collation, there is a chance of duplicate unique keys crashing the collation change of the table (or tables) and as a result corrupting InnoDB tablespace. The final result is one or more tables that both exist and don't exist, and thus can't be deleted or created again. We, not so fondly, called them Schrödinger's tables. For Stockholm University Library, we had about 30 duplicate unique keys in the borrowers table (out of ~220K patrons), mostly in userid. Which crashed the database every time we tried to upgrade until we found the cause. The workaround solution was to change/remove these duplicates, but perhaps a better solution for the community would be to change the default encoding/collation for columns with unique keys? Perhaps utf8mb4_bin? -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23487 Devinim <kohadevinim@devinim.com.tr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kohadevinim@devinim.com.tr -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23487 paxed <pasi.kallinen@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pasi.kallinen@koha-suomi.fi -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23487 Afrane Daniel <afrane55@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |afrane55@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23487 --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- This has been reported 4 years ago and I believe it might have been caused by a changed collation on the borrowers table. Should this be marked WONTFIX at this point? -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23487 Mengu Yazicioglu <mengu@devinim.com.tr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|kohadevinim@devinim.com.tr |mengu@devinim.com.tr -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23487 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #2 from David Cook <dcook@prosentient.com.au> --- (In reply to Katrin Fischer from comment #1)
This has been reported 4 years ago and I believe it might have been caused by a changed collation on the borrowers table. Should this be marked WONTFIX at this point?
I think this could be marked as WONTFIX. It sounds like an unfortunate migration issue, but I think "dave" and "davé" probably should be considered as equivalent for a unique index. When I try to make two patron records with those as the userid and cardnumber, I get the following warning: The following fields are wrong. Please fix them. Username already exists or could not create unique new one. Cardnumber already in use. So I think that sounds right to me. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23487 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |WONTFIX -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org