diff --git a/CHANGELOG b/CHANGELOG index 307dcc9e7b..f7860253a6 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,12 @@ v1.2.alpha (XXXX-XX-XX) ----------------------- +* replaced redundant error return code 1520 (Unable to open collection) with error code + 1203 (Collection not found). These error codes have the same meanings, but one of + them was returned from AQL queries only, the other got thrown by other parts of + ArangoDB. Now, error 1203 (Collection not found) is used in AQL too in case a + non-existing collection is used. + * fixed issue #382: [Documentation error] Maschine... should be Machine... * unified history file locations for arangod, arangosh, and arangoirb. diff --git a/arangod/Ahuacatl/ahuacatl-ast-node.c b/arangod/Ahuacatl/ahuacatl-ast-node.c index f4da8c3348..ba353e2f30 100644 --- a/arangod/Ahuacatl/ahuacatl-ast-node.c +++ b/arangod/Ahuacatl/ahuacatl-ast-node.c @@ -398,7 +398,7 @@ TRI_aql_node_t* TRI_CreateNodeCollectionAql (TRI_aql_context_t* const context, } if (strlen(name) == 0) { - TRI_SetErrorContextAql(context, TRI_ERROR_QUERY_COLLECTION_NOT_FOUND, name); + TRI_SetErrorContextAql(context, TRI_ERROR_ARANGO_COLLECTION_NOT_FOUND, name); return NULL; } diff --git a/arangod/Ahuacatl/ahuacatl-collections.c b/arangod/Ahuacatl/ahuacatl-collections.c index 8a7f46e88e..6313c67dc7 100644 --- a/arangod/Ahuacatl/ahuacatl-collections.c +++ b/arangod/Ahuacatl/ahuacatl-collections.c @@ -159,7 +159,7 @@ bool OpenCollections (TRI_aql_context_t* const context) { LOG_TRACE("locking collection '%s'", collection->_name); collection->_collection = TRI_UseCollectionByNameVocBase(context->_vocbase, collection->_name); if (collection->_collection == NULL) { - TRI_SetErrorContextAql(context, TRI_ERROR_QUERY_COLLECTION_NOT_FOUND, collection->_name); + TRI_SetErrorContextAql(context, TRI_ERROR_ARANGO_COLLECTION_NOT_FOUND, collection->_name); return false; } diff --git a/js/common/bootstrap/errors.js b/js/common/bootstrap/errors.js index 82aa5492c3..7ca55dcedb 100644 --- a/js/common/bootstrap/errors.js +++ b/js/common/bootstrap/errors.js @@ -87,7 +87,6 @@ "ERROR_QUERY_VARIABLE_NAME_INVALID" : { "code" : 1510, "message" : "variable name '%s' has an invalid format" }, "ERROR_QUERY_VARIABLE_REDECLARED" : { "code" : 1511, "message" : "variable '%s' is assigned multiple times" }, "ERROR_QUERY_VARIABLE_NAME_UNKNOWN" : { "code" : 1512, "message" : "unknown variable '%s'" }, - "ERROR_QUERY_COLLECTION_NOT_FOUND" : { "code" : 1520, "message" : "unable to open collection '%s'" }, "ERROR_QUERY_COLLECTION_LOCK_FAILED" : { "code" : 1521, "message" : "unable to read-lock collection %s" }, "ERROR_QUERY_TOO_MANY_COLLECTIONS" : { "code" : 1522, "message" : "too many collections" }, "ERROR_QUERY_DOCUMENT_ATTRIBUTE_REDECLARED" : { "code" : 1530, "message" : "document attribute '%s' is assigned multiple times" }, diff --git a/lib/BasicsC/errors.dat b/lib/BasicsC/errors.dat index a27491d2a7..641ca1ea18 100755 --- a/lib/BasicsC/errors.dat +++ b/lib/BasicsC/errors.dat @@ -117,7 +117,6 @@ ERROR_QUERY_NUMBER_OUT_OF_RANGE,1504,"number out of range","Will be raised when ERROR_QUERY_VARIABLE_NAME_INVALID,1510,"variable name '%s' has an invalid format","Will be raised when an invalid variable name is used." ERROR_QUERY_VARIABLE_REDECLARED,1511,"variable '%s' is assigned multiple times","Will be raised when a variable gets re-assigned in a query." ERROR_QUERY_VARIABLE_NAME_UNKNOWN,1512,"unknown variable '%s'","Will be raised when an unknown variable is used or the variable is undefined the context it is used." -ERROR_QUERY_COLLECTION_NOT_FOUND,1520,"unable to open collection '%s'","Will be raised when one of the collections referenced in the query was not found." ERROR_QUERY_COLLECTION_LOCK_FAILED,1521,"unable to read-lock collection %s","Will be raised when a read lock on the collection cannot be acquired." ERROR_QUERY_TOO_MANY_COLLECTIONS,1522,"too many collections","Will be raised when the number of collections in a query is beyond the allowed value." ERROR_QUERY_DOCUMENT_ATTRIBUTE_REDECLARED,1530,"document attribute '%s' is assigned multiple times","Will be raised when a document attribute is re-assigned." diff --git a/lib/BasicsC/voc-errors.c b/lib/BasicsC/voc-errors.c index 4fdda30535..6976a4beb1 100644 --- a/lib/BasicsC/voc-errors.c +++ b/lib/BasicsC/voc-errors.c @@ -83,7 +83,6 @@ void TRI_InitialiseErrorMessages (void) { REG_ERROR(ERROR_QUERY_VARIABLE_NAME_INVALID, "variable name '%s' has an invalid format"); REG_ERROR(ERROR_QUERY_VARIABLE_REDECLARED, "variable '%s' is assigned multiple times"); REG_ERROR(ERROR_QUERY_VARIABLE_NAME_UNKNOWN, "unknown variable '%s'"); - REG_ERROR(ERROR_QUERY_COLLECTION_NOT_FOUND, "unable to open collection '%s'"); REG_ERROR(ERROR_QUERY_COLLECTION_LOCK_FAILED, "unable to read-lock collection %s"); REG_ERROR(ERROR_QUERY_TOO_MANY_COLLECTIONS, "too many collections"); REG_ERROR(ERROR_QUERY_DOCUMENT_ATTRIBUTE_REDECLARED, "document attribute '%s' is assigned multiple times"); diff --git a/lib/BasicsC/voc-errors.h b/lib/BasicsC/voc-errors.h index 81a50a33cd..78e4bd2cf7 100644 --- a/lib/BasicsC/voc-errors.h +++ b/lib/BasicsC/voc-errors.h @@ -173,9 +173,6 @@ extern "C" { /// - 1512: @LIT{unknown variable '\%s'} /// Will be raised when an unknown variable is used or the variable is /// undefined the context it is used. -/// - 1520: @LIT{unable to open collection '\%s'} -/// Will be raised when one of the collections referenced in the query was -/// not found. /// - 1521: @LIT{unable to read-lock collection \%s} /// Will be raised when a read lock on the collection cannot be acquired. /// - 1522: @LIT{too many collections} @@ -1096,17 +1093,6 @@ void TRI_InitialiseErrorMessages (void); #define TRI_ERROR_QUERY_VARIABLE_NAME_UNKNOWN (1512) -//////////////////////////////////////////////////////////////////////////////// -/// @brief 1520: ERROR_QUERY_COLLECTION_NOT_FOUND -/// -/// unable to open collection '%s' -/// -/// Will be raised when one of the collections referenced in the query was not -/// found. -//////////////////////////////////////////////////////////////////////////////// - -#define TRI_ERROR_QUERY_COLLECTION_NOT_FOUND (1520) - //////////////////////////////////////////////////////////////////////////////// /// @brief 1521: ERROR_QUERY_COLLECTION_LOCK_FAILED ///