Changeset: 1b4bfdd6cec4 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1b4bfdd6cec4
Added Files:
        sql/test/BugTracker-2017/Tests/nested_with.Bug-6187.sql
        sql/test/BugTracker-2017/Tests/nested_with.Bug-6187.stable.err
        sql/test/BugTracker-2017/Tests/nested_with.Bug-6187.stable.out
        sql/test/BugTracker-2017/Tests/sqlsmith01.stable.err
        sql/test/BugTracker-2017/Tests/sqlsmith02.stable.err
        sql/test/BugTracker-2017/Tests/sqlsmith03.stable.err
        sql/test/BugTracker-2017/Tests/sqlsmith04.stable.err
Modified Files:
        sql/server/sql_parser.y
        sql/test/BugTracker-2017/Tests/All
        sql/test/BugTracker-2017/Tests/sqlsmith01.stable.out
        sql/test/BugTracker-2017/Tests/sqlsmith04.stable.out
Branch: default
Log Message:

approved output

fixed 6187 (ie added nested with feature)


diffs (truncated from 403 to 300 lines):

diff --git a/sql/server/sql_parser.y b/sql/server/sql_parser.y
--- a/sql/server/sql_parser.y
+++ b/sql/server/sql_parser.y
@@ -2998,11 +2998,11 @@ with_list:
  ;
 
 with_list_element: 
