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

fix bug 6568


diffs (96 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
@@ -2135,7 +2135,7 @@ rel_logical_value_exp(mvc *sql, sql_rel 
                        }
                }
 
-               if (!left || (!left->l && f == sql_sel)) {
+               if (!left || (!left->l && f == sql_sel && 
list_empty(left->exps))) {
                        needproj = (left != NULL);
                        left = rel_project_exp(sql->sa, l);
                }
diff --git 
a/sql/test/BugTracker-2018/Tests/sqlitelogictest-complex-case.Bug-6568.stable.err
 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-complex-case.Bug-6568.stable.err
new file mode 100644
--- /dev/null
+++ 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-complex-case.Bug-6568.stable.err
@@ -0,0 +1,35 @@
+stderr of test 'sqlitelogictest-complex-case.Bug-6568` in directory 
'sql/test/BugTracker-2018` itself:
+
+
+# 10:35:09 >  
+# 10:35:09 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=31034" "--set" 
"mapi_usock=/var/tmp/mtest-7017/.s.monetdb.31034" "--set" "monet_prompt=" 
"--forcemito" 
"--dbpath=/home/niels/scratch/rc-old/Linux-x86_64/var/MonetDB/mTests_sql_test_BugTracker-2018"
 "--set" "embedded_c=true"
+# 10:35:09 >  
+
+# builtin opt  gdk_dbpath = 
/home/niels/scratch/rc-old/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 = 31034
+# cmdline opt  mapi_usock = /var/tmp/mtest-7017/.s.monetdb.31034
+# cmdline opt  monet_prompt = 
+# cmdline opt  gdk_dbpath = 
/home/niels/scratch/rc-old/Linux-x86_64/var/MonetDB/mTests_sql_test_BugTracker-2018
+# cmdline opt  embedded_c = true
+# cmdline opt  gdk_debug = 553648138
+
+# 10:35:09 >  
+# 10:35:09 >  "mclient" "-lsql" "-ftest" "-tnone" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-7017" "--port=31034"
+# 10:35:09 >  
+
+
+# 10:35:09 >  
+# 10:35:09 >  "Done."
+# 10:35:09 >  
+
diff --git 
a/sql/test/BugTracker-2018/Tests/sqlitelogictest-complex-case.Bug-6568.stable.out
 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-complex-case.Bug-6568.stable.out
new file mode 100644
--- /dev/null
+++ 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-complex-case.Bug-6568.stable.out
@@ -0,0 +1,39 @@
+stdout of test 'sqlitelogictest-complex-case.Bug-6568` in directory 
'sql/test/BugTracker-2018` itself:
+
+
+# 10:35:09 >  
+# 10:35:09 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=31034" "--set" 
"mapi_usock=/var/tmp/mtest-7017/.s.monetdb.31034" "--set" "monet_prompt=" 
"--forcemito" 
"--dbpath=/home/niels/scratch/rc-old/Linux-x86_64/var/MonetDB/mTests_sql_test_BugTracker-2018"
 "--set" "embedded_c=true"
+# 10:35:09 >  
+
+# MonetDB 5 server v11.29.2
+# This is an unreleased version
+# Serving database 'mTests_sql_test_BugTracker-2018', using 8 threads
+# Compiled for x86_64-unknown-linux-gnu/64bit
+# 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://xps13:31034/
+# Listening for UNIX domain connection requests on 
mapi:monetdb:///var/tmp/mtest-7017/.s.monetdb.31034
+# MonetDB/GIS module loaded
+# MonetDB/SQL module loaded
+
+Ready.
+
+# 10:35:09 >  
+# 10:35:09 >  "mclient" "-lsql" "-ftest" "-tnone" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-7017" "--port=31034"
+# 10:35:09 >  
+
+#SELECT - 76 AS col2, CASE WHEN CAST ( - MAX ( DISTINCT - 75 ) AS INTEGER ) IS 
NOT NULL THEN + 4 * - + 48 * + 51 * - -
+#54 * - 77 * 46 WHEN NOT ( NULL ) IN ( + - ( - - 49 ) * - 1, - 41, - 14 - - 
CASE - - 1 WHEN - - 82 THEN - - 23 END / + 46
+#- - 87 * + 52 ) THEN 56 ELSE NULL END AS col2;
+% .L2, .L21 # table_name
+% col2,        col2 # name
+% tinyint,     bigint # type
+% 3,   10 # length
+[ -76, 1872896256      ]
+
+# 10:35:09 >  
+# 10:35:09 >  "Done."
+# 10:35:09 >  
+
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to