Commit 062b7bfa authored by Sergey Petrunya's avatar Sergey Petrunya

Better comments

parent abcf14e5
......@@ -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,
......
......@@ -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;
......
......@@ -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 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment