Debian Codegraph @

mysql-test/suite/rpl/r/rpl_mix_found_rows.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 ==== Initialize ====
7 **** On Master ****
8 CREATE TABLE t1 (a INT);
9 CREATE TABLE logtbl (sect INT, test INT, count INT);
10 INSERT INTO t1 VALUES (1),(2),(3);
11 INSERT INTO t1 SELECT 2*a+3 FROM t1;
12 INSERT INTO t1 SELECT 2*a+3 FROM t1;
13 INSERT INTO t1 SELECT 2*a+3 FROM t1;
14 INSERT INTO t1 SELECT 2*a+3 FROM t1;
15 INSERT INTO t1 SELECT 2*a+3 FROM t1;
16 INSERT INTO t1 SELECT 2*a+3 FROM t1;
17 ==== Checking a procedure ====
18 **** On Master ****
19 CREATE PROCEDURE just_log(sect INT, test INT) BEGIN
20 INSERT INTO logtbl VALUES (sect,test,FOUND_ROWS());
21 END $$
22 Warnings:
23 Warning 1287 FOUND_ROWS() is deprecated and will be removed in a future release. Consider using COUNT(*) instead.
24 include/sync_slave_sql_with_master.inc
25 **** On Master 1 ****
26 SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1;
27 a
28 7
29 Warnings:
30 Warning 1287 SQL_CALC_FOUND_ROWS is deprecated and will be removed in a future release. Consider using two separate queries instead.
31 CALL just_log(1,1);
32 **** On Master ****
33 SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1;
34 a
35 7
36 Warnings:
37 Warning 1287 SQL_CALC_FOUND_ROWS is deprecated and will be removed in a future release. Consider using two separate queries instead.
38 CALL just_log(1,2);
39 **** On Master 1 ****
40 SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a < 5 ORDER BY a LIMIT 1;
41 a
42 1
43 Warnings:
44 Warning 1287 SQL_CALC_FOUND_ROWS is deprecated and will be removed in a future release. Consider using two separate queries instead.
45 CALL just_log(1,3);
46 include/sync_slave_sql_with_master.inc
47 **** On Master ****
48 SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1;
49 a
50 7
51 Warnings:
52 Warning 1287 SQL_CALC_FOUND_ROWS is deprecated and will be removed in a future release. Consider using two separate queries instead.
53 CALL just_log(1,4);
54 include/sync_slave_sql_with_master.inc
55 SELECT * FROM logtbl WHERE sect = 1 ORDER BY sect,test;
56 sect test count
57 1 1 183
58 1 2 183
59 1 3 3
60 1 4 183
61 **** On Slave ****
62 include/sync_slave_sql_with_master.inc
63 SELECT * FROM logtbl WHERE sect = 1 ORDER BY sect,test;
64 sect test count
65 1 1 183
66 1 2 183
67 1 3 3
68 1 4 183
69 ==== Checking a stored function ====
70 **** On Master ****
71 CREATE FUNCTION log_rows(sect INT, test INT)
72 RETURNS INT
73 BEGIN
74 DECLARE found_rows INT;
75 SELECT FOUND_ROWS() INTO found_rows;
76 INSERT INTO logtbl VALUES(sect,test,found_rows);
77 RETURN found_rows;
78 END $$
79 Warnings:
80 Warning 1287 FOUND_ROWS() is deprecated and will be removed in a future release. Consider using COUNT(*) instead.
81 SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a < 5 ORDER BY a LIMIT 1;
82 a
83 1
84 Warnings:
85 Warning 1287 SQL_CALC_FOUND_ROWS is deprecated and will be removed in a future release. Consider using two separate queries instead.
86 SELECT log_rows(2,1), log_rows(2,2);
87 log_rows(2,1) log_rows(2,2)
88 3 3
89 CREATE TABLE t2 (a INT, b INT);
90 CREATE TRIGGER t2_tr BEFORE INSERT ON t2 FOR EACH ROW
91 BEGIN
92 INSERT INTO logtbl VALUES (NEW.a, NEW.b, FOUND_ROWS());
93 END $$
94 Warnings:
95 Warning 1287 FOUND_ROWS() is deprecated and will be removed in a future release. Consider using COUNT(*) instead.
96 SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a < 5 ORDER BY a LIMIT 1;
97 a
98 1
99 Warnings:
100 Warning 1287 SQL_CALC_FOUND_ROWS is deprecated and will be removed in a future release. Consider using two separate queries instead.
101 INSERT INTO t2 VALUES (2,3), (2,4);
102 DROP TRIGGER t2_tr;
103 CREATE TRIGGER t2_tr BEFORE INSERT ON t2 FOR EACH ROW
104 BEGIN
105 DECLARE dummy INT;
106 SELECT log_rows(NEW.a, NEW.b) INTO dummy;
107 END $$
108 SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1;
109 a
110 7
111 Warnings:
112 Warning 1287 SQL_CALC_FOUND_ROWS is deprecated and will be removed in a future release. Consider using two separate queries instead.
113 INSERT INTO t2 VALUES (2,5), (2,6);
114 DROP TRIGGER t2_tr;
115 CREATE PROCEDURE log_me_inner(sect INT, test INT)
116 BEGIN
117 DECLARE dummy INT;
118 SELECT log_rows(sect, test) INTO dummy;
119 SELECT log_rows(sect, test+1) INTO dummy;
120 END $$
121 CREATE PROCEDURE log_me(sect INT, test INT)
122 BEGIN
123 CALL log_me_inner(sect,test);
124 END $$
125 CREATE TRIGGER t2_tr BEFORE INSERT ON t2 FOR EACH ROW
126 BEGIN
127 CALL log_me(NEW.a, NEW.b);
128 END $$
129 SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1;
130 a
131 7
132 Warnings:
133 Warning 1287 SQL_CALC_FOUND_ROWS is deprecated and will be removed in a future release. Consider using two separate queries instead.
134 INSERT INTO t2 VALUES (2,5), (2,6);
135 SELECT * FROM logtbl WHERE sect = 2 ORDER BY sect,test;
136 sect test count
137 2 1 3
138 2 2 3
139 2 3 3
140 2 4 3
141 2 5 183
142 2 5 183
143 2 6 183
144 2 6 1
145 2 6 183
146 2 7 1
147 include/sync_slave_sql_with_master.inc
148 SELECT * FROM logtbl WHERE sect = 2 ORDER BY sect,test;
149 sect test count
150 2 1 3
151 2 2 3
152 2 3 3
153 2 4 3
154 2 5 183
155 2 5 183
156 2 6 183
157 2 6 1
158 2 6 183
159 2 7 1
160 DROP TABLE t1, t2, logtbl;
161 DROP PROCEDURE just_log;
162 DROP PROCEDURE log_me;
163 DROP PROCEDURE log_me_inner;
164 DROP FUNCTION log_rows;
165 include/sync_slave_sql_with_master.inc
166 include/rpl_end.inc