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

Slightly better fix for the FBTCS problem spotted by Blas

This commit is contained in:
skidder 2004-04-28 17:28:33 +00:00
parent 17b51417ed
commit 7e7b6f604c

View File

@ -5642,10 +5642,13 @@ static jrd_nod* make_inference_node(CompilerScratch* csb, jrd_nod* boolean,
/* Arguments after the first two are just cloned (eg: LIKE ESCAPE clause) */
for (USHORT n = 2; n < boolean->nod_count; n++)
node->nod_arg[n] = CMP_clone_node(tdbb, csb, boolean->nod_arg[n]);
// Assign impure area for cached invariant value if needed --
// used to hold pre-compiled patterns for new LIKE and CONTAINING algorithms
// Share impure area for cached invariant value used to hold pre-compiled
// pattern for new LIKE and CONTAINING algorithms.
// Proper cloning of impure area for this node would require careful accounting
// of new invariant dependencies - we avoid such hassles via using single
// cached pattern value for all node clones. This is faster too.
if (node->nod_flags & nod_invariant)
node->nod_impure = CMP_impure(csb, sizeof(impure_value));
node->nod_impure = boolean->nod_impure;
return node;
}