-    ident opt_column_list AS '(' with_query_expression ')'
+    ident opt_column_list AS subquery_with_orderby 
        {  dlist *l = L();
          append_list(l, append_string(L(), $1));
          append_list(l, $2);
-         append_symbol(l, $5);
+         append_symbol(l, $4);
          append_int(l, FALSE); /* no with check */
          append_int(l, FALSE); /* inlined view  (ie not persistent) */
          $$ = _symbol_create_list( SQL_CREATE_VIEW, l ); 
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
@@ -24,3 +24,4 @@ sqlsmith01
 sqlsmith02
 sqlsmith03
 sqlsmith04
+nested_with.Bug-6187
diff --git a/sql/test/BugTracker-2017/Tests/nested_with.Bug-6187.sql 
b/sql/test/BugTracker-2017/Tests/nested_with.Bug-6187.sql
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2017/Tests/nested_with.Bug-6187.sql
@@ -0,0 +1,7 @@
+WITH t0(x) as (
+    WITH t1(y) as (
+        select 0
+    )
+    select * FROM t1
+)
+SELECT * FROM t0;
diff --git a/sql/test/BugTracker-2017/Tests/nested_with.Bug-6187.stable.err 
b/sql/test/BugTracker-2017/Tests/nested_with.Bug-6187.stable.err
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2017/Tests/nested_with.Bug-6187.stable.err
@@ -0,0 +1,34 @@
+stderr of test 'nested_with.Bug-6187` in directory 'sql/test/BugTracker-2017` 
itself:
+
+
+# 17:13:52 >  
+# 17:13:52 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=33167" "--set" 
"mapi_usock=/var/tmp/mtest-17366/.s.monetdb.33167" "--set" "monet_prompt=" 
"--forcemito" 
"--dbpath=/home/niels/scratch/monetdb/Linux-x86_64/var/MonetDB/mTests_sql_test_BugTracker-2017"
+# 17:13:52 >  
+
+# builtin opt  gdk_dbpath = 
/home/niels/scratch/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 = 33167
+# cmdline opt  mapi_usock = /var/tmp/mtest-17366/.s.monetdb.33167
+# cmdline opt  monet_prompt = 
+# cmdline opt  gdk_dbpath = 
/home/niels/scratch/monetdb/Linux-x86_64/var/MonetDB/mTests_sql_test_BugTracker-2017
+# cmdline opt  gdk_debug = 536870922
+
+# 17:13:52 >  
+# 17:13:52 >  "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-17366" "--port=33167"
+# 17:13:52 >  
+
+
+# 17:13:52 >  
+# 17:13:52 >  "Done."
+# 17:13:52 >  
+
diff --git a/sql/test/BugTracker-2017/Tests/nested_with.Bug-6187.stable.out 
b/sql/test/BugTracker-2017/Tests/nested_with.Bug-6187.stable.out
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2017/Tests/nested_with.Bug-6187.stable.out
@@ -0,0 +1,43 @@
+stdout of test 'nested_with.Bug-6187` in directory 'sql/test/BugTracker-2017` 
itself:
+
+
+# 17:13:52 >  
+# 17:13:52 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=33167" "--set" 
"mapi_usock=/var/tmp/mtest-17366/.s.monetdb.33167" "--set" "monet_prompt=" 
"--forcemito" 
"--dbpath=/home/niels/scratch/monetdb/Linux-x86_64/var/MonetDB/mTests_sql_test_BugTracker-2017"
+# 17:13:52 >  
+
+# MonetDB 5 server v11.26.0
+# 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:33167/
+# Listening for UNIX domain connection requests on 
mapi:monetdb:///var/tmp/mtest-17366/.s.monetdb.33167
+# MonetDB/GIS module loaded
+# MonetDB/SQL module loaded
+
+Ready.
+
+# 17:13:52 >  
+# 17:13:52 >  "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-17366" "--port=33167"
+# 17:13:52 >  
+
+#WITH t0(x) as (
+#    WITH t1(y) as (
+#        select 0
+#    )
+#    select * FROM t1
+#)
+#SELECT * FROM t0;
+% .t0 # table_name
+% x # name
+% tinyint # type
+% 1 # length
+[ 0    ]
+
+# 17:13:52 >  
+# 17:13:52 >  "Done."
+# 17:13:52 >  
+
diff --git a/sql/test/BugTracker-2017/Tests/sqlsmith01.stable.err 
b/sql/test/BugTracker-2017/Tests/sqlsmith01.stable.err
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2017/Tests/sqlsmith01.stable.err
@@ -0,0 +1,34 @@
+stderr of test 'sqlsmith01` in directory 'sql/test/BugTracker-2017` itself:
+
+
+# 17:13:49 >  
+# 17:13:49 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=33167" "--set" 
"mapi_usock=/var/tmp/mtest-17366/.s.monetdb.33167" "--set" "monet_prompt=" 
"--forcemito" 
"--dbpath=/home/niels/scratch/monetdb/Linux-x86_64/var/MonetDB/mTests_sql_test_BugTracker-2017"
+# 17:13:49 >  
+
+# builtin opt  gdk_dbpath = 
/home/niels/scratch/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 = 33167
+# cmdline opt  mapi_usock = /var/tmp/mtest-17366/.s.monetdb.33167
+# cmdline opt  monet_prompt = 
+# cmdline opt  gdk_dbpath = 
/home/niels/scratch/monetdb/Linux-x86_64/var/MonetDB/mTests_sql_test_BugTracker-2017
+# cmdline opt  gdk_debug = 536870922
+
+# 17:13:50 >  
+# 17:13:50 >  "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-17366" "--port=33167"
+# 17:13:50 >  
+
+
+# 17:13:50 >  
+# 17:13:50 >  "Done."
+# 17:13:50 >  
+
diff --git a/sql/test/BugTracker-2017/Tests/sqlsmith01.stable.out 
b/sql/test/BugTracker-2017/Tests/sqlsmith01.stable.out
--- a/sql/test/BugTracker-2017/Tests/sqlsmith01.stable.out
+++ b/sql/test/BugTracker-2017/Tests/sqlsmith01.stable.out
@@ -1,1 +1,64 @@
-Causes a crash
+stdout of test 'sqlsmith01` in directory 'sql/test/BugTracker-2017` itself:
+
+
+# 17:13:49 >  
+# 17:13:49 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=33167" "--set" 
"mapi_usock=/var/tmp/mtest-17366/.s.monetdb.33167" "--set" "monet_prompt=" 
"--forcemito" 
"--dbpath=/home/niels/scratch/monetdb/Linux-x86_64/var/MonetDB/mTests_sql_test_BugTracker-2017"
+# 17:13:49 >  
+
+# MonetDB 5 server v11.26.0
+# 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:33167/
+# Listening for UNIX domain connection requests on 
mapi:monetdb:///var/tmp/mtest-17366/.s.monetdb.33167
+# MonetDB/GIS module loaded
+# MonetDB/SQL module loaded
+
+Ready.
+
+# 17:13:50 >  
+# 17:13:50 >  "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-17366" "--port=33167"
+# 17:13:50 >  
+
+#select
+#  ref_20.sm as c0,
+#  cast(coalesce(ref_20.file_id,
+#    ref_20.file_id) as bigint) as c1
+#from
+#  bam.rg as ref_20
+#where ref_20.fo is not NULL;
+% bam.L2,      bam.L5 # table_name
+% c0,  c1 # name
+% clob,        bigint # type
+% 0,   1 # length
+#select
+#  cast(coalesce(subq_0.c0,
+#    subq_0.c0) as int) as c0,
+#  subq_0.c0 as c1,
+#  subq_0.c0 as c2,
+#  subq_0.c0 as c3
+#from
+#  (select
+#        ref_20.id as c0
+#      from
+#        sys.querylog_history as ref_11
+#          inner join sys.users as ref_18
+#                inner join sys.geometry_columns as ref_19
+#                on (ref_18.default_schema = ref_19.srid )
+#              right join tmp.keys as ref_20
+#              on (ref_18.fullname = ref_20.name )
+#            left join sys._columns as ref_21
+#              inner join sys.columns as ref_22
+% .L155,       .L157,  .L161,  .L163 # table_name
+% c0,  c1,     c2,     c3 # name
+% int, int,    int,    int # type
+% 1,   1,      1,      1 # length
+
+# 17:13:50 >  
+# 17:13:50 >  "Done."
+# 17:13:50 >  
+
diff --git a/sql/test/BugTracker-2017/Tests/sqlsmith02.stable.err 
b/sql/test/BugTracker-2017/Tests/sqlsmith02.stable.err
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2017/Tests/sqlsmith02.stable.err
@@ -0,0 +1,34 @@
+stderr of test 'sqlsmith02` in directory 'sql/test/BugTracker-2017` itself:
+
+
+# 17:13:50 >  
+# 17:13:50 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=33167" "--set" 
"mapi_usock=/var/tmp/mtest-17366/.s.monetdb.33167" "--set" "monet_prompt=" 
"--forcemito" 
"--dbpath=/home/niels/scratch/monetdb/Linux-x86_64/var/MonetDB/mTests_sql_test_BugTracker-2017"
+# 17:13:50 >  
+
+# builtin opt  gdk_dbpath = 
/home/niels/scratch/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 = 33167
+# cmdline opt  mapi_usock = /var/tmp/mtest-17366/.s.monetdb.33167
+# cmdline opt  monet_prompt = 
+# cmdline opt  gdk_dbpath = 
/home/niels/scratch/monetdb/Linux-x86_64/var/MonetDB/mTests_sql_test_BugTracker-2017
+# cmdline opt  gdk_debug = 536870922
+
+# 17:13:50 >  
+# 17:13:50 >  "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-17366" "--port=33167"
+# 17:13:50 >  
+
+
+# 17:13:50 >  
+# 17:13:50 >  "Done."
+# 17:13:50 >  
+
diff --git a/sql/test/BugTracker-2017/Tests/sqlsmith03.stable.err 
b/sql/test/BugTracker-2017/Tests/sqlsmith03.stable.err
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2017/Tests/sqlsmith03.stable.err
@@ -0,0 +1,34 @@
+stderr of test 'sqlsmith03` in directory 'sql/test/BugTracker-2017` itself:
+
+
+# 17:13:50 >  
+# 17:13:50 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=33167" "--set" 
"mapi_usock=/var/tmp/mtest-17366/.s.monetdb.33167" "--set" "monet_prompt=" 
"--forcemito" 
"--dbpath=/home/niels/scratch/monetdb/Linux-x86_64/var/MonetDB/mTests_sql_test_BugTracker-2017"
+# 17:13:50 >  
+
+# builtin opt  gdk_dbpath = 
/home/niels/scratch/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 = 33167
+# cmdline opt  mapi_usock = /var/tmp/mtest-17366/.s.monetdb.33167
+# cmdline opt  monet_prompt = 
+# cmdline opt  gdk_dbpath = 
/home/niels/scratch/monetdb/Linux-x86_64/var/MonetDB/mTests_sql_test_BugTracker-2017
+# cmdline opt  gdk_debug = 536870922
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to