Update of /cvsroot/monetdb/sql/src/test/BugTracker-2009/Tests
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv31703

Modified Files:
      Tag: Feb2009
        All 
Added Files:
      Tag: Feb2009
        distinct.SF-2546483.sql distinct.SF-2546483.stable.err 
        distinct.SF-2546483.stable.out 
Log Message:
add test for distinct bugs 


--- NEW FILE: distinct.SF-2546483.stable.out ---
stdout of test 'distinct.SF-2546483` in directory 'src/test/BugTracker-2009` 
itself:


# 10:45:05 >  
# 10:45:05 >   mserver5 
"--config=/ufs/niels/scratch/rc/Linux-x86_64/etc/monetdb5.conf" --debug=10 
--set gdk_nr_threads=0 --set 
"monet_mod_path=/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5:/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5/lib:/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5/bin"
 --set "gdk_dbfarm=/ufs/niels/scratch/rc/Linux-x86_64/var/MonetDB5/dbfarm" 
--set "sql_logdir=/ufs/niels/scratch/rc/Linux-x86_64/var/MonetDB5/sql_logs"   
--set mapi_open=true --set xrpc_open=true --set mapi_port=39278 --set 
xrpc_port=41678 --set 
xrpc_docroot=/net/alf.ins.cwi.nl/export/scratch1/niels/rc/sql --set 
monet_prompt= --trace  "--dbname=mTests_src_test_BugTracker-2009" --set 
mal_listing=0 "--dbinit= include sql;" ; echo ; echo Over..
# 10:45:05 >  

# MonetDB server v5.10.0, based on kernel v1.28.0
# Serving database 'mTests_src_test_BugTracker-2009', using 4 threads
# Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically linked
# Copyright (c) 1993-July 2008 CWI.
# Copyright (c) August 2008- MonetDB B.V., all rights reserved
# Visit http://monetdb.cwi.nl/ for further information
# Listening for connection requests on mapi:monetdb://alf.ins.cwi.nl:39278/
# MonetDB/SQL module v2.28.0 loaded

Ready.
#function user.main():void;
#    clients.quit();
#end main;

Over..

# 10:45:05 >  
# 10:45:05 >  mclient -lsql -umonetdb -Pmonetdb --host=alf --port=39278 
# 10:45:05 >  

[ 1     ]
[ 1     ]
[ 1     ]
[ 1     ]
[ 1     ]
[ 1     ]
[ 1     ]
% sys.va,       sys.va # table_name
% n,    x # name
% int,  varchar # type
% 1,    5 # length
[ 1,    "ONE"   ]
[ 2,    "TWO"   ]
[ 3,    "THREE" ]
% sys.v,        sys.v # table_name
% x,    x # name
% varchar,      varchar # type
% 5,    5 # length
[ "ONE",        "ONE"   ]
[ "TWO",        "TWO"   ]
[ "THREE",      "THREE" ]
[ 1     ]
[ 1     ]
[ 1     ]
[ 1     ]
[ 3     ]
[ 3     ]
% sys.a,        sys.a # table_name
% n,    x # name
% int,  varchar # type
% 1,    5 # length
[ 1,    "ONE"   ]
[ 2,    "TWO"   ]
[ 2,    "TWO"   ]
[ 3,    "THREE" ]
% sys.b,        sys.b # table_name
% n,    x # name
% int,  varchar # type
% 1,    5 # length
[ 1,    "ONE"   ]
[ 2,    "TWO"   ]
[ 3,    "THREE" ]
% sys.c,        sys.c # table_name
% n,    x # name
% int,  varchar # type
% 1,    5 # length
[ 1,    "ONE"   ]
[ 2,    "TWO"   ]
[ 3,    "THREE" ]

# 10:45:05 >  
# 10:45:05 >  Done.
# 10:45:05 >  


U All
Index: All
===================================================================
RCS file: /cvsroot/monetdb/sql/src/test/BugTracker-2009/Tests/All,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -d -r1.2 -r1.2.2.1
--- All 27 Jan 2009 09:48:15 -0000      1.2
+++ All 1 Feb 2009 09:46:08 -0000       1.2.2.1
@@ -1,3 +1,4 @@
 binop.SF.2499537
 incomplete.SF.2536893
 subquery_returns_table_crash.SF-2513620
+distinct.SF-2546483

--- NEW FILE: distinct.SF-2546483.stable.err ---
stderr of test 'distinct.SF-2546483` in directory 'src/test/BugTracker-2009` 
itself:


# 10:45:05 >  
# 10:45:05 >   mserver5 
"--config=/ufs/niels/scratch/rc/Linux-x86_64/etc/monetdb5.conf" --debug=10 
--set gdk_nr_threads=0 --set 
"monet_mod_path=/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5:/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5/lib:/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5/bin"
 --set "gdk_dbfarm=/ufs/niels/scratch/rc/Linux-x86_64/var/MonetDB5/dbfarm" 
