On Fedora 10_64 with fpc-2.2.2 and lazarus-0.9.26 works fine.
Appears on 32 bit version of Fedora(same config as above) when TSQLQuery.SQL is modified.
TSQLQuery is closed and SQL is empty.
TSQLQuery.SQL.Add('select max(field) from table');
TSQLQuery.Open;
TSQLQuery.Close;
TSQLQuery.SQL.Clear;
TSQLQuery.SQL.Add('select field from table');
TSQLQuery.Open; -----> ORA-01062: unable to allocate memory for define buffer