TSQLQuery.ServerFilter exception on filter change
Original Reporter info from Mantis: Amb1
-
Reporter name: Andrei
Original Reporter info from Mantis: Amb1
- Reporter name: Andrei
Description:
TSQLQuery.ServerFilter fails when it is is changed after it was set to a default filters that would return around 250 rows or more. If the initial filter doesn't return records, the filter change is not throwing this exception.
The exception is the following:
An unhandled exception occurred at $00000000004B4F0C:
EAccessViolation: Access violation
$00000000004B4F0C
This issue doesn't exist in Free Pascal 3.0.4; it is present in trunk.
Steps to reproduce:
qQuery.SQL.Text := ' select a.name from test_table a where 1=1 ';
qQuery.ServerFiltered := True;
qQuery.ServerFilter := ' name=''test value'' ';
qQuery.Open;
WriteLn(qQuery.FieldByName('name').AsString);
qQuery.ServerFilter := ' name=''another value'' '; // <-------- here it will fail
WriteLn(qQuery.FieldByName('name').AsString);
I attached a project with a small sqlite3 test database.
Mantis conversion info:
- Mantis ID: 35887
- OS: Debian
- OS Build: 10, kernel 4.19
- Build: r42484
- Platform: Linux
- Version: 3.2.0
- Fixed in version: 3.3.1
- Fixed in revision: 42933 (#aee20cd5)
- Target version: 3.2.0