in reply to Should URI::mysql Switch to DBD::MariaDB?

Hi, at $work we are using MySQL 8 and DBD::mysql 5 but it was a forced update to the DB server because we wanted to stay up to date with the Perl lib. For a while on my own development box I used DBD::MariaDB and it is certainly a working drop-in replacement. If your project does not wish to compel users to update their DB server I would say switching to MariaDB would be the right choice, but I don't know that URI::mysql should change. If anything a URI::MariaDB package should be available, and let downstream authors (like you) choose. (I note that there is URI::mariadb but it's incomplete.)


The way forward always starts with a minimal test.

Replies are listed 'Best First'.
Re^2: Should URI::mysql Switch to DBD::MariaDB?
by Theory (Beadle) on Jan 02, 2025 at 17:08 UTC
    Yes, perhaps it makes sense to modify URI::db with:
    --- a/lib/URI/maria.pm +++ b/lib/URI/maria.pm @@ -1,5 +1,5 @@ package URI::maria; -use base 'URI::mysql'; +use base 'URI::mariadb'; our $VERSION = '0.23'; 1; diff --git a/lib/URI/mariadb.pm b/lib/URI/mariadb.pm index 7072283..889abbf 100644 --- a/lib/URI/mariadb.pm +++ b/lib/URI/mariadb.pm @@ -2,4 +2,6 @@ package URI::mariadb; use base 'URI::mysql'; our $VERSION = '0.23'; +sub dbi_driver { 'MariaDB' } + 1;