Subject Re: FB 1.5 closes connection if 'when-case' does not have cast
Author kokok_kokok
Yes, you are right. I need to do some previous steps like print out
reports or execute sql sentences. It does not happen always.

The thing is that the IBConsole can break the remote connection and
then all other programs connected to the Firebird server lose the
connection, including local and remote clients.

The problem is difficult to reproduce in another computer because
only happens if I previously use my program to print out reports or
execute sql sentences.

The strange thing for me, is that then using IBConsole and executing
only "select * from view1", the "connection lost" message appears. On
the other hand, I can execute any sql sentence for other views and
always works ok. Or I cast the "case" field, then the "view1" also
works ok.

I have tested this problem in several computers.







--- In firebird-support@yahoogroups.com, "Ivan Prenosil"
<Ivan.Prenosil@s...> wrote:
> Can't reproduce. This is screenshot from ISQL session:
>
> ----------
> SQL> create table tab ( field1 smallint );
> SQL> insert into tab values (123);
> SQL> insert into tab values (null);
> SQL> commit;
> SQL> select field1, case when field1 is null then 0 else 1 end from
tab;
>
> FIELD1 CASE
> ======= ============
> 123 1
> <null> 0
>
> SQL> create view v (a,b) as select field1, case when field1 is null
then 0 else
> 1 end from tab;
> SQL> select * from v;
>
> A B
> ======= ============
> 123 1
> <null> 0
>
> SQL>
> ----------
>
>
> ----- Original Message -----
> From: "kokok_kokok" <kokok_kokok@y...>
> To: <firebird-support@yahoogroups.com>
> Sent: Monday, May 24, 2004 1:38 PM
> Subject: [firebird-support] FB 1.5 closes connection if 'when-case'
does not have cast
>
>
> >
> > FB 1.5 server closes the connection to the database when I
> > execute "select * from view1" from my program or from IBConsole.
> >
> > This view has several fields, the problematic field is:
> >
> > "case when field1 is null then 0 else 1 end"
> >
> >
> > "field1" is a smallint field from a table. If I have this
sentence in
> > the view script, FB crashes generating a "Connection lost" error:
> >
> > "fbserver.exe: terminated abnormally (4294967295)"
> >
> >
> > I can fix this problem only casting the above sentence in the
view:
> >
> > "case when field1 is null then cast(0 as smallint) else cast(1
as
> > smallint) end"
> >
> > Now, "select * from view1" works ok and the connection is not
lost.
> >
> >
> > My question is why this happens?
> >
> > I have tried this with several computers, remote and local
> > connection, I do not use UDF functions, IBOConsole and other
> > clients,... but the problem appears in all cases.
> >
> >
> >
> > Any help will be welcome
> >
> > Thanks in advanced
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >