summaryrefslogtreecommitdiff
path: root/plugin/query_response_time/plugin.cc
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/query_response_time/plugin.cc')
-rw-r--r--plugin/query_response_time/plugin.cc15
1 files changed, 9 insertions, 6 deletions
diff --git a/plugin/query_response_time/plugin.cc b/plugin/query_response_time/plugin.cc
index c337424039c..0362c6e2792 100644
--- a/plugin/query_response_time/plugin.cc
+++ b/plugin/query_response_time/plugin.cc
@@ -16,7 +16,7 @@
#define MYSQL_SERVER
#include <my_global.h>
#include <sql_class.h>
-#include <table.h>
+#include <sql_i_s.h>
#include <sql_show.h>
#include <mysql/plugin_audit.h>
#include "query_response_time.h"
@@ -71,19 +71,22 @@ static struct st_mysql_sys_var *query_response_time_info_vars[]=
};
+namespace Show {
+
ST_FIELD_INFO query_response_time_fields_info[] =
{
- { "TIME", QRT_TIME_STRING_LENGTH, MYSQL_TYPE_STRING, 0, 0, "Time", 0 },
- { "COUNT", MY_INT32_NUM_DECIMAL_DIGITS, MYSQL_TYPE_LONG, 0, MY_I_S_UNSIGNED, "Count", 0 },
- { "TOTAL", QRT_TIME_STRING_LENGTH, MYSQL_TYPE_STRING, 0, 0, "Total", 0 },
- { 0, 0, MYSQL_TYPE_NULL, 0, 0, 0, 0 }
+ Column("TIME", Varchar(QRT_TIME_STRING_LENGTH), NOT_NULL, "Time"),
+ Column("COUNT", ULong(), NOT_NULL, "Count"),
+ Column("TOTAL", Varchar(QRT_TIME_STRING_LENGTH), NOT_NULL, "Total"),
+ CEnd()
};
+} // namespace Show
static int query_response_time_info_init(void *p)
{
ST_SCHEMA_TABLE *i_s_query_response_time= (ST_SCHEMA_TABLE *) p;
- i_s_query_response_time->fields_info= query_response_time_fields_info;
+ i_s_query_response_time->fields_info= Show::query_response_time_fields_info;
i_s_query_response_time->fill_table= query_response_time_fill;
i_s_query_response_time->reset_table= query_response_time_flush;
query_response_time_init();