#include "univ.i"#include "que0types.h"#include "usr0types.h"#include "pars0types.h"#include "row0types.h"#include "trx0types.h"#include "ut0vec.h"Include dependency graph for pars0pars.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
| #define PARS_FUNC_AGGREGATE 5 |
Definition at line 723 of file pars0pars.h.
Referenced by eval_func(), pars_check_aggregate(), and pars_func_get_class().
| #define PARS_FUNC_ARITH 1 |
| #define PARS_FUNC_CMP 3 |
| #define PARS_FUNC_LOGICAL 2 |
| #define PARS_FUNC_OTHER 6 |
| #define PARS_FUNC_PREDEFINED 4 |
| #define PARS_INPUT 0 |
Definition at line 73 of file pars0pars.h.
Referenced by pars_parameter_declaration(), and yyparse().
| #define PARS_NOT_PARAM 2 |
| #define PARS_OUTPUT 1 |
Definition at line 74 of file pars0pars.h.
Referenced by pars_parameter_declaration(), and yyparse().
| typedef void*(*) pars_user_func_cb_t(void *arg, void *user_arg) |
Definition at line 24 of file pars0pars.h.
| assign_node_t* pars_assignment_statement | ( | sym_node_t * | var, | |
| que_node_t * | val | |||
| ) |
Definition at line 1395 of file pars0pars.c.
References assign_node_struct::common, dfield_get_type(), dtype_get_mtype(), sym_tab_struct::heap, mem_heap_alloc(), NULL, pars_resolve_exp_variables_and_types(), pars_sym_tab_global, QUE_NODE_ASSIGNMENT, que_node_get_val(), que_common_struct::type, ut_a, assign_node_struct::val, and assign_node_struct::var.
Referenced by yyparse().
01397 : assignment statement node */ 01398 sym_node_t* var, /* in: variable to assign */ 01399 que_node_t* val) /* in: value to assign */ 01400 { 01401 assign_node_t* node; 01402 01403 node = mem_heap_alloc(pars_sym_tab_global->heap, 01404 sizeof(assign_node_t)); 01405 node->common.type = QUE_NODE_ASSIGNMENT; 01406 01407 node->var = var; 01408 node->val = val; 01409 01410 pars_resolve_exp_variables_and_types(NULL, var); 01411 pars_resolve_exp_variables_and_types(NULL, val); 01412 01413 ut_a(dtype_get_mtype(dfield_get_type(que_node_get_val(var))) 01414 == dtype_get_mtype(dfield_get_type(que_node_get_val(val)))); 01415 01416 return(node); 01417 }
Here is the call graph for this function:

Here is the caller graph for this function:

| col_assign_node_t* pars_column_assignment | ( | sym_node_t * | column, | |
| que_node_t * | exp | |||
| ) |
Definition at line 843 of file pars0pars.c.
References col_assign_node_struct::col, col_assign_node_struct::common, sym_tab_struct::heap, mem_heap_alloc(), pars_sym_tab_global, QUE_NODE_COL_ASSIGNMENT, que_common_struct::type, and col_assign_node_struct::val.
Referenced by yyparse().
00845 : column assignment node */ 00846 sym_node_t* column, /* in: column to assign */ 00847 que_node_t* exp) /* in: value to assign */ 00848 { 00849 col_assign_node_t* node; 00850 00851 node = mem_heap_alloc(pars_sym_tab_global->heap, 00852 sizeof(col_assign_node_t)); 00853 node->common.type = QUE_NODE_COL_ASSIGNMENT; 00854 00855 node->col = column; 00856 node->val = exp; 00857 00858 return(node); 00859 }
Here is the call graph for this function:

Here is the caller graph for this function:

| sym_node_t* pars_column_def | ( | sym_node_t * | sym_node, | |
| pars_res_word_t * | type, | |||
| sym_node_t * | len, | |||
| void * | is_unsigned, | |||
| void * | is_not_null | |||
| ) |
Definition at line 1567 of file pars0pars.c.
References eval_node_get_int_val(), NULL, pars_set_dfield_type(), and que_node_get_val().
Referenced by yyparse().
01569 : column sym table 01570 node */ 01571 sym_node_t* sym_node, /* in: column node in the 01572 symbol table */ 01573 pars_res_word_t* type, /* in: data type */ 01574 sym_node_t* len, /* in: length of column, or 01575 NULL */ 01576 void* is_unsigned, /* in: if not NULL, column 01577 is of type UNSIGNED. */ 01578 void* is_not_null) /* in: if not NULL, column 01579 is of type NOT NULL. */ 01580 { 01581 ulint len2; 01582 01583 if (len) { 01584 len2 = eval_node_get_int_val(len); 01585 } else { 01586 len2 = 0; 01587 } 01588 01589 pars_set_dfield_type(que_node_get_val(sym_node), type, len2, 01590 is_unsigned != NULL, is_not_null != NULL); 01591 01592 return(sym_node); 01593 }
Here is the call graph for this function:

Here is the caller graph for this function:

| commit_node_t* pars_commit_statement | ( | void | ) |
Definition at line 1547 of file pars0pars.c.
References commit_node_create(), sym_tab_struct::heap, and pars_sym_tab_global.
Referenced by yyparse().
01549 { 01550 return(commit_node_create(pars_sym_tab_global->heap)); 01551 }
Here is the call graph for this function:

Here is the caller graph for this function:

| que_thr_t* pars_complete_graph_for_exec | ( | que_node_t * | node, | |
| trx_t * | trx, | |||
| mem_heap_t * | heap | |||
| ) |
Definition at line 1896 of file pars0pars.c.
References que_thr_struct::child, trx_struct::graph, NULL, que_fork_create(), QUE_FORK_MYSQL_INTERFACE, que_node_set_parent(), que_thr_create(), and que_fork_struct::trx.
Referenced by row_create_index_for_mysql(), row_create_table_for_mysql(), row_get_prebuilt_insert_row(), row_get_prebuilt_update_vector(), row_prebuild_sel_graph(), and trx_general_rollback_for_mysql().
01898 : query thread node to run */ 01899 que_node_t* node, /* in: root node for an incomplete 01900 query graph */ 01901 trx_t* trx, /* in: transaction handle */ 01902 mem_heap_t* heap) /* in: memory heap from which allocated */ 01903 { 01904 que_fork_t* fork; 01905 que_thr_t* thr; 01906 01907 fork = que_fork_create(NULL, NULL, QUE_FORK_MYSQL_INTERFACE, heap); 01908 fork->trx = trx; 01909 01910 thr = que_thr_create(fork, heap); 01911 01912 thr->child = node; 01913 01914 que_node_set_parent(node, thr); 01915 01916 trx->graph = NULL; 01917 01918 return(thr); 01919 }
Here is the call graph for this function:

Here is the caller graph for this function:

| ind_node_t* pars_create_index | ( | pars_res_word_t * | unique_def, | |
| pars_res_word_t * | clustered_def, | |||
| sym_node_t * | index_sym, | |||
| sym_node_t * | table_sym, | |||
| sym_node_t * | column_list | |||
| ) |
Definition at line 1659 of file pars0pars.c.
References DICT_CLUSTERED, dict_mem_index_add_field(), dict_mem_index_create(), DICT_UNIQUE, sym_tab_struct::heap, ind_create_graph_create(), index(), sym_node_struct::name, pars_sym_tab_global, que_node_get_next(), que_node_list_get_len(), sym_node_struct::resolved, SYM_COLUMN, SYM_TABLE, sym_node_struct::token_type, and TRUE.
Referenced by yyparse().
01661 : index create subgraph */ 01662 pars_res_word_t* unique_def, /* in: not NULL if a unique index */ 01663 pars_res_word_t* clustered_def, /* in: not NULL if a clustered index */ 01664 sym_node_t* index_sym, /* in: index name node in the symbol 01665 table */ 01666 sym_node_t* table_sym, /* in: table name node in the symbol 01667 table */ 01668 sym_node_t* column_list) /* in: list of column names */ 01669 { 01670 dict_index_t* index; 01671 sym_node_t* column; 01672 ind_node_t* node; 01673 ulint n_fields; 01674 ulint ind_type; 01675 01676 n_fields = que_node_list_get_len(column_list); 01677 01678 ind_type = 0; 01679 01680 if (unique_def) { 01681 ind_type = ind_type | DICT_UNIQUE; 01682 } 01683 01684 if (clustered_def) { 01685 ind_type = ind_type | DICT_CLUSTERED; 01686 } 01687 01688 index = dict_mem_index_create(table_sym->name, index_sym->name, 0, 01689 ind_type, n_fields); 01690 column = column_list; 01691 01692 while (column) { 01693 dict_mem_index_add_field(index, column->name, 0); 01694 01695 column->resolved = TRUE; 01696 column->token_type = SYM_COLUMN; 01697 01698 column = que_node_get_next(column); 01699 } 01700 01701 node = ind_create_graph_create(index, pars_sym_tab_global->heap); 01702 01703 table_sym->resolved = TRUE; 01704 table_sym->token_type = SYM_TABLE; 01705 01706 index_sym->resolved = TRUE; 01707 index_sym->token_type = SYM_TABLE; 01708 01709 return(node); 01710 }
Here is the call graph for this function:

Here is the caller graph for this function:

| tab_node_t* pars_create_table | ( | sym_node_t * | table_sym, | |
| sym_node_t * | column_defs, | |||
| void * | not_fit_in_memory | |||
| ) |
Definition at line 1599 of file pars0pars.c.
References dfield_get_type(), dict_mem_table_add_col(), dict_mem_table_create(), dict_table_struct::does_not_fit_in_memory, sym_tab_struct::heap, dtype_struct::len, dtype_struct::mtype, sym_node_struct::name, NULL, pars_sym_tab_global, dtype_struct::prec, dtype_struct::prtype, que_node_get_next(), que_node_get_val(), que_node_list_get_len(), sym_node_struct::resolved, SYM_COLUMN, SYM_TABLE, tab_create_graph_create(), sym_node_struct::token_type, and TRUE.
Referenced by yyparse().
01601 : table create subgraph */ 01602 sym_node_t* table_sym, /* in: table name node in the symbol 01603 table */ 01604 sym_node_t* column_defs, /* in: list of column names */ 01605 void* not_fit_in_memory)/* in: a non-NULL pointer means that 01606 this is a table which in simulations 01607 should be simulated as not fitting 01608 in memory; thread is put to sleep 01609 to simulate disk accesses; NOTE that 01610 this flag is not stored to the data 01611 dictionary on disk, and the database 01612 will forget about non-NULL value if 01613 it has to reload the table definition 01614 from disk */ 01615 { 01616 dict_table_t* table; 01617 sym_node_t* column; 01618 tab_node_t* node; 01619 dtype_t* dtype; 01620 ulint n_cols; 01621 01622 n_cols = que_node_list_get_len(column_defs); 01623 01624 /* As the InnoDB SQL parser is for internal use only, 01625 for creating some system tables, this function will only 01626 create tables in the old (not compact) record format. */ 01627 table = dict_mem_table_create(table_sym->name, 0, n_cols, 0); 01628 01629 if (not_fit_in_memory != NULL) { 01630 table->does_not_fit_in_memory = TRUE; 01631 } 01632 01633 column = column_defs; 01634 01635 while (column) { 01636 dtype = dfield_get_type(que_node_get_val(column)); 01637 01638 dict_mem_table_add_col(table, column->name, dtype->mtype, 01639 dtype->prtype, dtype->len, 01640 dtype->prec); 01641 column->resolved = TRUE; 01642 column->token_type = SYM_COLUMN; 01643 01644 column = que_node_get_next(column); 01645 } 01646 01647 node = tab_create_graph_create(table, pars_sym_tab_global->heap); 01648 01649 table_sym->resolved = TRUE; 01650 table_sym->token_type = SYM_TABLE; 01651 01652 return(node); 01653 }
Here is the call graph for this function:

Here is the caller graph for this function:

| que_node_t* pars_cursor_declaration | ( | sym_node_t * | sym_node, | |
| sel_node_t * | select_node | |||
| ) |
Definition at line 777 of file pars0pars.c.
References sym_node_struct::cursor_def, sel_node_struct::explicit_cursor, sym_node_struct::resolved, SEL_NODE_CLOSED, sel_node_struct::state, SYM_CURSOR, sym_node_struct::token_type, and TRUE.
Referenced by yyparse().
00779 : sym_node */ 00780 sym_node_t* sym_node, /* in: cursor id node in the symbol 00781 table */ 00782 sel_node_t* select_node) /* in: select node */ 00783 { 00784 sym_node->resolved = TRUE; 00785 sym_node->token_type = SYM_CURSOR; 00786 sym_node->cursor_def = select_node; 00787 00788 select_node->state = SEL_NODE_CLOSED; 00789 select_node->explicit_cursor = sym_node; 00790 00791 return(sym_node); 00792 }
Here is the caller graph for this function:

