1
/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
1
/* Copyright (C) 2000-2006 MySQL AB
3
3
This program is free software; you can redistribute it and/or modify
4
4
it under the terms of the GNU General Public License as published by
5
the Free Software Foundation; either version 2 of the License, or
6
(at your option) any later version.
5
the Free Software Foundation; version 2 of the License.
8
7
This program is distributed in the hope that it will be useful,
9
8
but WITHOUT ANY WARRANTY; without even the implied warranty of
95
94
SQLCOM_XA_START, SQLCOM_XA_END, SQLCOM_XA_PREPARE,
96
95
SQLCOM_XA_COMMIT, SQLCOM_XA_ROLLBACK, SQLCOM_XA_RECOVER,
97
96
SQLCOM_SHOW_PROC_CODE, SQLCOM_SHOW_FUNC_CODE,
97
SQLCOM_SHOW_PROFILE, SQLCOM_SHOW_PROFILES,
100
When a command is added here, be sure it's also added in mysqld.cc
101
in "struct show_var_st status_vars[]= {" ...
98
103
/* This should be the last !!! */
470
474
void set_thd(THD *thd_arg) { thd= thd_arg; }
472
476
friend void lex_start(THD *thd, uchar *buf, uint length);
473
friend int subselect_union_engine::exec(bool);
477
friend int subselect_union_engine::exec();
475
479
List<Item> *get_unit_column_types();
519
523
SQL_LIST order_list; /* ORDER clause */
520
524
List<List_item> expr_list;
521
List<List_item> when_list; /* WHEN clause (expression) */
522
525
SQL_LIST *gorder_list;
523
526
Item *select_limit, *offset_limit; /* LIMIT clause parameters */
524
527
// Arrays of pointers to top elements of all_fields list
582
585
bool no_wrap_view_item;
583
586
/* exclude this select from check of unique_table() */
584
587
bool exclude_from_table_unique_test;
588
/* List of fields that aren't under an aggregate function */
589
List<Item_field> non_agg_fields;
590
/* index in the select list of the expression currently being fixed */
591
int cur_pos_in_select_list;
586
593
List<udf_func> udf_list; /* udf function calls stack */
595
This is a copy of the original JOIN USING list that comes from
596
the parser. The parser :
597
1. Sets the natural_join of the second TABLE_LIST in the join
598
and the st_select_lex::prev_join_using.
599
2. Makes a parent TABLE_LIST and sets its is_natural_join/
600
join_using_fields members.
601
3. Uses the wrapper TABLE_LIST as a table in the upper level.
602
We cannot assign directly to join_using_fields in the parser because
603
at stage (1.) the parent TABLE_LIST is not constructed yet and
604
the assignment will override the JOIN USING fields of the lower level
607
List<String> *prev_join_using;
588
609
void init_query();
589
610
void init_select();
688
709
#define ALTER_CONVERT 1024
689
710
#define ALTER_FORCE 2048
691
typedef struct st_alter_info
713
@brief Parsing data for CREATE or ALTER TABLE.
715
This structure contains a list of columns or indexes to be created,
693
722
List<Alter_drop> drop_list;
694
723
List<Alter_column> alter_list;
725
List<create_field> create_list;
696
727
enum enum_enable_or_disable keys_onoff;
697
728
enum tablespace_op_type tablespace_op;
699
st_alter_info(){clear();}
700
void clear(){keys_onoff= LEAVE_AS_IS;tablespace_op= NO_TABLESPACE_OP;}
701
void reset(){drop_list.empty();alter_list.empty();clear();}
732
keys_onoff(LEAVE_AS_IS),
733
tablespace_op(NO_TABLESPACE_OP)
743
keys_onoff= LEAVE_AS_IS;
744
tablespace_op= NO_TABLESPACE_OP;
747
Construct a copy of this object to be used for mysql_alter_table
748
and mysql_create_table. Historically, these two functions modify
749
their Alter_info arguments. This behaviour breaks re-execution of
750
prepared statements and stored procedures and is compensated by
751
always supplying a copy of Alter_info to these functions.
752
The constructed copy still shares key Key, Alter_drop, create_field
753
and Alter_column elements of the lists - these structures are not
754
modified and thus are not copied.
756
@note You need to use check thd->is_fatal_error for out
757
of memory condition after calling this function.
759
Alter_info(const Alter_info &rhs, MEM_ROOT *mem_root);
761
Alter_info &operator=(const Alter_info &rhs); // not implemented
762
Alter_info(const Alter_info &rhs); // not implemented
704
765
struct st_sp_chistics
885
946
List<String> interval_list;
886
947
List<LEX_USER> users_list;
887
948
List<LEX_COLUMN> columns;
889
List<create_field> create_list;
890
949
List<Item> *insert_list,field_list,value_list,update_list;
891
950
List<List_item> many_values;
892
951
List<set_var_base> var_list;
940
999
enum enum_var_type option_type;
941
1000
enum enum_view_create_mode create_view_mode;
942
1001
enum enum_drop_mode drop_mode;
1003
uint profile_query_id;
1004
uint profile_options;
943
1005
uint uint_geom_type;
944
1006
uint grant, grant_tot_col, which_columns;
945
1007
uint fk_delete_opt, fk_update_opt, fk_match_option;