CLIENT root@master:/usr/share/koha# mysql -V mysql Ver 15.1 Distrib 10.5.18-MariaDB, for debian-linux-gnu (x86_64) using EditLine wrapper SERVER root@mastersql:/app# mysql -V mysql Ver 15.1 Distrib 10.5.17-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2 About lists 10.5.18. The server is still on 17..
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.