PR# 2965 Numeric parameters whose values are zero are substituted as NULL, which is wrong !

Problem Report Summary
Submitter: pgcrism
Category: EiffelStore
Priority: Medium
Date: 2001/10/26
Class: Bug
Severity: Serious
Number: 2965
Release: 5.0.34
Confidential: No
Status: Analyzed
Responsible: manus_eiffel
Environment: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0)
Synopsis: Numeric parameters whose values are zero are substituted as NULL, which is wrong !

Description
The following query

sql : STRING is "INSERT INTO TOTONUM VALUES (:an_int, :a_real, :a_double)"

used this way
<code>
 my_int : INTEGER
 my_real : REAL
 my_double : DOUBLE

...
 query : DB_CHANGE

...
 my_int := 0
 my_real := 0.0
 my_double := 0.0

 query.set_map_name (my_int, "an_int")
 query.set_map_name (my_real, "a_real")
 query.set_map_name (my_double, "a_double")
...
 query.modify (sql)
</code>

issues the following SQL :

  INSERT INTO TOTONUM VALUES (NULL, NULL, NULL)

instead of

  INSERT INTO TOTONUM VALUES (0, 0.0, 0.0)

*** THIS IS WRONG : database NULL values are not equal to ZERO ***
An RDBMS NULL value means "do not know".  It's like a Void reference.
Zero means "we know the value and it's zero".

This is not the same.

Where to change ?
 SQL_SCAN.get_value

Please, revert to the 4.5 version of SQL_SCAN.get_value; the 5.0 is completely wrong.

Thank you.

Paul-G. Crismer
To Reproduce
see above
Problem Report Interactions
From:pgcrism    Date:2001/10/26    Download   
From: CRISMER Paul-Georges <paul-georges.crismer@groupes.be>
To: bugs@berkeley.eiffel.com
Cc: jacques@abstraction.ch
Subject: RE: EiffelStore/2965
Date: Fri, 19 Oct 2001 09:48:40 +0200

 Are you still alive ?
 
 > -----Original Message-----
 > From:	bugs@berkeley.eiffel.com [SMTP:bugs@berkeley.eiffel.com]
 > Sent:	mardi 9 octobre 2001 15:57
 > To:	paul-georges.crismer@groupes.be
 > Subject:	EiffelStore/2965
 > 
 > Thank you very much for your problem report.
 > It has the internal identification `EiffelStore/2965'.
 > 
 > If you want to add more information to your report or
 > reply to our answer, please reply to this message
 > without modifying the subject header.
 > 
 > The individual assigned to look at your
 > report is: EiffelStore_team. 
 > 
 > >Category:       EiffelStore
 > >Responsible:    EiffelStore_team
 > >Synopsis:       Numeric parameters whose values are zero are substituted
 > as NULL, which is wrong !
 > >Arrival-Date:   Tue Oct  9 06:57:00 PDT 2001
 > >Severity:       critical
 > >Priorit
....
Output truncated, Click download to get the full message