Changeset: ce174124a3f7 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ce174124a3f7
Modified Files:
        sql/backends/monet5/rel_bin.c
        
sql/test/BugTracker-2017/Tests/crash_after_oidx_on_sys_statistics.Bug-6251.sql
        
sql/test/BugTracker-2017/Tests/crash_after_oidx_on_sys_statistics.Bug-6251.stable.out
        sql/test/BugTracker-2019/Tests/view-where-cast-error.Bug-6712.stable.err
        sql/test/BugTracker-2019/Tests/view-where-cast-error.Bug-6712.stable.out
Branch: Apr2019
Log Message:

Don't output the row with type value timestamp from bug 6251 test.

On Windows the timestamp precision is less tan on UNIX, so the output values of 
stamp column are the same, causing wrong output. At the same time, there is a 
probability for all values of stamp column to generated with the same 
timestamp, making the test non-deterministic.

Also backported recent bugfixes from Nov2019 branch.


diffs (130 lines):

diff --git a/sql/backends/monet5/rel_bin.c b/sql/backends/monet5/rel_bin.c
--- a/sql/backends/monet5/rel_bin.c
+++ b/sql/backends/monet5/rel_bin.c
@@ -509,7 +509,7 @@ exp_bin(backend *be, sql_exp *e, stmt *l
                }
                if (!l)
                        return NULL;
