Changeset: d781c37c7f45 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d781c37c7f45
Modified Files:
clients/Tests/MAL-signatures.stable.out
clients/Tests/MAL-signatures.stable.out.int128
clients/Tests/exports.stable.out
cmake/monetdb-toolchain.cmake
monetdb5/modules/atoms/url.c
monetdb5/modules/atoms/url.h
monetdb5/modules/atoms/url.mal
sql/ChangeLog
sql/backends/monet5/sql_upgrades.c
sql/scripts/12_url.sql
sql/test/BugTracker-2012/Tests/url_script_test.Bug-2972.stable.err
sql/test/BugTracker-2012/Tests/url_script_test.Bug-2972.stable.out
sql/test/emptydb/Tests/check.stable.out
sql/test/emptydb/Tests/check.stable.out.32bit
sql/test/emptydb/Tests/check.stable.out.int128
sql/test/sys-schema/Tests/systemfunctions.stable.out
sql/test/sys-schema/Tests/systemfunctions.stable.out.int128
Branch: default
Log Message:
merged
diffs (truncated from 480 to 300 lines):
diff --git a/clients/Tests/MAL-signatures.stable.out
b/clients/Tests/MAL-signatures.stable.out
--- a/clients/Tests/MAL-signatures.stable.out
+++ b/clients/Tests/MAL-signatures.stable.out
@@ -10384,7 +10384,6 @@ stdout of test 'MAL-signatures` in direc
[ "udf", "reverse", "command udf.reverse(X_1:str):str ",
"UDFreverse;", "" ]
[ "url", "getAnchor", "command url.getAnchor(X_1:url):str ",
"URLgetAnchor;", "" ]
[ "url", "getBasename", "command url.getBasename(X_1:url):str ",
"URLgetBasename;", "" ]
-[ "url", "getContent", "command url.getContent(X_1:url):str ",
"URLgetContent;", "" ]
[ "url", "getContext", "command url.getContext(X_1:url):str ",
"URLgetContext;", "" ]
[ "url", "getDomain", "command url.getDomain(X_1:url):str ",
"URLgetDomain;", "" ]
[ "url", "getExtension", "command url.getExtension(X_1:url):str ",
"URLgetExtension;", "" ]
diff --git a/clients/Tests/MAL-signatures.stable.out.int128
b/clients/Tests/MAL-signatures.stable.out.int128
--- a/clients/Tests/MAL-signatures.stable.out.int128
+++ b/clients/Tests/MAL-signatures.stable.out.int128
@@ -13758,7 +13758,6 @@ stdout of test 'MAL-signatures` in direc
[ "udf", "reverse", "command udf.reverse(X_1:str):str ",
"UDFreverse;", "" ]
[ "url", "getAnchor", "command url.getAnchor(X_1:url):str ",
"URLgetAnchor;", "" ]
[ "url", "getBasename", "command url.getBasename(X_1:url):str ",
"URLgetBasename;", "" ]
-[ "url", "getContent", "command url.getContent(X_1:url):str ",
"URLgetContent;", "" ]
[ "url", "getContext", "command url.getContext(X_1:url):str ",
"URLgetContext;", "" ]
[ "url", "getDomain", "command url.getDomain(X_1:url):str ",
"URLgetDomain;", "" ]
[ "url", "getExtension", "command url.getExtension(X_1:url):str ",
"URLgetExtension;", "" ]
diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out
--- a/clients/Tests/exports.stable.out
+++ b/clients/Tests/exports.stable.out
@@ -2041,7 +2041,6 @@ int TYPE_xml;
ssize_t URLfromString(const char *src, size_t *len, str *u, bool external);
str URLgetAnchor(str *retval, url *val);
str URLgetBasename(str *retval, url *t);
-str URLgetContent(str *retval, url *Str1);
str URLgetContext(str *retval, url *val);
str URLgetDomain(str *retval, url *tv);
str URLgetExtension(str *retval, url *tv);
diff --git a/cmake/monetdb-toolchain.cmake b/cmake/monetdb-toolchain.cmake
--- a/cmake/monetdb-toolchain.cmake
+++ b/cmake/monetdb-toolchain.cmake
@@ -10,7 +10,7 @@ function(monetdb_default_toolchain)
if(SANITIZER)
if(${CMAKE_C_COMPILER_ID} STREQUAL "GNU")
MT_addCompilerFlag("-fsanitize=address" "-fsanitize=address"
"${CMAKE_C_FLAGS}" "all" CMAKE_C_FLAGS)
- MT_addCompilerFlag("-fno-omit-frame-pointer" "-fsanitize=address"
"${CMAKE_C_FLAGS}" "all" CMAKE_C_FLAGS)
+ MT_addCompilerFlag("-fno-omit-frame-pointer" "-fno-omit-frame-pointer"
"${CMAKE_C_FLAGS}" "all" CMAKE_C_FLAGS)
add_definitions(-DNO_ATOMIC_INSTRUCTIONS)
else()
message(FATAL_ERROR "Sanitizer only supported with GCC")
diff --git a/monetdb5/modules/atoms/url.c b/monetdb5/modules/atoms/url.c
--- a/monetdb5/modules/atoms/url.c
+++ b/monetdb5/modules/atoms/url.c
@@ -388,17 +388,6 @@ URLgetBasename(str *retval, url *val)
return MAL_SUCCEED;
}
-/* COMMAND "getContent": Retrieve the file referenced
- * SIGNATURE: getContent(str) : str; */
-str
-URLgetContent(str *retval, url *Str1)
-{
- (void) retval;
- (void) Str1;
-
- throw(MAL, "url.getContent", SQLSTATE(0A000) "Feature not supported");
-}
-
/* COMMAND "getContext": Extract the path context from the URL
* SIGNATURE: getContext(str) : str; */
str
@@ -761,7 +750,6 @@ mel_func url_init_funcs[] = {
command("calc", "url", URLnoop, false, "Create an URL from a string literal",
args(1,2, arg("",url),arg("s",url))),
command("url", "getAnchor", URLgetAnchor, false, "Extract the URL anchor
(reference)", args(1,2, arg("",str),arg("u",url))),
command("url", "getBasename", URLgetBasename, false, "Extract the URL base
file name", args(1,2, arg("",str),arg("u",url))),
- command("url", "getContent", URLgetContent, false, "Get the URL resource in a
local file", args(1,2, arg("",str),arg("u",url))),
command("url", "getContext", URLgetContext, false, "Get the path context of a
URL", args(1,2, arg("",str),arg("u",url))),
command("url", "getDomain", URLgetDomain, false, "Extract Internet domain
from the URL", args(1,2, arg("",str),arg("u",url))),
command("url", "getExtension", URLgetExtension, false, "Extract the file
extension of the URL", args(1,2, arg("",str),arg("u",url))),
diff --git a/monetdb5/modules/atoms/url.h b/monetdb5/modules/atoms/url.h
--- a/monetdb5/modules/atoms/url.h
+++ b/monetdb5/modules/atoms/url.h
@@ -26,7 +26,6 @@ mal_export str URLnoop(url *u, url *val)
mal_export str URLnew(url *u, str *val);
mal_export str URLgetAnchor(str *retval, url *val);
mal_export str URLgetBasename(str *retval, url *t);
-mal_export str URLgetContent(str *retval, url *Str1);
mal_export str URLgetContext(str *retval, url *val);
mal_export str URLgetDomain(str *retval, url *tv);
mal_export str URLgetExtension(str *retval, url *tv);
diff --git a/monetdb5/modules/atoms/url.mal b/monetdb5/modules/atoms/url.mal
--- a/monetdb5/modules/atoms/url.mal
+++ b/monetdb5/modules/atoms/url.mal
@@ -32,10 +32,6 @@ command getBasename(u:url) :str
address URLgetBasename
comment "Extract the URL base file name";
-command getContent(u:url) :str
-address URLgetContent
-comment "Get the URL resource in a local file";
-
command getContext(u:url) :str
address URLgetContext
comment "Get the path context of a URL";
diff --git a/sql/ChangeLog b/sql/ChangeLog
--- a/sql/ChangeLog
+++ b/sql/ChangeLog
@@ -32,3 +32,5 @@
about globally declared variables, namely their schema, type and
current value.
+* Mon Jun 15 2020 Pedro Ferreira <[email protected]>
+- Removed obsolete sys.getContent(url) function.
diff --git a/sql/backends/monet5/sql_upgrades.c
b/sql/backends/monet5/sql_upgrades.c
--- a/sql/backends/monet5/sql_upgrades.c
+++ b/sql/backends/monet5/sql_upgrades.c
@@ -2966,6 +2966,8 @@ sql_update_default(Client c, mvc *sql, c
(int) F_UNION,
(int) F_UNION);
+ pos += snprintf(buf + pos, bufsize - pos, "DROP
FUNCTION \"sys\".\"getContent\"(url);\n");
+
pos += snprintf(buf + pos, bufsize - pos, "set schema
\"%s\";\n", prev_schema);
assert(pos < bufsize);
diff --git a/sql/scripts/12_url.sql b/sql/scripts/12_url.sql
--- a/sql/scripts/12_url.sql
+++ b/sql/scripts/12_url.sql
@@ -12,9 +12,6 @@ GRANT EXECUTE ON FUNCTION getAnchor(url)
CREATE function getBasename(theUrl url) RETURNS STRING
EXTERNAL NAME url."getBasename";
GRANT EXECUTE ON FUNCTION getBasename(url) TO PUBLIC;
-CREATE function getContent(theUrl url) RETURNS STRING
- EXTERNAL NAME url."getContent";
-GRANT EXECUTE ON FUNCTION getContent(url) TO PUBLIC;
CREATE function getContext(theUrl url) RETURNS STRING
EXTERNAL NAME url."getContext";
GRANT EXECUTE ON FUNCTION getContext(url) TO PUBLIC;
diff --git a/sql/test/BugTracker-2012/Tests/url_script_test.Bug-2972.stable.err
b/sql/test/BugTracker-2012/Tests/url_script_test.Bug-2972.stable.err
--- a/sql/test/BugTracker-2012/Tests/url_script_test.Bug-2972.stable.err
+++ b/sql/test/BugTracker-2012/Tests/url_script_test.Bug-2972.stable.err
@@ -31,9 +31,9 @@ stderr of test 'url_script_test.Bug-2972
MAPI = (monetdb) /var/tmp/mtest-11575/.s.monetdb.32804
QUERY = select getContent(u) from t2972;
-ERROR = !Feature not supported
-CODE = 0A000
-MAPI = (monetdb) /var/tmp/mtest-11575/.s.monetdb.32804
+ERROR = !SELECT: no such unary operator 'getcontent(url)'
+CODE = 42000
+MAPI = (monetdb) /var/tmp/mtest-409684/.s.monetdb.31336
QUERY = drop table t2972;
ERROR = !Current transaction is aborted (please ROLLBACK)
CODE = 25005
diff --git a/sql/test/BugTracker-2012/Tests/url_script_test.Bug-2972.stable.out
b/sql/test/BugTracker-2012/Tests/url_script_test.Bug-2972.stable.out
--- a/sql/test/BugTracker-2012/Tests/url_script_test.Bug-2972.stable.out
+++ b/sql/test/BugTracker-2012/Tests/url_script_test.Bug-2972.stable.out
@@ -51,7 +51,7 @@ stdout of test 'url_script_test.Bug-2972
#insert into t2972
values('http://www.monetdb.org:8080/Documentation/Manuals/SQLreference/Datamanipulation');
[ 1 ]
#select getAnchor(u) from t2972;
-% sys. # table_name
+% sys.%1 # table_name
% %1 # name
% clob # type
% 0 # length
@@ -59,7 +59,7 @@ stdout of test 'url_script_test.Bug-2972
[ NULL ]
[ NULL ]
#select getBasename(u) from t2972;
-% sys. # table_name
+% sys.%1 # table_name
% %1 # name
% clob # type
% 16 # length
@@ -67,7 +67,7 @@ stdout of test 'url_script_test.Bug-2972
[ NULL ]
[ "Datamanipulation" ]
#select getContext(u) from t2972;
-% sys. # table_name
+% sys.%1 # table_name
% %1 # name
% clob # type
% 52 # length
@@ -75,7 +75,7 @@ stdout of test 'url_script_test.Bug-2972
[ NULL ]
[ "/Documentation/Manuals/SQLreference/Datamanipulation" ]
#select getDomain(u) from t2972;
-% sys. # table_name
+% sys.%1 # table_name
% %1 # name
% clob # type
% 3 # length
@@ -83,7 +83,7 @@ stdout of test 'url_script_test.Bug-2972
[ "com" ]
[ "org" ]
#select getExtension(u) from t2972;
-% sys. # table_name
+% sys.%1 # table_name
% %1 # name
% clob # type
% 3 # length
@@ -91,7 +91,7 @@ stdout of test 'url_script_test.Bug-2972
[ NULL ]
[ NULL ]
#select getFile(u) from t2972;
-% sys. # table_name
+% sys.%1 # table_name
% %1 # name
% clob # type
% 16 # length
@@ -99,7 +99,7 @@ stdout of test 'url_script_test.Bug-2972
[ NULL ]
[ "Datamanipulation" ]
#select getHost(u) from t2972;
-% sys. # table_name
+% sys.%1 # table_name
% %1 # name
% clob # type
% 15 # length
@@ -107,7 +107,7 @@ stdout of test 'url_script_test.Bug-2972
[ "www.monetdb.com" ]
[ "www.monetdb.org" ]
#select getPort(u) from t2972;
-% sys. # table_name
+% sys.%1 # table_name
% %1 # name
% clob # type
% 4 # length
@@ -115,7 +115,7 @@ stdout of test 'url_script_test.Bug-2972
[ NULL ]
[ "8080" ]
#select getQuery(u) from t2972;
-% sys. # table_name
+% sys.%1 # table_name
% %1 # name
% clob # type
% 3 # length
@@ -123,7 +123,7 @@ stdout of test 'url_script_test.Bug-2972
[ "x=2" ]
[ NULL ]
#select getUser(u) from t2972;
-% sys. # table_name
+% sys.%1 # table_name
% %1 # name
% clob # type
% 2 # length
@@ -131,7 +131,7 @@ stdout of test 'url_script_test.Bug-2972
[ NULL ]
[ NULL ]
#select getRobotURL(u) from t2972;
-% sys. # table_name
+% sys.%1 # table_name
% %1 # name
% clob # type
% 38 # length
@@ -139,7 +139,7 @@ stdout of test 'url_script_test.Bug-2972
[ "http://www.monetdb.com/robots.txt" ]
[ "http://www.monetdb.org:8080/robots.txt" ]
#select isaURL(u) from t2972;
-% sys. # table_name
+% sys.%1 # table_name
% %1 # name
% boolean # type
% 5 # length
@@ -147,32 +147,32 @@ stdout of test 'url_script_test.Bug-2972
[ true ]
[ true ]
#select isaURL('http://www.monetdb.org');
-% . # table_name
-% %1 # name
+% .%2 # table_name
+% %2 # name
% boolean # type
% 5 # length
[ true ]
#select isaURL('http://www.monetdb.org');
-% . # table_name
-% %1 # name
+% .%2 # table_name
+% %2 # name
% boolean # type
% 5 # length
[ true ]
#select isaURL('htp:///www.monetdb.org');
-% . # table_name
-% %1 # name
+% .%2 # table_name
+% %2 # name
% boolean # type
% 5 # length
[ true ]
#select newurl('https','www.monetdb.org',8080,'blah');
-% . # table_name
-% %1 # name
+% .%2 # table_name
+% %2 # name
% url # type
% 33 # length
[ https://www.monetdb.org:8080/blah ]
#select newurl('https','localhost','boe');
-% . # table_name
-% %1 # name
+% .%2 # table_name
+% %2 # name
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list