Page 6 of 6

Posted: 14.04.2012, 23:13
by ism
In zeos need detailed system of debug logs

Posted: 14.04.2012, 23:31
by EgonHugeist
1151 extra WIN64 define. Now this should work. ?

Yeah Yeah! i got it with the Blobs!!!! Testing MySQL, PostgreSQL and then i'll commit this! 8)

you're right its a big comedy! :D

Posted: 14.04.2012, 23:57
by ism
I can not believe it ! In all platforms all working !
Very good job.

True with blobs i not test

Posted: 15.04.2012, 00:07
by EgonHugeist
And here the last patch for tonight! Here we go: Rev 1152.

var
BlobPtr: PPointer;
NullPtr: PBoolean;
begin
BlobPtr := PPointer(@Buffer.Columns[FColumnOffsets[ColumnIndex - 1] + 1]);
NullPtr := PBoolean(@Buffer.Columns[FColumnOffsets[ColumnIndex - 1]]);

if NullPtr^ = {$IFDEF FPC}0{$ELSE}False{$ENDIF} then
Result := IZBlob(BlobPtr^)
else
Result := nil;

Blobs working too! Can you test this tomorrow? Now it'late. Go to bed ism, you also did a great job! It was a question of honor.

Michael

Posted: 15.04.2012, 06:17
by ism
My poster :)

Image

Posted: 15.04.2012, 06:31
by ism
Ups in linux 64 problem
/home/stas/bin/testing-egonhugeist/src/dbc/ZDbcCache.pas(364,13) Error: Incompatible types: got "Boolean" expected "Int64"
/home/stas/bin/testing-egonhugeist/src/dbc/ZDbcCache.pas(385,13) Error: Incompatible types: got "Boolean" expected "Int64"
/home/stas/bin/testing-egonhugeist/src/dbc/ZDbcCache.pas(393,29) Error: Incompatible types: got "ShortInt" expected "Boolean"
/home/stas/bin/testing-egonhugeist/src/dbc/ZDbcCache.pas(395,29) Error: Incompatible types: got "ShortInt" expected "Boolean"
/home/stas/bin/testing-egonhugeist/src/dbc/ZDbcCache.pas(2426) Fatal: There were 4 errors compiling module, stopping
FirstChar

Posted: 15.04.2012, 06:59
by ism
mybe this better
i test it in linux 64 , working , rightly or wrongly, I do not know

Code: Select all

Index: src/dbc/ZDbcCache.pas
===================================================================
--- src/dbc/ZDbcCache.pas	(revision 1153)
+++ src/dbc/ZDbcCache.pas	(working copy)
@@ -361,7 +361,7 @@
   BlobPtr := PPointer(@Buffer.Columns[FColumnOffsets[ColumnIndex - 1] + 1]);
   NullPtr := PBoolean(@Buffer.Columns[FColumnOffsets[ColumnIndex - 1]]);
 
-  if NullPtr^ = {$IFDEF FPC}0{$ELSE}False{$ENDIF} then
+  if NullPtr^ = {$IFDEF FPC}{$IFDEF LINUX}boolean(0){$ELSE}0{$ENDIF}{$ELSE}False{$ENDIF} then
     Result := IZBlob(BlobPtr^)
   else
     Result := nil;
@@ -382,7 +382,7 @@
   BlobPtr := PPointer(@Buffer.Columns[FColumnOffsets[ColumnIndex - 1] + 1]);
   NullPtr := PBoolean(@Buffer.Columns[FColumnOffsets[ColumnIndex - 1]]);
 
-  if NullPtr^ = {$IFDEF FPC}0{$ELSE}False{$ENDIF} then
+  if NullPtr^ = {$IFDEF FPC}{$IFDEF LINUX}boolean(0){$ELSE}0{$ENDIF}{$ELSE}False{$ENDIF} then
     IZBlob(BlobPtr^) := nil
   else
     BlobPtr^ := nil;
@@ -390,9 +390,9 @@
   IZBlob(BlobPtr^) := Value;
 
   if Value <> nil then
-    NullPtr^ := {$IFDEF FPC}0{$ELSE}False{$ENDIF}
+    NullPtr^ := {$IFDEF FPC}{$IFDEF LINUX}boolean(0){$ELSE}0{$ENDIF}{$ELSE}False{$ENDIF}
   else
-    NullPtr^ := {$IFDEF FPC}1{$ELSE}True{$ENDIF};
+    NullPtr^ := {$IFDEF FPC}{$IFDEF LINUX}boolean(1){$ELSE}1{$ENDIF}{$ELSE}True{$ENDIF};
 end;
 
 {**

Posted: 15.04.2012, 12:32
by EgonHugeist
:wohow: Lol 300!!! :coolp:

Sleeples? 05:59!! :shock:

:zwinker: Ich hau mich weg. :zwinker:
Did you test it? With valid blob's?

What do you think about this?:

function TZRowAccessor.GetBlobObject(Buffer: PZRowBuffer;
ColumnIndex: Integer): IZBlob;
var
BlobPtr: PPointer;
NullPtr: {$IFDEF WIN64}PBoolean{$ELSE}PByte{$ENDIF};
begin
BlobPtr := PPointer(@Buffer.Columns[FColumnOffsets[ColumnIndex - 1] + 1]);
NullPtr := {$IFDEF WIN64}PBoolean{$ELSE}PByte{$ENDIF}(@Buffer.Columns[FColumnOffsets[ColumnIndex - 1]]);

if NullPtr^ = 0 then
Result := IZBlob(BlobPtr^)
else
Result := nil;
end;

I know papelhiego uses PostgreSQL64 and MySQL64 under linux without trouble. And we've got only a win64 problem...

Patch done Rev 1156;

Posted: 15.04.2012, 12:55
by ism
I test it with mysql 5.5 Linux 64

and text blobs

Code: Select all

Sleeples? 05:59!!
weekend in Ukraine :)

Posted: 15.04.2012, 13:36
by EgonHugeist
Ok i've uploded a smaller fix. Can you test this too?

I don't want to say you patch is wrong, but for me and my blind eyes the ifdefs become to much here.

:cheers:

Posted: 15.04.2012, 15:17
by ism
rev 1156 in Linux 64 all ok

Posted: 15.04.2012, 15:21
by EgonHugeist
:coolp: A very big THANK YOU for testing, ISM!! :thanks:

Case closed! :up:

btw. your pic is great!

Posted: 15.04.2012, 18:04
by elidorio2
Hello EgonHugeist,

The only thing missing update README for Lazarus to 09.30.4.
Another thing: It was handled the error, if the person does not select ClientCodePage, it generates a message?

Ps: I only missed agradescer for raising the issue.

Posted: 15.04.2012, 19:43
by EgonHugeist
Bug found, thanks. elidorio2.

Patch done Rev. 1157