-               s = stmt_convert(be, l, from, to, sel);
+               s = stmt_convert(be, l, from, to, NULL);
        }       break;
        case e_func: {
                node *en;
diff --git 
a/sql/test/BugTracker-2017/Tests/crash_after_oidx_on_sys_statistics.Bug-6251.sql
 
b/sql/test/BugTracker-2017/Tests/crash_after_oidx_on_sys_statistics.Bug-6251.sql
--- 
a/sql/test/BugTracker-2017/Tests/crash_after_oidx_on_sys_statistics.Bug-6251.sql
+++ 
b/sql/test/BugTracker-2017/Tests/crash_after_oidx_on_sys_statistics.Bug-6251.sql
@@ -2,16 +2,16 @@ DELETE FROM sys.statistics;
 
 -- fill sys.statistics
 ANALYZE sys.statistics;
-SELECT /*column_id,*/ type, width, /*stamp,*/ "sample", count, "unique", nils, 
/*minval,*/ /*maxval,*/ sorted, revsorted FROM sys.statistics ORDER BY 
column_id;
+SELECT /*column_id,*/ "type", width, /*stamp,*/ "sample", "count", "unique", 
nils, /*minval,*/ /*maxval,*/ sorted, revsorted FROM sys.statistics WHERE 
"type" <> 'timestamp' ORDER BY column_id;
 
 -- update the values of: sample, count, unique, nils, minval, maxval, sorted, 
revsorted of sys.statistics
 ANALYZE sys.statistics;
-SELECT /*column_id,*/ type, width, /*stamp,*/ "sample", count, "unique", nils, 
/*minval,*/ /*maxval,*/ sorted, revsorted FROM sys.statistics ORDER BY 
column_id;
+SELECT /*column_id,*/ "type", width, /*stamp,*/ "sample", "count", "unique", 
nils, /*minval,*/ /*maxval,*/ sorted, revsorted FROM sys.statistics WHERE 
"type" <> 'timestamp' ORDER BY column_id;
 
 -- ALTER TABLE sys.statistics SET READ ONLY;
 
 CREATE ORDERED INDEX stat_oidx ON sys.statistics (width);
-SELECT /*column_id,*/ type, width, /*stamp,*/ "sample", count, "unique", nils, 
/*minval,*/ /*maxval,*/ sorted, revsorted FROM sys.statistics ORDER BY 
column_id;
+SELECT /*column_id,*/ "type", width, /*stamp,*/ "sample", "count", "unique", 
nils, /*minval,*/ /*maxval,*/ sorted, revsorted FROM sys.statistics WHERE 
"type" <> 'timestamp' ORDER BY column_id;
 -- now mserver5 is crashed !!
 
 -- ALTER TABLE sys.statistics SET READ WRITE;
diff --git 
a/sql/test/BugTracker-2017/Tests/crash_after_oidx_on_sys_statistics.Bug-6251.stable.out
 
b/sql/test/BugTracker-2017/Tests/crash_after_oidx_on_sys_statistics.Bug-6251.stable.out
--- 
a/sql/test/BugTracker-2017/Tests/crash_after_oidx_on_sys_statistics.Bug-6251.stable.out
+++ 
b/sql/test/BugTracker-2017/Tests/crash_after_oidx_on_sys_statistics.Bug-6251.stable.out
@@ -16,11 +16,6 @@ stdout of test 'crash_after_oidx_on_sys_
 # Listening for connection requests on mapi:monetdb://toulouse.da.cwi.nl:32740/
 # Listening for UNIX domain connection requests on 
mapi:monetdb:///var/tmp/mtest-1294/.s.monetdb.32740
 # MonetDB/GIS module loaded
-# MonetDB/SQL module loaded
-# MonetDB/Python module loaded
-# MonetDB/R   module loaded
-
-Ready.
 # SQL catalog created, loading sql scripts once
 # loading sql script: 09_like.sql
 # loading sql script: 10_math.sql
@@ -61,6 +56,9 @@ Ready.
 # loading sql script: 90_generator.sql
 # loading sql script: 90_generator_hge.sql
 # loading sql script: 99_system.sql
+# MonetDB/SQL module loaded
+
+Ready.
 
 # 17:38:15 >  
 # 17:38:15 >  "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-1294" "--port=32740"
@@ -72,11 +70,10 @@ Ready.
 % sys.statistics,      sys.statistics, sys.statistics, sys.statistics, 
sys.statistics, sys.statistics, sys.statistics, sys.statistics # table_name
 % type,        width,  sample, count,  unique, nils,   sorted, revsorted # name
 % clob,        int,    bigint, bigint, bigint, bigint, boolean,        boolean 
# type
-% 9,   1,      1,      1,      1,      1,      5,      5 # length
+% 7,   1,      1,      1,      1,      1,      5,      5 # length
 [ "int",       4,      0,      0,      0,      0,      true,   true    ]
 [ "clob",      1,      0,      0,      0,      0,      true,   true    ]
 [ "int",       4,      0,      0,      0,      0,      true,   true    ]
-[ "timestamp", 8,      0,      0,      0,      0,      true,   true    ]
 [ "bigint",    8,      0,      0,      0,      0,      true,   true    ]
 [ "bigint",    8,      0,      0,      0,      0,      true,   true    ]
 [ "bigint",    8,      0,      0,      0,      0,      true,   true    ]
@@ -89,11 +86,10 @@ Ready.
 % sys.statistics,      sys.statistics, sys.statistics, sys.statistics, 
sys.statistics, sys.statistics, sys.statistics, sys.statistics # table_name
 % type,        width,  sample, count,  unique, nils,   sorted, revsorted # name
 % clob,        int,    bigint, bigint, bigint, bigint, boolean,        boolean 
# type
-% 9,   1,      2,      2,      2,      2,      5,      5 # length
+% 7,   1,      2,      2,      2,      2,      5,      5 # length
 [ "int",       4,      12,     12,     12,     0,      true,   false   ]
 [ "clob",      1,      12,     12,     5,      0,      false,  false   ]
 [ "int",       4,      12,     12,     3,      0,      false,  false   ]
-[ "timestamp", 8,      12,     12,     1,      0,      true,   true    ]
 [ "bigint",    8,      12,     12,     1,      0,      true,   true    ]
 [ "bigint",    8,      12,     12,     1,      0,      true,   true    ]
 [ "bigint",    8,      12,     12,     1,      0,      true,   true    ]
@@ -107,11 +103,10 @@ Ready.
 % sys.statistics,      sys.statistics, sys.statistics, sys.statistics, 
sys.statistics, sys.statistics, sys.statistics, sys.statistics # table_name
 % type,        width,  sample, count,  unique, nils,   sorted, revsorted # name
 % clob,        int,    bigint, bigint, bigint, bigint, boolean,        boolean 
# type
-% 9,   1,      2,      2,      2,      2,      5,      5 # length
+% 7,   1,      2,      2,      2,      2,      5,      5 # length
 [ "int",       4,      12,     12,     12,     0,      true,   false   ]
 [ "clob",      1,      12,     12,     5,      0,      false,  false   ]
 [ "int",       4,      12,     12,     3,      0,      false,  false   ]
-[ "timestamp", 8,      12,     12,     1,      0,      true,   true    ]
 [ "bigint",    8,      12,     12,     1,      0,      true,   true    ]
 [ "bigint",    8,      12,     12,     1,      0,      true,   true    ]
 [ "bigint",    8,      12,     12,     1,      0,      true,   true    ]
diff --git 
a/sql/test/BugTracker-2019/Tests/view-where-cast-error.Bug-6712.stable.err 
b/sql/test/BugTracker-2019/Tests/view-where-cast-error.Bug-6712.stable.err
--- a/sql/test/BugTracker-2019/Tests/view-where-cast-error.Bug-6712.stable.err
+++ b/sql/test/BugTracker-2019/Tests/view-where-cast-error.Bug-6712.stable.err
@@ -26,6 +26,10 @@ stderr of test 'view-where-cast-error.Bu
 # 19:39:23 >  "mclient" "-lsql" "-ftest" "-tnone" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-12898" "--port=32246"
 # 19:39:23 >  
 
+MAPI  = (monetdb) /var/tmp/mtest-26695/.s.monetdb.39335
+QUERY = select id from executiontimes where cast(value as bigint) > 80000;
+ERROR = !conversion of string '3.15.0' to type lng failed.
+CODE  = 22018
 
 # 19:39:23 >  
 # 19:39:23 >  "Done."
diff --git 
a/sql/test/BugTracker-2019/Tests/view-where-cast-error.Bug-6712.stable.out 
b/sql/test/BugTracker-2019/Tests/view-where-cast-error.Bug-6712.stable.out
--- a/sql/test/BugTracker-2019/Tests/view-where-cast-error.Bug-6712.stable.out
+++ b/sql/test/BugTracker-2019/Tests/view-where-cast-error.Bug-6712.stable.out
@@ -79,13 +79,6 @@ Ready.
 #INSERT INTO x VALUES (3, 'executiontime', '96715');
 [ 1    ]
 #create view executiontimes as select * from x where attribute = 
'executiontime';
-#select id from executiontimes where cast(value as bigint) > 80000;
-% sys.executiontimes # table_name
-% id # name
-% int # type
-% 1 # length
-[ 1    ]
-[ 3    ]
 #rollback;
 
 # 19:39:23 >  
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to