| elsif_node_t* pars_elsif_element | ( | que_node_t * | cond, | |
| que_node_t * | stat_list | |||
| ) |
Definition at line 1223 of file pars0pars.c.
References elsif_node_struct::common, elsif_node_struct::cond, sym_tab_struct::heap, mem_heap_alloc(), NULL, pars_resolve_exp_variables_and_types(), pars_sym_tab_global, QUE_NODE_ELSIF, elsif_node_struct::stat_list, and que_common_struct::type.
Referenced by yyparse().
01225 : elsif node */ 01226 que_node_t* cond, /* in: if-condition */ 01227 que_node_t* stat_list) /* in: statement list */ 01228 { 01229 elsif_node_t* node; 01230 01231 node = mem_heap_alloc(pars_sym_tab_global->heap, sizeof(elsif_node_t)); 01232 01233 node->common.type = QUE_NODE_ELSIF; 01234 01235 node->cond = cond; 01236 01237 pars_resolve_exp_variables_and_types(NULL, cond); 01238 01239 node->stat_list = stat_list; 01240 01241 return(node); 01242 }
Here is the call graph for this function:

Here is the caller graph for this function:

| exit_node_t* pars_exit_statement | ( | void | ) |
Definition at line 1362 of file pars0pars.c.
References exit_node_struct::common, sym_tab_struct::heap, mem_heap_alloc(), pars_sym_tab_global, QUE_NODE_EXIT, and que_common_struct::type.
Referenced by yyparse().
01364 : exit statement node */ 01365 { 01366 exit_node_t* node; 01367 01368 node = mem_heap_alloc(pars_sym_tab_global->heap, sizeof(exit_node_t)); 01369 node->common.type = QUE_NODE_EXIT; 01370 01371 return(node); 01372 }
Here is the call graph for this function:

Here is the caller graph for this function:

| fetch_node_t* pars_fetch_statement | ( | sym_node_t * | cursor, | |
| sym_node_t * | into_list, | |||
| sym_node_t * | user_func | |||
| ) |
Definition at line 1443 of file pars0pars.c.
References sym_node_struct::alias, fetch_node_struct::common, fetch_node_struct::cursor_def, sym_node_struct::cursor_def, fetch_node_struct::func, sym_tab_struct::heap, sym_tab_struct::info, fetch_node_struct::into_list, mem_heap_alloc(), sym_node_struct::name, NULL, pars_info_get_user_func(), pars_resolve_exp_list_variables_and_types(), pars_resolve_exp_variables_and_types(), pars_sym_tab_global, QUE_NODE_FETCH, que_node_list_get_len(), sel_node_struct::select_list, SYM_CURSOR, sym_node_struct::token_type, que_common_struct::type, and ut_a.
Referenced by yyparse().
01445 : fetch statement node */ 01446 sym_node_t* cursor, /* in: cursor node */ 01447 sym_node_t* into_list, /* in: variables to set, or NULL */ 01448 sym_node_t* user_func) /* in: user function name, or NULL */ 01449 { 01450 sym_node_t* cursor_decl; 01451 fetch_node_t* node; 01452 01453 /* Logical XOR. */ 01454 ut_a(!into_list != !user_func); 01455 01456 node = mem_heap_alloc(pars_sym_tab_global->heap, sizeof(fetch_node_t)); 01457 01458 node->common.type = QUE_NODE_FETCH; 01459 01460 pars_resolve_exp_variables_and_types(NULL, cursor); 01461 01462 if (into_list) { 01463 pars_resolve_exp_list_variables_and_types(NULL, into_list); 01464 node->into_list = into_list; 01465 node->func = NULL; 01466 } else { 01467 pars_resolve_exp_variables_and_types(NULL, user_func); 01468 01469 node->func = pars_info_get_user_func(pars_sym_tab_global->info, 01470 user_func->name); 01471 ut_a(node->func); 01472 01473 node->into_list = NULL; 01474 } 01475 01476 cursor_decl = cursor->alias; 01477 01478 ut_a(cursor_decl->token_type == SYM_CURSOR); 01479 01480 node->cursor_def = cursor_decl->cursor_def; 01481 01482 if (into_list) { 01483 ut_a(que_node_list_get_len(into_list) 01484 == que_node_list_get_len( 01485 node->cursor_def->select_list)); 01486 } 01487 01488 return(node); 01489 }
Here is the call graph for this function:

Here is the caller graph for this function:

| for_node_t* pars_for_statement | ( | sym_node_t * | loop_var, | |
| que_node_t * | loop_start_limit, | |||
| que_node_t * | loop_end_limit, | |||
| que_node_t * | stat_list | |||
| ) |
Definition at line 1326 of file pars0pars.c.
References for_node_struct::common, sym_tab_struct::heap, sym_node_struct::indirection, for_node_struct::loop_end_limit, for_node_struct::loop_start_limit, for_node_struct::loop_var, mem_heap_alloc(), NULL, pars_resolve_exp_variables_and_types(), pars_set_parent_in_list(), pars_sym_tab_global, QUE_NODE_FOR, for_node_struct::stat_list, que_common_struct::type, and ut_a.
Referenced by yyparse().
01328 : for-statement node */ 01329 sym_node_t* loop_var, /* in: loop variable */ 01330 que_node_t* loop_start_limit,/* in: loop start expression */ 01331 que_node_t* loop_end_limit, /* in: loop end expression */ 01332 que_node_t* stat_list) /* in: statement list */ 01333 { 01334 for_node_t* node; 01335 01336 node = mem_heap_alloc(pars_sym_tab_global->heap, sizeof(for_node_t)); 01337 01338 node->common.type = QUE_NODE_FOR; 01339 01340 pars_resolve_exp_variables_and_types(NULL, loop_var); 01341 pars_resolve_exp_variables_and_types(NULL, loop_start_limit); 01342 pars_resolve_exp_variables_and_types(NULL, loop_end_limit); 01343 01344 node->loop_var = loop_var->indirection; 01345 01346 ut_a(loop_var->indirection); 01347 01348 node->loop_start_limit = loop_start_limit; 01349 node->loop_end_limit = loop_end_limit; 01350 01351 node->stat_list = stat_list; 01352 01353 pars_set_parent_in_list(stat_list, node); 01354 01355 return(node); 01356 }
Here is the call graph for this function:

Here is the caller graph for this function:

| func_node_t* pars_func | ( | que_node_t * | res_word, | |
| que_node_t * | arg | |||
| ) |
Definition at line 167 of file pars0pars.c.
References pars_func_low().
Referenced by pars_procedure_call(), and yyparse().
00169 : function node in a query tree */ 00170 que_node_t* res_word,/* in: function name reserved word */ 00171 que_node_t* arg) /* in: first argument in the argument list */ 00172 { 00173 return(pars_func_low(((pars_res_word_t*)res_word)->code, arg)); 00174 }
Here is the call graph for this function:

Here is the caller graph for this function:

| que_node_t* pars_function_declaration | ( | sym_node_t * | sym_node | ) |
Definition at line 798 of file pars0pars.c.
References sym_tab_struct::info, sym_node_struct::name, pars_info_get_user_func(), pars_sym_tab_global, sym_node_struct::resolved, SYM_FUNCTION, sym_node_struct::token_type, TRUE, and ut_a.
Referenced by yyparse().
00800 : sym_node */ 00801 sym_node_t* sym_node) /* in: function id node in the symbol 00802 table */ 00803 { 00804 sym_node->resolved = TRUE; 00805 sym_node->token_type = SYM_FUNCTION; 00806 00807 /* Check that the function exists. */ 00808 ut_a(pars_info_get_user_func(pars_sym_tab_global->info, 00809 sym_node->name)); 00810 00811 return(sym_node); 00812 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void pars_get_lex_chars | ( | char * | buf, | |
| int * | result, | |||
| int | max_size | |||
| ) |
Definition at line 1780 of file pars0pars.c.
References sym_tab_struct::next_char_pos, pars_sym_tab_global, sym_tab_struct::sql_string, sym_tab_struct::string_len, and ut_memcpy().
01782 : buffer where to copy */ 01783 int* result, /* out: number of characters copied or EOF */ 01784 int max_size) /* in: maximum number of characters which fit 01785 in the buffer */ 01786 { 01787 int len; 01788 01789 len = pars_sym_tab_global->string_len 01790 - pars_sym_tab_global->next_char_pos; 01791 if (len == 0) { 01792 #ifdef YYDEBUG 01793 /* fputs("SQL string ends\n", stderr); */ 01794 #endif 01795 *result = 0; 01796 01797 return; 01798 } 01799 01800 if (len > max_size) { 01801 len = max_size; 01802 } 01803 01804 #ifdef UNIV_SQL_DEBUG 01805 if (pars_print_lexed) { 01806 01807 if (len >= 5) { 01808 len = 5; 01809 } 01810 01811 fwrite(pars_sym_tab_global->sql_string + 01812 pars_sym_tab_global->next_char_pos, 01813 1, len, stderr); 01814 } 01815 #endif /* UNIV_SQL_DEBUG */ 01816 01817 ut_memcpy(buf, pars_sym_tab_global->sql_string + 01818 pars_sym_tab_global->next_char_pos, len); 01819 *result = len; 01820 01821 pars_sym_tab_global->next_char_pos += len; 01822 }
Here is the call graph for this function:

| if_node_t* pars_if_statement | ( | que_node_t * | cond, | |
| que_node_t * | stat_list, | |||
| que_node_t * | else_part | |||
| ) |
Definition at line 1248 of file pars0pars.c.
References if_node_struct::common, if_node_struct::cond, if_node_struct::else_part, if_node_struct::elsif_list, sym_tab_struct::heap, mem_heap_alloc(), NULL, pars_resolve_exp_variables_and_types(), pars_set_parent_in_list(), pars_sym_tab_global, QUE_NODE_ELSIF, que_node_get_next(), que_node_get_type(), QUE_NODE_IF, if_node_struct::stat_list, elsif_node_struct::stat_list, and que_common_struct::type.
Referenced by yyparse().
01250 : if-statement node */ 01251 que_node_t* cond, /* in: if-condition */ 01252 que_node_t* stat_list, /* in: statement list */ 01253 que_node_t* else_part) /* in: else-part statement list 01254 or elsif element list */ 01255 { 01256 if_node_t* node; 01257 elsif_node_t* elsif_node; 01258 01259 node = mem_heap_alloc(pars_sym_tab_global->heap, sizeof(if_node_t)); 01260 01261 node->common.type = QUE_NODE_IF; 01262 01263 node->cond = cond; 01264 01265 pars_resolve_exp_variables_and_types(NULL, cond); 01266 01267 node->stat_list = stat_list; 01268 01269 if (else_part && (que_node_get_type(else_part) == QUE_NODE_ELSIF)) { 01270 01271 /* There is a list of elsif conditions */ 01272 01273 node->else_part = NULL; 01274 node->elsif_list = else_part; 01275 01276 elsif_node = else_part; 01277 01278 while (elsif_node) { 01279 pars_set_parent_in_list(elsif_node->stat_list, node); 01280 01281 elsif_node = que_node_get_next(elsif_node); 01282 } 01283 } else { 01284 node->else_part = else_part; 01285 node->elsif_list = NULL; 01286 01287 pars_set_parent_in_list(else_part, node); 01288 } 01289 01290 pars_set_parent_in_list(stat_list, node); 01291 01292 return(node); 01293 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void pars_info_add_dulint_literal | ( | pars_info_t * | info, | |
| const char * | name, | |||
| dulint | val | |||
| ) |
Definition at line 2038 of file pars0pars.c.
References buf, DATA_FIXBINARY, pars_info_struct::heap, mach_write_to_8(), mem_heap_alloc(), and pars_info_add_literal().
Referenced by row_discard_tablespace_for_mysql(), and row_truncate_table_for_mysql().
02040 : info struct */ 02041 const char* name, /* in: name */ 02042 dulint val) /* in: value */ 02043 { 02044 byte* buf = mem_heap_alloc(info->heap, 8); 02045 02046 mach_write_to_8(buf, val); 02047 02048 pars_info_add_literal(info, name, buf, 8, DATA_FIXBINARY, 0); 02049 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void pars_info_add_function | ( | pars_info_t * | info, | |
| const char * | name, | |||
| pars_user_func_cb_t | func, | |||
| void * | arg | |||
| ) |
Definition at line 2055 of file pars0pars.c.
References pars_info_struct::funcs, pars_info_struct::heap, ib_vector_create(), ib_vector_push(), mem_heap_alloc(), pars_info_get_user_func(), and ut_ad.
02057 : info struct */ 02058 const char* name, /* in: function name */ 02059 pars_user_func_cb_t func, /* in: function address */ 02060 void* arg) /* in: user-supplied argument */ 02061 { 02062 pars_user_func_t* puf; 02063 02064 ut_ad(!pars_info_get_user_func(info, name)); 02065 02066 puf = mem_heap_alloc(info->heap, sizeof(*puf)); 02067 02068 puf->name = name; 02069 puf->func = func; 02070 puf->arg = arg; 02071 02072 if (!info->funcs) { 02073 info->funcs = ib_vector_create(info->heap, 8); 02074 } 02075 02076 ib_vector_push(info->funcs, puf); 02077 }
Here is the call graph for this function:

| void pars_info_add_id | ( | pars_info_t * | info, | |
| const char * | name, | |||
| const char * | id | |||
| ) |
Definition at line 2083 of file pars0pars.c.
References pars_info_struct::bound_ids, pars_info_struct::heap, ib_vector_create(), ib_vector_push(), mem_heap_alloc(), pars_info_get_bound_id(), and ut_ad.
02085 : info struct */ 02086 const char* name, /* in: name */ 02087 const char* id) /* in: id */ 02088 { 02089 pars_bound_id_t* bid; 02090 02091 ut_ad(!pars_info_get_bound_id(info, name)); 02092 02093 bid = mem_heap_alloc(info->heap, sizeof(*bid)); 02094 02095 bid->name = name; 02096 bid->id = id; 02097 02098 if (!info->bound_ids) { 02099 info->bound_ids = ib_vector_create(info->heap, 8); 02100 } 02101 02102 ib_vector_push(info->bound_ids, bid); 02103 }
Here is the call graph for this function:

