Better comments

This commit is contained in:
Sergey Petrunya 2013-10-05 13:48:45 +04:00
parent abcf14e595
commit 062b7bfa39
3 changed files with 7 additions and 4 deletions

View File

@ -245,8 +245,6 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
table->map=1;
query_plan.select_lex= &thd->lex->select_lex;
query_plan.table= table;
//psergey-todo: Ugly, discuss with Sanja
query_plan.updating_a_view= test(table_list->view);
if (mysql_prepare_delete(thd, table_list, select_lex->with_wild,

View File

@ -2382,6 +2382,13 @@ protected:
bool impossible_where;
bool no_partitions;
public:
/*
When single-table UPDATE updates a VIEW, that VIEW's select is still
listed as the first child. When we print EXPLAIN, it looks like a
subquery.
In order to get rid of it, updating_a_view=TRUE means that first child
select should not be shown when printing EXPLAIN.
*/
bool updating_a_view;
TABLE *table;

View File

@ -314,8 +314,6 @@ int mysql_update(THD *thd,
my_error(ER_NON_UPDATABLE_TABLE, MYF(0), table_list->alias, "UPDATE");
DBUG_RETURN(1);
}
//psergey-todo: Ugly, discuss with Sanja
query_plan.updating_a_view= test(table_list->view);
/* Calculate "table->covering_keys" based on the WHERE */