1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

many warnings (practically safe but annoying) corrected

client/mysqladmin.cc:
  don't use the handler after it's closed
client/mysqlbinlog.cc:
  memory leak
client/mysqldump.c:
  many "ignore return value" warnings, one "NULL dereference"
cmd-line-utils/libedit/history.c:
  memory leak
include/my_base.h:
  cleanup
libmysql/libmysql.c:
  "return value ignored" warning
myisam/mi_delete.c:
  "return value ignored" warning
myisam/myisampack.c:
  "out-of-bound access" warning
myisam/sort.c:
  "double free" warning
mysys/default_modify.c:
  "double free" warning
mysys/mf_iocache2.c:
  "return value ignored" warnings
mysys/my_bitmap.c:
  s/return/DBUG_RETURN/
mysys/my_error.c:
  memory leak
server-tools/instance-manager/parse.cc:
  "NULL dereference" warning
sql-common/client.c:
  "NULL dereference" warning
sql/field.cc:
  deadcode, "NULL dereference", "uninitialized" warnings
sql/field.h:
  unused parameters removed from constructor
sql/ha_myisam.cc:
  "return value ignored" warnings
sql/item.cc:
  "return value ignored" warnings
  changed constructor
sql/item_func.cc:
  "return value ignored" warnings
sql/log_event.cc:
  uninitialized warning
sql/opt_range.cc:
  "double free" and uninitialized warnings
sql/opt_range.h:
  "return value ignored" warning
sql/repl_failsafe.cc:
  "return value ignored" warning
sql/set_var.cc:
  "return value ignored" warning
sql/slave.cc:
  "return value ignored" warnings
sql/slave.h:
  new prototype
sql/sql_acl.cc:
  deadcode and "NULL dereference" warnings
sql/sql_db.cc:
  "return value ignored" warning
sql/sql_handler.cc:
  "NULL dereference" warning
sql/sql_help.cc:
  "NULL dereference" warning
sql/sql_insert.cc:
  "return value ignored" warning
sql/sql_parse.cc:
  "return value ignored" warning
  one more DBUG_ASSERT
sql/sql_repl.cc:
  "return value ignored" and memory leak warnings
sql/sql_show.cc:
  "return value ignored" and "NULL dereference"  warnings
sql/sql_test.cc:
  "return value ignored" warning
sql/table.cc:
  memory leak
sql/uniques.cc:
  "return value ignored" warning
  endspaces deleted
This commit is contained in:
unknown
2006-01-03 17:54:54 +01:00
parent 348efa5220
commit 307c0b77a1
38 changed files with 274 additions and 231 deletions

View File

@ -652,7 +652,6 @@ SQL_SELECT *make_select(TABLE *head, table_map const_tables,
table_map read_tables, COND *conds,
bool allow_null_cond,
int *error)
{
SQL_SELECT *select;
DBUG_ENTER("make_select");
@ -5774,10 +5773,7 @@ QUICK_RANGE_SELECT *get_quick_select_for_ref(THD *thd, TABLE *table,
if (!quick)
return 0; /* no ranges found */
if (quick->init())
{
delete quick;
goto err;
}
quick->records= records;
if (cp_buffer_from_ref(thd,ref) && thd->is_fatal_error ||
@ -7111,7 +7107,7 @@ get_best_group_min_max(PARAM *param, SEL_TREE *tree)
ha_rows cur_records;
SEL_ARG *cur_index_tree= NULL;
ha_rows cur_quick_prefix_records= 0;
uint cur_param_idx;
uint cur_param_idx=MAX_KEY;
key_map cur_used_key_parts;
uint pk= param->table->s->primary_key;
@ -7327,6 +7323,7 @@ get_best_group_min_max(PARAM *param, SEL_TREE *tree)
*/
if (cur_read_cost < best_read_cost - (DBL_EPSILON * cur_read_cost))
{
DBUG_ASSERT(tree != 0 || cur_param_idx == MAX_KEY);
index_info= cur_index_info;
index= cur_index;
best_read_cost= cur_read_cost;