| void pars_info_add_int4_literal | ( | pars_info_t * | info, | |
| const char * | name, | |||
| lint | val | |||
| ) |
Definition at line 2015 of file pars0pars.c.
References buf, DATA_INT, pars_info_struct::heap, mach_write_to_4(), mem_heap_alloc(), and pars_info_add_literal().
Referenced by dict_create_add_foreign_field_to_dictionary(), and dict_create_add_foreign_to_dictionary().
02017 : info struct */ 02018 const char* name, /* in: name */ 02019 lint val) /* in: value */ 02020 { 02021 byte* buf = mem_heap_alloc(info->heap, 4); 02022 02023 mach_write_to_4(buf, val); 02024 pars_info_add_literal(info, name, buf, 4, DATA_INT, 0); 02025 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void pars_info_add_literal | ( | pars_info_t * | info, | |
| const char * | name, | |||
| const void * | address, | |||
| ulint | length, | |||
| ulint | type, | |||
| ulint | prtype | |||
| ) |
Definition at line 1960 of file pars0pars.c.
References pars_info_struct::bound_lits, pars_info_struct::heap, ib_vector_create(), ib_vector_push(), mem_heap_alloc(), pars_info_get_bound_lit(), and ut_ad.
Referenced by pars_info_add_dulint_literal(), pars_info_add_int4_literal(), and pars_info_add_str_literal().
01962 : info struct */ 01963 const char* name, /* in: name */ 01964 const void* address, /* in: address */ 01965 ulint length, /* in: length of data */ 01966 ulint type, /* in: type, e.g. DATA_FIXBINARY */ 01967 ulint prtype) /* in: precise type, e.g. 01968 DATA_UNSIGNED */ 01969 { 01970 pars_bound_lit_t* pbl; 01971 01972 ut_ad(!pars_info_get_bound_lit(info, name)); 01973 01974 pbl = mem_heap_alloc(info->heap, sizeof(*pbl)); 01975 01976 pbl->name = name; 01977 pbl->address = address; 01978 pbl->length = length; 01979 pbl->type = type; 01980 pbl->prtype = prtype; 01981 01982 if (!info->bound_lits) { 01983 info->bound_lits = ib_vector_create(info->heap, 8); 01984 } 01985 01986 ib_vector_push(info->bound_lits, pbl); 01987 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void pars_info_add_str_literal | ( | pars_info_t * | info, | |
| const char * | name, | |||
| const char * | str | |||
| ) |
Definition at line 1994 of file pars0pars.c.
References DATA_ENGLISH, DATA_VARCHAR, pars_info_add_literal(), and strlen().
Referenced by dict_create_add_foreign_field_to_dictionary(), dict_create_add_foreign_to_dictionary(), row_delete_constraint_low(), row_discard_tablespace_for_mysql(), row_drop_table_for_mysql(), and row_rename_table_for_mysql().
01996 : info struct */ 01997 const char* name, /* in: name */ 01998 const char* str) /* in: string */ 01999 { 02000 pars_info_add_literal(info, name, str, strlen(str), 02001 DATA_VARCHAR, DATA_ENGLISH); 02002 }
Here is the call graph for this function:

Here is the caller graph for this function:

| pars_info_t* pars_info_create | ( | void | ) |
Definition at line 1925 of file pars0pars.c.
References info, mem_heap_alloc(), mem_heap_create, NULL, and TRUE.
Referenced by dict_create_add_foreign_field_to_dictionary(), dict_create_add_foreign_to_dictionary(), row_delete_constraint_low(), row_discard_tablespace_for_mysql(), row_drop_table_for_mysql(), row_rename_table_for_mysql(), and row_truncate_table_for_mysql().
01927 : info struct */ 01928 { 01929 pars_info_t* info; 01930 mem_heap_t* heap; 01931 01932 heap = mem_heap_create(512); 01933 01934 info = mem_heap_alloc(heap, sizeof(*info)); 01935 01936 info->heap = heap; 01937 info->funcs = NULL; 01938 info->bound_lits = NULL; 01939 info->bound_ids = NULL; 01940 info->graph_owns_us = TRUE; 01941 01942 return(info); 01943 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void pars_info_free | ( | pars_info_t * | info | ) |
Definition at line 1949 of file pars0pars.c.
References pars_info_struct::heap, and mem_heap_free.
Referenced by que_graph_free().
01951 : info struct */ 01952 { 01953 mem_heap_free(info->heap); 01954 }
Here is the caller graph for this function:

| pars_bound_id_t* pars_info_get_bound_id | ( | pars_info_t * | info, | |
| const char * | name | |||
| ) |
Definition at line 2171 of file pars0pars.c.
References pars_info_struct::bound_ids, ib_vector_get(), ib_vector_size(), NULL, and strcmp().
Referenced by pars_info_add_id(), and sym_tab_add_bound_id().
02173 : bound id, or NULL if not 02174 found */ 02175 pars_info_t* info, /* in: info struct */ 02176 const char* name) /* in: bound id name to find */ 02177 { 02178 ulint i; 02179 ib_vector_t* vec; 02180 02181 if (!info || !info->bound_ids) { 02182 return(NULL); 02183 } 02184 02185 vec = info->bound_ids; 02186 02187 for (i = 0; i < ib_vector_size(vec); i++) { 02188 pars_bound_id_t* bid = ib_vector_get(vec, i); 02189 02190 if (strcmp(bid->name, name) == 0) { 02191 return(bid); 02192 } 02193 } 02194 02195 return(NULL); 02196 }
Here is the call graph for this function:

Here is the caller graph for this function:

| pars_bound_lit_t* pars_info_get_bound_lit | ( | pars_info_t * | info, | |
| const char * | name | |||
| ) |
Definition at line 2140 of file pars0pars.c.
References pars_info_struct::bound_lits, ib_vector_get(), ib_vector_size(), NULL, and strcmp().
Referenced by pars_info_add_literal(), and sym_tab_add_bound_lit().
02142 : bound literal, or NULL if 02143 not found */ 02144 pars_info_t* info, /* in: info struct */ 02145 const char* name) /* in: bound literal name to find */ 02146 { 02147 ulint i; 02148 ib_vector_t* vec; 02149 02150 if (!info || !info->bound_lits) { 02151 return(NULL); 02152 } 02153 02154 vec = info->bound_lits; 02155 02156 for (i = 0; i < ib_vector_size(vec); i++) { 02157 pars_bound_lit_t* pbl = ib_vector_get(vec, i); 02158 02159 if (strcmp(pbl->name, name) == 0) { 02160 return(pbl); 02161 } 02162 } 02163 02164 return(NULL); 02165 }
Here is the call graph for this function:

Here is the caller graph for this function:

| pars_user_func_t* pars_info_get_user_func | ( | pars_info_t * | info, | |
| const char * | name | |||
| ) |
Definition at line 2109 of file pars0pars.c.
References pars_info_struct::funcs, ib_vector_get(), ib_vector_size(), NULL, and strcmp().
Referenced by pars_fetch_statement(), pars_function_declaration(), and pars_info_add_function().
02111 : user func, or NULL if not 02112 found */ 02113 pars_info_t* info, /* in: info struct */ 02114 const char* name) /* in: function name to find*/ 02115 { 02116 ulint i; 02117 ib_vector_t* vec; 02118 02119 if (!info || !info->funcs) { 02120 return(NULL); 02121 } 02122 02123 vec = info->funcs; 02124 02125 for (i = 0; i < ib_vector_size(vec); i++) { 02126 pars_user_func_t* puf = ib_vector_get(vec, i); 02127 02128 if (strcmp(puf->name, name) == 0) { 02129 return(puf); 02130 } 02131 } 02132 02133 return(NULL); 02134 }
Here is the call graph for this function:

Here is the caller graph for this function:

| ins_node_t* pars_insert_statement | ( | sym_node_t * | table_sym, | |
| que_node_t * | values_list, | |||
| sel_node_t * | select | |||
| ) |
Definition at line 1049 of file pars0pars.c.
References sel_node_struct::common, dict_table_copy_types(), dict_table_get_n_cols(), dict_table_get_n_user_cols(), dtuple_create(), sym_tab_struct::heap, ins_node_create(), ins_node_set_new_row(), INS_SEARCHED, INS_VALUES, NULL, que_common_struct::parent, pars_resolve_exp_list_variables_and_types(), pars_retrieve_table_def(), pars_sym_tab_global, que_node_list_get_len(), ins_node_struct::select, sel_node_struct::select_list, sym_node_struct::table, ins_node_struct::table, ut_a, and ins_node_struct::values_list.
Referenced by yyparse().
01051 : update node in a query 01052 tree */ 01053 sym_node_t* table_sym, /* in: table name node */ 01054 que_node_t* values_list, /* in: value expression list or NULL */ 01055 sel_node_t* select) /* in: select condition or NULL */ 01056 { 01057 ins_node_t* node; 01058 dtuple_t* row; 01059 ulint ins_type; 01060 01061 ut_a(values_list || select); 01062 ut_a(!values_list || !select); 01063 01064 if (values_list) { 01065 ins_type = INS_VALUES; 01066 } else { 01067 ins_type = INS_SEARCHED; 01068 } 01069 01070 pars_retrieve_table_def(table_sym); 01071 01072 node = ins_node_create(ins_type, table_sym->table, 01073 pars_sym_tab_global->heap); 01074 01075 row = dtuple_create(pars_sym_tab_global->heap, 01076 dict_table_get_n_cols(node->table)); 01077 01078 dict_table_copy_types(row, table_sym->table); 01079 01080 ins_node_set_new_row(node, row); 01081 01082 node->select = select; 01083 01084 if (select) { 01085 select->common.parent = node; 01086 01087 ut_a(que_node_list_get_len(select->select_list) 01088 == dict_table_get_n_user_cols(table_sym->table)); 01089 } 01090 01091 node->values_list = values_list; 01092 01093 if (node->values_list) { 01094 pars_resolve_exp_list_variables_and_types(NULL, values_list); 01095 01096 ut_a(que_node_list_get_len(values_list) 01097 == dict_table_get_n_user_cols(table_sym->table)); 01098 } 01099 01100 return(node); 01101 }
Here is the call graph for this function:

Here is the caller graph for this function:

| func_node_t* pars_op | ( | int | func, | |
| que_node_t * | arg1, | |||
| que_node_t * | arg2 | |||
| ) |
Definition at line 180 of file pars0pars.c.
References NULL, pars_func_low(), and que_node_list_add_last().
Referenced by yyparse().
00182 : function node in a query tree */ 00183 int func, /* in: operator token code */ 00184 que_node_t* arg1, /* in: first argument */ 00185 que_node_t* arg2) /* in: second argument or NULL for an unary 00186 operator */ 00187 { 00188 que_node_list_add_last(NULL, arg1); 00189 00190 if (arg2) { 00191 que_node_list_add_last(arg1, arg2); 00192 } 00193 00194 return(pars_func_low(func, arg1)); 00195 }
Here is the call graph for this function:

Here is the caller graph for this function:

| open_node_t* pars_open_statement | ( | ulint | type, | |
| sym_node_t * | cursor | |||
| ) |
Definition at line 1495 of file pars0pars.c.
References sym_node_struct::alias, open_node_struct::common, open_node_struct::cursor_def, sym_node_struct::cursor_def, sym_tab_struct::heap, mem_heap_alloc(), NULL, open_node_struct::op_type, pars_resolve_exp_variables_and_types(), pars_sym_tab_global, QUE_NODE_OPEN, SYM_CURSOR, sym_node_struct::token_type, que_common_struct::type, and ut_a.
Referenced by yyparse().
01497 : fetch statement node */ 01498 ulint type, /* in: ROW_SEL_OPEN_CURSOR 01499 or ROW_SEL_CLOSE_CURSOR */ 01500 sym_node_t* cursor) /* in: cursor node */ 01501 { 01502 sym_node_t* cursor_decl; 01503 open_node_t* node; 01504 01505 node = mem_heap_alloc(pars_sym_tab_global->heap, sizeof(open_node_t)); 01506 01507 node->common.type = QUE_NODE_OPEN; 01508 01509 pars_resolve_exp_variables_and_types(NULL, cursor); 01510 01511 cursor_decl = cursor->alias; 01512 01513 ut_a(cursor_decl->token_type == SYM_CURSOR); 01514 01515 node->op_type = type; 01516 node->cursor_def = cursor_decl->cursor_def; 01517 01518 return(node); 01519 }
Here is the call graph for this function:

