Debian Codegraph @

mysql-test/suite/binlog/r/binlog_purge_binary_logs_backup_lock.result

raw
1 #
2 # Initialization
3 #
4 RESET MASTER;
5 CREATE TABLE t1 (c INT);
6 FLUSH BINARY LOGS;
7 SHOW BINARY LOGS;
8 Log_name File_size Encrypted
9 binlog.000001 SIZE No
10 binlog.000002 SIZE No
11 #
12 # Execute PURGE BINARY LOGS but stop on a sync point
13 #
14 [connection default]
15 PURGE BINARY LOGS TO 'binlog.000001';
16 [START] PURGE BINARY LOGS TO 'binlog.000001';
17 #
18 # Check errors for LOCK INSTANCE FOR BACKUP operation
19 #
20 SET SESSION lock_wait_timeout = 1;
21 LOCK INSTANCE FOR BACKUP;
22 ERROR HY000: Lock wait timeout exceeded; try restarting transaction
23 #
24 # Continue PURGE BINARY LOGS operation
25 #
26 [END] PURGE BINARY LOGS TO 'binlog.000001';
27 #
28 # Check no errors for LOCK INSTANCE FOR BACKUP operation
29 #
30 LOCK INSTANCE FOR BACKUP;
31 UNLOCK INSTANCE;
32 #
33 # Cleanup
34 #
35 [connection default]
36 DROP TABLE t1;