mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Cleanup of new code pushed into 5.0 since last pull
Merged the different find_xxxx_table_in_list functions to one + some inline functions mysql-test/r/view.result: Fix result (remove not used view from show tables) sql/item_subselect.cc: Remove not used functions sql/item_subselect.h: Remove not used functions sql/mysql_priv.h: Merged the different find_xxxx_table_in_list functions to one + some inline functions sql/sql_acl.cc: More debugging + simple cleanups sql/sql_base.cc: Merged the different find_xxxx_table_in_list functions to one + some inline functions Indentation cleanups & more comments sql/sql_delete.cc: Namechange sql/sql_insert.cc: Simple optimizations & Style cleanups Merged common code (in mysql_prepare_insert_check_table) sql/sql_lex.cc: function name changes More comments sql/sql_parse.cc: Function name changes Made check_one_table_access returning bool More debugging in 'check_access' Added function 'check_some_access', which is used when creating a view sql/sql_prepare.cc: Resetting flag directly after test makes code easier to read sql/sql_select.cc: Code simplifications sql/sql_show.cc: Indentation cleanups. Fixed typo in name sql/sql_update.cc: Function name change sql/sql_view.cc: Simple optimizations. Style fixes. Remove view_field_names[] Simplified 'check_key_in_view()' sql/table.cc: Simplified new code in openfrm() variable name change i -> item Indentation changes sql/table.h: Fixed typo in variable name Method name change in field iterator: end() -> end_of_fields() tests/client_test.c: Changed number to macro
This commit is contained in:
@ -1422,7 +1422,7 @@ bool st_select_lex_unit::check_updateable(char *db, char *table)
|
||||
*/
|
||||
bool st_select_lex::check_updateable(char *db, char *table)
|
||||
{
|
||||
if (find_real_table_in_local_list(get_table_list(), db, table))
|
||||
if (find_table_in_local_list(get_table_list(), db, table))
|
||||
return 1;
|
||||
|
||||
for (SELECT_LEX_UNIT *un= first_inner_unit();
|
||||
@ -1631,14 +1631,16 @@ void st_select_lex_unit::set_limit(SELECT_LEX *values,
|
||||
|
||||
SYNOPSIS
|
||||
unlink_first_table()
|
||||
link_to_local do we need link this table to local
|
||||
link_to_local Set to 1 if caller should link this table to local
|
||||
|
||||
NOTES
|
||||
We rely on fact that first table in both list are same or local list
|
||||
is empty
|
||||
|
||||
RETURN
|
||||
0 If 'query_tables' == 0
|
||||
unlinked table
|
||||
In this case link_to_local is set.
|
||||
|
||||
*/
|
||||
TABLE_LIST *st_lex::unlink_first_table(bool *link_to_local)
|
||||
@ -1692,11 +1694,11 @@ void st_lex::first_lists_tables_same()
|
||||
TABLE_LIST *first_table= (TABLE_LIST*) select_lex.table_list.first;
|
||||
if (query_tables != first_table && first_table != 0)
|
||||
{
|
||||
TABLE_LIST *next;
|
||||
if (query_tables_last == &first_table->next_global)
|
||||
query_tables_last= first_table->prev_global;
|
||||
TABLE_LIST *next= *first_table->prev_global= first_table->next_global;
|
||||
first_table->next_global= 0;
|
||||
if (next)
|
||||
|
||||
if ((next= *first_table->prev_global= first_table->next_global))
|
||||
next->prev_global= first_table->prev_global;
|
||||
/* include in new place */
|
||||
first_table->next_global= query_tables;
|
||||
|
Reference in New Issue
Block a user