Changeset: 1d6a2c8dc3af for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1d6a2c8dc3af
Modified Files:
sql/test/pg_regress/Tests/oid.sql
sql/test/pg_regress/Tests/oid.stable.err
sql/test/pg_regress/Tests/oid.stable.out
Branch: default
Log Message:
Updated oid tests to reduce overflow errors
diffs (211 lines):
diff --git a/sql/test/pg_regress/Tests/oid.sql
b/sql/test/pg_regress/Tests/oid.sql
--- a/sql/test/pg_regress/Tests/oid.sql
+++ b/sql/test/pg_regress/Tests/oid.sql
@@ -37,27 +37,27 @@ SELECT '' AS ten, OID_TBL.*, cast(f1 as
DELETE FROM OID_TBL WHERE f1 < '0';
-SELECT '' AS one, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o WHERE
o.f1 = 1234;
+SELECT '' AS one, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o WHERE
o.f1 = cast(1234 as oid);
SELECT '' AS one, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o WHERE
o.f1 = 1234@0;
SELECT '' AS one, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o WHERE
o.f1 = '1234';
-SELECT '' AS seven, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o
WHERE o.f1 <> 1234;
+SELECT '' AS seven, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o
WHERE o.f1 <> cast(1234 as oid);
SELECT '' AS seven, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o
WHERE o.f1 <> 1234@0;
SELECT '' AS seven, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o
WHERE o.f1 <> '1234';
-SELECT '' AS six, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o WHERE
o.f1 <= 1234;
+SELECT '' AS six, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o WHERE
o.f1 <= cast(1234 as oid);
SELECT '' AS six, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o WHERE
o.f1 <= 1234@0;
SELECT '' AS six, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o WHERE
o.f1 <= '1234';
-SELECT '' AS five, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o
WHERE o.f1 < 1234;
+SELECT '' AS five, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o
WHERE o.f1 < cast(1234 as oid);
SELECT '' AS five, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o
WHERE o.f1 < 1234@0;
SELECT '' AS five, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o
WHERE o.f1 < '1234';
-SELECT '' AS three, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o
WHERE o.f1 >= 1234;
+SELECT '' AS three, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o
WHERE o.f1 >= cast(1234 as oid);
SELECT '' AS three, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o
WHERE o.f1 >= 1234@0;
SELECT '' AS three, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o
WHERE o.f1 >= '1234';
-SELECT '' AS two, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o WHERE
o.f1 > 1234;
+SELECT '' AS two, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o WHERE
o.f1 > cast(1234 as oid);
SELECT '' AS two, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o WHERE
o.f1 > 1234@0;
SELECT '' AS two, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o WHERE
o.f1 > '1234';
diff --git a/sql/test/pg_regress/Tests/oid.stable.err
b/sql/test/pg_regress/Tests/oid.stable.err
--- a/sql/test/pg_regress/Tests/oid.stable.err
+++ b/sql/test/pg_regress/Tests/oid.stable.err
@@ -29,63 +29,45 @@ stderr of test 'oid` in directory 'sql/t
# 15:18:43 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e"
"--host=/var/tmp/mtest-7372" "--port=31804"
# 15:18:43 >
-MAPI = (monetdb) /var/tmp/mtest-26840/.s.monetdb.37388
+MAPI = (monetdb) /var/tmp/mtest-17898/.s.monetdb.31237
QUERY = INSERT INTO OID_TBL(f1) VALUES ('asdfasd');
ERROR = !conversion of string 'asdfasd' to type oid failed.
-MAPI = (monetdb) /var/tmp/mtest-26840/.s.monetdb.37388
+MAPI = (monetdb) /var/tmp/mtest-17898/.s.monetdb.31237
QUERY = INSERT INTO OID_TBL(f1) VALUES ('99asdfasd');
ERROR = !conversion of string '99asdfasd' to type oid failed.
-MAPI = (monetdb) /var/tmp/mtest-26840/.s.monetdb.37388
+MAPI = (monetdb) /var/tmp/mtest-17898/.s.monetdb.31237
QUERY = INSERT INTO OID_TBL(f1) VALUES ('5 d');
ERROR = !conversion of string '5 d' to type oid failed.
-MAPI = (monetdb) /var/tmp/mtest-26840/.s.monetdb.37388
+MAPI = (monetdb) /var/tmp/mtest-17898/.s.monetdb.31237
QUERY = INSERT INTO OID_TBL(f1) VALUES (' 5d');
ERROR = !conversion of string ' 5d' to type oid failed.
-MAPI = (monetdb) /var/tmp/mtest-26840/.s.monetdb.37388
+MAPI = (monetdb) /var/tmp/mtest-17898/.s.monetdb.31237
QUERY = INSERT INTO OID_TBL(f1) VALUES ('5 5');
ERROR = !conversion of string '5 5' to type oid failed.
-MAPI = (monetdb) /var/tmp/mtest-26840/.s.monetdb.37388
+MAPI = (monetdb) /var/tmp/mtest-17898/.s.monetdb.31237
QUERY = INSERT INTO OID_TBL(f1) VALUES (-10); -- negative oids are not
allowed in MonetDB, so this should fail
ERROR = !overflow in conversion of -10 to oid.
-MAPI = (monetdb) /var/tmp/mtest-26840/.s.monetdb.37388
+MAPI = (monetdb) /var/tmp/mtest-17898/.s.monetdb.31237
QUERY = INSERT INTO OID_TBL(f1) VALUES (-1040); -- negative oids are not
allowed in MonetDB, so this should fail
ERROR = !overflow in conversion of -1040 to oid.
-MAPI = (monetdb) /var/tmp/mtest-26840/.s.monetdb.37388
+MAPI = (monetdb) /var/tmp/mtest-17898/.s.monetdb.31237
QUERY = INSERT INTO OID_TBL(f1) VALUES ('-1040'); -- negative oids are not
allowed in MonetDB, so this should fail
ERROR = !conversion of string '-1040' to type oid failed.
-MAPI = (monetdb) /var/tmp/mtest-26840/.s.monetdb.37388
+MAPI = (monetdb) /var/tmp/mtest-17898/.s.monetdb.31237
QUERY = INSERT INTO OID_TBL(f1) VALUES (' - 500');
ERROR = !conversion of string ' - 500' to type oid failed.
-MAPI = (monetdb) /var/tmp/mtest-26840/.s.monetdb.37388
+MAPI = (monetdb) /var/tmp/mtest-17898/.s.monetdb.31237
QUERY = INSERT INTO OID_TBL(f1) VALUES ('32958209582039852935');
ERROR = !conversion of string '32958209582039852935' to type oid failed.
-MAPI = (monetdb) /var/tmp/mtest-26840/.s.monetdb.37388
+MAPI = (monetdb) /var/tmp/mtest-17898/.s.monetdb.31237
QUERY = INSERT INTO OID_TBL(f1) VALUES (32958209582039852935);
ERROR = !overflow in conversion of 32958209582039851008 to lng.
-MAPI = (monetdb) /var/tmp/mtest-26840/.s.monetdb.37388
+MAPI = (monetdb) /var/tmp/mtest-17898/.s.monetdb.31237
QUERY = INSERT INTO OID_TBL(f1) VALUES ('-23582358720398502385');
ERROR = !conversion of string '-23582358720398502385' to type oid failed.
-MAPI = (monetdb) /var/tmp/mtest-26840/.s.monetdb.37388
+MAPI = (monetdb) /var/tmp/mtest-17898/.s.monetdb.31237
QUERY = INSERT INTO OID_TBL(f1) VALUES (-23582358720398502385);
ERROR = !overflow in conversion of -23582358720398503936 to lng.
-MAPI = (monetdb) /var/tmp/mtest-26840/.s.monetdb.37388
-QUERY = SELECT '' AS one, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL
o WHERE o.f1 = 1234;
-ERROR = !overflow in conversion of 12345678901 to sht.
-MAPI = (monetdb) /var/tmp/mtest-26840/.s.monetdb.37388
-QUERY = SELECT '' AS seven, o.*, cast(f1 as varchar(30)) as oid2str FROM
OID_TBL o WHERE o.f1 <> 1234;
-ERROR = !overflow in conversion of 12345678901 to sht.
-MAPI = (monetdb) /var/tmp/mtest-26840/.s.monetdb.37388
-QUERY = SELECT '' AS six, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL
o WHERE o.f1 <= 1234;
-ERROR = !overflow in conversion of 12345678901 to sht.
-MAPI = (monetdb) /var/tmp/mtest-26840/.s.monetdb.37388
-QUERY = SELECT '' AS five, o.*, cast(f1 as varchar(30)) as oid2str FROM
OID_TBL o WHERE o.f1 < 1234;
-ERROR = !overflow in conversion of 12345678901 to sht.
-MAPI = (monetdb) /var/tmp/mtest-26840/.s.monetdb.37388
-QUERY = SELECT '' AS three, o.*, cast(f1 as varchar(30)) as oid2str FROM
OID_TBL o WHERE o.f1 >= 1234;
-ERROR = !overflow in conversion of 12345678901 to sht.
-MAPI = (monetdb) /var/tmp/mtest-26840/.s.monetdb.37388
-QUERY = SELECT '' AS two, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL
o WHERE o.f1 > 1234;
-ERROR = !overflow in conversion of 12345678901 to sht.
# 16:41:57 >
# 16:41:57 > "Done."
diff --git a/sql/test/pg_regress/Tests/oid.stable.out
b/sql/test/pg_regress/Tests/oid.stable.out
--- a/sql/test/pg_regress/Tests/oid.stable.out
+++ b/sql/test/pg_regress/Tests/oid.stable.out
@@ -80,6 +80,12 @@ Ready.
[ "", 12345678901@0, "12345678901@0" ]
#DELETE FROM OID_TBL WHERE f1 < '0';
[ 0 ]
+#SELECT '' AS one, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o
WHERE o.f1 = cast(1234 as oid);
+% .L1, sys.o, sys.L2 # table_name
+% one, f1, oid2str # name
+% char, oid, varchar # type
+% 0, 6, 6 # length
+[ "", 1234@0, "1234@0" ]
#SELECT '' AS one, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o
WHERE o.f1 = 1234@0;
% .L, sys.o, sys.L1 # table_name
% one, f1, oid2str # name
@@ -92,7 +98,19 @@ Ready.
% char, oid, varchar # type
% 0, 6, 6 # length
[ "", 1234@0, "1234@0" ]
-#SELECT '' AS seven, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o
WHERE o.f1 <> '1234';
+#SELECT '' AS seven, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o
WHERE o.f1 <> cast(1234 as oid);
+% .L1, sys.o, sys.L2 # table_name
+% seven, f1, oid2str # name
+% char, oid, varchar # type
+% 0, 13, 13 # length
+[ "", 1235@0, "1235@0" ]
+[ "", 987@0, "987@0" ]
+[ "", 12345678901@0, "12345678901@0" ]
+[ "", 0@0, "0@0" ]
+[ "", 5@0, "5@0" ]
+[ "", 10@0, "10@0" ]
+[ "", 15@0, "15@0" ]
+#SELECT '' AS seven, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o
WHERE o.f1 <> 1234@0;
% .L, sys.o, sys.L1 # table_name
% seven, f1, oid2str # name
% char, oid, varchar # type
@@ -116,6 +134,13 @@ Ready.
[ "", 5@0, "5@0" ]
[ "", 10@0, "10@0" ]
[ "", 15@0, "15@0" ]
+#SELECT '' AS six, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o
WHERE o.f1 <= cast(1234 as oid);
+% .L1, sys.o, sys.L2 # table_name
+% six, f1, oid2str # name
+% char, oid, varchar # type
+% 0, 4, 4 # length
+[ "", 10@0, "10@0" ]
+[ "", 15@0, "15@0" ]
#SELECT '' AS six, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o
WHERE o.f1 <= 1234@0;
% .L, sys.o, sys.L1 # table_name
% six, f1, oid2str # name
@@ -130,6 +155,13 @@ Ready.
% 0, 4, 4 # length
[ "", 10@0, "10@0" ]
[ "", 15@0, "15@0" ]
+#SELECT '' AS five, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o
WHERE o.f1 < cast(1234 as oid);
+% .L1, sys.o, sys.L2 # table_name
+% five, f1, oid2str # name
+% char, oid, varchar # type
+% 0, 4, 4 # length
+[ "", 10@0, "10@0" ]
+[ "", 15@0, "15@0" ]
#SELECT '' AS five, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o
WHERE o.f1 < 1234@0;
% .L, sys.o, sys.L1 # table_name
% five, f1, oid2str # name
@@ -144,6 +176,14 @@ Ready.
% 0, 4, 4 # length
[ "", 10@0, "10@0" ]
[ "", 15@0, "15@0" ]
+#SELECT '' AS three, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o
WHERE o.f1 >= cast(1234 as oid);
+% .L1, sys.o, sys.L2 # table_name
+% three, f1, oid2str # name
+% char, oid, varchar # type
+% 0, 13, 13 # length
+[ "", 1234@0, "1234@0" ]
+[ "", 1235@0, "1235@0" ]
+[ "", 12345678901@0, "12345678901@0" ]
#SELECT '' AS three, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o
WHERE o.f1 >= 1234@0;
% .L, sys.o, sys.L1 # table_name
% three, f1, oid2str # name
@@ -160,6 +200,13 @@ Ready.
[ "", 1234@0, "1234@0" ]
[ "", 1235@0, "1235@0" ]
[ "", 12345678901@0, "12345678901@0" ]
+#SELECT '' AS two, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o
WHERE o.f1 > cast(1234 as oid);
+% .L1, sys.o, sys.L2 # table_name
+% two, f1, oid2str # name
+% char, oid, varchar # type
+% 0, 13, 13 # length
+[ "", 1235@0, "1235@0" ]
+[ "", 12345678901@0, "12345678901@0" ]
#SELECT '' AS two, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o
WHERE o.f1 > 1234@0;
% .L, sys.o, sys.L1 # table_name
% two, f1, oid2str # name
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list