Update of /cvsroot/monetdb/sql/src/test/BugTracker-2009/Tests
In directory
23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv5224/src/test/BugTracker-2009/Tests
Added Files:
distinct.SF-2546483.sql
Log Message:
propagated changes of Sunday Feb 01 2009
from the Feb2009 branch to the development trunk
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2009/02/01 - nielsnes:
src/test/BugTracker-2009/Tests/distinct.SF-2546483.sql,1.1.2.1
add test for distinct bugs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--- NEW FILE: distinct.SF-2546483.sql ---
CREATE TABLE a(n integer, x varchar(255));
INSERT INTO a VALUES(1, 'ONE');
INSERT INTO a VALUES(2, 'TWO');
INSERT INTO a VALUES(2, 'TWO');
INSERT INTO a VALUES(3, 'THREE');
CREATE VIEW va AS
SELECT DISTINCT n, x
FROM a;
CREATE TABLE b(n integer, x varchar(255));
INSERT INTO b VALUES(1, 'ONE');
INSERT INTO b VALUES(2, 'TWO');
INSERT INTO b VALUES(3, 'THREE');
CREATE VIEW v AS
SELECT va.x, b.x
FROM va, b
WHERE va.n = b.n;
select * from va;
select * from v;
DROP VIEW v;
DROP VIEW va;
DROP TABLE b;
DROP TABLE a;
CREATE TABLE a(n integer, x varchar(255));
INSERT INTO a VALUES(1, 'ONE');
INSERT INTO a VALUES(2, 'TWO');
INSERT INTO a VALUES(2, 'TWO');
INSERT INTO a VALUES(3, 'THREE');
CREATE TABLE b(n integer, x varchar(255));
INSERT INTO b SELECT DISTINCT n,x from a;
CREATE TABLE c(n serial, x varchar(255));
INSERT INTO c (x) SELECT DISTINCT x from a;
SELECT * FROM a; -- the initial duplicates are here
SELECT * FROM b; -- here they get removed, correct
SELECT * FROM c; -- here they don't get removed, wrong
DROP TABLE a;
DROP TABLE b;
DROP TABLE c;
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins