Changeset: 4bacfeeba851 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4bacfeeba851
Removed Files:
        sql/test/SQLancer/Tests/sqlancer07.stable.err.int128
        sql/test/SQLancer/Tests/sqlancer07.stable.out.int128
Modified Files:
        sql/test/BugTracker-2014/Tests/round.Bug-3542.py
        sql/test/SQLancer/Tests/sqlancer07.sql
        sql/test/SQLancer/Tests/sqlancer07.stable.err
        sql/test/SQLancer/Tests/sqlancer07.stable.out
        sql/test/SQLancer/Tests/sqlancer07.test
Branch: mtest
Log Message:

Merging int128 and no int128 outputs


diffs (truncated from 689 to 300 lines):

diff --git a/sql/test/BugTracker-2014/Tests/round.Bug-3542.py 
b/sql/test/BugTracker-2014/Tests/round.Bug-3542.py
--- a/sql/test/BugTracker-2014/Tests/round.Bug-3542.py
+++ b/sql/test/BugTracker-2014/Tests/round.Bug-3542.py
@@ -45,6 +45,20 @@ except pymonetdb.DatabaseError as e:
     elif "overflow in calculation" not in str(e):
         sys.stderr.write('Wrong error %s, expected overflow in calculation' % 
(str(e)))
 
+# This is a leftover of int128 vs no-int128 from sqlancer07 test. Leave it 
here just to not create another test
+try:
+    cur1.execute("SELECT 
CAST(((24829)+(((0.9767751031140547)*(0.7479400824095245)))) AS DOUBLE) IS 
NULL;")
+    if has_huge:
+        if cur1.fetchall() != [(False,)]:
+            sys.stderr.write('[(False,)] expected\n')
+    else:
+        sys.stderr.write("Exception expected")
+except pymonetdb.DatabaseError as e:
+    if has_huge:
+        raise e
+    elif "overflow in calculation" not in str(e):
+        sys.stderr.write('Wrong error %s, expected overflow in calculation' % 
(str(e)))
+
 cur1.execute("drop table test_num_data;")
 cur1.close()
 conn1.close()
diff --git a/sql/test/SQLancer/Tests/sqlancer07.sql 
b/sql/test/SQLancer/Tests/sqlancer07.sql
--- a/sql/test/SQLancer/Tests/sqlancer07.sql
+++ b/sql/test/SQLancer/Tests/sqlancer07.sql
@@ -287,7 +287,4 @@ SELECT FALSE FROM v3, v0 FULL OUTER JOIN
        -- False
 ROLLBACK;
 
-SELECT CAST(((24829)+(((0.9767751031140547)*(0.7479400824095245)))) AS DOUBLE) 
IS NULL;
-       -- error, overflow in conversion
-
 select interval '1' month * cast(1 as bigint);
diff --git a/sql/test/SQLancer/Tests/sqlancer07.stable.err 
b/sql/test/SQLancer/Tests/sqlancer07.stable.err
--- a/sql/test/SQLancer/Tests/sqlancer07.stable.err
+++ b/sql/test/SQLancer/Tests/sqlancer07.stable.err
@@ -5,10 +5,6 @@ stderr of test 'sqlancer07` in directory
 # 10:16:14 >  "mclient" "-lsql" "-ftest" "-tnone" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-52758" "--port=31957"
 # 10:16:14 >  
 
-MAPI  = (monetdb) /var/tmp/mtest-1050883/.s.monetdb.36353
-QUERY = PREPARE SELECT DISTINCT (SELECT DISTINCT r'|m<v' FROM t1 WHERE 
((t1.c0)<(?)) GROUP BY t1.c2, ?), ?, t1.c2 FROM t1 WHERE CAST(? AS BOOLEAN) 
LIMIT 2103332269785059850;
-ERROR = !Could not determine type for argument number 2
-CODE  = 42000
 MAPI  = (monetdb) /var/tmp/mtest-81449/.s.monetdb.32416
 QUERY = SELECT t0.c0 BETWEEN SYMMETRIC (SELECT t0.c0 FROM t0) AND t0.c0 FROM 
t0;
 ERROR = !GDK reported error: BATsubcross: more than one match
@@ -21,11 +17,11 @@ ERROR = !SELECT: relation name "t0" spec
 CODE  = 42000
 MAPI  = (monetdb) /var/tmp/mtest-195720/.s.monetdb.38351
 QUERY = INSERT INTO t1(c0) 
VALUES((0.6548429615298178*0.3050008736497528)/(0.5061323979270875)); --error, 
scale too large
-ERROR = !Scale (34) overflows type
+ERROR = !Scale (48) overflows type
 CODE  = 42000
 MAPI  = (monetdb) /var/tmp/mtest-57059/.s.monetdb.30988
 QUERY = INSERT INTO t1(c0) VALUES(((((COALESCE(0.6548429615298178, 
0.20317629894456002))*(COALESCE(0.3050008736497528, 
0.2277902039419617))))/(0.5061323979270875))); --error, scale too large
-ERROR = !Scale (34) overflows type
+ERROR = !Scale (49) overflows type
 CODE  = 42000
 MAPI  = (monetdb) /var/tmp/mtest-23025/.s.monetdb.36001
 QUERY = SELECT 1 FROM t2, t0 WHERE (SELECT 1 UNION SELECT 2) > 0;
@@ -36,26 +32,6 @@ ERROR = !GDK reported error: BATsubcross
 MAPI  = (monetdb) /var/tmp/mtest-23025/.s.monetdb.36001
 QUERY = SELECT 1 FROM t2, t0 CROSS JOIN t1 WHERE (SELECT 1 UNION SELECT 2) > 0;
 ERROR = !GDK reported error: BATsubcross: more than one match
-MAPI  = (monetdb) /var/tmp/mtest-363846/.s.monetdb.39501
-QUERY = PREPARE SELECT (SELECT ? FROM (select 1) as v1(c0));
-ERROR = !Could not determine type for argument number 1
-CODE  = 42000
-MAPI  = (monetdb) /var/tmp/mtest-377843/.s.monetdb.38453
-QUERY = PREPARE SELECT ?, CASE 'weHtU' WHEN (values (?)) THEN 'G' END;
-ERROR = !Could not determine type for argument number 1
-CODE  = 42000
-MAPI  = (monetdb) /var/tmp/mtest-446274/.s.monetdb.33895
-QUERY = PREPARE SELECT DISTINCT ?, CAST(CASE least(?, r'weHtU') WHEN ? THEN ? 
WHEN ? THEN ? WHEN (VALUES (?)) THEN r'G' ELSE ? END AS DATE) WHERE (?) IS NOT 
NULL LIMIT 519007555986016405;
-ERROR = !Cannot have a parameter (?) for IS NOT NULL operator
-CODE  = 42000
-MAPI  = (monetdb) /var/tmp/mtest-17349/.s.monetdb.38601
-QUERY = SELECT CAST(((24829)+(((0.9767751031140547)*(0.7479400824095245)))) AS 
DOUBLE) IS NULL;
-ERROR = !overflow in conversion to DECIMAL(18,18).
-CODE  = 22003
-MAPI  = (monetdb) /var/tmp/mtest-20193/.s.monetdb.38814
-QUERY = PREPARE SELECT (1 + CAST(l0t0.c0 AS BIGINT)) * scale_up(?, 2) FROM 
(select 1) AS l0t0(c0);
-ERROR = !SELECT: no such binary operator 'sql_mul(bigint,month_interval)'
-CODE  = 42000
 
 # 10:16:14 >  
 # 10:16:14 >  "Done."
diff --git a/sql/test/SQLancer/Tests/sqlancer07.stable.err.int128 
b/sql/test/SQLancer/Tests/sqlancer07.stable.err.int128
deleted file mode 100644
--- a/sql/test/SQLancer/Tests/sqlancer07.stable.err.int128
+++ /dev/null
@@ -1,63 +0,0 @@
-stderr of test 'sqlancer07` in directory 'sql/test/SQLancer` itself:
-
-
-# 10:16:14 >  
-# 10:16:14 >  "mclient" "-lsql" "-ftest" "-tnone" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-52758" "--port=31957"
-# 10:16:14 >  
-
-MAPI  = (monetdb) /var/tmp/mtest-1050883/.s.monetdb.36353
-QUERY = PREPARE SELECT DISTINCT (SELECT DISTINCT r'|m<v' FROM t1 WHERE 
((t1.c0)<(?)) GROUP BY t1.c2, ?), ?, t1.c2 FROM t1 WHERE CAST(? AS BOOLEAN) 
LIMIT 2103332269785059850;
-ERROR = !Could not determine type for argument number 2
-CODE  = 42000
-MAPI  = (monetdb) /var/tmp/mtest-81449/.s.monetdb.32416
-QUERY = SELECT t0.c0 BETWEEN SYMMETRIC (SELECT t0.c0 FROM t0) AND t0.c0 FROM 
t0;
-ERROR = !GDK reported error: BATsubcross: more than one match
-MAPI  = (monetdb) /var/tmp/mtest-81449/.s.monetdb.32416
-QUERY = SELECT CAST(NOT ((t0.c0) NOT BETWEEN SYMMETRIC ((SELECT DISTINCT t0.c0 
FROM t0, t1)) AND (t0.c0)) AS INT) FROM t0;
-ERROR = !GDK reported error: BATsubcross: more than one match
-MAPI  = (monetdb) /var/tmp/mtest-240512/.s.monetdb.37779
-QUERY = select 1 from t0, t1 inner join t0 on true;
-ERROR = !SELECT: relation name "t0" specified more than once
-CODE  = 42000
-MAPI  = (monetdb) /var/tmp/mtest-195720/.s.monetdb.38351
-QUERY = INSERT INTO t1(c0) 
VALUES((0.6548429615298178*0.3050008736497528)/(0.5061323979270875)); --error, 
scale too large
-ERROR = !Scale (48) overflows type
-CODE  = 42000
-MAPI  = (monetdb) /var/tmp/mtest-57059/.s.monetdb.30988
-QUERY = INSERT INTO t1(c0) VALUES(((((COALESCE(0.6548429615298178, 
0.20317629894456002))*(COALESCE(0.3050008736497528, 
0.2277902039419617))))/(0.5061323979270875))); --error, scale too large
-ERROR = !Scale (49) overflows type
-CODE  = 42000
-MAPI  = (monetdb) /var/tmp/mtest-23025/.s.monetdb.36001
-QUERY = SELECT 1 FROM t2, t0 WHERE (SELECT 1 UNION SELECT 2) > 0;
-ERROR = !GDK reported error: BATsubcross: more than one match
-MAPI  = (monetdb) /var/tmp/mtest-23025/.s.monetdb.36001
-QUERY = SELECT 1 FROM t2, t0, t1 WHERE (SELECT 1 UNION SELECT 2) > 0;
-ERROR = !GDK reported error: BATsubcross: more than one match
-MAPI  = (monetdb) /var/tmp/mtest-23025/.s.monetdb.36001
-QUERY = SELECT 1 FROM t2, t0 CROSS JOIN t1 WHERE (SELECT 1 UNION SELECT 2) > 0;
-ERROR = !GDK reported error: BATsubcross: more than one match
-MAPI  = (monetdb) /var/tmp/mtest-363846/.s.monetdb.39501
-QUERY = PREPARE SELECT (SELECT ? FROM (select 1) as v1(c0));
-ERROR = !Could not determine type for argument number 1
-CODE  = 42000
-MAPI  = (monetdb) /var/tmp/mtest-377843/.s.monetdb.38453
-QUERY = PREPARE SELECT ?, CASE 'weHtU' WHEN (values (?)) THEN 'G' END;
-ERROR = !Could not determine type for argument number 1
-CODE  = 42000
-MAPI  = (monetdb) /var/tmp/mtest-446274/.s.monetdb.33895
-QUERY = PREPARE SELECT DISTINCT ?, CAST(CASE least(?, r'weHtU') WHEN ? THEN ? 
WHEN ? THEN ? WHEN (VALUES (?)) THEN r'G' ELSE ? END AS DATE) WHERE (?) IS NOT 
NULL LIMIT 519007555986016405;
-ERROR = !Cannot have a parameter (?) for IS NOT NULL operator
-CODE  = 42000
-MAPI  = (monetdb) /var/tmp/mtest-14251/.s.monetdb.34553
-QUERY = PREPARE SELECT (1 + CAST(l0t0.c0 AS BIGINT)) * scale_up(?, 2) FROM 
(select 1) AS l0t0(c0);
-ERROR = !SELECT: no such binary operator 'sql_mul(hugeint,month_interval)'
-CODE  = 42000
-MAPI  = (monetdb) /var/tmp/mtest-14251/.s.monetdb.34553
-QUERY = PREPARE SELECT DISTINCT ((((CAST(l0t0.c0 AS INT))-(CAST(? AS 
BIGINT))))*(scale_up(?, ((-438139776)*(-813129345))))) FROM (select 1) AS 
l0t0(c0);
-ERROR = !SELECT: no such binary operator 'sql_mul(hugeint,day_interval)'
-CODE  = 42000
-
-# 10:16:14 >  
-# 10:16:14 >  "Done."
-# 10:16:14 >  
-
diff --git a/sql/test/SQLancer/Tests/sqlancer07.stable.out 
b/sql/test/SQLancer/Tests/sqlancer07.stable.out
--- a/sql/test/SQLancer/Tests/sqlancer07.stable.out
+++ b/sql/test/SQLancer/Tests/sqlancer07.stable.out
@@ -473,15 +473,6 @@ stdout of test 'sqlancer07` in directory
 % 5 # length
 [ false        ]
 #ROLLBACK;
-#PREPARE SELECT DISTINCT ((((CAST(l0t0.c0 AS INT))-(CAST(? AS 
BIGINT))))*(scale_up(?, ((-438139776)*(-813129345))))) FROM (select 1) AS 
l0t0(c0);
-#PREPARE SELECT DISTINCT ((((CAST(l0t0.c0 AS INT))-(CAST(? AS 
BIGINT))))*(scale_up(?, ((-438139776)*(-813129345))))) FROM (select 1) AS 
l0t0(c0);
-% .prepare,    .prepare,       .prepare,       .prepare,       .prepare,       
.prepare # table_name
-% type,        digits, scale,  schema, table,  column # name
-% varchar,     int,    int,    str,    str,    str # type
-% 12,  2,      1,      0,      2,      2 # length
-[ "day_interval",      4,      0,      "",     "%3",   "%3"    ]
-[ "bigint",    64,     0,      NULL,   NULL,   NULL    ]
-[ "day_interval",      4,      0,      NULL,   NULL,   NULL    ]
 #select interval '1' month * cast(1 as bigint);
 % .%2 # table_name
 % %2 # name
