--- Coro-Mysql/Mysql.pm 2019/03/04 05:34:52 1.22 +++ Coro-Mysql/Mysql.pm 2019/03/04 05:44:43 1.23 @@ -1,6 +1,6 @@ =head1 NAME -Coro::Mysql - let other threads run while doing mysql requests +Coro::Mysql - let other threads run while doing mysql/mariadb requests =head1 SYNOPSIS @@ -19,24 +19,13 @@ a process, but only the thread that does the request. This can be used to make parallel sql requests using Coro, or to do other -stuff while mysql is rumbling in the background. +stuff while mariadb is rumbling in the background. =head2 CAVEAT Note that this module must be linked against exactly the same (shared, -possibly not working with all OSes) F library as -DBD::mysql, otherwise it will not work. - -Also, this module requires a header file that apparently isn't installed -everywhere (F), and therefore comes with it's own copy, which -might or might not be compatible to the F of your library - -when in doubt, make sure all the libmysqlclient header files are installed -and delete the F header that comes with this module. - -On the good side, this module does a multitude of checks to ensure that -the libray versions match on the binary level, so on incompatibilities you -should expect an exception when trying to unblock a handle, rather than -data corruption. +possibly not working with all OSes) F/F +library as L, otherwise it will not work. Also, while this module makes database handles non-blocking, you still cannot run multiple requests in parallel on the same database handle. If @@ -178,7 +167,7 @@ Coro::on_enter { $PApp::SQL::DBH = $dbh }; $cb->(); - } + } This function makes it possible to easily use L with L, without worrying about database handles. @@ -213,6 +202,13 @@ flight to Malaysia, and seems to have worked ever since, with minor adjustments for newer libmysqlclient libraries. +Well, at least until mariadb introduced the new Pluggable Virtual IO API +in mariadb 10.3, which changed and broke everything. On the positive +side, the old system was horrible to use, as many GNU/Linux distributions +forgot to include the required heaqder files and there were frequent small +changes, while the new PVIO system seems to be "official" and hopefully +better supported. + =head1 AUTHOR Marc Lehmann