Debian Codegraph @

mysql-test/suite/rpl/r/rpl_stm_rewrt_db.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 drop database if exists mysqltest1;
7 create database mysqltest1;
8 use mysqltest1;
9 create table t1 (a int);
10 insert into t1 values(9);
11 select * from mysqltest1.t1;
12 a
13 9
14 include/sync_slave_sql_with_master.inc
15 show databases like 'mysqltest1';
16 Database (mysqltest1)
17 mysqltest1
18 select * from test.t1;
19 a
20 9
21 drop table t1;
22 drop database mysqltest1;
23 include/sync_slave_sql_with_master.inc
24 drop database if exists rewrite;
25 create database rewrite;
26 use test;
27 create table t1 (a date, b date, c date not null, d date);
28 load data infile '../../std_data/loaddata1.dat' ignore into table t1 fields terminated by ',';
29 Warnings:
30 Warning 1265 Data truncated for column 'a' at row 1
31 Warning 1265 Data truncated for column 'c' at row 1
32 Warning 1265 Data truncated for column 'd' at row 1
33 Warning 1264 Out of range value for column 'a' at row 2
34 Warning 1264 Out of range value for column 'b' at row 2
35 Warning 1264 Out of range value for column 'c' at row 2
36 Warning 1265 Data truncated for column 'd' at row 2
37 Warning 4096 Delimiter ' ' in position 0 in datetime value ' 20030303' at row 3 is superfluous and is deprecated. Please remove.
38 load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',' IGNORE 2 LINES;
39 Warnings:
40 Warning 4096 Delimiter ' ' in position 0 in datetime value ' 20030303' at row 1 is superfluous and is deprecated. Please remove.
41 include/sync_slave_sql_with_master.inc
42 select * from rewrite.t1;
43 a b c d
44 0000-00-00 NULL 0000-00-00 0000-00-00
45 0000-00-00 0000-00-00 0000-00-00 0000-00-00
46 2003-03-03 2003-03-03 2003-03-03 NULL
47 2003-03-03 2003-03-03 2003-03-03 NULL
48 truncate table t1;
49 load data infile '../../std_data/loaddata1.dat' ignore into table t1 fields terminated by ',' LINES STARTING BY ',' (b,c,d);
50 Warnings:
51 Warning 1265 Data truncated for column 'c' at row 1
52 Warning 1265 Data truncated for column 'd' at row 1
53 Warning 1264 Out of range value for column 'b' at row 2
54 Warning 1264 Out of range value for column 'c' at row 2
55 Warning 1265 Data truncated for column 'd' at row 2
56 Warning 4096 Delimiter ' ' in position 0 in datetime value ' 20030303' at row 3 is superfluous and is deprecated. Please remove.
57 include/sync_slave_sql_with_master.inc
58 select * from rewrite.t1;
59 a b c d
60 NULL NULL 0000-00-00 0000-00-00
61 NULL 0000-00-00 0000-00-00 0000-00-00
62 NULL 2003-03-03 2003-03-03 NULL
63 drop table t1;
64 create table t1 (a text, b text);
65 load data infile '../../std_data/loaddata2.dat' ignore into table t1 fields terminated by ',' enclosed by '''';
66 Warnings:
67 Warning 1261 Row 3 doesn't contain data for all columns
68 include/sync_slave_sql_with_master.inc
69 select concat('|',a,'|'), concat('|',b,'|') from rewrite.t1;
70 concat('|',a,'|') concat('|',b,'|')
71 |Field A| |Field B|
72 |Field 1| |Field 2'
73 Field 3,'Field 4|
74 |Field 5' ,'Field 6| NULL
75 |Field 6| | 'Field 7'|
76 drop table t1;
77 create table t1 (a int, b char(10)) CHARACTER SET latin1;
78 load data infile '../../std_data/loaddata3.dat' ignore into table t1 fields terminated by '' enclosed by '' ignore 1 lines;
79 Warnings:
80 Warning 1366 Incorrect integer value: 'error ' for column 'a' at row 3
81 Warning 1262 Row 3 was truncated; it contained more data than there were input columns
82 Warning 1366 Incorrect integer value: 'wrong end ' for column 'a' at row 5
83 Warning 1262 Row 5 was truncated; it contained more data than there were input columns
84 include/sync_slave_sql_with_master.inc
85 select * from rewrite.t1;
86 a b
87 1 row 1
88 2 row 2
89 0 1234567890
90 3 row 3
91 0 1234567890
92 truncate table t1;
93 load data infile '../../std_data/loaddata4.dat' ignore into table t1 fields terminated by '' enclosed by '' lines terminated by '' ignore 1 lines;
94 Warnings:
95 Warning 1366 Incorrect integer value: '
96 ' for column 'a' at row 4
97 Warning 1261 Row 4 doesn't contain data for all columns
98 include/sync_slave_sql_with_master.inc
99 select * from rewrite.t1;
100 a b
101 1 row 1
102 2 row 2
103 3 row 3
104 0
105 set sql_log_bin= 0;
106 drop database rewrite;
107 set sql_log_bin= 1;
108 set sql_log_bin= 0;
109 drop table t1;
110 set sql_log_bin= 1;
111
112 ****
113 **** Bug #46861 Auto-closing of temporary tables broken by replicate-rewrite-db
114 ****
115
116 ****
117 **** Preparing the environment
118 ****
119 SET sql_log_bin= 0;
120 CREATE DATABASE database_master_temp_01;
121 CREATE DATABASE database_master_temp_02;
122 CREATE DATABASE database_master_temp_03;
123 SET sql_log_bin= 1;
124 SET sql_log_bin= 0;
125 CREATE DATABASE database_slave_temp_01;
126 CREATE DATABASE database_slave_temp_02;
127 CREATE DATABASE database_slave_temp_03;
128 SET sql_log_bin= 1;
129
130 ****
131 **** Creating temporary tables on different databases with different connections
132 ****
133 **** con_temp_01 --> creates
134 **** t_01_01_temp on database_master_temp_01
135 ****
136 **** con_temp_02 --> creates
137 **** t_01_01_temp on database_master_temp_01
138 **** t_02_01_temp, t_02_02_temp on database_master_temp_02
139 ****
140 **** con_temp_03 --> creates
141 **** t_01_01_temp on database_master_temp_01
142 **** t_02_01_temp, t_02_02_temp on database_master_temp_02
143 **** t_03_01_temp, t_03_02_temp, t_03_03_temp on database_master_temp_03
144 ****
145
146 con_temp_01
147
148 USE database_master_temp_01;
149 CREATE TEMPORARY TABLE t_01_01_temp(a int);
150 INSERT INTO t_01_01_temp VALUES(1);
151
152 con_temp_02
153
154 USE database_master_temp_01;
155 CREATE TEMPORARY TABLE t_01_01_temp(a int);
156 INSERT INTO t_01_01_temp VALUES(1);
157 USE database_master_temp_02;
158 CREATE TEMPORARY TABLE t_02_01_temp(a int);
159 INSERT INTO t_02_01_temp VALUES(1);
160 CREATE TEMPORARY TABLE t_02_02_temp(a int);
161 INSERT INTO t_02_02_temp VALUES(1);
162
163 con_temp_03
164
165 USE database_master_temp_01;
166 CREATE TEMPORARY TABLE t_01_01_temp(a int);
167 INSERT INTO t_01_01_temp VALUES(1);
168 USE database_master_temp_02;
169 CREATE TEMPORARY TABLE t_02_01_temp(a int);
170 INSERT INTO t_02_01_temp VALUES(1);
171 CREATE TEMPORARY TABLE t_02_02_temp(a int);
172 INSERT INTO t_02_02_temp VALUES(1);
173 USE database_master_temp_03;
174 CREATE TEMPORARY TABLE t_03_01_temp(a int);
175 INSERT INTO t_03_01_temp VALUES(1);
176 CREATE TEMPORARY TABLE t_03_02_temp(a int);
177 INSERT INTO t_03_02_temp VALUES(1);
178 CREATE TEMPORARY TABLE t_03_03_temp(a int);
179 INSERT INTO t_03_03_temp VALUES(1);
180
181 **** Dropping the connections
182 **** To be sure that the DROP statements have been logged, we make
183 **** sure that the number of open temporary tables at slave becomes
184 **** zero. If not,the test will time out.
185
186 include/sync_slave_sql_with_master.inc
187 show status like 'Replica_open_temp_tables';
188 Variable_name Value
189 Replica_open_temp_tables 10
190 flush logs;
191
192 **** Wait until number of open temporary tables at slave becomes zero
193
194
195 **** Check if every drop temporary table command is prepended with "use"
196
197 include/assert.inc [The number of drop temporary table events in binlog should be 6]
198 ****
199 **** Cleaning up the test case
200 ****
201 SET sql_log_bin= 0;
202 DROP DATABASE database_master_temp_01;
203 DROP DATABASE database_master_temp_02;
204 DROP DATABASE database_master_temp_03;
205 SET sql_log_bin= 1;
206 SET sql_log_bin= 0;
207 DROP DATABASE database_slave_temp_01;
208 DROP DATABASE database_slave_temp_02;
209 DROP DATABASE database_slave_temp_03;
210 SET sql_log_bin= 1;
211 include/sync_slave_sql_with_master.inc
212 include/rpl_end.inc