mirror of https://gitee.com/bigwinds/arangodb
attempt to fix issue #1943
This commit is contained in:
parent
9e06af757c
commit
60bb0f2dde
|
@ -65,7 +65,7 @@ SingleCollectionTransaction::SingleCollectionTransaction(
|
|||
// add the (sole) collection
|
||||
if (setupState() == TRI_ERROR_NO_ERROR) {
|
||||
_cid = resolver()->getCollectionId(name);
|
||||
addCollection(_cid, _accessType);
|
||||
addCollection(_cid, name.c_str(), _accessType);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3292,6 +3292,9 @@ int Transaction::addCollectionEmbedded(TRI_voc_cid_t cid, TRI_transaction_type_e
|
|||
false, _allowImplicitCollections);
|
||||
|
||||
if (res != TRI_ERROR_NO_ERROR) {
|
||||
if (res == TRI_ERROR_TRANSACTION_UNREGISTERED_COLLECTION) {
|
||||
THROW_ARANGO_EXCEPTION_MESSAGE(res, std::string(TRI_errno_string(res)) + ": " + resolver()->getCollectionNameCluster(cid));
|
||||
}
|
||||
return registerError(res);
|
||||
}
|
||||
|
||||
|
@ -3316,6 +3319,9 @@ int Transaction::addCollectionToplevel(TRI_voc_cid_t cid, TRI_transaction_type_e
|
|||
}
|
||||
|
||||
if (res != TRI_ERROR_NO_ERROR) {
|
||||
if (res == TRI_ERROR_TRANSACTION_UNREGISTERED_COLLECTION) {
|
||||
THROW_ARANGO_EXCEPTION_MESSAGE(res, std::string(TRI_errno_string(res)) + ": " + resolver()->getCollectionNameCluster(cid));
|
||||
}
|
||||
registerError(res);
|
||||
}
|
||||
|
||||
|
|
|
@ -385,6 +385,9 @@ class Transaction {
|
|||
type,
|
||||
_nestingLevel, true, true);
|
||||
if (res != TRI_ERROR_NO_ERROR) {
|
||||
if (res == TRI_ERROR_TRANSACTION_UNREGISTERED_COLLECTION) {
|
||||
THROW_ARANGO_EXCEPTION_MESSAGE(res, std::string(TRI_errno_string(res)) + ": " + collectionName);
|
||||
}
|
||||
THROW_ARANGO_EXCEPTION(res);
|
||||
}
|
||||
TRI_EnsureCollectionsTransaction(_trx, _nestingLevel);
|
||||
|
|
Loading…
Reference in New Issue