Debian Codegraph @

mysql-test/suite/binlog_nogtid/r/binlog_stm_binlog_myisam.result

raw
1 RESET MASTER;
2 drop table if exists t1;
3 reset master;
4 create table t1 (a bigint unsigned, b bigint(20) unsigned);
5 Warnings:
6 Warning 1681 Integer display width is deprecated and will be removed in a future release.
7 prepare stmt from "insert into t1 values (?,?)";
8 set @a= 9999999999999999;
9 set @b= 14632475938453979136;
10 execute stmt using @a, @b;
11 deallocate prepare stmt;
12 drop table t1;
13 include/show_binlog_events.inc
14 Log_name Pos Event_type Server_id End_log_pos Info
15 binlog.000001 # Query # # use `test`; create table t1 (a bigint unsigned, b bigint(20) unsigned)
16 binlog.000001 # Query # # BEGIN
17 binlog.000001 # Query # # use `test`; insert into t1 values (9999999999999999,14632475938453979136)
18 binlog.000001 # Query # # COMMIT
19 binlog.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
20 reset master;
21 CREATE DATABASE bug39182 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
22 Warnings:
23 Warning 3719 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
24 Warning 3778 'utf8mb3_unicode_ci' is a collation of the deprecated character set UTF8MB3. Please consider using UTF8MB4 with an appropriate collation instead.
25 USE bug39182;
26 CREATE TABLE t1 (a VARCHAR(255) COLLATE utf8_unicode_ci)
27 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
28 Warnings:
29 Warning 3778 'utf8mb3_unicode_ci' is a collation of the deprecated character set UTF8MB3. Please consider using UTF8MB4 with an appropriate collation instead.
30 Warning 3719 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
31 Warning 3778 'utf8mb3_unicode_ci' is a collation of the deprecated character set UTF8MB3. Please consider using UTF8MB4 with an appropriate collation instead.
32 CREATE PROCEDURE p1()
33 BEGIN
34 DECLARE s1 VARCHAR(255);
35 SET s1= "test";
36 CREATE TEMPORARY TABLE tmp1
37 SELECT * FROM t1 WHERE a LIKE CONCAT("%", s1, "%");
38 SELECT
39 COLLATION(NAME_CONST('s1', _utf8'test')) c1,
40 COLLATION(NAME_CONST('s1', _utf8'test' COLLATE utf8_unicode_ci)) c2,
41 COLLATION(s1) c3,
42 COERCIBILITY(NAME_CONST('s1', _utf8'test')) d1,
43 COERCIBILITY(NAME_CONST('s1', _utf8'test' COLLATE utf8_unicode_ci)) d2,
44 COERCIBILITY(s1) d3;
45 DROP TEMPORARY TABLE tmp1;
46 END//
47 Warnings:
48 Warning 3719 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
49 Warning 3719 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
50 Warning 3719 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
51 Warning 3719 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
52 CALL p1();
53 c1 c2 c3 d1 d2 d3
54 utf8mb3_general_ci utf8mb3_unicode_ci utf8mb3_unicode_ci 4 0 2
55 Warnings:
56 Warning 3719 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
57 Warning 3719 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
58 Warning 3719 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
59 Warning 3719 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
60 include/show_binlog_events.inc
61 Log_name Pos Event_type Server_id End_log_pos Info
62 binlog.000001 # Query # # CREATE DATABASE bug39182 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci
63 binlog.000001 # Query # # use `bug39182`; CREATE TABLE t1 (a VARCHAR(255) COLLATE utf8_unicode_ci)
64 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
65 binlog.000001 # Query # # use `bug39182`; CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`()
66 BEGIN
67 DECLARE s1 VARCHAR(255);
68 SET s1= "test";
69 CREATE TEMPORARY TABLE tmp1
70 SELECT * FROM t1 WHERE a LIKE CONCAT("%", s1, "%");
71 SELECT
72 COLLATION(NAME_CONST('s1', _utf8'test')) c1,
73 COLLATION(NAME_CONST('s1', _utf8'test' COLLATE utf8_unicode_ci)) c2,
74 COLLATION(s1) c3,
75 COERCIBILITY(NAME_CONST('s1', _utf8'test')) d1,
76 COERCIBILITY(NAME_CONST('s1', _utf8'test' COLLATE utf8_unicode_ci)) d2,
77 COERCIBILITY(s1) d3;
78 DROP TEMPORARY TABLE tmp1;
79 END
80 DROP PROCEDURE p1;
81 DROP TABLE t1;
82 DROP DATABASE bug39182;
83 USE test;
84 CREATE PROCEDURE p1(IN v1 INT)
85 BEGIN
86 CREATE TABLE t1 SELECT v1;
87 DROP TABLE t1;
88 END//
89 CREATE PROCEDURE p2()
90 BEGIN
91 DECLARE v1 INT;
92 CREATE TABLE t1 SELECT v1+1;
93 DROP TABLE t1;
94 END//
95 CREATE PROCEDURE p3(IN v1 INT)
96 BEGIN
97 CREATE TABLE t1 SELECT 1 FROM DUAL WHERE v1!=0;
98 DROP TABLE t1;
99 END//
100 CREATE PROCEDURE p4(IN v1 INT)
101 BEGIN
102 DECLARE v2 INT;
103 CREATE TABLE t1 SELECT 1, v1, v2;
104 DROP TABLE t1;
105 CREATE TABLE t1 SELECT 1, v1+1, v2;
106 DROP TABLE t1;
107 END//
108 CALL p1(1);
109 CALL p2();
110 CALL p3(0);
111 CALL p4(0);
112 DROP PROCEDURE p1;
113 DROP PROCEDURE p2;
114 DROP PROCEDURE p3;
115 DROP PROCEDURE p4;
116 End of 5.0 tests
117 reset master;
118 create table t1 (id tinyint auto_increment primary key);
119 set insert_id=128;
120 insert ignore into t1 values(null);
121 Warnings:
122 Warning 1264 Out of range value for column 'id' at row 1
123 select * from t1;
124 id
125 127
126 drop table t1;
127 create table t1 (a int);
128 create table if not exists t2 select * from t1;
129 create temporary table tt1 (a int);
130 create table if not exists t3 like tt1;
131 USE mysql;
132 INSERT IGNORE INTO user SET host='localhost', user='@#@', authentication_string='*1111111111111111111111111111111111111111';
133 UPDATE user SET authentication_string='*67092806AE91BFB6BE72DE6C7BE2B7CCA8CFA9DF' WHERE host='localhost' AND user='@#@';
134 DELETE FROM user WHERE host='localhost' AND user='@#@';
135 use test;
136 include/show_binlog_events.inc
137 Log_name Pos Event_type Server_id End_log_pos Info
138 binlog.000001 # Query # # use `test`; create table t1 (id tinyint auto_increment primary key)
139 binlog.000001 # Query # # BEGIN
140 binlog.000001 # Intvar # # INSERT_ID=127
141 binlog.000001 # Query # # use `test`; insert ignore into t1 values(null)
142 binlog.000001 # Query # # COMMIT
143 binlog.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
144 binlog.000001 # Query # # use `test`; create table t1 (a int)
145 binlog.000001 # Query # # use `test`; create table if not exists t2 select * from t1
146 binlog.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t3` (
147 `a` int DEFAULT NULL
148 ) ENGINE=InnoDB
149 binlog.000001 # Query # # BEGIN
150 binlog.000001 # Query # # use `mysql`; INSERT IGNORE INTO user SET host='localhost', user='@#@', authentication_string='*1111111111111111111111111111111111111111'
151 binlog.000001 # Xid # # COMMIT /* XID */
152 binlog.000001 # Query # # BEGIN
153 binlog.000001 # Query # # use `mysql`; UPDATE user SET authentication_string='*67092806AE91BFB6BE72DE6C7BE2B7CCA8CFA9DF' WHERE host='localhost' AND user='@#@'
154 binlog.000001 # Xid # # COMMIT /* XID */
155 binlog.000001 # Query # # BEGIN
156 binlog.000001 # Query # # use `mysql`; DELETE FROM user WHERE host='localhost' AND user='@#@'
157 binlog.000001 # Xid # # COMMIT /* XID */
158 drop table t1,t2,t3,tt1;
159 #
160 # Bug #45998: database crashes when running "create as select"
161 #
162 CREATE DATABASE test1;
163 USE test1;
164 DROP DATABASE test1;
165 CREATE TABLE test.t1(a int);
166 INSERT INTO test.t1 VALUES (1), (2);
167 CREATE TABLE test.t2 SELECT * FROM test.t1;
168 USE test;
169 DROP TABLES t1, t2;
170 RESET MASTER;
171 CREATE TABLE t1 (a INT PRIMARY KEY);
172 BINLOG '
173 3u9kSA8KAAAAZgAAAGoAAAABAAQANS4xLjM1LW1hcmlhLWJldGExLWRlYnVnLWxvZwAAAAAAAAAA
174 AAAAAAAAAAAAAAAAAADe72RIEzgNAAgAEgAEBAQEEgAAUwAEGggAAAAICAgC
175 ';
176 INSERT INTO t1 VALUES (1);
177 BINLOG '
178 3u9kSBMUAAAAKQAAAJEBAAAAABoAAAAAAAAABHRlc3QAAnQxAAEDAAA=
179 3u9kSBcUAAAAIgAAALMBAAAQABoAAAAAAAEAAf/+AgAAAA==
180 ';
181 include/show_binlog_events.inc
182 Log_name Pos Event_type Server_id End_log_pos Info
183 # # Query 1 # use `test`; CREATE TABLE t1 (a INT PRIMARY KEY)
184 # # Query 1 # BEGIN
185 # # Query 1 # use `test`; INSERT INTO t1 VALUES (1)
186 # # Query 1 # COMMIT
187 # # Query 1 # BEGIN
188 # # Table_map 1 # table_id: # (test.t1)
189 # # Write_rows 1 # table_id: # flags: STMT_END_F
190 # # Query 1 # COMMIT
191 DROP TABLE t1;
192
193 # BUG#54903 BINLOG statement toggles session variables
194 # ----------------------------------------------------------------------
195 # This test verify that BINLOG statement doesn't change current session's
196 # variables foreign_key_checks and unique_checks.
197
198 CREATE TABLE t1 (c1 INT KEY);
199 SET @@SESSION.foreign_key_checks= ON;
200 SET @@SESSION.unique_checks= ON;
201 # INSERT INTO t1 VALUES (1)
202 # foreign_key_checks=0 and unique_checks=0
203 BINLOG '
204 dfLtTBMBAAAAKQAAANcAAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE=
205 dfLtTBcBAAAAIgAAAPkAAAAAABcAAAAAAAcAAf/+AQAAAA==
206 ';
207 SELECT * FROM t1;
208 c1
209 1
210 # Their values should be ON
211 SHOW SESSION VARIABLES LIKE "%_checks";
212 Variable_name Value
213 foreign_key_checks ON
214 unique_checks ON
215
216 SET @@SESSION.foreign_key_checks= OFF;
217 SET @@SESSION.unique_checks= OFF;
218 # INSERT INTO t1 VALUES(2)
219 # foreign_key_checks=1 and unique_checks=1
220 BINLOG '
221 dfLtTBMBAAAAKQAAAKsBAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE=
222 dfLtTBcBAAAAIgAAAM0BAAAAABcAAAAAAAEAAf/+AgAAAA==
223 ';
224 SELECT * FROM t1;
225 c1
226 1
227 2
228 # Their values should be OFF
229 SHOW SESSION VARIABLES LIKE "%_checks";
230 Variable_name Value
231 foreign_key_checks OFF
232 unique_checks OFF
233 # INSERT INTO t1 VALUES(2)
234 # foreign_key_checks=1 and unique_checks=1
235 # It should not change current session's variables, even error happens
236 call mtr.add_suppression("Replica SQL.*Could not execute Write_rows_v1 event on table test.t1; Duplicate entry .2. for key .t1.PRIMARY., Error_code: 1062");
237 BINLOG '
238 dfLtTBMBAAAAKQAAAKsBAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE=
239 dfLtTBcBAAAAIgAAAM0BAAAAABcAAAAAAAEAAf/+AgAAAA==
240 ';
241 ERROR 23000: Duplicate entry '2' for key 't1.PRIMARY'
242 SELECT * FROM t1;
243 c1
244 1
245 2
246 # Their values should be OFF
247 SHOW SESSION VARIABLES LIKE "%_checks";
248 Variable_name Value
249 foreign_key_checks OFF
250 unique_checks OFF
251 DROP TABLE t1;