mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 00:03:03 +01:00
Misc.
This commit is contained in:
parent
d7e2c39b6c
commit
ebf7907918
@ -1930,19 +1930,6 @@ static void gen_for_select( DsqlCompilerScratch* dsqlScratch, const dsql_nod* fo
|
||||
|
||||
// Build body of FOR loop
|
||||
|
||||
// Handle write locks
|
||||
/* CVC: Unused code!
|
||||
dsql_nod* streams = rse->nod_arg[e_rse_streams];
|
||||
dsql_ctx* context = NULL;
|
||||
|
||||
if (!rse->nod_arg[e_rse_reduced] && streams->nod_count == 1)
|
||||
{
|
||||
dsql_nod* item = streams->nod_arg[0];
|
||||
if (item && (item->nod_type == nod_relation))
|
||||
context = (dsql_ctx*) item->nod_arg[e_rel_context];
|
||||
}
|
||||
*/
|
||||
|
||||
dsql_nod* list = rse->nod_arg[e_rse_items];
|
||||
dsql_nod* list_to = for_select->nod_arg[e_flp_into];
|
||||
|
||||
@ -2397,7 +2384,7 @@ static void gen_rse( DsqlCompilerScratch* dsqlScratch, const dsql_nod* rse)
|
||||
if ((node = rse->nod_arg[e_rse_skip]) != NULL)
|
||||
{
|
||||
stuff(dsqlScratch->getStatement(), blr_skip);
|
||||
GEN_expr (dsqlScratch, node);
|
||||
GEN_expr(dsqlScratch, node);
|
||||
}
|
||||
|
||||
if ((node = rse->nod_arg[e_rse_boolean]) != NULL)
|
||||
@ -2407,7 +2394,9 @@ static void gen_rse( DsqlCompilerScratch* dsqlScratch, const dsql_nod* rse)
|
||||
}
|
||||
|
||||
if ((list = rse->nod_arg[e_rse_sort]) != NULL)
|
||||
{
|
||||
gen_sort(dsqlScratch, list);
|
||||
}
|
||||
|
||||
if ((list = rse->nod_arg[e_rse_reduced]) != NULL)
|
||||
{
|
||||
@ -3048,7 +3037,7 @@ static void gen_union( DsqlCompilerScratch* dsqlScratch, const dsql_nod* union_n
|
||||
dsql_nod* map_item = items->nod_arg[0];
|
||||
// AB: First item could be a virtual field generated by derived table.
|
||||
if (map_item->nod_type == nod_derived_field) {
|
||||
map_item = map_item->nod_arg[e_alias_value];
|
||||
map_item = map_item->nod_arg[e_derived_field_value];
|
||||
}
|
||||
dsql_ctx* union_context = (dsql_ctx*) map_item->nod_arg[e_map_context];
|
||||
stuff_context(dsqlScratch, union_context);
|
||||
|
@ -2002,8 +2002,8 @@ static bool aggregate_found2(const DsqlCompilerScratch* dsqlScratch, const dsql_
|
||||
|
||||
case nod_derived_field:
|
||||
{
|
||||
// This is an derived table don't look further,
|
||||
// but don't forget to check for deepest scope_level.
|
||||
// This is a derived table, so don't look further,
|
||||
// but don't forget to check for the deepest scope_level.
|
||||
const USHORT lscope_level = (USHORT)(U_IPTR) node->nod_arg[e_derived_field_scope];
|
||||
if (*deepest_level < lscope_level) {
|
||||
*deepest_level = lscope_level;
|
||||
@ -4992,7 +4992,7 @@ static dsql_nod* pass1_derived_table(DsqlCompilerScratch* dsqlScratch, dsql_nod*
|
||||
dsql_nod* items = rse->nod_arg[e_rse_items];
|
||||
dsql_nod* map_item = items->nod_arg[0];
|
||||
if (map_item->nod_type == nod_derived_field) {
|
||||
map_item = map_item->nod_arg[e_alias_value];
|
||||
map_item = map_item->nod_arg[e_derived_field_value];
|
||||
}
|
||||
dsql_ctx* map_context = (dsql_ctx*) map_item->nod_arg[e_map_context];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user