From 98f2be086807f2ee601ee4f2fdd17a44798c3627 Mon Sep 17 00:00:00 2001 From: Igor Babaev Date: Thu, 19 May 2011 16:04:01 -0700 Subject: [PATCH] Fixed compiler warnings. --- sql/item.cc | 2 +- sql/sql_derived.cc | 3 +-- sql/sql_select.cc | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/sql/item.cc b/sql/item.cc index a62f26dc5cf..4ea8891b084 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -8866,7 +8866,7 @@ inline struct 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; } diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc index c2f4b0db606..ccb85e1d6f1 100644 --- a/sql/sql_derived.cc +++ b/sql/sql_derived.cc @@ -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; diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 0762a30a760..e62526550f3 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -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