10000 Merge branch 'devel' of https://github.com/arangodb/arangodb into devel · saliormoon/arangodb@cbe2d51 · GitHub
[go: up one dir, main page]

Skip to content

Commit cbe2d51

Browse files
committed
Merge branch 'devel' of https://github.com/arangodb/arangodb into devel
2 parents 75d54ab + a08c713 commit cbe2d51

File tree

26 files changed

+171
-57
lines changed

26 files changed

+171
-57
lines changed

3rdParty/V8/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,11 @@ list(APPEND V8_GYP_ARGS
6161
)
6262

6363
if (CROSS_COMPILING)
64-
list(APPEND V8_GYP_ARGS -DGYP_CROSSCOMPILE=1)
64+
list(APPEND V8_GYP_ARGS
65+
-Dhost_arch=${V8_PROC_ARCH}
66+
-DGYP_CROSSCOMPILE=1)
6567
endif()
6668

67-
6869
################################################################################
6970
## ICU EXPORTS
7071
################################################################################

CHANGELOG

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ devel
4848
v3.0.6 (XXXX-XX-XX)
4949
-------------------
5050

51+
* fixed issue #2026
52+
5153
* slightly better error diagnostics for AQL query compilation and replication
5254

5355
* fixed issue #2018

Documentation/Books/Manual/GettingStarted/Installing/Linux.mdpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ For unattended installation, you can set the password using the
3939
[debconf helpers](http://www.microhowto.info/howto/perform_an_unattended_installation_of_a_debian_package.html).
4040

4141
```
42-
echo arangodb3 arangodb/password password NEWPASSWORD | debconf-set-selections
43-
echo arangodb3 arangodb/password_again password NEWPASSWORD | debconf-set-selections
42+
echo arangodb3 arangodb3/password password NEWPASSWORD | debconf-set-selections
43+
echo arangodb3 arangodb3/password_again password NEWPASSWORD | debconf-set-selections
4444
```
4545

4646
The commands should be executed prior to the installation.

Installation/Jenkins/build.sh

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,16 @@ while [ $# -gt 0 ]; do
300300
CLEAN_IT=1
301301
shift
302302
;;
303+
--cxArmV8)
304+
ARMV8=1
305+
CXGCC=1
306+
shift
307+
;;
308+
--cxArmV7)
309+
ARMV7=1
310+
CXGCC=1
311+
shift
312+
;;
303313
*)
304314
echo "Unknown option: $1"
305315
exit 1
@@ -330,9 +340,31 @@ elif [ "$CLANG36" == 1 ]; then
330340
CC=/usr/bin/clang-3.6
331341
CXX=/usr/bin/clang++-3.6
332342
CXXFLAGS="${CXXFLAGS} -std=c++11"
343+
elif [ "${CXGCC}" = 1 ]; then
344+
if [ "${ARMV8}" = 1 ]; then
345+
export TOOL_PREFIX=aarch64-linux-gnu
346+
BUILD_DIR="${BUILD_DIR}-ARMV8"
347+
elif [ "${ARMV7}" = 1 ]; then
348+
export TOOL_PREFIX=aarch64-linux-gnu
349+
BUILD_DIR="${BUILD_DIR}-ARMV7"
350+
else
351+
echo "Unknown CX-Compiler!"
352+
exit 1;
353+
fi
354+
355+
export CXX=$TOOL_PREFIX-g++
356+
export AR=$TOOL_PREFIX-ar
357+
export RANLIB=$TOOL_PREFIX-ranlib
358+
export CC=$TOOL_PREFIX-gcc
359+
export LD=$TOOL_PREFIX-g++
360+
export LINK=$TOOL_PREFIX-g++
361+
export STRIP=$TOOL_PREFIX-strip
362+
CONFIGURE_OPTIONS="${CONFIGURE_OPTIONS} -DCROSS_COMPILING=true"
333363
fi
334364

335365

366+
367+
336368
if [ "$SANITIZE" == 1 ]; then
337369
if [ "$GCC5" == 1 ]; then
338370
CFLAGS="${CFLAGS} -fsanitize=address -fsanitize=undefined -fno-sanitize=alignment -fno-sanitize=vptr"
@@ -415,7 +447,7 @@ SOURCE_DIR=`compute_relative ${DST}/ ${SRC}/`
415447

416448
if [ ! -f Makefile -o ! -f CMakeCache.txt ]; then
417449
CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" LDFLAGS="${LDFLAGS}" LIBS="${LIBS}" \
418-
cmake ${SOURCE_DIR} ${CONFIGURE_OPTIONS} -G "${GENERATOR}"
450+
cmake ${SOURCE_DIR} ${CONFIGURE_OPTIONS} -G "${GENERATOR}" || exit 1
419451
fi
420452

421453
${MAKE_CMD_PREFIX} ${MAKE} ${MAKE_PARAMS}

