From 9002a8d42dcd75ee82e986f7dda7f77060ac837b Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Wed, 18 Nov 2009 21:30:26 +0000 Subject: [PATCH] Text and Blob data types share the same FIELD_TYPE constants. Makes it necessary to adjust type detection logic. --- source/mysql_connection.pas | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/mysql_connection.pas b/source/mysql_connection.pas index e7a113f8..08090403 100644 --- a/source/mysql_connection.pas +++ b/source/mysql_connection.pas @@ -658,6 +658,9 @@ begin FDatatypes[i] := Datatypes[Low(Datatypes)]; for j:=Low(Datatypes) to High(Datatypes) do begin if Field._type = Datatypes[j].NativeType then begin + // Text and Blob types share the same constants (see FIELD_TYPEs in mysql_api) + if ((Field.flags and BINARY_FLAG) = BINARY_FLAG) and (Datatypes[j].Category <> dtcBinary) then + continue; FDatatypes[i] := Datatypes[j]; break; end;