| 1 |
--echo # |
| 2 |
--echo # Test for the example pre parse query rewrite plugin. The example |
| 3 |
--echo # plugin rewrites queries to lowercase. |
| 4 |
--echo # |
| 5 |
|
| 6 |
--source suite/query_rewrite_plugins/include/have_plugin_rewrite_example.inc |
| 7 |
--source suite/query_rewrite_plugins/include/install_pre_parse_plugin.inc |
| 8 |
|
| 9 |
SELECT PLUGIN_NAME, PLUGIN_TYPE |
| 10 |
FROM information_schema.plugins |
| 11 |
WHERE plugin_name LIKE 'rewrite%'; |
| 12 |
|
| 13 |
--echo # We roll our own show warnings here. We try GET DIAGNOSTICS at the same |
| 14 |
--echo # time, so automatic SHOW WARNINGS would just be confusing. |
| 15 |
--disable_warnings |
| 16 |
|
| 17 |
SELECT 'LOWERCASE'; |
| 18 |
SHOW WARNINGS; |
| 19 |
|
| 20 |
SELECT 'LOWERCASE AGAIN'; |
| 21 |
GET DIAGNOSTICS CONDITION 1 @c1p1 = MESSAGE_TEXT; |
| 22 |
GET DIAGNOSTICS CONDITION 2 @c2p1 = MESSAGE_TEXT; |
| 23 |
|
| 24 |
SELECT @c1p1; |
| 25 |
SELECT @c2p1; |
| 26 |
|
| 27 |
--enable_warnings |
| 28 |
|
| 29 |
UNINSTALL PLUGIN rewrite_example; |
| 30 |
--source include/disconnect_connections.inc |
| 31 |
|
| 32 |
SELECT 'UPPERCASE'; |