Here is the caller graph for this function:

| order_node_t* pars_order_by | ( | sym_node_t * | column, | |
| pars_res_word_t * | asc | |||
| ) |
Definition at line 201 of file pars0pars.c.
References order_node_struct::asc, order_node_struct::column, order_node_struct::common, FALSE, sym_tab_struct::heap, mem_heap_alloc(), pars_asc_token, pars_desc_token, pars_sym_tab_global, QUE_NODE_ORDER, TRUE, que_common_struct::type, and ut_a.
Referenced by yyparse().
00203 : order-by node in a query tree */ 00204 sym_node_t* column, /* in: column name */ 00205 pars_res_word_t* asc) /* in: &pars_asc_token or pars_desc_token */ 00206 { 00207 order_node_t* node; 00208 00209 node = mem_heap_alloc(pars_sym_tab_global->heap, sizeof(order_node_t)); 00210 00211 node->common.type = QUE_NODE_ORDER; 00212 00213 node->column = column; 00214 00215 if (asc == &pars_asc_token) { 00216 node->asc = TRUE; 00217 } else { 00218 ut_a(asc == &pars_desc_token); 00219 node->asc = FALSE; 00220 } 00221 00222 return(node); 00223 }
Here is the call graph for this function:

Here is the caller graph for this function:

| sym_node_t* pars_parameter_declaration | ( | sym_node_t * | node, | |
| ulint | param_type, | |||
| pars_res_word_t * | type | |||
| ) |
Definition at line 1179 of file pars0pars.c.
References sym_node_struct::param_type, PARS_INPUT, PARS_OUTPUT, pars_variable_declaration(), and ut_a.
Referenced by yyparse().
01181 : symbol table node of type 01182 SYM_VAR */ 01183 sym_node_t* node, /* in: symbol table node allocated for the 01184 id of the parameter */ 01185 ulint param_type, 01186 /* in: PARS_INPUT or PARS_OUTPUT */ 01187 pars_res_word_t* type) /* in: pointer to a type token */ 01188 { 01189 ut_a((param_type == PARS_INPUT) || (param_type == PARS_OUTPUT)); 01190 01191 pars_variable_declaration(node, type); 01192 01193 node->param_type = param_type; 01194 01195 return(node); 01196 }
Here is the call graph for this function:

Here is the caller graph for this function:

| func_node_t* pars_procedure_call | ( | que_node_t * | res_word, | |
| que_node_t * | args | |||
| ) |
Definition at line 1423 of file pars0pars.c.
References NULL, pars_func(), and pars_resolve_exp_list_variables_and_types().
Referenced by yyparse().
01425 : function node */ 01426 que_node_t* res_word,/* in: procedure name reserved word */ 01427 que_node_t* args) /* in: argument list */ 01428 { 01429 func_node_t* node; 01430 01431 node = pars_func(res_word, args); 01432 01433 pars_resolve_exp_list_variables_and_types(NULL, args); 01434 01435 return(node); 01436 }
Here is the call graph for this function:

Here is the caller graph for this function:

| que_fork_t* pars_procedure_definition | ( | sym_node_t * | sym_node, | |
| sym_node_t * | param_list, | |||
| que_node_t * | stat_list | |||
| ) |
Definition at line 1716 of file pars0pars.c.
References que_thr_struct::child, proc_node_struct::common, sym_tab_struct::heap, mem_heap_alloc(), NULL, proc_node_struct::param_list, que_common_struct::parent, pars_set_parent_in_list(), pars_sym_tab_global, proc_node_struct::proc_id, que_fork_create(), QUE_FORK_PROCEDURE, QUE_NODE_PROC, que_thr_create(), sym_tab_struct::query_graph, sym_node_struct::resolved, proc_node_struct::stat_list, SYM_PROCEDURE_NAME, proc_node_struct::sym_tab, sym_node_struct::token_type, TRUE, que_fork_struct::trx, and que_common_struct::type.
Referenced by yyparse().
01718 : query fork node */ 01719 sym_node_t* sym_node, /* in: procedure id node in the symbol 01720 table */ 01721 sym_node_t* param_list, /* in: parameter declaration list */ 01722 que_node_t* stat_list) /* in: statement list */ 01723 { 01724 proc_node_t* node; 01725 que_fork_t* fork; 01726 que_thr_t* thr; 01727 mem_heap_t* heap; 01728 01729 heap = pars_sym_tab_global->heap; 01730 01731 fork = que_fork_create(NULL, NULL, QUE_FORK_PROCEDURE, heap); 01732 fork->trx = NULL; 01733 01734 thr = que_thr_create(fork, heap); 01735 01736 node = mem_heap_alloc(heap, sizeof(proc_node_t)); 01737 01738 node->common.type = QUE_NODE_PROC; 01739 node->common.parent = thr; 01740 01741 sym_node->token_type = SYM_PROCEDURE_NAME; 01742 sym_node->resolved = TRUE; 01743 01744 node->proc_id = sym_node; 01745 node->param_list = param_list; 01746 node->stat_list = stat_list; 01747 01748 pars_set_parent_in_list(stat_list, node); 01749 01750 node->sym_tab = pars_sym_tab_global; 01751 01752 thr->child = node; 01753 01754 pars_sym_tab_global->query_graph = fork; 01755 01756 return(fork); 01757 }
Here is the call graph for this function:

Here is the caller graph for this function:

| return_node_t* pars_return_statement | ( | void | ) |
Definition at line 1378 of file pars0pars.c.
References return_node_struct::common, sym_tab_struct::heap, mem_heap_alloc(), pars_sym_tab_global, QUE_NODE_RETURN, and que_common_struct::type.
Referenced by yyparse().
01380 : return-statement node */ 01381 { 01382 return_node_t* node; 01383 01384 node = mem_heap_alloc(pars_sym_tab_global->heap, 01385 sizeof(return_node_t)); 01386 node->common.type = QUE_NODE_RETURN; 01387 01388 return(node); 01389 }
Here is the call graph for this function:

Here is the caller graph for this function:

| roll_node_t* pars_rollback_statement | ( | void | ) |
Definition at line 1557 of file pars0pars.c.
References sym_tab_struct::heap, pars_sym_tab_global, and roll_node_create().
Referenced by yyparse().
01559 { 01560 return(roll_node_create(pars_sym_tab_global->heap)); 01561 }
Here is the call graph for this function:

Here is the caller graph for this function:

| row_printf_node_t* pars_row_printf_statement | ( | sel_node_t * | sel_node | ) |
Definition at line 1525 of file pars0pars.c.
References row_printf_node_struct::common, sel_node_struct::common, sym_tab_struct::heap, mem_heap_alloc(), que_common_struct::parent, pars_sym_tab_global, QUE_NODE_ROW_PRINTF, row_printf_node_struct::sel_node, and que_common_struct::type.
Referenced by yyparse().
01527 : row_printf-statement node */ 01528 sel_node_t* sel_node) /* in: select node */ 01529 { 01530 row_printf_node_t* node; 01531 01532 node = mem_heap_alloc(pars_sym_tab_global->heap, 01533 sizeof(row_printf_node_t)); 01534 node->common.type = QUE_NODE_ROW_PRINTF; 01535 01536 node->sel_node = sel_node; 01537 01538 sel_node->common.parent = node; 01539 01540 return(node); 01541 }
Here is the call graph for this function:

Here is the caller graph for this function:

| sel_node_t* pars_select_list | ( | que_node_t * | select_list, | |
| sym_node_t * | into_list | |||
| ) |
Definition at line 627 of file pars0pars.c.
References sym_tab_struct::heap, sel_node_struct::into_list, NULL, pars_resolve_exp_list_variables_and_types(), pars_sym_tab_global, sel_node_create(), and sel_node_struct::select_list.
Referenced by pars_update_statement(), and yyparse().
00629 : select node in a query 00630 tree */ 00631 que_node_t* select_list, /* in: select list */ 00632 sym_node_t* into_list) /* in: variables list or NULL */ 00633 { 00634 sel_node_t* node; 00635 00636 node = sel_node_create(pars_sym_tab_global->heap); 00637 00638 node->select_list = select_list; 00639 node->into_list = into_list; 00640 00641 pars_resolve_exp_list_variables_and_types(NULL, into_list); 00642 00643 return(node); 00644 }
Here is the call graph for this function:

Here is the caller graph for this function:

| sel_node_t* pars_select_statement | ( | sel_node_t * | select_node, | |
| sym_node_t * | table_list, | |||
| que_node_t * | search_cond, | |||
| pars_res_word_t * | for_update, | |||
| pars_res_word_t * | consistent_read, | |||
| order_node_t * | order_by | |||
| ) |
Definition at line 693 of file pars0pars.c.
References sel_node_struct::can_get_updated, sel_node_struct::consistent_read, sel_node_struct::copy_variables, sel_node_struct::explicit_cursor, FALSE, sel_node_struct::into_list, LOCK_S, LOCK_X, sel_node_struct::n_tables, NULL, opt_search_plan(), sel_node_struct::order_by, order_by, pars_check_aggregate(), pars_resolve_exp_columns(), pars_resolve_exp_list_columns(), pars_resolve_exp_list_variables_and_types(), pars_resolve_exp_variables_and_types(), pars_retrieve_table_list_defs(), pars_select_all_columns(), pars_star_denoter, que_node_list_get_len(), sel_node_struct::read_view, sel_node_struct::row_lock_mode, sel_node_struct::search_cond, SEL_NODE_OPEN, sel_node_struct::select_list, sel_node_struct::set_x_locks, sel_node_struct::state, sel_node_struct::table_list, TRUE, ut_a, and UT_LIST_INIT.
Referenced by pars_update_statement(), and yyparse().
00695 : select node in a query 00696 tree */ 00697 sel_node_t* select_node, /* in: select node already containing 00698 the select list */ 00699 sym_node_t* table_list, /* in: table list */ 00700 que_node_t* search_cond, /* in: search condition or NULL */ 00701 pars_res_word_t* for_update, /* in: NULL or &pars_update_token */ 00702 pars_res_word_t* lock_shared, /* in: NULL or &pars_share_token */ 00703 order_node_t* order_by) /* in: NULL or an order-by node */ 00704 { 00705 select_node->state = SEL_NODE_OPEN; 00706 00707 select_node->table_list = table_list; 00708 select_node->n_tables = pars_retrieve_table_list_defs(table_list); 00709 00710 if (select_node->select_list == &pars_star_denoter) { 00711 00712 /* SELECT * FROM ... */ 00713 pars_select_all_columns(select_node); 00714 } 00715 00716 if (select_node->into_list) { 00717 ut_a(que_node_list_get_len(select_node->into_list) 00718 == que_node_list_get_len(select_node->select_list)); 00719 } 00720 00721 UT_LIST_INIT(select_node->copy_variables); 00722 00723 pars_resolve_exp_list_columns(table_list, select_node->select_list); 00724 pars_resolve_exp_list_variables_and_types(select_node, 00725 select_node->select_list); 00726 pars_check_aggregate(select_node); 00727 00728 select_node->search_cond = search_cond; 00729 00730 if (search_cond) { 00731 pars_resolve_exp_columns(table_list, search_cond); 00732 pars_resolve_exp_variables_and_types(select_node, search_cond); 00733 } 00734 00735 if (for_update) { 00736 ut_a(!lock_shared); 00737 00738 select_node->set_x_locks = TRUE; 00739 select_node->row_lock_mode = LOCK_X; 00740 00741 select_node->consistent_read = FALSE; 00742 select_node->read_view = NULL; 00743 } else if (lock_shared){ 00744 select_node->set_x_locks = FALSE; 00745 select_node->row_lock_mode = LOCK_S; 00746 00747 select_node->consistent_read = FALSE; 00748 select_node->read_view = NULL; 00749 } else { 00750 select_node->set_x_locks = FALSE; 00751 select_node->row_lock_mode = LOCK_S; 00752 00753 select_node->consistent_read = TRUE; 00754 } 00755 00756 select_node->order_by = order_by; 00757 00758 if (order_by) { 00759 pars_resolve_exp_columns(table_list, order_by->column); 00760 } 00761 00762 /* The final value of the following fields depend on the environment 00763 where the select statement appears: */ 00764 00765 select_node->can_get_updated = FALSE; 00766 select_node->explicit_cursor = NULL; 00767 00768 opt_search_plan(select_node); 00769 00770 return(select_node); 00771 }
Here is the call graph for this function:

Here is the caller graph for this function:

