[Bug 37476] New: RANK is a reserved word in MySQL 8.0.2+
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37476 Bug ID: 37476 Summary: RANK is a reserved word in MySQL 8.0.2+ Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Database Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org As of MySQL 8.0.2 [1], `rank` is a reserved word and is breaking some code [2]: ``` C4::Serials::addroutingmember(): DBI Exception: DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'rank FROM subscriptionroutinglist WHERE subscriptionid = '59'' at line 1 at t/db_dependent/Serials.t line 227 ``` [1] https://dev.mysql.com/doc/refman/8.0/en/keywords.html [2] https://jenkins.koha-community.org/job/Koha_Main_My8/1322/consoleFull -- 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=37476 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | Severity|enhancement |normal CC| |tomascohen@gmail.com -- 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=37476 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37476 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |37480 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37480 [Bug 37480] Make C4::Serials::addroutingmember us Koha::Objects -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37476 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 169609 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=169609&action=edit Bug 37476: Unit tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37476 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 169610 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=169610&action=edit Bug 37476: Fix reserved word error on Serials.pm on MySQL 8 This patch fixes the fact `RANK` become a reserved word in MySQL 8.0.2 [1] To test: 1. Launch KTD with MySQL 8: $ ktd down $ DB_IMAGE=mysql:8 ktd up -d 2. Open the logs $ ktd --shell k$ tail -f /var/log/koha/kohadev/*.log 3. Create a serial, receive an issue and try to create a routing list 4. Click on `+ Add recipients` and look for Henry 5. Click `Add` and then `Close` => FAIL: Henry not added => FAIL: The logs show an error about wrong SQL syntax 6. Run: k$ prove t/db_dependent/Serials.t => FAIL: Tests explode with the same kind of error! 6. Apply this patch 7. Restart plack 8. Repeat 3 through 6 => SUCCESS: Henry added! => SUCCESS: No explosion about the SQL syntax in the logs => SUCCESS: Tests pass! 9. Sign off :-D [1] https://dev.mysql.com/doc/refman/8.0/en/keywords.html -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37476 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37476 Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #169609|0 |1 is obsolete| | --- Comment #3 from Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> --- Created attachment 169702 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=169702&action=edit Bug 37476: Unit tests Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37476 Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #169610|0 |1 is obsolete| | --- Comment #4 from Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> --- Created attachment 169703 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=169703&action=edit Bug 37476: Fix reserved word error on Serials.pm on MySQL 8 This patch fixes the fact `RANK` become a reserved word in MySQL 8.0.2 [1] To test: 1. Launch KTD with MySQL 8: $ ktd down $ DB_IMAGE=mysql:8 ktd up -d 2. Open the logs $ ktd --shell k$ tail -f /var/log/koha/kohadev/*.log 3. Create a serial, receive an issue and try to create a routing list 4. Click on `+ Add recipients` and look for Henry 5. Click `Add` and then `Close` => FAIL: Henry not added => FAIL: The logs show an error about wrong SQL syntax 6. Run: k$ prove t/db_dependent/Serials.t => FAIL: Tests explode with the same kind of error! 6. Apply this patch 7. Restart plack 8. Repeat 3 through 6 => SUCCESS: Henry added! => SUCCESS: No explosion about the SQL syntax in the logs => SUCCESS: Tests pass! 9. Sign off :-D [1] https://dev.mysql.com/doc/refman/8.0/en/keywords.html Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37476 Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |emily.lamancusa@montgomeryc | |ountymd.gov --- Comment #5 from Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> --- Testing notes: DB_IMAGE=mysql:8 didn't work for me, but DB_IMAGE=mysql:8.0 did. Otherwise all works as it should! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37476 --- Comment #6 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Emily Lamancusa from comment #5)
Testing notes: DB_IMAGE=mysql:8 didn't work for me, but DB_IMAGE=mysql:8.0 did. Otherwise all works as it should!
Thanks! I should've copied and pasted my command instead of typing it :-D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37476 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #169702|0 |1 is obsolete| | --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 169722 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=169722&action=edit Bug 37476: Unit tests Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37476 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #169703|0 |1 is obsolete| | --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 169723 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=169723&action=edit Bug 37476: Fix reserved word error on Serials.pm on MySQL 8 This patch fixes the fact `RANK` become a reserved word in MySQL 8.0.2 [1] To test: 1. Launch KTD with MySQL 8: $ ktd down $ DB_IMAGE=mysql:8 ktd up -d 2. Open the logs $ ktd --shell k$ tail -f /var/log/koha/kohadev/*.log 3. Create a serial, receive an issue and try to create a routing list 4. Click on `+ Add recipients` and look for Henry 5. Click `Add` and then `Close` => FAIL: Henry not added => FAIL: The logs show an error about wrong SQL syntax 6. Run: k$ prove t/db_dependent/Serials.t => FAIL: Tests explode with the same kind of error! 6. Apply this patch 7. Restart plack 8. Repeat 3 through 6 => SUCCESS: Henry added! => SUCCESS: No explosion about the SQL syntax in the logs => SUCCESS: Tests pass! 9. Sign off :-D [1] https://dev.mysql.com/doc/refman/8.0/en/keywords.html Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37476 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com QA Contact|testopia@bugs.koha-communit |martin.renvoize@ptfs-europe |y.org |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37476 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #9 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Thanks for the fix here Tomas.. Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37476 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |24.11.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=37476 --- Comment #10 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Thanks for all the hard work! Pushed to main for the next 24.11.00 release as RM Assistant -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37476 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This fixes adding a patron release notes| |to a routing list after | |receiving a serial - the | |patron was not being added | |to the routing list. This | |issue was only happing | |where MySQL 8.0.2 or later | |was used as the database | |for Koha. This was because | |the SQL syntax in the SQL | |used RANK, which become a | |reserved word in MySQL | |8.0.2. CC| |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=37476 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|24.11.00 |24.11.00,24.05.04 released in| | Status|Pushed to main |Pushed to stable CC| |lucas@bywatersolutions.com --- Comment #11 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 24.05.x for upcoming 24.05.04 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37476 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |26567 CC| |fridolin.somers@biblibre.co | |m Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26567 [Bug 26567] Allow to limit subscription search to subscriptions with routing lists -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37476 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Needs documenting --- Comment #12 from Fridolin Somers <fridolin.somers@biblibre.com> --- Depends on Bug 26567 not in 23.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37476 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |caroline.cyr-la-rose@inlibr | |o.com Status|Needs documenting |RESOLVED Resolution|--- |FIXED --- Comment #13 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- Internal architecture, nothing to add/edit in the manual. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org