Changeset: aafbff1d8ab4 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=aafbff1d8ab4
Added Files:
sql/test/SQLancer/Tests/sqlancer10.test
Modified Files:
sql/test/SQLancer/Tests/sqlancer09.test
sql/test/sysmon/Tests/sys_queue_multisessions.SQL.py
sql/test/sysmon/Tests/sys_queue_multisessions.stable.out
Branch: default
Log Message:
Updated tests
diffs (228 lines):
diff --git a/sql/test/SQLancer/Tests/sqlancer09.test
b/sql/test/SQLancer/Tests/sqlancer09.test
--- a/sql/test/SQLancer/Tests/sqlancer09.test
+++ b/sql/test/SQLancer/Tests/sqlancer09.test
@@ -268,4 +268,157 @@ 0
statement ok
ROLLBACK
+statement error
+values (0.51506835), (2), (least('a', 0.5667308))
+statement ok
+START TRANSACTION
+
+statement ok
+CREATE TABLE "sys"."t2" ("c0" BIGINT,"c1" BIGINT,"c2" REAL)
+
+statement ok
+COPY 21 RECORDS INTO "sys"."t2" FROM stdin USING DELIMITERS E'\t',E'\n','"'
+<COPY_INTO_DATA>
+NULL 46 NULL
+NULL 978792098 NULL
+NULL -209719663 NULL
+NULL -1594519521 NULL
+NULL 1440437651 NULL
+NULL NULL 0.7521466
+NULL NULL -9.6071763e+08
+NULL NULL 0.5561435
+NULL 867710451 -9.6071763e+08
+NULL -160941982 NULL
+NULL 1990736519 NULL
+NULL -103481269 NULL
+NULL 1811733944 NULL
+1976443849 NULL NULL
+1998125136 NULL NULL
+1387808544 NULL NULL
+-978792098 666383819 NULL
+NULL 0 -1.6970901e+08
+NULL 1 0.07074437
+-2027341916 NULL NULL
+239480113 NULL NULL
+
+statement ok
+create view v2(vc0, vc1, vc2) as (values (((((+
(0.51506835))&(-2)))<<(scale_down(least(31552,
+0.3), cast(1500294098 as int)))),
+((- (((44257622)-(0.6))))>=(least(-15958291, -1534974396))), case -
(sql_min(0.632858,
+0.3)) when ((((0.5)^(0.4)))+(((0.4)/(5))))
+then sql_max(cast(5293 as decimal), ((0.5)-
+(0.5))) end),(charindex(r'934079707', r'35305325'), not (false),
+sql_max(((+ (102))|(case 0.028362095 when 458003921 then 28118 end)),
cast(least(0.3,
+0.79115176) as double))), (least(((((0.5)%(0.40122834)))||(2)),
+0.5667308), false, 45))
+
+statement ok
+create view v3(vc0) as (values (least(least(cast(0.3 as bigint), 0.9), 0.5)))
+
+query I rowsort
+select 1 from v2, v3
+----
+1
+1
+1
+
+query I rowsort
+select cast(sum(count) as bigint) from (select cast((cast(sin(3) as double))
is null as int) as count from
+t2 cross join v3 full outer join (select distinct sql_max(case when
cast(v2.vc1 as boolean) then cast(-3 as string)
+when case when v2.vc1 then v2.vc1 when v2.vc1 then v2.vc1 end then
sql_max(r'()', r'1574131922') end,
+coalesce(cast(t2.c2 as string), case 2 when v3.vc0 then r'0.8941967611205319'
end, case when v2.vc1 then r''
+when v2.vc1 then r'-1402390265' else r't࿕}rj}&' end, greatest(r'1', r'I''')))
from t2, v2, v3) as sub0 on
+greatest("isauuid"(r'-209719663'),
((((((false)or(true)))or(false)))or(false)))) as res
+----
+0
+
+statement ok
+ROLLBACK
+
+statement ok
+START TRANSACTION
+
+statement ok
+create view v27(vc0, vc1) as (values (sql_max(case when false then -4 when
false then 96 when true then 19491 end,
+nullif(0.322, 4.3)), 0.31),
+(abs(6363), -34)) with check option
+
+statement ok
+create view v32(vc0, vc1) as (select distinct cast(((-4)*(-4)) as tinyint),
coalesce(nullif(r'p', r'E]T'),
+sql_max(r'f)6_', r'.u'), cast(true as string(679)), case -3 when -5 then r'94'
end)
+group by substr(r'FALSE', 2))
+
+query T rowsort
+select sum(all abs(interval '-27135172' second)) from v27 full outer join
(select all scale_up(0.131, 12375.0)
+from v32 cross join (values (round(0.23, 10))) as sub0
+where ((v32.vc0)=(0.32))) as sub0 on case 3 when
+case 21 when 12524 then -3 when r'1092027064' then 3692 else 18 end then case
when true then true else true end
+when case when true then 0.33 end then (6363) not in (3,
+-3, v27.vc0, -3) end
+----
+628 days, 3:05:44
+
+statement ok
+create or replace view v27(vc0) as (values (4.3), (63))
+
+query I rowsort
+select 1 from v27 full outer join (select 1) as sub0 on case 3 when 0.33 then
(2) in (v27.vc0, 9) end
+----
+1
+1
+1
+
+statement ok
+ROLLBACK
+
+statement ok
+START TRANSACTION
+
+statement ok
+CREATE TABLE "sys"."t1" ("c0" DECIMAL(18,3),"c1" VARCHAR(253))
+
+statement ok
+COPY 7 RECORDS INTO "sys"."t1" FROM stdin USING DELIMITERS E'\t',E'\n','"'
+<COPY_INTO_DATA>
+-804767602.000 ".c("
+0.799 ".c("
+0.763 ".c("
+0.957 NULL
+NULL "5"
+NULL "j"
+NULL "UXNW/#綒"
+
+statement ok
+CREATE TABLE "sys"."t2" ("c0" DECIMAL(18,3),"c1" VARCHAR(253),CONSTRAINT
"t2_c1_unique" UNIQUE ("c1"))
+
+statement ok
+COPY 7 RECORDS INTO "sys"."t2" FROM stdin USING DELIMITERS E'\t',E'\n','"'
+<COPY_INTO_DATA>
+0.120 "0.2251036314022229"
+0.120 "-677904380"
+NULL "['퓵h'iI"
+NULL "3128"
+1.000 "+EUSP1"
+0.968 "1403896159"
+0.565 "0.8224972062481081"
+
+query I nosort
+SELECT 1 FROM t2 JOIN t1 ON CASE true WHEN true THEN true ELSE (t2.c0) IN (2)
END
+----
+
+query II nosort
+SELECT ALL t2.c0, t2.c1 FROM t2 LEFT OUTER JOIN t1 ON CASE ((t2.c1)NOT
LIKE(t2.c1)) WHEN (t1.c1) NOT BETWEEN SYMMETRIC
+(t1.c1) AND (t1.c1) THEN ((FALSE)OR(FALSE)) WHEN ((t2.c1)LIKE(t1.c1)) THEN
ifthenelse(FALSE, TRUE, TRUE) WHEN
+((((FALSE)OR(TRUE)))OR(TRUE)) THEN ((t2.c1)<>(t1.c1)) ELSE (t2.c0) IN
(102830492) END RIGHT OUTER JOIN
+(SELECT DISTINCT CASE (-809462446) IN (2020241275, 2116461308) WHEN CASE WHEN
FALSE THEN TRUE WHEN FALSE THEN
+FALSE WHEN TRUE THEN TRUE WHEN TRUE THEN FALSE WHEN FALSE THEN FALSE WHEN
FALSE THEN FALSE END THEN
+CAST(1847496204 AS BOOLEAN) WHEN CASE WHEN FALSE THEN FALSE WHEN FALSE THEN
FALSE ELSE TRUE END THEN (t2.c0) IS NULL
+WHEN ((t2.c1)LIKE(t2.c1)) THEN (t1.c0) IN (t2.c0, t1.c0) ELSE (t2.c1) NOT
BETWEEN SYMMETRIC (t1.c1) AND (t2.c1) END
+FROM t2, t1 WHERE CAST(20726 AS BOOLEAN)) AS sub0 ON ((CAST(t1.c1 AS
STRING))ILIKE(t1.c1))
+----
+
+statement ok
+ROLLBACK
+
+
diff --git a/sql/test/SQLancer/Tests/sqlancer10.test
b/sql/test/SQLancer/Tests/sqlancer10.test
new file mode 100644
--- /dev/null
+++ b/sql/test/SQLancer/Tests/sqlancer10.test
@@ -0,0 +1,29 @@
+statement ok
+START TRANSACTION
+
+statement ok
+CREATE TABLE "sys"."t0" ("c0" TIME NOT NULL, "c1" VARCHAR(143),
+ CONSTRAINT "t0_c0_pkey" PRIMARY KEY ("c0"), CONSTRAINT "t0_c0_unique"
UNIQUE ("c0"), CONSTRAINT "t0_c1_unique" UNIQUE ("c1"))
+
+statement ok
+COPY 7 RECORDS INTO "sys"."t0" FROM stdin USING DELIMITERS E'\t',E'\n','"'
+<COPY_INTO_DATA>
+21:19:08 ""
+13:02:49 NULL
+01:02:11 NULL
+16:34:25 NULL
+12:11:43 NULL
+10:35:38 NULL
+04:26:50 NULL
+
+statement ok
+CREATE TABLE "sys"."t1" ("c0" CHAR(375) NOT NULL, CONSTRAINT "t1_c0_pkey"
PRIMARY KEY ("c0"), CONSTRAINT "t1_c0_fkey" FOREIGN KEY ("c0") REFERENCES
"sys"."t0" ("c1"))
+
+statement ok
+insert into t1 values ('')
+
+statement ok
+insert into t1(c0) values ((select 'a')), ('b')
+
+statement ok
+insert into t1(c0) values(r']BW扗}FUp'), (cast((values (greatest(r'Aᨐ', r'_')))
as string(616))), (r'')
diff --git a/sql/test/sysmon/Tests/sys_queue_multisessions.SQL.py
b/sql/test/sysmon/Tests/sys_queue_multisessions.SQL.py
--- a/sql/test/sysmon/Tests/sys_queue_multisessions.SQL.py
+++ b/sql/test/sysmon/Tests/sys_queue_multisessions.SQL.py
@@ -35,11 +35,11 @@ try:
# Check that the sys.queue() output of each user contains queries from both
# connections
usrcursor1.execute('select username, sessionid from sys.queue() group by
username, sessionid order by sessionid;')
- for row in usrcursor1.fetchall():
- print(row)
+ if usrcursor1.fetchall() != [('u1', 1), ('u1', 2)]:
+ print('Expected: [(\'u1\', 1), (\'u1\', 2)]')
usrcursor2.execute('select username, sessionid from sys.queue() group by
username, sessionid order by sessionid;')
- for row in usrcursor2.fetchall():
- print(row)
+ if usrcursor2.fetchall() != [('u1', 1), ('u1', 2)]:
+ print('Expected: [(\'u1\', 1), (\'u1\', 2)]')
except pymonetdb.exceptions.Error as e:
print(e)
finally:
diff --git a/sql/test/sysmon/Tests/sys_queue_multisessions.stable.out
b/sql/test/sysmon/Tests/sys_queue_multisessions.stable.out
--- a/sql/test/sysmon/Tests/sys_queue_multisessions.stable.out
+++ b/sql/test/sysmon/Tests/sys_queue_multisessions.stable.out
@@ -5,10 +5,6 @@ stdout of test 'sys_queue_multisessions`
# 13:06:34 > "/usr/bin/python3.8" "sys_queue_multisessions.SQL.py"
"sys_queue_multisessions"
# 13:06:34 >
-('u1', 1)
-('u1', 2)
-('u1', 1)
-('u1', 2)
# 13:06:34 >
# 13:06:34 > "Done."
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list