Skip to content

Commit e5e04da

Browse files
committed
Corrected according to @dyemanov
1 parent 232c0b1 commit e5e04da

File tree

5 files changed

+30
-17
lines changed

5 files changed

+30
-17
lines changed

builds/win32/y.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
y.y:6864: $$ is untyped
2+
y.y:6865: $$ is untyped

builds/win32/y_tab.c

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
2+
//
3+
// @(#)btyaccpar, based on byacc 1.8 (Berkeley)
4+
// Parser skeleton modified for use in the Firebird project by Nickolay Samofatov
5+
//
6+
#define YYBTYACC 1
7+
8+
#include "firebird.h"
9+
10+
#include <stdio.h>
11+
#include <stdlib.h>
12+
#include <string.h>
13+
#include <optional>
14+
#include "../dsql/Nodes.h"
15+
#include "../dsql/AggNodes.h"
16+
#include "../dsql/DdlNodes.h"
17+
#include "../dsql/BoolNodes.h"
18+
#include "../dsql/ExprNodes.h"
19+
#include "../dsql/PackageNodes.h"
20+
#include "../dsql/StmtNodes.h"
21+
#include "../dsql/WinNodes.h"
22+
#include "../jrd/RecordSourceNodes.h"
23+
#include "../common/classes/TriState.h"
24+
#include "gen/parse.h"
25+
#include "../dsql/Parser.h"
26+

builds/win32/y_tab.h

Whitespace-only changes.

src/dsql/parse.y

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6851,15 +6851,15 @@ table_value_function_gen_series
68516851

68526852
%type <valueListNode> table_value_function_gen_series_arg_list
68536853
table_value_function_gen_series_arg_list
6854-
: value ',' value step_opt
6854+
: value ',' value gen_series_step_opt
68556855
{
68566856
$$ = newNode<ValueListNode>($1);
68576857
$$->add($3);
68586858
$$->add($4);
68596859
}
68606860
;
68616861

6862-
%type <valueExprNode> step_opt
6862+
%type <valueExprNode> gen_series_step_opt
68636863
step_opt
68646864
: /* nothing */ { $$ = MAKE_const_sint64(1, 0); }
68656865
| ',' value { $$ = $2; }

src/jrd/recsrc/TableValueFunctionScan.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -384,26 +384,17 @@ void GenSeriesFunctionScan::internalOpen(thread_db* tdbb) const
384384
auto startItem = m_inputList->items[GEN_SERIES_INDEX_START];
385385
const auto startDesc = EVL_expr(tdbb, request, startItem);
386386
if (startDesc == nullptr)
387-
{
388-
rpb->rpb_number.setValid(false);
389387
return;
390-
}
391388

392389
auto finishItem = m_inputList->items[GEN_SERIES_INDEX_FINISH];
393390
const auto finishDesc = EVL_expr(tdbb, request, finishItem);
394391
if (finishDesc == nullptr)
395-
{
396-
rpb->rpb_number.setValid(false);
397392
return;
398-
}
399393

400394
auto stepItem = m_inputList->items[GEN_SERIES_INDEX_STEP];
401395
const auto stepDesc = EVL_expr(tdbb, request, stepItem);
402396
if (stepDesc == nullptr)
403-
{
404-
rpb->rpb_number.setValid(false);
405397
return;
406-
}
407398

408399
const auto impure = request->getImpure<Impure>(m_impure);
409400
impure->m_recordBuffer = nullptr;
@@ -425,10 +416,7 @@ void GenSeriesFunctionScan::internalOpen(thread_db* tdbb) const
425416
// validate parameter value
426417
if (((step > 0) && (start > finish)) ||
427418
((step < 0) && (start < finish)))
428-
{
429-
rpb->rpb_number.setValid(false);
430419
return;
431-
}
432420

433421
impure->m_start.vlu_int64 = start;
434422
impure->m_finish.vlu_int64 = finish;
@@ -447,10 +435,7 @@ void GenSeriesFunctionScan::internalOpen(thread_db* tdbb) const
447435
// validate parameter value
448436
if (((step.sign() > 0) && (start.compare(finish) > 0)) ||
449437
((step.sign() < 0) && (start.compare(finish) < 0)))
450-
{
451-
rpb->rpb_number.setValid(false);
452438
return;
453-
}
454439

455440
impure->m_start.vlu_int128 = start;
456441
impure->m_finish.vlu_int128 = finish;

0 commit comments

Comments
 (0)