This commit is contained in:
Igor Babaev 2011-05-19 17:02:47 -07:00
commit 2feb13cdb4
3 changed files with 3 additions and 4 deletions

View file

@ -8866,7 +8866,7 @@ inline st_select_lex *Item_ident::get_depended_from() const
{
st_select_lex *dep;
if ((dep= depended_from))
for ( ; dep->merged_into; dep= dep->merged_into);
for ( ; dep->merged_into; dep= dep->merged_into) ;
return dep;
}

View file

@ -857,14 +857,13 @@ bool mysql_derived_create(THD *thd, LEX *lex, TABLE_LIST *derived)
bool mysql_derived_fill(THD *thd, LEX *lex, TABLE_LIST *derived)
{
TABLE *table= derived->table;
SELECT_LEX_UNIT *unit= derived->get_unit();
bool res= FALSE;
if (unit->executed && !unit->uncacheable && !unit->describe)
return FALSE;
/*check that table creation passed without problems. */
DBUG_ASSERT(table && table->created);
DBUG_ASSERT(derived->table && derived->table->created);
SELECT_LEX *first_select= unit->first_select();
select_union *derived_result= derived->derived_result;
SELECT_LEX *save_current_select= lex->current_select;

View file

@ -12091,7 +12091,7 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type,
(orig_item && orig_item->maybe_null)) && /* for outer joined views/dt*/
!field->field->maybe_null())
{
bool save_maybe_null;
bool save_maybe_null= FALSE;
/*
The item the ref points to may have maybe_null flag set while
the ref doesn't have it. This may happen for outer fields