No it's not my own unit, it can still be found on the internet and is similar to mysql4.pp coming with Lazarus.
I have used it without problems for around 10 years.
I believe that I now have found the problem. The new libmysqlclient for AMD-64 seems to have a bug in mysql_fetch_lengths which returns erroneous values.
The code below doesn't work:
.............
row:=prow(mysql_fetch_row(fmysqlresult));
while row<>nil do
begin
fieldlengths:=plengths(mysql_fetch_lengths(fmysqlresult));
for x:=0 to fieldcount-1 do
begin
l:=fieldlengths^[x];
pf:=row^ [x];
s:=copy(pf,1,l);
result[x,y]:=s;
end;
inc(y);
row:=prow(mysql_fetch_row(fmysqlresult));
end;
But this seems to correct the problem:
row:=prow(mysql_fetch_row(fmysqlresult));
while row<>nil do
begin
for x:=0 to fieldcount-1 do
begin
pf:=row^[x];
if pf<>nil then
result[x,y]:=pf
else
result[x,y]:='';
end;
inc(y);
row:=prow(mysql_fetch_row(fmysqlresult));
end;
H