mirror of https://gitee.com/bigwinds/arangodb
This commit is contained in:
parent
68ff8d4366
commit
c1a0274ad0
|
@ -1,6 +1,13 @@
|
||||||
v3.5.2 (XXXX-XX-XX)
|
v3.5.2 (XXXX-XX-XX)
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
|
* Fixed issue #10183: Arangoimport imports on _system when you try to
|
||||||
|
create a new database.
|
||||||
|
|
||||||
|
This bugfix fixes the output of arangoimport, which could display a
|
||||||
|
wrong target database for the import if the option `--create-database`
|
||||||
|
was used.
|
||||||
|
|
||||||
* Fixed issue #10158: Invalid Query Crashes ArangoDB.
|
* Fixed issue #10158: Invalid Query Crashes ArangoDB.
|
||||||
|
|
||||||
This fixes traversal queries that are run on a static empty start vertex
|
This fixes traversal queries that are run on a static empty start vertex
|
||||||
|
|
|
@ -288,8 +288,7 @@ void ImportFeature::start() {
|
||||||
|
|
||||||
int err = TRI_ERROR_NO_ERROR;
|
int err = TRI_ERROR_NO_ERROR;
|
||||||
auto versionString = _httpClient->getServerVersion(&err);
|
auto versionString = _httpClient->getServerVersion(&err);
|
||||||
auto dbName = client->databaseName();
|
auto const dbName = client->databaseName();
|
||||||
bool createdDatabase = false;
|
|
||||||
|
|
||||||
auto successfulConnection = [&]() {
|
auto successfulConnection = [&]() {
|
||||||
std::cout << ClientFeature::buildConnectedMessage(_httpClient->getEndpointSpecification(), versionString, /*role*/ "", /*mode*/ "", client->databaseName(), client->username()) << std::endl;
|
std::cout << ClientFeature::buildConnectedMessage(_httpClient->getEndpointSpecification(), versionString, /*role*/ "", /*mode*/ "", client->databaseName(), client->username()) << std::endl;
|
||||||
|
@ -338,12 +337,15 @@ void ImportFeature::start() {
|
||||||
FATAL_ERROR_EXIT();
|
FATAL_ERROR_EXIT();
|
||||||
}
|
}
|
||||||
|
|
||||||
successfulConnection();
|
|
||||||
|
|
||||||
// restore old database name
|
// restore old database name
|
||||||
client->setDatabaseName(dbName);
|
client->setDatabaseName(dbName);
|
||||||
versionString = _httpClient->getServerVersion(nullptr);
|
err = TRI_ERROR_NO_ERROR;
|
||||||
createdDatabase = true;
|
versionString = _httpClient->getServerVersion(&err);
|
||||||
|
|
||||||
|
if (err != TRI_ERROR_NO_ERROR) {
|
||||||
|
// disconnect, as this will make the import abort
|
||||||
|
_httpClient->disconnect();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!_httpClient->isConnected()) {
|
if (!_httpClient->isConnected()) {
|
||||||
|
@ -353,11 +355,13 @@ void ImportFeature::start() {
|
||||||
LOG_TOPIC("034c9", FATAL, arangodb::Logger::FIXME) << _httpClient->getErrorMessage() << "'";
|
LOG_TOPIC("034c9", FATAL, arangodb::Logger::FIXME) << _httpClient->getErrorMessage() << "'";
|
||||||
FATAL_ERROR_EXIT();
|
FATAL_ERROR_EXIT();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TRI_ASSERT(client->databaseName() == dbName);
|
||||||
|
|
||||||
// successfully connected
|
// successfully connected
|
||||||
if (!createdDatabase) {
|
// now print connection info
|
||||||
successfulConnection();
|
successfulConnection();
|
||||||
}
|
|
||||||
_httpClient->disconnect(); // we do not reuse this anymore
|
_httpClient->disconnect(); // we do not reuse this anymore
|
||||||
|
|
||||||
SimpleHttpClientParams params = _httpClient->params();
|
SimpleHttpClientParams params = _httpClient->params();
|
||||||
|
|
Loading…
Reference in New Issue