mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 08:29:28 +02:00
* Fix for binary data in Mysql BLOB-fields
git-svn-id: trunk@6555 -
This commit is contained in:
parent
d7b5cd4f14
commit
ef45e75993
@ -544,6 +544,7 @@ var
|
||||
row : MYSQL_ROW;
|
||||
C : TCursorName;
|
||||
li : longint;
|
||||
Lengths : PDWord;
|
||||
begin
|
||||
C:=Cursor as TCursorName;
|
||||
if C.Row=nil then
|
||||
@ -552,7 +553,8 @@ begin
|
||||
|
||||
inc(Row,c.MapDSRowToMSQLRow[FieldDef.FieldNo-1]);
|
||||
|
||||
li := strlen(pchar(row^));
|
||||
Lengths := mysql_fetch_lengths(c.FRes);
|
||||
li := Lengths[c.MapDSRowToMSQLRow[FieldDef.FieldNo-1]];
|
||||
|
||||
ReAllocMem(ABlobBuf^.BlobBuffer^.Buffer,li);
|
||||
Move(pchar(row^)^, ABlobBuf^.BlobBuffer^.Buffer^, li);
|
||||
|
Loading…
Reference in New Issue
Block a user