Installation/Windows/Templates/NSIS.template.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -946,7 +946,7 @@ Function default_installation_directory
946946
Return
947947
FunctionEnd
948948

949-
Function assign_proper_access_rigths
949+
Function assign_proper_access_rights
950950
StrCpy $0 "0"
951951
AccessControl::GrantOnFile \
952952
"$INSTDIR" "(BU)" "GenericRead + GenericWrite + GenericExecute"
@@ -963,7 +963,7 @@ Function is_writable
963963
; is does not matter if we do some errors here
964964
${If} $TRI_INSTALL_ALL_USERS == '1'
965965
CreateDirectory $INSTDIR
966-
Call assign_proper_access_rigths
966+
Call assign_proper_access_rights
967967
${EndIf}
968968
FunctionEnd
969969

Installation/Windows/client/Templates/NSIS.template.in

Lines changed: 23 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
; CPack install script designed for a nmake build
2+
; TODO !addplugindir '@CPACK_PLUGIN_PATH@/AccessControl/Plugins'
23

34
;--------------------------------
45
; Include LogicLib for more readable code
@@ -484,14 +485,10 @@ FunctionEnd
484485

485486
;--------------------------------
486487
;Pages
487-
!define MUI_PAGE_CUSTOMFUNCTION_PRE skip_page
488488
!insertmacro MUI_PAGE_WELCOME
489489

490-
!define MUI_PAGE_CUSTOMFUNCTION_PRE skip_page
491490
!insertmacro MUI_PAGE_LICENSE "@CPACK_RESOURCE_FILE_LICENSE@"
492491

493-
Page custom InstallOptionsPage skip_page
494-
495492
!define MUI_PAGE_CUSTOMFUNCTION_PRE default_installation_directory
496493
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE check_installation_directory
497494
!insertmacro MUI_PAGE_DIRECTORY
@@ -709,7 +706,6 @@ displayAgain:
709706
StrCmp $PASSWORD $PASSWORD_AGAIN +3 0
710707
MessageBox MB_OK|MB_ICONSTOP "Passwords don't match, try again"
711708
Goto displayAgain
712-
done:
713709
Pop ${TEMP1}
714710

715711
Return
@@ -725,20 +721,17 @@ FunctionEnd
725721
Function default_installation_directory
726722
; Read variables which defines if arango should be installed as Service
727723

728-
!insertmacro MUI_INSTALLOPTIONS_READ $R2 "NSIS.InstallOptions.ini" "Field 2" "State"
729-
!insertmacro MUI_INSTALLOPTIONS_READ $R3 "NSIS.InstallOptions.ini" "Field 3" "State"
730-
!insertmacro MUI_INSTALLOPTIONS_READ $R4 "NSIS.InstallOptions.ini" "Field 4" "State"
724+
!insertmacro MUI_INSTALLOPTIONS_READ $R2 "NSIS.InstallOptions.ini" "Field 2" "State"
725+
!insertmacro MUI_INSTALLOPTIONS_READ $R3 "NSIS.InstallOptions.ini" "Field 3" "State"
726+
!insertmacro MUI_INSTALLOPTIONS_READ $R4 "NSIS.InstallOptions.ini" "Field 4" "State"
731727

732-
${If} $R3 == '1'
733-
StrCpy $TRI_INSTALL_TYPE 'AllUsers'
734-
${EndIf}
735-
736-
${If} $R4 == '1'
737-
StrCpy $TRI_INSTALL_TYPE 'SingleUser'
738-
${EndIf}
739-
Call read_options
728+
${If} $R3 == '1'
729+
StrCpy $TRI_INSTALL_TYPE 'AllUsers'
740730
${EndIf}
741731

732+
${If} $R4 == '1'
733+
StrCpy $TRI_INSTALL_TYPE 'SingleUser'
734+
${EndIf}
742735

743736
${Switch} $TRI_INSTALL_TYPE
744737
${Case} 'SingleUser'
@@ -750,25 +743,25 @@ Function default_installation_directory
750743
Return
751744
FunctionEnd
752745

753-
Function assign_proper_access_rigths
754-
StrCpy $0 "0"
755-
AccessControl::GrantOnFile \
756-
"$INSTDIR" "(BU)" "GenericRead + GenericWrite + GenericExecute"
757-
Pop $R0
758-
${If} $R0 == error
759-
Pop $R0
760-
StrCpy $0 "1"
761-
DetailPrint `AccessControl error: $R0`
762-
; MessageBox MB_OK "target directory $INSTDIR can not get cannot get correct access rigths"
763-
${EndIf}
764-
FunctionEnd
746+
; TODO Function assign_proper_access_rights
747+
; TODO StrCpy $0 "0"
748+
; TODO AccessControl::GrantOnFile \
749+
; TODO "$INSTDIR" "(BU)" "GenericRead + GenericWrite + GenericExecute"
750+
; TODO Pop $R0
751+
; TODO ${If} $R0 == error
752+
; TODO Pop $R0
753+
; TODO StrCpy $0 "1"
754+
; TODO DetailPrint `AccessControl error: $R0`
755+
; TODO ; MessageBox MB_OK "target directory $INSTDIR can not get cannot get correct access rigths"
756+
; TODO ${EndIf}
757+
; TODO FunctionEnd
765758

