Changeset: d3702e71c788 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d3702e71c788
Modified Files:
        sql/backends/monet5/rel_bin.c
Branch: default
Log Message:

Merge with Oct2020 branch.


diffs (144 lines):

diff --git a/gdk/gdk_system.c b/gdk/gdk_system.c
--- a/gdk/gdk_system.c
+++ b/gdk/gdk_system.c
@@ -342,7 +342,7 @@ void *
 MT_thread_getdata(void)
 {
        if (threadslot == TLS_OUT_OF_INDEXES)
-               return;
+               return NULL;
        struct winthread *w = TlsGetValue(threadslot);
 
        return w ? w->data : NULL;
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
@@ -4401,7 +4401,6 @@ join_updated_pkey(backend *be, sql_key *
                if (updates[c->c->colnr]) {
                        upd = updates[c->c->colnr];
                } else {
-                       assert(0);
                        upd = stmt_project(be, tids, stmt_col(be, c->c, dels, 
dels->partition));
                }
                if (c->c->null) {       /* new nulls (MATCH SIMPLE) */
diff --git a/sql/test/SQLancer/Tests/sqlancer09.sql 
b/sql/test/SQLancer/Tests/sqlancer09.sql
--- a/sql/test/SQLancer/Tests/sqlancer09.sql
+++ b/sql/test/SQLancer/Tests/sqlancer09.sql
@@ -305,3 +305,49 @@ ROLLBACK;
 select 
(-1.7976931348623157E308)/(0.98067827792867723335490381941781379282474517822265625);
 --error, overflow
 
 values (round(-1.4999792343698102e+308, 15)),(1.2); --error, overflow?
+
+START TRANSACTION;
+CREATE TABLE "sys"."t2" ("c0" REAL NOT NULL, "c1" DECIMAL(15,3),
+       CONSTRAINT "t2_c0_pkey" PRIMARY KEY ("c0"),
+       CONSTRAINT "t2_c0_unique" UNIQUE ("c0"),
+       CONSTRAINT "t2_c0_c1_unique" UNIQUE ("c0", "c1")
+);
+COPY 33 RECORDS INTO "sys"."t2" FROM stdin USING DELIMITERS E'\t',E'\n','"';
+26     0.991
+0.13630049     37.000
+0.51769805     0.784
+-1.6852343e+09 NULL
+0.21530622     NULL
+113.135216     NULL
+1.0975889      0.000
+0.5668781      0.163
+0.07123395     0.808
+0.8320952      NULL
+0.35641629     NULL
+1.4285428e+12  NULL
+0.5716349      0.925
+-1.1734946e+08 0.000
+0.030607125    0.874
+0.83317256     0.000
+-1.7515901e+09 0.246
+5.855687e+08   0.630
+0.6815483      NULL
+0.0059321974   NULL
+0.8218823      0.960
+-4.015704e+08  0.000
+0.34888306     NULL
+-0.5051734     NULL
+0.34162566     NULL
+-1.0525191e+09 -1697412576.000
+0.5970499      NULL
+8.183423e+08   0.664
+0.5821468      0.721
+1.7945473e+09  1535759864.000
+0.24326971     0.329
+-1.0841585e+09 NULL
+10098  0.846
+
+ALTER TABLE t2 ADD CONSTRAINT "t2_c0_c1_fkey" FOREIGN KEY ("c0", "c1") 
REFERENCES "sys"."t2" ("c0", "c1");
+update t2 set c1 = 0.012427403386733981704992402228526771068572998046875 where 
(((t2.c0)%(t2.c1))) between symmetric 
+(coalesce(-1053775800, 991217471)) and (((0.6974006550632457)+(1832026960)));
+ROLLBACK;
diff --git a/sql/test/SQLancer/Tests/sqlancer09.stable.err 
b/sql/test/SQLancer/Tests/sqlancer09.stable.err
--- a/sql/test/SQLancer/Tests/sqlancer09.stable.err
+++ b/sql/test/SQLancer/Tests/sqlancer09.stable.err
@@ -43,6 +43,11 @@ MAPI  = (monetdb) /var/tmp/mtest-164664/
 QUERY = values (round(-1.4999792343698102e+308, 15)),(1.2); --error, overflow?
 ERROR = !Overflow in round
 CODE  = 22003
+MAPI  = (monetdb) /var/tmp/mtest-24399/.s.monetdb.36745
+QUERY = update t2 set c1 = 
0.012427403386733981704992402228526771068572998046875 where (((t2.c0)%(t2.c1))) 
between symmetric 
+        (coalesce(-1053775800, 991217471)) and 
(((0.6974006550632457)+(1832026960)));
+ERROR = !division by zero.
+CODE  = 22012
 
 # 14:35:03 >  
 # 14:35:03 >  "Done."
diff --git a/sql/test/SQLancer/Tests/sqlancer09.stable.out 
b/sql/test/SQLancer/Tests/sqlancer09.stable.out
--- a/sql/test/SQLancer/Tests/sqlancer09.stable.out
+++ b/sql/test/SQLancer/Tests/sqlancer09.stable.out
@@ -282,6 +282,49 @@ stdout of test 'sqlancer09` in directory
 #0.565 "0.8224972062481081"
 [ 7    ]
 #ROLLBACK;
+#START TRANSACTION;
+#create view v18(vc0) as (values (cast(((r'-W<~>頃')not like(r'8')) as 
bigint)), (case when least(((0.4)>(0.4)), case when true
+#then true when false then true when false then false when true then true else 
true end) then ((least(0.5,
+#343))/(abs(2.017526512E9))) else cast(greatest(-23, 33) as decimal) end)) 
with check option;
+#create view v21(vc0) as (values (greatest(cast(42 as real), ((0.353)*(-3))))) 
with check option;
+#create view v24(vc0) as (values (0.22)) with check option;
+#ROLLBACK;
+#START TRANSACTION;
+#CREATE TABLE "sys"."t2" ("c0" REAL NOT NULL, "c1" DECIMAL(15,3),
+#      CONSTRAINT "t2_c0_pkey" PRIMARY KEY ("c0"),
+#      CONSTRAINT "t2_c0_unique" UNIQUE ("c0"),
+#      CONSTRAINT "t2_c0_c1_unique" UNIQUE ("c0", "c1")
+#);
+#COPY 33 RECORDS INTO "sys"."t2" FROM stdin USING DELIMITERS E'\t',E'\n','"';
+#26    0.991
+#0.13630049    37.000
+#0.51769805    0.784
+#-1.6852343e+09        NULL
+#0.21530622    NULL
+#113.135216    NULL
+#1.0975889     0.000
+#0.5668781     0.163
+#0.07123395    0.808
+#0.8320952     NULL
+#0.35641629    NULL
+#1.4285428e+12 NULL
+#0.5716349     0.925
+#-1.1734946e+08        0.000
+#0.030607125   0.874
+#0.83317256    0.000
+#-1.7515901e+09        0.246
+#5.855687e+08  0.630
+#0.6815483     NULL
+#0.0059321974  NULL
+#0.8218823     0.960
+#-4.015704e+08 0.000
+#0.34888306    NULL
+#-0.5051734    NULL
+#0.34162566    NULL
+#-1.0525191e+09        -1697412576.000
+[ 33   ]
+#ALTER TABLE t2 ADD CONSTRAINT "t2_c0_c1_fkey" FOREIGN KEY ("c0", "c1") 
REFERENCES "sys"."t2" ("c0", "c1");
+#ROLLBACK;
 
 # 14:35:03 >  
 # 14:35:03 >  "Done."
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to