1
0
Fork 0
This commit is contained in:
Frank Celler 2012-03-26 15:13:18 +02:00
parent 25efb01569
commit f5b2f09e46
2 changed files with 18 additions and 1 deletions

View File

@ -327,6 +327,10 @@ static TRI_doc_mptr_t CreateDocument (TRI_sim_collection_t* collection,
// update indexes // update indexes
// ............................................................................. // .............................................................................
// -----------------------------------------------------------------------------
// update indexes
// -----------------------------------------------------------------------------
// generate create header // generate create header
if (res == TRI_ERROR_NO_ERROR) { if (res == TRI_ERROR_NO_ERROR) {
@ -546,6 +550,10 @@ static TRI_doc_mptr_t const UpdateDocument (TRI_sim_collection_t* collection,
// update indexes // update indexes
// ............................................................................. // .............................................................................
// -----------------------------------------------------------------------------
// update indexes
// -----------------------------------------------------------------------------
// update the header // update the header
if (res == TRI_ERROR_NO_ERROR) { if (res == TRI_ERROR_NO_ERROR) {
TRI_doc_mptr_t update; TRI_doc_mptr_t update;
@ -935,6 +943,8 @@ static TRI_doc_mptr_t const CreateShapedJson (TRI_doc_collection_t* document,
TRI_df_marker_t* result; TRI_df_marker_t* result;
TRI_sim_collection_t* collection; TRI_sim_collection_t* collection;
TRI_set_errno(TRI_ERROR_NO_ERROR);
collection = (TRI_sim_collection_t*) document; collection = (TRI_sim_collection_t*) document;
if (type == TRI_DOC_MARKER_DOCUMENT) { if (type == TRI_DOC_MARKER_DOCUMENT) {
@ -1027,6 +1037,8 @@ static TRI_doc_mptr_t const UpdateShapedJson (TRI_doc_collection_t* document,
TRI_doc_mptr_t const* header; TRI_doc_mptr_t const* header;
TRI_sim_collection_t* collection; TRI_sim_collection_t* collection;
TRI_set_errno(TRI_ERROR_NO_ERROR);
collection = (TRI_sim_collection_t*) document; collection = (TRI_sim_collection_t*) document;
// get an existing header pointer // get an existing header pointer
@ -2167,6 +2179,10 @@ static int UpdateImmediateIndexes (TRI_sim_collection_t* collection,
return TRI_ERROR_AVOCADO_UNIQUE_CONSTRAINT_VIOLATED; return TRI_ERROR_AVOCADO_UNIQUE_CONSTRAINT_VIOLATED;
} }
if (constraint) {
return TRI_VOC_ERROR_UNIQUE_VIOLATED;
}
return result; return result;
} }
@ -2861,7 +2877,7 @@ static TRI_index_t* CreateSkiplistIndexSimCollection (TRI_sim_collection_t* coll
if (idx != NULL) { if (idx != NULL) {
TRI_DestroyVector(&paths); TRI_DestroyVector(&paths);
TRI_DestroyVectorPointer(&fields); TRI_DestroyVectorString(&names);
LOG_TRACE("skiplist-index already created"); LOG_TRACE("skiplist-index already created");
return idx; return idx;

View File

@ -788,6 +788,7 @@ TRI_vocbase_t* TRI_OpenVocBase (char const* path) {
} }
// ............................................................................. // .............................................................................
// setup vocbase structure // setup vocbase structure
// ............................................................................. // .............................................................................