diff options
author | unknown <serg@serg.mylan> | 2006-01-03 17:54:54 +0100 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2006-01-03 17:54:54 +0100 |
commit | 12e2206547b561e645115aa18e3868211ae00864 (patch) | |
tree | 2c671047ec7c4161ca04e53f5f54c6797f81afd4 /sql/ha_myisam.cc | |
parent | 4f0f49bbd12f0c2265a47c7235288b8b302b6534 (diff) | |
download | mariadb-git-12e2206547b561e645115aa18e3868211ae00864.tar.gz |
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
Diffstat (limited to 'sql/ha_myisam.cc')
-rw-r--r-- | sql/ha_myisam.cc | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/sql/ha_myisam.cc b/sql/ha_myisam.cc index 08fd2d9a8e3..ff6431fa0f3 100644 --- a/sql/ha_myisam.cc +++ b/sql/ha_myisam.cc @@ -266,7 +266,8 @@ int ha_myisam::dump(THD* thd, int fd) if (fd < 0) { - my_net_write(net, "", 0); + if (my_net_write(net, "", 0)) + error = errno ? errno : EPIPE; net_flush(net); } @@ -365,12 +366,14 @@ int ha_myisam::check(THD* thd, HA_CHECK_OPT* check_opt) { uint old_testflag=param.testflag; param.testflag|=T_MEDIUM; - init_io_cache(¶m.read_cache, file->dfile, - my_default_record_cache_size, READ_CACHE, - share->pack.header_length, 1, MYF(MY_WME)); - error |= chk_data_link(¶m, file, param.testflag & T_EXTEND); - end_io_cache(&(param.read_cache)); - param.testflag=old_testflag; + if (!(error= init_io_cache(¶m.read_cache, file->dfile, + my_default_record_cache_size, READ_CACHE, + share->pack.header_length, 1, MYF(MY_WME)))) + { + error= chk_data_link(¶m, file, param.testflag & T_EXTEND); + end_io_cache(&(param.read_cache)); + } + param.testflag= old_testflag; } } if (!error) |