1
0
Fork 0

Merge branch 'devel' of github.com:triAGENS/ArangoDB into devel

This commit is contained in:
Michael Hackstein 2015-01-26 09:38:02 +00:00
commit aad26b3dd2
3 changed files with 45 additions and 5 deletions

View File

@ -27,10 +27,7 @@ install:
- sudo apt-get -y install gdb
before_script: "bash -c Installation/travisCI/before_script.sh"
script:
- "bash -c Installation/travisCI/build.sh"
- "bash -c Installation/travisCI/jslint.sh"
- "bash -c Installation/travisCI/tests.sh"
script: "bash -c Installation/travisCI/script.sh"
after_failure: "bash -c Installation/travisCI/after_failure.sh"
branches:
only:

25
Installation/travisCI/script.sh Executable file
View File

@ -0,0 +1,25 @@
#!/bin/bash
echo
echo '$0: setup make-system'
make setup || exit 1
echo
echo "$0: configuring ArangoDB"
./configure --enable-relative
echo
echo "$0: compiling ArangoDB"
make -j2 || exit 1
echo
echo "$0: testing ArangoDB"
ulimit -c unlimited -S # enable core files
make jslint unittests-shell-server unittests-shell-server-aql unittests-http-server SKIP_RANGES=1 || exit 1
echo
echo "$0: done"

View File

@ -1858,8 +1858,26 @@ TRI_vocbase_col_t* TRI_LookupCollectionByIdVocBase (TRI_vocbase_t* vocbase,
TRI_vocbase_col_t* TRI_FindCollectionByNameOrCreateVocBase (TRI_vocbase_t* vocbase,
char const* name,
const TRI_col_type_t type) {
if (name == nullptr) {
return nullptr;
}
TRI_vocbase_col_t* found = nullptr;
TRI_READ_LOCK_COLLECTIONS_VOCBASE(vocbase);
TRI_vocbase_col_t* found = static_cast<TRI_vocbase_col_t*>(TRI_LookupByKeyAssociativePointer(&vocbase->_collectionsByName, name));
if (name[0] >= '0' && name[0] <= '9') {
// support lookup by id, too
try {
TRI_voc_cid_t id = triagens::basics::StringUtils::uint64(name, strlen(name));
found = static_cast<TRI_vocbase_col_t*>(TRI_LookupByKeyAssociativePointer(&vocbase->_collectionsById, &id));
}
catch (...) {
// no need to throw here... found will still be a nullptr
}
}
else {
found = static_cast<TRI_vocbase_col_t*>(TRI_LookupByKeyAssociativePointer(&vocbase->_collectionsByName, name));
}
TRI_READ_UNLOCK_COLLECTIONS_VOCBASE(vocbase);
if (found != nullptr) {