45 lines
1.9 KiB
Text
45 lines
1.9 KiB
Text
INSTALL COMPONENT "file://component_test_backup_lock_service";
|
|
|
|
--echo # The component component_test_backup_lock_service acquires BACKUP LOCK
|
|
--echo # during its initialization. Check that BACKUP LOCK has been really acquired.
|
|
SELECT object_type, object_schema, object_name, lock_type, lock_duration, lock_status
|
|
FROM performance_schema.metadata_locks WHERE object_type = 'BACKUP LOCK';
|
|
|
|
--echo # Stop component.
|
|
UNINSTALL COMPONENT "file://component_test_backup_lock_service";
|
|
|
|
--echo # The component component_test_backup_lock_service releases BACKUP LOCK
|
|
--echo # during its unloading. Check that BACKUP LOCK has been really released.
|
|
SELECT object_schema, object_name, lock_type, lock_duration, lock_status
|
|
FROM performance_schema.metadata_locks WHERE object_type = 'BACKUP LOCK';
|
|
|
|
--echo #
|
|
--echo # Bug#33087212: COMPONENT COMPONENT_TEST_BACKUP_LOCK_SERVICE CAUSES
|
|
--echo # CRASH AT SHUTDOWN.
|
|
--echo #
|
|
|
|
--echo # Verify that it is possible to shut down the server while the
|
|
--echo # component is installed.
|
|
INSTALL COMPONENT 'file://component_test_backup_lock_service';
|
|
|
|
--echo # shutdown the server from mtr.
|
|
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
|
--shutdown_server
|
|
--source include/wait_until_disconnected.inc
|
|
|
|
--echo # restart the server.
|
|
--exec echo "restart:" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
|
--source include/wait_until_connected_again.inc
|
|
|
|
--error ER_COMPONENTS_CANT_LOAD
|
|
INSTALL COMPONENT 'file://component_test_backup_lock_service';
|
|
|
|
--echo # Check for the presence of BACKUP LOCK. There should not be one
|
|
--echo # since the lock is not re-acquired when the component is reloaded
|
|
--echo # as part of boot.
|
|
SELECT object_schema, object_name, lock_type, lock_duration, lock_status
|
|
FROM performance_schema.metadata_locks WHERE object_type = 'BACKUP LOCK';
|
|
|
|
--echo # But the component is registered and can be unloaded.
|
|
UNINSTALL COMPONENT 'file://component_test_backup_lock_service';
|
|
|