Changeset: 87de370ed3e1 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=87de370ed3e1
Modified Files:
gdk/gdk_align.c
sql/test/SQLancer/Tests/sqlancer05.stable.out
Branch: Oct2020
Log Message:
Generalize assertion for varsized atoms
diffs (175 lines):
diff --git a/gdk/gdk_align.c b/gdk/gdk_align.c
--- a/gdk/gdk_align.c
+++ b/gdk/gdk_align.c
@@ -284,7 +284,7 @@ VIEWreset(BAT *b)
if (tp == 0) {
/* only sharing the vheap */
- assert(ATOMstorage(b->ttype) == TYPE_str);
+ assert(ATOMvarsized(b->ttype));
return unshare_string_heap(b);
}
diff --git a/sql/test/SQLancer/Tests/sqlancer05.stable.out
b/sql/test/SQLancer/Tests/sqlancer05.stable.out
--- a/sql/test/SQLancer/Tests/sqlancer05.stable.out
+++ b/sql/test/SQLancer/Tests/sqlancer05.stable.out
@@ -42,8 +42,8 @@ stdout of test 'sqlancer05` in directory
#NULL 0.230
[ 3 ]
#SELECT max(t2.c1) FROM t1 LEFT OUTER JOIN t2 ON CASE WHEN t2.c0 < t1.c0 OR
t1.c0 THEN t1.c0 WHEN t1.c0 THEN t1.c0 END;
-% .%3 # table_name
-% %3 # name
+% .%1 # table_name
+% %1 # name
% decimal # type
% 20 # length
[ 0.860 ]
@@ -52,8 +52,8 @@ stdout of test 'sqlancer05` in directory
#ON CASE WHEN
((((((((v0.c0)=(v0.c0)))OR(((t1.c0)>=(t1.c0)))))AND(((t2.c0)<(t1.c0)))))OR(((((t1.c0)AND(t1.c0)))AND(t1.c0))))
#THEN t1.c0 WHEN COALESCE(COALESCE(TRUE, t2.c0, t1.c0), CASE t1.c1 WHEN t2.c1
THEN t2.c0 WHEN t1.c1 THEN t2.c0 ELSE t1.c0 END)
#THEN t2.c0 WHEN t1.c0 THEN t1.c0 END;
-% .%5 # table_name
-% %5 # name
+% .%1 # table_name
+% %1 # name
% decimal # type
% 20 # length
[ NULL ]
@@ -70,10 +70,9 @@ stdout of test 'sqlancer05` in directory
#1112194034
#2140251980
[ 8 ]
-#SELECT 1 FROM (select time '12:43:09' from t0) as v0(c0) RIGHT OUTER JOIN
(SELECT INTERVAL '2' SECOND FROM t0) AS sub0 ON
-#TIME '07:04:19' BETWEEN CASE 'b' WHEN 'a' THEN v0.c0 ELSE v0.c0 END AND v0.c0;
-% .%7 # table_name
-% %7 # name
+#SELECT 1 FROM (select time '12:43:09' from t0) as v0(c0) RIGHT OUTER JOIN
(SELECT INTERVAL '2' SECOND FROM t0) AS sub0 ON TIME '07:04:19' BETWEEN CASE
'b' WHEN 'a' THEN v0.c0 ELSE v0.c0 END AND v0.c0;
+% .%2 # table_name
+% %2 # name
% tinyint # type
% 1 # length
[ 1 ]
@@ -87,8 +86,8 @@ stdout of test 'sqlancer05` in directory
#create view v0(c0, c1) as (select all time '12:43:09', interval '1251003346'
second from t0) with check option;
#SELECT count(ALL - (CAST(NULL AS INT))) FROM v0 RIGHT OUTER JOIN (SELECT
INTERVAL '1380374779' SECOND FROM t0) AS sub0 ON
#COALESCE(TRUE, (TIME '07:04:19') BETWEEN SYMMETRIC (CASE r'漈' WHEN r'T㊆ßwU.H'
THEN v0.c0 ELSE v0.c0 END) AND (v0.c0));
-% .%4 # table_name
-% %4 # name
+% .%2 # table_name
+% %2 # name
% bigint # type
% 1 # length
[ 0 ]
@@ -164,8 +163,8 @@ stdout of test 'sqlancer05` in directory
% tinyint # type
% 1 # length
#SELECT 1 WHERE NOT '0';
-% .%3 # table_name
-% %3 # name
+% .%2 # table_name
+% %2 # name
% tinyint # type
% 1 # length
[ 1 ]
@@ -219,8 +218,8 @@ stdout of test 'sqlancer05` in directory
[ 4 ]
#create view v0(c0, c1) as (select distinct t0.c0, t0.c2 from t2, t0 where
t0.c1);
#SELECT 1 FROM v0, t0 JOIN t1 ON t0.c1 WHERE (CASE CASE t0.c0 WHEN t0.c0 THEN
t1.c1 END WHEN t1.c1 THEN v0.c1 END) BETWEEN (v0.c1) AND (t0.c2);
-% .%3 # table_name
-% %3 # name
+% .%1 # table_name
+% %1 # name
% tinyint # type
% 1 # length
#SELECT count(agg0) FROM (
@@ -229,8 +228,8 @@ stdout of test 'sqlancer05` in directory
#SELECT ALL sum(ALL t1.c1) as agg0 FROM v0, t0 JOIN t1 ON t0.c1 CROSS JOIN t2
WHERE NOT ((CASE CASE t0.c0 WHEN t0.c0 THEN t1.c1 END WHEN t1.c1 THEN v0.c1
END) NOT BETWEEN ASYMMETRIC (v0.c1) AND (t0.c2))
#UNION ALL
#SELECT ALL sum(ALL t1.c1) as agg0 FROM v0, t0 JOIN t1 ON t0.c1 CROSS JOIN t2
WHERE ((CASE CASE t0.c0 WHEN t0.c0 THEN t1.c1 END WHEN t1.c1 THEN v0.c1 END)
NOT BETWEEN ASYMMETRIC (v0.c1) AND (t0.c2)) IS NULL
-% .%32 # table_name
-% %32 # name
+% .%16 # table_name
+% %16 # name
% bigint # type
% 1 # length
[ 0 ]
@@ -438,8 +437,8 @@ stdout of test 'sqlancer05` in directory
% 5 # length
#SELECT CAST(SUM(count) AS BIGINT) FROM (SELECT CAST((CAST((TIME '15:03:17')
NOT IN (TIME '11:36:59', TIME '21:14:10',
#TIME '01:03:49') AS INT)) BETWEEN ASYMMETRIC (t1.c0) AND (t1.c0) AS INT) as
count FROM t1, t2 NATURAL JOIN t0) as res;
-% .%12 # table_name
-% %12 # name
+% .%10 # table_name
+% %10 # name
% bigint # type
% 1 # length
[ 0 ]
@@ -471,8 +470,8 @@ stdout of test 'sqlancer05` in directory
#23:37:32 0.907
[ 8 ]
#select cast(sum(count) as bigint) from (select cast(not (not (true)) as int)
as count from t1 natural join t0) as res;
-% .%5 # table_name
-% %5 # name
+% .%3 # table_name
+% %3 # name
% bigint # type
% 1 # length
[ NULL ]
@@ -483,6 +482,57 @@ stdout of test 'sqlancer05` in directory
% 8 # length
[ 23:59:59 ]
#ROLLBACK;
+#START TRANSACTION;
+#CREATE TABLE "sys"."t2" ("c0" INTERVAL MONTH,"c1" BINARY LARGE OBJECT);
+#COPY 11 RECORDS INTO "sys"."t2" FROM stdin USING DELIMITERS E'\t',E'\n','"';
+#NULL E0
+#NULL A0B0
+#NULL 00
+#NULL NULL
+#1655951380 NULL
+#1624060581 NULL
+#503097283 NULL
+#1181487537 NULL
+#NULL
+#NULL 4D3ABFB0
+#1233829956 0C
+[ 11 ]
+#create view v0(vc0, vc1, vc2) as (values (length(r'-165227345'),
greatest(interval '773370894' second, interval '-320486280' second),
+#sql_add(cast(date '1970-01-06' as timestamp), case
0.34182486343556306440660819134791381657123565673828125 when 20419
+#then interval '-359816023' second else interval '413001394' second end)))
with check option;
+#select t2.c1 from (values (10, 773370894.000, timestamp '1983-02-07
02:36:34')) v0, t2
+#right outer join (values (47940718, null)) as sub0 on nullif(true, (t2.c1)
between (t2.c1) and (t2.c1));
+% .t2 # table_name
+% c1 # name
+% blob # type
+% 0 # length
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+[ NULL ]
+#select t2.c1 from v0, t2 right outer join (values (least(ifthenelse(false,
r'', r'47940718'), sql_max(r'栩', r'U*>Kz0')),
+#case cast(interval '-165227345' month as string) when "insert"(r'f3',
0.57506007, -1550051844, r'0.06527867754732408')
+#then r'u' when r'2033856974' then case when true then r'' when false then
r'-1543387917' when true then r'0.4055556886118663'
+#when false then r'c' else r'E\n' end end)) as sub0 on nullif(not (false),
(t2.c1) not between asymmetric (t2.c1) and (t2.c1))
+#where case ((50)*(1836147184)) when least(5110, 1303739364) then (false) =
false when scale_down(0.07871449894764926,
+% .t2 # table_name
+% c1 # name
+% blob # type
+% 0 # length
+#ROLLBACK;
+#START TRANSACTION;
+#create view v5(vc0, vc1, vc2) as (values (2090916872, -1.850350369280157e-11,
566614814)) with check option;
+#create view v29(vc0, vc1) as (values (0.2, 0.2), (0.4, 0.5)) with check
option;
+#create view v57(vc0, vc1) as (values (0.6, 0.7), (0.8, 0.9)) with check
option;
+#create view v76(vc0) as (with cte0(c0,c1,c2,c3) as (select 0.32, 1, true, 1),
cte1(c0,c1) as (select -0.50347245, 23.2)
+#select distinct true from (values(1),(2)) l0v54,cte0 as l0cte0,cte1 as
l0cte1) with check option;
+#create view v82(vc0, vc1) as (with cte1(c0,c1,c2) as (select 1, case when
false
+#then true when false then false end, 1 from v29 as l1v29)
+#select case l0cte1.c1 when true then least(null, l0cte1.c0) end, 1 from cte1
as l0cte1
+#join (select 1, '1', cast(l1v57.vc1 as bigint) from v57 as l1v57,
+#v5 as l1v5, v76 as l1v76) as sub1 on false) with check option;
+#ROLLBACK;
# 12:00:38 >
# 12:00:38 > "Done."
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list