MYSQL bigint. 0 zeros returned from many field entries - bug
Posted: 24.03.2021, 16:07
Issue with MYSQL in Zeolib 7.2.x and some 7.1.x. bigint fields with successive entries 1,2,3,4,5,6,7,8,9,10 will return as 1,2,3,4,5,0,0,0,0,10 as strings. ie shows in tables as such. It behaves correctly in design mode and with an RO query. (This is using Delphi 7 on Win10)
Problem is with Int64 to string ( bigint is int64 ) conversions in FastCode.pas as outlined in sourceforge bug r6084. A fix is in 7.3.x but not reportedly in any 7.2.x versions.
I am using it to fix 7.2.4 which installs in my Delphi 7 on Win10 - 64 :
Find FastCode.pas in the install source for your version. Make a copy for reference.
In my case it is at C:\BorlandD7\Imports\zeosdbo-7.2.4-stable\src\core
function ValUInt64_JOH_PAS_8_a_raw(const s: PAnsiChar; out code: Integer): UInt64; is responsible
Get new version of function out of subversion code at:
https://sourceforge.net/p/zeoslib/code- ... .pas#l4553
Copying out from Lines 4454 to 4551
Use these to replace the ValUInt64_JOH_PAS_8_a_raw function code within your FastCode.pas between the 'warnings off' and 'warnings on'
Save it and it should compile ( Ctrl + f9 )
Reinstall Zeos lib. ( In Delphi 7 ) opening and compiling in order zCore.dpk , zPlain.dpk, ZparseSQL, Zdbc and zComponent. You may ave a .bpl which will do most of these Compile and Install ZcomponentDesign. The design objects should be there and working. Restarting Delphi before this is a good idea.
Problem is with Int64 to string ( bigint is int64 ) conversions in FastCode.pas as outlined in sourceforge bug r6084. A fix is in 7.3.x but not reportedly in any 7.2.x versions.
I am using it to fix 7.2.4 which installs in my Delphi 7 on Win10 - 64 :
Find FastCode.pas in the install source for your version. Make a copy for reference.
In my case it is at C:\BorlandD7\Imports\zeosdbo-7.2.4-stable\src\core
function ValUInt64_JOH_PAS_8_a_raw(const s: PAnsiChar; out code: Integer): UInt64; is responsible
Get new version of function out of subversion code at:
https://sourceforge.net/p/zeoslib/code- ... .pas#l4553
Copying out from Lines 4454 to 4551
Use these to replace the ValUInt64_JOH_PAS_8_a_raw function code within your FastCode.pas between the 'warnings off' and 'warnings on'
Save it and it should compile ( Ctrl + f9 )
Reinstall Zeos lib. ( In Delphi 7 ) opening and compiling in order zCore.dpk , zPlain.dpk, ZparseSQL, Zdbc and zComponent. You may ave a .bpl which will do most of these Compile and Install ZcomponentDesign. The design objects should be there and working. Restarting Delphi before this is a good idea.