Login Register Actian.com  

Actian Community Forum



Reply
 
LinkBack Thread Tools Display Modes
Old 2012-02-02   #1 (permalink)
Ingres Community
 
Join Date: Sep 2011
Posts: 25
Default question about IFNULL

We're experiencing random crashes of our application, we're currently suspicious of the IFNULL function.

Old code which used to be:

IF myclass.type_i2 is null OR
myclass.type_i2 = 0 THEN

has been replaced with

IF ifnull(myclass.type_i2,0) = 0 THEN

In this particular case type_i2 is an attribute on a class (obviously), and is smallint and nullable default value is "SYSTEM".

The new IFNULL code, seems to crash the app, replacing the code to how it was restores stability.

Has anything changed with respect to the IFNULL function?

And just for completion exactly what is the default value for "SYSTEM" for a nullable attribute these days?

OR 5.1.0 (int.w32/00)
BUILDNO=5044
PATCHNO=14141

Last edited by petew1970; 2012-02-02 at 07:12 AM.
petew1970 is offline   Reply With Quote
Old 2012-02-02   #2 (permalink)
Ingres Corp
 
Join Date: Mar 2007
Location: On the OpenROAD
Posts: 1,306
Default

The "SYSTEM" default value for any number datataype (integer, smallint, float, decimal) is 0 (zero),
no matter if nullable or not.
You should report the problem in a ServiceDesk issue and provide the w4gl.log for the process that crashed.
Bodo is offline   Reply With Quote
Old 2012-02-02   #3 (permalink)
Ingres Community
 
Join Date: Sep 2011
Posts: 25
Default

issue 154226 raised.
petew1970 is offline   Reply With Quote

Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


© 2011 Actian Corporation. All Rights Reserved