Forum > Databases
MariaDB/TMySQLConnection mismatch - again.
GordonFindlay:
Lazarus 3.2, FPC 3.2.2
Once again MariaDB was updated - part of an openSUSE leap routine update - and has clashed with Lazarus use of MySQL Connectors - errors like:
--- Code: Text [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---TMySQL57Connection cannot work with the installed MySQLClient version: expected (5.7) got (3.1.22)
(Same sort of thing for other connection types as might be expected.)
Usually I just find a newer version of libmysqlclient.so. But in openSUSE libmysqlclient.so is just a symlink to libmariadb.so.3 - which is where the returned 3.1.22 comes from.
On this system I cannot even build a new libmysqlclient as the make fails, complaining about the installed version of gcc being too old.
And what damage would be caused by replacing the symlink by a real shared object?
My next option I guess is to modify the source code for the connection to respond correctly to MariaDB version reports - the code has a comment to the effect of 'we check only MySQL values - tough'. I'm reluctant to butcher well-written code though.
Or perhaps to change distribution.
Anyone with a better idea? And is it time that mariaDB should be better supported?
rvk:
Yes, very annoying all those differen db components.
They should have taken that into account when programming that part.
You can't even distribute your application without requiring the exact correct lib version.
Which could be difficult with dozens of programs at different customers.
But... You can set the property SkipLibraryVersionCheck to false.
Then it will just skip the check.
GordonFindlay:
I know about the SkipLibraryVersionCheck stunt. But there are reports that while a connection might be established,
issues can occur later. If nothing else is suggested I'll have a longer play with that.
I agree with you that there are issues with distribution. Even though most of my use is for just one project, creating something that can get broken by a routine distro update is not desirable.
CharlyTango:
That's why i don't use SQLDB against MariaDB. I use ZEOSDB instead. (installable via OPM)
obviously there is no intention to seriously support MariaDB with SQLDB.
File: mysqlconn.inc
Line 85
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} --- MariaDBVersion ={$IFDEF mysql57} '10.';{$ELSE}{$IFDEF mysql56} // MariaDB 10.0 is compatible with MySQL 5.6 '10.';{$ELSE} // MariaDB 5.1..5.5 presumably report the same version number as MySQL MySQLVersion;{$ENDIF}{$ENDIF}
MariaDB is on version 11.2.1 (RC) -or something - IMHO that will not really work.
Line 581:
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---// Note: in case of MariaDB version mismatch: tough luck, we report MySQL
As far as I know there is no version control in ZEOS in the way of SQLDB (at least I haven't come across it yet).
Therefore, it is usually sufficient to use the correct access library. Older versions usually work as long as you don't need newer SQL functions
A New Version of ZEOS was just released https://forum.lazarus.freepascal.org/index.php/topic,66893.0/topicseen.html
GordonFindlay:
Thanks for answers so far.
I've had a look through Distrowatch to see how mariaDB and MySQL rate - mariaDB is much more widely supported 'out of the box' which makes me wonder about comments such as Charly Tango (and OP) pointed out.
I've stress-tested the SkipLibraryVersionCheck stunt and it hasn't caused any further problems in my current application. Still strike me as ludicrous, and fragile. But I'll use it to finish version1; for version 2 (if and when it occurs) I will take a long hard look at zeosDB, as I can hardly guarantee that some later update to mariaDB won't lead to trouble.
I note that mariaDB as distributed with openSUSE Leap right now is version 10.6; there are four later versions already, and an RC for a fifth.
Navigation
[0] Message Index
[#] Next page