Debian Codegraph @

mysql-test/suite/innodb_undo/r/purge_on_replica.result

raw
1 include/master-slave.inc
2 Warnings:
3 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
4 Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information.
5 [connection master]
6 # 1: Set replica parameters
7 set @orig_max_undo_log_size = @@innodb_max_undo_log_size;
8 set @orig_truncate_frequency = @@innodb_purge_rseg_truncate_frequency;
9 set global innodb_max_undo_log_size=10485760;
10 set global innodb_purge_rseg_truncate_frequency=1;
11 set global super_read_only=1;
12
13 # 2: Preparing database
14 create table t1(id int);
15 create procedure insert_data()
16 begin
17 declare i int;
18 set i=1;
19 while(i<=500000) do
20 insert into t1(id) values(i);
21 set i=i+1;
22 end while;
23 end;$$
24 begin;
25 # 3: Inserting data, filling undo logs
26 call insert_data();
27 # 4: commit, trigger undo log truncation
28 commit;
29 include/sync_slave_sql_with_master.inc
30 select tablespace_name, file_name from information_schema.files
31 where file_name like "%undo%";
32 TABLESPACE_NAME FILE_NAME
33 innodb_undo_001 ./undo_001
34 innodb_undo_002 ./undo_002
35 select name, row_format from information_schema.innodb_tablespaces
36 where name like '%undo%';
37 name row_format
38 innodb_undo_001 Undo
39 innodb_undo_002 Undo
40 # 5: undo files undo_001 and undo_002 are expected to exist,
41 # while files undo_001_trunc.log and undo_002_trunc.log are expected to not exist
42 undo_001
43 undo_002
44 set global innodb_max_undo_log_size=@orig_max_undo_log_size;
45 set global innodb_purge_rseg_truncate_frequency=@orig_truncate_frequency;
46 set global super_read_only = 0;
47 set global read_only = 0;
48 drop procedure insert_data;
49 drop table t1;
50 include/rpl_end.inc