Re: DBD::MySQL upstream change
Hi Pali, Thanks for the clarification. On 31/03/2024 21:42, p...@cpan.org wrote: On Sunday 31 March 2024 10:03:33 Florian Smeets wrote: Hrmmm did not see Florian's reply to me, so following is directed to Florian. (ohh pssst you can't use that TLD to mail me direct, and I guess the list is set to not send list copy if direct send, I'll look at sorting that) My mail contained two links which you stripped that explain issues people saw when migrating to DBD:MariaDB. https://blogs.perl.org/users/grinnz/2023/12/migrating-from-dbdmysql-to-dbdmariadb.html https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277889#c16 I haven't analyzed it in that much detail to say if it will work in most cases or just in a lot of cases, all I'm saying is that some care needs to be taken as there are subtle differences, so not a 100% drop-in replacement. Florian First, I always believe in trimming posts, don't see the need to keep reposting links or text not needed over and over, it annoys many to no end those who just hit reply reply reply and soon enough you have a post thats 150k in size for an extra 6 lines on top of the 5k OP. Secondly, I admit not reading Grinz's blog, however at the time the second link (since you are from freebsd I chose to read that one) timed out. Thirdly as I said, in our environment, and in several others (I too was initially cautious before jumping head on in back in the day, and IRC advice from other ISP admins was yeah it's a drop in replacement) they just moved their DBI connect from mysql to MariaDB and everything worked, which is what I ended up doing, and yes everything worked no errors, so in many environments, yes it is a complete drop in replacement, but I note as Pali points out below there are edge cases where this is not so. At a fork time there were fixed lot of bugs from DBD::mysql bugtracker which users reported. I think there were 3 big changes which may cause incompatibility with DBD::mysql. 1) Renaming options. All DBI options which starts with "mysql_*" are DBD::mysql driver specific and so DBD::MariaDB cannot provide them. It has to use "mariadb_*" prefix. So if application uses driver specific mysql_* options they have to be renamed. ... -- Regards, Noel Butler
Re: DBD::MySQL upstream change
On Sunday 31 March 2024 10:03:33 Florian Smeets wrote: > On 31.03.24 03:34, Noel Butler wrote: > > On 30/03/2024 22:41, Florian Smeets wrote: > > > > > > > > From what I gathered, the DBD:MySQL vs DBD:MariaDB situation is not > > > easy. You cannot just replace it one for one, some care needs to be > > > taken. > > Care to explain this blanket statement? Or are you relating to FreeBSD > > that does something strange to be that way? > > My mail contained two links which you stripped that explain issues people > saw when migrating to DBD:MariaDB. > > https://blogs.perl.org/users/grinnz/2023/12/migrating-from-dbdmysql-to-dbdmariadb.html > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277889#c16 > > I haven't analyzed it in that much detail to say if it will work in most > cases or just in a lot of cases, all I'm saying is that some care needs to > be taken as there are subtle differences, so not a 100% drop-in replacement. > > Florian Hello, I'm the DBD::MariaDB author and I could explain a few things on this topic. I must admit that Grinnz on the blog post did excellent explanation about UNICODE. DBD::MariaDB forked DBD::mysql few years ago and released its first version 6 years ago. So it is not a new project. And I know that it is used in production on lot of places. At a fork time there were fixed lot of bugs from DBD::mysql bugtracker which users reported. I think there were 3 big changes which may cause incompatibility with DBD::mysql. 1) Renaming options. All DBI options which starts with "mysql_*" are DBD::mysql driver specific and so DBD::MariaDB cannot provide them. It has to use "mariadb_*" prefix. So if application uses driver specific mysql_* options they have to be renamed. 2) Fixing TLS support. At a fork time there were security related issues to TLS, e.g. application asked for TLS encryption and plain text was uses. DBD::MariaDB does not have these issues, but it may cause problem for applications which try to enforce TLS and server does not support TLS. 3) Fixing UNICODE support. This is the change mentioned in the blog post. Basically DBD::MariaDB aligns UNICODE support with DBD::SQLite and DBD::Pg. It changed UNICODE model to the one used by the Perl itself. So if application is working fine with DBD::SQLite there should be no issue. DBD::MariaDB removed old DBD::mysql utf8 related connection options (or rather to say connection workarounds/hacks) which are not needed anymore and should not be used. So, you can take it as 1:1 replacement if you have well-behaved DBI application which does not use any driver-specific things (like those mysql_* connection attributes), does not depend on DBD::mysql internals or bugs which were already fixed, and application uses the standard Perl UNICODE model. Changes done to DBD::MariaDB after fork can be found in the doc: https://metacpan.org/dist/DBD-MariaDB/changes Note that DBD::MariaDB still supports also MySQL versions 4.1-8.0. And there are automated driver tests also for FreeBSD, which passed on the latest released version. Test suite is same for Linux, Windows and FreeBSD. Which means that there was no uncovered FreeBSD specific issue. Anyway, if you need some help with migration, feel free to contact me. Pali
Re: DBD::MySQL upstream change
On 31.03.24 03:34, Noel Butler wrote: On 30/03/2024 22:41, Florian Smeets wrote: From what I gathered, the DBD:MySQL vs DBD:MariaDB situation is not easy. You cannot just replace it one for one, some care needs to be taken. Care to explain this blanket statement? Or are you relating to FreeBSD that does something strange to be that way? My mail contained two links which you stripped that explain issues people saw when migrating to DBD:MariaDB. https://blogs.perl.org/users/grinnz/2023/12/migrating-from-dbdmysql-to-dbdmariadb.html https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277889#c16 I haven't analyzed it in that much detail to say if it will work in most cases or just in a lot of cases, all I'm saying is that some care needs to be taken as there are subtle differences, so not a 100% drop-in replacement. Florian OpenPGP_0xEF5BA4DCD5A9F3C0.asc Description: OpenPGP public key OpenPGP_signature.asc Description: OpenPGP digital signature
Re: DBD::MySQL upstream change
On 30/03/2024 22:41, Florian Smeets wrote: From what I gathered, the DBD:MySQL vs DBD:MariaDB situation is not easy. You cannot just replace it one for one, some care needs to be taken. Care to explain this blanket statement? Or are you relating to FreeBSD that does something strange to be that way? I've found DBD::MariaDB a 100% drop in replacement - even for MySQL users, it is backward compatible (it actually forked out of DBD::mysql v4) and it was designed to just drop in and change the DBI calls to it. This is on Linux, but I find it hard to imagine that *BSD's would be any different. We are doing just that here with no other changes, zero issues on dozens of administrative scripts that use it (including users/host management). -- Regards, Noel Butler
Re: DBD::MySQL upstream change
On 29.03.24 21:54, Xavier Humbert wrote: Hi, I'm using MariaDB as my database server on FreeBSD 13.3 DBD::MySQL changed upstream to support only MySQL8 I know there is a new module DBD::MariaDB Hi, maintainer of amavis on FreeBSD here. The recent update of p5-DBD-mysql could have been handled better. There is active work on fixing the situation on FreeBSD. https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275100 https://reviews.freebsd.org/D44524 Hopefully, all of this should transparently work again in a couple of days. From what I gathered, the DBD:MySQL vs DBD:MariaDB situation is not easy. You cannot just replace it one for one, some care needs to be taken. https://blogs.perl.org/users/grinnz/2023/12/migrating-from-dbdmysql-to-dbdmariadb.html https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277889#c16 Florian OpenPGP_0xEF5BA4DCD5A9F3C0.asc Description: OpenPGP public key OpenPGP_signature.asc Description: OpenPGP digital signature
Re: DBD::MySQL upstream change
On 30/03/2024 11:42, Indunil Jayasooriya wrote: Is is safe to replace DBD::MySQL with DBD::MariaDB ? I am.using it in production on Alma Linux 9. also on... slackware 15.0 slackware -current -- Regards, Noel Butler
Re: DBD::MySQL upstream change
> > Is is safe to replace DBD::MySQL with DBD::MariaDB ? > I am.using it in production on Alma Linux 9. > > > >