Commit 8ac1d552 authored by unknown's avatar unknown
Browse files

Remove compiler warnings

Add missing DBUG_RETURN
Fixed stack overflow in NdbBlob (found by ndb_gis.test)
Fixed access to freed memory in ndb_cluster_real_free_share()


mysys/mf_keycache.c:
  Add missing DBUG_RETURN
sql/ha_ndbcluster.cc:
  Move free_root to after share handling, as otherwise we will free things needed by free_table_share()
sql/item_func.cc:
  Add missing DBUG_RETURN
sql/item_strfunc.cc:
  Add missing DBUG_RETURN
sql/sp_head.cc:
  Add missing DBUG_RETURN
sql/sql_base.cc:
  Add missing DBUG_RETURN
storage/csv/ha_tina.cc:
  Add missing DBUG_RETURN
storage/myisam/mi_key.c:
  Add missing DBUG_RETURN
storage/myisam/mi_keycache.c:
  Add missing DBUG_RETURN
storage/ndb/include/kernel/signaldata/ArbitSignalData.hpp:
  Remove compiler warning
storage/ndb/include/kernel/signaldata/DictTabInfo.hpp:
  Remove compiler warning
storage/ndb/include/transporter/TransporterDefinitions.hpp:
  Remove compiler warning
storage/ndb/include/util/SimpleProperties.hpp:
  Remove compiler warning
storage/ndb/include/util/SocketServer.hpp:
  Remove compiler warning
storage/ndb/src/ndbapi/ClusterMgr.hpp:
  Remove compiler warning
storage/ndb/src/ndbapi/NdbBlob.cpp:
  Fix stack overflow
storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp:
  Remove compiler warning
storage/ndb/src/ndbapi/NdbScanOperation.cpp:
  Remove compiler warning
parent 59eaf292
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -550,7 +550,7 @@ int resize_key_cache(KEY_CACHE *keycache, uint key_cache_block_size,
  }
#endif
  keycache_pthread_mutex_unlock(&keycache->cache_lock);
  return blocks;
  DBUG_RETURN(blocks);
}


+1 −1
Original line number Diff line number Diff line
@@ -7060,7 +7060,6 @@ void ndbcluster_real_free_share(NDB_SHARE **share)
  hash_delete(&ndbcluster_open_tables, (byte*) *share);
  thr_lock_delete(&(*share)->lock);
  pthread_mutex_destroy(&(*share)->mutex);
  free_root(&(*share)->mem_root, MYF(0));

#ifdef HAVE_NDB_BINLOG
  if ((*share)->table)
@@ -7081,6 +7080,7 @@ void ndbcluster_real_free_share(NDB_SHARE **share)
#endif
  }
#endif
  free_root(&(*share)->mem_root, MYF(0));
  my_free((gptr) *share, MYF(0));
  *share= 0;

+3 −4
Original line number Diff line number Diff line
@@ -4463,7 +4463,7 @@ double Item_func_match::val_real()
    DBUG_RETURN(-1.0);

  if (table->null_row) /* NULL row from an outer join */
    return 0.0;
    DBUG_RETURN(0.0);

  if (join_key)
  {
@@ -4480,7 +4480,6 @@ double Item_func_match::val_real()
    DBUG_RETURN(ft_handler->please->find_relevance(ft_handler,
				      (byte *)a->ptr(), a->length()));
  }
  else
  DBUG_RETURN(ft_handler->please->find_relevance(ft_handler,
                                                 table->record[0], 0));
}
+1 −1
Original line number Diff line number Diff line
@@ -2593,7 +2593,7 @@ String *Item_load_file::val_str(String *str)
  tmp_value.length(stat_info.st_size);
  my_close(file, MYF(0));
  null_value = 0;
  return &tmp_value;
  DBUG_RETURN(&tmp_value);

err:
  null_value = 1;
+4 −3
Original line number Diff line number Diff line
@@ -563,6 +563,7 @@ create_typelib(MEM_ROOT *mem_root, create_field *field_def, List<String> *src)
  TYPELIB *result= NULL;
  CHARSET_INFO *cs= field_def->charset;
  DBUG_ENTER("create_typelib");

  if (src->elements)
  {
    result= (TYPELIB*) alloc_root(mem_root, sizeof(TYPELIB));
@@ -570,8 +571,8 @@ create_typelib(MEM_ROOT *mem_root, create_field *field_def, List<String> *src)
    result->name= "";
    if (!(result->type_names=(const char **)
          alloc_root(mem_root,(sizeof(char *)+sizeof(int))*(result->count+1))))
      return 0;
    result->type_lengths= (unsigned int *)(result->type_names + result->count+1);
      DBUG_RETURN(0);
    result->type_lengths= (uint*)(result->type_names + result->count+1);
    List_iterator<String> it(*src);
    String conv;
    for (uint i=0; i < result->count; i++)
@@ -604,7 +605,7 @@ create_typelib(MEM_ROOT *mem_root, create_field *field_def, List<String> *src)
    result->type_names[result->count]= 0;
    result->type_lengths[result->count]= 0;
  }
  return result;
  DBUG_RETURN(result);
}


Loading