766759
Function is_writable
767760
; is does not matter if we do some errors here
768761
${If} $TRI_INSTALL_ALL_USERS == '1'
769762
CreateDirectory $INSTDIR
770-
Call assign_proper_access_rigths
771-
${EndIf}
763+
; TODO Call assign_proper_access_rights
764+
${EndIf}
772765
FunctionEnd
773766

774767
Function check_installation_directory

Installation/debian/preinst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set -e
33

44
getent group arangodb >/dev/null || groupadd -r arangodb
5-
getent passwd arangodb >/dev/null || useradd -r -g arangodb -d /usr/share/arangodb -s /bin/false -c "ArangoDB Application User" arangodb
5+
getent passwd arangodb >/dev/null || useradd -r -g arangodb -d /usr/share/arangodb3 -s /bin/false -c "ArangoDB Application User" arangodb
66

77
install -o arangodb -g arangodb -m 755 -d /var/lib/arangodb3
88
install -o arangodb -g arangodb -m 755 -d /var/lib/arangodb3-apps

arangod/Aql/CollectNode.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ struct UserVarFinder final : public WalkerWorker<ExecutionNode> {
192192
en->getType() == ExecutionNode::INDEX ||
193193
en->getType() == ExecutionNode::ENUMERATE_LIST ||
194194
en->getType() == ExecutionNode::TRAVERSAL ||
195+
en->getType() == ExecutionNode::SHORTEST_PATH ||
195196
en->getType() == ExecutionNode::COLLECT) {
196197
depth += 1;
197198
}

arangod/Aql/ExecutionNode.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ ExecutionNode const* ExecutionNode::getLoop() const {
581581
auto type = node->getType();
582582

583583
if (type == ENUMERATE_COLLECTION || type == INDEX || type == TRAVERSAL ||
584-
type == ENUMERATE_LIST) {
584+
type == ENUMERATE_LIST || type == SHORTEST_PATH) {
585585
return node;
586586
}
587587
}
@@ -1147,7 +1147,7 @@ void ExecutionNode::RegisterPlan::after(ExecutionNode* en) {
11471147
en->getVarsUsedLater();
11481148
std::vector<Variable const*> const& varsUsedHere =
11491149
en->getVariablesUsedHere();
1150-
1150+
11511151
// We need to delete those variables that have been used here but are not
11521152
// used any more later:
11531153
std::unordered_set<RegisterId> regsToClear;
@@ -1160,7 +1160,7 @@ void ExecutionNode::RegisterPlan::after(ExecutionNode* en) {
11601160

11611161
if (it2 == varInfo.end()) {
11621162
// report an error here to prevent crashing
1163-
THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_INTERNAL, "missing variable #" + std::to_string(v->id) + " for node " + en->getTypeString() + " while planning registers");
1163+
THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_INTERNAL, "missing variable #" + std::to_string(v->id) + " (" + v->name + ") for node " + en->getTypeString() + " while planning registers");
11641164
}
11651165

11661166
// finally adjust the variable inside the IN calculation

arangod/Aql/ExecutionPlan.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,7 @@ ExecutionNode* ExecutionPlan::fromNodeTraversal(ExecutionNode* previous,
749749
return addDependency(previous, en);
750750
}
751751

752-
AstNode const* ExecutionPlan::parseTraversalVertexNode(ExecutionNode* previous,
752+
AstNode const* ExecutionPlan::parseTraversalVertexNode(ExecutionNode*& previous,
753753
AstNode const* vertex) {
754754
if (vertex->type == NODE_TYPE_OBJECT && vertex->isConstant()) {
755755
size_t n = vertex->numMembers();
@@ -767,6 +767,8 @@ AstNode const* ExecutionPlan::parseTraversalVertexNode(ExecutionNode* previous,
767767
// operand is some misc expression
768768
auto calc = createTemporaryCalculation(vertex, previous);
769769
vertex = _ast->createNodeReference(getOutVariable(calc));
770+
// update previous so the caller has an updated value
771+
previous = calc;
770772
}
771773

772774
return vertex;
@@ -1960,6 +1962,7 @@ bool ExecutionPlan::isDeadSimple() const {
19601962
nodeType == ExecutionNode::ENUMERATE_COLLECTION ||
19611963
nodeType == ExecutionNode::ENUMERATE_LIST ||
19621964
nodeType == ExecutionNode::TRAVERSAL ||
1965+
nodeType == ExecutionNode::SHORTEST_PATH ||
19631966
nodeType == ExecutionNode::INDEX) {
19641967
// these node types are not simple
19651968
return false;

0 commit comments

Comments
 (0)
0