Debian Codegraph @

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