Page 1 of 1

MYSQL bigint. 0 zeros returned from many field entries - bug

Posted: 24.03.2021, 16:07
by billwhizz
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.

Re: MYSQL bigint. 0 zeros returned from many field entries - bug

Posted: 24.03.2021, 17:46
by marsupilami
Hello Bill,

this change was merged to Zeos 7.2 in revision r6100. Please download a current Zeos version from our SourceForge Files section. There have been quite some improvements since Zeos 7.2.4, as can be seen in the release notes.

Best regards,

Jan

Re: MYSQL bigint. 0 zeros returned from many field entries - bug

Posted: 25.03.2021, 09:37
by billwhizz
Hi , Thank you for your prompt reply. Unfortunately the 7.2.4 was the most recent that will compile for me. Delphi 7 on WIn 10 / 64 7.2.6.and 7.2.10 will not compile for various errors.

I haven't carefully examined the FastCode function in 7.2.10 but was going on the notes in r6084 sawing that it had not been merged into 7.2. Anyway I hope this entry helps anyone who is seeing the issue and needs an explanation and where to look.

Thank you

Re: MYSQL bigint. 0 zeros returned from many field entries - bug

Posted: 25.03.2021, 12:14
by billwhizz
Hi Jan

Thank you for the prompt reply. Now that I look I can see that the FastCode.pas has been updated in 7.2.10. Unfortunately it will not compile in Delphi 7 on Win 10 /64 with Access violation in dcc.dll Read of address 00000003 when compiling dbc.pas. 7.2.6 had issues too, 7.2.4 compiles with just a warning which is why I am using it. Update in 7.3.x only was a comment against r6084.

Cheers, Bill

Re: MYSQL bigint. 0 zeros returned from many field entries - bug

Posted: 25.03.2021, 13:04
by marsupilami
Hello Bill,

this is strange. I just tested the compilation of Zeos 7.2.10 on Delphi 7, Windows 7 64 Bits and it worked. Did you install all the necessary updates to Delphi 7?

Best regards,

Jan

Re: MYSQL bigint. 0 zeros returned from many field entries - bug

Posted: 25.03.2021, 18:33
by billwhizz
This instance has no updates. Previously I was only using SP1. Do you have 7.1 installed, in which case I need to apply it. Need to find the original install disc it seems - if it still reads!

Re: MYSQL bigint. 0 zeros returned from many field entries - bug

Posted: 28.03.2021, 14:36
by marsupilami
Hello Bill,

I am not 100% sure, which Updates I installed but I assume, that I installed all updates that are available from Embarcadero. Also there ist the suggestion to make sure that you recompile all Zeos units. So the best way to do thing might be to delete all dcu files as well as all dcp and bpl files for Zeos.

Best regards,

Jan