diff --git a/sql/test/SQLancer/Tests/sqlancer07.stable.out.int128 
b/sql/test/SQLancer/Tests/sqlancer07.stable.out.int128
deleted file mode 100644
--- a/sql/test/SQLancer/Tests/sqlancer07.stable.out.int128
+++ /dev/null
@@ -1,492 +0,0 @@
-stdout of test 'sqlancer07` in directory 'sql/test/SQLancer` itself:
-
-
-# 10:16:14 >  
-# 10:16:14 >  "mclient" "-lsql" "-ftest" "-tnone" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-52758" "--port=31957"
-# 10:16:14 >  
-
-#START TRANSACTION;
-#CREATE TABLE "t1" ("c0" DECIMAL(18,3),"c1" BINARY LARGE OBJECT NOT NULL,"c2" 
DECIMAL(18,3),CONSTRAINT "t1_c1_unique" UNIQUE ("c1"));
-#ROLLBACK;
-#START TRANSACTION;
-#CREATE TABLE "t0"("c0" INTERVAL MONTH,"c1" INTERVAL SECOND);
-#CREATE TABLE "t1"("c0" INTERVAL MONTH,"c1" INTERVAL SECOND);
-#CREATE TABLE "t2"("c0" INTERVAL MONTH,"c1" INTERVAL SECOND);
-#SELECT 1 FROM t1 JOIN t2 ON NOT (NOT (SELECT FALSE FROM t2));
-% .%2 # table_name
-% %2 # name
-% tinyint # type
-% 1 # length
-#SELECT ALL CAST(NOT ((DATE '1970-01-22') NOT IN (DATE '1970-01-04')) AS INT) 
as count FROM t0, t1 FULL OUTER JOIN t2 ON NOT (NOT ((SELECT DISTINCT FALSE 
FROM t2, t0, t1)));
-% . # table_name
-% count # name
-% int # type
-% 1 # length
-#ROLLBACK;
-#CREATE TABLE "t0" ("c0" DOUBLE PRECISION NOT NULL);
-#INSERT INTO "t0" VALUES (0.13492451886840173);
-[ 1    ]
-#INSERT INTO "t0" VALUES (79004262);
-[ 1    ]
-#INSERT INTO "t0" VALUES (1476461507);
-[ 1    ]
-#CREATE TABLE "t1" ("c0" DOUBLE PRECISION);
-#INSERT INTO "t1" VALUES (973588428);
-[ 1    ]
-#INSERT INTO "t1" VALUES (NULL);
-[ 1    ]
-#INSERT INTO "t1" VALUES (0.39517295223772886);
-[ 1    ]
-#INSERT INTO "t1" VALUES (NULL);
-[ 1    ]
-#DROP TABLE t0;
-#DROP TABLE t1;
-#START TRANSACTION;
-#CREATE TABLE "t0" ("c0" DATE NOT NULL);
-#CREATE TABLE "t1" ("c1" INT);
-#CREATE TABLE "t2" ("c0" DATE NOT NULL);
-#SELECT 0 <= ANY(SELECT CASE INTERVAL '2' SECOND WHEN INTERVAL '6' SECOND THEN 
t1.c1 ELSE (SELECT t1.c1 FROM t1) END FROM t1) FROM t1;
-% .%5 # table_name
-% %5 # name
-% boolean # type
-% 5 # length
-#ROLLBACK;
-#START TRANSACTION;
-#CREATE TABLE "t0" ("c0" BOOLEAN NOT NULL);
-#CREATE TABLE "t1" ("c0" DECIMAL(18,3));
-#CREATE TABLE "t2" ("c0" DECIMAL(18,3),"c2" DATE);
-#PREPARE (SELECT DISTINCT t0.c0, INTERVAL '1734780053' SECOND FROM t0, t1) 
UNION ALL (SELECT ?, ? FROM t2);
-#PREPARE (SELECT DISTINCT t0.c0, INTERVAL '1734780053' SECOND FROM t0, t1) 
UNION ALL (SELECT ?, ? FROM t2);
-% .prepare,    .prepare,       .prepare,       .prepare,       .prepare,       
.prepare # table_name
-% type,        digits, scale,  schema, table,  column # name
-% varchar,     int,    int,    str,    str,    str # type
-% 12,  3,      1,      0,      3,      2 # length
-[ "boolean",   1,      0,      "",     "%10",  "c0"    ]
-[ "sec_interval",      13,     0,      "",     "%10",  "%2"    ]
-[ "boolean",   1,      0,      NULL,   NULL,   NULL    ]
-[ "sec_interval",      13,     0,      NULL,   NULL,   NULL    ]
-#ROLLBACK;
-#START TRANSACTION;
-#CREATE TABLE "t0" ("c0" INTERVAL MONTH NOT NULL,CONSTRAINT "t0_c0_pkey" 
PRIMARY KEY ("c0"),CONSTRAINT "t0_c0_unique" UNIQUE ("c0"),CONSTRAINT 
"t0_c0_unique" UNIQUE ("c0"));
-#INSERT INTO "t0" VALUES (INTERVAL '2101098338' MONTH);
-[ 1    ]
-#CREATE TABLE "t1" ("c0" INTERVAL MONTH,"c1" BOOLEAN);
-#CREATE TABLE "t2" ("c0" INTERVAL MONTH);
-#SELECT CAST(t1.c1 AS INT) FROM t1, t0 RIGHT OUTER JOIN t2 ON ((SELECT 
DISTINCT t1.c0 FROM t1, t0 WHERE FALSE)) NOT IN (t0.c0);
-% .%4 # table_name
-% %4 # name
-% int # type
-% 1 # length
-#ROLLBACK;
-#START TRANSACTION;
-#CREATE TABLE "t0" ("c0" DATE,"c2" INTEGER);
-#CREATE TABLE "t1" ("c1" TIMESTAMP,"c2" INTEGER);
-#CREATE TABLE "t2" ("c0" DATE,"c1" TIMESTAMP,"c2" INTEGER);
-#PREPARE (SELECT ?, t1.c2 FROM t1, t0 WHERE (SELECT DISTINCT (t1.c2) BETWEEN 
ASYMMETRIC (?) AND (t1.c2) FROM t1 CROSS JOIN 
-#((SELECT DISTINCT 6.9089063E7, TRUE FROM t2 WHERE TRUE) EXCEPT (SELECT ALL 
0.4, FALSE FROM t2, t0, t1 INNER JOIN t0 ON FALSE)) AS sub0 WHERE FALSE)) 
INTERSECT DISTINCT (SELECT DISTINCT 0.2, ? FROM t0, t2 WHERE ?);
-#PREPARE (SELECT ?, t1.c2 FROM t1, t0 WHERE (SELECT DISTINCT (t1.c2) BETWEEN 
ASYMMETRIC (?) AND (t1.c2) FROM t1 CROSS JOIN 
-#((SELECT DISTINCT 6.9089063E7, TRUE FROM t2 WHERE TRUE) EXCEPT (SELECT ALL 
0.4, FALSE FROM t2, t0, t1 INNER JOIN t0 ON FALSE)) AS sub0 WHERE FALSE)) 
INTERSECT DISTINCT (SELECT DISTINCT 0.2, ? FROM t0, t2 WHERE ?);
-% .prepare,    .prepare,       .prepare,       .prepare,       .prepare,       
.prepare # table_name
-% type,        digits, scale,  schema, table,  column # name
-% varchar,     int,    int,    str,    str,    str # type
-% 7,   3,      1,      0,      3,      3 # length
-[ "decimal",   2,      1,      "",     "%22",  "%14"   ]
-[ "int",       32,     0,      "",     "%22",  "c2"    ]
-[ "decimal",   2,      1,      NULL,   NULL,   NULL    ]
-[ "int",       32,     0,      NULL,   NULL,   NULL    ]
-[ "int",       32,     0,      NULL,   NULL,   NULL    ]
-[ "boolean",   1,      0,      NULL,   NULL,   NULL    ]
-#ROLLBACK;
-#START TRANSACTION;
-#CREATE TABLE "t0" ("c0" CHAR(315));
-#INSERT INTO "t0" VALUES ('(y/l'), (''), ('*J');
-[ 3    ]
-#CREATE TABLE "t1" ("c0" VARCHAR(512), "c1" DOUBLE PRECISION);
-#INSERT INTO "t1" VALUES ('0.9295919173154146', NULL);
-[ 1    ]
-#CREATE TABLE "t2" ("c0" CHAR(315));
-#INSERT INTO "t2" VALUES ('1753268987.000'), ('(y/l'), ('(y/l'), ('');
-[ 4    ]
-#SELECT '1' > COALESCE(((SELECT t1.c0 FROM t1) INTERSECT (SELECT '2')), t0.c0) 
FROM t0;
-% .%11 # table_name
-% %11 # name
-% boolean # type
-% 5 # length
-[ true ]
-[ true ]
-[ true ]
-#SELECT CAST(((COALESCE(t0.c0, t0.c0, t0.c0))>(COALESCE(((SELECT DISTINCT 
t1.c0 FROM t1, t0, t2 WHERE FALSE) INTERSECT DISTINCT (SELECT ALL t0.c0 FROM t0 
WHERE TRUE)), 
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to