Menu

#89 Filter on LargeInt Int64 values

Win32/Linux
closed-fixed
nobody
None
5
2017-08-16
2017-07-27
No

When trying to filter on a column with a largeint, it crashes in dbf_prscore.TCustomExpressionParser.CreateConstant at line 1306,
It tries to create a TIntegerConstant but it should create a TLargeIntConstant.
There might be other areas to consider.

Discussion

  • Paul Baker

    Paul Baker - 2017-08-16

    Here is an example that reproduces this for a table, test.dbf, that has a numeric field named "I".

    program bug89;
    
    uses
      dbf;
    
    var
      ADbf: TDbf;
    begin
      ADbf := TDbf.Create(nil);
      try
        ADbf.TableName := 'test.dbf';
        ADbf.Open;
        ADbf.Filter := 'I=2147483648';
        ADbf.Filtered := True;
      finally
        ADbf.Free;
      end;
    end.
    

    I fixed this in revision 644.

    I did not find any other improper uses of StrToInt().

    Is there anything else I should look at?

     
  • Paul Baker

    Paul Baker - 2017-08-16
    • status: open --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB