* Patch from Ladislav Karrach to use a field's type-affinity to determine the fieldtype. (Fixes aggregate test)

git-svn-id: trunk@16857 -
This commit is contained in:
joost 2011-01-30 21:05:56 +00:00
parent 9604ae2908
commit d6adcdfe81

View File

@ -364,9 +364,16 @@ begin
ft1:=FieldMap[fi].t; ft1:=FieldMap[fi].t;
break; break;
end; end;
// Empty field types are allowed and used in calculated columns (aggregates) // In case of an empty fieldtype (FD='', which is allowed and used in calculated
// and by pragma-statements // columns (aggregates) and by pragma-statements) or an unknown fieldtype,
if FD='' then ft1 := ftString; // use the field's affinity:
if ft1=ftUnknown then
case TStorageType(sqlite3_column_type(st,i)) of
stInteger: ft1:=ftLargeInt;
stFloat: ft1:=ftFloat;
stBlob: ft1:=ftBlob;
else ft1:=ftString;
end;
// handle some specials. // handle some specials.
size1:=0; size1:=0;
case ft1 of case ft1 of