Changeset: 7f0d859e9317 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7f0d859e9317
Added Files:
        sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6423.sql
        sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6423.stable.err
        sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6423.stable.out
Modified Files:
        sql/server/rel_optimizer.c
        sql/test/BugTracker-2017/Tests/All
Branch: Jul2017
Log Message:

fixed bug 6423


diffs (153 lines):

diff --git a/sql/server/rel_optimizer.c b/sql/server/rel_optimizer.c
--- a/sql/server/rel_optimizer.c
+++ b/sql/server/rel_optimizer.c
@@ -4297,7 +4297,7 @@ rel_push_semijoin_down(int *changes, mvc
                for(n = exps->h; n; n = n->next) {
                        sql_exp *sje = n->data;
 
-                       if (n != exps->h &&
+                       if (n != exps->h && sje->type == e_cmp &&
                            !is_complex_exp(sje->flag) &&
                             rel_has_exp(rel->l, sje->l) >= 0 &&
                             rel_has_exp(rel->l, sje->r) >= 0) {
diff --git a/sql/test/BugTracker-2017/Tests/All 
b/sql/test/BugTracker-2017/Tests/All
--- a/sql/test/BugTracker-2017/Tests/All
+++ b/sql/test/BugTracker-2017/Tests/All
@@ -77,3 +77,4 @@ sqlitelogictest-aggregation-distinct.Bug
 sqlitelogictest-aggregation-not-in.Bug-6416
 sqlsmith-semijoin-constant.bug-6417
 sqlsmith.Bug-6418
+sqlsmith.Bug-6423
diff --git a/sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6423.sql 
b/sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6423.sql
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6423.sql
@@ -0,0 +1,23 @@
+select  
+  cast(nullif(sample_4.id,
+    ref_5.name) as clob) as c0, 
+  ref_7.type as c1, 
+  sample_4.ds as c2, 
+  65 as c3
+from 
+  tmp.objects as sample_0
+    inner join sys.environment as ref_5
+        left join sys.tables as ref_6
+        on ((76 is not NULL) 
+            or ((true) 
+              and ((ref_6.name is NULL) 
+                or (ref_6.access is NULL))))
+      inner join sys.storagemodel as ref_7
+        left join bam.rg as sample_4
+          right join sys.key_types as ref_8
+          on (true)
+        on (true)
+      on (ref_6.commit_action = ref_8.key_type_id )
+    on (sample_4.lb is not NULL)
+where ref_7.columnsize is not NULL
+limit 85;
diff --git a/sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6423.stable.err 
b/sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6423.stable.err
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6423.stable.err
@@ -0,0 +1,42 @@
+stderr of test 'sqlsmith.Bug-6423` in directory 'sql/test/BugTracker-2017` 
itself:
+
+
+# 13:47:15 >  
+# 13:47:15 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=35547" "--set" 
"mapi_usock=/var/tmp/mtest-16781/.s.monetdb.35547" "--set" "monet_prompt=" 
"--forcemito" 
"--dbpath=/home/niels/scratch/rc-monetdb/Linux-x86_64/var/MonetDB/mTests_sql_test_BugTracker-2017"
+# 13:47:15 >  
+
+# 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 = 35547
+# cmdline opt  mapi_usock = /var/tmp/mtest-16781/.s.monetdb.35547
+# cmdline opt  monet_prompt = 
+# cmdline opt  gdk_dbpath = 
/home/niels/scratch/rc-monetdb/Linux-x86_64/var/MonetDB/mTests_sql_test_BugTracker-2017
+# cmdline opt  gdk_debug = 536870922
+#WARNING To speedup user.columnsize a bulk operator implementation is needed
+#    X_110:bat[:lng] := mal.multiplex("user":str, "columnsize":str, 
X_46:bat[:str], X_60:bat[:lng], X_67:bat[:lng]);
+#WARNING To speedup user.heapsize a bulk operator implementation is needed
+#    X_113:bat[:lng] := mal.multiplex("user":str, "heapsize":str, 
X_46:bat[:str], X_67:bat[:lng], X_74:bat[:int]);
+#WARNING To speedup user.hashsize a bulk operator implementation is needed
+#    X_115:bat[:lng] := mal.multiplex("user":str, "hashsize":str, 
X_81:bat[:bit], X_60:bat[:lng]);
+#WARNING To speedup user.imprintsize a bulk operator implementation is needed
+#    X_117:bat[:lng] := mal.multiplex("user":str, "imprintsize":str, 
X_60:bat[:lng], X_46:bat[:str]);
+
+# 13:47:16 >  
+# 13:47:16 >  "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-16781" "--port=35547"
+# 13:47:16 >  
+
+
+# 13:47:16 >  
+# 13:47:16 >  "Done."
+# 13:47:16 >  
+
diff --git a/sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6423.stable.out 
b/sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6423.stable.out
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6423.stable.out
@@ -0,0 +1,53 @@
+stdout of test 'sqlsmith.Bug-6423` in directory 'sql/test/BugTracker-2017` 
itself:
+
+
+# 13:47:15 >  
+# 13:47:15 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=35547" "--set" 
"mapi_usock=/var/tmp/mtest-16781/.s.monetdb.35547" "--set" "monet_prompt=" 
"--forcemito" 
"--dbpath=/home/niels/scratch/rc-monetdb/Linux-x86_64/var/MonetDB/mTests_sql_test_BugTracker-2017"
+# 13:47:15 >  
+
+# MonetDB 5 server v11.27.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.330 GiB available main-memory.
+# Copyright (c) 1993-July 2008 CWI.
+# Copyright (c) August 2008-2017 MonetDB B.V., all rights reserved
+# Visit https://www.monetdb.org/ for further information
+# Listening for connection requests on mapi:monetdb://localhost.nes.nl:35547/
+# Listening for UNIX domain connection requests on 
mapi:monetdb:///var/tmp/mtest-16781/.s.monetdb.35547
+# MonetDB/GIS module loaded
+# MonetDB/SQL module loaded
+
+Ready.
+
+# 13:47:16 >  
+# 13:47:16 >  "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-16781" "--port=35547"
+# 13:47:16 >  
+
+#select  
+#  cast(nullif(sample_4.id,
+#    ref_5.name) as clob) as c0, 
+#  ref_7.type as c1, 
+#  sample_4.ds as c2, 
+#  65 as c3
+#from 
+#  tmp.objects as sample_0
+#    inner join sys.environment as ref_5
+#        left join sys.tables as ref_6
+#        on ((76 is not NULL) 
+#            or ((true) 
+#              and ((ref_6.name is NULL) 
+#                or (ref_6.access is NULL))))
+#      inner join sys.storagemodel as ref_7
+#        left join bam.rg as sample_4
+#          right join sys.key_types as ref_8
+#          on (true)
+% .L53,        .L55,   .L57,   .L61 # table_name
+% c0,  c1,     c2,     c3 # name
+% clob,        clob,   clob,   tinyint # type
+% 0,   0,      0,      1 # length
+
+# 13:47:16 >  
+# 13:47:16 >  "Done."
+# 13:47:16 >  
+
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to