Debian Codegraph @

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

raw
1 # ==== Purpose ====
2 #
3 # Test that aliases of variables in binary log aren't ignored with NAME_CONST.
4 #
5 # ==== Method ====
6 #
7 # Create a procedure with aliases of variables, then replicate it to slave.
8 # BUG#35515 Aliases of variables in binary log are ignored with NAME_CONST.
9 #
10
11 source include/master-slave.inc;
12
13 --echo ==== Initialize ====
14
15 --connection master
16
17 create table t1 (id int);
18
19 --echo ==== create a procedure that has a column aliase in a subquery ====
20 --disable_warnings
21 drop procedure if exists test_procedure;
22 --enable_warnings
23 delimiter $$;
24 create procedure test_procedure(_id int)
25 begin
26 insert into t1 (id)
27 select a.id
28 from
29 ( select _id as id ) a;
30 end;$$
31 delimiter ;$$
32
33 --echo ==== enable the binary log, then call the procedure ====
34 call test_procedure(1234);
35
36
37 sync_slave_with_master;
38 select * from t1 order by id;
39
40 --echo ==== Clean up ====
41
42 connection master;
43 drop table t1;
44 drop procedure test_procedure;
45 --source include/rpl_end.inc