#
# Test of recovery. We load some rewrite rule and restart the server.
# The rewrite rule should now be loaded.
#
Warnings:
Warning	1681	'RESET QUERY CACHE' is deprecated and will be removed in a future release.
Warnings:
Warning	1681	'RESET QUERY CACHE' is deprecated and will be removed in a future release.
# Query rewrite plugin was installed.
# checks that the plugin is well installed
SELECT plugin_name, plugin_type
FROM information_schema.plugins
WHERE plugin_name = 'Rewriter';
plugin_name	plugin_type
Rewriter	AUDIT
INSERT INTO query_rewrite.rewrite_rules ( pattern, replacement )
VALUES ( 'SELECT "Rewrite"', 'SELECT "Rewritten"' );
CALL query_rewrite.flush_rewrite_rules();
Warnings:
Warning	1681	'RESET QUERY CACHE' is deprecated and will be removed in a future release.
SELECT * FROM query_rewrite.rewrite_rules;
id	pattern	pattern_database	replacement	enabled	message
1	SELECT "Rewrite"	NULL	SELECT "Rewritten"	YES	NULL
SELECT 'Rewrite';
Rewritten
Rewritten
Warnings:
Note	1105	Query 'SELECT 'Rewrite'' rewritten to 'SELECT "Rewritten"' by a query rewrite plugin
#
# Restart the server
#
SELECT 'Rewrite';
Rewritten
Rewritten
Warnings:
Note	1105	Query 'SELECT 'Rewrite'' rewritten to 'SELECT "Rewritten"' by a query rewrite plugin
Warnings:
Warning	1620	Plugin is busy and will be uninstalled on shutdown
# Query rewrite plugin was queued for uninstalling.
