Using TSQLConnector to connect to multiple database servers is an elegant variant. However, a popular server like MariaDB is handled only rudimentarily.
found in mysqlconn.inc
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}
and
procedure TConnectionName.DoInternalConnect;
var
FullVersion: string;
begin
InitialiseMysql;
if not SkipLibraryVersionCheck then
begin
FullVersion:=strpas(mysql_get_client_info());
// Version string should start with version number:
// Note: in case of MariaDB version mismatch: tough luck, we report MySQL
// version only.
if (pos(MySQLVersion, FullVersion) <> 1) and
(pos(MariaDBVersion, FullVersion) <> 1) then
Raise EInOutError.CreateFmt(SErrVersionMisMatch,[ClassName,MySQLVersion,FullVersion]);
end;
inherited DoInternalConnect;
ConnectToServer;
SelectDatabase;
end;
The built-in version check, which makes sense for a proxy object (especially when TSQLConnector searches for the access library itself), becomes a problem when current or old versions are not supported.
The MySQL80Connection can not work with the installed MySQL Client Version: Expected (8.0), got (10.5.18).
You can assign any access library to TSQLConnector using TSQLDBLibraryLoader, but then the version control takes effect.
In the direct access components like TMySQL80Connection this is solved with an attribute SkipLibraryVersionCheck which disables the version check.
Unfortunately SkipLibraryVersionCheck is not passed through to TSQLConnector which leads to version conflicts again and again.
Who do I need to contact to make two requests?
1_ Include SkipLibraryVersionCheck in TSQLConnector. Possibly only switchable if TSQLDBLibraryLoader is used.
2_ Better support for MariaDB which is more common in smaller and larger environments due to MySQL ownership.