Subject FB 1.5 closes connection if 'when-case' does not have cast
Author kokok_kokok
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