mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 14:03:07 +01:00
Front-ported extra fixes for CORE-3557.
This commit is contained in:
parent
b9d357f891
commit
0aede9b650
@ -4794,11 +4794,13 @@ DmlNode* FieldNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch* cs
|
||||
|
||||
if (is_column)
|
||||
{
|
||||
jrd_rel* const temp_rel = csb->csb_rpt[stream].csb_relation;
|
||||
const jrd_rel* const temp_rel = csb->csb_rpt[stream].csb_relation;
|
||||
|
||||
if (temp_rel)
|
||||
{
|
||||
if (id >= (int) temp_rel->rel_fields->count() || !(*temp_rel->rel_fields)[id])
|
||||
fb_assert(id >= 0);
|
||||
|
||||
if (!temp_rel->rel_fields || id >= (int) temp_rel->rel_fields->count() || !(*temp_rel->rel_fields)[id])
|
||||
{
|
||||
if (temp_rel->rel_flags & REL_system)
|
||||
return FB_NEW(pool) NullNode(pool);
|
||||
|
@ -623,14 +623,17 @@ ValueExprNode* PAR_make_field(thread_db* tdbb, CompilerScratch* csb, USHORT cont
|
||||
**************************************/
|
||||
SET_TDBB(tdbb);
|
||||
|
||||
if (context >= csb->csb_rpt.getCount() || !(csb->csb_rpt[context].csb_flags & csb_used))
|
||||
return NULL;
|
||||
|
||||
const StreamType stream = csb->csb_rpt[context].csb_stream;
|
||||
|
||||
jrd_rel* const relation = csb->csb_rpt[stream].csb_relation;
|
||||
jrd_prc* const procedure = csb->csb_rpt[stream].csb_procedure;
|
||||
|
||||
const SSHORT id = procedure ?
|
||||
PAR_find_proc_field(procedure, base_field) :
|
||||
MET_lookup_field(tdbb, relation, base_field);
|
||||
const SSHORT id =
|
||||
relation ? MET_lookup_field(tdbb, relation, base_field) :
|
||||
procedure ? PAR_find_proc_field(procedure, base_field) : -1;
|
||||
|
||||
if (id < 0)
|
||||
return NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user