Subject Re: [firebird-support] FB 1.5 closes connection if 'when-case' does not have cast
Author Helen Borrie
At 11:38 AM 24/05/2004 +0000, you wrote:

>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.

If anything, it should fail on the CREATE VIEW statement. Can you please
post the full DDL for the view declaration?

/heLen