Summary: | REGEXP_REPLACE not in MySQL < 5.7b DB update 24.06.00.064 fails | ||
---|---|---|---|
Product: | Koha | Reporter: | Nick Clemens (kidclamp) <nick> |
Component: | Database | Assignee: | Bugs List <koha-bugs> |
Status: | Failed QA --- | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | david, dcook, jonathan.druart, magnus |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29805 | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | 38436 | ||
Bug Blocks: | |||
Attachments: | Bug 38906: Use SUBSTRING and LOCATE over REGEXP_REPLACE |
Description
Nick Clemens (kidclamp)
2025-01-16 13:07:52 UTC
Created attachment 176659 [details] [review] Bug 38906: Use SUBSTRING and LOCATE over REGEXP_REPLACE To test: 1 - Check out an old version of Koha and set some columns settings for holdings tables, or: UPDATE columns_settings SET columnname = CONCAT("holdings_",columnname) WHERE module = 'catalogue' AND page='detail' AND tablename = "holdings_table"; UPDATE columns_settings SET columnname = CONCAT("otherholdings_",columnname) WHERE module = 'catalogue' AND page = 'detail' AND tablename = "otherholdings_table"; 2 - perl -e 'use C4::Installer; my $result = C4::Installer::run_db_rev("/kohadevbox/koha/installer/data/mysql/db_revs/240600064.pl"); warn Data::Dumper::Dumper($result)' 3 - SELECT columnname FROM columns_settings WHERE module="catalogue" AND page="detail" AND ( tablename="holdings_table" OR tablename="otherholdings_table"); 4 - Confirm column names are correct Which OS? Are you sure the patch is correct? select REGEXP_REPLACE(columnname, '.*holdings_', ''), SUBSTRING(columnname,LOCATE("_",columnname)+1) from columns_settings WHERE module = 'catalogue' AND page='detail' AND tablename = "hold ings_table"; +-----------------------------------------------+------------------------------------------------+ | REGEXP_REPLACE(columnname, '.*holdings_', '') | SUBSTRING(columnname,LOCATE("_",columnname)+1) | +-----------------------------------------------+------------------------------------------------+ | actions | holdings_actions | | barcode | holdings_barcode | | booksellerid | holdings_booksellerid | | ccode | holdings_ccode | | checkbox | holdings_checkbox | | copynumber | holdings_copynumber | | course_reserves | holdings_course_reserves | | cover_image | holdings_cover_image | | dateaccessioned | holdings_dateaccessioned | | datelastborrowed | holdings_datelastborrowed | | enumchron | holdings_enumchron | | holdingbranch | holdings_holdingbranch | | homebranch | holdings_homebranch | | hostrecord | holdings_hostrecord | | issues | holdings_issues | | item_group | holdings_item_group | | itemcallnumber | holdings_itemcallnumber | | itemnotes | holdings_itemnotes | | itemnotes_nonpublic | holdings_itemnotes_nonpublic | | itype | holdings_itype | | lastseen | holdings_lastseen | | localuse | holdings_localuse | | materials | holdings_materials | | renewals | holdings_renewals | | spinelabel | holdings_spinelabel | | status | holdings_status | | stocknumber | holdings_stocknumber | | uri | holdings_uri | | usedin | holdings_usedin | +-----------------------------------------------+------------------------------------------------+ Wondering: Do we still support MySQL and should this be updated? https://wiki.koha-community.org/wiki/System_requirements_and_recommendations I thought we still supported the default versions of MySQL that are installed on the supported LTS operating systems. I'm not sure what they are, but they should be added. (In reply to David Nind from comment #5) > I thought we still supported the default versions of MySQL that are > installed on the supported LTS operating systems. > > I'm not sure what they are, but they should be added. I think Debian replaced MySQL with MariaDB - but I am really no expert there. (In reply to Jonathan Druart from comment #3) > Are you sure the patch is correct? Setting to FQA since this has not been answered. |