1#
2# Test of multiple query rewrite plugins. This will only work on an
3# installation, where all plugins are in the same directory.
4#
5Warnings:
6Warning	1681	'RESET QUERY CACHE' is deprecated and will be removed in a future release.
7Warnings:
8Warning	1681	'RESET QUERY CACHE' is deprecated and will be removed in a future release.
9# Query rewrite plugin was installed.
10INSTALL PLUGIN rewrite_example SONAME 'rewrite_example.xxx';
11INSERT INTO query_rewrite.rewrite_rules ( pattern, replacement )
12VALUES ( 'SELECT "abc"', 'SELECT "Rewritten"' );
13Warnings:
14Note	1105	Query 'INSERT INTO query_rewrite.rewrite_rules ( pattern, replacement )
15VALUES ( 'SELECT "abc"', 'SELECT "Rewritten"' )' rewritten to 'insert into query_rewrite.rewrite_rules ( pattern, replacement )
16values ( 'select "abc"', 'select "rewritten"' )' by a query rewrite plugin
17Note	1105	Query 'SHOW WARNINGS' rewritten to 'show warnings' by a query rewrite plugin
18CALL query_rewrite.flush_rewrite_rules();
19Warnings:
20Warning	1681	'RESET QUERY CACHE' is deprecated and will be removed in a future release.
21Note	1105	Query 'SHOW WARNINGS' rewritten to 'show warnings' by a query rewrite plugin
22SELECT * FROM query_rewrite.rewrite_rules;
23id	pattern	pattern_database	replacement	enabled	message
241	select "abc"	NULL	select "rewritten"	YES	NULL
25Warnings:
26Note	1105	Query 'SELECT * FROM query_rewrite.rewrite_rules' rewritten to 'select * from query_rewrite.rewrite_rules' by a query rewrite plugin
27Note	1105	Query 'SHOW WARNINGS' rewritten to 'show warnings' by a query rewrite plugin
28SELECT 'abc';
29rewritten
30rewritten
31Warnings:
32Note	1105	Query 'SELECT 'abc'' rewritten to 'select 'abc'' by a query rewrite plugin
33Note	1105	Query 'select 'abc'' rewritten to 'select "rewritten"' by a query rewrite plugin
34Note	1105	Query 'SHOW WARNINGS' rewritten to 'show warnings' by a query rewrite plugin
35SELECT 'ABC';
36rewritten
37rewritten
38Warnings:
39Note	1105	Query 'SELECT 'ABC'' rewritten to 'select 'abc'' by a query rewrite plugin
40Note	1105	Query 'select 'abc'' rewritten to 'select "rewritten"' by a query rewrite plugin
41Note	1105	Query 'SHOW WARNINGS' rewritten to 'show warnings' by a query rewrite plugin
42UNINSTALL PLUGIN rewrite_example;
43Warnings:
44Note	1105	Query 'UNINSTALL PLUGIN rewrite_example' rewritten to 'uninstall plugin rewrite_example' by a query rewrite plugin
45Warning	1620	Plugin is busy and will be uninstalled on shutdown
46Note	1105	Query 'SHOW WARNINGS' rewritten to 'show warnings' by a query rewrite plugin
47Warnings:
48Note	1105	Query 'DROP DATABASE IF EXISTS query_rewrite' rewritten to 'drop database if exists query_rewrite' by a query rewrite plugin
49Note	1105	Query 'SHOW WARNINGS' rewritten to 'show warnings' by a query rewrite plugin
50Warnings:
51Note	1105	Query 'DROP FUNCTION IF EXISTS load_rewrite_rules' rewritten to 'drop function if exists load_rewrite_rules' by a query rewrite plugin
52Note	1105	Query 'SHOW WARNINGS' rewritten to 'show warnings' by a query rewrite plugin
53Warnings:
54Note	1105	Query 'UNINSTALL PLUGIN rewriter' rewritten to 'uninstall plugin rewriter' by a query rewrite plugin
55Warning	1620	Plugin is busy and will be uninstalled on shutdown
56Note	1105	Query 'SHOW WARNINGS' rewritten to 'show warnings' by a query rewrite plugin
57# Query rewrite plugin was queued for uninstalling.
58