Changeset: 69e2903772f7 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=69e2903772f7
Added Files:
        sql/test/BugTracker-2020/Tests/alter-table-add-column.Bug-6816.py
        
sql/test/BugTracker-2020/Tests/alter-table-add-column.Bug-6816.stable.err
        
sql/test/BugTracker-2020/Tests/alter-table-add-column.Bug-6816.stable.out
        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
        sql/test/BugTracker-2020/Tests/select-where-in-rtrim-crash.Bug-6818.sql
        
sql/test/BugTracker-2020/Tests/select-where-in-rtrim-crash.Bug-6818.stable.err
        
sql/test/BugTracker-2020/Tests/select-where-in-rtrim-crash.Bug-6818.stable.out
Removed Files:
        sql/test/BugTracker-2020/Tests/alter-table-add-column-Bug-6816.py
        
sql/test/BugTracker-2020/Tests/alter-table-add-column-Bug-6816.stable.err
        
sql/test/BugTracker-2020/Tests/alter-table-add-column-Bug-6816.stable.out
Modified Files:
        sql/backends/monet5/sql_statistics.c
        
sql/test/BugTracker-2017/Tests/statistics_nils_not_eq_zero.Bug-6331.stable.err
        
sql/test/BugTracker-2017/Tests/statistics_nils_not_eq_zero.Bug-6331.stable.out
        sql/test/BugTracker-2020/Tests/All
Branch: linear-hashing
Log Message:

Merged with Nov2019 branch


diffs (truncated from 569 to 300 lines):

