Summary: | Two indexes on biblioitems.issn | ||
---|---|---|---|
Product: | Koha | Reporter: | Fridolin Somers <fridolin.somers> |
Component: | Database | Assignee: | Marcel de Rooy <m.de.rooy> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | minor | ||
Priority: | P5 - low | CC: | jonathan.druart, kyle, m.de.rooy, mtj, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | Small patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Attachments: |
Bug 8835: Drop issn_idx for completeness
Bug 8835: New db rev for issn_idx Bug 8835: Drop issn_idx for completeness Bug 8835: New db rev for issn_idx Bug 8835: Drop issn_idx for completeness Bug 8835: New db rev for issn_idx |
Description
Fridolin Somers
2012-09-27 07:21:15 UTC
Since 3.01 is a quite old version, I think this bug report could be closed. Fridolin, do you agree? We have fixed some occurrences of this is our recent update to 3.18 - I believe no harm is done by the differently named indexes, but it shows up as an error in the web installer output. I think we should (at this point) have an update action that removes the issn_idx index if present. Actually, there is also 3.15.00.049 - Bug 5377 - Biblioitems isbn and issn fields too small for multiple ISBN and ISSN which remove the index named "issn" and modify the datatype for the issn field. If an index existed at this point, the change would have failed. (In reply to Jonathan Druart from comment #4) > Actually, there is also > 3.15.00.049 - Bug 5377 - Biblioitems isbn and issn fields too small for > multiple ISBN and ISSN > > which remove the index named "issn" and modify the datatype for the issn > field. > If an index existed at this point, the change would have failed. Yes, I saw that happening. Created attachment 56278 [details] [review] Bug 8835: Drop issn_idx for completeness When dbrev 3.15.00.049 failed, the still existing issn_idx must have been the cause. This patch only adjusts the old db rev. Still thinking if we also need a new db rev to fix isbn and issn for those installs where 3.15.00.049 failed too. (In that case the fields may not have been changed to mediumtext and no indexes were added.) Test plan: Ideally, run an upgrade from something older than 3.15.00.49. But running the added sql command from the command line might convince you too. Created attachment 56316 [details] [review] Bug 8835: New db rev for issn_idx This db rev reapplies dbrev 3.15.00.049 in case that one failed due to existence of issn_idx. Test plan: If you do not have index issn_idx, recreate it: ALTER TABLE biblioitems ADD INDEX issn_idx (issn (255)) Run this db rev. You should see: Removed issn_idx. Rerun the dbrev. You should see: Everything is fine. Created attachment 56489 [details] [review] Bug 8835: Drop issn_idx for completeness When dbrev 3.15.00.049 failed, the still existing issn_idx must have been the cause. This patch only adjusts the old db rev. Still thinking if we also need a new db rev to fix isbn and issn for those installs where 3.15.00.049 failed too. (In that case the fields may not have been changed to mediumtext and no indexes were added.) Test plan: Ideally, run an upgrade from something older than 3.15.00.49. But running the added sql command from the command line might convince you too. Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> Created attachment 56490 [details] [review] Bug 8835: New db rev for issn_idx This db rev reapplies dbrev 3.15.00.049 in case that one failed due to existence of issn_idx. Test plan: If you do not have index issn_idx, recreate it: ALTER TABLE biblioitems ADD INDEX issn_idx (issn (255)) Run this db rev. You should see: Removed issn_idx. Rerun the dbrev. You should see: Everything is fine. Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> (In reply to Nicolas Legrand from comment #9) > Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> Thx I've got a problem running the update: $ perl installer/data/mysql/updatedatabase.pl DEV atomic update: 8835_dbrev.perl Error flock (1) on '/home/vagrant/kohaclone/installer/data/mysql/atomicupdate/8835_dbrev.perl': No locks available at installer/data/mysql/updatedatabase.pl line 13637. Tested from koha-shell on kohadevbox. (In reply to Katrin Fischer from comment #11) > I've got a problem running the update: > $ perl installer/data/mysql/updatedatabase.pl > DEV atomic update: 8835_dbrev.perl > Error flock (1) on > '/home/vagrant/kohaclone/installer/data/mysql/atomicupdate/8835_dbrev.perl': > No locks available at installer/data/mysql/updatedatabase.pl line 13637. > > Tested from koha-shell on kohadevbox. Thanks for trying, Katrin. I restested this dbrev with Debian 8/Plack and Debian 7 now without any problems. Your problem seems to be an issue on kohadevbox. The referred line in updatedatabase tries to read the atomicupdate file with Path::Tiny (a recent adjustment). Path::Tiny uses flock. (So you did not even reach the new code of this dbrev.) Could you test on another system? Or resolve the flock issues on your devbox? I get the same error, I do not manage to find the source of the problem. Tomas, Have you already seen that happening? (In reply to Jonathan Druart from comment #13) > I get the same error, I do not manage to find the source of the problem. > Tomas, Have you already seen that happening? See bug 17666 Created attachment 57706 [details] [review] Bug 8835: Drop issn_idx for completeness When dbrev 3.15.00.049 failed, the still existing issn_idx must have been the cause. This patch only adjusts the old db rev. Still thinking if we also need a new db rev to fix isbn and issn for those installs where 3.15.00.049 failed too. (In that case the fields may not have been changed to mediumtext and no indexes were added.) Test plan: Ideally, run an upgrade from something older than 3.15.00.49. But running the added sql command from the command line might convince you too. Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Created attachment 57707 [details] [review] Bug 8835: New db rev for issn_idx This db rev reapplies dbrev 3.15.00.049 in case that one failed due to existence of issn_idx. Test plan: If you do not have index issn_idx, recreate it: ALTER TABLE biblioitems ADD INDEX issn_idx (issn (255)) Run this db rev. You should see: Removed issn_idx. Rerun the dbrev. You should see: Everything is fine. Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Pushed to master for 16.11, thanks Marcel! Possible selection for 16.05.x (16.05.07) |