summaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2020-01-29 13:50:26 +0100
committerSergei Golubchik <serg@mariadb.org>2020-03-10 19:24:22 +0100
commit7c58e97bf6f80a251046c5b3e7bce826fe058bd6 (patch)
tree7d32d26b320cf83296ee0ede2ea164ad116c4de8 /plugin
parent2ac3121af2767186c489054db5d4871d04b8eef4 (diff)
downloadmariadb-git-7c58e97bf6f80a251046c5b3e7bce826fe058bd6.tar.gz
perfschema memory related instrumentation changes
Diffstat (limited to 'plugin')
-rw-r--r--plugin/daemon_example/daemon_example.cc2
-rw-r--r--plugin/feedback/feedback.cc2
-rw-r--r--plugin/feedback/url_base.cc6
-rw-r--r--plugin/feedback/url_http.cc6
-rw-r--r--plugin/handler_socket/handlersocket/database.cpp2
-rw-r--r--plugin/server_audit/server_audit.c2
6 files changed, 10 insertions, 10 deletions
diff --git a/plugin/daemon_example/daemon_example.cc b/plugin/daemon_example/daemon_example.cc
index 87f48a1fa69..50026e92be1 100644
--- a/plugin/daemon_example/daemon_example.cc
+++ b/plugin/daemon_example/daemon_example.cc
@@ -98,7 +98,7 @@ static int daemon_example_plugin_init(void *p __attribute__ ((unused)))
struct st_plugin_int *plugin= (struct st_plugin_int *)p;
con= (struct mysql_heartbeat_context *)
- my_malloc(sizeof(struct mysql_heartbeat_context), MYF(0));
+ my_malloc(PSI_NOT_INSTRUMENTED, sizeof(struct mysql_heartbeat_context), MYF(0));
fn_format(heartbeat_filename, "mysql-heartbeat", "", ".log",
MY_REPLACE_EXT | MY_UNPACK_FILENAME);
diff --git a/plugin/feedback/feedback.cc b/plugin/feedback/feedback.cc
index b0fbc1abcde..03cc4ab465a 100644
--- a/plugin/feedback/feedback.cc
+++ b/plugin/feedback/feedback.cc
@@ -280,7 +280,7 @@ static int init(void *p)
if (*s == ' ')
url_count++;
- urls= (Url **)my_malloc(url_count*sizeof(Url*), MYF(MY_WME));
+ urls= (Url **)my_malloc(PSI_INSTRUMENT_ME, url_count*sizeof(Url*), MYF(MY_WME));
if (!urls)
return 1;
diff --git a/plugin/feedback/url_base.cc b/plugin/feedback/url_base.cc
index 21661079c98..1ba21306bdf 100644
--- a/plugin/feedback/url_base.cc
+++ b/plugin/feedback/url_base.cc
@@ -27,7 +27,7 @@ Url* http_create(const char *url, size_t url_length);
*/
Url* Url::create(const char *url, size_t url_length)
{
- url= my_strndup(url, url_length, MYF(MY_WME));
+ url= my_strndup(PSI_INSTRUMENT_ME, url, url_length, MYF(MY_WME));
if (!url)
return NULL;
@@ -88,8 +88,8 @@ int Url::parse_proxy_server(const char *proxy_server, size_t proxy_length,
port->length= 2;
}
- host->str= my_strndup(host->str, host->length, MYF(MY_WME));
- port->str= my_strndup(port->str, port->length, MYF(MY_WME));
+ host->str= my_strndup(PSI_INSTRUMENT_ME, host->str, host->length, MYF(MY_WME));
+ port->str= my_strndup(PSI_INSTRUMENT_ME, port->str, port->length, MYF(MY_WME));
return 0;
}
diff --git a/plugin/feedback/url_http.cc b/plugin/feedback/url_http.cc
index db05adebdd2..98116dd04f1 100644
--- a/plugin/feedback/url_http.cc
+++ b/plugin/feedback/url_http.cc
@@ -143,9 +143,9 @@ Url* http_create(const char *url, size_t url_length)
if (!host.length || !port.length || path.str[0] != '/')
return NULL;
- host.str= my_strndup(host.str, host.length, MYF(MY_WME));
- port.str= my_strndup(port.str, port.length, MYF(MY_WME));
- path.str= my_strndup(path.str, path.length, MYF(MY_WME));
+ host.str= my_strndup(PSI_INSTRUMENT_ME, host.str, host.length, MYF(MY_WME));
+ port.str= my_strndup(PSI_INSTRUMENT_ME, port.str, port.length, MYF(MY_WME));
+ path.str= my_strndup(PSI_INSTRUMENT_ME, path.str, path.length, MYF(MY_WME));
if (!host.str || !port.str || !path.str)
{
diff --git a/plugin/handler_socket/handlersocket/database.cpp b/plugin/handler_socket/handlersocket/database.cpp
index 52ea8f2a8c4..8f172a95151 100644
--- a/plugin/handler_socket/handlersocket/database.cpp
+++ b/plugin/handler_socket/handlersocket/database.cpp
@@ -298,7 +298,7 @@ dbcontext::init_thread(const void *stack_bottom, volatile int& shutdown_flag)
thd->options |= OPTION_BIN_LOG;
#endif
safeFree((char*) thd->db.str);
- thd->db.str= my_strdup("handlersocket", MYF(0));
+ thd->db.str= my_strdup(PSI_NOT_INSTRUMENTED, "handlersocket", MYF(0));
thd->db.length= sizeof("handlersocket")-1;
}
thd->variables.option_bits |= OPTION_TABLE_LOCK;
diff --git a/plugin/server_audit/server_audit.c b/plugin/server_audit/server_audit.c
index 609cf0f1ac1..4ec58249d68 100644
--- a/plugin/server_audit/server_audit.c
+++ b/plugin/server_audit/server_audit.c
@@ -124,7 +124,7 @@ static char *default_home= (char *)".";
#define my_rename(A, B, C) loc_rename(A, B)
#define my_tell(A, B) loc_tell(A)
#define my_write(A, B, C, D) loc_write(A, B, C)
-#define my_malloc(A, B) malloc(A)
+#define my_malloc(A, B, C) malloc(B)
#define my_free(A) free(A)
#ifdef my_errno
#undef my_errno