8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 21:23:04 +01:00

Fix #7832 - Crash on "... RETURNING *" without INTO in PSQL.

This commit is contained in:
Adriano dos Santos Fernandes 2023-11-08 22:03:43 -03:00
parent a276255435
commit 32f7dfaf71
2 changed files with 4 additions and 4 deletions

View File

@ -10971,7 +10971,7 @@ static ReturningClause* dsqlProcessReturning(DsqlCompilerScratch* dsqlScratch, d
auto inputFirst = input->first;
if (!inputFirst)
if (inputFirst->items.isEmpty())
{
// Process RETURNING *
inputFirst = FB_NEW_POOL(pool) ValueListNode(pool, 0u);

View File

@ -6042,7 +6042,7 @@ query_spec
rse->dsqlFirst = $2 ? $2->items[1] : NULL;
rse->dsqlSkip = $2 ? $2->items[0] : NULL;
rse->dsqlDistinct = $3;
rse->dsqlSelectList = $4;
rse->dsqlSelectList = $4->items.hasData() ? $4 : nullptr;
rse->dsqlFrom = $5;
rse->dsqlWhere = $6;
rse->dsqlGroup = $7;
@ -6077,14 +6077,14 @@ skip_clause
%type <valueListNode> distinct_clause
distinct_clause
: DISTINCT { $$ = newNode<ValueListNode>(0); }
: DISTINCT { $$ = newNode<ValueListNode>(0u); }
| all_noise { $$ = NULL; }
;
%type <valueListNode> select_list
select_list
: select_items { $$ = $1; }
| '*' { $$ = NULL; }
| '*' { $$ = newNode<ValueListNode>(0u); }
;
%type <valueListNode> select_items