summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2013-04-17 22:33:33 +0300
committerMichael Widenius <monty@askmonty.org>2013-04-17 22:33:33 +0300
commit8e526985800678de20356cece1183f49f69c26f9 (patch)
tree2213bcbcd50e92689e28be978d378cea33cfd497 /sql
parent43fe53acc225a2cea07188d142c1c0f8364cc43b (diff)
downloadmariadb-git-8e526985800678de20356cece1183f49f69c26f9.tar.gz
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
Diffstat (limited to 'sql')
-rw-r--r--sql/keycaches.cc4
-rw-r--r--sql/keycaches.h1
-rw-r--r--sql/rpl_rli.cc5
-rw-r--r--sql/slave.cc1
-rw-r--r--sql/sp.cc2
-rw-r--r--sql/sql_acl.cc2
6 files changed, 11 insertions, 4 deletions
diff --git a/sql/keycaches.cc b/sql/keycaches.cc
index 9e4b943dc83..120aa7e1029 100644
--- a/sql/keycaches.cc
+++ b/sql/keycaches.cc
@@ -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);
+}
diff --git a/sql/keycaches.h b/sql/keycaches.h
index 2d52cb28973..32537339e2e 100644
--- a/sql/keycaches.h
+++ b/sql/keycaches.h
@@ -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 */
diff --git a/sql/rpl_rli.cc b/sql/rpl_rli.cc
index 11c6e54c8f8..7733354b106 100644
--- a/sql/rpl_rli.cc
+++ b/sql/rpl_rli.cc
@@ -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");
diff --git a/sql/slave.cc b/sql/slave.cc
index 2e436d5e8b4..0a260272929 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -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;
}
diff --git a/sql/sp.cc b/sql/sp.cc
index b80fa968483..2aec9d19869 100644
--- a/sql/sp.cc
+++ b/sql/sp.cc
@@ -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 };
/*************************************************************************/
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index 7810bdb16e2..69290a64a29 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -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")