Subject | Re: [firebird-support] FB 1.5 closes connection if 'when-case' does not have cast |
---|---|
Author | Ivan Prenosil |
Post date | 2004-05-24T13:17:08Z |
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>
----------
----------
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@...>
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
>
>
>
>
>
>