File: component_backup_lock_service.test

package info (click to toggle)
mysql-8.0 8.0.43-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,273,924 kB
  • sloc: cpp: 4,684,605; ansic: 412,450; pascal: 108,398; java: 83,641; perl: 30,221; cs: 27,067; sql: 26,594; sh: 24,181; python: 21,816; yacc: 17,169; php: 11,522; xml: 7,388; javascript: 7,076; makefile: 2,194; lex: 1,075; awk: 670; asm: 520; objc: 183; ruby: 97; lisp: 86
file content (46 lines) | stat: -rw-r--r-- 1,942 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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
--enable_reconnect
--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';