Commit 2b89598f authored by Nayuta Yanagisawa's avatar Nayuta Yanagisawa

MDEV-26852 Spider: -Werror=maybe-uninitialized raises on spd_sys_table.cc and ha_spider.cc

The warning "maybe-uninitialized" raises on spd_sys_table.cc and
ha_spider.cc when the sever is compiled with CMAKE_CXX_FLAGS=-Og.
parent fa4e84b5
...@@ -348,7 +348,7 @@ int ha_spider::open( ...@@ -348,7 +348,7 @@ int ha_spider::open(
may_be_clone = FALSE; may_be_clone = FALSE;
ha_spider **pt_handler_share_handlers; ha_spider **pt_handler_share_handlers;
#ifdef SPIDER_HAS_HASH_VALUE_TYPE #ifdef SPIDER_HAS_HASH_VALUE_TYPE
my_hash_value_type hash_value; my_hash_value_type hash_value = 0;
#endif #endif
#endif #endif
DBUG_ENTER("ha_spider::open"); DBUG_ENTER("ha_spider::open");
...@@ -425,7 +425,9 @@ int ha_spider::open( ...@@ -425,7 +425,9 @@ int ha_spider::open(
partition_handler_share->between_flg = FALSE; partition_handler_share->between_flg = FALSE;
partition_handler_share->idx_bitmap_is_set = FALSE; partition_handler_share->idx_bitmap_is_set = FALSE;
partition_handler_share->rnd_bitmap_is_set = FALSE; partition_handler_share->rnd_bitmap_is_set = FALSE;
#ifdef SPIDER_HAS_HASH_VALUE_TYPE
partition_handler_share->table_hash_value = hash_value; partition_handler_share->table_hash_value = hash_value;
#endif
partition_handler_share->creator = this; partition_handler_share->creator = this;
partition_handler_share->parallel_search_query_id = 0; partition_handler_share->parallel_search_query_id = 0;
pt_handler_share_creator = this; pt_handler_share_creator = this;
......
...@@ -950,12 +950,13 @@ int spider_ping_table_cache_compare( ...@@ -950,12 +950,13 @@ int spider_ping_table_cache_compare(
char *db_name, *table_name, *link_id; char *db_name, *table_name, *link_id;
DBUG_ENTER("spider_ping_table_cache_compare"); DBUG_ENTER("spider_ping_table_cache_compare");
if ( if (!(db_name = get_field(mem_root, table->field[0])))
!(db_name = get_field(mem_root, table->field[0])) || DBUG_RETURN(HA_ERR_OUT_OF_MEM);
!(table_name = get_field(mem_root, table->field[1])) || if (!(table_name = get_field(mem_root, table->field[1])))
!(link_id = get_field(mem_root, table->field[2]))
)
DBUG_RETURN(HA_ERR_OUT_OF_MEM); DBUG_RETURN(HA_ERR_OUT_OF_MEM);
if (!(link_id = get_field(mem_root, table->field[2])))
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
DBUG_PRINT("info", ("spider db_name=%s", db_name)); DBUG_PRINT("info", ("spider db_name=%s", db_name));
DBUG_PRINT("info", ("spider table_name=%s", table_name)); DBUG_PRINT("info", ("spider table_name=%s", table_name));
DBUG_PRINT("info", ("spider link_id=%s", link_id)); DBUG_PRINT("info", ("spider link_id=%s", link_id));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment