374
374
virtual TableList* get_table_list();
375
375
virtual List<Item>* get_item_list();
376
376
virtual uint32_t get_table_join_options();
377
virtual TableList *add_table_to_list(Session *thd, Table_ident *table,
377
virtual TableList *add_table_to_list(Session *session, Table_ident *table,
378
378
LEX_STRING *alias,
379
379
uint32_t table_options,
380
380
thr_lock_type flags= TL_UNLOCK,
466
466
void exclude_tree();
468
468
/* UNION methods */
469
bool prepare(Session *thd, select_result *result, uint32_t additional_options);
469
bool prepare(Session *session, select_result *result, uint32_t additional_options);
472
472
inline void unclean() { cleaned= 0; }
475
475
void print(String *str, enum_query_type query_type);
477
bool add_fake_select_lex(Session *thd);
478
void init_prepare_fake_select_lex(Session *thd);
477
bool add_fake_select_lex(Session *session);
478
void init_prepare_fake_select_lex(Session *session);
479
479
bool change_result(select_result_interceptor *result,
480
480
select_result_interceptor *old_result);
481
481
void set_limit(st_select_lex *values);
482
void set_thd(Session *thd_arg) { thd= thd_arg; }
482
void set_session(Session *session_arg) { session= session_arg; }
483
483
inline bool is_union ();
485
friend void lex_start(Session *thd);
485
friend void lex_start(Session *session);
486
486
friend int subselect_union_engine::exec();
488
488
List<Item> *get_unit_column_types();
642
642
bool inc_in_sum_expr();
643
643
uint32_t get_in_sum_expr();
645
bool add_item_to_list(Session *thd, Item *item);
646
bool add_group_to_list(Session *thd, Item *item, bool asc);
647
bool add_order_to_list(Session *thd, Item *item, bool asc);
648
TableList* add_table_to_list(Session *thd, Table_ident *table,
645
bool add_item_to_list(Session *session, Item *item);
646
bool add_group_to_list(Session *session, Item *item, bool asc);
647
bool add_order_to_list(Session *session, Item *item, bool asc);
648
TableList* add_table_to_list(Session *session, Table_ident *table,
649
649
LEX_STRING *alias,
650
650
uint32_t table_options,
651
651
thr_lock_type flags= TL_UNLOCK,
652
652
List<Index_hint> *hints= 0,
653
653
LEX_STRING *option= 0);
654
654
TableList* get_table_list();
655
bool init_nested_join(Session *thd);
656
TableList *end_nested_join(Session *thd);
657
TableList *nest_last_join(Session *thd);
655
bool init_nested_join(Session *session);
656
TableList *end_nested_join(Session *session);
657
TableList *nest_last_join(Session *session);
658
658
void add_joined_table(TableList *table);
659
659
TableList *convert_right_join();
660
660
List<Item>* get_item_list();
675
675
void cut_subtree() { slave= 0; }
676
676
bool test_limit();
678
friend void lex_start(Session *thd);
678
friend void lex_start(Session *session);
679
679
st_select_lex() : n_sum_items(0), n_child_sum_items(0) {}
680
680
void make_empty_select()
685
bool setup_ref_array(Session *thd, uint32_t order_group_num);
686
void print(Session *thd, String *str, enum_query_type query_type);
685
bool setup_ref_array(Session *session, uint32_t order_group_num);
686
void print(Session *session, String *str, enum_query_type query_type);
687
687
static void print_order(String *str,
689
689
enum_query_type query_type);
690
void print_limit(Session *thd, String *str, enum_query_type query_type);
691
void fix_prepare_information(Session *thd, Item **conds, Item **having_conds);
690
void print_limit(Session *session, String *str, enum_query_type query_type);
691
void fix_prepare_information(Session *session, Item **conds, Item **having_conds);
693
693
Destroy the used execution plan (JOIN) of this subtree (this
694
694
SELECT_LEX and all nested SELECT_LEXes and SELECT_LEX_UNITs).
706
706
Add a index hint to the tagged list of hints. The type and clause of the
707
707
hint will be the current ones (set by set_index_hint())
709
bool add_index_hint (Session *thd, char *str, uint32_t length);
709
bool add_index_hint (Session *session, char *str, uint32_t length);
711
711
/* make a list to hold index hints */
712
void alloc_index_hints (Session *thd);
712
void alloc_index_hints (Session *session);
713
713
/* read and clear the index hints */
714
714
List<Index_hint>* pop_index_hints(void)
1229
1229
return m_body_utf8_ptr - m_body_utf8;
1232
void body_utf8_start(Session *thd, const char *begin_ptr);
1232
void body_utf8_start(Session *session, const char *begin_ptr);
1233
1233
void body_utf8_append(const char *ptr);
1234
1234
void body_utf8_append(const char *ptr, const char *end_ptr);
1235
void body_utf8_append_literal(Session *thd,
1235
void body_utf8_append_literal(Session *session,
1236
1236
const LEX_STRING *txt,
1237
1237
const CHARSET_INFO * const txt_cs,
1238
1238
const char *end_ptr);
1240
1240
/** Current thread. */
1243
1243
/** Current line number. */
1244
1244
uint32_t yylineno;
1383
1383
LEX_STRING comment, ident;
1385
1385
unsigned char* yacc_yyss, *yacc_yyvs;
1387
1387
virtual_column_info *vcol_info;
1389
1389
/* maintain a list of used plugins for this LEX */
1474
1474
enum Foreign_key::fk_match_opt fk_match_option;
1475
1475
enum Foreign_key::fk_option fk_update_opt;
1476
1476
enum Foreign_key::fk_option fk_delete_opt;
1477
uint32_t slave_thd_opt, start_transaction_opt;
1477
uint32_t slave_session_opt, start_transaction_opt;
1478
1478
int nest_level;
1480
1480
In LEX representing update which were transformed to multi-update
1562
1562
Restore the LEX and Session in case of a parse error.
1564
static void cleanup_lex_after_parse_error(Session *thd);
1564
static void cleanup_lex_after_parse_error(Session *session);
1566
1566
void reset_n_backup_query_tables_list(Query_tables_list *backup);
1567
1567
void restore_backup_query_tables_list(Query_tables_list *backup);
1612
1612
extern void lex_init(void);
1613
1613
extern void lex_free(void);
1614
extern void lex_start(Session *thd);
1614
extern void lex_start(Session *session);
1615
1615
extern void lex_end(LEX *lex);
1617
1617
extern void trim_whitespace(const CHARSET_INFO * const cs, LEX_STRING *str);