diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 2c3a96f3f47..a28daf36f05 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -428,11 +428,9 @@ static bool convert_const_to_int(THD *thd, Item_field *field_item, TABLE *table= field->table; sql_mode_t orig_sql_mode= thd->variables.sql_mode; enum_check_fields orig_count_cuted_fields= thd->count_cuted_fields; - my_bitmap_map *old_maps[2]; + my_bitmap_map *old_maps[2] = { NULL, NULL }; ulonglong UNINIT_VAR(orig_field_val); /* original field value if valid */ - LINT_INIT_STRUCT(old_maps); - /* table->read_set may not be set if we come here from a CREATE TABLE */ if (table && table->read_set) dbug_tmp_use_all_columns(table, old_maps, diff --git a/sql/opt_subselect.h b/sql/opt_subselect.h index 7641a5d6196..69f1cc33017 100644 --- a/sql/opt_subselect.h +++ b/sql/opt_subselect.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2010, 2015, MariaDB + Copyright (c) 2010, 2019, MariaDB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -92,19 +92,15 @@ class Loose_scan_opt public: Loose_scan_opt(): - try_loosescan(FALSE), + try_loosescan(false), bound_sj_equalities(0), - quick_uses_applicable_index(FALSE) + quick_uses_applicable_index(FALSE), quick_max_loose_keypart(0), + best_loose_scan_key(0), best_loose_scan_records(0.0), + best_loose_scan_start_key(NULL), + best_max_loose_keypart(0), best_ref_depend_map(0) { - /* Protected by quick_uses_applicable_index */ - LINT_INIT(quick_max_loose_keypart); - /* The following are protected by best_loose_scan_cost!= DBL_MAX */ - LINT_INIT(best_loose_scan_key); - LINT_INIT(best_loose_scan_records); - LINT_INIT(best_max_loose_keypart); - LINT_INIT(best_loose_scan_start_key); } - + void init(JOIN *join, JOIN_TAB *s, table_map remaining_tables) { /* diff --git a/sql/sql_statistics.cc b/sql/sql_statistics.cc index 7bf8fd676d4..55af2c34e6e 100644 --- a/sql/sql_statistics.cc +++ b/sql/sql_statistics.cc @@ -1814,16 +1814,13 @@ public: bool is_partial_fields_present; Index_prefix_calc(THD *thd, TABLE *table, KEY *key_info) - : index_table(table), index_info(key_info) + : index_table(table), index_info(key_info), prefixes(0), empty(true), + calc_state(NULL), is_single_comp_pk(false), is_partial_fields_present(false) { uint i; Prefix_calc_state *state; uint key_parts= table->actual_n_key_parts(key_info); - empty= TRUE; - prefixes= 0; - LINT_INIT_STRUCT(calc_state); - is_partial_fields_present= is_single_comp_pk= FALSE; uint pk= table->s->primary_key; if ((uint) (table->key_info - key_info) == pk && table->key_info[pk].user_defined_key_parts == 1) diff --git a/storage/maria/ma_ft_nlq_search.c b/storage/maria/ma_ft_nlq_search.c index d83981e424c..2afd493b32d 100644 --- a/storage/maria/ma_ft_nlq_search.c +++ b/storage/maria/ma_ft_nlq_search.c @@ -83,13 +83,13 @@ static int walk_and_match(FT_WORD *word, uint32 count, ALL_IN_ONE *aio) #error #endif DBUG_ENTER("walk_and_match"); - LINT_INIT_STRUCT(subkeys); word->weight=LWS_FOR_QUERY; _ma_ft_make_key(info, &key, aio->keynr, keybuff, word, 0); key.data_length-= HA_FT_WLEN; doc_cnt=0; + subkeys.i= 0; if (share->lock_key_trees) mysql_rwlock_rdlock(&share->keyinfo[aio->keynr].root_lock); diff --git a/storage/myisam/ft_nlq_search.c b/storage/myisam/ft_nlq_search.c index e6bbf6656a1..4f51879ac00 100644 --- a/storage/myisam/ft_nlq_search.c +++ b/storage/myisam/ft_nlq_search.c @@ -81,13 +81,13 @@ static int walk_and_match(FT_WORD *word, uint32 count, ALL_IN_ONE *aio) #error #endif DBUG_ENTER("walk_and_match"); - LINT_INIT_STRUCT(subkeys); word->weight=LWS_FOR_QUERY; keylen=_ft_make_key(info,aio->keynr,keybuff,word,0); keylen-=HA_FT_WLEN; doc_cnt=0; + subkeys.i= 0; if (share->concurrent_insert) mysql_rwlock_rdlock(&share->key_root_lock[aio->keynr]); diff --git a/storage/myisam/mi_create.c b/storage/myisam/mi_create.c index 57d9630ecb9..fd230698acc 100644 --- a/storage/myisam/mi_create.c +++ b/storage/myisam/mi_create.c @@ -47,7 +47,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, 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;