Changeset: 4cc4a2f107e7 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/4cc4a2f107e7
Added Files:
        sql/test/sql_xml/Tests/cleanupfuncs.reqtest
        sql/test/sql_xml/Tests/cleanupfuncs.test
Modified Files:
        sql/test/sql_xml/Tests/All
Branch: Jan2022
Log Message:

Add test script to also remove the created xml type and xml functions as done 
in funcs.test
Note that the 'DROP TYPE xml CASCADE' statement currently crashes the server 
(segmentation fault).
The dump shows this is happening in sql_trans_drop_all_dependencies().


diffs (50 lines):

diff --git a/sql/test/sql_xml/Tests/All b/sql/test/sql_xml/Tests/All
--- a/sql/test/sql_xml/Tests/All
+++ b/sql/test/sql_xml/Tests/All
@@ -3,3 +3,4 @@ load
 HAVE_LIBXML?xml
 HAVE_LIBXML?xml_attribute_parsing.SF-1855673
 HAVE_LIBXML?xmlelement_segfault.SF-2812767
+cleanupfuncs
diff --git a/sql/test/sql_xml/Tests/cleanupfuncs.reqtest 
b/sql/test/sql_xml/Tests/cleanupfuncs.reqtest
new file mode 100644
--- /dev/null
+++ b/sql/test/sql_xml/Tests/cleanupfuncs.reqtest
@@ -0,0 +1,1 @@
+funcs
diff --git a/sql/test/sql_xml/Tests/cleanupfuncs.test 
b/sql/test/sql_xml/Tests/cleanupfuncs.test
new file mode 100644
--- /dev/null
+++ b/sql/test/sql_xml/Tests/cleanupfuncs.test
@@ -0,0 +1,31 @@
+statement error 42000!DROP TYPE: unable to drop type xml (there are database 
objects which depend on it)
+DROP TYPE xml
+
+statement ok
+DROP FUNCTION xml(STRING)
+
+statement ok
+DROP FUNCTION str(xml)
+
+statement ok
+DROP FUNCTION "comment"(STRING)
+
+
+-- quicker way to drop all functions which use xml datatype
+statement ok
+DROP TYPE xml CASCADE
+
+
+-- cleanup remainder of created functions which do not rely on xml datatype
+statement ok
+DROP FUNCTION parse (STRING, STRING, STRING)
+
+statement ok
+DROP FUNCTION pi (STRING, STRING)
+
+statement ok
+DROP FUNCTION attribute (STRING, STRING)
+
+statement ok
+DROP FUNCTION isdocument (STRING)
+
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to