1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00
This commit is contained in:
Mikael Ronstrom
2009-11-03 12:37:02 +01:00
310 changed files with 8471 additions and 3181 deletions

View File

@@ -400,7 +400,7 @@ public:
Base class for st_select_lex (SELECT_LEX) &
st_select_lex_unit (SELECT_LEX_UNIT)
*/
struct st_lex;
struct LEX;
class st_select_lex;
class st_select_lex_unit;
class st_select_lex_node {
@@ -470,7 +470,7 @@ public:
virtual void set_lock_for_tables(thr_lock_type lock_type) {}
friend class st_select_lex_unit;
friend bool mysql_new_select(struct st_lex *lex, bool move_down);
friend bool mysql_new_select(LEX *lex, bool move_down);
friend bool mysql_make_view(THD *thd, File_parser *parser,
TABLE_LIST *table, uint flags);
private:
@@ -590,7 +590,7 @@ public:
/* Saved values of the WHERE and HAVING clauses*/
Item::cond_result cond_value, having_value;
/* point on lex in which it was created, used in view subquery detection */
st_lex *parent_lex;
LEX *parent_lex;
enum olap_type olap;
/* FROM clause - points to the beginning of the TABLE_LIST::next_local list. */
SQL_LIST table_list;
@@ -956,6 +956,9 @@ extern sys_var *trg_new_row_fake_var;
enum xa_option_words {XA_NONE, XA_JOIN, XA_RESUME, XA_ONE_PHASE,
XA_SUSPEND, XA_FOR_MIGRATE};
extern const LEX_STRING null_lex_str;
extern const LEX_STRING empty_lex_str;
/*
Class representing list of all tables used by statement.
@@ -964,7 +967,7 @@ enum xa_option_words {XA_NONE, XA_JOIN, XA_RESUME, XA_ONE_PHASE,
stored functions/triggers to this list in order to pre-open and lock
them.
Also used by st_lex::reset_n_backup/restore_backup_query_tables_list()
Also used by LEX::reset_n_backup/restore_backup_query_tables_list()
methods to save and restore this information.
*/
@@ -1492,9 +1495,13 @@ public:
/**
TRUE if we're parsing a prepared statement: in this mode
we should allow placeholders and disallow multi-statements.
we should allow placeholders.
*/
bool stmt_prepare_mode;
/**
TRUE if we should allow multi-statements.
*/
bool multi_statements;
/** State of the lexical analyser for comments. */
enum_comment_state in_comment;
@@ -1553,7 +1560,7 @@ protected:
Constructor.
@param lex the LEX structure that represents parts of this statement.
*/
Sql_statement(struct st_lex *lex)
Sql_statement(LEX *lex)
: m_lex(lex)
{}
@@ -1578,12 +1585,12 @@ protected:
with the minimum set of attributes, instead of a LEX structure that
contains the collection of every possible attribute.
*/
struct st_lex *m_lex;
LEX *m_lex;
};
/* The state of the lex parsing. This is saved in the THD struct */
typedef struct st_lex : public Query_tables_list
struct LEX: public Query_tables_list
{
SELECT_LEX_UNIT unit; /* most upper unit */
SELECT_LEX select_lex; /* first SELECT_LEX */
@@ -1833,9 +1840,9 @@ typedef struct st_lex : public Query_tables_list
*/
bool protect_against_global_read_lock;
st_lex();
LEX();
virtual ~st_lex()
virtual ~LEX()
{
destroy_query_tables_list();
plugin_unlock_list(NULL, (plugin_ref *)plugins.buffer, plugins.elements);
@@ -1877,7 +1884,7 @@ typedef struct st_lex : public Query_tables_list
Is this update command where 'WHITH CHECK OPTION' clause is important
SYNOPSIS
st_lex::which_check_option_applicable()
LEX::which_check_option_applicable()
RETURN
TRUE have to take 'WHITH CHECK OPTION' clause into account
@@ -1949,7 +1956,7 @@ typedef struct st_lex : public Query_tables_list
}
return FALSE;
}
} LEX;
};
/**
@@ -2040,7 +2047,7 @@ public:
};
struct st_lex_local: public st_lex
struct st_lex_local: public LEX
{
static void *operator new(size_t size) throw()
{