8000 Merge branch 'engine-api' of https://github.com/arangodb/arangodb int… · georgekaf/arangodb@9d3bbd1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9d3bbd1

Browse files
committed
Merge branch 'engine-api' of https://github.com/arangodb/arangodb into engine-api
2 parents 8ba2654 + 42e14c5 commit 9d3bbd1

File tree

6 files changed

+91
-3
lines changed

6 files changed

+91
-3
lines changed

CHANGELOG

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ devel
4747

4848
* arangoimp: fixed issue #2214
4949

50-
5150
v3.2.alpha2 (2017-02-20)
5251
------------------------
5352

arangod/Aql/Query.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class ExecutionEngine;
6161
class ExecutionPlan;
6262
class Executor;
6363
class Query;
64-
class QueryProfile;
64+
struct QueryProfile;
6565
class QueryRegistry;
6666

6767
/// @brief equery part

arangod/Aql/QueryList.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@
2323

2424
#include "Aql/QueryList.h"
2525
#include "Aql/Query.h"
26-
#include "Logger/Logger.h"
2726
#include "Basics/ReadLocker.h"
2827
#include "Basics/StringRef.h"
2928
#include "Basics/WriteLocker.h"
3029
#include "Basics/Exceptions.h"
30+
#include "Logger/Logger.h"
3131
#include "VocBase/vocbase.h"
3232

3333
using namespace arangodb::aql;

arangod/MMFiles/MMFilesCollection.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,10 @@ MMFilesCollection::MMFilesCollection(LogicalCollection* collection,
443443
"<properties>.journalSize too small");
444444
}
445445

446+
auto pathSlice = info.get("path");
447+
if (pathSlice.isString()) {
448+
_path = pathSlice.copyString();
449+
}
446450
setCompactionStatus("compaction not yet started");
447451
}
448452

js/client/modules/@arangodb/testing.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3402,6 +3402,7 @@ const recoveryTests = [
34023402
'disk-full-logfile-data',
34033403
'disk-full-datafile',
34043404
'collection-drop-recreate',
3405+
'collection-duplicate-name',
34053406
'create-with-temp',
34063407
'create-with-temp-old',
34073408
'create-collection-fail',
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
/* jshint globalstrict:false, strict:false, unused : false */
2+
/* global assertEqual, assertNull, assertTrue, assertFalse */
3+
4+
// //////////////////////////////////////////////////////////////////////////////
5+
// / @brief tests for dump/reload
6+
// /
7+
// / @file
8+
// /
9+
// / DISCLAIMER
10+
// /
11+
// / Copyright 2010-2012 triagens GmbH, Cologne, Germany
12+
// /
13+
// / Licensed under the Apache License, Version 2.0 (the "License")
14+
// / you may not use this file except in compliance with the License.
15+
// / You may obtain a copy of the License at
16+
// /
17+
// / http://www.apache.org/licenses/LICENSE-2.0
18+
// /
19+
// / Unless required by applicable law or agreed to in writing, software
20+
// / distributed under the License is distributed on an "AS IS" BASIS,
21+
// / WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22+
// / See the License for the specific language governing permissions and
23+
// / limitations under the License.
24+
// /
25+
// / Copyright holder is ArangoDB GmbH, Cologne, Germany
26+
// /
27+
// / @author Michael Hackstein
28+
// / @author Copyright 2017, ArangoDB GmbH, Cologne, Germany
29+
// //////////////////////////////////////////////////////////////////////////////
30+
31+
32+
var db = require('@arangodb').db;
33+
var internal = require('internal');
34+
var jsunity = require('jsunity');
35+
36+
37+
function runSetup () {
38+
require("console").log("Hund");
39+
40+
db._drop('UnitTestsRecovery');
41+
db._create('UnitTestsRecovery');
42+
43+
try {
44+
db._create('UnitTestsRecovery');
45+
} catch (e) {
46+
// This intentionally should fail!
47+
if (internal.errors.ERROR_ARANGO_DUPLICATE_NAME.code == e.errorNum) {
48+
// Only this is a valid return code from the server
49+
return 0;
50+
}
51+
}
52+
// Fail if we get here. We somehow managed to save the same collection twice without error
53+
return 1;
54+
};
55+
56+
57+
function recoverySuite () {
58+
'use strict';
59+
60+
return {
61+
setUp: function () {},
62+
tearDown: function () {},
63+
64+
testCollectionDuplicateName: function () {
65+
require("console").log("Kartze");
66+
var c = db._collection('UnitTestsRecovery');
67+
assertTrue(c != null && c != undefined);
68+
}
69+
};
70+
};
71+
72+
// //////////////////////////////////////////////////////////////////////////////
73+
// / @brief executes the test suite
74+
// //////////////////////////////////////////////////////////////////////////////
75+
76+
function main (argv) {
77+
'use strict';
78+
if (argv[1] === 'setup') {
79+
return runSetup();
80+
} else {
81+
jsunity.run(recoverySuite);
82+
return jsunity.done();
83+
}
84+
}

0 commit comments

Comments
 (0)
0