--set "sql_logdir=/ufs/niels/scratch/rc/Linux-x86_64/var/MonetDB5/sql_logs"   
--set mapi_open=true --set xrpc_open=true --set mapi_port=39278 --set 
xrpc_port=41678 --set 
xrpc_docroot=/net/alf.ins.cwi.nl/export/scratch1/niels/rc/sql --set 
monet_prompt= --trace  "--dbname=mTests_src_test_BugTracker-2009" --set 
mal_listing=0 "--dbinit= include sql;" ; echo ; echo Over..
# 10:45:05 >  

# builtin opt   gdk_arch = 64bitx86_64-unknown-linux-gnu
# builtin opt   gdk_version = 1.28.0
# builtin opt   monet_pid = 1902
# builtin opt   prefix = /ufs/niels/scratch/rc/Linux-x86_64
# builtin opt   exec_prefix = ${prefix}
# builtin opt   gdk_dbname = tst
# builtin opt   gdk_dbfarm = ${prefix}/var/MonetDB
# builtin opt   gdk_debug = 8
# builtin opt   gdk_mem_bigsize = 262144
# builtin opt   gdk_alloc_map = yes
# builtin opt   gdk_mem_pagebits = 14
# builtin opt   gdk_vmtrim = yes
# builtin opt   monet_admin = adm
# builtin opt   monet_prompt = >
# builtin opt   monet_welcome = yes
# builtin opt   monet_mod_path = 
${exec_prefix}/lib/MonetDB:${exec_prefix}/lib/bin
# builtin opt   monet_daemon = yes
# builtin opt   host = localhost
# builtin opt   mapi_port = 50000
# builtin opt   mapi_noheaders = no
# builtin opt   mapi_debug = 0
# builtin opt   mapi_clients = 2
# builtin opt   sql_debug = 0
# builtin opt   sql_logdir = ${prefix}/var/MonetDB
# builtin opt   xquery_logdir = ${prefix}/var/MonetDB
# builtin opt   standoff_ns = http://monetdb.cwi.nl/standoff
# builtin opt   standoff_start = start
# builtin opt   standoff_end = end
# config opt    prefix = /ufs/niels/scratch/rc/Linux-x86_64
# config opt    config = ${prefix}/etc/monetdb5.conf
# config opt    prefix = /ufs/niels/scratch/rc/Linux-x86_64
# config opt    exec_prefix = ${prefix}
# config opt    gdk_dbfarm = ${prefix}/var/MonetDB5/dbfarm
# config opt    gdk_dbname = demo
# config opt    gdk_alloc_map = no
# config opt    gdk_embedded = no
# config opt    gdk_debug = 0
# config opt    monet_mod_path = 
${exec_prefix}/lib/MonetDB5:${exec_prefix}/lib/MonetDB5/lib:${exec_prefix}/lib/MonetDB5/bin
# config opt    monet_daemon = no
# config opt    monet_welcome = yes
# config opt    mero_msglog = ${prefix}/var/log/merovingian.log
# config opt    mero_errlog = ${prefix}/var/log/merovingian.log
# config opt    mero_timeinterval = 600
# config opt    mero_pidfile = ${prefix}/var/run/merovingian.pid
# config opt    mero_exittimeout = 7
# config opt    mero_doproxy = yes
# config opt    mero_discoveryttl = 600
# config opt    mal_init = ${exec_prefix}/lib/MonetDB5/mal_init.mal
# config opt    mal_listing = 2
# config opt    checkpoint_dir = ${prefix}/var/MonetDB5/chkpnt
# config opt    mapi_port = 50000
# config opt    mapi_open = false
# config opt    sql_logdir = ${prefix}/var/MonetDB5/sql_logs
# config opt    sql_init = ${exec_prefix}/lib/MonetDB5/sql_init.sql
# cmdline opt   config = /ufs/niels/scratch/rc/Linux-x86_64/etc/monetdb5.conf
# cmdline opt   gdk_nr_threads = 0
# cmdline opt   monet_mod_path = 
/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5:/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5/lib:/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5/bin
# cmdline opt   gdk_dbfarm = 
/ufs/niels/scratch/rc/Linux-x86_64/var/MonetDB5/dbfarm
# cmdline opt   sql_logdir = 
/ufs/niels/scratch/rc/Linux-x86_64/var/MonetDB5/sql_logs
# cmdline opt   mapi_open = true
# cmdline opt   xrpc_open = true
# cmdline opt   mapi_port = 39278
# cmdline opt   xrpc_port = 41678
# cmdline opt   xrpc_docroot = /net/alf.ins.cwi.nl/export/scratch1/niels/rc/sql
# cmdline opt   monet_prompt = 
# cmdline opt   gdk_dbname = mTests_src_test_BugTracker-2009
# cmdline opt   mal_listing = 0
# cmdline opt   gdk_debug = 10
#warning: please don't forget to set your vault key!
#(see /ufs/niels/scratch/rc/Linux-x86_64/etc/monetdb5.conf)

# 10:45:05 >  
# 10:45:05 >  mclient -lsql -umonetdb -Pmonetdb --host=alf --port=39278 
# 10:45:05 >  


# 10:45:05 >  
# 10:45:05 >  Done.
# 10:45:05 >  


--- 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

Reply via email to