mirror of https://gitee.com/bigwinds/arangodb
Added additional error numbers for bitarray index creation
This commit is contained in:
parent
305031a0f7
commit
c7e5eae52d
|
@ -50,11 +50,11 @@ describe ArangoDB do
|
|||
|
||||
cmd = "/_api/index?collection=#{@cid}"
|
||||
body = "{ \"type\" : \"bitarray\", \"unique\" : false, \"fields\" : [ \"a\", [0,1,2], \"a\", [\"a\",\"b\",\"c\"] ] }"
|
||||
doc = ArangoDB.log_post("#{prefix}-fail", cmd, :body => body)
|
||||
doc = ArangoDB.log_post("#{prefix}-fail", cmd, :body => body)
|
||||
doc.code.should eq(400)
|
||||
doc.parsed_response['error'].should eq(true)
|
||||
doc.parsed_response['code'].should eq(400)
|
||||
doc.parsed_response['errorNum'].should eq(0)
|
||||
doc.parsed_response['errorNum'].should eq(3415)
|
||||
end
|
||||
|
||||
it "creation failure due to duplicate values" do
|
||||
|
@ -69,7 +69,7 @@ describe ArangoDB do
|
|||
doc.code.should eq(400)
|
||||
doc.parsed_response['error'].should eq(true)
|
||||
doc.parsed_response['code'].should eq(400)
|
||||
doc.parsed_response['errorNum'].should eq(0)
|
||||
doc.parsed_response['errorNum'].should eq(3417)
|
||||
end
|
||||
|
||||
|
||||
|
@ -115,7 +115,7 @@ describe ArangoDB do
|
|||
doc = ArangoDB.log_post("#{prefix}-fail", cmd, :body => body)
|
||||
doc.code.should eq(400)
|
||||
doc.parsed_response['error'].should eq(true)
|
||||
doc.parsed_response['errorNum'].should eq(0)
|
||||
doc.parsed_response['errorNum'].should eq(3413)
|
||||
end
|
||||
|
||||
it "creation success when all documents have supported values" do
|
||||
|
|
|
@ -574,16 +574,16 @@ static const yytype_int8 yyrhs[] =
|
|||
static const yytype_uint16 yyrline[] =
|
||||
{
|
||||
0, 176, 176, 181, 183, 188, 190, 192, 194, 196,
|
||||
198, 202, 221, 234, 247, 247, 268, 270, 275, 288,
|
||||
291, 297, 297, 319, 324, 332, 343, 346, 349, 355,
|
||||
369, 382, 402, 405, 405, 441, 444, 447, 450, 450,
|
||||
472, 475, 478, 484, 492, 500, 511, 519, 527, 535,
|
||||
543, 551, 559, 567, 575, 583, 591, 599, 607, 615,
|
||||
626, 637, 639, 644, 647, 653, 656, 662, 662, 675,
|
||||
677, 682, 687, 695, 695, 708, 710, 715, 717, 722,
|
||||
731, 735, 735, 788, 805, 813, 824, 834, 844, 851,
|
||||
861, 864, 870, 878, 892, 900, 908, 919, 930, 937,
|
||||
946, 952, 959
|
||||
198, 203, 222, 235, 248, 248, 269, 271, 276, 289,
|
||||
292, 298, 298, 320, 325, 333, 344, 347, 350, 356,
|
||||
370, 383, 403, 406, 406, 442, 445, 448, 451, 451,
|
||||
473, 476, 479, 485, 493, 501, 512, 520, 528, 536,
|
||||
544, 552, 560, 568, 576, 584, 592, 600, 608, 616,
|
||||
627, 638, 640, 645, 648, 654, 657, 663, 663, 676,
|
||||
678, 683, 688, 696, 696, 709, 711, 716, 718, 723,
|
||||
732, 736, 736, 789, 806, 814, 825, 835, 845, 852,
|
||||
862, 865, 871, 879, 893, 901, 909, 920, 931, 938,
|
||||
947, 953, 960
|
||||
};
|
||||
#endif
|
||||
|
||||
|
@ -1795,7 +1795,7 @@ yyreduce:
|
|||
case 11:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 202 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 203 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
TRI_aql_node_t* node;
|
||||
|
||||
|
@ -1817,7 +1817,7 @@ yyreduce:
|
|||
case 12:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 221 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 222 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
TRI_aql_node_t* node = TRI_CreateNodeFilterAql(context, (yyvsp[(2) - (2)].node));
|
||||
if (!node) {
|
||||
|
@ -1833,7 +1833,7 @@ yyreduce:
|
|||
case 13:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 234 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 235 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
TRI_aql_node_t* node = TRI_CreateNodeLetAql(context, (yyvsp[(2) - (4)].strval), (yyvsp[(4) - (4)].node));
|
||||
if (!node) {
|
||||
|
@ -1849,7 +1849,7 @@ yyreduce:
|
|||
case 14:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 247 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 248 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
TRI_aql_node_t* node = TRI_CreateNodeListAql(context);
|
||||
|
||||
|
@ -1864,7 +1864,7 @@ yyreduce:
|
|||
case 15:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 255 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 256 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
TRI_aql_node_t* node = TRI_CreateNodeCollectAql(context, TRI_PopStackParseAql(context), (yyvsp[(4) - (4)].strval));
|
||||
if (!node) {
|
||||
|
@ -1880,7 +1880,7 @@ yyreduce:
|
|||
case 16:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 268 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 269 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
}
|
||||
break;
|
||||
|
@ -1888,7 +1888,7 @@ yyreduce:
|
|||
case 17:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 270 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 271 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
}
|
||||
break;
|
||||
|
@ -1896,7 +1896,7 @@ yyreduce:
|
|||
case 18:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 275 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 276 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
TRI_aql_node_t* node = TRI_CreateNodeAssignAql(context, (yyvsp[(1) - (3)].strval), (yyvsp[(3) - (3)].node));
|
||||
if (!node) {
|
||||
|
@ -1912,7 +1912,7 @@ yyreduce:
|
|||
case 19:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 288 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 289 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
(yyval.strval) = NULL;
|
||||
}
|
||||
|
@ -1921,7 +1921,7 @@ yyreduce:
|
|||
case 20:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 291 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 292 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
(yyval.strval) = (yyvsp[(2) - (2)].strval);
|
||||
}
|
||||
|
@ -1930,7 +1930,7 @@ yyreduce:
|
|||
case 21:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 297 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 298 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
TRI_aql_node_t* node = TRI_CreateNodeListAql(context);
|
||||
|
||||
|
@ -1945,7 +1945,7 @@ yyreduce:
|
|||
case 22:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 305 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 306 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
TRI_aql_node_t* list = TRI_PopStackParseAql(context);
|
||||
TRI_aql_node_t* node = TRI_CreateNodeSortAql(context, list);
|
||||
|
@ -1962,7 +1962,7 @@ yyreduce:
|
|||
case 23:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 319 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 320 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
if (!TRI_PushListAql(context, (yyvsp[(1) - (1)].node))) {
|
||||
ABORT_OOM
|
||||
|
@ -1973,7 +1973,7 @@ yyreduce:
|
|||
case 24:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 324 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 325 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
if (!TRI_PushListAql(context, (yyvsp[(3) - (3)].node))) {
|
||||
ABORT_OOM
|
||||
|
@ -1984,7 +1984,7 @@ yyreduce:
|
|||
case 25:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 332 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 333 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
TRI_aql_node_t* node = TRI_CreateNodeSortElementAql(context, (yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].boolval));
|
||||
if (!node) {
|
||||
|
@ -1998,7 +1998,7 @@ yyreduce:
|
|||
case 26:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 343 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 344 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
(yyval.boolval) = true;
|
||||
}
|
||||
|
@ -2007,7 +2007,7 @@ yyreduce:
|
|||
case 27:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 346 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 347 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
(yyval.boolval) = true;
|
||||
}
|
||||
|
@ -2016,7 +2016,7 @@ yyreduce:
|
|||
case 28:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 349 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 350 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
(yyval.boolval) = false;
|
||||
}
|
||||
|
@ -2025,7 +2025,7 @@ yyreduce:
|
|||
case 29:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 355 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 356 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
TRI_aql_node_t* node = TRI_CreateNodeLimitAql(context, TRI_CreateNodeValueIntAql(context, 0), TRI_CreateNodeValueIntAql(context, (yyvsp[(2) - (2)].intval)));
|
||||
if (!node) {
|
||||
|
@ -2045,7 +2045,7 @@ yyreduce:
|
|||
case 30:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 369 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 370 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
TRI_aql_node_t* node = TRI_CreateNodeLimitAql(context, TRI_CreateNodeValueIntAql(context, (yyvsp[(2) - (4)].intval)), TRI_CreateNodeValueIntAql(context, (yyvsp[(4) - (4)].intval)));
|
||||
if (!node) {
|
||||
|
@ -2061,7 +2061,7 @@ yyreduce:
|
|||
case 31:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 382 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 383 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
TRI_aql_node_t* node = TRI_CreateNodeReturnAql(context, (yyvsp[(2) - (2)].node));
|
||||
if (!node) {
|
||||
|
@ -2083,7 +2083,7 @@ yyreduce:
|
|||
case 32:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 402 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 403 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
(yyval.node) = (yyvsp[(2) - (3)].node);
|
||||
}
|
||||
|
@ -2092,7 +2092,7 @@ yyreduce:
|
|||
case 33:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 405 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 406 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
if (!TRI_StartScopeAql(context, TRI_AQL_SCOPE_SUBQUERY)) {
|
||||
ABORT_OOM
|
||||
|
@ -2104,7 +2104,7 @@ yyreduce:
|
|||
case 34:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 410 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 411 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
TRI_aql_node_t* result;
|
||||
TRI_aql_node_t* subQuery;
|
||||
|
@ -2141,7 +2141,7 @@ yyreduce:
|
|||
case 35:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 441 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 442 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
(yyval.node) = (yyvsp[(1) - (1)].node);
|
||||
}
|
||||
|
@ -2150,7 +2150,7 @@ yyreduce:
|
|||
case 36:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 444 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 445 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
(yyval.node) = (yyvsp[(1) - (1)].node);
|
||||
}
|
||||
|
@ -2159,7 +2159,7 @@ yyreduce:
|
|||
case 37:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 447 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 448 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
(yyval.node) = (yyvsp[(1) - (1)].node);
|
||||
}
|
||||
|
@ -2168,7 +2168,7 @@ yyreduce:
|
|||
case 38:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 450 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 451 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
TRI_aql_node_t* node;
|
||||
|
||||
|
@ -2188,7 +2188,7 @@ yyreduce:
|
|||
case 39:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 463 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 464 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
TRI_aql_node_t* list = TRI_PopStackParseAql(context);
|
||||
TRI_aql_node_t* node = TRI_CreateNodeFcallAql(context, TRI_PopStackParseAql(context), list);
|
||||
|
@ -2203,7 +2203,7 @@ yyreduce:
|
|||
case 40:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 472 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 473 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
(yyval.node) = (yyvsp[(1) - (1)].node);
|
||||
}
|
||||
|
@ -2212,7 +2212,7 @@ yyreduce:
|
|||
case 41:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 475 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 476 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
(yyval.node) = (yyvsp[(1) - (1)].node);
|
||||
}
|
||||
|
@ -2221,7 +2221,7 @@ yyreduce:
|
|||
case 42:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 478 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 479 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
(yyval.node) = (yyvsp[(1) - (1)].node);
|
||||
}
|
||||
|
@ -2230,7 +2230,7 @@ yyreduce:
|
|||
case 43:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 484 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 485 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
TRI_aql_node_t* node = TRI_CreateNodeOperatorUnaryPlusAql(context, (yyvsp[(2) - (2)].node));
|
||||
if (!node) {
|
||||
|
@ -2244,7 +2244,7 @@ yyreduce:
|
|||
case 44:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 492 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 493 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
TRI_aql_node_t* node = TRI_CreateNodeOperatorUnaryMinusAql(context, (yyvsp[(2) - (2)].node));
|
||||
if (!node) {
|
||||
|
@ -2258,7 +2258,7 @@ yyreduce:
|
|||
case 45:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 500 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 501 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
TRI_aql_node_t* node = TRI_CreateNodeOperatorUnaryNotAql(context, (yyvsp[(2) - (2)].node));
|
||||
if (!node) {
|
||||
|
@ -2272,7 +2272,7 @@ yyreduce:
|
|||
case 46:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 511 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 512 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryOrAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
|
||||
if (!node) {
|
||||
|
@ -2286,7 +2286,7 @@ yyreduce:
|
|||
case 47:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 519 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 520 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryAndAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
|
||||
if (!node) {
|
||||
|
@ -2300,7 +2300,7 @@ yyreduce:
|
|||
case 48:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 527 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 528 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryPlusAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
|
||||
if (!node) {
|
||||
|
@ -2314,7 +2314,7 @@ yyreduce:
|
|||
case 49:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 535 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 536 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryMinusAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
|
||||
if (!node) {
|
||||
|
@ -2328,7 +2328,7 @@ yyreduce:
|
|||
case 50:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 543 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 544 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryTimesAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
|
||||
if (!node) {
|
||||
|
@ -2342,7 +2342,7 @@ yyreduce:
|
|||
case 51:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 551 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 552 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryDivAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
|
||||
if (!node) {
|
||||
|
@ -2356,7 +2356,7 @@ yyreduce:
|
|||
case 52:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 559 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 560 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryModAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
|
||||
if (!node) {
|
||||
|
@ -2370,7 +2370,7 @@ yyreduce:
|
|||
case 53:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 567 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 568 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryEqAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
|
||||
if (!node) {
|
||||
|
@ -2384,7 +2384,7 @@ yyreduce:
|
|||
case 54:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 575 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 576 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryNeAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
|
||||
if (!node) {
|
||||
|
@ -2398,7 +2398,7 @@ yyreduce:
|
|||
case 55:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 583 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 584 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryLtAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
|
||||
if (!node) {
|
||||
|
@ -2412,7 +2412,7 @@ yyreduce:
|
|||
case 56:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 591 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 592 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryGtAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
|
||||
if (!node) {
|
||||
|
@ -2426,7 +2426,7 @@ yyreduce:
|
|||
case 57:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 599 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 600 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryLeAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
|
||||
if (!node) {
|
||||
|
@ -2440,7 +2440,7 @@ yyreduce:
|
|||
case 58:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 607 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 608 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryGeAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
|
||||
if (!node) {
|
||||
|
@ -2454,7 +2454,7 @@ yyreduce:
|
|||
case 59:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 615 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 616 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
TRI_aql_node_t* node = TRI_CreateNodeOperatorBinaryInAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
|
||||
if (!node) {
|
||||
|
@ -2468,7 +2468,7 @@ yyreduce:
|
|||
case 60:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 626 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 627 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
TRI_aql_node_t* node = TRI_CreateNodeOperatorTernaryAql(context, (yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].node), (yyvsp[(5) - (5)].node));
|
||||
if (!node) {
|
||||
|
@ -2482,7 +2482,7 @@ yyreduce:
|
|||
case 61:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 637 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 638 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
}
|
||||
break;
|
||||
|
@ -2490,7 +2490,7 @@ yyreduce:
|
|||
case 62:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 639 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 640 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
}
|
||||
break;
|
||||
|
@ -2498,7 +2498,7 @@ yyreduce:
|
|||
case 63:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 644 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 645 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
TRI_PushListAql(context, (yyvsp[(1) - (1)].node));
|
||||
}
|
||||
|
@ -2507,7 +2507,7 @@ yyreduce:
|
|||
case 64:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 647 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 648 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
TRI_PushListAql(context, (yyvsp[(3) - (3)].node));
|
||||
}
|
||||
|
@ -2516,7 +2516,7 @@ yyreduce:
|
|||
case 65:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 653 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 654 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
(yyval.node) = (yyvsp[(1) - (1)].node);
|
||||
}
|
||||
|
@ -2525,7 +2525,7 @@ yyreduce:
|
|||
case 66:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 656 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 657 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
(yyval.node) = (yyvsp[(1) - (1)].node);
|
||||
}
|
||||
|
@ -2534,7 +2534,7 @@ yyreduce:
|
|||
case 67:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 662 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 663 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
TRI_aql_node_t* node = TRI_CreateNodeListAql(context);
|
||||
if (!node) {
|
||||
|
@ -2548,7 +2548,7 @@ yyreduce:
|
|||
case 68:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 669 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 670 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
(yyval.node) = TRI_PopStackParseAql(context);
|
||||
}
|
||||
|
@ -2557,7 +2557,7 @@ yyreduce:
|
|||
case 69:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 675 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 676 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
}
|
||||
break;
|
||||
|
@ -2565,7 +2565,7 @@ yyreduce:
|
|||
case 70:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 677 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 678 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
}
|
||||
break;
|
||||
|
@ -2573,7 +2573,7 @@ yyreduce:
|
|||
case 71:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 682 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 683 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
if (!TRI_PushListAql(context, (yyvsp[(1) - (1)].node))) {
|
||||
ABORT_OOM
|
||||
|
@ -2584,7 +2584,7 @@ yyreduce:
|
|||
case 72:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 687 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 688 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
if (!TRI_PushListAql(context, (yyvsp[(3) - (3)].node))) {
|
||||
ABORT_OOM
|
||||
|
@ -2595,7 +2595,7 @@ yyreduce:
|
|||
case 73:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 695 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 696 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
TRI_aql_node_t* node = TRI_CreateNodeArrayAql(context);
|
||||
if (!node) {
|
||||
|
@ -2609,7 +2609,7 @@ yyreduce:
|
|||
case 74:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 702 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 703 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
(yyval.node) = TRI_PopStackParseAql(context);
|
||||
}
|
||||
|
@ -2618,7 +2618,7 @@ yyreduce:
|
|||
case 75:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 708 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 709 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
}
|
||||
break;
|
||||
|
@ -2626,7 +2626,7 @@ yyreduce:
|
|||
case 76:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 710 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 711 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
}
|
||||
break;
|
||||
|
@ -2634,7 +2634,7 @@ yyreduce:
|
|||
case 77:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 715 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 716 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
}
|
||||
break;
|
||||
|
@ -2642,7 +2642,7 @@ yyreduce:
|
|||
case 78:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 717 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 718 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
}
|
||||
break;
|
||||
|
@ -2650,7 +2650,7 @@ yyreduce:
|
|||
case 79:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 722 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 723 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
if (!TRI_PushArrayAql(context, (yyvsp[(1) - (3)].strval), (yyvsp[(3) - (3)].node))) {
|
||||
ABORT_OOM
|
||||
|
@ -2661,7 +2661,7 @@ yyreduce:
|
|||
case 80:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 731 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 732 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
// start of reference (collection or variable name)
|
||||
(yyval.node) = (yyvsp[(1) - (1)].node);
|
||||
|
@ -2671,7 +2671,7 @@ yyreduce:
|
|||
case 81:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 735 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 736 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
// expanded variable access, e.g. variable[*]
|
||||
TRI_aql_node_t* node;
|
||||
|
@ -2702,7 +2702,7 @@ yyreduce:
|
|||
case 82:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 759 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 760 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
// return from the "expansion" subrule
|
||||
TRI_aql_node_t* expanded = TRI_PopStackParseAql(context);
|
||||
|
@ -2734,7 +2734,7 @@ yyreduce:
|
|||
case 83:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 788 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 789 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
// variable or collection
|
||||
TRI_aql_node_t* node;
|
||||
|
@ -2757,7 +2757,7 @@ yyreduce:
|
|||
case 84:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 805 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 806 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
// named variable access, e.g. variable.reference
|
||||
(yyval.node) = TRI_CreateNodeAttributeAccessAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].strval));
|
||||
|
@ -2771,7 +2771,7 @@ yyreduce:
|
|||
case 85:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 813 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 814 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
// indexed variable access, e.g. variable[index]
|
||||
(yyval.node) = TRI_CreateNodeIndexedAql(context, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node));
|
||||
|
@ -2785,7 +2785,7 @@ yyreduce:
|
|||
case 86:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 824 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 825 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
// named variable access, continuation from * expansion, e.g. [*].variable.reference
|
||||
TRI_aql_node_t* node = TRI_PopStackParseAql(context);
|
||||
|
@ -2801,7 +2801,7 @@ yyreduce:
|
|||
case 87:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 834 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 835 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
// indexed variable access, continuation from * expansion, e.g. [*].variable[index]
|
||||
TRI_aql_node_t* node = TRI_PopStackParseAql(context);
|
||||
|
@ -2817,7 +2817,7 @@ yyreduce:
|
|||
case 88:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 844 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 845 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
// named variable access, continuation from * expansion, e.g. [*].variable.xx.reference
|
||||
(yyval.node) = TRI_CreateNodeAttributeAccessAql(context, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].strval));
|
||||
|
@ -2830,7 +2830,7 @@ yyreduce:
|
|||
case 89:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 851 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 852 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
// indexed variable access, continuation from * expansion, e.g. [*].variable.xx.[index]
|
||||
(yyval.node) = TRI_CreateNodeIndexedAql(context, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node));
|
||||
|
@ -2843,7 +2843,7 @@ yyreduce:
|
|||
case 90:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 861 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 862 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
(yyval.node) = (yyvsp[(1) - (1)].node);
|
||||
}
|
||||
|
@ -2852,7 +2852,7 @@ yyreduce:
|
|||
case 91:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 864 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 865 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
(yyval.node) = (yyvsp[(1) - (1)].node);
|
||||
}
|
||||
|
@ -2861,7 +2861,7 @@ yyreduce:
|
|||
case 92:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 870 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 871 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
TRI_aql_node_t* node = TRI_CreateNodeValueStringAql(context, (yyvsp[(1) - (1)].strval));
|
||||
if (!node) {
|
||||
|
@ -2875,7 +2875,7 @@ yyreduce:
|
|||
case 93:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 878 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 879 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
TRI_aql_node_t* node;
|
||||
|
||||
|
@ -2895,7 +2895,7 @@ yyreduce:
|
|||
case 94:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 892 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 893 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
TRI_aql_node_t* node = TRI_CreateNodeValueNullAql(context);
|
||||
if (!node) {
|
||||
|
@ -2909,7 +2909,7 @@ yyreduce:
|
|||
case 95:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 900 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 901 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
TRI_aql_node_t* node = TRI_CreateNodeValueBoolAql(context, true);
|
||||
if (!node) {
|
||||
|
@ -2923,7 +2923,7 @@ yyreduce:
|
|||
case 96:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 908 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 909 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
TRI_aql_node_t* node = TRI_CreateNodeValueBoolAql(context, false);
|
||||
if (!node) {
|
||||
|
@ -2937,7 +2937,7 @@ yyreduce:
|
|||
case 97:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 919 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 920 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
TRI_aql_node_t* node = TRI_CreateNodeParameterAql(context, (yyvsp[(1) - (1)].strval));
|
||||
if (!node) {
|
||||
|
@ -2951,7 +2951,7 @@ yyreduce:
|
|||
case 98:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 930 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 931 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
if (!(yyvsp[(1) - (1)].strval)) {
|
||||
ABORT_OOM
|
||||
|
@ -2964,7 +2964,7 @@ yyreduce:
|
|||
case 99:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 937 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 938 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
if (!(yyvsp[(1) - (1)].strval)) {
|
||||
ABORT_OOM
|
||||
|
@ -2977,7 +2977,7 @@ yyreduce:
|
|||
case 100:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 946 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 947 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
(yyval.strval) = (yyvsp[(1) - (1)].strval);
|
||||
}
|
||||
|
@ -2986,7 +2986,7 @@ yyreduce:
|
|||
case 101:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 952 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 953 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
if (!(yyvsp[(1) - (1)].strval)) {
|
||||
ABORT_OOM
|
||||
|
@ -2999,7 +2999,7 @@ yyreduce:
|
|||
case 102:
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 959 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 960 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
{
|
||||
if (!(yyvsp[(2) - (2)].strval)) {
|
||||
ABORT_OOM
|
||||
|
|
|
@ -197,7 +197,8 @@ statement_block_statement:
|
|||
}
|
||||
| limit_statement {
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
for_statement:
|
||||
T_FOR variable_name T_IN expression {
|
||||
TRI_aql_node_t* node;
|
||||
|
|
|
@ -3054,10 +3054,16 @@ static v8::Handle<v8::Value> EnsureBitarray (v8::Arguments const& argv, bool sup
|
|||
// .............................................................................
|
||||
|
||||
if (ok) {
|
||||
bitarrayIndex = TRI_EnsureBitarrayIndexSimCollection(sim, &attributes, &values, supportUndef, &indexCreated);
|
||||
char* errorStr = 0;
|
||||
bitarrayIndex = TRI_EnsureBitarrayIndexSimCollection(sim, &attributes, &values, supportUndef, &indexCreated, &errorCode, &errorStr);
|
||||
if (bitarrayIndex == 0) {
|
||||
errorCode = TRI_errno();
|
||||
errorString = "index could not be created from Simple Collection";
|
||||
if (errorStr == 0) {
|
||||
errorString = "index could not be created from Simple Collection";
|
||||
}
|
||||
else {
|
||||
errorString = string(errorStr);
|
||||
TRI_Free(TRI_CORE_MEM_ZONE, errorStr); // strings are created in the CORE MEMORY ZONE
|
||||
}
|
||||
ok = false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4338,7 +4338,7 @@ TRI_index_t* TRI_CreateBitarrayIndex (struct TRI_primary_collection_s* collectio
|
|||
TRI_vector_pointer_t* fields,
|
||||
TRI_vector_t* paths,
|
||||
TRI_vector_pointer_t* values,
|
||||
bool supportUndef) {
|
||||
bool supportUndef, int* errorNum, char** errorStr) {
|
||||
TRI_bitarray_index_t* baIndex;
|
||||
size_t i,j,k;
|
||||
int result;
|
||||
|
@ -4357,6 +4357,8 @@ TRI_index_t* TRI_CreateBitarrayIndex (struct TRI_primary_collection_s* collectio
|
|||
TRI_shape_pid_t* rightShape = (TRI_shape_pid_t*)(TRI_AtVector(paths,i));
|
||||
if (*leftShape == *rightShape) {
|
||||
LOG_WARNING("bitarray index creation failed -- duplicate keys in index");
|
||||
*errorNum = TRI_ERROR_ARANGO_INDEX_BITARRAY_CREATION_FAILURE_DUPLICATE_ATTRIBUTES;
|
||||
*errorStr = TRI_DuplicateString("bitarray index creation failed -- duplicate keys in index");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
@ -4371,16 +4373,22 @@ TRI_index_t* TRI_CreateBitarrayIndex (struct TRI_primary_collection_s* collectio
|
|||
|
||||
for (k = 0; k < paths->_length; ++k) {
|
||||
TRI_json_t* valueList = (TRI_json_t*)(TRI_AtVectorPointer(values,k));
|
||||
|
||||
if (valueList == NULL || valueList->_type != TRI_JSON_LIST) {
|
||||
LOG_WARNING("bitarray index creation failed -- list of values for index undefined");
|
||||
*errorNum = TRI_ERROR_ILLEGAL_OPTION;
|
||||
*errorStr = TRI_DuplicateString("bitarray index creation failed -- list of values for index undefined");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
for (j = 0; j < valueList->_value._objects._length; ++j) {
|
||||
TRI_json_t* leftValue = (TRI_json_t*)(TRI_AtVector(&(valueList->_value._objects), j));
|
||||
for (i = j + 1; i < valueList->_value._objects._length; ++i) {
|
||||
TRI_json_t* rightValue = (TRI_json_t*)(TRI_AtVector(&(valueList->_value._objects), i));
|
||||
if (TRI_EqualJsonJson(leftValue, rightValue)) {
|
||||
LOG_WARNING("bitarray index creation failed -- duplicate values in value list for an attribute");
|
||||
LOG_WARNING("bitarray index creation failed -- duplicate values in value list for an attribute");
|
||||
*errorNum = TRI_ERROR_ARANGO_INDEX_BITARRAY_CREATION_FAILURE_DUPLICATE_VALUES;
|
||||
*errorStr = TRI_DuplicateString("bitarray index creation failed -- duplicate values in value list for an attribute");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -647,7 +647,9 @@ TRI_index_t* TRI_CreateBitarrayIndex (struct TRI_primary_collection_s*,
|
|||
TRI_vector_pointer_t*,
|
||||
TRI_vector_t*,
|
||||
TRI_vector_pointer_t*,
|
||||
bool);
|
||||
bool,
|
||||
int*,
|
||||
char**);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief frees the memory allocated, but does not free the pointer
|
||||
|
|
|
@ -2693,7 +2693,7 @@ static int BitarrayBasedIndexFromJson (TRI_sim_collection_t* sim,
|
|||
const TRI_vector_pointer_t*,
|
||||
TRI_idx_iid_t,
|
||||
bool,
|
||||
bool*)) {
|
||||
bool*, int*, char**)) {
|
||||
TRI_index_t* idx;
|
||||
TRI_json_t* uniqueIndex;
|
||||
TRI_json_t* supportUndefIndex;
|
||||
|
@ -2705,7 +2705,8 @@ static int BitarrayBasedIndexFromJson (TRI_sim_collection_t* sim,
|
|||
bool created;
|
||||
size_t fieldCount;
|
||||
size_t j;
|
||||
|
||||
int errorNum;
|
||||
char* errorStr;
|
||||
|
||||
// ...........................................................................
|
||||
// extract fields list (which is a list of key/value pairs for a bitarray index
|
||||
|
@ -2786,8 +2787,8 @@ static int BitarrayBasedIndexFromJson (TRI_sim_collection_t* sim,
|
|||
// ...........................................................................
|
||||
// attempt to create the index or retrieve an existing one
|
||||
// ...........................................................................
|
||||
|
||||
idx = creator(sim, &attributes, &values, iid, supportUndef, &created);
|
||||
errorStr = NULL;
|
||||
idx = creator(sim, &attributes, &values, iid, supportUndef, &created, &errorNum, &errorStr);
|
||||
|
||||
|
||||
// ...........................................................................
|
||||
|
@ -2804,7 +2805,11 @@ static int BitarrayBasedIndexFromJson (TRI_sim_collection_t* sim,
|
|||
|
||||
if (idx == NULL) {
|
||||
LOG_ERROR("cannot create bitarray index %lu", (unsigned long) iid);
|
||||
return TRI_errno();
|
||||
if (errorStr != NULL) {
|
||||
LOG_TRACE(errorStr);
|
||||
TRI_Free(TRI_CORE_MEM_ZONE, errorStr);
|
||||
}
|
||||
return errorNum;
|
||||
}
|
||||
|
||||
return TRI_ERROR_NO_ERROR;
|
||||
|
@ -4487,7 +4492,9 @@ static TRI_index_t* CreateBitarrayIndexSimCollection (TRI_sim_collection_t* coll
|
|||
const TRI_vector_pointer_t* values,
|
||||
TRI_idx_iid_t iid,
|
||||
bool supportUndef,
|
||||
bool* created) {
|
||||
bool* created,
|
||||
int* errorNum,
|
||||
char** errorStr) {
|
||||
TRI_index_t* idx;
|
||||
TRI_vector_pointer_t fields;
|
||||
TRI_vector_t paths;
|
||||
|
@ -4503,7 +4510,8 @@ static TRI_index_t* CreateBitarrayIndexSimCollection (TRI_sim_collection_t* coll
|
|||
if (created != NULL) {
|
||||
*created = false;
|
||||
}
|
||||
|
||||
*errorNum = res;
|
||||
*errorStr = TRI_DuplicateString("Bitarray index attributes could not be accessed.");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -4516,6 +4524,12 @@ static TRI_index_t* CreateBitarrayIndexSimCollection (TRI_sim_collection_t* coll
|
|||
idx = LookupPathIndexSimCollection(collection, &paths, TRI_IDX_TYPE_BITARRAY_INDEX, false);
|
||||
|
||||
if (idx != NULL) {
|
||||
|
||||
// .........................................................................
|
||||
// existing index has been located which matches the list of attributes
|
||||
// return this one
|
||||
// .........................................................................
|
||||
|
||||
TRI_DestroyVector(&paths);
|
||||
TRI_DestroyVectorPointer(&fields);
|
||||
LOG_TRACE("bitarray-index previously created");
|
||||
|
@ -4532,7 +4546,7 @@ static TRI_index_t* CreateBitarrayIndexSimCollection (TRI_sim_collection_t* coll
|
|||
// Create the bitarray index
|
||||
// ...........................................................................
|
||||
|
||||
idx = TRI_CreateBitarrayIndex(&collection->base, &fields, &paths, (TRI_vector_pointer_t*)(values), supportUndef);
|
||||
idx = TRI_CreateBitarrayIndex(&collection->base, &fields, &paths, (TRI_vector_pointer_t*)(values), supportUndef, errorNum, errorStr);
|
||||
|
||||
|
||||
// ...........................................................................
|
||||
|
@ -4571,6 +4585,14 @@ static TRI_index_t* CreateBitarrayIndexSimCollection (TRI_sim_collection_t* coll
|
|||
res = FillIndex(collection, idx);
|
||||
|
||||
if (res != TRI_ERROR_NO_ERROR) {
|
||||
|
||||
// .........................................................................
|
||||
// for some reason one or more of the existing documents has caused the
|
||||
// index to fail. Remove the index from the collection and return null.
|
||||
// .........................................................................
|
||||
|
||||
*errorNum = res;
|
||||
*errorStr = TRI_DuplicateString("Bitarray index creation aborted due to documents within collection.");
|
||||
TRI_FreeBitarrayIndex(idx);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -4674,17 +4696,22 @@ TRI_index_t* TRI_EnsureBitarrayIndexSimCollection (TRI_sim_collection_t* sim,
|
|||
const TRI_vector_pointer_t* attributes,
|
||||
const TRI_vector_pointer_t* values,
|
||||
bool supportUndef,
|
||||
bool* created) {
|
||||
bool* created,
|
||||
int* errorCode,
|
||||
char** errorStr) {
|
||||
TRI_index_t* idx;
|
||||
int res;
|
||||
|
||||
*errorCode = TRI_ERROR_NO_ERROR;
|
||||
*errorStr = NULL;
|
||||
|
||||
// .............................................................................
|
||||
// inside write-lock the collection
|
||||
// .............................................................................
|
||||
|
||||
TRI_WRITE_LOCK_DOCUMENTS_INDEXES_SIM_COLLECTION(sim);
|
||||
|
||||
idx = CreateBitarrayIndexSimCollection(sim, attributes, values, 0, supportUndef, created);
|
||||
idx = CreateBitarrayIndexSimCollection(sim, attributes, values, 0, supportUndef, created, errorCode, errorStr);
|
||||
|
||||
if (idx == NULL) {
|
||||
TRI_WRITE_UNLOCK_DOCUMENTS_INDEXES_SIM_COLLECTION(sim);
|
||||
|
@ -4696,15 +4723,35 @@ TRI_index_t* TRI_EnsureBitarrayIndexSimCollection (TRI_sim_collection_t* sim,
|
|||
// .............................................................................
|
||||
// outside write-lock
|
||||
// .............................................................................
|
||||
|
||||
|
||||
// .............................................................................
|
||||
// The index is 'new' so save it
|
||||
// .............................................................................
|
||||
|
||||
if (created) {
|
||||
res = TRI_SaveIndex(&sim->base, idx);
|
||||
|
||||
// ...........................................................................
|
||||
// If index could not be saved, report the error and return NULL
|
||||
// Todo: get TRI_SaveIndex to report the error
|
||||
// ...........................................................................
|
||||
|
||||
if (res == TRI_ERROR_NO_ERROR) {
|
||||
return idx;
|
||||
}
|
||||
|
||||
*errorCode = res;
|
||||
*errorStr = TRI_DuplicateString("Bitarray index could not be saved.");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
return res == TRI_ERROR_NO_ERROR ? idx : NULL;
|
||||
}
|
||||
else {
|
||||
return TRI_ERROR_NO_ERROR;
|
||||
}
|
||||
// .............................................................................
|
||||
// Index already exists so simply return it
|
||||
// .............................................................................
|
||||
|
||||
return idx;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -466,7 +466,9 @@ struct TRI_index_s* TRI_EnsureBitarrayIndexSimCollection (TRI_sim_collection_t*,
|
|||
const TRI_vector_pointer_t* attributes,
|
||||
const TRI_vector_pointer_t* values,
|
||||
bool supportUndef,
|
||||
bool* created);
|
||||
bool* created,
|
||||
int* errorNum,
|
||||
char** errorStr);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @}
|
||||
|
|
|
@ -148,6 +148,8 @@
|
|||
"WARNING_ARANGO_INDEX_BITARRAY_UPDATE_ATTRIBUTE_MISSING" : { "code" : 3402, "message" : "bitarray index update warning - attribute missing in revised document" },
|
||||
"WARNING_ARANGO_INDEX_BITARRAY_REMOVE_ITEM_MISSING" : { "code" : 3411, "message" : "bitarray index remove failure - item missing in index" },
|
||||
"ERROR_ARANGO_INDEX_BITARRAY_INSERT_ITEM_UNSUPPORTED_VALUE" : { "code" : 3413, "message" : "bitarray index insert failure - document attribute value unsupported in index" },
|
||||
"ERROR_ARANGO_INDEX_BITARRAY_CREATION_FAILURE_DUPLICATE_ATTRIBUTES" : { "code" : 3415, "message" : "bitarray index creation failure - one or more index attributes are duplicated." },
|
||||
"ERROR_ARANGO_INDEX_BITARRAY_CREATION_FAILURE_DUPLICATE_VALUES" : { "code" : 3417, "message" : "bitarray index creation failure - one or more index attribute values are duplicated." },
|
||||
};
|
||||
}());
|
||||
|
||||
|
|
|
@ -149,6 +149,8 @@ static string JS_common_bootstrap_errors =
|
|||
" \"WARNING_ARANGO_INDEX_BITARRAY_UPDATE_ATTRIBUTE_MISSING\" : { \"code\" : 3402, \"message\" : \"bitarray index update warning - attribute missing in revised document\" }, \n"
|
||||
" \"WARNING_ARANGO_INDEX_BITARRAY_REMOVE_ITEM_MISSING\" : { \"code\" : 3411, \"message\" : \"bitarray index remove failure - item missing in index\" }, \n"
|
||||
" \"ERROR_ARANGO_INDEX_BITARRAY_INSERT_ITEM_UNSUPPORTED_VALUE\" : { \"code\" : 3413, \"message\" : \"bitarray index insert failure - document attribute value unsupported in index\" }, \n"
|
||||
" \"ERROR_ARANGO_INDEX_BITARRAY_CREATION_FAILURE_DUPLICATE_ATTRIBUTES\" : { \"code\" : 3415, \"message\" : \"bitarray index creation failure - one or more index attributes are duplicated.\" }, \n"
|
||||
" \"ERROR_ARANGO_INDEX_BITARRAY_CREATION_FAILURE_DUPLICATE_VALUES\" : { \"code\" : 3417, \"message\" : \"bitarray index creation failure - one or more index attribute values are duplicated.\" }, \n"
|
||||
"};\n"
|
||||
"}());\n"
|
||||
"\n"
|
||||
|
|
|
@ -192,7 +192,7 @@ SIMPLE_CLIENT_COULD_NOT_READ,2003,"could not read from server","Will be raised w
|
|||
################################################################################
|
||||
## ArangoDB index errors (3000-3999)
|
||||
##
|
||||
## For error that occur when fulfilling a user request which fails due to index.
|
||||
## Errors that occur when user request fails due to an index error.
|
||||
################################################################################
|
||||
|
||||
ERROR_ARANGO_INDEX_PQ_INSERT_FAILED,3100,"priority queue insert failure","Will be raised when an attempt to insert a document into a priority queue index fails for some reason."
|
||||
|
@ -215,3 +215,5 @@ WARNING_ARANGO_INDEX_BITARRAY_DOCUMENT_ATTRIBUTE_MISSING,3400,"bitarray index in
|
|||
WARNING_ARANGO_INDEX_BITARRAY_UPDATE_ATTRIBUTE_MISSING,3402,"bitarray index update warning - attribute missing in revised document","Will be raised when an attempt to update a document results in the revised document not having one or more attributes which are required by the bitarray index."
|
||||
WARNING_ARANGO_INDEX_BITARRAY_REMOVE_ITEM_MISSING,3411,"bitarray index remove failure - item missing in index","Will be raised when an attempt to remove a document from a bitarray index fails when document can not be located within that index."
|
||||
ERROR_ARANGO_INDEX_BITARRAY_INSERT_ITEM_UNSUPPORTED_VALUE,3413,"bitarray index insert failure - document attribute value unsupported in index","Will be raised when an attempt to insert a document into a bitarray index fails due to the fact that one or more values for an index attribute is not supported within that index."
|
||||
ERROR_ARANGO_INDEX_BITARRAY_CREATION_FAILURE_DUPLICATE_ATTRIBUTES,3415,"bitarray index creation failure - one or more index attributes are duplicated.","Will be raised when an attempt to create an index with two or more index attributes repeated."
|
||||
ERROR_ARANGO_INDEX_BITARRAY_CREATION_FAILURE_DUPLICATE_VALUES,3417,"bitarray index creation failure - one or more index attribute values are duplicated.","Will be raised when an attempt to create an index with two or more index attribute values repeated."
|
||||
|
|
|
@ -144,6 +144,8 @@ void TRI_InitialiseErrorMessages (void) {
|
|||
REG_ERROR(WARNING_ARANGO_INDEX_BITARRAY_UPDATE_ATTRIBUTE_MISSING, "bitarray index update warning - attribute missing in revised document");
|
||||
REG_ERROR(WARNING_ARANGO_INDEX_BITARRAY_REMOVE_ITEM_MISSING, "bitarray index remove failure - item missing in index");
|
||||
REG_ERROR(ERROR_ARANGO_INDEX_BITARRAY_INSERT_ITEM_UNSUPPORTED_VALUE, "bitarray index insert failure - document attribute value unsupported in index");
|
||||
REG_ERROR(ERROR_ARANGO_INDEX_BITARRAY_CREATION_FAILURE_DUPLICATE_ATTRIBUTES, "bitarray index creation failure - one or more index attributes are duplicated.");
|
||||
REG_ERROR(ERROR_ARANGO_INDEX_BITARRAY_CREATION_FAILURE_DUPLICATE_VALUES, "bitarray index creation failure - one or more index attribute values are duplicated.");
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -328,6 +328,12 @@ extern "C" {
|
|||
/// Will be raised when an attempt to insert a document into a bitarray index
|
||||
/// fails due to the fact that one or more values for an index attribute is
|
||||
/// not supported within that index.
|
||||
/// - 3415: @CODE{bitarray index creation failure - one or more index attributes are duplicated.}
|
||||
/// Will be raised when an attempt to create an index with two or more index
|
||||
/// attributes repeated.
|
||||
/// - 3417: @CODE{bitarray index creation failure - one or more index attribute values are duplicated.}
|
||||
/// Will be raised when an attempt to create an index with two or more index
|
||||
/// attribute values repeated.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -1721,6 +1727,30 @@ void TRI_InitialiseErrorMessages (void);
|
|||
|
||||
#define TRI_ERROR_ARANGO_INDEX_BITARRAY_INSERT_ITEM_UNSUPPORTED_VALUE (3413)
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief 3415: ERROR_ARANGO_INDEX_BITARRAY_CREATION_FAILURE_DUPLICATE_ATTRIBUTES
|
||||
///
|
||||
/// bitarray index creation failure - one or more index attributes are
|
||||
/// duplicated.
|
||||
///
|
||||
/// Will be raised when an attempt to create an index with two or more index
|
||||
/// attributes repeated.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define TRI_ERROR_ARANGO_INDEX_BITARRAY_CREATION_FAILURE_DUPLICATE_ATTRIBUTES (3415)
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief 3417: ERROR_ARANGO_INDEX_BITARRAY_CREATION_FAILURE_DUPLICATE_VALUES
|
||||
///
|
||||
/// bitarray index creation failure - one or more index attribute values are
|
||||
/// duplicated.
|
||||
///
|
||||
/// Will be raised when an attempt to create an index with two or more index
|
||||
/// attribute values repeated.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define TRI_ERROR_ARANGO_INDEX_BITARRAY_CREATION_FAILURE_DUPLICATE_VALUES (3417)
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @}
|
||||
|
|
Loading…
Reference in New Issue