Commit 0d2fffb6 authored by Sergei Petrunia's avatar Sergei Petrunia

MDEV-15686: Loading MyRocks plugin back after it has been unloaded causes a crash

Adjust the testcase to handle all possible outcomes.
parent d18a6614
......@@ -16,5 +16,16 @@ UNINSTALL SONAME 'ha_rocksdb';
call mtr.add_suppression("Plugin 'ROCKSDB.*' init function returned error.");
call mtr.add_suppression("Plugin 'ROCKSDB.*' registration as a INFORMATION SCHEMA failed.");
call mtr.add_suppression("Plugin 'ROCKSDB' registration as a STORAGE ENGINE failed");
#
# There are two possible scenarios:
# ha_rocksdb.{dll,so} is still loaded into mysqld's address space. Its
# global variables are in the state that doesn't allow it to be
# initialized back (this is what MDEV-15686 is about). This is handled
# by intentionally returning an error from rocksdb_init_func.
#
# The second case is when ha_rocksdb.{ddl,so} has been fully unloaded
# and so it will be now loaded as if it happens for the first time.
INSTALL SONAME 'ha_rocksdb';
ERROR HY000: Internal error: Loading MyRocks plugin after it has been unloaded is not supported. Please restart mysqld
# Whatever happened on the previous step, restore things to the way they
# were at testcase start.
UNINSTALL SONAME 'ha_rocksdb';
......@@ -34,5 +34,22 @@ call mtr.add_suppression("Plugin 'ROCKSDB.*' init function returned error.");
call mtr.add_suppression("Plugin 'ROCKSDB.*' registration as a INFORMATION SCHEMA failed.");
call mtr.add_suppression("Plugin 'ROCKSDB' registration as a STORAGE ENGINE failed");
--error ER_INTERNAL_ERROR
--echo #
--echo # There are two possible scenarios:
--echo # ha_rocksdb.{dll,so} is still loaded into mysqld's address space. Its
--echo # global variables are in the state that doesn't allow it to be
--echo # initialized back (this is what MDEV-15686 is about). This is handled
--echo # by intentionally returning an error from rocksdb_init_func.
--echo #
--echo # The second case is when ha_rocksdb.{ddl,so} has been fully unloaded
--echo # and so it will be now loaded as if it happens for the first time.
--error 0,ER_INTERNAL_ERROR
INSTALL SONAME 'ha_rocksdb';
--echo # Whatever happened on the previous step, restore things to the way they
--echo # were at testcase start.
--error 0,ER_SP_DOES_NOT_EXIST
UNINSTALL SONAME 'ha_rocksdb';
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment