[fcl-db] Fix FieldTypetoVariantMap for ftLargeint
Original Reporter info from Mantis: kluug.net @onpok
-
Reporter name: Ondrej Pokorny
Original Reporter info from Mantis: kluug.net @onpok
- Reporter name: Ondrej Pokorny
Description:
FieldTypetoVariantMap lists varError for ftLargeInt even if there is the varint64 variant type. As a result setting
TField.DataType := ftLargeint
clears the value!
Steps to reproduce:
program DBLargeInt;
uses
SysUtils, DB, SQLDB;
var
Q: TSQLQuery;
I: Integer;
begin
Q := TSQLQuery.Create(nil);
Q.SQL.Text := 'SELECT :PARAM';
Q.Params[0].AsInteger := High(Integer);
I := Q.Params[0].AsInteger;
WriteLn(I);
if Q.Params[0].DataType <> ftInteger then // this is OK -> just check that type is ftInteger
Halt(2);
Q.Params[0].DataType := ftLargeint; // the value is deleted !!!
WriteLn(Q.Params[0].AsInteger);
if I<>Q.Params[0].AsInteger then
Halt(1);
Q.Free;
end.
Additional information:
Patch attached.
Mantis conversion info:
- Mantis ID: 33711
- Version: 3.1.1
- Fixed in version: 3.1.1
- Fixed in revision: 38950 (#9183aad3)
- Target version: 3.2.0