Changeset: 81dd28eef303 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=81dd28eef303
Added Files:
        
sql/test/BugTracker-2018/Tests/sqlitelogictest-case-coalesce.Bug-6550.stable.err
        
sql/test/BugTracker-2018/Tests/sqlitelogictest-case-coalesce.Bug-6550.stable.out
Modified Files:
        sql/server/rel_select.c
Branch: Mar2018
Log Message:

fixed bug 6550


diffs (93 lines):

diff --git a/sql/server/rel_select.c b/sql/server/rel_select.c
--- a/sql/server/rel_select.c
+++ b/sql/server/rel_select.c
@@ -2163,7 +2163,8 @@ rel_logical_value_exp(mvc *sql, sql_rel 
                                                        else
                                                                return NULL;
                                                }
-                                       } else if (r) {
+                                       }
+                                       if (r && z && is_project(z->op)) {
                                                sql_rel *gp = z->l;
                                                rel_project_add_exp(sql, z, r);
                                                reset_processed(gp);
diff --git 
a/sql/test/BugTracker-2018/Tests/sqlitelogictest-case-coalesce.Bug-6550.stable.err
 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-case-coalesce.Bug-6550.stable.err
new file mode 100644
--- /dev/null
+++ 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-case-coalesce.Bug-6550.stable.err
@@ -0,0 +1,34 @@
+stderr of test 'sqlitelogictest-case-coalesce.Bug-6550` in directory 
'sql/test/BugTracker-2018` itself:
+
+
+# 18:11:41 >  
+# 18:11:41 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=38838" "--set" 
"mapi_usock=/var/tmp/mtest-10996/.s.monetdb.38838" "--set" "monet_prompt=" 
"--forcemito" 
"--dbpath=/home/niels/scratch/rc-monetdb/Linux-x86_64/var/MonetDB/mTests_sql_test_BugTracker-2018"
+# 18:11:41 >  
+
+# builtin opt  gdk_dbpath = 
/home/niels/scratch/rc-monetdb/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 = 38838
+# cmdline opt  mapi_usock = /var/tmp/mtest-10996/.s.monetdb.38838
+# cmdline opt  monet_prompt = 
+# cmdline opt  gdk_dbpath = 
/home/niels/scratch/rc-monetdb/Linux-x86_64/var/MonetDB/mTests_sql_test_BugTracker-2018
+# cmdline opt  gdk_debug = 553648138
+
+# 18:11:41 >  
+# 18:11:41 >  "mclient" "-lsql" "-ftest" "-tnone" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-10996" "--port=38838"
+# 18:11:41 >  
+
+
+# 18:11:41 >  
+# 18:11:41 >  "Done."
+# 18:11:41 >  
+
diff --git 
a/sql/test/BugTracker-2018/Tests/sqlitelogictest-case-coalesce.Bug-6550.stable.out
 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-case-coalesce.Bug-6550.stable.out
new file mode 100644
--- /dev/null
+++ 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-case-coalesce.Bug-6550.stable.out
@@ -0,0 +1,36 @@
+stdout of test 'sqlitelogictest-case-coalesce.Bug-6550` in directory 
'sql/test/BugTracker-2018` itself:
+
+
+# 18:11:41 >  
+# 18:11:41 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=38838" "--set" 
"mapi_usock=/var/tmp/mtest-10996/.s.monetdb.38838" "--set" "monet_prompt=" 
"--forcemito" 
"--dbpath=/home/niels/scratch/rc-monetdb/Linux-x86_64/var/MonetDB/mTests_sql_test_BugTracker-2018"
+# 18:11:41 >  
+
+# MonetDB 5 server v11.29.0
+# This is an unreleased version
+# Serving database 'mTests_sql_test_BugTracker-2018', using 8 threads
+# Compiled for x86_64-unknown-linux-gnu/64bit with 128bit integers
+# Found 15.387 GiB available main-memory.
+# Copyright (c) 1993 - July 2008 CWI.
+# Copyright (c) August 2008 - 2018 MonetDB B.V., all rights reserved
+# Visit https://www.monetdb.org/ for further information
+# Listening for connection requests on 
mapi:monetdb://localhost.localdomain:38838/
+# Listening for UNIX domain connection requests on 
mapi:monetdb:///var/tmp/mtest-10996/.s.monetdb.38838
+# MonetDB/SQL module loaded
+
+Ready.
+
+# 18:11:41 >  
+# 18:11:41 >  "mclient" "-lsql" "-ftest" "-tnone" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-10996" "--port=38838"
+# 18:11:41 >  
+
+#SELECT ALL CASE WHEN NOT NULL NOT IN ( - COALESCE ( + - CAST ( + 45 AS 
INTEGER ), - 66, - 9 * COALESCE ( 80, NULLIF ( - 12, + + ( + 26 ) + - - MAX ( 
18 ) + 66 + 98 ) + + + AVG ( ALL 35 ), - - 55 - - - 67, + 42 ) ), + COUNT ( * ) 
* - + 23, + 66 * + 93 + - ( - 61 ) + + 10 * + 92 * + - 40 * - 47 / 29, COUNT ( 
* ) * 30 / 28 + 73 ) THEN COUNT ( * ) / - - 86 ELSE NULL END - - 66;
+% .L32 # table_name
+% L32 # name
+% hugeint # type
+% 1 # length
+[ NULL ]
+
+# 18:11:41 >  
+# 18:11:41 >  "Done."
+# 18:11:41 >  
+
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to