mirror of
https://github.com/MariaDB/server.git
synced 2025-01-27 17:33:44 +01:00
Fixed compiler warnings and a not critical memory leak
sql/keycaches.cc: Added free_all_rpl_filters() to be able to free all filters at cleanup sql/keycaches.h: Added prototype sql/rpl_rli.cc: Fixed compiler warning sql/slave.cc: Free all rpl_filters at cleanup sql/sp.cc: Fixed compiler warning when not all struct elements was initialized sql/sql_acl.cc: Fixed compiler warning when not all struct elements was initialized storage/perfschema/table_events_waits.cc: Fixed compiler warning when not all struct elements was initialized storage/perfschema/table_events_waits_summary.cc: Fixed compiler warning when not all struct elements was initialized storage/perfschema/table_ews_global_by_event_name.cc: Fixed compiler warning when not all struct elements was initialized storage/perfschema/table_file_instances.cc: Fixed compiler warning when not all struct elements was initialized storage/perfschema/table_file_summary.cc: Fixed compiler warning when not all struct elements was initialized storage/perfschema/table_performance_timers.cc: Fixed compiler warning when not all struct elements was initialized storage/perfschema/table_setup_consumers.cc: Fixed compiler warning when not all struct elements was initialized storage/perfschema/table_setup_instruments.cc: Fixed compiler warning when not all struct elements was initialized storage/perfschema/table_setup_timers.cc: Fixed compiler warning when not all struct elements was initialized storage/perfschema/table_sync_instances.cc: Fixed compiler warning when not all struct elements was initialized storage/perfschema/table_threads.cc: Fixed compiler warning when not all struct elements was initialized storage/xtradb/os/os0file.c: Fixed compiler warning when not all struct elements was initialized
This commit is contained in:
parent
43fe53acc2
commit
8e52698580
18 changed files with 27 additions and 21 deletions
sql
storage
|
@ -225,3 +225,7 @@ void free_rpl_filter(const char *name, Rpl_filter *filter)
|
|||
delete filter;
|
||||
}
|
||||
|
||||
void free_all_rpl_filters()
|
||||
{
|
||||
rpl_filters.delete_elements((void (*)(const char*, uchar*)) free_rpl_filter);
|
||||
}
|
||||
|
|
|
@ -53,5 +53,6 @@ Rpl_filter *create_rpl_filter(const char *name, uint length);
|
|||
Rpl_filter *get_rpl_filter(LEX_STRING *filter_name);
|
||||
Rpl_filter *get_or_create_rpl_filter(const char *name, uint length);
|
||||
void free_rpl_filter(const char *name, Rpl_filter *filter);
|
||||
void free_all_rpl_filters(void);
|
||||
|
||||
#endif /* KEYCACHES_INCLUDED */
|
||||
|
|
|
@ -48,7 +48,8 @@ Relay_log_info::Relay_log_info(bool is_slave_recovery)
|
|||
no_storage(FALSE), replicate_same_server_id(::replicate_same_server_id),
|
||||
info_fd(-1), cur_log_fd(-1), relay_log(&sync_relaylog_period),
|
||||
sync_counter(0), is_relay_log_recovery(is_slave_recovery),
|
||||
save_temporary_tables(0), cur_log_old_open_count(0), group_relay_log_pos(0),
|
||||
save_temporary_tables(0), mi(0),
|
||||
cur_log_old_open_count(0), group_relay_log_pos(0),
|
||||
event_relay_log_pos(0),
|
||||
#if HAVE_valgrind
|
||||
is_fake(FALSE),
|
||||
|
@ -61,7 +62,7 @@ Relay_log_info::Relay_log_info(bool is_slave_recovery)
|
|||
gtid_sub_id(0), tables_to_lock(0), tables_to_lock_count(0),
|
||||
last_event_start_time(0), deferred_events(NULL),m_flags(0),
|
||||
row_stmt_start_timestamp(0), long_find_row_note_printed(false),
|
||||
m_annotate_event(0), mi(0)
|
||||
m_annotate_event(0)
|
||||
{
|
||||
DBUG_ENTER("Relay_log_info::Relay_log_info");
|
||||
|
||||
|
|
|
@ -870,6 +870,7 @@ void end_slave()
|
|||
master_info_index= 0;
|
||||
active_mi= 0;
|
||||
mysql_mutex_unlock(&LOCK_active_mi);
|
||||
free_all_rpl_filters();
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
|
|
|
@ -168,7 +168,7 @@ TABLE_FIELD_TYPE proc_table_fields[MYSQL_PROC_FIELD_COUNT] =
|
|||
};
|
||||
|
||||
static const TABLE_FIELD_DEF
|
||||
proc_table_def= {MYSQL_PROC_FIELD_COUNT, proc_table_fields};
|
||||
proc_table_def= {MYSQL_PROC_FIELD_COUNT, proc_table_fields, 0, (uint*) 0 };
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
|
|
|
@ -171,7 +171,7 @@ TABLE_FIELD_TYPE mysql_db_table_fields[MYSQL_DB_FIELD_COUNT] = {
|
|||
};
|
||||
|
||||
const TABLE_FIELD_DEF
|
||||
mysql_db_table_def= {MYSQL_DB_FIELD_COUNT, mysql_db_table_fields};
|
||||
mysql_db_table_def= {MYSQL_DB_FIELD_COUNT, mysql_db_table_fields, 0, (uint*) 0 };
|
||||
|
||||
static LEX_STRING native_password_plugin_name= {
|
||||
C_STRING_WITH_LEN("mysql_native_password")
|
||||
|
|
|
@ -113,7 +113,7 @@ static const TABLE_FIELD_TYPE field_types[]=
|
|||
|
||||
TABLE_FIELD_DEF
|
||||
table_events_waits_current::m_field_def=
|
||||
{ 16, field_types };
|
||||
{ 16, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_events_waits_current::m_share=
|
||||
|
|
|
@ -69,7 +69,7 @@ static const TABLE_FIELD_TYPE ews_by_thread_by_event_name_field_types[]=
|
|||
|
||||
TABLE_FIELD_DEF
|
||||
table_events_waits_summary_by_thread_by_event_name::m_field_def=
|
||||
{ 7, ews_by_thread_by_event_name_field_types };
|
||||
{ 7, ews_by_thread_by_event_name_field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_events_waits_summary_by_thread_by_event_name::m_share=
|
||||
|
@ -381,7 +381,7 @@ static const TABLE_FIELD_TYPE ews_by_instance_field_types[]=
|
|||
|
||||
TABLE_FIELD_DEF
|
||||
table_events_waits_summary_by_instance::m_field_def=
|
||||
{ 7, ews_by_instance_field_types };
|
||||
{ 7, ews_by_instance_field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_events_waits_summary_by_instance::m_share=
|
||||
|
|
|
@ -64,7 +64,7 @@ static const TABLE_FIELD_TYPE field_types[]=
|
|||
|
||||
TABLE_FIELD_DEF
|
||||
table_ews_global_by_event_name::m_field_def=
|
||||
{ 6, field_types };
|
||||
{ 6, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_ews_global_by_event_name::m_share=
|
||||
|
|
|
@ -49,7 +49,7 @@ static const TABLE_FIELD_TYPE field_types[]=
|
|||
|
||||
TABLE_FIELD_DEF
|
||||
table_file_instances::m_field_def=
|
||||
{ 3, field_types };
|
||||
{ 3, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_file_instances::m_share=
|
||||
|
|
|
@ -59,7 +59,7 @@ static const TABLE_FIELD_TYPE fs_by_event_name_field_types[]=
|
|||
|
||||
TABLE_FIELD_DEF
|
||||
table_file_summary_by_event_name::m_field_def=
|
||||
{ 5, fs_by_event_name_field_types };
|
||||
{ 5, fs_by_event_name_field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_file_summary_by_event_name::m_share=
|
||||
|
@ -222,7 +222,7 @@ static const TABLE_FIELD_TYPE fs_by_instance_field_types[]=
|
|||
|
||||
TABLE_FIELD_DEF
|
||||
table_file_summary_by_instance::m_field_def=
|
||||
{ 6, fs_by_instance_field_types };
|
||||
{ 6, fs_by_instance_field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_file_summary_by_instance::m_share=
|
||||
|
|
|
@ -53,7 +53,7 @@ static const TABLE_FIELD_TYPE field_types[]=
|
|||
|
||||
TABLE_FIELD_DEF
|
||||
table_performance_timers::m_field_def=
|
||||
{ 4, field_types };
|
||||
{ 4, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_performance_timers::m_share=
|
||||
|
|
|
@ -79,7 +79,7 @@ static const TABLE_FIELD_TYPE field_types[]=
|
|||
|
||||
TABLE_FIELD_DEF
|
||||
table_setup_consumers::m_field_def=
|
||||
{ 2, field_types };
|
||||
{ 2, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_setup_consumers::m_share=
|
||||
|
|
|
@ -49,7 +49,7 @@ static const TABLE_FIELD_TYPE field_types[]=
|
|||
|
||||
TABLE_FIELD_DEF
|
||||
table_setup_instruments::m_field_def=
|
||||
{ 3, field_types };
|
||||
{ 3, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_setup_instruments::m_share=
|
||||
|
|
|
@ -52,7 +52,7 @@ static const TABLE_FIELD_TYPE field_types[]=
|
|||
|
||||
TABLE_FIELD_DEF
|
||||
table_setup_timers::m_field_def=
|
||||
{ 2, field_types };
|
||||
{ 2, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_setup_timers::m_share=
|
||||
|
|
|
@ -50,7 +50,7 @@ static const TABLE_FIELD_TYPE mutex_field_types[]=
|
|||
|
||||
TABLE_FIELD_DEF
|
||||
table_mutex_instances::m_field_def=
|
||||
{ 3, mutex_field_types };
|
||||
{ 3, mutex_field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_mutex_instances::m_share=
|
||||
|
@ -218,7 +218,7 @@ static const TABLE_FIELD_TYPE rwlock_field_types[]=
|
|||
|
||||
TABLE_FIELD_DEF
|
||||
table_rwlock_instances::m_field_def=
|
||||
{ 4, rwlock_field_types };
|
||||
{ 4, rwlock_field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_rwlock_instances::m_share=
|
||||
|
@ -383,7 +383,7 @@ static const TABLE_FIELD_TYPE cond_field_types[]=
|
|||
|
||||
TABLE_FIELD_DEF
|
||||
table_cond_instances::m_field_def=
|
||||
{ 2, cond_field_types };
|
||||
{ 2, cond_field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_cond_instances::m_share=
|
||||
|
|
|
@ -47,7 +47,7 @@ static const TABLE_FIELD_TYPE field_types[]=
|
|||
|
||||
TABLE_FIELD_DEF
|
||||
table_threads::m_field_def=
|
||||
{ 3, field_types };
|
||||
{ 3, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_threads::m_share=
|
||||
|
|
|
@ -1462,7 +1462,6 @@ os_file_set_nocache(
|
|||
#endif
|
||||
static int os_file_set_atomic_writes(os_file_t file, const char *name)
|
||||
{
|
||||
static int first_time = 1;
|
||||
int atomic_option = 1;
|
||||
|
||||
int ret = ioctl (file, DFS_IOCTL_ATOMIC_WRITE_SET, &atomic_option);
|
||||
|
@ -2138,7 +2137,7 @@ os_file_set_size(
|
|||
"InnoDB: Error: preallocating data for"
|
||||
" file %s failed at\n"
|
||||
"InnoDB: offset 0 size %lld %lld. Operating system"
|
||||
" error number %llu.\n"
|
||||
" error number %d.\n"
|
||||
"InnoDB: Check that the disk is not full"
|
||||
" or a disk quota exceeded.\n"
|
||||
"InnoDB: Some operating system error numbers"
|
||||
|
|
Loading…
Add table
Reference in a new issue