New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run travis tests on different MySQL and MariaDB versions #85
Conversation
|
(testing, so do not merge) |
7514e94
to
1cbaa08
Compare
|
I wanted to say I'm very happy by you trying to do this! It has been on my wishlist for a while. |
|
Apparently that 4.1 test in matrix show problems in driver code... so it was useful! |
|
There are 3 problems:
|
|
First problem is not in Devel::CheckLib nor AppVeyor, but in windows version of mysql.h. It used type SOCKET without including winsock.h, so including pure mysql.h cause compiler error: |
|
Third problem with test t/rt50304-column_info_parentheses.t and MySQL 8.0.0 is fixed. DESCRIBE did not function with temporary tables (like in older MySQL 5 versions). |
|
Looks like last MariaDB version with working mysql_config script is 10.2.1. As mysql_config is required for automatic compilation all new versions with broken mysql_config cannot be used for DBD::mysql... I will remove new versions from matrix. |
|
Hi Pali: why is the There seem to be lots of bugs for https://jira.mariadb.org/browse/MDEV-9388?jql=text%20~%20%22mysql_config%22 |
|
Why? Because |
|
You can look and compare build logs for MariaDB 10.2.1 (which is working fine) and MariaDB 10.2.2/10.2.3 (which fails in Makefile.PL): 10.2.1: https://travis-ci.org/perl5-dbi/DBD-mysql/jobs/193932892 (OK) |
|
I created https://jira.mariadb.org/browse/MDEV-11872 for this. |
|
So I merged #87. I think it's best to make a new PR with the |
Use file t/mysql.mtest for storing that value. Also instead of checking existence of filename in mysql_config, which does not have to be full path, try to execute it with --version parameter.
ExtUtils::MakeMaker already checks if needed libraries are in system and available for compiler. But if they are not present it just show warning: Warning (mostly harmless): No library found for -lmysqlclient But missing libraries (like mysqlclient) are fatal as without it DBD::mysql cannot be compiled. It looks like ExtUtils::MakeMaker cannot be switched to from "harmless" mode to fatal so this patch check for needed libraries and also header files via Devel::CheckLib module. On Linux, gcc by default allows undefined symbols in shared libraries. Libraries are generated successfully without any warning even when there are missing some symbols. So auto/DBD/mysql/mysql.so can be compiled with missing mysql symbols without any warning or error. But trying to call in perl "use DBD::mysql" cause runtime perl error: Can't load 'auto/DBD/mysql/mysql.so' for module DBD::mysql: auto/DBD/mysql/mysql.so: undefined symbol: mysql_sqlstate at DynaLoader.pm Rather depends on another module (Devel::CheckLib) at configure time instead producing wrong mysql.so binary and throwing non-sense runtime error messages. Due to broken windows version of mysql.h we need to manually define type SOCKET (which comes from winsock.h). Fixes bug: https://rt.cpan.org/Ticket/Display.html?id=119902
Travis matrix contains different MySQL and MariaDB version, namely those which are available in stable long term supported Linux distributions. Config file is prepared for easily extending database server matrix once new versions are released. Travis downloads official MySQL or MariaDB binary tarball and uses MySQL::Sandbox for starting database server. DBD::mysql is then compiled against client provided by that tarball and pre-installed perl 5.20 by Travis. Other perl versions are tested against system pre-installed database version as before.
Travis provides some perl versions compiled with -Duseshrplib so we can use them for testing DBD::mysql.
|
I squashed commits and rebased on top of master branch. Now this pull request is ready for review. Part of this pull request is now also checking if compiler can found & use mysqlclient library via external module Devel::CheckLib. Fixes bug: https://rt.cpan.org/Ticket/Display.html?id=119902 |
|
So for now MariaDB 10.2.2 and newer stay disabled and not used by Travis until upstream fix that problem. |
|
MariaDB fix is committed here: MariaDB/server@8877f1c |
|
Great! Seems it is working! And new MariaDB 10.2.4 with this fix was released, so we can add it into Travis matrix. |
Changes in this pull request:
Travis matrix contains different MySQL and MariaDB version, namely those
which are available in stable long term supported Linux distributions.
Config file is prepared for easily extending database server matrix once
new versions are released.
Travis downloads official MySQL or MariaDB binary tarball and uses
MySQL::Sandbox for starting database server. DBD::mysql is then compiled
against client provided by that tarball and pre-installed perl 5.20 by
Travis.
Other perl versions are tested against system pre-installed database
version as before.