Changeset: 16a638844c75 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=16a638844c75
Modified Files:
        sql/backends/monet5/rel_bin.c
        sql/test/BugTracker-2017/Tests/group-by-on-constant.Bug-6082.stable.err
        sql/test/BugTracker-2017/Tests/group-by-on-constant.Bug-6082.stable.out
Branch: Dec2016
Log Message:

fixed bug 6082, ie insert constant into a bat before a group mal statement


diffs (95 lines):

diff --git a/sql/backends/monet5/rel_bin.c b/sql/backends/monet5/rel_bin.c
--- a/sql/backends/monet5/rel_bin.c
+++ b/sql/backends/monet5/rel_bin.c
@@ -2630,6 +2630,8 @@ rel2bin_groupby( mvc *sql, sql_rel *rel,
                                assert(0);
                                return NULL;
                        }
+                       if (!gbcol->nrcols)
+                               gbcol = stmt_const(sql->sa, 
bin_first_column(sql->sa, sub), gbcol);
                        groupby = stmt_group(sql->sa, gbcol, grp, ext, cnt);
                        grp = stmt_result(sql->sa, groupby, 0);
                        ext = stmt_result(sql->sa, groupby, 1);
diff --git 
a/sql/test/BugTracker-2017/Tests/group-by-on-constant.Bug-6082.stable.err 
b/sql/test/BugTracker-2017/Tests/group-by-on-constant.Bug-6082.stable.err
--- a/sql/test/BugTracker-2017/Tests/group-by-on-constant.Bug-6082.stable.err
+++ b/sql/test/BugTracker-2017/Tests/group-by-on-constant.Bug-6082.stable.err
@@ -1,1 +1,34 @@
-no error from MAL
+stderr of test 'group-by-on-constant.Bug-6082` in directory 
'sql/test/BugTracker-2017` itself:
+
+
+# 20:09:41 >  
+# 20:09:41 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=30955" "--set" 
"mapi_usock=/var/tmp/mtest-28866/.s.monetdb.30955" "--set" "monet_prompt=" 
"--forcemito" 
"--dbpath=/home/niels/scratch/rc-clean/Linux-x86_64/var/MonetDB/mTests_sql_test_BugTracker-2017"
+# 20:09:41 >  
+
+# builtin opt  gdk_dbpath = 
/home/niels/scratch/rc-clean/Linux-x86_64/var/monetdb5/dbfarm/demo
+# builtin opt  gdk_debug = 0
+# builtin opt  gdk_vmtrim = no
+# builtin opt  monet_prompt = >
+# builtin opt  monet_daemon = no
+# builtin opt  mapi_port = 50000
+# builtin opt  mapi_open = false
+# builtin opt  mapi_autosense = false
+# builtin opt  sql_optimizer = default_pipe
+# builtin opt  sql_debug = 0
+# cmdline opt  gdk_nr_threads = 0
+# cmdline opt  mapi_open = true
+# cmdline opt  mapi_port = 30955
+# cmdline opt  mapi_usock = /var/tmp/mtest-28866/.s.monetdb.30955
+# cmdline opt  monet_prompt = 
+# cmdline opt  gdk_dbpath = 
/home/niels/scratch/rc-clean/Linux-x86_64/var/MonetDB/mTests_sql_test_BugTracker-2017
+# cmdline opt  gdk_debug = 536870922
+
+# 20:09:41 >  
+# 20:09:41 >  "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-28866" "--port=30955"
+# 20:09:41 >  
+
+
+# 20:09:42 >  
+# 20:09:42 >  "Done."
+# 20:09:42 >  
+
diff --git 
a/sql/test/BugTracker-2017/Tests/group-by-on-constant.Bug-6082.stable.out 
b/sql/test/BugTracker-2017/Tests/group-by-on-constant.Bug-6082.stable.out
--- a/sql/test/BugTracker-2017/Tests/group-by-on-constant.Bug-6082.stable.out
+++ b/sql/test/BugTracker-2017/Tests/group-by-on-constant.Bug-6082.stable.out
@@ -1,1 +1,39 @@
-no error from MAL
+stdout of test 'group-by-on-constant.Bug-6082` in directory 
'sql/test/BugTracker-2017` itself:
+
+
+# 20:09:41 >  
+# 20:09:41 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=30955" "--set" 
"mapi_usock=/var/tmp/mtest-28866/.s.monetdb.30955" "--set" "monet_prompt=" 
"--forcemito" 
"--dbpath=/home/niels/scratch/rc-clean/Linux-x86_64/var/MonetDB/mTests_sql_test_BugTracker-2017"
+# 20:09:41 >  
+
+# MonetDB 5 server v11.25.6
+# This is an unreleased version
+# Serving database 'mTests_sql_test_BugTracker-2017', using 4 threads
+# Compiled for x86_64-unknown-linux-gnu/64bit with 128bit integers
+# Found 7.332 GiB available main-memory.
+# Copyright (c) 1993-July 2008 CWI.
+# Copyright (c) August 2008-2017 MonetDB B.V., all rights reserved
+# Visit http://www.monetdb.org/ for further information
+# Listening for connection requests on mapi:monetdb://localhost.nes.nl:30955/
+# Listening for UNIX domain connection requests on 
mapi:monetdb:///var/tmp/mtest-28866/.s.monetdb.30955
+# MonetDB/GIS module loaded
+# MonetDB/SQL module loaded
+
+Ready.
+
+# 20:09:41 >  
+# 20:09:41 >  "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-28866" "--port=30955"
+# 20:09:41 >  
+
+#start transaction;
+#create table foo (a int, b int);
+#select 1 + 1 as bar, sum(b) from foo group by bar;
+% .L2, sys.L5 # table_name
+% bar, L4 # name
+% tinyint,     hugeint # type
+% 1,   1 # length
+#rollback;
+
+# 20:09:42 >  
+# 20:09:42 >  "Done."
+# 20:09:42 >  
+
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to