Debian Codegraph @

mysql-test/suite/rpl_nogtid/r/rpl_sp_effects.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 SET @old_log_bin_trust_function_creators= @@global.log_bin_trust_function_creators;
7 Warnings:
8 Warning 1287 '@@log_bin_trust_function_creators' is deprecated and will be removed in a future release.
9 create table t1 (a int) engine = innodb;
10 SET GLOBAL log_bin_trust_function_creators = 1;
11 Warnings:
12 Warning 1287 '@@log_bin_trust_function_creators' is deprecated and will be removed in a future release.
13 SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
14 create procedure p1()
15 begin
16 declare spv int default 0;
17 while spv < 5 do
18 insert into t1 values(spv+1);
19 set spv=spv+1;
20 end while;
21 end//
22 call p1();
23 include/sync_slave_sql_with_master.inc
24 SELECT * FROM t1 ORDER BY a;
25 a
26 1
27 2
28 3
29 4
30 5
31 SELECT * FROM t1 ORDER BY a;
32 a
33 1
34 2
35 3
36 4
37 5
38 create procedure p2()
39 begin
40 declare a int default 4;
41 create table t2 engine = innodb as select a;
42 end//
43 call p2();
44 SELECT * FROM t2 ORDER BY a;
45 a
46 4
47 include/sync_slave_sql_with_master.inc
48 SELECT * FROM t2 ORDER BY a;
49 a
50 4
51 drop procedure p1;
52 drop procedure p2;
53 drop table t2;
54 create function f1(x int) returns int
55 begin
56 insert into t1 values(x);
57 return x+1;
58 end//
59 create procedure p1(a int, b int)
60 begin
61 declare v int default f1(5);
62 if (f1(6)) then
63 select 'yes';
64 end if;
65 set v = f1(7);
66 while f1(8) < 1 do
67 select 'this cant be';
68 end while;
69 end//
70 call p1(f1(1), f1(2));
71 yes
72 yes
73 SELECT * FROM t1 ORDER BY a;
74 a
75 1
76 1
77 2
78 2
79 3
80 4
81 5
82 5
83 6
84 7
85 8
86 create table t2(a int) engine = innodb;
87 insert into t2 values (10),(11);
88 SELECT a,f1(a) FROM t2 ORDER BY a;
89 a f1(a)
90 10 11
91 11 12
92 insert into t2 select f1(3);
93 SELECT 'master:',a FROM t1 ORDER BY a;
94 master: a
95 master: 1
96 master: 1
97 master: 2
98 master: 2
99 master: 3
100 master: 3
101 master: 4
102 master: 5
103 master: 5
104 master: 6
105 master: 7
106 master: 8
107 master: 10
108 master: 11
109 include/sync_slave_sql_with_master.inc
110 SELECT 'slave:',a FROM t1 ORDER BY a;
111 slave: a
112 slave: 1
113 slave: 1
114 slave: 2
115 slave: 2
116 slave: 3
117 slave: 3
118 slave: 4
119 slave: 5
120 slave: 5
121 slave: 6
122 slave: 7
123 slave: 8
124 slave: 10
125 slave: 11
126 drop procedure p1;
127 delete from t1;
128 delete from t2;
129 delete from t1;
130 insert into t2 values(1),(2);
131 create view v1 as select f1(a) as f from t2;
132 select * from v1 order by f;
133 f
134 2
135 3
136 SELECT 'master:',a FROM t1 ORDER BY a;
137 master: a
138 master: 1
139 master: 2
140 include/sync_slave_sql_with_master.inc
141 SELECT 'slave:',a FROM t1 ORDER BY a;
142 slave: a
143 slave: 1
144 slave: 2
145 drop view v1;
146 delete from t1;
147 prepare s1 from 'select f1(?)';
148 set @xx=123;
149 execute s1 using @xx;
150 f1(?)
151 124
152 SELECT 'master:',a FROM t1 ORDER BY a;
153 master: a
154 master: 123
155 include/sync_slave_sql_with_master.inc
156 SELECT 'slave:',a FROM t1 ORDER BY a;
157 slave: a
158 slave: 123
159 delete from t1;
160 create procedure p1(spv int)
161 begin
162 declare c cursor for select f1(spv) from t2;
163 while (spv > 2) do
164 open c;
165 fetch c into spv;
166 close c;
167 set spv= spv - 10;
168 end while;
169 end//
170 call p1(15);
171 SELECT 'master:',a FROM t1 ORDER BY a;
172 master: a
173 master: 6
174 master: 6
175 master: 15
176 master: 15
177 include/sync_slave_sql_with_master.inc
178 SELECT 'slave:',a FROM t1 ORDER BY a;
179 slave: a
180 slave: 6
181 slave: 6
182 slave: 15
183 slave: 15
184 drop procedure p1;
185 drop function f1;
186 drop table t1,t2;
187 create table t1 (a int);
188 create procedure p1()
189 begin
190 insert into t1 values(@x);
191 set @x=@x+1;
192 insert into t1 values(@x);
193 if (f2()) then
194 insert into t1 values(1243);
195 end if;
196 end//
197 create function f2() returns int
198 begin
199 insert into t1 values(@z);
200 set @z=@z+1;
201 insert into t1 values(@z);
202 return 0;
203 end//
204 create function f1() returns int
205 begin
206 insert into t1 values(@y);
207 call p1();
208 return 0;
209 end//
210 set @x=10;
211 set @y=20;
212 set @z=100;
213 select f1();
214 f1()
215 0
216 set @x=30;
217 call p1();
218 SELECT 'master', a FROM t1 ORDER BY a;
219 master a
220 master 10
221 master 11
222 master 20
223 master 30
224 master 31
225 master 100
226 master 101
227 master 101
228 master 102
229 include/sync_slave_sql_with_master.inc
230 SELECT 'slave', a FROM t1 ORDER BY a;
231 slave a
232 slave 10
233 slave 11
234 slave 20
235 slave 30
236 slave 31
237 slave 100
238 slave 101
239 slave 101
240 slave 102
241 drop table t1;
242 drop function f1;
243 drop function f2;
244 drop procedure p1;
245 include/sync_slave_sql_with_master.inc
246 create table t2 (b BIT(7));
247 create procedure sp_bug26199(bitvalue BIT(7))
248 begin
249 insert into t2 set b = bitvalue;
250 end //
251 create function sf_bug26199(b BIT(7)) returns int
252 begin
253 insert ignore into t2 values(b);
254 return 0;
255 end//
256 call sp_bug26199(b'1110');
257 call sp_bug26199('\0');
258 select sf_bug26199(b'1111111');
259 sf_bug26199(b'1111111')
260 0
261 select sf_bug26199(b'101111111');
262 sf_bug26199(b'101111111')
263 0
264 Warnings:
265 Warning 1264 Out of range value for column 'b' at row 1
266 select sf_bug26199('\'');
267 sf_bug26199('\'')
268 0
269 select hex(b) from t2;
270 hex(b)
271 E
272 0
273 7F
274 7F
275 27
276 include/sync_slave_sql_with_master.inc
277 select hex(b) from t2;
278 hex(b)
279 E
280 0
281 7F
282 7F
283 27
284 drop table t2;
285 drop procedure sp_bug26199;
286 drop function sf_bug26199;
287 SET @@global.log_bin_trust_function_creators= @old_log_bin_trust_function_creators;
288 Warnings:
289 Warning 1287 '@@log_bin_trust_function_creators' is deprecated and will be removed in a future release.
290 SET sql_mode = default;
291 include/sync_slave_sql_with_master.inc
292 end of the tests
293 include/rpl_end.inc