| que_t* pars_sql | ( | pars_info_t * | info, | |
| const char * | str | |||
| ) |
Definition at line 1844 of file pars0pars.c.
References dict_sys, sym_tab_struct::info, que_fork_struct::info, mem_heap_create, mem_heap_dup(), dict_sys_struct::mutex, sym_tab_struct::next_char_pos, pars_sym_tab_global, sym_tab_struct::query_graph, sym_node_struct::resolved, sym_tab_struct::sql_string, sym_tab_struct::string_len, strlen(), sym_tab_struct::sym_list, que_fork_struct::sym_tab, sym_tab_create(), ut_a, ut_ad, UT_LIST_GET_FIRST, UT_LIST_GET_NEXT, and yyparse.
Referenced by que_eval_sql().
01846 : the query graph */ 01847 pars_info_t* info, /* in: extra information, or NULL */ 01848 const char* str) /* in: SQL string */ 01849 { 01850 sym_node_t* sym_node; 01851 mem_heap_t* heap; 01852 que_t* graph; 01853 01854 ut_ad(str); 01855 01856 heap = mem_heap_create(256); 01857 01858 #ifdef UNIV_SYNC_DEBUG 01859 /* Currently, the parser is not reentrant: */ 01860 ut_ad(mutex_own(&(dict_sys->mutex))); 01861 #endif /* UNIV_SYNC_DEBUG */ 01862 pars_sym_tab_global = sym_tab_create(heap); 01863 01864 pars_sym_tab_global->string_len = strlen(str); 01865 pars_sym_tab_global->sql_string = mem_heap_dup(heap, str, 01866 pars_sym_tab_global->string_len + 1); 01867 pars_sym_tab_global->next_char_pos = 0; 01868 pars_sym_tab_global->info = info; 01869 01870 yyparse(); 01871 01872 sym_node = UT_LIST_GET_FIRST(pars_sym_tab_global->sym_list); 01873 01874 while (sym_node) { 01875 ut_a(sym_node->resolved); 01876 01877 sym_node = UT_LIST_GET_NEXT(sym_list, sym_node); 01878 } 01879 01880 graph = pars_sym_tab_global->query_graph; 01881 01882 graph->sym_tab = pars_sym_tab_global; 01883 graph->info = info; 01884 01885 /* fprintf(stderr, "SQL graph size %lu\n", mem_heap_get_size(heap)); */ 01886 01887 return(graph); 01888 }
Here is the call graph for this function:

Here is the caller graph for this function:

| que_fork_t* pars_stored_procedure_call | ( | sym_node_t * | sym_node | ) |
| upd_node_t* pars_update_statement | ( | upd_node_t * | node, | |
| sym_node_t * | cursor_sym, | |||
| que_node_t * | search_cond | |||
| ) |
Definition at line 949 of file pars0pars.c.
References sym_node_struct::alias, BTR_MODIFY_LEAF, sel_node_struct::can_get_updated, upd_node_struct::cmpl_info, upd_node_struct::col_assign_list, upd_node_struct::columns, sel_node_struct::common, sel_node_struct::consistent_read, sym_node_struct::cursor_def, DICT_CLUSTERED, FALSE, upd_node_struct::has_clust_rec_x_lock, sel_node_struct::is_aggregate, upd_node_struct::is_delete, sel_node_struct::latch_mode, LOCK_X, sel_node_struct::n_tables, NULL, sel_node_struct::order_by, que_common_struct::parent, pars_process_assign_list(), pars_resolve_exp_variables_and_types(), pars_retrieve_table_def(), pars_select_list(), pars_select_statement(), pars_share_token, upd_node_struct::pcur, plan(), que_node_list_add_last(), sel_node_struct::row_lock_mode, upd_node_struct::searched_update, sel_node_get_nth_plan(), upd_node_struct::select, upd_node_struct::select_will_do_update, sel_node_struct::select_will_do_update, sel_node_struct::set_x_locks, upd_node_struct::state, upd_node_struct::table, sym_node_struct::table, upd_node_struct::table_sym, TRUE, UPD_NODE_NO_ORD_CHANGE, UPD_NODE_NO_SIZE_CHANGE, UPD_NODE_UPDATE_CLUSTERED, ut_a, and UT_LIST_INIT.
Referenced by yyparse().
00951 : update node in a query 00952 tree */ 00953 upd_node_t* node, /* in: update node */ 00954 sym_node_t* cursor_sym, /* in: pointer to a cursor entry in 00955 the symbol table or NULL */ 00956 que_node_t* search_cond) /* in: search condition or NULL */ 00957 { 00958 sym_node_t* table_sym; 00959 sel_node_t* sel_node; 00960 plan_t* plan; 00961 00962 table_sym = node->table_sym; 00963 00964 pars_retrieve_table_def(table_sym); 00965 node->table = table_sym->table; 00966 00967 UT_LIST_INIT(node->columns); 00968 00969 /* Make the single table node into a list of table nodes of length 1 */ 00970 00971 que_node_list_add_last(NULL, table_sym); 00972 00973 if (cursor_sym) { 00974 pars_resolve_exp_variables_and_types(NULL, cursor_sym); 00975 00976 sel_node = cursor_sym->alias->cursor_def; 00977 00978 node->searched_update = FALSE; 00979 } else { 00980 sel_node = pars_select_list(NULL, NULL); 00981 00982 pars_select_statement(sel_node, table_sym, search_cond, NULL, 00983 &pars_share_token, NULL); 00984 node->searched_update = TRUE; 00985 sel_node->common.parent = node; 00986 } 00987 00988 node->select = sel_node; 00989 00990 ut_a(!node->is_delete || (node->col_assign_list == NULL)); 00991 ut_a(node->is_delete || (node->col_assign_list != NULL)); 00992 00993 if (node->is_delete) { 00994 node->cmpl_info = 0; 00995 } else { 00996 pars_process_assign_list(node); 00997 } 00998 00999 if (node->searched_update) { 01000 node->has_clust_rec_x_lock = TRUE; 01001 sel_node->set_x_locks = TRUE; 01002 sel_node->row_lock_mode = LOCK_X; 01003 } else { 01004 node->has_clust_rec_x_lock = sel_node->set_x_locks; 01005 } 01006 01007 ut_a(sel_node->n_tables == 1); 01008 ut_a(sel_node->consistent_read == FALSE); 01009 ut_a(sel_node->order_by == NULL); 01010 ut_a(sel_node->is_aggregate == FALSE); 01011 01012 sel_node->can_get_updated = TRUE; 01013 01014 node->state = UPD_NODE_UPDATE_CLUSTERED; 01015 01016 plan = sel_node_get_nth_plan(sel_node, 0); 01017 01018 plan->no_prefetch = TRUE; 01019 01020 if (!((plan->index)->type & DICT_CLUSTERED)) { 01021 01022 plan->must_get_clust = TRUE; 01023 01024 node->pcur = &(plan->clust_pcur); 01025 } else { 01026 node->pcur = &(plan->pcur); 01027 } 01028 01029 if (!node->is_delete && node->searched_update 01030 && (node->cmpl_info & UPD_NODE_NO_SIZE_CHANGE) 01031 && (node->cmpl_info & UPD_NODE_NO_ORD_CHANGE)) { 01032 01033 /* The select node can perform the update in-place */ 01034 01035 ut_a(plan->asc); 01036 01037 node->select_will_do_update = TRUE; 01038 sel_node->select_will_do_update = TRUE; 01039 sel_node->latch_mode = BTR_MODIFY_LEAF; 01040 } 01041 01042 return(node); 01043 }
Here is the call graph for this function:

Here is the caller graph for this function:

| upd_node_t* pars_update_statement_start | ( | ibool | is_delete, | |
| sym_node_t * | table_sym, | |||
| col_assign_node_t * | col_assign_list | |||
| ) |
Definition at line 818 of file pars0pars.c.
References upd_node_struct::col_assign_list, sym_tab_struct::heap, upd_node_struct::is_delete, pars_sym_tab_global, upd_node_struct::table_sym, and upd_node_create().
Referenced by yyparse().
00820 : update node in a query 00821 tree */ 00822 ibool is_delete, /* in: TRUE if delete */ 00823 sym_node_t* table_sym, /* in: table name node */ 00824 col_assign_node_t* col_assign_list)/* in: column assignment list, NULL 00825 if delete */ 00826 { 00827 upd_node_t* node; 00828 00829 node = upd_node_create(pars_sym_tab_global->heap); 00830 00831 node->is_delete = is_delete; 00832 00833 node->table_sym = table_sym; 00834 node->col_assign_list = col_assign_list; 00835 00836 return(node); 00837 }
Here is the call graph for this function:

Here is the caller graph for this function:

| sym_node_t* pars_variable_declaration | ( | sym_node_t * | node, | |
| pars_res_word_t * | type | |||
| ) |
Definition at line 1157 of file pars0pars.c.
References FALSE, sym_node_struct::param_type, PARS_NOT_PARAM, pars_set_dfield_type(), que_node_get_val(), sym_node_struct::resolved, SYM_VAR, sym_node_struct::token_type, and TRUE.
Referenced by pars_parameter_declaration(), and yyparse().
01159 : symbol table node of type 01160 SYM_VAR */ 01161 sym_node_t* node, /* in: symbol table node allocated for the 01162 id of the variable */ 01163 pars_res_word_t* type) /* in: pointer to a type token */ 01164 { 01165 node->resolved = TRUE; 01166 node->token_type = SYM_VAR; 01167 01168 node->param_type = PARS_NOT_PARAM; 01169 01170 pars_set_dfield_type(que_node_get_val(node), type, 0, FALSE, FALSE); 01171 01172 return(node); 01173 }
Here is the call graph for this function:

Here is the caller graph for this function:

