Summary: | About may list version of SQL client in container, not actual server | ||
---|---|---|---|
Product: | Koha | Reporter: | Marcel de Rooy <m.de.rooy> |
Component: | About | Assignee: | Marcel de Rooy <m.de.rooy> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | minor | ||
Priority: | P5 - low | CC: | david, jonathan.druart, lucas |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
23.05.00,22.11.04
|
|
Circulation function: | |||
Attachments: |
Bug 32687: Get server version in Context::get_versions
Bug 32687: Get server version in Context::get_versions Bug 32687: Get server version in Context::get_versions |
Description
Marcel de Rooy
2023-01-20 08:13:19 UTC
Created attachment 145504 [details] [review] Bug 32687: Get server version in Context::get_versions Test plan: Run t/db_dependent/Context.t Check About/Server information/MySQL version. Created attachment 145563 [details] [review] Bug 32687: Get server version in Context::get_versions Test plan: Run t/db_dependent/Context.t Check About/Server information/MySQL version. Signed-off-by: David Nind <david@davidnind.com> Testing notes using KTD: 1. About page: - Before: MySQL version: mysql Ver 15.1 Distrib 10.5.18-MariaDB, for debian-linux-gnu (x86_64) using EditLine wrapper - After: MySQL version: 10.5.18-MariaDB-1:10.5.18+maria~ubu2004 2. From the command line in KTD: root@kohadevbox:koha$ mysql -V mysql Ver 15.1 Distrib 10.5.18-MariaDB, for debian-linux-gnu (x86_64) using EditLine wrapper 3. From the server - select version() and status queries (mysql-kohadev kohadev): MariaDB [koha_kohadev]> select version(); +-----------------------------------------+ | version() | +-----------------------------------------+ | 10.5.18-MariaDB-1:10.5.18+maria~ubu2004 | +-----------------------------------------+ MariaDB [koha_kohadev]> status; -------------- mysql Ver 15.1 Distrib 10.5.18-MariaDB, for debian-linux-gnu (x86_64) using EditLine wrapper ... Server: MariaDB Server version: 10.5.18-MariaDB-1:10.5.18+maria~ubu2004 mariadb.org binary distribution ... -------------- + $mysqlVersion ||= `mysql -V`; # fallback to sql client version? I would remove this. Why keep it? (In reply to Jonathan Druart from comment #4) > + $mysqlVersion ||= `mysql -V`; # fallback to sql client > version? > > I would remove this. Why keep it? Theoretical fallback. Would leave it there. (In reply to Marcel de Rooy from comment #5) > (In reply to Jonathan Druart from comment #4) > > + $mysqlVersion ||= `mysql -V`; # fallback to sql client > > version? > > > > I would remove this. Why keep it? > > Theoretical fallback. Would leave it there. But this patch shows it does not return the correct value, and if DBI->get_info does not return something, we can expect bad things to happen. Created attachment 147211 [details] [review] Bug 32687: Get server version in Context::get_versions Test plan: Run t/db_dependent/Context.t Check About/Server information/MySQL version. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Letting RM takes the decision. Pushed to master for 23.05. Nice work everyone, thanks! Nice work everyone! Pushed to stable for 22.11.x Doesn't apply clean in 22.05.x, if needed please rebase. |