Changeset: 7485ebc35341 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7485ebc35341
Modified Files:
sql/test/sys-schema/Tests/check_ForeignKey_referential_integrity.sql
sql/test/sys-schema/Tests/check_ForeignKey_referential_integrity.stable.out
Branch: default
Log Message:
Updated and approved test for "system" column in sys.functions table.
Also make use of "system" column in sys.schemas table.
diffs (66 lines):
diff --git
a/sql/test/sys-schema/Tests/check_ForeignKey_referential_integrity.sql
b/sql/test/sys-schema/Tests/check_ForeignKey_referential_integrity.sql
--- a/sql/test/sys-schema/Tests/check_ForeignKey_referential_integrity.sql
+++ b/sql/test/sys-schema/Tests/check_ForeignKey_referential_integrity.sql
@@ -23,9 +23,8 @@ SELECT * FROM sys.functions WHERE type N
SELECT * FROM sys.functions WHERE language NOT IN (SELECT language_id FROM
sys.function_languages);
-- SELECT * FROM sys.functions WHERE language NOT IN (0,1,2,3,4,5,6,7); --
old check before table sys.function_languages existed
-SELECT * FROM sys.systemfunctions WHERE function_id NOT IN (SELECT id FROM
sys.functions);
--- systemfunctions should refer only to functions in MonetDB system schemas
(on Dec2016 these are: sys, json, profiler and bam)
-SELECT * FROM sys.systemfunctions WHERE function_id NOT IN (SELECT id FROM
sys.functions WHERE schema_id IN (SELECT id FROM sys.schemas WHERE name IN
('sys','json','profiler','bam')));
+-- system functions should refer only to functions in MonetDB system schemas
(on Dec2016 these are: sys, json, profiler and bam)
+SELECT * FROM sys.functions WHERE system AND schema_id NOT IN (SELECT id FROM
sys.schemas WHERE system);
SELECT * FROM sys.args WHERE func_id NOT IN (SELECT id FROM sys.functions);
SELECT * FROM sys.args WHERE type NOT IN (SELECT sqlname FROM sys.types);
diff --git
a/sql/test/sys-schema/Tests/check_ForeignKey_referential_integrity.stable.out
b/sql/test/sys-schema/Tests/check_ForeignKey_referential_integrity.stable.out
---
a/sql/test/sys-schema/Tests/check_ForeignKey_referential_integrity.stable.out
+++
b/sql/test/sys-schema/Tests/check_ForeignKey_referential_integrity.stable.out
@@ -95,30 +95,25 @@ Ready.
% int, varchar, varchar, int, int, int, varchar,
boolean, int, varchar # type
% 1, 0, 0, 1, 1, 1, 0, 5, 1, 0 #
length
#SELECT * FROM sys.functions WHERE schema_id NOT IN (SELECT id FROM
sys.schemas);
-% sys.functions, sys.functions, sys.functions, sys.functions,
sys.functions, sys.functions, sys.functions, sys.functions, sys.functions,
sys.functions # table_name
-% id, name, func, mod, language, type, side_effect, varres,
vararg, schema_id # name
-% int, varchar, varchar, varchar, int, int,
boolean, boolean, boolean, int # type
-% 1, 0, 0, 0, 1, 1, 5, 5, 5, 1 #
length
+% sys.functions, sys.functions, sys.functions, sys.functions,
sys.functions, sys.functions, sys.functions, sys.functions, sys.functions,
sys.functions, sys.functions # table_name
+% id, name, func, mod, language, type, side_effect, varres,
vararg, schema_id, system # name
+% int, varchar, varchar, varchar, int, int,
boolean, boolean, boolean, int, boolean # type
+% 1, 0, 0, 0, 1, 1, 5, 5, 5, 1,
5 # length
#SELECT * FROM sys.functions WHERE type NOT IN (SELECT function_type_id FROM
sys.function_types);
-% sys.functions, sys.functions, sys.functions, sys.functions,
sys.functions, sys.functions, sys.functions, sys.functions, sys.functions,
sys.functions # table_name
-% id, name, func, mod, language, type, side_effect, varres,
vararg, schema_id # name
-% int, varchar, varchar, varchar, int, int,
boolean, boolean, boolean, int # type
-% 1, 0, 0, 0, 1, 1, 5, 5, 5, 1 #
length
+% sys.functions, sys.functions, sys.functions, sys.functions,
sys.functions, sys.functions, sys.functions, sys.functions, sys.functions,
sys.functions, sys.functions # table_name
+% id, name, func, mod, language, type, side_effect, varres,
vararg, schema_id, system # name
+% int, varchar, varchar, varchar, int, int,
boolean, boolean, boolean, int, boolean # type
+% 1, 0, 0, 0, 1, 1, 5, 5, 5, 1,
5 # length
#SELECT * FROM sys.functions WHERE language NOT IN (SELECT language_id FROM
sys.function_languages);
-% sys.functions, sys.functions, sys.functions, sys.functions,
sys.functions, sys.functions, sys.functions, sys.functions, sys.functions,
sys.functions # table_name
-% id, name, func, mod, language, type, side_effect, varres,
vararg, schema_id # name
-% int, varchar, varchar, varchar, int, int,
boolean, boolean, boolean, int # type
-% 1, 0, 0, 0, 1, 1, 5, 5, 5, 1 #
length
-#SELECT * FROM sys.systemfunctions WHERE function_id NOT IN (SELECT id FROM
sys.functions);
-% sys.systemfunctions # table_name
-% function_id # name
-% int # type
-% 1 # length
-#SELECT * FROM sys.systemfunctions WHERE function_id NOT IN (SELECT id FROM
sys.functions WHERE schema_id IN (SELECT id FROM sys.schemas WHERE name IN
('sys','json','profiler','bam')));
-% sys.systemfunctions # table_name
-% function_id # name
-% int # type
-% 1 # length
+% sys.functions, sys.functions, sys.functions, sys.functions,
sys.functions, sys.functions, sys.functions, sys.functions, sys.functions,
sys.functions, sys.functions # table_name
+% id, name, func, mod, language, type, side_effect, varres,
vararg, schema_id, system # name
+% int, varchar, varchar, varchar, int, int,
boolean, boolean, boolean, int, boolean # type
+% 1, 0, 0, 0, 1, 1, 5, 5, 5, 1,
5 # length
+#SELECT * FROM sys.functions WHERE system AND schema_id NOT IN (SELECT id FROM
sys.schemas WHERE system);
+% sys.functions, sys.functions, sys.functions, sys.functions,
sys.functions, sys.functions, sys.functions, sys.functions, sys.functions,
sys.functions, sys.functions # table_name
+% id, name, func, mod, language, type, side_effect, varres,
vararg, schema_id, system # name
+% int, varchar, varchar, varchar, int, int,
boolean, boolean, boolean, int, boolean # type
+% 1, 0, 0, 0, 1, 1, 5, 5, 5, 1,
5 # length
#SELECT * FROM sys.args WHERE func_id NOT IN (SELECT id FROM sys.functions);
% sys.args, sys.args, sys.args, sys.args, sys.args,
sys.args, sys.args, sys.args # table_name
% id, func_id, name, type, type_digits, type_scale, inout,
number # name
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list