Changeset: 0385fcac4ae9 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0385fcac4ae9
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:
Approve new output after fix for 3667
diffs (265 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
@@ -16,7 +16,7 @@ INSERT INTO OID_TBL(f1) VALUES (' 10
INSERT INTO OID_TBL(f1) VALUES (' 15 ');
INSERT INTO OID_TBL(f1) VALUES (null);
-SELECT '' AS nine, OID_TBL.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL;
+SELECT '' AS ten, OID_TBL.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL;
-- bad inputs
INSERT INTO OID_TBL(f1) VALUES ('asdfasd');
@@ -24,16 +24,16 @@ INSERT INTO OID_TBL(f1) VALUES ('99asdfa
INSERT INTO OID_TBL(f1) VALUES ('5 d');
INSERT INTO OID_TBL(f1) VALUES (' 5d');
INSERT INTO OID_TBL(f1) VALUES ('5 5');
+INSERT INTO OID_TBL(f1) VALUES (-10); -- negative oids are not allowed in
MonetDB, so this should fail
INSERT INTO OID_TBL(f1) VALUES (-1040); -- negative oids are not allowed in
MonetDB, so this should fail
INSERT INTO OID_TBL(f1) VALUES ('-1040'); -- negative oids are not allowed
in MonetDB, so this should fail
INSERT INTO OID_TBL(f1) VALUES (' - 500');
-INSERT INTO OID_TBL(f1) VALUES (12345678901);
INSERT INTO OID_TBL(f1) VALUES ('32958209582039852935');
INSERT INTO OID_TBL(f1) VALUES (32958209582039852935);
INSERT INTO OID_TBL(f1) VALUES ('-23582358720398502385');
INSERT INTO OID_TBL(f1) VALUES (-23582358720398502385);
-SELECT '' AS nine, OID_TBL.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL
ORDER BY f1;
+SELECT '' AS ten, OID_TBL.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL
ORDER BY f1;
DELETE FROM OID_TBL WHERE f1 = -1040;
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,46 +29,68 @@ 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-7617/.s.monetdb.39655
-QUERY = INSERT INTO OID_TBL(f1) VALUES (12345678901);
-ERROR = !EXEC: wrong type for argument 1 of prepared statement: bigint,
expected oid
-MAPI = (monetdb) /var/tmp/mtest-7617/.s.monetdb.39655
+MAPI = (monetdb) /var/tmp/mtest-29481/.s.monetdb.37235
QUERY = INSERT INTO OID_TBL(f1) VALUES ('asdfasd');
ERROR = !conversion of string 'asdfasd' to type oid failed.
-MAPI = (monetdb) /var/tmp/mtest-7617/.s.monetdb.39655
+MAPI = (monetdb) /var/tmp/mtest-29481/.s.monetdb.37235
QUERY = INSERT INTO OID_TBL(f1) VALUES ('99asdfasd');
ERROR = !conversion of string '99asdfasd' to type oid failed.
-MAPI = (monetdb) /var/tmp/mtest-7617/.s.monetdb.39655
+MAPI = (monetdb) /var/tmp/mtest-29481/.s.monetdb.37235
QUERY = INSERT INTO OID_TBL(f1) VALUES ('5 d');
ERROR = !conversion of string '5 d' to type oid failed.
-MAPI = (monetdb) /var/tmp/mtest-7617/.s.monetdb.39655
+MAPI = (monetdb) /var/tmp/mtest-29481/.s.monetdb.37235
QUERY = INSERT INTO OID_TBL(f1) VALUES (' 5d');
ERROR = !conversion of string ' 5d' to type oid failed.
-MAPI = (monetdb) /var/tmp/mtest-7617/.s.monetdb.39655
+MAPI = (monetdb) /var/tmp/mtest-29481/.s.monetdb.37235
QUERY = INSERT INTO OID_TBL(f1) VALUES ('5 5');
ERROR = !conversion of string '5 5' to type oid failed.
-MAPI = (monetdb) /var/tmp/mtest-7617/.s.monetdb.39655
+MAPI = (monetdb) /var/tmp/mtest-29481/.s.monetdb.37235
+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-29481/.s.monetdb.37235
+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-29481/.s.monetdb.37235
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-7617/.s.monetdb.39655
+MAPI = (monetdb) /var/tmp/mtest-29481/.s.monetdb.37235
QUERY = INSERT INTO OID_TBL(f1) VALUES (' - 500');
ERROR = !conversion of string ' - 500' to type oid failed.
-MAPI = (monetdb) /var/tmp/mtest-7617/.s.monetdb.39655
+MAPI = (monetdb) /var/tmp/mtest-29481/.s.monetdb.37235
QUERY = INSERT INTO OID_TBL(f1) VALUES ('32958209582039852935');
ERROR = !conversion of string '32958209582039852935' to type oid failed.
-MAPI = (monetdb) /var/tmp/mtest-7617/.s.monetdb.39655
+MAPI = (monetdb) /var/tmp/mtest-29481/.s.monetdb.37235
QUERY = INSERT INTO OID_TBL(f1) VALUES (32958209582039852935);
ERROR = !overflow in conversion of 32958209582039851008 to lng.
-MAPI = (monetdb) /var/tmp/mtest-7617/.s.monetdb.39655
+MAPI = (monetdb) /var/tmp/mtest-29481/.s.monetdb.37235
QUERY = INSERT INTO OID_TBL(f1) VALUES ('-23582358720398502385');
ERROR = !conversion of string '-23582358720398502385' to type oid failed.
-MAPI = (monetdb) /var/tmp/mtest-7617/.s.monetdb.39655
+MAPI = (monetdb) /var/tmp/mtest-29481/.s.monetdb.37235
QUERY = INSERT INTO OID_TBL(f1) VALUES (-23582358720398502385);
ERROR = !overflow in conversion of -23582358720398503936 to lng.
+MAPI = (monetdb) /var/tmp/mtest-29481/.s.monetdb.37235
+QUERY = DELETE FROM OID_TBL WHERE f1 = -1040;
+ERROR = !overflow in conversion of 12345678901 to sht.
+MAPI = (monetdb) /var/tmp/mtest-29481/.s.monetdb.37235
+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-29481/.s.monetdb.37235
+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-29481/.s.monetdb.37235
+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-29481/.s.monetdb.37235
+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-29481/.s.monetdb.37235
+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-29481/.s.monetdb.37235
+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."
+# 16:41:57 >
-
-# 15:18:43 >
-# 15:18:43 > "Done."
-# 15:18:43 >
-
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
@@ -34,6 +34,8 @@ Ready.
[ 1 ]
#INSERT INTO OID_TBL(f1) VALUES ('987');
[ 1 ]
+#INSERT INTO OID_TBL(f1) VALUES (12345678901);
+[ 1 ]
#INSERT INTO OID_TBL(f1) VALUES ('000');
[ 1 ]
#INSERT INTO OID_TBL(f1) VALUES (' '); -- in MonetDB this one is accepted
@@ -48,30 +50,26 @@ Ready.
[ 1 ]
#SELECT '' AS nine, OID_TBL.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL;
% .L, sys.oid_tbl, sys.L1 # table_name
-% nine, f1, oid2str # name
+% ten, f1, oid2str # name
% char, oid, varchar # type
-% 0, 6, 6 # length
+% 0, 13, 13 # length
[ "", 1234@0, "1234@0" ]
[ "", 1235@0, "1235@0" ]
[ "", 987@0, "987@0" ]
+[ "", 12345678901@0, "12345678901@0" ]
[ "", 0@0, "0@0" ]
[ "", NULL, NULL ]
[ "", 5@0, "5@0" ]
[ "", 10@0, "10@0" ]
[ "", 15@0, "15@0" ]
[ "", NULL, NULL ]
-#INSERT INTO OID_TBL(f1) VALUES (-1040); -- negative oids are not allowed in
MonetDB, so this should fail
-[ 1 ]
-#INSERT INTO OID_TBL(f1) VALUES (12345678901);
-[ 1 ]
-#SELECT '' AS nine, OID_TBL.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL
ORDER BY f1;
+#SELECT '' AS ten, OID_TBL.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL
ORDER BY f1;
% .L, sys.oid_tbl, sys.L1 # table_name
-% nine, f1, oid2str # name
+% ten, f1, oid2str # name
% char, oid, varchar # type
-% 0, 13, 22 # length
+% 0, 13, 13 # length
[ "", NULL, NULL ]
[ "", NULL, NULL ]
-[ "", 18446744073709550576@0, "18446744073709550576@0" ]
[ "", 0@0, "0@0" ]
[ "", 5@0, "5@0" ]
[ "", 10@0, "10@0" ]
@@ -80,32 +78,12 @@ Ready.
[ "", 1234@0, "1234@0" ]
[ "", 1235@0, "1235@0" ]
[ "", 12345678901@0, "12345678901@0" ]
-#DELETE FROM OID_TBL WHERE f1 = -1040;
-[ 1 ]
-#SELECT '' AS one, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o
WHERE o.f1 = 1234;
-% .L, sys.o, sys.L1 # 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';
% .L, sys.o, sys.L1 # table_name
% one, f1, oid2str # name
% 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;
-% .L, sys.o, sys.L1 # table_name
-% seven, f1, oid2str # name
-% char, oid, varchar # type
-% 0, 13, 13 # length
-[ "", 1235@0, "1235@0" ]
-[ "", 987@0, "987@0" ]
-[ "", 0@0, "0@0" ]
-[ "", 5@0, "5@0" ]
-[ "", 10@0, "10@0" ]
-[ "", 15@0, "15@0" ]
-[ "", 12345678901@0, "12345678901@0" ]
#SELECT '' AS seven, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o
WHERE o.f1 <> '1234';
% .L, sys.o, sys.L1 # table_name
% seven, f1, oid2str # name
@@ -113,43 +91,25 @@ Ready.
% 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" ]
-[ "", 12345678901@0, "12345678901@0" ]
-#SELECT '' AS six, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o
WHERE o.f1 <= 1234;
-% .L, sys.o, sys.L1 # table_name
-% six, f1, oid2str # name
-% char, oid, varchar # type
-% 0, 4, 4 # length
-[ "", 15@0, "15@0" ]
#SELECT '' AS six, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o
WHERE o.f1 <= '1234';
% .L, sys.o, sys.L1 # table_name
% six, f1, oid2str # name
% char, oid, varchar # type
% 0, 4, 4 # length
-[ "", 15@0, "15@0" ]
-#SELECT '' AS five, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o
WHERE o.f1 < 1234;
-% .L, sys.o, sys.L1 # 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';
% .L, sys.o, sys.L1 # table_name
% five, f1, oid2str # name
% char, oid, varchar # type
% 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 >= 1234;
-% .L, sys.o, sys.L1 # 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';
% .L, sys.o, sys.L1 # table_name
% three, f1, oid2str # name
@@ -158,13 +118,6 @@ 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 > 1234;
-% .L, sys.o, sys.L1 # 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';
% .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