mirror of
https://github.com/MariaDB/server.git
synced 2025-04-11 01:35:33 +02:00
MDEV-4568 - Port Percona response time distribution as audit plugin
Test fixes.
This commit is contained in:
parent
afd134e212
commit
ccdfeb04d8
6 changed files with 7 additions and 19 deletions
mysql-test
plugin/query_response_time/mysql-test/query_response_time
|
@ -18,7 +18,7 @@ concat("test1", x)
|
|||
test1-12
|
||||
show status like 'audit_null%';
|
||||
Variable_name Value
|
||||
Audit_null_called 19
|
||||
Audit_null_called 20
|
||||
Audit_null_general_log 7
|
||||
Audit_null_general_error 1
|
||||
Audit_null_general_result 5
|
||||
|
|
|
@ -27,7 +27,8 @@ perl;
|
|||
feedback debug temp-pool ssl des-key-file xtradb sequence
|
||||
thread-concurrency super-large-pages mutex-deadlock-detector
|
||||
null-audit aria pbxt oqgraph sphinx thread-handling
|
||||
test-sql-discovery rpl-semi-sync query-cache-info/;
|
||||
test-sql-discovery rpl-semi-sync query-cache-info
|
||||
query-response-time/;
|
||||
|
||||
# And substitute the content some environment variables with their
|
||||
# names:
|
||||
|
|
|
@ -10,30 +10,18 @@ QUERY_RESPONSE_TIME CREATE TEMPORARY TABLE `QUERY_RESPONSE_TIME` (
|
|||
`COUNT` int(11) unsigned NOT NULL DEFAULT '0',
|
||||
`TOTAL` varchar(14) NOT NULL DEFAULT ''
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=utf8
|
||||
SELECT * FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME LIKE 'query_response_time%';;
|
||||
SELECT PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_TYPE, PLUGIN_AUTHOR, PLUGIN_DESCRIPTION, PLUGIN_LICENSE, PLUGIN_MATURITY FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME LIKE 'query_response_time%';;
|
||||
PLUGIN_NAME QUERY_RESPONSE_TIME
|
||||
PLUGIN_VERSION 1.0
|
||||
PLUGIN_STATUS ACTIVE
|
||||
PLUGIN_TYPE INFORMATION SCHEMA
|
||||
PLUGIN_TYPE_VERSION 100002.0
|
||||
PLUGIN_LIBRARY QUERY_RESPONSE_TIME_SO
|
||||
PLUGIN_LIBRARY_VERSION 1.4
|
||||
PLUGIN_AUTHOR Percona and Sergey Vojtovich
|
||||
PLUGIN_DESCRIPTION Query Response Time Distribution INFORMATION_SCHEMA Plugin
|
||||
PLUGIN_LICENSE GPL
|
||||
LOAD_OPTION ON
|
||||
PLUGIN_MATURITY Alpha
|
||||
PLUGIN_AUTH_VERSION 1.0
|
||||
PLUGIN_NAME QUERY_RESPONSE_TIME_AUDIT
|
||||
PLUGIN_VERSION 1.0
|
||||
PLUGIN_STATUS ACTIVE
|
||||
PLUGIN_TYPE AUDIT
|
||||
PLUGIN_TYPE_VERSION 3.0
|
||||
PLUGIN_LIBRARY QUERY_RESPONSE_TIME_SO
|
||||
PLUGIN_LIBRARY_VERSION 1.4
|
||||
PLUGIN_AUTHOR Percona and Sergey Vojtovich
|
||||
PLUGIN_DESCRIPTION Query Response Time Distribution Audit Plugin
|
||||
PLUGIN_LICENSE GPL
|
||||
LOAD_OPTION ON
|
||||
PLUGIN_MATURITY Alpha
|
||||
PLUGIN_AUTH_VERSION 1.0
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
SHOW VARIABLES WHERE VARIABLE_NAME LIKE 'query_response_time%' AND VARIABLE_NAME!='query_response_time_exec_time_debug';
|
||||
SHOW CREATE TABLE INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
||||
--replace_result $QUERY_RESPONSE_TIME_SO QUERY_RESPONSE_TIME_SO
|
||||
--query_vertical SELECT * FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME LIKE 'query_response_time%';
|
||||
--query_vertical SELECT PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_TYPE, PLUGIN_AUTHOR, PLUGIN_DESCRIPTION, PLUGIN_LICENSE, PLUGIN_MATURITY FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME LIKE 'query_response_time%';
|
||||
|
|
|
@ -1 +1 @@
|
|||
--plugin-load-add=$QUERY_RESPONSE_TIME_SO --plugin-query-response-time=ON --plugin-query-response-time-audit=ON
|
||||
--plugin-load=$QUERY_RESPONSE_TIME_SO --plugin-query-response-time=ON --plugin-query-response-time-audit=ON
|
||||
|
|
|
@ -4,7 +4,7 @@ package My::Suite::Query_response_time;
|
|||
|
||||
return "No QUERY_RESPONSE_TIME plugin" unless
|
||||
$ENV{QUERY_RESPONSE_TIME_SO} or
|
||||
$::mysqld_variables{'query_response_time'} eq "ON";
|
||||
$::mysqld_variables{'query-response-time'} eq "ON";
|
||||
|
||||
return "Not run for embedded server" if $::opt_embedded_server;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue