mirror of
https://github.com/MariaDB/server.git
synced 2026-05-04 14:15:33 +02:00
Merging 4.1->5.0.
BitKeeper/etc/ignore: auto-union BitKeeper/etc/logging_ok: auto-union BitKeeper/triggers/post-commit: Auto merged client/mysql.cc: Auto merged configure.in: Auto merged include/my_global.h: Auto merged include/my_pthread.h: Auto merged include/mysql_com.h: Auto merged libmysql/libmysql.c: Auto merged libmysqld/Makefile.am: Auto merged libmysqld/lib_sql.cc: Auto merged myisam/mi_check.c: Auto merged myisam/myisamchk.c: Auto merged myisam/myisamdef.h: Auto merged mysql-test/r/rpl_temporary.result: Auto merged mysql-test/r/show_check.result: Auto merged mysql-test/r/subselect.result: Auto merged mysql-test/r/variables.result: Auto merged mysql-test/t/subselect.test: Auto merged mysql-test/t/variables.test: Auto merged scripts/mysql_install_db.sh: Auto merged sql/Makefile.am: Auto merged sql/ha_berkeley.cc: Auto merged sql/ha_innodb.cc: Auto merged sql/ha_myisam.cc: Auto merged sql/handler.cc: Auto merged sql/handler.h: Auto merged sql/item_subselect.cc: Auto merged sql/item_sum.cc: Auto merged sql/item_sum.h: Auto merged sql/mysql_priv.h: Auto merged sql/mysqld.cc: Auto merged sql/slave.cc: Auto merged sql/sql_acl.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_cache.cc: Auto merged sql/sql_db.cc: Auto merged sql/sql_delete.cc: Auto merged sql/sql_lex.cc: Auto merged sql/sql_prepare.cc: Auto merged sql/sql_repl.cc: Auto merged sql/sql_show.cc: Auto merged sql/sql_table.cc: Auto merged sql/sql_union.cc: Auto merged sql/sql_update.cc: Auto merged sql/table.h: Auto merged
This commit is contained in:
commit
214ad82803
136 changed files with 12038 additions and 1189 deletions
|
|
@ -21,6 +21,9 @@
|
|||
class Table_ident;
|
||||
class sql_exchange;
|
||||
class LEX_COLUMN;
|
||||
class sp_head;
|
||||
class sp_instr;
|
||||
class sp_pcontext;
|
||||
|
||||
/*
|
||||
The following hack is needed because mysql_yacc.cc does not define
|
||||
|
|
@ -75,6 +78,10 @@ enum enum_sql_command {
|
|||
SQLCOM_SHOW_WARNS, SQLCOM_EMPTY_QUERY, SQLCOM_SHOW_ERRORS,
|
||||
SQLCOM_SHOW_COLUMN_TYPES, SQLCOM_SHOW_TABLE_TYPES, SQLCOM_SHOW_PRIVILEGES,
|
||||
SQLCOM_HELP, SQLCOM_DROP_USER, SQLCOM_REVOKE_ALL, SQLCOM_CHECKSUM,
|
||||
SQLCOM_CREATE_PROCEDURE, SQLCOM_CREATE_SPFUNCTION, SQLCOM_CALL,
|
||||
SQLCOM_DROP_PROCEDURE, SQLCOM_ALTER_PROCEDURE,SQLCOM_ALTER_FUNCTION,
|
||||
SQLCOM_SHOW_CREATE_PROC, SQLCOM_SHOW_CREATE_FUNC,
|
||||
SQLCOM_SHOW_STATUS_PROC, SQLCOM_SHOW_STATUS_FUNC,
|
||||
|
||||
/* This should be the last !!! */
|
||||
SQLCOM_END
|
||||
|
|
@ -84,6 +91,10 @@ enum enum_sql_command {
|
|||
#define DESCRIBE_NORMAL 1
|
||||
#define DESCRIBE_EXTENDED 2
|
||||
|
||||
enum suid_behaviour
|
||||
{
|
||||
IS_DEFAULT_SUID= 0, IS_NOT_SUID, IS_SUID
|
||||
};
|
||||
|
||||
typedef List<Item> List_item;
|
||||
|
||||
|
|
@ -348,7 +359,7 @@ public:
|
|||
|
||||
void print(String *str);
|
||||
|
||||
friend void mysql_init_query(THD *thd);
|
||||
friend void mysql_init_query(THD *thd, bool lexonly);
|
||||
friend int subselect_union_engine::exec();
|
||||
private:
|
||||
bool create_total_list_n_last_return(THD *thd, st_lex *lex,
|
||||
|
|
@ -369,6 +380,8 @@ public:
|
|||
enum olap_type olap;
|
||||
SQL_LIST table_list, group_list; /* FROM & GROUP BY clauses */
|
||||
List<Item> item_list; /* list of fields & expressions */
|
||||
List<Item> item_list_copy; /* For SPs */
|
||||
byte *table_list_first_copy; /* For SPs */
|
||||
List<String> interval_list, use_index, *use_index_ptr,
|
||||
ignore_index, *ignore_index_ptr;
|
||||
/*
|
||||
|
|
@ -480,7 +493,7 @@ public:
|
|||
|
||||
bool test_limit();
|
||||
|
||||
friend void mysql_init_query(THD *thd);
|
||||
friend void mysql_init_query(THD *thd, bool lexonly);
|
||||
st_select_lex() {}
|
||||
void make_empty_select()
|
||||
{
|
||||
|
|
@ -507,6 +520,7 @@ typedef struct st_lex
|
|||
SELECT_LEX *current_select;
|
||||
/* list of all SELECT_LEX */
|
||||
SELECT_LEX *all_selects_list;
|
||||
uchar *buf; /* The beginning of string, used by SPs */
|
||||
uchar *ptr,*tok_start,*tok_end,*end_of_query;
|
||||
char *length,*dec,*change,*name;
|
||||
char *help_arg;
|
||||
|
|
@ -560,6 +574,7 @@ typedef struct st_lex
|
|||
enum enum_enable_or_disable alter_keys_onoff;
|
||||
enum enum_var_type option_type;
|
||||
enum tablespace_op_type tablespace_op;
|
||||
enum suid_behaviour suid;
|
||||
uint uint_geom_type;
|
||||
uint grant, grant_tot_col, which_columns;
|
||||
uint fk_delete_opt, fk_update_opt, fk_match_option;
|
||||
|
|
@ -570,7 +585,22 @@ typedef struct st_lex
|
|||
bool in_comment, ignore_space, verbose, simple_alter, no_write_to_binlog;
|
||||
bool derived_tables;
|
||||
bool safe_to_cache_query;
|
||||
st_lex() {}
|
||||
sp_head *sphead;
|
||||
bool sp_lex_in_use; /* Keep track on lex usage in SPs for error handling */
|
||||
sp_pcontext *spcont;
|
||||
HASH spfuns; /* Called functions */
|
||||
|
||||
st_lex()
|
||||
{
|
||||
bzero((char *)&spfuns, sizeof(spfuns));
|
||||
}
|
||||
|
||||
~st_lex()
|
||||
{
|
||||
if (spfuns.array.buffer)
|
||||
hash_free(&spfuns);
|
||||
}
|
||||
|
||||
inline void uncacheable(uint8 cause)
|
||||
{
|
||||
safe_to_cache_query= 0;
|
||||
|
|
@ -602,4 +632,4 @@ extern pthread_key(LEX*,THR_LEX);
|
|||
|
||||
extern LEX_STRING tmp_table_alias;
|
||||
|
||||
#define current_lex (¤t_thd->lex)
|
||||
#define current_lex (current_thd->lex)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue