#At lp:maria/5.2 based on revid:igor@askmonty.org-20100512040958-yc654eq2zdfo8l8m 2790 Igor Babaev 2010-05-12 Cleanup modified: sql/sql_derived.cc === modified file 'sql/sql_derived.cc' --- a/sql/sql_derived.cc 2010-05-12 04:09:58 +0000 +++ b/sql/sql_derived.cc 2010-05-13 06:59:14 +0000 @@ -159,12 +159,7 @@ mysql_handle_single_derived(LEX *lex, TA uint phase_flag= DT_INIT << phase; if (phase_flag > phases) break; -#if 0 - if (!(phases & phase_flag) || - derived->merged_for_insert && phase_flag != DT_REINIT) -#else if (!(phases & phase_flag)) -#endif continue; /* Skip derived tables to which the phase isn't applicable. */ if (phase_flag != DT_PREPARE && @@ -605,19 +600,11 @@ bool mysql_derived_prepare(THD *thd, LEX bool res= FALSE; // Skip already prepared views/DT -#if 0 - if (!unit || unit->prepared || derived->merged_for_insert) -#else if (!unit || unit->prepared) -#endif DBUG_RETURN(FALSE); /* It's a target view for an INSERT, create field translation only. */ -#if 0 - if (derived->skip_prepare_derived && !derived->is_multitable()) -#else if (derived->merged_for_insert) -#endif { res= derived->create_field_translation(thd); DBUG_RETURN(res);