mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Backport of:
---------------------------------------------------------- revno: 2630.22.8 committer: Konstantin Osipov <konstantin@mysql.com> branch nick: mysql-6.0-runtime timestamp: Sun 2008-08-10 18:49:52 +0400 message: Get rid of typedef struct for the most commonly used types: TABLE, TABLE_SHARE, LEX. This simplifies use of tags and forward declarations.
This commit is contained in:
@ -395,7 +395,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 {
|
||||
@ -465,7 +465,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:
|
||||
@ -585,7 +585,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;
|
||||
@ -961,7 +961,7 @@ extern const LEX_STRING null_lex_str;
|
||||
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.
|
||||
*/
|
||||
|
||||
@ -1550,7 +1550,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)
|
||||
{}
|
||||
|
||||
@ -1575,12 +1575,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 */
|
||||
@ -1837,9 +1837,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);
|
||||
@ -1881,7 +1881,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
|
||||
@ -1953,7 +1953,7 @@ typedef struct st_lex : public Query_tables_list
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
} LEX;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
@ -2044,7 +2044,7 @@ public:
|
||||
};
|
||||
|
||||
|
||||
struct st_lex_local: public st_lex
|
||||
struct st_lex_local: public LEX
|
||||
{
|
||||
static void *operator new(size_t size) throw()
|
||||
{
|
||||
|
Reference in New Issue
Block a user