Changeset: 8a75ff2fe6c4 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8a75ff2fe6c4
Modified Files:
sql/test/BugTracker-2017/Tests/All
sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6449.sql
sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6449.stable.out
sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6477.sql
sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6477.stable.out
sql/test/BugTracker-2017/Tests/type-resolution-error.Bugs-6313.sql
sql/test/BugTracker-2017/Tests/type-resolution-error.Bugs-6313.stable.err
sql/test/BugTracker-2017/Tests/type-resolution-error.Bugs-6313.stable.out
Branch: default
Log Message:
Approved remaining sqlsmith BugTracker-2017 tests
diffs (truncated from 365 to 300 lines):
diff --git a/sql/test/BugTracker-2017/Tests/All
b/sql/test/BugTracker-2017/Tests/All
--- a/sql/test/BugTracker-2017/Tests/All
+++ b/sql/test/BugTracker-2017/Tests/All
@@ -58,7 +58,7 @@ distinct_minus_count_distinct.Bug-6296
all_minus_count_star.Bug-6297
lateral.Bug-6310
limit_clause.Bug-6312
-HAVE_GEOM?type-resolution-error.Bugs-6313
+type-resolution-error.Bugs-6313
lateral02.Bug-6314
exist-bigint-missing.Bug-6315
coalesc-limit.Bug-6316
@@ -104,13 +104,13 @@ drop_schema_restrict.Bug-6438
sqlitelogictest-cast-decimal.Bug-6445
HAVE_LIBPY2?table_returning_with.Bug-6444
insert_into_multiple_subqueries.Bug-6448
-HAVE_SAMTOOLS?sqlsmith.Bug-6449
+sqlsmith.Bug-6449
HAVE_LIBPY2?python_loader_clobbers_default_with_null.Bug-6464
skip_problem_best_effort.Bug-6442
date_to_str.Bug-6467
cleanup_statistics.Bug-6439
update_on_procedure.Bug-6479
-HAVE_GEOM?sqlsmith.Bug-6477
+sqlsmith.Bug-6477
crash-in-topn.Bug-6478
function-resolution.Bug-6436
generate-resolution.Bug-6471
diff --git a/sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6449.sql
b/sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6449.sql
--- a/sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6449.sql
+++ b/sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6449.sql
@@ -1,27 +1,39 @@
+START TRANSACTION;
+CREATE TABLE another_T (col1 INT, col2 INT, col3 INT, col4 INT, col5 INT, col6
INT, col7 INT, col8 INT);
+INSERT INTO another_T VALUES (1,2,3,4,5,6,7,8), (11,22,33,44,55,66,77,88),
(111,222,333,444,555,666,777,888), (1111,2222,3333,4444,5555,6666,7777,8888);
+CREATE TABLE tab0(col0 INTEGER, col1 INTEGER, col2 INTEGER);
+INSERT INTO tab0 VALUES (97,1,99), (15,81,47),(87,21,10);
+CREATE TABLE tab1(col0 INTEGER, col1 INTEGER, col2 INTEGER);
+INSERT INTO tab1 VALUES (51,14,96), (85,5,59), (91,47,68);
+CREATE TABLE tab2(col0 INTEGER, col1 INTEGER, col2 INTEGER);
+INSERT INTO tab2 VALUES (64,77,40), (75,67,58),(46,51,23);
+
select
- ref_3.name as c0,
- ref_4.index_type_name as c1,
- ref_3.name as c2,
- ref_3.value as c3
+ ref_3.col1 as c0,
+ ref_4.col0 as c1,
+ ref_3.col1 as c2,
+ ref_3.col2 as c3
from
- sys.environment as ref_3
- inner join sys.index_types as ref_4
- on (ref_3.value is NULL)
+ another_T as ref_3
+ inner join tab0 as ref_4
+ on (ref_3.col2 is NULL)
where EXISTS (
select
- ref_3.value as c0
+ ref_3.col2 as c0
from
(select
- ref_5.table_id as c0,
- ref_5.table_id as c1,
- ref_6.lb as c2,
- ref_4.index_type_name as c3,
- ref_4.index_type_id as c4
+ ref_5.col0 as c0,
+ ref_5.col0 as c1,
+ ref_6.col0 as c2,
+ ref_4.col0 as c3,
+ ref_4.col1 as c4
from
- tmp._columns as ref_5
- left join bam.rg as ref_6
- on (ref_5.id is not NULL)
+ tab1 as ref_5
+ left join tab2 as ref_6
+ on (ref_5.col1 is not NULL)
where false
limit 97) as subq_0
where true)
limit 136;
+
+ROLLBACK;
diff --git a/sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6449.stable.out
b/sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6449.stable.out
--- a/sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6449.stable.out
+++ b/sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6449.stable.out
@@ -19,10 +19,19 @@ stdout of test 'sqlsmith.Bug-6449` in di
# MonetDB/SQL module loaded
-# 11:12:49 >
-# 11:12:49 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e"
"--host=/var/tmp/mtest-20335" "--port=35290"
-# 11:12:49 >
-
+#START TRANSACTION;
+#CREATE TABLE another_T (col1 INT, col2 INT, col3 INT, col4 INT, col5 INT,
col6 INT, col7 INT, col8 INT);
+#INSERT INTO another_T VALUES (1,2,3,4,5,6,7,8), (11,22,33,44,55,66,77,88),
(111,222,333,444,555,666,777,888), (1111,2222,3333,4444,5555,6666,7777,8888);
+[ 4 ]
+#CREATE TABLE tab0(col0 INTEGER, col1 INTEGER, col2 INTEGER);
+#INSERT INTO tab0 VALUES (97,1,99), (15,81,47),(87,21,10);
+[ 3 ]
+#CREATE TABLE tab1(col0 INTEGER, col1 INTEGER, col2 INTEGER);
+#INSERT INTO tab1 VALUES (51,14,96), (85,5,59), (91,47,68);
+[ 3 ]
+#CREATE TABLE tab2(col0 INTEGER, col1 INTEGER, col2 INTEGER);
+#INSERT INTO tab2 VALUES (64,77,40), (75,67,58),(46,51,23);
+[ 3 ]
#select
# ref_3.name as c0,
# ref_4.index_type_name as c1,
@@ -43,12 +52,14 @@ stdout of test 'sqlsmith.Bug-6449` in di
# ref_4.index_type_name as c3,
# ref_4.index_type_id as c4
# from
-# tmp._columns as ref_5
-# left join bam.rg as ref_6
-% .ref_3, sys.ref_4, .ref_3, .ref_3 # table_name
+# tab1 as ref_5
+# left join tab2 as ref_6
+# on (ref_5.col1 is not NULL)
+% sys.ref_3, sys.ref_4, sys.ref_3, sys.ref_3 # table_name
% c0, c1, c2, c3 # name
-% varchar, varchar, varchar, varchar # type
-% 0, 0, 0, 0 # length
+% int, int, int, int # type
+% 1, 1, 1, 1 # length
+#ROLLBACK;
# 11:12:49 >
# 11:12:49 > "Done."
diff --git a/sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6477.sql
b/sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6477.sql
--- a/sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6477.sql
+++ b/sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6477.sql
@@ -1,27 +1,40 @@
+START TRANSACTION;
+CREATE TABLE another_T (col1 timestamp, col2 INT, col3 INT, col4 INT, col5
INT, col6 INT, col7 INT, col8 INT);
+INSERT INTO another_T VALUES (timestamp '2018-01-02 08:00:10',2,3,4,5,6,7,8),
(timestamp '2018-02-04 19:02:01',22,33,44,55,66,77,88),
+(timestamp '2018-04-19 15:49:45',222,333,444,555,666,777,888), (timestamp
'2018-05-03 05:12:04',2222,3333,4444,5555,6666,7777,8888);
+CREATE TABLE tab0(col0 INTEGER, col1 INTEGER, col2 INTEGER);
+INSERT INTO tab0 VALUES (97,1,99), (15,81,47),(87,21,10);
+CREATE TABLE tab1(col0 INTEGER, col1 INTEGER, col2 INTEGER);
+INSERT INTO tab1 VALUES (51,14,96), (85,5,59), (91,47,68);
+CREATE TABLE tab2(col0 INTEGER, col1 INTEGER, col2 INTEGER);
+INSERT INTO tab2 VALUES (64,77,40), (75,67,58),(46,51,23);
+
select
- cast(coalesce(ref_0.stop,
- ref_0.stop) as timestamp) as c0,
- ref_0.id as c1,
- cast(coalesce(ref_0.cpu,
- ref_0.io) as int) as c2,
- ref_0.run as c3,
- ref_0.stop as c4,
- ref_0.cpu as c5,
- case when cast(nullif(ref_0.tuples,
- ref_0.tuples) as bigint) is not NULL then ref_0.io else ref_0.io end
+ cast(coalesce(ref_0.col1,
+ ref_0.col1) as timestamp) as c0,
+ ref_0.col2 as c1,
+ cast(coalesce(ref_0.col4,
+ ref_0.col5) as int) as c2,
+ ref_0.col3 as c3,
+ ref_0.col1 as c4,
+ ref_0.col4 as c5,
+ case when cast(nullif(ref_0.col6,
+ ref_0.col6) as bigint) is not NULL then ref_0.col5 else ref_0.col5 end
as c6
from
- sys.querylog_calls as ref_0
-where cast(coalesce(ref_0.tuples,
+ another_T as ref_0
+where cast(coalesce(ref_0.col6,
case when EXISTS (
select
- ref_1.id as c0
+ ref_1.col0 as c0
from
- sys.args as ref_1
- left join tmp.objects as ref_2
- right join sys.spatial_ref_sys as ref_3
+ tab0 as ref_1
+ left join tab1 as ref_2
+ right join tab2 as ref_3
on (true)
- on (ref_1.type_scale = ref_2.id )
- where true) then ref_0.run else ref_0.run end
+ on (ref_1.col1 = ref_2.col0 )
+ where true) then ref_0.col3 else ref_0.col3 end
) as bigint) is not NULL
limit 101;
+
+ROLLBACK;
diff --git a/sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6477.stable.out
b/sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6477.stable.out
--- a/sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6477.stable.out
+++ b/sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6477.stable.out
@@ -19,10 +19,20 @@ stdout of test 'sqlsmith.Bug-6477` in di
# MonetDB/SQL module loaded
-# 14:26:12 >
-# 14:26:12 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e"
"--host=/var/tmp/mtest-23479" "--port=39335"
-# 14:26:12 >
-
+#START TRANSACTION;
+#CREATE TABLE another_T (col1 timestamp, col2 INT, col3 INT, col4 INT, col5
INT, col6 INT, col7 INT, col8 INT);
+#INSERT INTO another_T VALUES (timestamp '2018-01-02 08:00:10',2,3,4,5,6,7,8),
(timestamp '2018-02-04 19:02:01',22,33,44,55,66,77,88),
+#(timestamp '2018-04-19 15:49:45',222,333,444,555,666,777,888), (timestamp
'2018-05-03 05:12:04',2222,3333,4444,5555,6666,7777,8888);
+[ 4 ]
+#CREATE TABLE tab0(col0 INTEGER, col1 INTEGER, col2 INTEGER);
+#INSERT INTO tab0 VALUES (97,1,99), (15,81,47),(87,21,10);
+[ 3 ]
+#CREATE TABLE tab1(col0 INTEGER, col1 INTEGER, col2 INTEGER);
+#INSERT INTO tab1 VALUES (51,14,96), (85,5,59), (91,47,68);
+[ 3 ]
+#CREATE TABLE tab2(col0 INTEGER, col1 INTEGER, col2 INTEGER);
+#INSERT INTO tab2 VALUES (64,77,40), (75,67,58),(46,51,23);
+[ 3 ]
#select
# cast(coalesce(ref_0.stop,
# ref_0.stop) as timestamp) as c0,
@@ -42,12 +52,17 @@ stdout of test 'sqlsmith.Bug-6477` in di
# select
# ref_1.id as c0
# from
-# sys.args as ref_1
-# left join tmp.objects as ref_2
-% .%31, .%32, .%33, .%34, .%35, .%36, .%37 # table_name
+# tab0 as ref_1
+# left join tab1 as ref_2
+% sys.%17, sys.%20, sys.%21, sys.%22, sys.%23,
sys.%24, sys.%25 # table_name
% c0, c1, c2, c3, c4, c5, c6 # name
-% timestamp, oid, int, bigint, timestamp, int, int # type
-% 26, 3, 1, 1, 26, 1, 1 # length
+% timestamp, int, int, int, timestamp, int, int # type
+% 26, 4, 4, 4, 26, 4, 4 # length
+[ 2018-01-02 08:00:10.000000, 2, 4, 3, 2018-01-02
08:00:10.000000, 4, 5 ]
+[ 2018-02-04 19:02:01.000000, 22, 44, 33, 2018-02-04
19:02:01.000000, 44, 55 ]
+[ 2018-04-19 15:49:45.000000, 222, 444, 333, 2018-04-19
15:49:45.000000, 444, 555 ]
+[ 2018-05-03 05:12:04.000000, 2222, 4444, 3333, 2018-05-03
05:12:04.000000, 4444, 5555 ]
+#ROLLBACK;
# 14:26:12 >
# 14:26:12 > "Done."
diff --git a/sql/test/BugTracker-2017/Tests/type-resolution-error.Bugs-6313.sql
b/sql/test/BugTracker-2017/Tests/type-resolution-error.Bugs-6313.sql
--- a/sql/test/BugTracker-2017/Tests/type-resolution-error.Bugs-6313.sql
+++ b/sql/test/BugTracker-2017/Tests/type-resolution-error.Bugs-6313.sql
@@ -1,15 +1,32 @@
-select orderidxsize
-from sys.tablestoragemodel
+CREATE TABLE another_T (col1 INT, col2 INT, col3 INT, col4 INT, col5 INT, col6
INT, col7 INT, col8 INT);
+INSERT INTO another_T VALUES (1,2,3,4,5,6,7,8), (11,22,33,44,55,66,77,88),
(111,222,333,444,555,666,777,888), (1111,2222,3333,4444,5555,6666,7777,8888);
+CREATE TABLE integers(i INTEGER);
+INSERT INTO integers VALUES (1), (2), (3), (NULL);
+CREATE TABLE tab0(col0 INTEGER, col1 INTEGER, col2 INTEGER);
+INSERT INTO tab0 VALUES (97,1,99), (15,81,47),(87,21,10);
+CREATE TABLE tab1(col0 INTEGER, col1 INTEGER, col2 INTEGER);
+INSERT INTO tab1 VALUES (51,14,96), (85,5,59), (91,47,68);
+CREATE TABLE tab2(col0 INTEGER, col1 INTEGER, col2 INTEGER);
+INSERT INTO tab2 VALUES (64,77,40), (75,67,58),(46,51,23);
+
+select col1
+from tab1
where ((select r_regionkey from sys.region) is NULL)
- or ((select index_type_name from sys.index_types) is not NULL);
+ or ((select col0 from tab0) is not NULL);
select
- sample_69.f_table_catalog as c2
+ sample_69.col0 as c2
from
- sys.storagemodel as sample_65
- left join sys.geometry_columns as sample_69
- on (sample_65.type = sample_69.f_table_catalog )
+ tab1 as sample_65
+ left join tab0 as sample_69
+ on (sample_65.col0 = sample_69.col0 )
where
- ((select default_schema from sys.users) is NULL)
- or (cast(coalesce((select side_effect from sys.functions) ,
- sample_65.sorted) as boolean) is not NULL);
+ ((select i from integers) is NULL)
+ or (cast(coalesce((select col7 from another_T) ,
+ sample_65.col1) as boolean) is not NULL);
+
+DROP TABLE another_T;
+DROP TABLE integers;
+DROP TABLE tab0;
+DROP TABLE tab1;
+DROP TABLE tab2;
diff --git
a/sql/test/BugTracker-2017/Tests/type-resolution-error.Bugs-6313.stable.err
b/sql/test/BugTracker-2017/Tests/type-resolution-error.Bugs-6313.stable.err
--- a/sql/test/BugTracker-2017/Tests/type-resolution-error.Bugs-6313.stable.err
+++ b/sql/test/BugTracker-2017/Tests/type-resolution-error.Bugs-6313.stable.err
@@ -35,24 +35,24 @@ stderr of test 'type-resolution-error.Bu
# 12:52:03 > "mclient" "-lsql" "-ftest" "-tnone" "-Eutf-8" "-i" "-e"
"--host=/var/tmp/mtest-19106" "--port=36358"
# 12:52:03 >
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list