Menu

#311 Error in ZPlainMySqlDriver.pas; Can't find MySql 5.7 on Linux.

Unknown
closed
nobody
2018-11-13
2018-11-06
Tintinux
No

Hi

In src\plain\ZPlainMySqlDriver.pas the constant LINUX_DLL56_LOCATION is used twice (at the end of the code below) instated of LINUX_DLL57LOCATION. This means that Zeos will not find the right library file on LINUX when MySql 5.7 is the only version installed.

constructor TZMySQL5PlainDriver.Create;
begin
  inherited Create;
  {$IFNDEF UNIX}
  {$IFNDEF MYSQL_STRICT_DLL_LOADING}
    FLoader.AddLocation(MARIADB_LOCATION);
  {$ENDIF}
    FLoader.AddLocation(WINDOWS_DLL50_LOCATION);
    FLoader.AddLocation(WINDOWS_DLL51_LOCATION);
    FLoader.AddLocation(WINDOWS_DLL55_LOCATION);
    FLoader.AddLocation(WINDOWS_DLL56_LOCATION);
    FLoader.AddLocation(WINDOWS_DLL57_LOCATION);
  {$ELSE}
  {$IFNDEF MYSQL_STRICT_DLL_LOADING}
    FLoader.AddLocation(MARIADB_LOCATION);
  {$ENDIF}
    FLoader.AddLocation(LINUX_DLL50_LOCATION);
    FLoader.AddLocation(LINUX_DLL51_LOCATION);
    FLoader.AddLocation(LINUX_DLL55_LOCATION);
    FLoader.AddLocation(LINUX_DLL56_LOCATION);
    FLoader.AddLocation(LINUX_DLL56_LOCATION);
  {$ENDIF}
end;

Discussion

  • Tintinux

    Tintinux - 2018-11-06
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,6 +1,6 @@
     Hi
    
    -In src\plain\ZPlainMySqlDriver.pas  the constant LINUX_DLL56_LOCATION is used twice (at the end of the code below) instated of LINUX_DLL**57**LOCATION This means that Zeos will not find the right library file on LINUX when MySql 5.7 is the only version installed.
    +In src\plain\ZPlainMySqlDriver.pas  the constant LINUX_DLL56_LOCATION is used twice (at the end of the code below) instated of LINUX_DLL**57**LOCATION. This means that Zeos will not find the right library file on LINUX when MySql 5.7 is the only version installed.
    
     ~~~
     constructor TZMySQL5PlainDriver.Create;
    
     
  • marsupilami79

    marsupilami79 - 2018-11-06

    I Fixed that for Zeos 7.2 in Rev. 5233. Could you please check wether that works for you?

     
  • Tintinux

    Tintinux - 2018-11-06

    Ok, but probably not before a couple of days.
    Could you tell the current right svn url ? I looks like it has changed and I don't find it in the documentation.
    Thanks

     
  • Tintinux

    Tintinux - 2018-11-10

    Hi
    After update v5248, I have a compilation error when I try to install the package ZComponent in Lazarus 1.8.4 on Linux :

    ZDatasetUtils.pas(883,39) Error: Identifier not found "csCantFilterOnComputedColumns"

    I guess something was not committed...

    However, the unitary correction corrects the submitted issue on a fresh Linux 16.04 (with MySql 5.7 drivers only)

    Thanks

     
    • marsupilami79

      marsupilami79 - 2018-11-11

      Hmmm - that is strange. csCantFilterOnComputedColumns is defined in ZMessages.pas. Could you check that all units are on the same SVN revision and that you have no old units in your paths? Maybe you have units from the original ZIP file somwhere on your system?

       
  • Tintinux

    Tintinux - 2018-11-12

    Ok, now it is better !

    I had a package installed using Zeos (with a dependency). Initially it was using the stable release, but was not recompiled after I compile the patch, I was still keeping references to it.
    After I uninstalled, I was able to compile the Zeos patch package.

    I noticed that TZSqlException has been moved to unit ZClasses.
    I have added Zclasses in uses clause.
    Was it really mandatory to make such a change in a simple patch ?
    I hope that there will be no side effect...

    Thanks

     
    • marsupilami79

      marsupilami79 - 2018-11-13

      TZSqlException had to be moved so the dblib driver (MS SQL Server, SAP ASE) could generate Exceptions that are derived from EZSqlException too. There should be no side effects.

       
  • marsupilami79

    marsupilami79 - 2018-11-13
    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB