Bugs item #2103348, was opened at 2008-09-10 10:39
Message generated for change (Comment added) made by romulog
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2103348&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: SQL CVS Head
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Romulo Goncalves (romulog)
Assigned to: Niels Nes (nielsnes)
Summary: unique problem with nulls

Initial Comment:
NULL should not be seen as a value, so UNIQUE constraint check should not fail 
over several NULL's in the same column.

The sql examples are:
create table crash_q (q integer,unique (q));
insert into crash_q (q) values (NULL);
insert into crash_q (q) values (NULL);
insert into crash_q (q) values (1);


QUERY = insert into crash_q (q) values (NULL);
ERROR = !SQLException:assert:INSERT INTO: UNIQUE constraint  
'crash_q.crash_q_q_unique' violated


create table crash_q (q integer, x integer,unique (q)) ;
insert into crash_q(x) values(1);
insert into crash_q(x) values(2);

QUERY = insert into crash_q(x) values(2);
ERROR = !SQLException:assert:INSERT INTO: UNIQUE constraint  
'crash_q.crash_q_q_unique' violated 

Romulo

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

>Comment By: Romulo Goncalves (romulog)
Date: 2008-11-14 14:55

Message:
The fix for this bug were the check ins:

[Monetdb-sql-checkins] sql/src/server sql_schema.mx, Nov2008,
1.152,  1.152.2.1
[Monetdb-sql-checkins] sql/src/server sql_updates.mx, Nov2008,
1.153,  1.153.2.1
[Monetdb-sql-checkins] sql/src/storage store.mx, Nov2008, 1.22, 1.22.2.1


No test need to be added because it is covered by the tests for the
following bugs:
[ 2075241 ] When the NULL is in a column,it shouldn't add primary key
http://sourceforge.net/tracker/index.php?func=detail&aid=2075241&group_id=56967&atid=482468

[ 2075180 ] the unique column can't insert more than 1 row with null
http://sourceforge.net/tracker/index.php?func=detail&aid=2075180&group_id=56967&atid=482468

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

Comment By: Romulo Goncalves (romulog)
Date: 2008-09-10 11:48

Message:
Yes, all the problems are related and they will be fixed. 
The NULLS were not handled properly in the SQL constraints check....

Romulo

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

Comment By: Stefan Manegold (stmane)
Date: 2008-09-10 11:17

Message:
See also

[ 2075241 ] When the NULL is in a column,it shouldn't add primary key
http://sourceforge.net/tracker/index.php?func=detail&aid=2075241&group_id=56967&atid=482468

[ 2075180 ] the unique column can't insert more than 1 row with null
http://sourceforge.net/tracker/index.php?func=detail&aid=2075180&group_id=56967&atid=482468

[ 1960373 ] kunion and nil
http://sourceforge.net/tracker/index.php?func=detail&aid=1960373&group_id=56967&atid=482468


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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2103348&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