ZProp_Kerberos vs. ZProp_KRB

The offical for ZeosLib 7.3 Report problems, ask for help, post proposals for the new version of Zeoslib 7.3/v8
Quick Info:
-We made two new drivers: odbc(raw and unicode version) and oledb
-GUID domain/field-defined support for FB
-extended error infos of Firebird
-performance ups are still in queue
In future some more feature will arrive, so stay tuned and don't hassitate to help
Post Reply
User avatar
aehimself
Zeos Dev Team
Zeos Dev Team
Posts: 787
Joined: 18.11.2018, 17:37
Location: Hungary

ZProp_Kerberos vs. ZProp_KRB

Post by aehimself »

Hello,

Today I got a "Duplicates not found" error when I enumerated the existing properties for a specific protocol; the issue was with the property named 'KRB'.
I checked it back it pointed me to the two properties above, which are described in ZPropertiesEditor.pas as follows:

Code: Select all

ZProp_Kerberos : TZProperty = (
    Name: ConnProps_Kerberos;
    Purpose: cASA_KerberosPurpose;
    ValueType: pvtString; LevelTypes: [pltConnection];
    Values: ''; Default: 'NO'; Alias: ConnProps_KRB;
    Providers: (Count: 1; Items: @cASAProvider);
    Protocols: (Count: 2; Items: @cASAProtocols);
  );
  ZProp_KRB : TZProperty = (
    Name: ConnProps_KRB;
    Purpose: cASA_KerberosPurpose;
    ValueType: pvtString; LevelTypes: [pltConnection];
    Values: ''; Default: 'NO'; Alias: ConnProps_Kerberos;
    Providers: (Count: 1; Items: @cASAProvider);
    Protocols: (Count: 2; Items: @cASAProtocols);
  );
Aren't the aliases swapped? Shouldn't it be

Code: Select all

ZProp_Kerberos : TZProperty = (
    Name: ConnProps_Kerberos;
    Purpose: cASA_KerberosPurpose;
    ValueType: pvtString; LevelTypes: [pltConnection];
    Values: ''; Default: 'NO'; Alias: ConnProps_Kerberos;
    Providers: (Count: 1; Items: @cASAProvider);
    Protocols: (Count: 2; Items: @cASAProtocols);
  );
  ZProp_KRB : TZProperty = (
    Name: ConnProps_KRB;
    Purpose: cASA_KerberosPurpose;
    ValueType: pvtString; LevelTypes: [pltConnection];
    Values: ''; Default: 'NO'; Alias: ConnProps_KRB;
    Providers: (Count: 1; Items: @cASAProvider);
    Protocols: (Count: 2; Items: @cASAProtocols);
  );
instead?

I did not create a pull request as the issue is really quick to fix and I'm not sure that I am right in this.
Delphi 12.1, Zeos 8 from latest GIT snapshot
Using:
- MySQL server 8.0.18; libmariadb.dll 3.3.8
- Oracle server 11.2.0, 12.1.0, 19.0.0; oci.dll 21.13
- MSSQL 2012, 2019; sybdb.dll FreeTDS_2435
- SQLite 3.45.2
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1939
Joined: 17.01.2011, 14:17

Re: ZProp_Kerberos vs. ZProp_KRB

Post by marsupilami »

Hello aehimself :)

I assume the current implementation is correct. ConnProps_Kerberos and ConnProps_KRB are aliases for each other. This is why ConnProps_KRB is listed as an alias for ConnProps_Kerberos (and the other way around for ConnProps_KRB).

I take ZProp_LibLocation as an example. ZProp_LibLocation doesn't have an alias which is why an empty sting is listed there.

Best regards,

Jan
Post Reply