diff options
-rw-r--r-- | sql/sql_lex.cc | 2 | ||||
-rw-r--r-- | sql/sql_select.cc | 8 | ||||
-rw-r--r-- | sql/sql_union.cc | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 18f6e4b21ae..cfa3231236b 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -3239,7 +3239,7 @@ void st_select_lex::append_table_to_list(TABLE_LIST *TABLE_LIST::*link, TABLE_LIST *table) { TABLE_LIST *tl; - for (tl= leaf_tables.head(); tl->*link; tl= tl->*link); + for (tl= leaf_tables.head(); tl->*link; tl= tl->*link) ; tl->*link= table; } diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 945ee0f41f0..0762a30a760 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -7793,10 +7793,10 @@ bool generate_derived_keys(DYNAMIC_ARRAY *keyuse_array) TABLE *prev_table= 0; for (uint i= 0; i < elements; i++, keyuse++) { - KEYUSE *first_table_keyuse; - table_map last_used_tables; - uint count; - uint keys; + KEYUSE *first_table_keyuse= NULL; + table_map last_used_tables= 0; + uint count= 0; + uint keys= 0; TABLE_LIST *derived= NULL; if (keyuse->table != prev_table) derived= keyuse->table->pos_in_table_list; diff --git a/sql/sql_union.cc b/sql/sql_union.cc index 6ad5b814676..f96b2d5c6bc 100644 --- a/sql/sql_union.cc +++ b/sql/sql_union.cc @@ -356,8 +356,8 @@ bool st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result, List_iterator_fast<Item> tp(types); Item *type; ulonglong create_options; - uint save_tablenr; - table_map save_map; + uint save_tablenr= 0; + table_map save_map= 0; while ((type= tp++)) { |