diff --git a/sql/backends/monet5/sql_statistics.c 
b/sql/backends/monet5/sql_statistics.c
--- a/sql/backends/monet5/sql_statistics.c
+++ b/sql/backends/monet5/sql_statistics.c
@@ -84,13 +84,13 @@ sql_analyze(Client cntxt, MalBlkPtr mb, 
 
        sys = mvc_bind_schema(m, "sys");
        if (sys == NULL)
-               throw(SQL, "sql.analyze", SQLSTATE(3F000) "Internal error");
+               throw(SQL, "sql.analyze", SQLSTATE(3F000) "Internal error: No 
schema sys");
        sysstats = mvc_bind_table(m, sys, "statistics");
        if (sysstats == NULL)
-               throw(SQL, "sql.analyze", SQLSTATE(3F000) "No table 
sys.statistics");
+               throw(SQL, "sql.analyze", SQLSTATE(3F000) "Internal error: No 
table sys.statistics");
        statsid = mvc_bind_column(m, sysstats, "column_id");
        if (statsid == NULL)
-               throw(SQL, "sql.analyze", SQLSTATE(3F000) "No table 
sys.statistics");
+               throw(SQL, "sql.analyze", SQLSTATE(3F000) "Internal error: No 
table sys.statistics");
 
        switch (argc) {
        case 6:
@@ -121,12 +121,12 @@ sql_analyze(Client cntxt, MalBlkPtr mb, 
 
                                if (tbl && strcmp(bt->name, tbl))
                                        continue;
-                               if (t->persistence != SQL_PERSIST) {
+                               tfnd = 1;
+                               if (tbl && !isTable(t)) {
                                        GDKfree(maxval);
                                        GDKfree(minval);
-                                       throw(SQL, "analyze", SQLSTATE(42S02) 
"Table '%s' is not persistent", bt->name);
+                                       throw(SQL, "analyze", SQLSTATE(42S02) 
"%s '%s' is not persistent", TABLE_TYPE_DESCRIPTION(t->type, t->properties), 
bt->name);
                                }
-                               tfnd = 1;
                                if (isTable(t) && t->columns.set)
                                        for (ncol = (t)->columns.set->h; ncol; 
ncol = ncol->next) {
                                                sql_base *bc = ncol->data;
diff --git 
a/sql/test/BugTracker-2017/Tests/statistics_nils_not_eq_zero.Bug-6331.stable.err
 
b/sql/test/BugTracker-2017/Tests/statistics_nils_not_eq_zero.Bug-6331.stable.err
--- 
a/sql/test/BugTracker-2017/Tests/statistics_nils_not_eq_zero.Bug-6331.stable.err
+++ 
b/sql/test/BugTracker-2017/Tests/statistics_nils_not_eq_zero.Bug-6331.stable.err
@@ -29,10 +29,6 @@ stderr of test 'statistics_nils_not_eq_z
 # 13:40:16 >  "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-25363" "--port=30826"
 # 13:40:16 >  
 
-MAPI  = (monetdb) /var/tmp/mtest-4063/.s.monetdb.31696
-QUERY = ANALYZE tmp;
-ERROR = !Table '_tables' is not persistent
-CODE  = 42S02
 
 # 13:40:17 >  
 # 13:40:17 >  "Done."
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,5 @@
 median_avg-nulls.Bug-6807
 ifthenelse-crash.Bug-6815
-alter-table-add-column-Bug-6816
+alter-table-add-column.Bug-6816
+analyze-stream-table.Bug-6817
+select-where-in-rtrim-crash.Bug-6818
diff --git a/sql/test/BugTracker-2020/Tests/alter-table-add-column-Bug-6816.py 
b/sql/test/BugTracker-2020/Tests/alter-table-add-column-Bug-6816.py
deleted file mode 100644
--- a/sql/test/BugTracker-2020/Tests/alter-table-add-column-Bug-6816.py
+++ /dev/null
@@ -1,31 +0,0 @@
-import sys
-
-try:
-    from MonetDBtesting import process
-except ImportError:
-    import process
-
-s = process.server(args = [], stdin = process.PIPE, stdout = process.PIPE, 
stderr = process.PIPE)
-c1 = process.client('sql', stdin = process.PIPE, stdout = process.PIPE, stderr 
= process.PIPE)
-c2 = process.client('sql', stdin = process.PIPE, stdout = process.PIPE, stderr 
= process.PIPE)
-
-out, err = c1.communicate('''\
-CREATE TABLE "testVarcharToClob" ("varcharColumn" varchar(255));\
-INSERT INTO "testVarcharToClob" VALUES ('value1'), ('value2');\
-ALTER TABLE "testVarcharToClob" add "clobColumn" TEXT NULL;\
-UPDATE "testVarcharToClob" SET "clobColumn" = "varcharColumn";\
-ALTER TABLE "testVarcharToClob" drop "varcharColumn";
-''')
-sys.stdout.write(out)
-sys.stderr.write(err)
-
-out, err = c2.communicate('''\
-INSERT INTO "testVarcharToClob" VALUES ('value3');\
-DROP TABLE "testVarcharToClob";
-''')
-sys.stdout.write(out)
-sys.stderr.write(err)
-
-out, err = s.communicate()
-sys.stdout.write(out)
-sys.stderr.write(err)
diff --git 
a/sql/test/BugTracker-2020/Tests/alter-table-add-column-Bug-6816.stable.err 
b/sql/test/BugTracker-2020/Tests/alter-table-add-column-Bug-6816.stable.err
deleted file mode 100644
--- a/sql/test/BugTracker-2020/Tests/alter-table-add-column-Bug-6816.stable.err
+++ /dev/null
@@ -1,24 +0,0 @@
-stderr of test 'alter-table-add-column-Bug-6816` in directory 
'sql/test/BugTracker-2020` itself:
-
-
-# 14:03:52 >  
-# 14:03:52 >  "/usr/bin/python3" "alter-table-add-column-Bug-6816.py" 
"alter-table-add-column-Bug-6816"
-# 14:03:52 >  
-
-# builtin opt  gdk_dbpath = 
/home/ferreira/repositories/MonetDB-Nov2019/BUILD/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 = 36405
-# cmdline opt  mapi_usock = /var/tmp/mtest-147833/.s.monetdb.36405
-# cmdline opt  gdk_dbpath = 
/home/ferreira/repositories/MonetDB-Nov2019/BUILD/var/MonetDB/mTests_sql_test_BugTracker-2020
-
-# 14:03:53 >  
-# 14:03:53 >  "Done."
-# 14:03:53 >  
-
diff --git 
a/sql/test/BugTracker-2020/Tests/alter-table-add-column-Bug-6816.stable.out 
b/sql/test/BugTracker-2020/Tests/alter-table-add-column-Bug-6816.stable.out
deleted file mode 100644
--- a/sql/test/BugTracker-2020/Tests/alter-table-add-column-Bug-6816.stable.out
+++ /dev/null
@@ -1,74 +0,0 @@
-stdout of test 'alter-table-add-column-Bug-6816` in directory 
'sql/test/BugTracker-2020` itself:
-
-
-# 14:03:52 >  
-# 14:03:52 >  "/usr/bin/python3" "alter-table-add-column-Bug-6816.py" 
"alter-table-add-column-Bug-6816"
-# 14:03:52 >  
-
-#CREATE TABLE "testVarcharToClob" ("varcharColumn" varchar(255));INSERT INTO 
"testVarcharToClob" VALUES ('value1'), ('value2');ALTER TABLE 
"testVarcharToClob" add "clobColumn" TEXT NULL;UPDATE "testVarcharToClob" SET 
"clobColumn" = "varcharColumn";ALTER TABLE "testVarcharToClob" drop 
"varcharColumn";
-#CREATE TABLE "testVarcharToClob" ("varcharColumn" varchar(255));INSERT INTO 
"testVarcharToClob" VALUES ('value1'), ('value2');ALTER TABLE 
"testVarcharToClob" add "clobColumn" TEXT NULL;UPDATE "testVarcharToClob" SET 
"clobColumn" = "varcharColumn";ALTER TABLE "testVarcharToClob" drop 
"varcharColumn";
-[ 2    ]
-#CREATE TABLE "testVarcharToClob" ("varcharColumn" varchar(255));INSERT INTO 
"testVarcharToClob" VALUES ('value1'), ('value2');ALTER TABLE 
"testVarcharToClob" add "clobColumn" TEXT NULL;UPDATE "testVarcharToClob" SET 
"clobColumn" = "varcharColumn";ALTER TABLE "testVarcharToClob" drop 
"varcharColumn";
-#CREATE TABLE "testVarcharToClob" ("varcharColumn" varchar(255));INSERT INTO 
"testVarcharToClob" VALUES ('value1'), ('value2');ALTER TABLE 
"testVarcharToClob" add "clobColumn" TEXT NULL;UPDATE "testVarcharToClob" SET 
"clobColumn" = "varcharColumn";ALTER TABLE "testVarcharToClob" drop 
"varcharColumn";
-[ 2    ]
-#CREATE TABLE "testVarcharToClob" ("varcharColumn" varchar(255));INSERT INTO 
"testVarcharToClob" VALUES ('value1'), ('value2');ALTER TABLE 
"testVarcharToClob" add "clobColumn" TEXT NULL;UPDATE "testVarcharToClob" SET 
"clobColumn" = "varcharColumn";ALTER TABLE "testVarcharToClob" drop 
"varcharColumn";
-#INSERT INTO "testVarcharToClob" VALUES ('value3');DROP TABLE 
"testVarcharToClob";
-[ 1    ]
-#INSERT INTO "testVarcharToClob" VALUES ('value3');DROP TABLE 
"testVarcharToClob";
-# MonetDB 5 server v11.35.10 (hg id: f9ad2ccd83b7)
-# 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 15.498 GiB available main-memory of which we use 12.631 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://localhost.localdomain:36405/
-# Listening for UNIX domain connection requests on 
mapi:monetdb:///var/tmp/mtest-147833/.s.monetdb.36405
-# MonetDB/GIS module loaded
-# SQL catalog created, loading sql scripts once
-# loading sql script: 09_like.sql
-# loading sql script: 10_math.sql
-# loading sql script: 12_url.sql
-# loading sql script: 13_date.sql
-# loading sql script: 14_inet.sql
-# loading sql script: 15_querylog.sql
-# loading sql script: 16_tracelog.sql
-# loading sql script: 17_temporal.sql
-# loading sql script: 18_index.sql
-# loading sql script: 20_vacuum.sql
-# loading sql script: 21_dependency_views.sql
-# loading sql script: 22_clients.sql
-# loading sql script: 23_skyserver.sql
-# loading sql script: 25_debug.sql
-# loading sql script: 26_sysmon.sql
-# loading sql script: 27_rejects.sql
-# loading sql script: 39_analytics.sql
-# loading sql script: 39_analytics_hge.sql
-# loading sql script: 40_geom.sql
-# loading sql script: 40_json.sql
-# loading sql script: 40_json_hge.sql
-# loading sql script: 41_md5sum.sql
-# loading sql script: 45_uuid.sql
-# loading sql script: 46_profiler.sql
-# loading sql script: 51_sys_schema_extension.sql
-# loading sql script: 60_wlcr.sql
-# loading sql script: 61_wlcr.sql
-# loading sql script: 72_fits.sql
-# loading sql script: 74_netcdf.sql
-# loading sql script: 75_lidar.sql
-# loading sql script: 75_shp.sql
-# loading sql script: 75_storagemodel.sql
-# loading sql script: 80_statistics.sql
-# loading sql script: 80_udf.sql
-# loading sql script: 80_udf_hge.sql
-# loading sql script: 85_bam.sql
-# loading sql script: 90_generator.sql
-# loading sql script: 90_generator_hge.sql
-# loading sql script: 99_system.sql
-# MonetDB/SQL module loaded
-
-# 14:03:53 >  
-# 14:03:53 >  "Done."
-# 14:03:53 >  
-
diff --git a/sql/test/BugTracker-2020/Tests/alter-table-add-column.Bug-6816.py 
b/sql/test/BugTracker-2020/Tests/alter-table-add-column.Bug-6816.py
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2020/Tests/alter-table-add-column.Bug-6816.py
@@ -0,0 +1,31 @@
+import sys
+
+try:
+    from MonetDBtesting import process
+except ImportError:
+    import process
+
+s = process.server(args = [], stdin = process.PIPE, stdout = process.PIPE, 
stderr = process.PIPE)
+c1 = process.client('sql', stdin = process.PIPE, stdout = process.PIPE, stderr 
= process.PIPE)
+c2 = process.client('sql', stdin = process.PIPE, stdout = process.PIPE, stderr 
= process.PIPE)
+
+out, err = c1.communicate('''\
+CREATE TABLE "testVarcharToClob" ("varcharColumn" varchar(255));\
+INSERT INTO "testVarcharToClob" VALUES ('value1'), ('value2');\
+ALTER TABLE "testVarcharToClob" add "clobColumn" TEXT NULL;\
+UPDATE "testVarcharToClob" SET "clobColumn" = "varcharColumn";\
+ALTER TABLE "testVarcharToClob" drop "varcharColumn";
+''')
+sys.stdout.write(out)
+sys.stderr.write(err)
+
+out, err = c2.communicate('''\
+INSERT INTO "testVarcharToClob" VALUES ('value3');\
+DROP TABLE "testVarcharToClob";
+''')
+sys.stdout.write(out)
+sys.stderr.write(err)
+
+out, err = s.communicate()
+sys.stdout.write(out)
+sys.stderr.write(err)
diff --git 
a/sql/test/BugTracker-2020/Tests/alter-table-add-column.Bug-6816.stable.err 
b/sql/test/BugTracker-2020/Tests/alter-table-add-column.Bug-6816.stable.err
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2020/Tests/alter-table-add-column.Bug-6816.stable.err
@@ -0,0 +1,24 @@
+stderr of test 'alter-table-add-column.Bug-6816` in directory 
'sql/test/BugTracker-2020` itself:
+
+
+# 14:03:52 >  
+# 14:03:52 >  "/usr/bin/python3" "alter-table-add-column.Bug-6816.py" 
"alter-table-add-column.Bug-6816"
+# 14:03:52 >  
+
+# builtin opt  gdk_dbpath = 
/home/ferreira/repositories/MonetDB-Nov2019/BUILD/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 = 36405
+# cmdline opt  mapi_usock = /var/tmp/mtest-147833/.s.monetdb.36405
+# cmdline opt  gdk_dbpath = 
/home/ferreira/repositories/MonetDB-Nov2019/BUILD/var/MonetDB/mTests_sql_test_BugTracker-2020
+
+# 14:03:53 >  
+# 14:03:53 >  "Done."
+# 14:03:53 >  
+
diff --git 
a/sql/test/BugTracker-2020/Tests/alter-table-add-column.Bug-6816.stable.out 
b/sql/test/BugTracker-2020/Tests/alter-table-add-column.Bug-6816.stable.out
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2020/Tests/alter-table-add-column.Bug-6816.stable.out
@@ -0,0 +1,35 @@
+stdout of test 'alter-table-add-column.Bug-6816` in directory 
'sql/test/BugTracker-2020` itself:
+
+
+# 14:03:52 >  
+# 14:03:52 >  "/usr/bin/python3" "alter-table-add-column.Bug-6816.py" 
"alter-table-add-column.Bug-6816"
+# 14:03:52 >  
+
+#CREATE TABLE "testVarcharToClob" ("varcharColumn" varchar(255));INSERT INTO 
"testVarcharToClob" VALUES ('value1'), ('value2');ALTER TABLE 
"testVarcharToClob" add "clobColumn" TEXT NULL;UPDATE "testVarcharToClob" SET 
"clobColumn" = "varcharColumn";ALTER TABLE "testVarcharToClob" drop 
"varcharColumn";
+#CREATE TABLE "testVarcharToClob" ("varcharColumn" varchar(255));INSERT INTO 
"testVarcharToClob" VALUES ('value1'), ('value2');ALTER TABLE 
"testVarcharToClob" add "clobColumn" TEXT NULL;UPDATE "testVarcharToClob" SET 
"clobColumn" = "varcharColumn";ALTER TABLE "testVarcharToClob" drop 
"varcharColumn";
+[ 2    ]
+#CREATE TABLE "testVarcharToClob" ("varcharColumn" varchar(255));INSERT INTO 
"testVarcharToClob" VALUES ('value1'), ('value2');ALTER TABLE 
"testVarcharToClob" add "clobColumn" TEXT NULL;UPDATE "testVarcharToClob" SET 
"clobColumn" = "varcharColumn";ALTER TABLE "testVarcharToClob" drop 
"varcharColumn";
+#CREATE TABLE "testVarcharToClob" ("varcharColumn" varchar(255));INSERT INTO 
"testVarcharToClob" VALUES ('value1'), ('value2');ALTER TABLE 
"testVarcharToClob" add "clobColumn" TEXT NULL;UPDATE "testVarcharToClob" SET 
"clobColumn" = "varcharColumn";ALTER TABLE "testVarcharToClob" drop 
"varcharColumn";
+[ 2    ]
+#CREATE TABLE "testVarcharToClob" ("varcharColumn" varchar(255));INSERT INTO 
"testVarcharToClob" VALUES ('value1'), ('value2');ALTER TABLE 
"testVarcharToClob" add "clobColumn" TEXT NULL;UPDATE "testVarcharToClob" SET 
"clobColumn" = "varcharColumn";ALTER TABLE "testVarcharToClob" drop 
"varcharColumn";
+#INSERT INTO "testVarcharToClob" VALUES ('value3');DROP TABLE 
"testVarcharToClob";
+[ 1    ]
+#INSERT INTO "testVarcharToClob" VALUES ('value3');DROP TABLE 
"testVarcharToClob";
+# MonetDB 5 server v11.35.10 (hg id: f9ad2ccd83b7)
+# 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 15.498 GiB available main-memory of which we use 12.631 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://localhost.localdomain:36405/
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to