Bugs item #2075197, was opened at 2008-08-26 08:58
Message generated for change (Comment added) made by mlkersten
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2075197&group_id=56967

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: SQL/Core
Group: MonetDB5 5.6
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Qian Qiao (drizzlerain)
Assigned to: Niels Nes (nielsnes)
Summary: the abs value of a negative num not equals with it's positiv

Initial Comment:
OS:RedHat Linux AS 4
GCC: 3.4.6

1.setup:
CREATE TABLE A (
  GRADE decimal(4,0) DEFAULT NULL
);

INSERT INTO A VALUES (10);
INSERT INTO A VALUES (12);

2.execute:
UPDATE A
     SET GRADE = -GRADE;

3.result:
select * from A;
+-------+
| grade |
+=======+
| 2     |
| -9265 |
+-------+

4.question:
After the positive number changes a negative number, its absolute value and the 
original absolute value are different.

----------------------------------------------------------------------

>Comment By: Martin Kersten (mlkersten)
Date: 2008-08-31 10:33

Message:
Logged In: YES 
user_id=490798
Originator: NO

The accumulator optimizer was over ambitious.
The code based should be extended to allow for
accums over unaries and math functions as well.


----------------------------------------------------------------------

Comment By: Niels Nes (nielsnes)
Date: 2008-08-26 15:48

Message:
Logged In: YES 
user_id=43556
Originator: NO

added test update_set_negative.SF-2075197.sql 
Seems a bug in the update code.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2075197&group_id=56967

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs

Reply via email to