Changeset: ae44176b4f92 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ae44176b4f92 Added Files: sql/test/BugTracker-2018/Tests/multi-column-hash-wrongly-NIL.Bug-6638.sql sql/test/BugTracker-2018/Tests/multi-column-hash-wrongly-NIL.Bug-6638.stable.err sql/test/BugTracker-2018/Tests/multi-column-hash-wrongly-NIL.Bug-6638.stable.out Modified Files: monetdb5/modules/atoms/mtime.c sql/test/BugTracker-2016/Tests/timestamp_with_tz_fromstr.Bug-4019.stable.err sql/test/BugTracker-2016/Tests/timestamp_with_tz_fromstr.Bug-4019.stable.out sql/test/BugTracker-2018/Tests/All Branch: Aug2018 Log Message:
Merge with Mar2018 branch. diffs (truncated from 936 to 300 lines): diff --git a/monetdb5/modules/atoms/mtime.c b/monetdb5/modules/atoms/mtime.c --- a/monetdb5/modules/atoms/mtime.c +++ b/monetdb5/modules/atoms/mtime.c @@ -250,7 +250,7 @@ static date DATE_MAX, DATE_MIN; /* ofte #define MONTHDAYS(m,y) ((m) != 2 ? LEAPDAYS[m] : leapyear(y) ? 29 : 28) #define YEARDAYS(y) (leapyear(y) ? 366 : 365) #define DATE(d,m,y) ((m) > 0 && (m) <= 12 && (d) > 0 && (y) != 0 && (y) >= YEAR_MIN && (y) <= YEAR_MAX && (d) <= MONTHDAYS(m, y)) -#define TIME(h,m,s,x) ((h) >= 0 && (h) < 24 && (m) >= 0 && (m) < 60 && (s) >= 0 && (s) < 60 && (x) >= 0 && (x) < 1000) +#define TIME(h,m,s,x) ((h) >= 0 && (h) < 24 && (m) >= 0 && (m) < 60 && (s) >= 0 && (s) <= 60 && (x) >= 0 && (x) < 1000) #define LOWER(c) ((c) >= 'A' && (c) <= 'Z' ? (c) + 'a' - 'A' : (c)) /* diff --git a/sql/test/BugTracker-2016/Tests/timestamp_with_tz_fromstr.Bug-4019.stable.err b/sql/test/BugTracker-2016/Tests/timestamp_with_tz_fromstr.Bug-4019.stable.err --- a/sql/test/BugTracker-2016/Tests/timestamp_with_tz_fromstr.Bug-4019.stable.err +++ b/sql/test/BugTracker-2016/Tests/timestamp_with_tz_fromstr.Bug-4019.stable.err @@ -28,14 +28,6 @@ stderr of test 'timestamp_with_tz_fromst # 16:31:49 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-1703" "--port=32740" # 16:31:49 > -MAPI = (monetdb) /var/tmp/mtest-1703/.s.monetdb.32740 -QUERY = select cast('2015-12-08T00:46:60' as timestamp); -ERROR = !Timestamp (2015-12-08T00:46:60) has incorrect format -CODE = 22007 -MAPI = (monetdb) /var/tmp/mtest-30274/.s.monetdb.37685 -QUERY = select cast('2015-12-08 00:46:60' as timestamp); -ERROR = !Timestamp (2015-12-08 00:46:60) has incorrect format -CODE = 22007 # 16:31:49 > # 16:31:49 > "Done." diff --git a/sql/test/BugTracker-2016/Tests/timestamp_with_tz_fromstr.Bug-4019.stable.out b/sql/test/BugTracker-2016/Tests/timestamp_with_tz_fromstr.Bug-4019.stable.out --- a/sql/test/BugTracker-2016/Tests/timestamp_with_tz_fromstr.Bug-4019.stable.out +++ b/sql/test/BugTracker-2016/Tests/timestamp_with_tz_fromstr.Bug-4019.stable.out @@ -25,6 +25,18 @@ Ready. # 16:31:49 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-1703" "--port=32740" # 16:31:49 > +#select cast('2015-12-08T00:46:60' as timestamp); +% .L2 # table_name +% L2 # name +% timestamp # type +% 26 # length +[ 2015-12-08 00:47:00.000000 ] +#select cast('2015-12-08 00:46:60' as timestamp); +% .L2 # table_name +% L2 # name +% timestamp # type +% 26 # length +[ 2015-12-08 00:47:00.000000 ] # 16:31:49 > # 16:31:49 > "Done." diff --git a/sql/test/BugTracker-2018/Tests/All b/sql/test/BugTracker-2018/Tests/All --- a/sql/test/BugTracker-2018/Tests/All +++ b/sql/test/BugTracker-2018/Tests/All @@ -78,3 +78,4 @@ singleton-stddev.Bug-6627 create_table_if_not_exists_returns_42000.Bug-6629 sqlitelogictest-cast-null-add.Bug-6630 ilike-foreign-characters.Bug-6633 +multi-column-hash-wrongly-NIL.Bug-6638 diff --git a/sql/test/BugTracker-2018/Tests/multi-column-hash-wrongly-NIL.Bug-6638.sql b/sql/test/BugTracker-2018/Tests/multi-column-hash-wrongly-NIL.Bug-6638.sql new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2018/Tests/multi-column-hash-wrongly-NIL.Bug-6638.sql @@ -0,0 +1,77 @@ + +-- sample value constellationa where multi-column joins drop results +-- (false-negatives) because (sequences of) mkey.bulk_rotate_xor_hash() +-- produce NIL (which then does not match/join) + +start transaction; + +create table r2 (a bigint, b bigint, x bigint generated always as identity primary key); +insert into r2 (a,b) values (11,21),(12,22),(13,23),(2199023255552,0),(0,2199023255552),(6597069766656,1),(1,6597069766656),(4398046511104,-9223372036854775807),(-9223372036854775807,4398046511104),(1,-9223372036850581504),(-9223372036850581504,1),(-1,9223372036854775807),(9223372036854775807,-1); +create table s2 as (select a, b, -x as y from r2 order by x desc) with data; +select * from r2; +select * from s2; +select * from r2 natural join s2 order by x,y; +select * from s2 natural join r2 order by x,y; + +create table r3 (a bigint, b bigint, c bigint, x bigint generated always as identity primary key); +insert into r3 (a,b,c) values (11,21,31),(12,22,32),(13,23,33),(2147483648,0,0),(0,2147483648,0),(0,0,2147483648),(140737488355328,0,0),(0,140737488355328,0),(0,0,140737488355328); +create table s3 as (select a, b, c, -x as y from r3 order by x desc) with data; +select * from r3; +select * from s3; +select * from r3 natural join s3 order by x,y; +select * from s3 natural join r3 order by x,y; + +create table r4 (a bigint, b bigint, c bigint, d bigint, x bigint generated always as identity primary key); +insert into r4 (a,b,c,d) values (11,21,31,41),(12,22,32,42),(13,23,33,43),(16777216,0,0,0),(0,16777216,0,0),(0,0,16777216,0),(0,0,0,16777216),(1125899906842624,0,0,0),(0,1125899906842624,0,0),(0,0,1125899906842624,0),(0,0,0,1125899906842624); +create table s4 as (select a, b, c, d, -x as y from r4 order by x desc) with data; +select * from r4; +select * from s4; +select * from r4 natural join s4 order by x,y; +select * from s4 natural join r4 order by x,y; + +create table r5 (a bigint, b bigint, c bigint, d bigint, e bigint, x bigint generated always as identity primary key); +insert into r5 (a,b,c,d,e) values (11,21,31,41,51),(12,22,32,42,52),(13,23,33,43,53),(524288,0,0,0,0),(0,524288,0,0,0),(0,0,524288,0,0),(0,0,0,524288,0),(0,0,0,0,524288),(4503599627370496,0,0,0,0),(0,4503599627370496,0,0,0),(0,0,4503599627370496,0,0),(0,0,0,4503599627370496,0),(0,0,0,0,4503599627370496); +create table s5 as (select a, b, c, d, e, -x as y from r5 order by x desc) with data; +select * from r5; +select * from s5; +select * from r5 natural join s5 order by x,y; +select * from s5 natural join r5 order by x,y; + +create table r6 (a bigint, b bigint, c bigint, d bigint, e bigint, f bigint, x bigint generated always as identity primary key); +insert into r6 (a,b,c,d,e,f) values (11,21,31,41,51,61),(12,22,32,42,52,62),(13,23,33,43,53,63),(8192,0,0,0,0,0),(0,8192,0,0,0,0),(0,0,8192,0,0,0),(0,0,0,8192,0,0),(0,0,0,0,8192,0),(0,0,0,0,0,8192),(9007199254740992,0,0,0,0,0),(0,9007199254740992,0,0,0,0),(0,0,9007199254740992,0,0,0),(0,0,0,9007199254740992,0,0),(0,0,0,0,9007199254740992,0),(0,0,0,0,0,9007199254740992); +create table s6 as (select a, b, c, d, e, f, -x as y from r6 order by x desc) with data; +select * from r6; +select * from s6; +select * from r6 natural join s6 order by x,y; +select * from s6 natural join r6 order by x,y; + +create table r7 (a bigint, b bigint, c bigint, d bigint, e bigint, f bigint, g bigint, x bigint generated always as identity primary key); +insert into r7 (a,b,c,d,e,f,g) values (11,21,31,41,51,61,71),(12,22,32,42,52,62,72),(13,23,33,43,53,63,73),(32768,0,0,0,0,0,0),(0,32768,0,0,0,0,0),(0,0,32768,0,0,0,0),(0,0,0,32768,0,0,0),(0,0,0,0,32768,0,0),(0,0,0,0,0,32768,0),(0,0,0,0,0,0,32768),(36028797018963968,0,0,0,0,0,0),(0,36028797018963968,0,0,0,0,0),(0,0,36028797018963968,0,0,0,0),(0,0,0,36028797018963968,0,0,0),(0,0,0,0,36028797018963968,0,0),(0,0,0,0,0,36028797018963968,0),(0,0,0,0,0,0,36028797018963968); +create table s7 as (select a, b, c, d, e, f, g, -x as y from r7 order by x desc) with data; +select * from r7; +select * from s7; +select * from r7 natural join s7 order by x,y; +select * from s7 natural join r7 order by x,y; + +create table r8 (a bigint, b bigint, c bigint, d bigint, e bigint, f bigint, g bigint, h bigint, x bigint generated always as identity primary key); +insert into r8 (a,b,c,d,e,f,g,h) values (11,21,31,41,51,61,71,81),(12,22,32,42,52,62,72,82),(13,23,33,43,53,63,73,83),(128,0,0,0,0,0,0,0),(0,128,0,0,0,0,0,0),(0,0,128,0,0,0,0,0),(0,0,0,128,0,0,0,0),(0,0,0,0,128,0,0,0),(0,0,0,0,0,128,0,0),(0,0,0,0,0,0,128,0),(0,0,0,0,0,0,0,128),(36028797018963968,0,0,0,0,0,0,0),(0,36028797018963968,0,0,0,0,0,0),(0,0,36028797018963968,0,0,0,0,0),(0,0,0,36028797018963968,0,0,0,0),(0,0,0,0,36028797018963968,0,0,0),(0,0,0,0,0,36028797018963968,0,0),(0,0,0,0,0,0,36028797018963968,0),(0,0,0,0,0,0,0,36028797018963968); +create table s8 as (select a, b, c, d, e, f, g, h, -x as y from r8 order by x desc) with data; +select * from r8; +select * from s8; +select * from r8 natural join s8 order by x,y; +select * from s8 natural join r8 order by x,y; + +create table r9 (a bigint, b bigint, c bigint, d bigint, e bigint, f bigint, g bigint, h bigint, i bigint, x bigint generated always as identity primary key); +insert into r9 (a,b,c,d,e,f,g,h,i) values (11,21,31,41,51,61,71,81,91),(12,22,32,42,52,62,72,82,92),(13,23,33,43,53,63,73,83,93),(128,0,0,0,0,0,0,0,0),(0,128,0,0,0,0,0,0,0),(0,0,128,0,0,0,0,0,0),(0,0,0,128,0,0,0,0,0),(0,0,0,0,128,0,0,0,0),(0,0,0,0,0,128,0,0,0),(0,0,0,0,0,0,128,0,0),(0,0,0,0,0,0,0,128,0),(0,0,0,0,0,0,0,0,128),(72057594037927936,0,0,0,0,0,0,0,0),(0,72057594037927936,0,0,0,0,0,0,0),(0,0,72057594037927936,0,0,0,0,0,0),(0,0,0,72057594037927936,0,0,0,0,0),(0,0,0,0,72057594037927936,0,0,0,0),(0,0,0,0,0,72057594037927936,0,0,0),(0,0,0,0,0,0,72057594037927936,0,0),(0,0,0,0,0,0,0,72057594037927936,0),(0,0,0,0,0,0,0,0,72057594037927936); +create table s9 as (select a, b, c, d, e, f, g, h, i, -x as y from r9 order by x desc) with data; +select * from r9; +select * from s9; +select * from r9 natural join s9 order by x,y; +select * from s9 natural join r9 order by x,y; + +alter table r2 add constraint ab_unique unique (a,b); +insert into r2 (a,b) values (2199023255552,0); +select * from r2; + +rollback; + diff --git a/sql/test/BugTracker-2018/Tests/multi-column-hash-wrongly-NIL.Bug-6638.stable.err b/sql/test/BugTracker-2018/Tests/multi-column-hash-wrongly-NIL.Bug-6638.stable.err new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2018/Tests/multi-column-hash-wrongly-NIL.Bug-6638.stable.err @@ -0,0 +1,43 @@ +stderr of test 'multi-column-hash-wrongly-NIL.Bug-6638` in directory 'sql/test/BugTracker-2018` itself: + + +# 16:21:04 > +# 16:21:04 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" "mapi_open=true" "--set" "mapi_port=34059" "--set" "mapi_usock=/var/tmp/mtest-9105/.s.monetdb.34059" "--set" "monet_prompt=" "--forcemito" "--dbpath=/ufs/manegold/_/Monet/release/prefix/_/var/MonetDB/mTests_sql_test_BugTracker-2018" "--set" "embedded_c=true" +# 16:21:04 > + +# builtin opt gdk_dbpath = /ufs/manegold/_/Monet/release/prefix/_/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 = 34059 +# cmdline opt mapi_usock = /var/tmp/mtest-9105/.s.monetdb.34059 +# cmdline opt monet_prompt = +# cmdline opt gdk_dbpath = /ufs/manegold/_/Monet/release/prefix/_/var/MonetDB/mTests_sql_test_BugTracker-2018 +# cmdline opt embedded_c = true +# cmdline opt gdk_debug = 553648138 + +# 16:21:04 > +# 16:21:04 > "mclient" "-lsql" "-ftest" "-tnone" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-9105" "--port=34059" +# 16:21:04 > + +MAPI = (monetdb) /var/tmp/mtest-16700/.s.monetdb.33530 +QUERY = insert into r2 (a,b) values (2199023255552,0); +ERROR = !INSERT INTO: UNIQUE constraint 'r2.ab_unique' violated +CODE = M0M29 +MAPI = (monetdb) /var/tmp/mtest-16700/.s.monetdb.33530 +QUERY = select * from r2; +ERROR = !Current transaction is aborted (please ROLLBACK) +CODE = 25005 + +# 16:21:04 > +# 16:21:04 > "Done." +# 16:21:04 > + diff --git a/sql/test/BugTracker-2018/Tests/multi-column-hash-wrongly-NIL.Bug-6638.stable.out b/sql/test/BugTracker-2018/Tests/multi-column-hash-wrongly-NIL.Bug-6638.stable.out new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2018/Tests/multi-column-hash-wrongly-NIL.Bug-6638.stable.out @@ -0,0 +1,741 @@ +stdout of test 'multi-column-hash-wrongly-NIL.Bug-6638` in directory 'sql/test/BugTracker-2018` itself: + + +# 16:21:04 > +# 16:21:04 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" "mapi_open=true" "--set" "mapi_port=34059" "--set" "mapi_usock=/var/tmp/mtest-9105/.s.monetdb.34059" "--set" "monet_prompt=" "--forcemito" "--dbpath=/ufs/manegold/_/Monet/release/prefix/_/var/MonetDB/mTests_sql_test_BugTracker-2018" "--set" "embedded_c=true" +# 16:21:04 > + +# MonetDB 5 server v11.29.8 +# This is an unreleased version +# Serving database 'mTests_sql_test_BugTracker-2018', using 4 threads +# Compiled for x86_64-pc-linux-gnu/64bit with 128bit integers +# Found 31.309 GiB available main-memory. +# Copyright (c) 1993 - July 2008 CWI. +# Copyright (c) August 2008 - 2018 MonetDB B.V., all rights reserved +# Visit https://www.monetdb.org/ for further information +# Listening for connection requests on mapi:monetdb://earth.da.cwi.nl:34059/ +# Listening for UNIX domain connection requests on mapi:monetdb:///var/tmp/mtest-9105/.s.monetdb.34059 +# MonetDB/GIS module loaded +# MonetDB/SQL module loaded + +Ready. +# SQL catalog created, loading sql scripts once +# loading sql script: 09_like.sql +# loading sql script: 10_math.sql +# loading sql script: 11_times.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_functions.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: 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 + +# 16:21:04 > +# 16:21:04 > "mclient" "-lsql" "-ftest" "-tnone" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-9105" "--port=34059" +# 16:21:04 > + +#start transaction; +#create table r2 (a bigint, b bigint, x bigint generated always as identity primary key); +#insert into r2 (a,b) values (11,21),(12,22),(13,23),(2199023255552,0),(0,2199023255552),(6597069766656,1),(1,6597069766656),(4398046511104,-9223372036854775807),(-9223372036854775807,4398046511104),(1,-9223372036850581504),(-9223372036850581504,1),(-1,9223372036854775807),(9223372036854775807,-1); +[ 13 ] +#create table s2 as (select a, b, -x as y from r2 order by x desc) with data; +#select * from r2; +% sys.r2, sys.r2, sys.r2 # table_name +% a, b, x # name +% bigint, bigint, bigint # type +% 20, 20, 2 # length +[ 11, 21, 1 ] +[ 12, 22, 2 ] +[ 13, 23, 3 ] +[ 2199023255552, 0, 4 ] +[ 0, 2199023255552, 5 ] +[ 6597069766656, 1, 6 ] +[ 1, 6597069766656, 7 ] +[ 4398046511104, -9223372036854775807, 8 ] +[ -9223372036854775807, 4398046511104, 9 ] +[ 1, -9223372036850581504, 10 ] +[ -9223372036850581504, 1, 11 ] +[ -1, 9223372036854775807, 12 ] +[ 9223372036854775807, -1, 13 ] +#select * from s2; +% sys.s2, sys.s2, sys.s2 # table_name +% a, b, y # name +% bigint, bigint, bigint # type +% 20, 20, 3 # length +[ 9223372036854775807, -1, -13 ] +[ -1, 9223372036854775807, -12 ] +[ -9223372036850581504, 1, -11 ] +[ 1, -9223372036850581504, -10 ] +[ -9223372036854775807, 4398046511104, -9 ] +[ 4398046511104, -9223372036854775807, -8 ] +[ 1, 6597069766656, -7 ] +[ 6597069766656, 1, -6 ] +[ 0, 2199023255552, -5 ] +[ 2199023255552, 0, -4 ] _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list