| while_node_t* pars_while_statement | ( | que_node_t * | cond, | |
| que_node_t * | stat_list | |||
| ) |
Definition at line 1299 of file pars0pars.c.
References while_node_struct::common, while_node_struct::cond, sym_tab_struct::heap, mem_heap_alloc(), NULL, pars_resolve_exp_variables_and_types(), pars_set_parent_in_list(), pars_sym_tab_global, QUE_NODE_WHILE, while_node_struct::stat_list, and que_common_struct::type.
Referenced by yyparse().
01301 : while-statement node */ 01302 que_node_t* cond, /* in: while-condition */ 01303 que_node_t* stat_list) /* in: statement list */ 01304 { 01305 while_node_t* node; 01306 01307 node = mem_heap_alloc(pars_sym_tab_global->heap, sizeof(while_node_t)); 01308 01309 node->common.type = QUE_NODE_WHILE; 01310 01311 node->cond = cond; 01312 01313 pars_resolve_exp_variables_and_types(NULL, cond); 01314 01315 node->stat_list = stat_list; 01316 01317 pars_set_parent_in_list(stat_list, node); 01318 01319 return(node); 01320 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void yyerror | ( | const char * | s | ) |
| int yyparse | ( | void | ) |
Definition at line 1371 of file pars0grm.c.
References FALSE, NULL, PARS_AND_TOKEN, pars_asc_token, pars_assert_token, pars_assignment_statement(), pars_binary_to_number_token, pars_binary_token, pars_blob_token, pars_char_token, pars_clustered_token, pars_column_assignment(), pars_column_def(), pars_commit_statement(), pars_concat_token, pars_count_token, pars_create_index(), pars_create_table(), pars_cursor_declaration(), pars_desc_token, pars_distinct_token, pars_elsif_element(), pars_exit_statement(), pars_fetch_statement(), pars_for_statement(), pars_func(), pars_function_declaration(), PARS_GE_TOKEN, pars_if_statement(), PARS_INPUT, pars_insert_statement(), pars_instr_token, pars_int_token, PARS_LE_TOKEN, pars_length_token, PARS_NE_TOKEN, PARS_NOT_TOKEN, PARS_NOTFOUND_TOKEN, pars_op(), pars_open_statement(), PARS_OR_TOKEN, pars_order_by(), PARS_OUTPUT, pars_parameter_declaration(), pars_printf_token, pars_procedure_call(), pars_procedure_definition(), pars_replstr_token, pars_return_statement(), pars_rnd_str_token, pars_rnd_token, pars_rollback_statement(), pars_row_printf_statement(), pars_select_list(), pars_select_statement(), pars_share_token, pars_star_denoter, pars_stored_procedure_call(), pars_substr_token, pars_sum_token, pars_sym_tab_global, pars_sysdate_token, pars_to_binary_token, pars_to_char_token, pars_to_number_token, pars_unique_token, pars_update_statement(), pars_update_statement_start(), pars_update_token, pars_variable_declaration(), pars_while_statement(), que_node_list_add_last(), ROW_SEL_CLOSE_CURSOR, ROW_SEL_OPEN_CURSOR, sym_tab_add_int_lit(), TRUE, YY_REDUCE_PRINT, YY_STACK_PRINT, YYABORT, YYACCEPT, yycheck, yydefact, yydefgoto, yydestruct(), YYDPRINTF, YYDSYMPRINTF, YYEMPTY, YYEOF, yyerror, YYFINAL, YYINITDEPTH, YYLAST, YYLEX, yylval, YYMAXDEPTH, YYNTOKENS, yyoverflow, yypact, YYPACT_NINF, yypgoto, YYPOPSTACK, yyr1, yyr2, YYSIZE_T, YYSTACK_ALLOC, YYSTACK_BYTES, YYSTACK_FREE, YYSTACK_RELOCATE, yystos, yytable, YYTABLE_NINF, YYTERROR, YYTRANSLATE, and yyalloc::yyvs.
01375 { 01376 01377 register int yystate; 01378 register int yyn; 01379 int yyresult; 01380 /* Number of tokens to shift before error messages enabled. */ 01381 int yyerrstatus; 01382 /* Lookahead token as an internal (translated) token number. */ 01383 int yytoken = 0; 01384 01385 /* Three stacks and their tools: 01386 `yyss': related to states, 01387 `yyvs': related to semantic values, 01388 `yyls': related to locations. 01389 01390 Refer to the stacks thru separate pointers, to allow yyoverflow 01391 to reallocate them elsewhere. */ 01392 01393 /* The state stack. */ 01394 short int yyssa[YYINITDEPTH]; 01395 short int *yyss = yyssa; 01396 register short int *yyssp; 01397 01398 /* The semantic value stack. */ 01399 YYSTYPE yyvsa[YYINITDEPTH]; 01400 YYSTYPE *yyvs = yyvsa; 01401 register YYSTYPE *yyvsp; 01402 01403 01404 01405 #define YYPOPSTACK (yyvsp--, yyssp--) 01406 01407 YYSIZE_T yystacksize = YYINITDEPTH; 01408 01409 /* The variables used to return semantic value and location from the 01410 action routines. */ 01411 YYSTYPE yyval; 01412 01413 01414 /* When reducing, the number of symbols on the RHS of the reduced 01415 rule. */ 01416 int yylen; 01417 01418 YYDPRINTF ((stderr, "Starting parse\n")); 01419 01420 yystate = 0; 01421 yyerrstatus = 0; 01422 yynerrs = 0; 01423 yychar = YYEMPTY; /* Cause a token to be read. */ 01424 01425 /* Initialize stack pointers. 01426 Waste one element of value and location stack 01427 so that they stay on the same level as the state stack. 01428 The wasted elements are never initialized. */ 01429 01430 yyssp = yyss; 01431 yyvsp = yyvs; 01432 01433 01434 goto yysetstate; 01435 01436 /*------------------------------------------------------------. 01437 | yynewstate -- Push a new state, which is found in yystate. | 01438 `------------------------------------------------------------*/ 01439 yynewstate: 01440 /* In all cases, when you get here, the value and location stacks 01441 have just been pushed. so pushing a state here evens the stacks. 01442 */ 01443 yyssp++; 01444 01445 yysetstate: 01446 *yyssp = yystate; 01447 01448 if (yyss + yystacksize - 1 <= yyssp) 01449 { 01450 /* Get the current used size of the three stacks, in elements. */ 01451 YYSIZE_T yysize = yyssp - yyss + 1; 01452 01453 #ifdef yyoverflow 01454 { 01455 /* Give user a chance to reallocate the stack. Use copies of 01456 these so that the &'s don't force the real ones into 01457 memory. */ 01458 YYSTYPE *yyvs1 = yyvs; 01459 short int *yyss1 = yyss; 01460 01461 01462 /* Each stack pointer address is followed by the size of the 01463 data in use in that stack, in bytes. This used to be a 01464 conditional around just the two extra args, but that might 01465 be undefined if yyoverflow is a macro. */ 01466 yyoverflow ("parser stack overflow", 01467 &yyss1, yysize * sizeof (*yyssp), 01468 &yyvs1, yysize * sizeof (*yyvsp), 01469 01470 &yystacksize); 01471 01472 yyss = yyss1; 01473 yyvs = yyvs1; 01474 } 01475 #else /* no yyoverflow */ 01476 # ifndef YYSTACK_RELOCATE 01477 goto yyoverflowlab; 01478 # else 01479 /* Extend the stack our own way. */ 01480 if (YYMAXDEPTH <= yystacksize) 01481 goto yyoverflowlab; 01482 yystacksize *= 2; 01483 if (YYMAXDEPTH < yystacksize) 01484 yystacksize = YYMAXDEPTH; 01485 01486 { 01487 short int *yyss1 = yyss; 01488 union yyalloc *yyptr = 01489 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); 01490 if (! yyptr) 01491 goto yyoverflowlab; 01492 YYSTACK_RELOCATE (yyss); 01493 YYSTACK_RELOCATE (yyvs); 01494 01495 # undef YYSTACK_RELOCATE 01496 if (yyss1 != yyssa) 01497 YYSTACK_FREE (yyss1); 01498 } 01499 # endif 01500 #endif /* no yyoverflow */ 01501 01502 yyssp = yyss + yysize - 1; 01503 yyvsp = yyvs + yysize - 1; 01504 01505 01506 YYDPRINTF ((stderr, "Stack size increased to %lu\n", 01507 (unsigned long int) yystacksize)); 01508 01509 if (yyss + yystacksize - 1 <= yyssp) 01510 YYABORT; 01511 } 01512 01513 YYDPRINTF ((stderr, "Entering state %d\n", yystate)); 01514 01515 goto yybackup; 01516 01517 /*-----------. 01518 | yybackup. | 01519 `-----------*/ 01520 yybackup: 01521 01522 /* Do appropriate processing given the current state. */ 01523 /* Read a lookahead token if we need one and don't already have one. */ 01524 /* yyresume: */ 01525 01526 /* First try to decide what to do without reference to lookahead token. */ 01527 01528 yyn = yypact[yystate]; 01529 if (yyn == YYPACT_NINF) 01530 goto yydefault; 01531 01532 /* Not known => get a lookahead token if don't already have one. */ 01533 01534 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ 01535 if (yychar == YYEMPTY) 01536 { 01537 YYDPRINTF ((stderr, "Reading a token: ")); 01538 yychar = YYLEX; 01539 } 01540 01541 if (yychar <= YYEOF) 01542 { 01543 yychar = yytoken = YYEOF; 01544 YYDPRINTF ((stderr, "Now at end of input.\n")); 01545 } 01546 else 01547 { 01548 yytoken = YYTRANSLATE (yychar); 01549 YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc); 01550 } 01551 01552 /* If the proper action on seeing token YYTOKEN is to reduce or to 01553 detect an error, take that action. */ 01554 yyn += yytoken; 01555 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) 01556 goto yydefault; 01557 yyn = yytable[yyn]; 01558 if (yyn <= 0) 01559 { 01560 if (yyn == 0 || yyn == YYTABLE_NINF) 01561 goto yyerrlab; 01562 yyn = -yyn; 01563 goto yyreduce; 01564 } 01565 01566 if (yyn == YYFINAL) 01567 YYACCEPT; 01568 01569 /* Shift the lookahead token. */ 01570 YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken])); 01571 01572 /* Discard the token being shifted unless it is eof. */ 01573 if (yychar != YYEOF) 01574 yychar = YYEMPTY; 01575 01576 *++yyvsp = yylval; 01577 01578 01579 /* Count tokens shifted since error; after three, turn off error 01580 status. */ 01581 if (yyerrstatus) 01582 yyerrstatus--; 01583 01584 yystate = yyn; 01585 goto yynewstate; 01586 01587 01588 /*-----------------------------------------------------------. 01589 | yydefault -- do the default action for the current state. | 01590 `-----------------------------------------------------------*/ 01591 yydefault: 01592 yyn = yydefact[yystate]; 01593 if (yyn == 0) 01594 goto yyerrlab; 01595 goto yyreduce; 01596 01597 01598 /*-----------------------------. 01599 | yyreduce -- Do a reduction. | 01600 `-----------------------------*/ 01601 yyreduce: 01602 /* yyn is the number of a rule to reduce with. */ 01603 yylen = yyr2[yyn]; 01604 01605 /* If YYLEN is nonzero, implement the default value of the action: 01606 `$$ = $1'. 01607 01608 Otherwise, the following line sets YYVAL to garbage. 01609 This behavior is undocumented and Bison 01610 users should not rely upon it. Assigning to YYVAL 01611 unconditionally makes the parser a bit smaller, and it avoids a 01612 GCC warning that YYVAL may be used uninitialized. */ 01613 yyval = yyvsp[1-yylen]; 01614 01615 01616 YY_REDUCE_PRINT (yyn); 01617 switch (yyn) 01618 { 01619 case 25: 01620 #line 166 "pars0grm.y" 01621 { yyval = que_node_list_add_last(NULL, yyvsp[0]); ;} 01622 break; 01623 01624 case 26: 01625 #line 168 "pars0grm.y" 01626 { yyval = que_node_list_add_last(yyvsp[-1], yyvsp[0]); ;} 01627 break; 01628 01629 case 27: 01630 #line 172 "pars0grm.y" 01631 { yyval = yyvsp[0];;} 01632 break; 01633 01634 case 28: 01635 #line 174 "pars0grm.y" 01636 { yyval = pars_func(yyvsp[-3], yyvsp[-1]); ;} 01637 break; 01638 01639 case 29: 01640 #line 175 "pars0grm.y" 01641 { yyval = yyvsp[0];;} 01642 break; 01643 01644 case 30: 01645 #line 176 "pars0grm.y" 01646 { yyval = yyvsp[0];;} 01647 break; 01648 01649 case 31: 01650 #line 177 "pars0grm.y" 01651 { yyval = yyvsp[0];;} 01652 break; 01653 01654 case 32: 01655 #line 178 "pars0grm.y" 01656 { yyval = yyvsp[0];;} 01657 break; 01658 01659 case 33: 01660 #line 179 "pars0grm.y" 01661 { yyval = yyvsp[0];;} 01662 break; 01663 01664 case 34: 01665 #line 180 "pars0grm.y" 01666 { yyval = yyvsp[0];;} 01667 break; 01668 01669 case 35: 01670 #line 181 "pars0grm.y" 01671 { yyval = yyvsp[0];;} 01672 break; 01673 01674 case 36: 01675 #line 182 "pars0grm.y" 01676 { yyval = pars_op('+', yyvsp[-2], yyvsp[0]); ;} 01677 break; 01678 01679 case 37: 01680 #line 183 "pars0grm.y" 01681 { yyval = pars_op('-', yyvsp[-2], yyvsp[0]); ;} 01682 break; 01683 01684 case 38: 01685 #line 184 "pars0grm.y" 01686 { yyval = pars_op('*', yyvsp[-2], yyvsp[0]); ;} 01687 break; 01688 01689 case 39: 01690 #line 185 "pars0grm.y" 01691 { yyval = pars_op('/', yyvsp[-2], yyvsp[0]); ;} 01692 break; 01693 01694 case 40: 01695 #line 186 "pars0grm.y" 01696 { yyval = pars_op('-', yyvsp[0], NULL); ;} 01697 break; 01698 01699 case 41: 01700 #line 187 "pars0grm.y" 01701 { yyval = yyvsp[-1]; ;} 01702 break; 01703 01704 case 42: 01705 #line 188 "pars0grm.y" 01706 { yyval = pars_op('=', yyvsp[-2], yyvsp[0]); ;} 01707 break; 01708 01709 case 43: 01710 #line 189 "pars0grm.y" 01711 { yyval = pars_op('<', yyvsp[-2], yyvsp[0]); ;} 01712 break; 01713 01714 case 44: 01715 #line 190 "pars0grm.y" 01716 { yyval = pars_op('>', yyvsp[-2], yyvsp[0]); ;} 01717 break; 01718 01719 case 45: 01720 #line 191 "pars0grm.y" 01721 { yyval = pars_op(PARS_GE_TOKEN, yyvsp[-2], yyvsp[0]); ;} 01722 break; 01723 01724 case 46: 01725 #line 192 "pars0grm.y" 01726 { yyval = pars_op(PARS_LE_TOKEN, yyvsp[-2], yyvsp[0]); ;} 01727 break; 01728 01729 case 47: 01730 #line 193 "pars0grm.y" 01731 { yyval = pars_op(PARS_NE_TOKEN, yyvsp[-2], yyvsp[0]); ;} 01732 break; 01733 01734 case 48: 01735 #line 194 "pars0grm.y" 01736 { yyval = pars_op(PARS_AND_TOKEN, yyvsp[-2], yyvsp[0]); ;} 01737 break; 01738 01739 case 49: 01740 #line 195 "pars0grm.y" 01741 { yyval = pars_op(PARS_OR_TOKEN, yyvsp[-2], yyvsp[0]); ;} 01742 break; 01743 01744 case 50: 01745 #line 196 "pars0grm.y" 01746 { yyval = pars_op(PARS_NOT_TOKEN, yyvsp[0], NULL); ;} 01747 break; 01748 01749 case 51: 01750 #line 198 "pars0grm.y" 01751 { yyval = pars_op(PARS_NOTFOUND_TOKEN, yyvsp[-2], NULL); ;} 01752 break; 01753 01754 case 52: 01755 #line 200 "pars0grm.y" 01756 { yyval = pars_op(PARS_NOTFOUND_TOKEN, yyvsp[-2], NULL); ;} 01757 break; 01758 01759 case 53: 01760 #line 204 "pars0grm.y" 01761 { yyval = &pars_to_char_token; ;} 01762 break; 01763 01764 case 54: 01765 #line 205 "pars0grm.y" 01766 { yyval = &pars_to_number_token; ;} 01767 break; 01768 01769 case 55: 01770 #line 206 "pars0grm.y" 01771 { yyval = &pars_to_binary_token; ;} 01772 break; 01773 01774 case 56: 01775 #line 208 "pars0grm.y" 01776 { yyval = &pars_binary_to_number_token; ;} 01777 break; 01778 01779 case 57: 01780 #line 209 "pars0grm.y" 01781 { yyval = &pars_substr_token; ;} 01782 break; 01783 01784 case 58: 01785 #line 210 "pars0grm.y" 01786 { yyval = &pars_concat_token; ;} 01787 break; 01788 01789 case 59: 01790 #line 211 "pars0grm.y" 01791 { yyval = &pars_instr_token; ;} 01792 break; 01793 01794 case 60: 01795 #line 212 "pars0grm.y" 01796 { yyval = &pars_length_token; ;} 01797 break; 01798 01799 case 61: 01800 #line 213 "pars0grm.y" 01801 { yyval = &pars_sysdate_token; ;} 01802 break; 01803 01804 case 62: 01805 #line 214 "pars0grm.y" 01806 { yyval = &pars_rnd_token; ;} 01807 break; 01808 01809 case 63: 01810 #line 215 "pars0grm.y" 01811 { yyval = &pars_rnd_str_token; ;} 01812 break; 01813 01814 case 67: 01815 #line 226 "pars0grm.y" 01816 { yyval = pars_stored_procedure_call(yyvsp[-4]); ;} 01817 break; 01818 01819 case 68: 01820 #line 231 "pars0grm.y" 01821 { yyval = pars_procedure_call(yyvsp[-3], yyvsp[-1]); ;} 01822 break; 01823 01824 case 69: 01825 #line 235 "pars0grm.y" 01826 { yyval = &pars_replstr_token; ;} 01827 break; 01828 01829 case 70: 01830 #line 236 "pars0grm.y" 01831 { yyval = &pars_printf_token; ;} 01832 break; 01833 01834 case 71: 01835 #line 237 "pars0grm.y" 01836 { yyval = &pars_assert_token; ;} 01837 break; 01838 01839 case 72: 01840 #line 241 "pars0grm.y" 01841 { yyval = yyvsp[-2]; ;} 01842 break; 01843 01844 case 73: 01845 #line 245 "pars0grm.y" 01846 { yyval = que_node_list_add_last(NULL, yyvsp[0]); ;} 01847 break; 01848 01849 case 74: 01850 #line 247 "pars0grm.y" 01851 { yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); ;} 01852 break; 01853 01854 case 75: 01855 #line 251 "pars0grm.y" 01856 { yyval = NULL; ;} 01857 break; 01858 01859 case 76: 01860 #line 252 "pars0grm.y" 01861 { yyval = que_node_list_add_last(NULL, yyvsp[0]); ;} 01862 break; 01863 01864 case 77: 01865 #line 254 "pars0grm.y" 01866 { yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); ;} 01867 break; 01868 01869 case 78: 01870 #line 258 "pars0grm.y" 01871 { yyval = NULL; ;} 01872 break; 01873 01874 case 79: 01875 #line 259 "pars0grm.y" 01876 { yyval = que_node_list_add_last(NULL, yyvsp[0]);;} 01877 break; 01878 01879 case 80: 01880 #line 260 "pars0grm.y" 01881 { yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); ;} 01882 break; 01883 01884 case 81: 01885 #line 264 "pars0grm.y" 01886 { yyval = yyvsp[0]; ;} 01887 break; 01888 01889 case 82: 01890 #line 266 "pars0grm.y" 01891 { yyval = pars_func(&pars_count_token, 01892 que_node_list_add_last(NULL, 01893 sym_tab_add_int_lit( 01894 pars_sym_tab_global, 1))); ;} 01895 break; 01896 01897 case 83: 01898 #line 271 "pars0grm.y" 01899 { yyval = pars_func(&pars_count_token, 01900 que_node_list_add_last(NULL, 01901 pars_func(&pars_distinct_token, 01902 que_node_list_add_last( 01903 NULL, yyvsp[-1])))); ;} 01904 break; 01905 01906 case 84: 01907 #line 277 "pars0grm.y" 01908 { yyval = pars_func(&pars_sum_token, 01909 que_node_list_add_last(NULL, 01910 yyvsp[-1])); ;} 01911 break; 01912 01913 case 85: 01914 #line 283 "pars0grm.y" 01915 { yyval = NULL; ;} 01916 break; 01917 01918 case 86: 01919 #line 284 "pars0grm.y" 01920 { yyval = que_node_list_add_last(NULL, yyvsp[0]); ;} 01921 break; 01922 01923 case 87: 01924 #line 286 "pars0grm.y" 01925 { yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); ;} 01926 break; 01927 01928 case 88: 01929 #line 290 "pars0grm.y" 01930 { yyval = pars_select_list(&pars_star_denoter, 01931 NULL); ;} 01932 break; 01933 01934 case 89: 01935 #line 293 "pars0grm.y" 01936 { yyval = pars_select_list(yyvsp[-2], yyvsp[0]); ;} 01937 break; 01938 01939 case 90: 01940 #line 294 "pars0grm.y" 01941 { yyval = pars_select_list(yyvsp[0], NULL); ;} 01942 break; 01943 01944 case 91: 01945 #line 298 "pars0grm.y" 01946 { yyval = NULL; ;} 01947 break; 01948 01949 case 92: 01950 #line 299 "pars0grm.y" 01951 { yyval = yyvsp[0]; ;} 01952 break; 01953 01954 case 93: 01955 #line 303 "pars0grm.y" 01956 { yyval = NULL; ;} 01957 break; 01958 01959 case 94: 01960 #line 305 "pars0grm.y" 01961 { yyval = &pars_update_token; ;} 01962 break; 01963 01964 case 95: 01965 #line 309 "pars0grm.y" 01966 { yyval = NULL; ;} 01967 break; 01968 01969 case 96: 01970 #line 311 "pars0grm.y" 01971 { yyval = &pars_share_token; ;} 01972 break; 01973 01974 case 97: 01975 #line 315 "pars0grm.y" 01976 { yyval = &pars_asc_token; ;} 01977 break; 01978 01979 case 98: 01980 #line 316 "pars0grm.y" 01981 { yyval = &pars_asc_token; ;} 01982 break; 01983 01984 case 99: 01985 #line 317 "pars0grm.y" 01986 { yyval = &pars_desc_token; ;} 01987 break; 01988 01989 case 100: 01990 #line 321 "pars0grm.y" 01991 { yyval = NULL; ;} 01992 break; 01993 01994 case 101: 01995 #line 323 "pars0grm.y" 01996 { yyval = pars_order_by(yyvsp[-1], yyvsp[0]); ;} 01997 break; 01998 01999 case 102: 02000 #line 332 "pars0grm.y" 02001 { yyval = pars_select_statement(yyvsp[-6], yyvsp[-4], yyvsp[-3], 02002 yyvsp[-2], yyvsp[-1], yyvsp[0]); ;} 02003 break; 02004 02005 case 103: 02006 #line 338 "pars0grm.y" 02007 { yyval = yyvsp[0]; ;} 02008 break; 02009 02010 case 104: 02011 #line 343 "pars0grm.y" 02012 { yyval = pars_insert_statement(yyvsp[-4], yyvsp[-1], NULL); ;} 02013 break; 02014 02015 case 105: 02016 #line 345 "pars0grm.y" 02017 { yyval = pars_insert_statement(yyvsp[-1], NULL, yyvsp[0]); ;} 02018 break; 02019 02020 case 106: 02021 #line 349 "pars0grm.y" 02022 { yyval = pars_column_assignment(yyvsp[-2], yyvsp[0]); ;} 02023 break; 02024 02025 case 107: 02026 #line 353 "pars0grm.y" 02027 { yyval = que_node_list_add_last(NULL, yyvsp[0]); ;} 02028 break; 02029 02030 case 108: 02031 #line 355 "pars0grm.y" 02032 { yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); ;} 02033 break; 02034 02035 case 109: 02036 #line 361 "pars0grm.y" 02037 { yyval = yyvsp[0]; ;} 02038 break; 02039 02040 case 110: 02041 #line 367 "pars0grm.y" 02042 { yyval = pars_update_statement_start(FALSE, 02043 yyvsp[-2], yyvsp[0]); ;} 02044 break; 02045 02046 case 111: 02047 #line 373 "pars0grm.y" 02048 { yyval = pars_update_statement(yyvsp[-1], NULL, yyvsp[0]); ;} 02049 break; 02050 02051 case 112: 02052 #line 378 "pars0grm.y" 02053 { yyval = pars_update_statement(yyvsp[-1], yyvsp[0], NULL); ;} 02054 break; 02055 02056 case 113: 02057 #line 383 "pars0grm.y" 02058 { yyval = pars_update_statement_start(TRUE, 02059 yyvsp[0], NULL); ;} 02060 break; 02061 02062 case 114: 02063 #line 389 "pars0grm.y" 02064 { yyval = pars_update_statement(yyvsp[-1], NULL, yyvsp[0]); ;} 02065 break; 02066 02067 case 115: 02068 #line 394 "pars0grm.y" 02069 { yyval = pars_update_statement(yyvsp[-1], yyvsp[0], NULL); ;} 02070 break; 02071 02072 case 116: 02073 #line 399 "pars0grm.y" 02074 { yyval = pars_row_printf_statement(yyvsp[0]); ;} 02075 break; 02076 02077 case 117: 02078 #line 404 "pars0grm.y" 02079 { yyval = pars_assignment_statement(yyvsp[-2], yyvsp[0]); ;} 02080 break; 02081 02082 case 118: 02083 #line 410 "pars0grm.y" 02084 { yyval = pars_elsif_element(yyvsp[-2], yyvsp[0]); ;} 02085 break; 02086 02087 case 119: 02088 #line 414 "pars0grm.y" 02089 { yyval = que_node_list_add_last(NULL, yyvsp[0]); ;} 02090 break; 02091 02092 case 120: 02093 #line 416 "pars0grm.y" 02094 { yyval = que_node_list_add_last(yyvsp[-1], yyvsp[0]); ;} 02095 break; 02096 02097 case 121: 02098 #line 420 "pars0grm.y" 02099 { yyval = NULL; ;} 02100 break; 02101 02102 case 122: 02103 #line 422 "pars0grm.y" 02104 { yyval = yyvsp[0]; ;} 02105 break; 02106 02107 case 123: 02108 #line 423 "pars0grm.y" 02109 { yyval = yyvsp[0]; ;} 02110 break; 02111 02112 case 124: 02113 #line 430 "pars0grm.y" 02114 { yyval = pars_if_statement(yyvsp[-5], yyvsp[-3], yyvsp[-2]); ;} 02115 break; 02116 02117 case 125: 02118 #line 436 "pars0grm.y" 02119 { yyval = pars_while_statement(yyvsp[-4], yyvsp[-2]); ;} 02120 break; 02121 02122 case 126: 02123 #line 444 "pars0grm.y" 02124 { yyval = pars_for_statement(yyvsp[-8], yyvsp[-6], yyvsp[-4], yyvsp[-2]); ;} 02125 break; 02126 02127 case 127: 02128 #line 448 "pars0grm.y" 02129 { yyval = pars_exit_statement(); ;} 02130 break; 02131 02132 case 128: 02133 #line 452 "pars0grm.y" 02134 { yyval = pars_return_statement(); ;} 02135 break; 02136 02137 case 129: 02138 #line 457 "pars0grm.y" 02139 { yyval = pars_open_statement( 02140 ROW_SEL_OPEN_CURSOR, yyvsp[0]); ;} 02141 break; 02142 02143 case 130: 02144 #line 463 "pars0grm.y" 02145 { yyval = pars_open_statement( 02146 ROW_SEL_CLOSE_CURSOR, yyvsp[0]); ;} 02147 break; 02148 02149 case 131: 02150 #line 469 "pars0grm.y" 02151 { yyval = pars_fetch_statement(yyvsp[-2], yyvsp[0], NULL); ;} 02152 break; 02153 02154 case 132: 02155 #line 471 "pars0grm.y" 02156 { yyval = pars_fetch_statement(yyvsp[-2], NULL, yyvsp[0]); ;} 02157 break; 02158 02159 case 133: 02160 #line 476 "pars0grm.y" 02161 { yyval = pars_column_def(yyvsp[-4], yyvsp[-3], yyvsp[-2], yyvsp[-1], yyvsp[0]); ;} 02162 break; 02163 02164 case 134: 02165 #line 480 "pars0grm.y" 02166 { yyval = que_node_list_add_last(NULL, yyvsp[0]); ;} 02167 break; 02168 02169 case 135: 02170 #line 482 "pars0grm.y" 02171 { yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); ;} 02172 break; 02173 02174 case 136: 02175 #line 486 "pars0grm.y" 02176 { yyval = NULL; ;} 02177 break; 02178 02179 case 137: 02180 #line 488 "pars0grm.y" 02181 { yyval = yyvsp[-1]; ;} 02182 break; 02183 02184 case 138: 02185 #line 492 "pars0grm.y" 02186 { yyval = NULL; ;} 02187 break; 02188 02189 case 139: 02190 #line 494 "pars0grm.y" 02191 { yyval = &pars_int_token; 02192 /* pass any non-NULL pointer */ ;} 02193 break; 02194 02195 case 140: 02196 #line 499 "pars0grm.y" 02197 { yyval = NULL; ;} 02198 break; 02199 02200 case 141: 02201 #line 501 "pars0grm.y" 02202 { yyval = &pars_int_token; 02203 /* pass any non-NULL pointer */ ;} 02204 break; 02205 02206 case 142: 02207 #line 506 "pars0grm.y" 02208 { yyval = NULL; ;} 02209 break; 02210 02211 case 143: 02212 #line 508 "pars0grm.y" 02213 { yyval = &pars_int_token; 02214 /* pass any non-NULL pointer */ ;} 02215 break; 02216 02217 case 144: 02218 #line 515 "pars0grm.y" 02219 { yyval = pars_create_table(yyvsp[-4], yyvsp[-2], yyvsp[0]); ;} 02220 break; 02221 02222 case 145: 02223 #line 519 "pars0grm.y" 02224 { yyval = que_node_list_add_last(NULL, yyvsp[0]); ;} 02225 break; 02226 02227 case 146: 02228 #line 521 "pars0grm.y" 02229 { yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); ;} 02230 break; 02231 02232 case 147: 02233 #line 525 "pars0grm.y" 02234 { yyval = NULL; ;} 02235 break; 02236 02237 case 148: 02238 #line 526 "pars0grm.y" 02239 { yyval = &pars_unique_token; ;} 02240 break; 02241 02242 case 149: 02243 #line 530 "pars0grm.y" 02244 { yyval = NULL; ;} 02245 break; 02246 02247 case 150: 02248 #line 531 "pars0grm.y" 02249 { yyval = &pars_clustered_token; ;} 02250 break; 02251 02252 case 151: 02253 #line 539 "pars0grm.y" 02254 { yyval = pars_create_index(yyvsp[-8], yyvsp[-7], yyvsp[-5], yyvsp[-3], yyvsp[-1]); ;} 02255 break; 02256 02257 case 152: 02258 #line 544 "pars0grm.y" 02259 { yyval = pars_commit_statement(); ;} 02260 break; 02261 02262 case 153: 02263 #line 549 "pars0grm.y" 02264 { yyval = pars_rollback_statement(); ;} 02265 break; 02266 02267 case 154: 02268 #line 553 "pars0grm.y" 02269 { yyval = &pars_int_token; ;} 02270 break; 02271 02272 case 155: 02273 #line 554 "pars0grm.y" 02274 { yyval = &pars_int_token; ;} 02275 break; 02276 02277 case 156: 02278 #line 555 "pars0grm.y" 02279 { yyval = &pars_char_token; ;} 02280 break; 02281 02282 case 157: 02283 #line 556 "pars0grm.y" 02284 { yyval = &pars_binary_token; ;} 02285 break; 02286 02287 case 158: 02288 #line 557 "pars0grm.y" 02289 { yyval = &pars_blob_token; ;} 02290 break; 02291 02292 case 159: 02293 #line 562 "pars0grm.y" 02294 { yyval = pars_parameter_declaration(yyvsp[-2], 02295 PARS_INPUT, yyvsp[0]); ;} 02296 break; 02297 02298 case 160: 02299 #line 565 "pars0grm.y" 02300 { yyval = pars_parameter_declaration(yyvsp[-2], 02301 PARS_OUTPUT, yyvsp[0]); ;} 02302 break; 02303 02304 case 161: 02305 #line 570 "pars0grm.y" 02306 { yyval = NULL; ;} 02307 break; 02308 02309 case 162: 02310 #line 571 "pars0grm.y" 02311 { yyval = que_node_list_add_last(NULL, yyvsp[0]); ;} 02312 break; 02313 02314 case 163: 02315 #line 573 "pars0grm.y" 02316 { yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); ;} 02317 break; 02318 02319 case 164: 02320 #line 578 "pars0grm.y" 02321 { yyval = pars_variable_declaration(yyvsp[-2], yyvsp[-1]); ;} 02322 break; 02323 02324 case 168: 02325 #line 590 "pars0grm.y" 02326 { yyval = pars_cursor_declaration(yyvsp[-3], yyvsp[-1]); ;} 02327 break; 02328 02329 case 169: 02330 #line 595 "pars0grm.y" 02331 { yyval = pars_function_declaration(yyvsp[-1]); ;} 02332 break; 02333 02334 case 175: 02335 #line 616 "pars0grm.y" 02336 { yyval = pars_procedure_definition(yyvsp[-9], yyvsp[-7], 02337 yyvsp[-1]); ;} 02338 break; 02339 02340 02341 } 02342 02343 /* Line 1010 of yacc.c. */ 02344 #line 2345 "pars0grm.tab.c" 02345 02346 yyvsp -= yylen; 02347 yyssp -= yylen; 02348 02349 02350 YY_STACK_PRINT (yyss, yyssp); 02351 02352 *++yyvsp = yyval; 02353 02354 02355 /* Now `shift' the result of the reduction. Determine what state 02356 that goes to, based on the state we popped back to and the rule 02357 number reduced by. */ 02358 02359 yyn = yyr1[yyn]; 02360 02361 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; 02362 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) 02363 yystate = yytable[yystate]; 02364 else 02365 yystate = yydefgoto[yyn - YYNTOKENS]; 02366 02367 goto yynewstate; 02368 02369 02370 /*------------------------------------. 02371 | yyerrlab -- here on detecting error | 02372 `------------------------------------*/ 02373 yyerrlab: 02374 /* If not already recovering from an error, report this error. */ 02375 if (!yyerrstatus) 02376 { 02377 ++yynerrs; 02378 #if YYERROR_VERBOSE 02379 yyn = yypact[yystate]; 02380 02381 if (YYPACT_NINF < yyn && yyn < YYLAST) 02382 { 02383 YYSIZE_T yysize = 0; 02384 int yytype = YYTRANSLATE (yychar); 02385 const char* yyprefix; 02386 char *yymsg; 02387 int yyx; 02388 02389 /* Start YYX at -YYN if negative to avoid negative indexes in 02390 YYCHECK. */ 02391 int yyxbegin = yyn < 0 ? -yyn : 0; 02392 02393 /* Stay within bounds of both yycheck and yytname. */ 02394 int yychecklim = YYLAST - yyn; 02395 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; 02396 int yycount = 0; 02397 02398 yyprefix = ", expecting "; 02399 for (yyx = yyxbegin; yyx < yyxend; ++yyx) 02400 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) 02401 { 02402 yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]); 02403 yycount += 1; 02404 if (yycount == 5) 02405 { 02406 yysize = 0; 02407 break; 02408 } 02409 } 02410 yysize += (sizeof ("syntax error, unexpected ") 02411 + yystrlen (yytname[yytype])); 02412 yymsg = (char *) YYSTACK_ALLOC (yysize); 02413 if (yymsg != 0) 02414 { 02415 char *yyp = yystpcpy (yymsg, "syntax error, unexpected "); 02416 yyp = yystpcpy (yyp, yytname[yytype]); 02417 02418 if (yycount < 5) 02419 { 02420 yyprefix = ", expecting "; 02421 for (yyx = yyxbegin; yyx < yyxend; ++yyx) 02422 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) 02423 { 02424 yyp = yystpcpy (yyp, yyprefix); 02425 yyp = yystpcpy (yyp, yytname[yyx]); 02426 yyprefix = " or "; 02427 } 02428 } 02429 yyerror (yymsg); 02430 YYSTACK_FREE (yymsg); 02431 } 02432 else 02433 yyerror ("syntax error; also virtual memory exhausted"); 02434 } 02435 else 02436 #endif /* YYERROR_VERBOSE */ 02437 yyerror ("syntax error"); 02438 } 02439 02440 02441 02442 if (yyerrstatus == 3) 02443 { 02444 /* If just tried and failed to reuse lookahead token after an 02445 error, discard it. */ 02446 02447 if (yychar <= YYEOF) 02448 { 02449 /* If at end of input, pop the error token, 02450 then the rest of the stack, then return failure. */ 02451 if (yychar == YYEOF) 02452 for (;;) 02453 { 02454 YYPOPSTACK; 02455 if (yyssp == yyss) 02456 YYABORT; 02457 YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); 02458 yydestruct (yystos[*yyssp], yyvsp); 02459 } 02460 } 02461 else 02462 { 02463 YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc); 02464 yydestruct (yytoken, &yylval); 02465 yychar = YYEMPTY; 02466 02467 } 02468 } 02469 02470 /* Else will try to reuse lookahead token after shifting the error 02471 token. */ 02472 goto yyerrlab1; 02473 02474 02475 /*---------------------------------------------------. 02476 | yyerrorlab -- error raised explicitly by YYERROR. | 02477 `---------------------------------------------------*/ 02478 yyerrorlab: 02479 02480 #ifdef __GNUC__ 02481 /* Pacify GCC when the user code never invokes YYERROR and the label 02482 yyerrorlab therefore never appears in user code. */ 02483 if (0) 02484 goto yyerrorlab; 02485 #endif 02486 02487 yyvsp -= yylen; 02488 yyssp -= yylen; 02489 yystate = *yyssp; 02490 goto yyerrlab1; 02491 02492 02493 /*-------------------------------------------------------------. 02494 | yyerrlab1 -- common code for both syntax error and YYERROR. | 02495 `-------------------------------------------------------------*/ 02496 yyerrlab1: 02497 yyerrstatus = 3; /* Each real token shifted decrements this. */ 02498 02499 for (;;) 02500 { 02501 yyn = yypact[yystate]; 02502 if (yyn != YYPACT_NINF) 02503 { 02504 yyn += YYTERROR; 02505 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) 02506 { 02507 yyn = yytable[yyn]; 02508 if (0 < yyn) 02509 break; 02510 } 02511 } 02512 02513 /* Pop the current state because it cannot handle the error token. */ 02514 if (yyssp == yyss) 02515 YYABORT; 02516 02517 YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); 02518 yydestruct (yystos[yystate], yyvsp); 02519 YYPOPSTACK; 02520 yystate = *yyssp; 02521 YY_STACK_PRINT (yyss, yyssp); 02522 } 02523 02524 if (yyn == YYFINAL) 02525 YYACCEPT; 02526 02527 YYDPRINTF ((stderr, "Shifting error token, ")); 02528 02529 *++yyvsp = yylval; 02530 02531 02532 yystate = yyn; 02533 goto yynewstate; 02534 02535 02536 /*-------------------------------------. 02537 | yyacceptlab -- YYACCEPT comes here. | 02538 `-------------------------------------*/ 02539 yyacceptlab: 02540 yyresult = 0; 02541 goto yyreturn; 02542 02543 /*-----------------------------------. 02544 | yyabortlab -- YYABORT comes here. | 02545 `-----------------------------------*/ 02546 yyabortlab: 02547 yyresult = 1; 02548 goto yyreturn; 02549 02550 #ifndef yyoverflow 02551 /*----------------------------------------------. 02552 | yyoverflowlab -- parser overflow comes here. | 02553 `----------------------------------------------*/ 02554 yyoverflowlab: 02555 yyerror ("parser stack overflow"); 02556 yyresult = 2; 02557 /* Fall through. */ 02558 #endif 02559 02560 yyreturn: 02561 #ifndef yyoverflow 02562 if (yyss != yyssa) 02563 YYSTACK_FREE (yyss); 02564 #endif 02565 return yyresult; 02566 }
Here is the call graph for this function:

Definition at line 74 of file pars0pars.c.
Definition at line 69 of file pars0pars.c.
Definition at line 73 of file pars0pars.c.
Definition at line 43 of file pars0pars.c.
Referenced by opt_clust_access(), opt_search_plan(), opt_search_plan_for_table(), pars_assignment_statement(), pars_column_assignment(), pars_commit_statement(), pars_create_index(), pars_create_table(), pars_elsif_element(), pars_exit_statement(), pars_fetch_statement(), pars_for_statement(), pars_func_low(), pars_function_declaration(), pars_get_lex_chars(), pars_if_statement(), pars_insert_statement(), pars_open_statement(), pars_order_by(), pars_procedure_definition(), pars_process_assign_list(), pars_resolve_exp_variables_and_types(), pars_return_statement(), pars_rollback_statement(), pars_row_printf_statement(), pars_select_all_columns(), pars_select_list(), pars_sql(), pars_update_statement_start(), pars_while_statement(), and yyparse().
| int yydebug |
1.4.7

