mirror of
https://github.com/MariaDB/server.git
synced 2026-05-08 08:04:29 +02: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:
parent
348efa5220
commit
307c0b77a1
38 changed files with 273 additions and 230 deletions
|
|
@ -1593,6 +1593,11 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
|||
statistic_increment(thd->status_var.com_other, &LOCK_status);
|
||||
thd->enable_slow_log= opt_log_slow_admin_statements;
|
||||
db= thd->alloc(db_len + tbl_len + 2);
|
||||
if (!db)
|
||||
{
|
||||
my_message(ER_OUT_OF_RESOURCES, ER(ER_OUT_OF_RESOURCES), MYF(0));
|
||||
break;
|
||||
}
|
||||
tbl_name= strmake(db, packet + 1, db_len)+1;
|
||||
strmake(tbl_name, packet + db_len + 2, tbl_len);
|
||||
mysql_table_dump(thd, db, tbl_name, -1);
|
||||
|
|
@ -1606,14 +1611,14 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
|||
statistic_increment(thd->status_var.com_other, &LOCK_status);
|
||||
char *user= (char*) packet;
|
||||
char *passwd= strend(user)+1;
|
||||
/*
|
||||
/*
|
||||
Old clients send null-terminated string ('\0' for empty string) for
|
||||
password. New clients send the size (1 byte) + string (not null
|
||||
terminated, so also '\0' for empty string).
|
||||
*/
|
||||
char db_buff[NAME_LEN+1]; // buffer to store db in utf8
|
||||
char db_buff[NAME_LEN+1]; // buffer to store db in utf8
|
||||
char *db= passwd;
|
||||
uint passwd_len= thd->client_capabilities & CLIENT_SECURE_CONNECTION ?
|
||||
uint passwd_len= thd->client_capabilities & CLIENT_SECURE_CONNECTION ?
|
||||
*passwd++ : strlen(passwd);
|
||||
db+= passwd_len + 1;
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
|
|
@ -6865,6 +6870,7 @@ bool reload_acl_and_cache(THD *thd, ulong options, TABLE_LIST *tables,
|
|||
#ifdef HAVE_REPLICATION
|
||||
if (options & REFRESH_MASTER)
|
||||
{
|
||||
DBUG_ASSERT(thd);
|
||||
tmp_write_to_binlog= 0;
|
||||
if (reset_master(thd))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue