diff --git a/source/dbconnection.pas b/source/dbconnection.pas index bacb8834..bc04e265 100644 --- a/source/dbconnection.pas +++ b/source/dbconnection.pas @@ -7887,13 +7887,13 @@ begin IsBinary := Field.charsetnr = COLLATION_BINARY else IsBinary := (Field.flags and BINARY_FLAG) = BINARY_FLAG; - if IsBinary and (FConnection.Datatypes[j].Index in [dbdtChar..dbdtLongtext]) then + if IsBinary and (FConnection.Datatypes[j].Category = dtcText) then continue; FColumnTypes[i] := FConnection.Datatypes[j]; - break; + Break; end; end; - FConnection.Log(lcDebug, 'Detected column type for '+FColumnNames[i]+': '+FColumnTypes[i].Name); + FConnection.Log(lcDebug, 'Detected column type for '+FColumnNames[i]+' ('+IntToStr(Field._type)+'): '+FColumnTypes[i].Name); end; FRecNo := -1; First; diff --git a/source/dbstructures.mysql.pas b/source/dbstructures.mysql.pas index be226bd8..31d61b24 100644 --- a/source/dbstructures.mysql.pas +++ b/source/dbstructures.mysql.pas @@ -370,7 +370,7 @@ var // MySQL Data Type List and Properties - MySQLDatatypes: array [0..37] of TDBDatatype = + MySQLDatatypes: array [0..38] of TDBDatatype = ( ( Index: dbdtUnknown; @@ -734,6 +734,21 @@ var LoadPart: False; Category: dtcText; ), + ( + Index: dbdtUniqueidentifier; + NativeType: 254; + Name: 'UUID'; + Description: 'UUID' + sLineBreak + + 'The UUID data type is intended for the storage of 128-bit UUID (Universally ' + + 'Unique Identifier) data. See the UUID function page for more details on UUIDs ' + + 'themselves.'; + HasLength: False; + RequiresLength: False; + HasBinary: False; + HasDefault: False; + LoadPart: False; + Category: dtcText; + ), ( Index: dbdtBinary; NativeType: 254;