Skip to content
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

mysql.so is compiled with a specific MySQL flavor and version #248

Closed
atoomic opened this issue Mar 26, 2018 · 10 comments
Closed

mysql.so is compiled with a specific MySQL flavor and version #248

atoomic opened this issue Mar 26, 2018 · 10 comments

Comments

@atoomic
Copy link

atoomic commented Mar 26, 2018

Multiple places are checking MYSQL_VERSION_ID or MARIADB_BASE_VERSION to provide different implementations of a function.

So it appears that once you have compiled your DBD::mysql driver against a specific version then you might have "surprises" using the driver to connect to an older/newer server.

We were under the assumption that we could use DBD::mysql to connect to multiple version of servers.

This, for example, is one of the changes made to shutdown db47688 which was introduced in MySQL 5.7.9

When mysql.so is compiled with a 5.7.9 version once used with a 5.6 server.... it will raise an error.

The shutdown function does not appear to be the only one affected by this.

@toddr
Copy link

toddr commented Mar 26, 2018

See #56 for an example of where this change went in.

@atoomic
Copy link
Author

atoomic commented Mar 26, 2018

I discovered this while using the func function with a MySQL 5.6 server whereas the driver was compiled with the mariadb-connector from https://downloads.mariadb.org/connector-c/3.0.3/

$dbh->func( 'shutdown', 'admin' );

which raises this exception from the server

The system received an error from the “MySQL” database “mysql”: ER_PARSE_ERROR (You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SHUTDOWN' at line 1)

@pali
Copy link
Member

pali commented Mar 26, 2018

Hi! Some of those problems are or would be fixed in DBD::MariaDB. If you have a full testable reproducer against DBD::MariaDB, please fill a issue to https://github.com/gooddata/DBD-MariaDB project and we will look at it.

@toddr
Copy link

toddr commented Mar 26, 2018

Can you tell me if this client is compatible to connect to mysql and mariadb servers 4.x and above?

@pali
Copy link
Member

pali commented Mar 26, 2018

DBD::MariaDB is still under development, please read https://www.nntp.perl.org/group/perl.dbi.users/2018/01/msg37584.html and https://www.nntp.perl.org/group/perl.dbi.users/2018/01/msg37586.html
Travis tests for MySQL 4.1 passes; new MariaDB 10.2 and 10.3 too.

@toddr
Copy link

toddr commented Mar 26, 2018

Reviewing the code changes in https://github.com/gooddata/DBD-MariaDB, the issue was fixed by removing func as a valid feature of the driver. Possibly the same disclaimer should be added to the DBD::mysql client that it only works with servers of the same type? Either that or remove support for the func method call.

@atoomic
Copy link
Author

atoomic commented Mar 26, 2018

indeed looks like DBD::MariaDB simply removed support for that internal 'admin' helper, which solved the issue lol
view: perl5-dbi/DBD-MariaDB@1ece8cd

@atoomic
Copy link
Author

atoomic commented Mar 26, 2018

thanks @pali for all this work, looking forward to use DBD::MariaDB in the future

@pali
Copy link
Member

pali commented Mar 26, 2018

Yes, admin method was removed because it was deprecated (see commit e35a628) and replaced by calling SQL statements. I'm cleaning up old and deprecated code. But as I said, if you have reproducer for some bug (or missing feature), please fill an issue and we will look at it.

@dveeden
Copy link
Collaborator

dveeden commented Aug 23, 2023

The matrix of supported client libraries has been reduced in master, which should fix this issue as well.

@dveeden dveeden closed this as completed Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants