1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

table lists management during VIEW processing code cleanup

sql/sql_lex.h:
  comments added
  new method of adding table to global query tables list
sql/sql_parse.cc:
  used new method to add table to query tables list
  removed spaces at end of line in new code
sql/sql_view.cc:
  layout fixed
  table lists management code cleanup
This commit is contained in:
unknown
2004-09-11 23:52:55 +03:00
parent e4dc7e5a40
commit ae70baf21c
3 changed files with 77 additions and 73 deletions

View File

@@ -643,7 +643,11 @@ typedef struct st_lex
THD *thd;
CHARSET_INFO *charset;
TABLE_LIST *query_tables; /* global list of all tables in this query */
/* last element next_global of previous list */
/*
last element next_global of previous list (used only for list building
during parsing and VIEW processing. This pointer is not valid in
mysql_execute_command
*/
TABLE_LIST **query_tables_last;
TABLE_LIST *proc_table; /* refer to mysql.proc if it was opened by VIEW */
@@ -765,6 +769,11 @@ typedef struct st_lex
TABLE_LIST *unlink_first_table(bool *link_to_local);
void link_first_table_back(TABLE_LIST *first, bool link_to_local);
void first_lists_tables_same();
inline void add_to_query_tables(TABLE_LIST *table)
{
*(table->prev_global= query_tables_last)= table;
query_tables_last= &table->next_global;
}
bool can_be_merged();
bool can_use_merged();