Debian Codegraph @

mysql-test/suite/rpl/t/rpl_innodb_doublewrite_dir_01.test

raw
1 #****************************************************************
2 # wl#5655: Test the doublewrite functionality with rpl scenario
3 # Set different system parameter values in Master and Slave
4 # Check the error messages on Master and Slave
5 # Set doubelwrite file path On Master and Slave side
6 #****************************************************************
7 --source include/have_innodb_16k.inc
8 --source include/not_valgrind.inc
9 --source include/master-slave.inc
10
11 --echo [Connection Master]
12 --connection master
13
14 USE test;
15
16 --let $MYSQLD_MASTER_DATADIR =`SELECT @@datadir`
17
18 # Check datadir path
19 --replace_result $MYSQLD_MASTER_DATADIR MASTER_DATADIR
20 SELECT @@datadir;
21
22 # Check doublewrite file created in the specified path on master side
23 --list_files $MYSQL_TMP_DIR/#DBWL-DIR/
24
25 # Check the following variables as set in *.opt file
26 --replace_result $MYSQL_TMP_DIR "MASTER_DOUBLEWRITE_DIR"
27 SELECT @@innodb_doublewrite_dir;
28
29 SELECT @@innodb_doublewrite_files;
30
31 SELECT @@innodb_doublewrite_pages;
32
33 SELECT @@innodb_doublewrite_batch_size;
34
35 --source include/sync_slave_sql_with_master.inc
36 --echo [Connection Slave]
37
38 USE test;
39
40 --let $MYSQLD_SLAVE_DATADIR =`SELECT @@datadir`
41
42 # Check datadir path
43 --replace_result $MYSQLD_SLAVE_DATADIR SLAVE_DATADIR
44 SELECT @@datadir;
45
46 # Check the following variables as set in *.opt file
47
48 --let $SLAVE_DBLWR_DIR = $MYSQLTEST_VARDIR/mysqld.2/data
49
50 # Check doublewrite file created in the specified path on slave side
51 --list_files $SLAVE_DBLWR_DIR/##%DBWL-DIR/
52
53 --replace_result $SLAVE_DBLWR_DIR "SLAVE_DOUBLEWRITE_DIR"
54 SELECT @@innodb_doublewrite_dir;
55
56 SELECT @@innodb_doublewrite_files;
57
58 SELECT @@innodb_doublewrite_pages;
59
60 SELECT @@innodb_doublewrite_batch_size;
61
62
63 --echo [Connection Master]
64 --connection master
65
66 USE test;
67
68 CREATE TABLE tab(c1 int,c2 TEXT);
69
70 INSERT INTO tab VALUES(1,'Testing of WL#5655');
71
72 SELECT * FROM tab;
73
74 # Check following error messages on Master side
75 --error ER_INCORRECT_GLOBAL_LOCAL_VAR
76 SET GLOBAL innodb_doublewrite_dir=$MYSQL_TMP_DIR/"#DBWL-DIR";
77
78 --error ER_INCORRECT_GLOBAL_LOCAL_VAR
79 SET GLOBAL innodb_doublewrite_files=1;
80
81 --error ER_INCORRECT_GLOBAL_LOCAL_VAR
82 SET GLOBAL innodb_doublewrite_pages=10;
83
84 --error ER_INCORRECT_GLOBAL_LOCAL_VAR
85 SET GLOBAL innodb_doublewrite_batch_size=1;
86
87 --source include/sync_slave_sql_with_master.inc
88 --echo [Connection Slave]
89
90 USE test;
91
92 SELECT * FROM tab;
93
94 # Check following error messages on Slave side
95 --error ER_INCORRECT_GLOBAL_LOCAL_VAR
96 SET GLOBAL innodb_doublewrite_dir=$MYSQL_TMP_DIR/"#DBWL-DIR";
97
98 --error ER_INCORRECT_GLOBAL_LOCAL_VAR
99 SET GLOBAL innodb_doublewrite_files=1;
100
101 --error ER_INCORRECT_GLOBAL_LOCAL_VAR
102 SET GLOBAL innodb_doublewrite_pages=10;
103
104 --error ER_INCORRECT_GLOBAL_LOCAL_VAR
105 SET GLOBAL innodb_doublewrite_batch_size=1;
106
107 --echo [Connection Master]
108 --connection master
109
110 USE test;
111
112 DROP TABLE tab;
113
114 --source include/sync_slave_sql_with_master.inc
115 --echo [Connection Slave]
116
117 USE test;
118
119 --error ER_NO_SUCH_TABLE
120 SELECT * FROM tab;
121
122 --source include/rpl_end.inc