Subject | RE: [IBO] Re: IBO 4.9.14 Build 14 with stack overflow error on FB1.5 |
---|---|
Author | Support List |
Post date | 2011-08-02T19:36:27Z |
I confirm that this problem does exist.
I am working on a solution.
Sorry for the delay.
Jason
I am working on a solution.
Sorry for the delay.
Jason
> -----Original Message-----
> From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] On
> Behalf Of bausufm
> Sent: Wednesday, July 20, 2011 2:58 AM
> To: IBObjects@yahoogroups.com
> Subject: [IBO] Re: IBO 4.9.14 Build 14 with stack overflow error on FB1.5
>
> Hi Jason,
> thank you for the quick fix of the sql-statement.
>
> But i still get an stack overflow error when a statement with a parameter
> in the where clause is prepared. Other statements are ok.
> The stack overflow occurs because of an endless recursive loop:
> ...
> TIB_Columns.GetCharId
> TIB_Columns.GetCharSetFromSchema
> TIB_Columns.GetNativeCharID
> TIB_Columns.GetCharId
> TIB_Columns.GetCharSetFromSchema
> TIB_Columns.GetNativeCharID
> TIB_Columns.GetCharId
> TIB_Columns.GetTextInfo
>
> I'm using Fb 1.5.6, IBO 4.9.14 latest Build and Delphi 7.
> You can use any FB1.5 Database for reproducing the error.
>
> Here is an example:
> procedure TForm1.Button1Click(Sender: TObject);
> var
> qr: TIB_cursor;
> cn : TIBODatabase;
> begin
> try
> cn := TIBODatabase.create( self);
> cn.Params.Add('USER NAME=SYSDBA');
> cn.Params.Add('PROTOCOL=TCP/IP');
> cn.server := 'localhost';
> cn.path := 'c:\test.fdb'; // FB1.5 Dialect 1, Charset=None
> cn.password := 'masterkey';
> cn.connected := true;
> qr := TIB_cursor.create( self);
> qr.IB_Connection := cn;
> qr.sql.text := 'select * from rdb$relations where rdb$relation_name =
> ''TEST''';
> qr.prepare; // OK
> qr.sql.text := 'select * from rdb$relations where rdb$relation_name =
> :name';
> qr.prepare; // <--- access violation or stack overflow
> qr.free;
> except
> on e:Exception do
> begin
> Showmessage(e.message);
> end;
> end;
> end;
>
>
> Regards
> Falko Meinke
>
> --- In IBObjects@yahoogroups.com, "Support List" <supportlist@...> wrote:
> >
> > > Why is there any DISTINCT at all in this statement? When using UNION,
> it
> > > is implicitly distinct, if you don't want things to be distinct, you
> have
> > > to use UNION ALL.
> > >
> > > If you remove all three DISTINCTs, the result should be the same, the
> only
> > > exception being that it also works on Firebird 1.5.
> > >
> > > Though that was from my SQL perspective, I've no clue about the IBO
> > > perspective (so you might still get an overflow).
> >
> > I didn't realize earlier versions of Firebird would break as a result of
> > that SQL statement. I have fixed this immediately and it will be in the
> next
> > release.
> >
> > I cannot say why there was a stack overflow when it was modified as the
> > results of the query should indeed be the same as Set points out.
> >
> > I already made the change and I get no stack overflow condition.
> >
> > Regards,
> > Jason LeRoy Wharton
> > www.ibobjects.com