Changeset: 4a31be438d43 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4a31be438d43 Modified Files: clients/Tests/MAL-signatures.stable.out clients/Tests/MAL-signatures.stable.out.int128 clients/Tests/exports.stable.out common/utils/msabaoth.c common/utils/msabaoth.h monetdb5/mal/mal.c monetdb5/modules/atoms/batxml.c monetdb5/modules/atoms/uuid.c monetdb5/modules/atoms/uuid.mal monetdb5/modules/atoms/xml.c monetdb5/modules/atoms/xml.h monetdb5/modules/atoms/xml.mal sql/backends/monet5/sql.c sql/server/rel_dump.c sql/server/rel_propagate.c sql/server/rel_schema.c sql/server/rel_updates.c sql/server/rel_updates.h sql/storage/bat/bat_storage.c sql/storage/store.c tools/mserver/mserver5.c Branch: candidate-exceptions Log Message:
Merge with default branch. diffs (truncated from 1778 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 @@ -11983,7 +11983,6 @@ stdout of test 'MAL-signatures` in direc [ "uuid", "#read", "command uuid.#read():void ", "UUIDread;", "" ] [ "uuid", "#tostr", "command uuid.#tostr():void ", "UUIDtoString;", "" ] [ "uuid", "#write", "command uuid.#write():void ", "UUIDwrite;", "" ] -[ "uuid", "epilogue", "command uuid.epilogue():void ", "UUIDepilogue;", "release the resources held by the uuid module" ] [ "uuid", "isaUUID", "command uuid.isaUUID(u:str):bit ", "UUIDisaUUID;", "Test a string for a UUID format" ] [ "uuid", "new", "unsafe command uuid.new():uuid ", "UUIDgenerateUuid;", "Generate a new uuid" ] [ "uuid", "new", "unsafe command uuid.new(d:int):uuid ", "UUIDgenerateUuidInt;", "Generate a new uuid (dummy version for side effect free multiplex loop)" ] @@ -12155,7 +12154,6 @@ stdout of test 'MAL-signatures` in direc [ "xml", "document", "command xml.document(val:str):xml ", "XMLdocument;", "Check the value for compliance as XML document" ] [ "xml", "element", "command xml.element(name:str, ns:xml, attr:xml, s:xml):xml ", "XMLelement;", "The basic building block for XML elements are namespaces, attributes and a sequence of xml elements. The name space and the attributes may be left unspecified(=nil:bat)." ] [ "xml", "element", "command xml.element(name:str, s:xml):xml ", "XMLelementSmall;", "The basic building block for XML elements are namespaces, attributes and a sequence of xml elements. The name space and the attributes may be left unspecified(=nil:bat)." ] -[ "xml", "epilogue", "command xml.epilogue():void ", "XMLepilogue;", "release the resources held by the xml module" ] [ "xml", "forest", "pattern xml.forest(val:xml...):xml ", "XMLforest;", "Construct an element list" ] [ "xml", "isdocument", "command xml.isdocument(val:str):bit ", "XMLisdocument;", "Validate the string as a document" ] [ "xml", "parse", "command xml.parse(doccont:str, val:str, option:str):xml ", "XMLparse;", "Parse the XML document or element string values " ] 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 @@ -16411,7 +16411,6 @@ stdout of test 'MAL-signatures` in direc [ "uuid", "#read", "command uuid.#read():void ", "UUIDread;", "" ] [ "uuid", "#tostr", "command uuid.#tostr():void ", "UUIDtoString;", "" ] [ "uuid", "#write", "command uuid.#write():void ", "UUIDwrite;", "" ] -[ "uuid", "epilogue", "command uuid.epilogue():void ", "UUIDepilogue;", "release the resources held by the uuid module" ] [ "uuid", "isaUUID", "command uuid.isaUUID(u:str):bit ", "UUIDisaUUID;", "Test a string for a UUID format" ] [ "uuid", "new", "unsafe command uuid.new():uuid ", "UUIDgenerateUuid;", "Generate a new uuid" ] [ "uuid", "new", "unsafe command uuid.new(d:int):uuid ", "UUIDgenerateUuidInt;", "Generate a new uuid (dummy version for side effect free multiplex loop)" ] @@ -16583,7 +16582,6 @@ stdout of test 'MAL-signatures` in direc [ "xml", "document", "command xml.document(val:str):xml ", "XMLdocument;", "Check the value for compliance as XML document" ] [ "xml", "element", "command xml.element(name:str, ns:xml, attr:xml, s:xml):xml ", "XMLelement;", "The basic building block for XML elements are namespaces, attributes and a sequence of xml elements. The name space and the attributes may be left unspecified(=nil:bat)." ] [ "xml", "element", "command xml.element(name:str, s:xml):xml ", "XMLelementSmall;", "The basic building block for XML elements are namespaces, attributes and a sequence of xml elements. The name space and the attributes may be left unspecified(=nil:bat)." ] -[ "xml", "epilogue", "command xml.epilogue():void ", "XMLepilogue;", "release the resources held by the xml module" ] [ "xml", "forest", "pattern xml.forest(val:xml...):xml ", "XMLforest;", "Construct an element list" ] [ "xml", "isdocument", "command xml.isdocument(val:str):bit ", "XMLisdocument;", "Validate the string as a document" ] [ "xml", "parse", "command xml.parse(doccont:str, val:str, option:str):xml ", "XMLparse;", "Parse the XML document or element string values " ] 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 @@ -1888,7 +1888,6 @@ str URLnew4(url *u, str *protocol, str * str URLnoop(url *u, url *val); ssize_t URLtoString(str *s, size_t *len, const char *src, bool external); int UUIDcompare(const uuid *l, const uuid *r); -str UUIDepilogue(void *ret); str UUIDequal(bit *retval, uuid **l, uuid **r); ssize_t UUIDfromString(const char *svalue, size_t *len, uuid **retval, bool external); str UUIDgenerateUuid(uuid **retval); @@ -1935,7 +1934,6 @@ str XMLcontent(xml *x, str *s); str XMLdocument(xml *x, str *s); str XMLelement(xml *ret, str *name, xml *nspace, xml *attr, xml *val); str XMLelementSmall(xml *ret, str *name, xml *val); -str XMLepilogue(void *ret); str XMLforest(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr p); ssize_t XMLfromString(const char *src, size_t *len, xml *x, bool external); str XMLisdocument(bit *x, str *s); @@ -2376,8 +2374,7 @@ void moveInstruction(MalBlkPtr mb, int p void msab_dbfarminit(const char *dbfarm); void msab_dbpathinit(const char *dbpath); char *msab_deserialise(sabdb **ret, char *sabdb); -void msab_exit(void); -void msab_freeStatus(sabdb **ret); +char *msab_freeStatus(sabdb **ret); char *msab_getDBfarm(char **ret); char *msab_getDBname(char **ret); char *msab_getMyStatus(sabdb **ret); diff --git a/common/utils/msabaoth.c b/common/utils/msabaoth.c --- a/common/utils/msabaoth.c +++ b/common/utils/msabaoth.c @@ -119,23 +119,6 @@ msab_isuuid(const char *restrict s) return hyphens == 4; } -void -msab_exit(void) -{ - if (_sabaoth_internal_dbfarm != NULL) { - free(_sabaoth_internal_dbfarm); - _sabaoth_internal_dbfarm = NULL; - } - if (_sabaoth_internal_dbname != NULL) { - free(_sabaoth_internal_dbname); - _sabaoth_internal_dbname = NULL; - } - if (_sabaoth_internal_uuid != NULL) { - free(_sabaoth_internal_uuid); - _sabaoth_internal_uuid = NULL; - } -} - /** * Initialises this Sabaoth instance to use the given dbfarm and dbname. * dbname may be NULL to indicate that there is no active database. The diff --git a/common/utils/msabaoth.h b/common/utils/msabaoth.h --- a/common/utils/msabaoth.h +++ b/common/utils/msabaoth.h @@ -79,6 +79,5 @@ msab_export void msab_freeStatus(sabdb** msab_export char *msab_getUplogInfo(sabuplog *ret, const sabdb *db); msab_export char *msab_serialise(char **ret, const sabdb *db); msab_export char *msab_deserialise(sabdb **ret, char *sabdb); -msab_export void msab_exit(void); #endif diff --git a/monetdb5/mal/mal.c b/monetdb5/mal/mal.c --- a/monetdb5/mal/mal.c +++ b/monetdb5/mal/mal.c @@ -129,7 +129,6 @@ void mserver_reset(void) monet_memory = 0; memset((char*)monet_characteristics,0, sizeof(monet_characteristics)); mal_namespace_reset(); - msab_exit(); /* No need to clean up the namespace, it will simply be extended * upon restart mal_namespace_reset(); */ GDKreset(0); // terminate all other threads diff --git a/monetdb5/modules/atoms/batxml.c b/monetdb5/modules/atoms/batxml.c --- a/monetdb5/modules/atoms/batxml.c +++ b/monetdb5/modules/atoms/batxml.c @@ -1453,82 +1453,82 @@ BATXMLxquery(bat *ret, const bat *bid, c str BATXMLxml2str(bat *ret, const bat *bid) { (void) ret; (void) bid; - return GDKstrdup(NO_LIBXML_FATAL); + return createException(MAL, "batxml.xml2str", SQLSTATE(HY005) NO_LIBXML_FATAL); } str BATXMLxmltext(bat *ret, const bat *bid) { (void) ret; (void) bid; - return GDKstrdup(NO_LIBXML_FATAL); + return createException(MAL, "batxml.xmltext", SQLSTATE(HY005) NO_LIBXML_FATAL); } str BATXMLstr2xml(bat *ret, const bat *bid) { (void) ret; (void) bid; - return GDKstrdup(NO_LIBXML_FATAL); + return createException(MAL, "batxml.str2xml", SQLSTATE(HY005) NO_LIBXML_FATAL); } str BATXMLdocument(bat *ret, const bat *bid) { (void) ret; (void) bid; - return GDKstrdup(NO_LIBXML_FATAL); + return createException(MAL, "batxml.document", SQLSTATE(HY005) NO_LIBXML_FATAL); } str BATXMLcontent(bat *ret, const bat *bid) { (void) ret; (void) bid; - return GDKstrdup(NO_LIBXML_FATAL); + return createException(MAL, "batxml.content", SQLSTATE(HY005) NO_LIBXML_FATAL); } str BATXMLisdocument(bat *ret, const bat *bid) { (void) ret; (void) bid; - return GDKstrdup(NO_LIBXML_FATAL); + return createException(MAL, "batxml.isdocument", SQLSTATE(HY005) NO_LIBXML_FATAL); } str BATXMLelementSmall(bat *ret, const char * const *name, const bat *bid) { (void) ret; (void) name; (void) bid; - return GDKstrdup(NO_LIBXML_FATAL); + return createException(MAL, "batxml.elementSmall", SQLSTATE(HY005) NO_LIBXML_FATAL); } str BATXMLoptions(bat *ret, const char * const *name, const char * const *options, const bat *bid) { (void) ret; (void) name; (void) options; (void) bid; - return GDKstrdup(NO_LIBXML_FATAL); + return createException(MAL, "batxml.options", SQLSTATE(HY005) NO_LIBXML_FATAL); } str BATXMLcomment(bat *ret, const bat *bid) { (void) ret; (void) bid; - return GDKstrdup(NO_LIBXML_FATAL); + return createException(MAL, "batxml.comment", SQLSTATE(HY005) NO_LIBXML_FATAL); } str BATXMLparse(bat *ret, const char * const *doccont, const bat *bid, const char * const *option) { (void) ret; (void) doccont; (void) bid; (void) option; - return GDKstrdup(NO_LIBXML_FATAL); + return createException(MAL, "batxml.parse", SQLSTATE(HY005) NO_LIBXML_FATAL); } str BATXMLxquery(bat *ret, const bat *bid, const char * const *expr) { (void) ret; (void) bid; (void) expr; - return GDKstrdup(NO_LIBXML_FATAL); + return createException(MAL, "batxml.xquery", SQLSTATE(HY005) NO_LIBXML_FATAL); } str BATXMLpi(bat *ret, const char * const *tgt, const bat *bid) { (void) ret; (void) tgt; (void) bid; - return GDKstrdup(NO_LIBXML_FATAL); + return createException(MAL, "batxml.pi", SQLSTATE(HY005) NO_LIBXML_FATAL); } str BATXMLroot(bat *ret, const bat *bid, const char * const *version, const char * const *standalone) { (void) ret; (void) bid; (void) version; (void) standalone; - return GDKstrdup(NO_LIBXML_FATAL); + return createException(MAL, "batxml.root", SQLSTATE(HY005) NO_LIBXML_FATAL); } str BATXMLattribute(bat *ret, const char * const *name, const bat *bid) { (void) ret; (void) name; (void) bid; - return GDKstrdup(NO_LIBXML_FATAL); + return createException(MAL, "batxml.attribute", SQLSTATE(HY005) NO_LIBXML_FATAL); } str BATXMLelement(bat *ret, const char * const *name, xml *ns, xml *attr, const bat *bid) { (void) ret; @@ -1536,25 +1536,25 @@ str BATXMLelement(bat *ret, const char * (void) ns; (void) attr; (void) bid; - return GDKstrdup(NO_LIBXML_FATAL); + return createException(MAL, "batxml.element", SQLSTATE(HY005) NO_LIBXML_FATAL); } str BATXMLconcat(bat *ret, const bat *bid, const bat *rid) { (void) ret; (void) bid; (void) rid; - return GDKstrdup(NO_LIBXML_FATAL); + return createException(MAL, "batxml.concat", SQLSTATE(HY005) NO_LIBXML_FATAL); } str BATXMLforest(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr p) { (void) cntxt; (void) mb; (void) stk; (void) p; - return GDKstrdup(NO_LIBXML_FATAL); + return createException(MAL, "batxml.forest", SQLSTATE(HY005) NO_LIBXML_FATAL); } str BATXMLgroup(xml *ret, const bat *bid) { (void) ret; (void) bid; - return GDKstrdup(NO_LIBXML_FATAL); + return createException(MAL, "batxml.group", SQLSTATE(HY005) NO_LIBXML_FATAL); } str AGGRsubxmlcand(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bat *sid, const bit *skip_nils) { (void) retval; @@ -1563,7 +1563,7 @@ str AGGRsubxmlcand(bat *retval, const ba (void) eid; (void) sid; (void) skip_nils; - return GDKstrdup(NO_LIBXML_FATAL); + return createException(MAL, "batxml.subxmlcand", SQLSTATE(HY005) NO_LIBXML_FATAL); } str AGGRsubxml(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bit *skip_nils) { (void) retval; @@ -1571,7 +1571,7 @@ str AGGRsubxml(bat *retval, const bat *b (void) gid; (void) eid; (void) skip_nils; - return GDKstrdup(NO_LIBXML_FATAL); + return createException(MAL, "batxml.subxml", SQLSTATE(HY005) NO_LIBXML_FATAL); } #endif diff --git a/monetdb5/modules/atoms/uuid.c b/monetdb5/modules/atoms/uuid.c --- a/monetdb5/modules/atoms/uuid.c +++ b/monetdb5/modules/atoms/uuid.c @@ -51,7 +51,6 @@ typedef union { } uuid; mal_export str UUIDprelude(void *ret); -mal_export str UUIDepilogue(void *ret); mal_export int UUIDcompare(const uuid *l, const uuid *r); mal_export ssize_t UUIDfromString(const char *svalue, size_t *len, uuid **retval, bool external); mal_export BUN UUIDhash(const void *u); @@ -68,7 +67,7 @@ mal_export str UUIDisaUUID(bit *retval, mal_export str UUIDequal(bit *retval, uuid **l, uuid **r); static uuid uuid_nil; /* automatically initialized as zeros */ -static uuid *uuid_session = NULL; /* automatically set during system restart */ +static uuid *uuid_session; /* automatically set during system restart */ str UUIDprelude(void *ret) @@ -81,17 +80,6 @@ UUIDprelude(void *ret) return MAL_SUCCEED; } -str -UUIDepilogue(void *ret) -{ - (void) ret; - if (uuid_session) { - GDKfree(uuid_session); - uuid_session = NULL; - } - return MAL_SUCCEED; -} - #define is_uuid_nil(x) (memcmp((x)->u, uuid_nil.u, UUID_SIZE) == 0) _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list