Details
Description
Should not thd local also be reset?
# Install the example engine (declares example.int_var)
|
INSTALL PLUGIN example SONAME 'ha_example.so'; |
# Registered default |
SELECT @@session.example_int_var AS first_install_default; |
first_install_default
|
0
|
# Set a per-session value on THIS connection (max of the -1..1 range) |
SET SESSION example_int_var = 1; |
SELECT @@session.example_int_var AS after_set; |
after_set
|
1
|
# Also move the GLOBAL off its registered default (0) to a distinct value |
# (-1), so a post-reinstall read can tell "reset to default" (0) from |
# "stale value survived" (-1) |
SET GLOBAL example_int_var = -1; |
SELECT @@global.example_int_var AS global_after_set; |
global_after_set
|
-1
|
UNINSTALL PLUGIN example;
|
# Read the session var while the plugin is uninstalled |
SELECT @@session.example_int_var AS when_uninstalled; |
ERROR HY000: Unknown system variable 'example_int_var' |
# Reinstall on the SAME connection/server; session value MUST be default |
# again.
|
INSTALL PLUGIN example SONAME 'ha_example.so'; |
SELECT @@session.example_int_var AS after_reinstall; |
after_reinstall
|
1
|
SELECT @@global.example_int_var AS after_reinstall_global; |
after_reinstall_global
|
0
|
UNINSTALL PLUGIN example;
|