| 1 |
# |
| 2 |
# Bug#28624707: MYSQL TRYING TO OFFLOAD QUERIES TO SECONDARY ENGINE |
| 3 |
# AFTER PLUGIN UNINSTALL |
| 4 |
# |
| 5 |
SELECT PLUGIN_STATUS FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME='MOCK'; |
| 6 |
PLUGIN_STATUS |
| 7 |
ACTIVE |
| 8 |
CREATE TABLE t(x INT) SECONDARY_ENGINE MOCK; |
| 9 |
INSERT INTO t VALUES (1); |
| 10 |
ALTER TABLE t SECONDARY_LOAD; |
| 11 |
# Should use the secondary engine. |
| 12 |
FLUSH STATUS; |
| 13 |
SELECT * FROM t; |
| 14 |
x |
| 15 |
SHOW STATUS LIKE 'Secondary_engine_execution_count'; |
| 16 |
Variable_name Value |
| 17 |
Secondary_engine_execution_count 1 |
| 18 |
# The plugin cannot be unloaded because there are still references |
| 19 |
# to it (from the table cache). Will give a warning about that. |
| 20 |
UNINSTALL PLUGIN mock; |
| 21 |
Warnings: |
| 22 |
Warning 1620 Plugin is busy and will be uninstalled on shutdown |
| 23 |
SELECT PLUGIN_STATUS FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME='MOCK'; |
| 24 |
PLUGIN_STATUS |
| 25 |
DELETED |
| 26 |
# Should not use the secondary engine. |
| 27 |
FLUSH STATUS; |
| 28 |
SELECT * FROM t; |
| 29 |
x |
| 30 |
1 |
| 31 |
SHOW STATUS LIKE 'Secondary_engine_execution_count'; |
| 32 |
Variable_name Value |
| 33 |
Secondary_engine_execution_count 0 |
| 34 |
DROP TABLE t; |
| 35 |
SELECT PLUGIN_STATUS FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME='MOCK'; |
| 36 |
PLUGIN_STATUS |