diff options
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r-- | sql/sql_lex.cc | 73 |
1 files changed, 1 insertions, 72 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 91c4dc40c01..61f710a2fe5 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -1112,7 +1112,7 @@ void st_select_lex::init_query() first_execution= 1; first_cond_optimization= 1; parsing_place= NO_MATTER; - no_wrap_view_item= 0; + exclude_from_table_unique_test= no_wrap_view_item= FALSE; link_next= 0; } @@ -1493,77 +1493,6 @@ bool st_select_lex::setup_ref_array(THD *thd, uint order_group_num) } -/* - Find db.table which will be updated in this unit - - SYNOPSIS - st_select_lex_unit::check_updateable() - db - data base name - table - real table name - - RETURN - 1 - found - 0 - OK (table did not found) -*/ - -bool st_select_lex_unit::check_updateable(char *db, char *table) -{ - for (SELECT_LEX *sl= first_select(); sl; sl= sl->next_select()) - if (sl->check_updateable(db, table)) - return 1; - return 0; -} - - -/* - Find db.table which will be updated in this select and - underlying ones (except derived tables) - - SYNOPSIS - st_select_lex::check_updateable() - db - data base name - table - real table name - - RETURN - 1 - found - 0 - OK (table did not found) -*/ - -bool st_select_lex::check_updateable(char *db, char *table) -{ - if (find_table_in_local_list(get_table_list(), db, table)) - return 1; - - return check_updateable_in_subqueries(db, table); -} - -/* - Find db.table which will be updated in underlying subqueries - - SYNOPSIS - st_select_lex::check_updateable_in_subqueries() - db - data base name - table - real table name - - RETURN - 1 - found - 0 - OK (table did not found) -*/ - -bool st_select_lex::check_updateable_in_subqueries(char *db, char *table) -{ - for (SELECT_LEX_UNIT *un= first_inner_unit(); - un; - un= un->next_unit()) - { - if (un->first_select()->linkage != DERIVED_TABLE_TYPE && - un->check_updateable(db, table)) - return 1; - } - return 0; -} - - void st_select_lex_unit::print(String *str) { for (SELECT_LEX *sl= first_select(); sl; sl= sl->next_select()) |