[Bug 29631] New: 21.06.000.12 may fail
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29631 Bug ID: 29631 Summary: 21.06.000.12 may fail Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: ASSIGNED Severity: critical Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: jonathan.druart+koha@gmail.com Reporter: jonathan.druart+koha@gmail.com QA Contact: testopia@bugs.koha-community.org Depends on: 15067 We got 2 reports of this problem in the last 24h, uniq_lang unique key is failing to be created because several rows with the same (subtag, type) exist in DB. I have no idea how this is possible, but apparently it is. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15067 [Bug 15067] Add additional languages to advanced search language search -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29631 --- Comment #1 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 128209 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128209&action=edit Bug 29631: Prevent uniq_lang creation to fail We got 2 reports of this problem in the last 24h, uniq_lang unique key is failing to be created because several rows with the same (subtag, type) exist in DB. I have no idea how this is possible, but apparently it is. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29631 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |In Discussion --- Comment #2 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- The SQL query does not seem very good, and it won't work if there are more than 2 entries (only 1 will be deleted). Could someone help me to get something better? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29631 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=20754 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29631 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29631 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #128209|0 |1 is obsolete| | --- Comment #3 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 128214 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128214&action=edit Bug 29631: Prevent uniq_lang creation to fail We got 2 reports of this problem in the last 24h, uniq_lang unique key is failing to be created because several rows with the same (subtag, type) exist in DB. I have no idea how this is possible, but apparently it is. Test plan: Checkout a commit before 21.06.00.012 reset_all Create duplicate in language_subtag_registry
insert into language_subtag_registry(subtag, type, description) values('IN', 'region', 'India'); Checkout master+this patch, updatedatabase => Only 1 IN-region exists in the DB, the last one.
-- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29631 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29631 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #128214|0 |1 is obsolete| | --- Comment #4 from David Nind <david@davidnind.com> --- Created attachment 128238 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128238&action=edit Bug 29631: Prevent uniq_lang creation to fail We got 2 reports of this problem in the last 24h, uniq_lang unique key is failing to be created because several rows with the same (subtag, type) exist in DB. I have no idea how this is possible, but apparently it is. Test plan: Checkout a commit before 21.06.00.012 reset_all Create duplicate in language_subtag_registry
insert into language_subtag_registry(subtag, type, description) values('IN', 'region', 'India'); Checkout master+this patch, updatedatabase => Only 1 IN-region exists in the DB, the last one.
Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29631 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #5 from David Nind <david@davidnind.com> --- I hope I have tested this correctly, as I often have problems with KTD and changing to previous versions rather than master. In this case, for step 1 of the test plan I checked out v21.05.07. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29631 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This fixes an issue when release notes| |upgrading from 21.05.x to | |21.11 - the uniq_lang | |unique key is failing to be | |created because several | |rows with the same subtag | |and type exist in database | |table | |language_subtag_registry. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29631 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtj@kohaaloha.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29631 Manos PETRIDIS <egpetridis@yahoo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |egpetridis@yahoo.com --- Comment #6 from Manos PETRIDIS <egpetridis@yahoo.com> --- Could it be related to https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29641 ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29631 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=29641 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29631 --- Comment #7 from David Nind <david@davidnind.com> --- I think it is the same (better described). I hadn't marked as a duplicate yet, but did link them. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29631 --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- *** Bug 29641 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29631 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29631 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_21_11_candidate Severity|critical |blocker CC| |kyle@bywatersolutions.com --- Comment #9 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Upping severity, this is blocker for 21.11.01 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29631 --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- What can we do to help people that have already run into the issue? There was another report on the mailing list from Beda Szukics. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29631 --- Comment #11 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Katrin Fischer from comment #10)
What can we do to help people that have already run into the issue? There was another report on the mailing list from Beda Szukics.
They should either remove duplicates manually or run the SQL query provided by this patch. But it would be better to get a QA stamp on it before telling people to run it on production installations. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29631 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |tomascohen@gmail.com |y.org | CC| |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29631 --- Comment #12 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Jonathan Druart from comment #11)
(In reply to Katrin Fischer from comment #10)
What can we do to help people that have already run into the issue? There was another report on the mailing list from Beda Szukics.
They should either remove duplicates manually or run the SQL query provided by this patch. But it would be better to get a QA stamp on it before telling people to run it on production installations.
There are 3 UNIQUE constraints that could fail, added on bug 15067. This patch covers one. Can you provide the others? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29631 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29631 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #128238|0 |1 is obsolete| | --- Comment #13 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 128434 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128434&action=edit Bug 29631: Prevent uniq_lang creation to fail We got 2 reports of this problem in the last 24h, uniq_lang unique key is failing to be created because several rows with the same (subtag, type) exist in DB. I have no idea how this is possible, but apparently it is. Test plan: Checkout a commit before 21.06.00.012 reset_all Create duplicate in language_subtag_registry
insert into language_subtag_registry(subtag, type, description) values('IN', 'region', 'India'); Checkout master+this patch, updatedatabase => Only 1 IN-region exists in the DB, the last one.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29631 --- Comment #14 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 128435 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128435&action=edit Bug 29631: (QA follow-up) Add missing cleanups Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29631 --- Comment #15 from Tomás Cohen Arazi <tomascohen@gmail.com> --- I ran the original INSERTs (on the three tables) several times before running the db_rev, and it made the original patch fail (of course). My follow-up covers that. It still feels we should add: - FK constraints between this tables - UNIQUE to language_script_mapping - UNIQUE to language_script_bidi Those, on a separate bug of course. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29631 --- Comment #16 from Manos PETRIDIS <egpetridis@yahoo.com> --- Aren't language_descriptions.id and language_rfc4646_to_iso639.id already referenced anywhere in koha? Shouldn't there be some previous statements, where use is determined (if any) and existing references updated so that they would only point to the IDs that are to remain? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29631 --- Comment #17 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Manos PETRIDIS from comment #16)
Aren't language_descriptions.id and language_rfc4646_to_iso639.id already referenced anywhere in koha? Shouldn't there be some previous statements, where use is determined (if any) and existing references updated so that they would only point to the IDs that are to remain?
I did a git grep for language_descriptions and language_rfc4646_to_iso639 and no, couldn't find any references to the ids. They are always queried by subtag, lang and type. Good question, though. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29631 --- Comment #18 from Manos PETRIDIS <egpetridis@yahoo.com> --- As mine was one of the installations affected by this bug, I can verify that after running the following statements, web istaller completed successfully. DELETE a FROM language_subtag_registry AS a, language_subtag_registry AS b WHERE a.id < b.id AND a.subtag IS NOT NULL AND a.subtag=b.subtag AND a.type=b.type; DELETE a FROM language_descriptions AS a, language_descriptions AS b WHERE a.id < b.id AND a.subtag IS NOT NULL AND a.subtag=b.subtag AND a.lang IS NOT NULL AND a.lang=b.lang AND a.type=b.type; DELETE a FROM language_rfc4646_to_iso639 AS a, language_rfc4646_to_iso639 AS b WHERE a.id < b.id AND a.rfc4646_subtag IS NOT NULL AND a.rfc4646_subtag=b.rfc4646_subtag AND a.iso639_2_code=b.iso639_2_code; Thank you all for your help in resolving this issue. Manos Petridis -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29631 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |22.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29631 --- Comment #19 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to master for 22.05, thanks to everybody involved 🦄 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29631 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mhby87@gmail.com --- Comment #20 from Fridolin Somers <fridolin.somers@biblibre.com> --- *** Bug 29715 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29631 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|22.05.00 |22.05.00,21.11.01 released in| | Status|Pushed to master |Pushed to stable --- Comment #21 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to 21.11.x for 21.11.01 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29631 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to stable |RESOLVED CC| |andrew@bywatersolutions.com --- Comment #22 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Missing dependency, not backported to 21.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29631 MD NAZRUL ISLAM <nazrul.it.puc@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nazrul.it.puc@gmail.com --- Comment #23 from MD NAZRUL ISLAM <nazrul.it.puc@gmail.com> --- Upgrade to 21.06.00.012 [11:07:40]: Bug 15067 - Add missing languages ERROR: {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: Duplicate entry 'IN-region' for key 'uniq_lang' at /usr/share/koha/lib/C4/Installer.pm line 738 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29631 --- Comment #24 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to MD NAZRUL ISLAM from comment #23)
Upgrade to 21.06.00.012 [11:07:40]: Bug 15067 - Add missing languages ERROR: {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: Duplicate entry 'IN-region' for key 'uniq_lang' at /usr/share/koha/lib/C4/Installer.pm line 738
Please read through the bug - there is no need to post the issue again. The SQL statements in comment#18 are the fix. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29631 Hans Pålsson <hans.palsson@hkr.se> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hans.palsson@hkr.se -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org