Hello,
in some situation there seems to be a problem in the function mentioned above :
...
stInteger:
Result := PInteger(ValuePtr1)^ - PInteger(ValuePtr2)^;
...
the "old" value in my integer-column is somewhat with 3.000.000, the new one is about -2.147.480.000.
Both values are inside the signed-integer-range (-2.147.483.648 .. +2.147.483.647), but the result of
3.000.000 - (-2.147.480.000) = 2.150.480.000 is not - Delphi raises an exception.
Same situation may occur with Int64, because the function "CompareInt64" uses the same calculation and "Integer" as result.
Because "CompareInt64" inside "CompareBuffers" (and also the other "CompareXY" functions) normally just return "1", "0" or "-1", will it be possible to do this also with "stInteger" (but with a different calculation, of cause) ?
Thanks,
with best regards
Andreas
TZRowAccessor.CompareBuffers
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
Re: TZRowAccessor.CompareBuffers
Hi,
you're damn right! Did commit a fix with better code alignment: R3281 \testing-7.2 (SVN). This will resolve this longstanding bug!
you're damn right! Did commit a fix with better code alignment: R3281 \testing-7.2 (SVN). This will resolve this longstanding bug!
Best regards, Michael
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
Re: TZRowAccessor.CompareBuffers
Hi,
Thank You for the patch, it is very helpfull for me.
With best regards
Andreas
Thank You for the patch, it is very helpfull for me.
With best regards
Andreas