mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of github.com:arangodb/arangodb into devel
This commit is contained in:
commit
7ab64a3d96
|
@ -111,6 +111,8 @@ devel
|
|||
|
||||
* Foxx: Fix arangoUser sometimes not being set correctly
|
||||
|
||||
* fixed issue #1974
|
||||
|
||||
|
||||
v3.2.alpha2 (2017-02-20)
|
||||
------------------------
|
||||
|
@ -184,6 +186,9 @@ v3.1.18 (2017-XX-XX)
|
|||
more complicated queries, the maxDepth limit of 1 was not considered strictly
|
||||
enough, causing the traverser to do unlimited depth searches.
|
||||
|
||||
* fixed issue #2415
|
||||
|
||||
|
||||
v3.1.17 (2017-04-04)
|
||||
--------------------
|
||||
|
||||
|
|
|
@ -1122,7 +1122,7 @@ void ExecutionNode::RegisterPlan::after(ExecutionNode* en) {
|
|||
|
||||
if (it2 == varInfo.end()) {
|
||||
// report an error here to prevent crashing
|
||||
THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_INTERNAL, "missing variable #" + std::to_string(v->id) + " (" + v->name + ") for node " + en->getTypeString() + " while planning registers");
|
||||
THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_INTERNAL, std::string("missing variable #") + std::to_string(v->id) + " (" + v->name + ") for node #" + std::to_string(en->id()) + " (" + en->getTypeString() + ") while planning registers");
|
||||
}
|
||||
|
||||
// finally adjust the variable inside the IN calculation
|
||||
|
|
|
@ -3801,6 +3801,10 @@ void arangodb::aql::inlineSubqueriesRule(Optimizer* opt,
|
|||
RedundantCalculationsReplacer finder(replacements);
|
||||
plan->root()->walk(&finder);
|
||||
|
||||
plan->clearVarUsageComputed();
|
||||
plan->invalidateCost();
|
||||
plan->findVarUsage();
|
||||
|
||||
// abort optimization
|
||||
current = nullptr;
|
||||
}
|
||||
|
|
|
@ -216,9 +216,9 @@ static void throwFileWriteError(int fd, std::string const& filename) {
|
|||
}
|
||||
|
||||
void spit(std::string const& filename, char const* ptr, size_t len) {
|
||||
int fd =
|
||||
TRI_TRACKED_CREATE_FILE(filename.c_str(), O_WRONLY | O_CREAT | O_TRUNC | TRI_O_CLOEXEC,
|
||||
S_IRUSR | S_IWUSR | S_IRGRP);
|
||||
int fd = TRI_TRACKED_CREATE_FILE(filename.c_str(),
|
||||
O_WRONLY | O_CREAT | O_TRUNC | TRI_O_CLOEXEC,
|
||||
S_IRUSR | S_IWUSR | S_IRGRP);
|
||||
|
||||
if (fd == -1) {
|
||||
throwFileWriteError(fd, filename);
|
||||
|
@ -239,9 +239,9 @@ void spit(std::string const& filename, char const* ptr, size_t len) {
|
|||
}
|
||||
|
||||
void spit(std::string const& filename, std::string const& content) {
|
||||
int fd =
|
||||
TRI_TRACKED_CREATE_FILE(filename.c_str(), O_WRONLY | O_CREAT | O_TRUNC | TRI_O_CLOEXEC,
|
||||
S_IRUSR | S_IWUSR | S_IRGRP);
|
||||
int fd = TRI_TRACKED_CREATE_FILE(filename.c_str(),
|
||||
O_WRONLY | O_CREAT | O_TRUNC | TRI_O_CLOEXEC,
|
||||
S_IRUSR | S_IWUSR | S_IRGRP);
|
||||
|
||||
if (fd == -1) {
|
||||
throwFileWriteError(fd, filename);
|
||||
|
@ -265,9 +265,9 @@ void spit(std::string const& filename, std::string const& content) {
|
|||
}
|
||||
|
||||
void spit(std::string const& filename, StringBuffer const& content) {
|
||||
int fd =
|
||||
TRI_TRACKED_CREATE_FILE(filename.c_str(), O_WRONLY | O_CREAT | O_TRUNC | TRI_O_CLOEXEC,
|
||||
S_IRUSR | S_IWUSR | S_IRGRP);
|
||||
int fd = TRI_TRACKED_CREATE_FILE(filename.c_str(),
|
||||
O_WRONLY | O_CREAT | O_TRUNC | TRI_O_CLOEXEC,
|
||||
S_IRUSR | S_IWUSR | S_IRGRP);
|
||||
|
||||
if (fd == -1) {
|
||||
throwFileWriteError(fd, filename);
|
||||
|
@ -623,9 +623,17 @@ std::string dirname(std::string const& name) {
|
|||
|
||||
void makePathAbsolute(std::string& path) {
|
||||
std::string cwd = FileUtils::currentDirectory().result();
|
||||
char* p = TRI_GetAbsolutePath(path.c_str(), cwd.c_str());
|
||||
path = p;
|
||||
TRI_FreeString(TRI_CORE_MEM_ZONE, p);
|
||||
|
||||
if (path.empty()) {
|
||||
path = cwd;
|
||||
} else {
|
||||
char* p = TRI_GetAbsolutePath(path.c_str(), cwd.c_str());
|
||||
|
||||
if (p != nullptr) {
|
||||
path = p;
|
||||
TRI_FreeString(TRI_CORE_MEM_ZONE, p);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -171,7 +171,8 @@ SslClientConnection::SslClientConnection(Endpoint* endpoint,
|
|||
: GeneralClientConnection(endpoint, requestTimeout, connectTimeout,
|
||||
connectRetries),
|
||||
_ssl(nullptr),
|
||||
_ctx(nullptr) {
|
||||
_ctx(nullptr),
|
||||
_sslProtocol(sslProtocol) {
|
||||
|
||||
TRI_invalidatesocket(&_socket);
|
||||
init(sslProtocol);
|
||||
|
@ -185,7 +186,8 @@ SslClientConnection::SslClientConnection(std::unique_ptr<Endpoint>& endpoint,
|
|||
: GeneralClientConnection(endpoint, requestTimeout, connectTimeout,
|
||||
connectRetries),
|
||||
_ssl(nullptr),
|
||||
_ctx(nullptr) {
|
||||
_ctx(nullptr),
|
||||
_sslProtocol(sslProtocol) {
|
||||
|
||||
TRI_invalidatesocket(&_socket);
|
||||
init(sslProtocol);
|
||||
|
@ -293,7 +295,14 @@ bool SslClientConnection::connectSocket() {
|
|||
_isConnected = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
switch (protocol_e(_sslProtocol)) {
|
||||
case TLS_V1:
|
||||
case TLS_V12:
|
||||
default:
|
||||
SSL_set_tlsext_host_name(_ssl, _endpoint->host().c_str());
|
||||
}
|
||||
|
||||
SSL_set_connect_state(_ssl);
|
||||
|
||||
if (SSL_set_fd(_ssl, (int)TRI_get_fd_or_handle_of_socket(_socket)) != 1) {
|
||||
|
|
|
@ -131,6 +131,12 @@ class SslClientConnection final : public GeneralClientConnection {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
SSL_CTX* _ctx;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief SSL version
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
uint64_t _sslProtocol;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -818,14 +818,25 @@ void JS_Download(v8::FunctionCallbackInfo<v8::Value> const& args) {
|
|||
}
|
||||
endpoint = "srv://" + endpoint;
|
||||
} else if (!url.empty() && url[0] == '/') {
|
||||
size_t found;
|
||||
// relative URL. prefix it with last endpoint
|
||||
relative = url;
|
||||
url = lastEndpoint + url;
|
||||
endpoint = lastEndpoint;
|
||||
if (endpoint.substr(0, 5) == "http:") {
|
||||
endpoint = "tcp:" + endpoint.substr(5);
|
||||
endpoint = endpoint.substr(5);
|
||||
found = endpoint.find(":");
|
||||
if (found == std::string::npos) {
|
||||
endpoint = endpoint + ":80";
|
||||
}
|
||||
endpoint = "tcp:" + endpoint;
|
||||
} else if (endpoint.substr(0, 6) == "https:") {
|
||||
endpoint = "ssl:" + endpoint.substr(6);
|
||||
endpoint = endpoint.substr(6);
|
||||
found = endpoint.find(":");
|
||||
if (found == std::string::npos) {
|
||||
endpoint = endpoint + ":443";
|
||||
}
|
||||
endpoint = "ssl:" + endpoint;
|
||||
}
|
||||
} else {
|
||||
TRI_V8_THROW_SYNTAX_ERROR("unsupported URL specified");
|
||||
|
|
Loading…
Reference in New Issue