summaryrefslogtreecommitdiff
path: root/plugin/feedback
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/feedback')
-rw-r--r--plugin/feedback/feedback.cc35
-rw-r--r--plugin/feedback/sender_thread.cc5
-rw-r--r--plugin/feedback/url_base.cc6
-rw-r--r--plugin/feedback/url_http.cc6
4 files changed, 16 insertions, 36 deletions
diff --git a/plugin/feedback/feedback.cc b/plugin/feedback/feedback.cc
index 75e9a1e430e..eb3f562f329 100644
--- a/plugin/feedback/feedback.cc
+++ b/plugin/feedback/feedback.cc
@@ -67,9 +67,9 @@ ST_SCHEMA_TABLE *i_s_feedback; ///< table descriptor for our I_S table
*/
static ST_FIELD_INFO feedback_fields[] =
{
- {"VARIABLE_NAME", 255, MYSQL_TYPE_STRING, 0, 0, 0, 0},
- {"VARIABLE_VALUE", 1024, MYSQL_TYPE_STRING, 0, 0, 0, 0},
- {0, 0, MYSQL_TYPE_NULL, 0, 0, 0, 0}
+ Show::Column("VARIABLE_NAME", Show::Varchar(255), NOT_NULL),
+ Show::Column("VARIABLE_VALUE", Show::Varchar(1024), NOT_NULL),
+ Show::CEnd()
};
static COND * const OOM= (COND*)1;
@@ -93,8 +93,9 @@ static COND* make_cond(THD *thd, TABLE_LIST *tables, LEX_STRING *filter)
{
Item_cond_or *res= NULL;
Name_resolution_context nrc;
- const char *db= tables->db.str, *table= tables->alias.str;
- LEX_CSTRING *field= &tables->table->field[0]->field_name;
+ LEX_CSTRING &db= tables->db;
+ LEX_CSTRING &table= tables->alias;
+ LEX_CSTRING &field= tables->table->field[0]->field_name;
CHARSET_INFO *cs= &my_charset_latin1;
if (!filter->str)
@@ -177,13 +178,12 @@ static LEX_STRING vars_filter[]= {
{C_STRING_WITH_LEN("secure_auth")},
{C_STRING_WITH_LEN("slow_launch_time")},
{C_STRING_WITH_LEN("sql%")},
- {C_STRING_WITH_LEN("storage_engine")},
+ {C_STRING_WITH_LEN("default_storage_engine")},
{C_STRING_WITH_LEN("sync_binlog")},
{C_STRING_WITH_LEN("table_definition_cache")},
{C_STRING_WITH_LEN("table_open_cache")},
{C_STRING_WITH_LEN("thread_handling")},
{C_STRING_WITH_LEN("time_zone")},
- {C_STRING_WITH_LEN("timed_mutexes")},
{C_STRING_WITH_LEN("version%")},
{0, 0}
};
@@ -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;
@@ -409,24 +409,6 @@ static struct st_mysql_information_schema feedback =
} // namespace feedback
-mysql_declare_plugin(feedback)
-{
- MYSQL_INFORMATION_SCHEMA_PLUGIN,
- &feedback::feedback,
- "FEEDBACK",
- "Sergei Golubchik",
- "MariaDB User Feedback Plugin",
- PLUGIN_LICENSE_GPL,
- feedback::init,
- feedback::free,
- 0x0101,
- NULL,
- feedback::settings,
- NULL,
- 0
-}
-mysql_declare_plugin_end;
-#ifdef MARIA_PLUGIN_INTERFACE_VERSION
maria_declare_plugin(feedback)
{
MYSQL_INFORMATION_SCHEMA_PLUGIN,
@@ -444,4 +426,3 @@ maria_declare_plugin(feedback)
MariaDB_PLUGIN_MATURITY_STABLE
}
maria_declare_plugin_end;
-#endif
diff --git a/plugin/feedback/sender_thread.cc b/plugin/feedback/sender_thread.cc
index 3976c950541..73b1bc67e79 100644
--- a/plugin/feedback/sender_thread.cc
+++ b/plugin/feedback/sender_thread.cc
@@ -92,8 +92,7 @@ static int prepare_for_fill(TABLE_LIST *tables)
thd->variables.pseudo_thread_id= thd->thread_id;
server_threads.insert(thd);
thd->thread_stack= (char*) &tables;
- if (thd->store_globals())
- return 1;
+ thd->store_globals();
thd->mysys_var->current_cond= &sleep_condition;
thd->mysys_var->current_mutex= &sleep_mutex;
@@ -106,7 +105,7 @@ static int prepare_for_fill(TABLE_LIST *tables)
thd->db= null_clex_str;
thd->security_ctx->host_or_ip= "";
thd->security_ctx->db_access= DB_ACLS;
- thd->security_ctx->master_access= ~NO_ACCESS;
+ thd->security_ctx->master_access= ALL_KNOWN_ACL;
bzero((char*) &thd->net, sizeof(thd->net));
lex_start(thd);
mysql_init_select(thd->lex);
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)
{