137 PT_NODE * as_attr_list,
int num);
165 bool * has_hierarchical_expr);
184 int *have_method = (
int *) arg;
284 PT_NODE *spec, *derived_table, *elm;
343 for (; elm; elm = elm->
next)
423 save_statement = statement;
429 statement = save_statement;
493 if (new_method ==
NULL)
565 return select_statement;
588 PT_NODE *save_referenced_attrs;
591 int num_method_params = 0;
592 int num_referenced_attrs;
593 int num_hierarchical_exprs = 0;
596 unsigned short derived1_correlation_level;
597 unsigned short merge_correlation_level;
598 unsigned short correlation_level;
601 bool has_hierarchical_expr =
false;
623 dummy_set_tbl =
NULL;
642 set->info.function.function_type =
F_SEQUENCE;
643 set->info.function.arg_list = arg;
647 if (dummy_set_tbl ==
NULL)
653 dummy_set_tbl->
info.
spec.
id = (UINTPTR) dummy_set_tbl;
704 if (derived1 ==
NULL)
717 derived1_correlation_level = 2;
725 derived1_correlation_level = 2;
730 unsigned short sub_corr_level = 0;
781 derived1_correlation_level = sub_corr_level + 1;
785 derived1_correlation_level = correlation_level;
789 merge_correlation_level = MAX (derived1_correlation_level - 1, 0);
801 if (has_hierarchical_expr)
812 if (has_hierarchical_expr)
827 table1->
next = table2;
843 if (dummy_set_tbl ==
NULL && derived1_correlation_level)
846 derived1_correlation_level - correlation_level, 1, spec->
info.
spec.
id);
848 derived1_correlation_level - correlation_level, 1, spec->
info.
spec.
id);
866 for (i = 0; i < num_method_params; i++)
881 if (new_spec ==
NULL)
914 for (i = 0; i < num_method_params + num_hierarchical_exprs; i++)
919 num_referenced_attrs);
928 new_spec, num_methods);
930 if (has_hierarchical_expr)
938 if (dummy_set_tbl ==
NULL)
955 for (i = 0; i < num_methods + num_hierarchical_exprs; i++)
959 if (dummy_set_tbl ==
NULL)
964 num_referenced_attrs);
966 num_referenced_attrs);
1024 PT_NODE *as_attrs, *sel_attrs;
1060 node =
pt_do_cnf (parser, node, void_arg, continue_walk);
1086 for (method = method_list; method !=
NULL; method = method->
next)
1154 for (attr = attr_list; attr !=
NULL; attr = attr->
next)
1157 if (new_attr ==
NULL)
1192 PT_NODE *prev_node, *node_next, *tmp;
1201 attr_list = as_attr_list;
1202 for (method = method_list; method !=
NULL; method = method->
next)
1211 arg = node_next, node_next = arg ? arg->
next :
NULL)
1231 prev_node->
next = tmp;
1233 attr_list = attr_list->
next;
1252 attr_list = attr_list->
next;
1287 attr_list = as_attr_list;
1288 for (method = method_list; method !=
NULL; method = method->
next)
1298 attr_list = attr_list->
next;
1328 if (new_node ==
NULL)
1379 as_attr = as_attr_list;
1380 for (attr = attr_list, node_next = attr ? attr->
next :
NULL; attr !=
NULL;
1381 attr = node_next, node_next = attr ? attr->
next :
NULL)
1390 next = as_attr->
next;
1393 root =
pt_lambda (parser, root, attr, as_attr);
1396 as_attr->
next = next;
1397 as_attr = as_attr->
next;
1588 info4.
id = info1->
id;
1796 int *hand_rewritten = (
int *) void_arg;
1800 *hand_rewritten = 1;
1818 int *is_a_method = (
int *) void_arg;
1852 for (path = paths; path !=
NULL; path = path->
next)
1881 for (path = paths; path !=
NULL; path = path->
next)
2033 int outside_refs, nested_meths;
2047 if ((*where)->node_type ==
PT_EXPR && (*where)->info.expr.op ==
PT_AND)
2052 if ((*where)->node_type ==
PT_EXPR && (*where)->info.expr.op !=
PT_AND && (*where)->spec_ident == spec_id)
2058 outside_refs = info1.
found;
2064 nested_meths = info1.
found;
2066 if (!outside_refs && !nested_meths)
2104 int arg1_outside_refs, arg2_outside_refs;
2105 int arg1_nested_meths, arg2_nested_meths;
2118 arg1_outside_refs = info1.
found;
2123 arg2_outside_refs = info1.
found;
2129 arg1_nested_meths = info1.
found;
2134 arg2_nested_meths = info1.
found;
2137 && !arg1_outside_refs && !arg2_outside_refs && !arg1_nested_meths && !arg2_nested_meths)
2144 if (true_node ==
NULL)
2199 outside_refs = info1.
found;
2205 nested_meths = info1.
found;
2207 if (!outside_refs && !nested_meths)
2247 else if (new_conj ==
NULL)
2307 for (spec = scope; spec !=
NULL; spec = spec->
next)
2334 bool *is_hierarchical_op = (
bool *) arg;
2344 *is_hierarchical_op =
true;
2363 PT_NODE *node, *arg, *save_next;
2365 for (node = method_list; node !=
NULL && !(*has_hierarchical_expr); node = node->
next)
2371 save_next = arg->
next;
2374 arg->
next = save_next;
2393 PT_NODE *node, *temp, *save_next;
2394 bool found, has_hierarchical_expr;
2396 for (node = src_list; node !=
NULL; node = node->
next)
2398 has_hierarchical_expr =
false;
2399 save_next = node->
next;
2402 node->
next = save_next;
2403 if (has_hierarchical_expr)
2407 for (temp = *dst_list_p; temp !=
NULL && !found; temp = temp->
next)
2469 PT_NODE *node, *prev_node, *save_next, *new_node;
2470 bool has_hierarchical_expr;
2473 for (i = 0; i < num_methods; i++)
2475 ref_attrs = ref_attrs->
next;
2478 for (node = *select_list_p, prev_node =
NULL; node !=
NULL; node = node->
next)
2480 has_hierarchical_expr =
false;
2481 save_next = node->
next;
2484 node->
next = save_next;
2485 if (has_hierarchical_expr)
2491 prev_node->
next = new_node;
2495 *select_list_p = new_node;
2500 ref_attrs = ref_attrs->
next;
PT_METHOD_CALL_INFO method_call
PT_NODE * entity_for_method
#define PT_ERRORm(parser, node, setNo, msgNo)
PT_NODE * pt_do_cnf(PARSER_CONTEXT *parser, PT_NODE *node, void *arg, int *continue_walk)
PT_MISC_TYPE call_or_expr
#define PT_REQUIRES_HIERARCHICAL_QUERY(op)
PT_NODE * select_statement
union pt_query_info::@124 q
#define PT_SET_JMP_ENV(parser)
unsigned single_table_opt
PT_NODE * pt_lambda(PARSER_CONTEXT *parser, PT_NODE *tree_with_names, PT_NODE *name_node, PT_NODE *corresponding_tree)
const char * mq_generate_name(PARSER_CONTEXT *parser, const char *root, int *version)
PT_MISC_TYPE derived_table_type
PT_FUNCTION_INFO function
PT_CONNECT_BY_CHECK_CYCLES check_cycles
#define PT_IS_QUERY_NODE_TYPE(x)
PT_NODE * parser_walk_leaves(PARSER_CONTEXT *parser, PT_NODE *node, PT_NODE_WALK_FUNCTION pre_function, void *pre_argument, PT_NODE_WALK_FUNCTION post_function, void *post_argument)
PT_NODE * pt_where_type(PARSER_CONTEXT *parser, PT_NODE *where)
PT_NODE * parser_copy_tree(PARSER_CONTEXT *parser, const PT_NODE *tree)
PT_NODE * pt_semantic_type(PARSER_CONTEXT *parser, PT_NODE *tree, SEMANTIC_CHK_INFO *sc_info)
PT_NODE * pt_find_entity(PARSER_CONTEXT *parser, const PT_NODE *scope, UINTPTR id)
PT_NODE * referenced_attrs
#define MSGCAT_SEMANTIC_METH_CORR_SET_EXPR
PT_NODE * parser_append_node(PT_NODE *node, PT_NODE *list)
PT_NODE * parser_new_node(PARSER_CONTEXT *parser, PT_NODE_TYPE node_type)
void parser_free_tree(PARSER_CONTEXT *parser, PT_NODE *tree)
#define MSGCAT_SET_PARSER_SEMANTIC
PT_NODE * after_cb_filter
int entities_nesting_depth
#define PT_INTERNAL_ERROR(parser, what)
int db_make_int(DB_VALUE *value, const int num)
#define pt_has_error(parser)
#define PT_CLEAR_JMP_ENV(parser)
PT_NODE * pt_dbval_to_value(PARSER_CONTEXT *parser, const DB_VALUE *val)
int pt_length_of_list(const PT_NODE *list)
PT_NODE * parser_walk_tree(PARSER_CONTEXT *parser, PT_NODE *node, PT_NODE_WALK_FUNCTION pre_function, void *pre_argument, PT_NODE_WALK_FUNCTION post_function, void *post_argument)
PT_NODE * parser_copy_tree_list(PARSER_CONTEXT *parser, PT_NODE *tree)