config root man

Current Path : /home/usr.opt/mysql57/mysql-test/suite/query_rewrite_plugins/t/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //home/usr.opt/mysql57/mysql-test/suite/query_rewrite_plugins/t/performance_schema.test

--echo #
--echo # Verifies that the original query ends up in the statements history in
--echo # performance_schema, and that digests are calculated even though the
--echo # statements_digest consumer is disabled.
--echo #

--source suite/query_rewrite_plugins/include/have_plugin_rewriter.inc

SELECT enabled INTO @original_setting
FROM performance_schema.setup_consumers
WHERE NAME = 'statements_digest';

UPDATE performance_schema.setup_consumers
SET enabled = 'NO'
WHERE NAME = 'statements_digest';

SELECT 'original';

--echo # The digest column is now NULL since no digest was asked for.
SELECT sql_text, digest
FROM performance_schema.events_statements_history
WHERE sql_text = "SELECT 'original'";

--source suite/query_rewrite_plugins/include/install_rewriter.inc

INSERT INTO query_rewrite.rewrite_rules ( pattern, replacement )
VALUES ( 'SELECT "original"', 'SELECT "rewritten"' );

CALL query_rewrite.flush_rewrite_rules();

SELECT 'original';

SELECT sql_text, digest
FROM performance_schema.events_statements_history
WHERE sql_text LIKE 'SELECT %';

UPDATE performance_schema.setup_consumers
SET enabled = @original_setting
WHERE NAME = 'statements_digest';

--source suite/query_rewrite_plugins/include/uninstall_rewriter.inc

Man Man