Changeset: 5c8c4dd5b5ce for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5c8c4dd5b5ce
Modified Files:
        
Branch: default
Log Message:

Merge with Oct2010 branch.


diffs (truncated from 352 to 300 lines):

diff -r 61ee7c6f6bd9 -r 5c8c4dd5b5ce sql/src/server/rel_bin.mx
--- a/sql/src/server/rel_bin.mx Tue Sep 07 16:54:11 2010 +0200
+++ b/sql/src/server/rel_bin.mx Tue Sep 07 17:43:33 2010 +0200
@@ -1914,26 +1914,6 @@
 }
 
 static stmt *
-find_projection_join( stmt *s )
-{
-       while(s && (s->type == st_alias || s->type == st_order || s->type == 
st_limit)) 
-               s = s->op1.stval;       
-       if (s && s->type == st_join)
-               return s;
-       return NULL;
-}
-
-static stmt *
-find_pivot( stmt *s)
-{
-       stmt *j = find_projection_join(s);
-
-       if (j)
-               return j->op1.stval;
-       return NULL;
-}
-
-static stmt *
 rel2bin_topn( mvc *sql, sql_rel *rel, list *refs)
 {
        list *newl;
diff -r 61ee7c6f6bd9 -r 5c8c4dd5b5ce sql/src/test/BugTracker-2010/Tests/All
--- a/sql/src/test/BugTracker-2010/Tests/All    Tue Sep 07 16:54:11 2010 +0200
+++ b/sql/src/test/BugTracker-2010/Tests/All    Tue Sep 07 17:43:33 2010 +0200
@@ -52,3 +52,5 @@
 in_query_missing_columns.Bug-2652
 sum_on_date_crash.Bug-2643
 crash_on_in_2.Bug-2604
+count-and-not.Bug-2663
+multiple-common-table-expressions.Bug-2664
diff -r 61ee7c6f6bd9 -r 5c8c4dd5b5ce 
sql/src/test/BugTracker-2010/Tests/count-and-not.Bug-2663.sql
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sql/src/test/BugTracker-2010/Tests/count-and-not.Bug-2663.sql     Tue Sep 
07 17:43:33 2010 +0200
@@ -0,0 +1,40 @@
+SELECT COUNT (*) > 0 as res
+  FROM (SELECT id, COUNT (*) AS cnt
+          FROM tables
+         GROUP BY id) as i
+ WHERE NOT (1 < i.cnt);
+
+-- 1 < i.cnt => i.cnt > 1
+SELECT COUNT (*) > 0 as res
+  FROM (SELECT id, COUNT (*) AS cnt
+          FROM tables
+         GROUP BY id) as i
+ WHERE NOT (i.cnt > 1);
+
+-- COUNT (*) => 1
+SELECT COUNT (*) > 0 as res
+  FROM (SELECT id, 1 AS cnt
+          FROM tables
+         GROUP BY id) as i
+ WHERE NOT (1 < i.cnt);
+
+-- NOT (1 < i.cnt) => 1 >= i.cnt
+SELECT COUNT (*) > 0 as res
+  FROM (SELECT id, COUNT (*) AS cnt
+          FROM tables
+         GROUP BY id) as i
+ WHERE 1 >= i.cnt;
+
+-- NOT (1 < i.cnt) => i.cnt <= 1
+SELECT COUNT (*) > 0 as res
+  FROM (SELECT id, COUNT (*) AS cnt
+          FROM tables
+         GROUP BY id) as i
+ WHERE i.cnt <= 1;
+
+-- inverted result
+SELECT COUNT (*) = 0 as res
+  FROM (SELECT id, COUNT (*) AS cnt
+          FROM tables
+         GROUP BY id) as i
+ WHERE 1 < i.cnt;
diff -r 61ee7c6f6bd9 -r 5c8c4dd5b5ce 
sql/src/test/BugTracker-2010/Tests/count-and-not.Bug-2663.stable.err
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sql/src/test/BugTracker-2010/Tests/count-and-not.Bug-2663.stable.err      
Tue Sep 07 17:43:33 2010 +0200
@@ -0,0 +1,74 @@
+stderr of test 'count-and-not.Bug-2663` in directory 
'src/test/BugTracker-2010` itself:
+
+
+# 17:35:13 >  
+# 17:35:13 >   mserver5 "--config=/ufs/sjoerd/Monet-stable/etc/monetdb5.conf" 
--debug=10 --set gdk_nr_threads=0 --set 
"monet_mod_path=/ufs/sjoerd/Monet-stable/lib64/MonetDB5:/ufs/sjoerd/Monet-stable/lib64/MonetDB5/lib:/ufs/sjoerd/Monet-stable/lib64/MonetDB5/bin"
 --set "gdk_dbfarm=/ufs/sjoerd/Monet-stable/var/MonetDB5/dbfarm"  --set 
mapi_open=true --set xrpc_open=true --set mapi_port=35150 --set xrpc_port=41611 
--set monet_prompt= --set mal_listing=2 --trace  
"--dbname=mTests_src_test_BugTracker-2010" --set mal_listing=0 ; echo ; echo 
Over..
+# 17:35:13 >  
+
+# builtin opt  gdk_arch = 64bitx86_64-unknown-linux-gnu
+# builtin opt  gdk_version = 1.38.4
+# builtin opt  prefix = /ufs/sjoerd/Monet-stable
+# builtin opt  exec_prefix = ${prefix}
+# builtin opt  gdk_dbname = demo
+# builtin opt  gdk_dbfarm = ${prefix}/var/MonetDB/dbfarm
+# builtin opt  gdk_debug = 0
+# builtin opt  gdk_alloc_map = no
+# builtin opt  gdk_vmtrim = yes
+# builtin opt  monet_admin = adm
+# builtin opt  monet_prompt = >
+# builtin opt  monet_welcome = yes
+# builtin opt  monet_mod_path = ${prefix}/lib64/MonetDB
+# builtin opt  monet_daemon = no
+# builtin opt  host = localhost
+# builtin opt  mapi_port = 50000
+# builtin opt  mapi_clients = 2
+# builtin opt  mapi_open = false
+# builtin opt  mapi_autosense = false
+# builtin opt  sql_debug = 0
+# builtin opt  standoff_ns = 
+# builtin opt  standoff_start = start
+# builtin opt  standoff_end = end
+# config opt   prefix = /ufs/sjoerd/Monet-stable
+# config opt   config = ${prefix}/etc/monetdb5.conf
+# config opt   prefix = /ufs/sjoerd/Monet-stable
+# config opt   exec_prefix = ${prefix}
+# config opt   gdk_dbfarm = ${prefix}/var/MonetDB5/dbfarm
+# config opt   monet_mod_path = 
${prefix}/lib64/MonetDB5:${prefix}/lib64/MonetDB5/lib:${prefix}/lib64/MonetDB5/bin
+# config opt   mero_pidfile = ${prefix}/var/run/MonetDB/merovingian.pid
+# config opt   mero_controlport = 50001
+# config opt   sql_optimizer = default_pipe
+# config opt   minimal_pipe = inline,remap,deadcode,multiplex,garbageCollector
+# config opt   default_pipe = 
inline,remap,evaluate,costModel,coercions,emptySet,aliases,mitosis,mergetable,deadcode,commonTerms,joinPath,reorder,deadcode,reduce,dataflow,history,multiplex,garbageCollector
+# config opt   nov2009_pipe = 
inline,remap,evaluate,costModel,coercions,emptySet,aliases,mergetable,deadcode,constants,commonTerms,joinPath,deadcode,reduce,dataflow,history,multiplex,garbageCollector
+# config opt   accumulator_pipe = 
inline,remap,evaluate,costModel,coercions,emptySet,aliases,mergetable,deadcode,constants,commonTerms,joinPath,deadcode,reduce,accumulators,dataflow,history,multiplex,garbageCollector
+# config opt   recycler_pipe = 
inline,remap,evaluate,costModel,coercions,emptySet,aliases,deadcode,constants,commonTerms,joinPath,deadcode,recycle,reduce,dataflow,history,multiplex,garbageCollector
+# config opt   cracker_pipe = 
inline,remap,evaluate,costModel,coercions,emptySet,aliases,selcrack,deadcode,constants,commonTerms,joinPath,deadcode,reduce,dataflow,history,multiplex,garbageCollector
+# config opt   sidcrack_pipe = 
inline,remap,evaluate,costModel,coercions,emptySet,aliases,sidcrack,deadcode,constants,commonTerms,joinPath,deadcode,reduce,dataflow,history,multiplex,garbageCollector
+# config opt   octopus_pipe = 
inline,remap,evaluate,costModel,coercions,emptySet,aliases,mitosis,mergetable,deadcode,constants,commonTerms,joinPath,octopus,deadcode,reduce,dataflow,history,multiplex,garbageCollector
+# config opt   derive_pipe = 
inline,remap,evaluate,costModel,coercions,emptySet,aliases,mergetable,deadcode,constants,commonTerms,derivePath,joinPath,deadcode,reduce,dataflow,history,multiplex,garbageCollector
+# config opt   dictionary_pipe = 
inline,remap,dictionary,evaluate,costModel,coercions,emptySet,aliases,mergetable,deadcode,constants,commonTerms,joinPath,deadcode,reduce,dataflow,history,multiplex,garbageCollector
+# config opt   compression_pipe = 
inline,remap,evaluate,costModel,coercions,emptySet,aliases,mergetable,deadcode,constants,commonTerms,joinPath,deadcode,reduce,dataflow,compression,dataflow,history,multiplex,garbageCollector
+# cmdline opt  config = /ufs/sjoerd/Monet-stable/etc/monetdb5.conf
+# cmdline opt  gdk_nr_threads = 0
+# cmdline opt  monet_mod_path = 
/ufs/sjoerd/Monet-stable/lib64/MonetDB5:/ufs/sjoerd/Monet-stable/lib64/MonetDB5/lib:/ufs/sjoerd/Monet-stable/lib64/MonetDB5/bin
+# cmdline opt  gdk_dbfarm = /ufs/sjoerd/Monet-stable/var/MonetDB5/dbfarm
+# cmdline opt  mapi_open = true
+# cmdline opt  xrpc_open = true
+# cmdline opt  mapi_port = 35150
+# cmdline opt  xrpc_port = 41611
+# cmdline opt  monet_prompt = 
+# cmdline opt  mal_listing = 2
+# cmdline opt  gdk_dbname = mTests_src_test_BugTracker-2010
+# cmdline opt  mal_listing = 0
+#warning: please don't forget to set your vault key!
+#(see /ufs/sjoerd/Monet-stable/etc/monetdb5.conf)
+
+# 17:35:13 >  
+# 17:35:13 >  mclient -lsql -ftest -i -e --host=ottar --port=35150 
+# 17:35:13 >  
+
+
+# 17:35:13 >  
+# 17:35:13 >  Done.
+# 17:35:13 >  
+
diff -r 61ee7c6f6bd9 -r 5c8c4dd5b5ce 
sql/src/test/BugTracker-2010/Tests/count-and-not.Bug-2663.stable.out
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sql/src/test/BugTracker-2010/Tests/count-and-not.Bug-2663.stable.out      
Tue Sep 07 17:43:33 2010 +0200
@@ -0,0 +1,92 @@
+stdout of test 'count-and-not.Bug-2663` in directory 
'src/test/BugTracker-2010` itself:
+
+
+# 17:35:13 >  
+# 17:35:13 >   mserver5 "--config=/ufs/sjoerd/Monet-stable/etc/monetdb5.conf" 
--debug=10 --set gdk_nr_threads=0 --set 
"monet_mod_path=/ufs/sjoerd/Monet-stable/lib64/MonetDB5:/ufs/sjoerd/Monet-stable/lib64/MonetDB5/lib:/ufs/sjoerd/Monet-stable/lib64/MonetDB5/bin"
 --set "gdk_dbfarm=/ufs/sjoerd/Monet-stable/var/MonetDB5/dbfarm"  --set 
mapi_open=true --set xrpc_open=true --set mapi_port=35150 --set xrpc_port=41611 
--set monet_prompt= --set mal_listing=2 --trace  
"--dbname=mTests_src_test_BugTracker-2010" --set mal_listing=0 ; echo ; echo 
Over..
+# 17:35:13 >  
+
+# MonetDB server v5.20.5, based on kernel v1.38.5
+# Not released
+# Serving database 'mTests_src_test_BugTracker-2010', using 4 threads
+# Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically 
linked
+# Found 7.751 GiB available main-memory.
+# Copyright (c) 1993-July 2008 CWI.
+# Copyright (c) August 2008-2010 MonetDB B.V., all rights reserved
+# Visit http://monetdb.cwi.nl/ for further information
+# Listening for connection requests on mapi:monetdb://ottar.ins.cwi.nl:35150/
+# MonetDB/SQL module v2.38.5 loaded
+# MonetDB/GIS module v0.18.4 loaded
+
+Ready.
+
+Over..
+
+# 17:35:13 >  
+# 17:35:13 >  mclient -lsql -ftest -i -e --host=ottar --port=35150 
+# 17:35:13 >  
+
+#SELECT COUNT (*) > 0 as res
+#  FROM (SELECT id, COUNT (*) AS cnt
+#          FROM tables
+#         GROUP BY id) as i
+# WHERE NOT (1 < i.cnt);
+% . # table_name
+% res # name
+% boolean # type
+% 5 # length
+[ true ]
+#SELECT COUNT (*) > 0 as res
+#  FROM (SELECT id, COUNT (*) AS cnt
+#          FROM tables
+#         GROUP BY id) as i
+# WHERE NOT (i.cnt > 1);
+% . # table_name
+% res # name
+% boolean # type
+% 5 # length
+[ true ]
+#SELECT COUNT (*) > 0 as res
+#  FROM (SELECT id, 1 AS cnt
+#          FROM tables
+#         GROUP BY id) as i
+# WHERE NOT (1 < i.cnt);
+% . # table_name
+% res # name
+% boolean # type
+% 5 # length
+[ true ]
+#SELECT COUNT (*) > 0 as res
+#  FROM (SELECT id, COUNT (*) AS cnt
+#          FROM tables
+#         GROUP BY id) as i
+# WHERE 1 >= i.cnt;
+% . # table_name
+% res # name
+% boolean # type
+% 5 # length
+[ true ]
+#SELECT COUNT (*) > 0 as res
+#  FROM (SELECT id, COUNT (*) AS cnt
+#          FROM tables
+#         GROUP BY id) as i
+# WHERE i.cnt <= 1;
+% . # table_name
+% res # name
+% boolean # type
+% 5 # length
+[ true ]
+#SELECT COUNT (*) = 0 as res
+#  FROM (SELECT id, COUNT (*) AS cnt
+#          FROM tables
+#         GROUP BY id) as i
+# WHERE 1 < i.cnt;
+% . # table_name
+% res # name
+% boolean # type
+% 5 # length
+[ true ]
+
+# 17:35:13 >  
+# 17:35:13 >  Done.
+# 17:35:13 >  
+
diff -r 61ee7c6f6bd9 -r 5c8c4dd5b5ce 
sql/src/test/BugTracker-2010/Tests/multiple-common-table-expressions.Bug-2664.sql
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ 
b/sql/src/test/BugTracker-2010/Tests/multiple-common-table-expressions.Bug-2664.sql
 Tue Sep 07 17:43:33 2010 +0200
@@ -0,0 +1,8 @@
+with t(id) as (select id from tables)
+select id from tables 
+ where id in (select id from t) 
+   and id in (select id from t);
+
+with t(id) as (select id from tables),
+     x(id) as (select id from tables where id in (select id from t))
+select * from t;
diff -r 61ee7c6f6bd9 -r 5c8c4dd5b5ce 
sql/src/test/BugTracker-2010/Tests/multiple-common-table-expressions.Bug-2664.stable.err
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ 
b/sql/src/test/BugTracker-2010/Tests/multiple-common-table-expressions.Bug-2664.stable.err
  Tue Sep 07 17:43:33 2010 +0200
@@ -0,0 +1,74 @@
+stderr of test 'multiple-common-table-expressions.Bug-2664` in directory 
'src/test/BugTracker-2010` itself:
+
+
+# 17:35:13 >  
+# 17:35:13 >   mserver5 "--config=/ufs/sjoerd/Monet-stable/etc/monetdb5.conf" 
--debug=10 --set gdk_nr_threads=0 --set 
"monet_mod_path=/ufs/sjoerd/Monet-stable/lib64/MonetDB5:/ufs/sjoerd/Monet-stable/lib64/MonetDB5/lib:/ufs/sjoerd/Monet-stable/lib64/MonetDB5/bin"
 --set "gdk_dbfarm=/ufs/sjoerd/Monet-stable/var/MonetDB5/dbfarm"  --set 
mapi_open=true --set xrpc_open=true --set mapi_port=35150 --set xrpc_port=41611 
--set monet_prompt= --set mal_listing=2 --trace  
"--dbname=mTests_src_test_BugTracker-2010" --set mal_listing=0 ; echo ; echo 
Over..
+# 17:35:13 >  
+
+# builtin opt  gdk_arch = 64bitx86_64-unknown-linux-gnu
+# builtin opt  gdk_version = 1.38.4
+# builtin opt  prefix = /ufs/sjoerd/Monet-stable
+# builtin opt  exec_prefix = ${prefix}
+# builtin opt  gdk_dbname = demo
+# builtin opt  gdk_dbfarm = ${prefix}/var/MonetDB/dbfarm
+# builtin opt  gdk_debug = 0
+# builtin opt  gdk_alloc_map = no
+# builtin opt  gdk_vmtrim = yes
+# builtin opt  monet_admin = adm
+# builtin opt  monet_prompt = >
+# builtin opt  monet_welcome = yes
+# builtin opt  monet_mod_path = ${prefix}/lib64/MonetDB
+# builtin opt  monet_daemon = no
+# builtin opt  host = localhost
+# builtin opt  mapi_port = 50000
+# builtin opt  mapi_clients = 2
+# builtin opt  mapi_open = false
+# builtin opt  mapi_autosense = false
+# builtin opt  sql_debug = 0
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to