+ fcl-db: mysql 5.6 connector: add support for MariaDB 10.0. Should fix isseu #26620. Needs testing.

git-svn-id: trunk@28593 -
This commit is contained in:
reiniero 2014-09-04 10:18:01 +00:00
parent e126b787a3
commit aae9a5b8b9

View File

@ -58,6 +58,12 @@ Const
{$EndIf}
{$endif}
{$endif}
{$ENDIF}
MariaDBVersion =
{$IFDEF mysql56} // MariaDB 10.0 is compatible with MySQL 5.6
'10.0';
{$ELSE} // MariaDB 5.1..5.5 presumably report the same version number as MySQL
MySQLVersion;
{$ENDIF}
Type
@ -459,13 +465,15 @@ end;
procedure TConnectionName.DoInternalConnect;
var
FullVersion,
ClientVerStr: string;
FullVersion: string;
begin
InitialiseMysql;
Fullversion:=strpas(mysql_get_client_info());
ClientVerStr := copy(FullVersion,1,3);
If (ClientVerStr<>MySQLVersion) then
// 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]);
inherited DoInternalConnect;
ConnectToServer;