Changeset: 7832d33851e5 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7832d33851e5
Added Files:
        sql/test/BugTracker-2020/Tests/analyze-stream-table.Bug-6817.sql
        sql/test/BugTracker-2020/Tests/analyze-stream-table.Bug-6817.stable.err
        sql/test/BugTracker-2020/Tests/analyze-stream-table.Bug-6817.stable.out
Modified Files:
        sql/test/BugTracker-2020/Tests/All
Branch: Nov2019
Log Message:

add test for bug 6817


diffs (152 lines):

diff --git a/sql/test/BugTracker-2020/Tests/All 
b/sql/test/BugTracker-2020/Tests/All
--- a/sql/test/BugTracker-2020/Tests/All
+++ b/sql/test/BugTracker-2020/Tests/All
@@ -1,3 +1,4 @@
 median_avg-nulls.Bug-6807
 ifthenelse-crash.Bug-6815
 alter-table-add-column-Bug-6816
+analyze-stream-table.Bug-6817
diff --git a/sql/test/BugTracker-2020/Tests/analyze-stream-table.Bug-6817.sql 
b/sql/test/BugTracker-2020/Tests/analyze-stream-table.Bug-6817.sql
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2020/Tests/analyze-stream-table.Bug-6817.sql
@@ -0,0 +1,26 @@
+delete from statistics;
+select count(*) from statistics;
+
+CREATE STREAM TABLE "sys"."strt" (
+        "id" INTEGER       NOT NULL,
+        "nm" VARCHAR(123)  NOT NULL,
+        CONSTRAINT "strt_id_pkey" PRIMARY KEY ("id")
+);
+
+select * from "sys"."strt";
+
+analyze "sys"."strt";
+-- Error: Table 'strt' is not persistent   SQLState:  42S02
+select (count(*) > 0) as has_rows from statistics;
+
+analyze sys;
+-- Error: Table 'strt' is not persistent   SQLState:  42S02
+select (count(*) > 0) as has_rows from statistics;
+
+drop table "sys"."strt";
+-- now run analyze without the stream table
+analyze sys;
+select (count(*) > 0) as has_rows from statistics;
+-- true (181)
+delete from statistics;
+
diff --git 
a/sql/test/BugTracker-2020/Tests/analyze-stream-table.Bug-6817.stable.err 
b/sql/test/BugTracker-2020/Tests/analyze-stream-table.Bug-6817.stable.err
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2020/Tests/analyze-stream-table.Bug-6817.stable.err
@@ -0,0 +1,32 @@
+stderr of test 'analyze-stream-table.Bug-6817` in directory 
'sql/test/BugTracker-2020` itself:
+
+
+# 13:50:18 >  
+# 13:50:18 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=35996" "--set" 
"mapi_usock=/var/tmp/mtest-891865/.s.monetdb.35996" "--forcemito" 
"--dbpath=/home/dinther/dev/dev/INSTALL/var/MonetDB/mTests_sql_test_BugTracker-2020"
 "--set" "embedded_c=true"
+# 13:50:18 >  
+
+# builtin opt  gdk_dbpath = 
/home/dinther/dev/dev/INSTALL/var/monetdb5/dbfarm/demo
+# builtin opt  mapi_port = 50000
+# builtin opt  mapi_open = false
+# builtin opt  mapi_ipv6 = 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 = 35996
+# cmdline opt  mapi_usock = /var/tmp/mtest-891865/.s.monetdb.35996
+# cmdline opt  gdk_dbpath = 
/home/dinther/dev/dev/INSTALL/var/MonetDB/mTests_sql_test_BugTracker-2020
+# cmdline opt  embedded_c = true
+#client2:!ERROR:SQLException:analyze:42S02!Table 'strt' is not persistent
+#client2:!ERROR:SQLException:analyze:42S02!Table 'strt' is not persistent
+
+# 13:50:18 >  
+# 13:50:18 >  "mclient" "-lsql" "-ftest" "-tnone" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-891865" "--port=35996"
+# 13:50:18 >  
+
+
+# 13:50:18 >  
+# 13:50:18 >  "Done."
+# 13:50:18 >  
+
diff --git 
a/sql/test/BugTracker-2020/Tests/analyze-stream-table.Bug-6817.stable.out 
b/sql/test/BugTracker-2020/Tests/analyze-stream-table.Bug-6817.stable.out
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2020/Tests/analyze-stream-table.Bug-6817.stable.out
@@ -0,0 +1,71 @@
+stdout of test 'analyze-stream-table.Bug-6817` in directory 
'sql/test/BugTracker-2020` itself:
+
+
+# 13:50:18 >  
+# 13:50:18 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=35996" "--set" 
"mapi_usock=/var/tmp/mtest-891865/.s.monetdb.35996" "--forcemito" 
"--dbpath=/home/dinther/dev/dev/INSTALL/var/MonetDB/mTests_sql_test_BugTracker-2020"
 "--set" "embedded_c=true"
+# 13:50:18 >  
+
+# MonetDB 5 server v11.35.14 (hg id: 6146f33fc10b)
+# This is an unreleased version
+# Serving database 'mTests_sql_test_BugTracker-2020', using 8 threads
+# Compiled for x86_64-pc-linux-gnu/64bit with 128bit integers
+# Found 31.237 GiB available main-memory of which we use 25.459 GiB
+# Copyright (c) 1993 - July 2008 CWI.
+# Copyright (c) August 2008 - 2020 MonetDB B.V., all rights reserved
+# Visit https://www.monetdb.org/ for further information
+# Listening for connection requests on mapi:monetdb://monetdb-nuc2:35996/
+# Listening for UNIX domain connection requests on 
mapi:monetdb:///var/tmp/mtest-891865/.s.monetdb.35996
+# MonetDB/GIS module loaded
+# MonetDB/SQL module loaded
+
+# 13:50:18 >  
+# 13:50:18 >  "mclient" "-lsql" "-ftest" "-tnone" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-891865" "--port=35996"
+# 13:50:18 >  
+
+#delete from statistics;
+[ 0    ]
+#select count(*) from statistics;
+% .L2 # table_name
+% L2 # name
+% bigint # type
+% 1 # length
+[ 0    ]
+#CREATE STREAM TABLE "sys"."strt" (
+#        "id" INTEGER       NOT NULL,
+#        "nm" VARCHAR(123)  NOT NULL,
+#        CONSTRAINT "strt_id_pkey" PRIMARY KEY ("id")
+#);
+#select * from "sys"."strt";
+% sys.strt,    sys.strt # table_name
+% id,  nm # name
+% int, varchar # type
+% 1,   0 # length
+#analyze "sys"."strt";
+#select (count(*) > 0) as has_rows from statistics;
+% .L3 # table_name
+% has_rows # name
+% boolean # type
+% 5 # length
+[ false        ]
+#analyze sys;
+#select (count(*) > 0) as has_rows from statistics;
+% .L3 # table_name
+% has_rows # name
+% boolean # type
+% 5 # length
+[ true ]
+#drop table "sys"."strt";
+#analyze sys;
+#select (count(*) > 0) as has_rows from statistics;
+% .L3 # table_name
+% has_rows # name
+% boolean # type
+% 5 # length
+[ true ]
+#delete from statistics;
+[ 181  ]
+
+# 13:50:18 >  
+# 13:50:18 >  "Done."
+# 13:50:18 >  
+
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to