diff options
-rw-r--r-- | sql/opt_subselect.cc | 6 | ||||
-rw-r--r-- | sql/table.cc | 9 | ||||
-rw-r--r-- | storage/maria/ma_create.c | 5 |
3 files changed, 11 insertions, 9 deletions
diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc index e048df6ef11..430481295f6 100644 --- a/sql/opt_subselect.cc +++ b/sql/opt_subselect.cc @@ -2701,8 +2701,8 @@ void advance_sj_state(JOIN *join, table_map remaining_tables, uint idx, LooseScan detector in best_access_path) */ remaining_tables &= ~new_join_tab->table->map; - table_map dups_producing_tables, prev_dups_producing_tables, - prev_sjm_lookup_tables; + table_map dups_producing_tables, UNINIT_VAR(prev_dups_producing_tables), + UNINIT_VAR(prev_sjm_lookup_tables); if (idx == join->const_tables) dups_producing_tables= 0; @@ -2713,7 +2713,7 @@ void advance_sj_state(JOIN *join, table_map remaining_tables, uint idx, if ((emb_sj_nest= new_join_tab->emb_sj_nest)) dups_producing_tables |= emb_sj_nest->sj_inner_tables; - Semi_join_strategy_picker **strategy, **prev_strategy; + Semi_join_strategy_picker **strategy, **prev_strategy= 0; if (idx == join->const_tables) { /* First table, initialize pickers */ diff --git a/sql/table.cc b/sql/table.cc index 33f408f958a..3ff13fc9d87 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -1174,7 +1174,7 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write, char *keynames, *names, *comment_pos; const uchar *forminfo, *extra2; const uchar *frm_image_end = frm_image + frm_length; - uchar *record, *null_flags, *null_pos, *mysql57_vcol_null_pos; + uchar *record, *null_flags, *null_pos, *UNINIT_VAR(mysql57_vcol_null_pos); const uchar *disk_buff, *strpos; ulong pos, record_offset; ulong rec_buff_length; @@ -2407,6 +2407,11 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write, DBUG_ASSERT(field_nr < share->fields); reg_field= share->field[field_nr]; } + else + { + reg_field= 0; + DBUG_ASSERT(name_length); + } vcol_screen_pos+= FRM_VCOL_NEW_HEADER_SIZE; vcol_info->set_vcol_type((enum_vcol_info_type) type); @@ -7411,7 +7416,7 @@ int TABLE::update_virtual_fields(handler *h, enum_vcol_update_mode update_mode) DBUG_ASSERT(vcol_info); DBUG_ASSERT(vcol_info->expr); - bool update, swap_values= 0; + bool update= 0, swap_values= 0; switch (update_mode) { case VCOL_UPDATE_FOR_READ: update= !vcol_info->stored_in_db diff --git a/storage/maria/ma_create.c b/storage/maria/ma_create.c index 94c4c250bef..aec705bd540 100644 --- a/storage/maria/ma_create.c +++ b/storage/maria/ma_create.c @@ -76,7 +76,7 @@ int maria_create(const char *name, enum data_file_type datafile_type, uint internal_table= flags & HA_CREATE_INTERNAL_TABLE; ulong reclength, real_reclength,min_pack_length; char kfilename[FN_REFLEN], klinkname[FN_REFLEN], *klinkname_ptr; - char dfilename[FN_REFLEN], dlinkname[FN_REFLEN], *dlinkname_ptr; + char dfilename[FN_REFLEN], dlinkname[FN_REFLEN], *dlinkname_ptr= 0; ulong pack_reclength; ulonglong tot_length,max_rows, tmp; enum en_fieldtype type; @@ -1197,7 +1197,6 @@ int maria_create(const char *name, enum data_file_type datafile_type, { fn_format(dfilename,name,"", MARIA_NAME_DEXT, MY_UNPACK_FILENAME | MY_APPEND_EXT); - dlinkname_ptr= NullS; create_flag= (flags & HA_CREATE_KEEP_FILES) ? 0 : MY_DELETE_OLD; } if ((dfile= @@ -1251,8 +1250,6 @@ err_no_lock: switch (errpos) { case 3: mysql_file_close(dfile, MYF(0)); - /* fall through */ - case 2: if (! (flags & HA_DONT_TOUCH_DATA)) { mysql_file_delete(key_file_dfile, dfilename, MYF(sync_dir)); |