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

Separate MySQL from MariaDB connection types #677

Closed
ansgarbecker opened this issue Jun 12, 2019 · 10 comments
Closed

Separate MySQL from MariaDB connection types #677

ansgarbecker opened this issue Jun 12, 2019 · 10 comments
Assignees
Milestone

Comments

@ansgarbecker
Copy link
Collaborator

Steps to reproduce this issue

Try to support a MySQL-only feature in "MariaDB/MySQL" connection type.

Current behavior

Does not work, due to libmariadb loaded on any of these connections. See #296 for an example (cleartext authentication plugin is just a dummy on MariaDB)

Possible solution

Separate MySQL from MariaDB connection types, so the user is able to prefer libmysql over libmariadb, and vice versa.

@ansgarbecker
Copy link
Collaborator Author

Related commits:

  • a77eedd TDbLib instance for each MySQL/MariaDB session
  • a6ea858 the same for PostgreSQL

@ansgarbecker
Copy link
Collaborator Author

This could alternatively be solved by providing a "Library" dropdown in the session manager, which auto-selects the best fitting one based in the last server version, unless the user selects one himself:

  • libmysql (5.6.6)
  • libmysql (5.7.x)
  • libmariadb (10.1.x)
  • ...

Would that be a feature for the "Advanced" tab, or more for the "Settings" tab?

@ansgarbecker
Copy link
Collaborator Author

grafik

@ansgarbecker ansgarbecker self-assigned this Jul 5, 2019
ansgarbecker added a commit that referenced this issue Jul 5, 2019
…ng any of the libmysql/mariadb.dll files from the application directory
ansgarbecker added a commit that referenced this issue Jul 8, 2019
* drop workaround for application crash on WinXP, when loading newer libmariadb (see #79)
* raise TDbLib's own exception instead of baking an own one with less details. Probably helps in debugging: https://www.heidisql.com/forum.php?t=34044
* rename EDatabaseError to EDbError, to overcome naming conflict in DB unit
* load libpq.dll always with path, which should anyway work better than without it. See http://www.heidisql.com/forum.php?t=22514
@zufuliu
Copy link

zufuliu commented Jul 9, 2019

Please allow selecting system wide libmariadb.dll or libmysql.dll that comes with mariadb or mysql.
After using the single HeidiSQL.exe for many years, this no longer works since 10.2.0.5611. One have to put HeidiSQL.exe inside the bin folder in order to select the dlls, I think previously HeidiSQL automatically loads the dll without manually selecting.

@ansgarbecker
Copy link
Collaborator Author

Oh you rely on a libmysql/mariadb.dll somewhere on your harddisk? You should be experiencing random bugs in that case. Was there any benefit from using a lib that comes with mariadb or mysql?

You can also do it the other way around - copy the lib to your HeidiSQL directory.

@zufuliu
Copy link

zufuliu commented Jul 9, 2019

No, I'm sure there only one on my system, which is in mariadb's bin folder.

Was there any benefit from using a lib that comes with mariadb or mysql?

I don't know, since I use update to date mariadb release in local machine, possible there are bug fixes in lib.

@ansgarbecker
Copy link
Collaborator Author

Use any libmysql/mariadb you want, though that's neither supported nor recommended, as I already experienced incompatibilities betwen libraries and server versions. I already have two different libraries, libmysql can only be used for older servers, while it has SSL issues on newer ones. libmariadb can be used for newer servers only, and has problems with MySQL 4.0, see #697 .

@zufuliu
Copy link

zufuliu commented Jul 10, 2019

I think #697 may indicates that it's better to use a libmysql/mariadb.dll that matches the server (e.g. same major? version) being connecting, some feature used by old server may be removed in newer client lib.

@ansgarbecker
Copy link
Collaborator Author

Yes, this is what this issue is about. The user now has the ability to select a different library if the default one does not work. In the future there may be even more than these two, only currently these work with any server version of which I know of.

ansgarbecker added a commit that referenced this issue Jul 10, 2019
@ansgarbecker
Copy link
Collaborator Author

Current state looks ok to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants