1
set timestamp=1000000000;
2
drop table if exists t1,t2,t3,t4,t5,t03,t04;
3
create table t1 (word varchar(20));
4
create table t2 (id int auto_increment not null primary key);
5
insert into t1 values ("abirvalg");
6
insert into t2 values ();
7
load data infile '../std_data_ln/words.dat' into table t1;
8
load data infile '../std_data_ln/words.dat' into table t1;
9
load data infile '../std_data_ln/words.dat' into table t1;
10
load data infile '../std_data_ln/words.dat' into table t1;
11
load data infile '../std_data_ln/words.dat' into table t1;
12
insert into t1 values ("Alas");
16
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
17
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
21
SET TIMESTAMP=1000000000/*!*/;
22
SET @@session.pseudo_thread_id=999999999/*!*/;
23
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
24
SET @@session.sql_mode=0/*!*/;
25
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
27
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
28
SET @@session.lc_time_names=0/*!*/;
29
SET @@session.collation_database=DEFAULT/*!*/;
30
drop table if exists t1,t2,t3,t4,t5,t03,t04
32
SET TIMESTAMP=1000000000/*!*/;
33
create table t1 (word varchar(20))
35
SET TIMESTAMP=1000000000/*!*/;
36
create table t2 (id int auto_increment not null primary key)
38
SET TIMESTAMP=1000000000/*!*/;
39
insert into t1 values ("abirvalg")
42
SET TIMESTAMP=1000000000/*!*/;
43
insert into t2 values ()
45
SET TIMESTAMP=1000000000/*!*/;
46
load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO table t1
48
SET TIMESTAMP=1000000000/*!*/;
49
load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO table t1
51
SET TIMESTAMP=1000000000/*!*/;
52
load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO table t1
54
SET TIMESTAMP=1000000000/*!*/;
55
load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO table t1
59
ROLLBACK /* added by mysqlbinlog */;
60
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
62
--- Broken LOAD DATA --
63
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
64
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
67
SET TIMESTAMP=1000000000/*!*/;
68
SET @@session.pseudo_thread_id=999999999/*!*/;
69
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
70
SET @@session.sql_mode=0/*!*/;
71
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
73
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
74
SET @@session.lc_time_names=0/*!*/;
75
SET @@session.collation_database=DEFAULT/*!*/;
76
insert into t1 values ("Alas")
80
ROLLBACK /* added by mysqlbinlog */;
81
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
84
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
85
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
91
ROLLBACK /* added by mysqlbinlog */;
92
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
95
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
96
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
99
SET TIMESTAMP=1000000000/*!*/;
100
SET @@session.pseudo_thread_id=999999999/*!*/;
101
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
102
SET @@session.sql_mode=0/*!*/;
103
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
104
/*!\C latin1 *//*!*/;
105
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
106
SET @@session.lc_time_names=0/*!*/;
107
SET @@session.collation_database=DEFAULT/*!*/;
108
insert into t1 values ("Alas")
112
ROLLBACK /* added by mysqlbinlog */;
113
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
116
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
117
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
121
SET TIMESTAMP=1000000000/*!*/;
122
SET @@session.pseudo_thread_id=999999999/*!*/;
123
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
124
SET @@session.sql_mode=0/*!*/;
125
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
126
/*!\C latin1 *//*!*/;
127
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
128
SET @@session.lc_time_names=0/*!*/;
129
SET @@session.collation_database=DEFAULT/*!*/;
130
drop table if exists t1,t2,t3,t4,t5,t03,t04
132
SET TIMESTAMP=1000000000/*!*/;
133
create table t1 (word varchar(20))
135
SET TIMESTAMP=1000000000/*!*/;
136
create table t2 (id int auto_increment not null primary key)
138
SET TIMESTAMP=1000000000/*!*/;
139
insert into t1 values ("abirvalg")
141
SET INSERT_ID=1/*!*/;
142
SET TIMESTAMP=1000000000/*!*/;
143
insert into t2 values ()
145
SET TIMESTAMP=1000000000/*!*/;
146
load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO table t1
148
SET TIMESTAMP=1000000000/*!*/;
149
load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO table t1
151
SET TIMESTAMP=1000000000/*!*/;
152
load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO table t1
154
SET TIMESTAMP=1000000000/*!*/;
155
load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO table t1
159
ROLLBACK /* added by mysqlbinlog */;
160
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
162
--- Broken LOAD DATA --
163
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
164
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
167
SET TIMESTAMP=1000000000/*!*/;
168
SET @@session.pseudo_thread_id=999999999/*!*/;
169
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
170
SET @@session.sql_mode=0/*!*/;
171
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
172
/*!\C latin1 *//*!*/;
173
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
174
SET @@session.lc_time_names=0/*!*/;
175
SET @@session.collation_database=DEFAULT/*!*/;
176
insert into t1 values ("Alas")
180
ROLLBACK /* added by mysqlbinlog */;
181
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
184
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
185
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
188
SET INSERT_ID=1/*!*/;
191
ROLLBACK /* added by mysqlbinlog */;
192
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
195
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
196
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
199
SET TIMESTAMP=1000000000/*!*/;
200
SET @@session.pseudo_thread_id=999999999/*!*/;
201
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
202
SET @@session.sql_mode=0/*!*/;
203
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
204
/*!\C latin1 *//*!*/;
205
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
206
SET @@session.lc_time_names=0/*!*/;
207
SET @@session.collation_database=DEFAULT/*!*/;
208
insert into t1 values ("Alas")
212
ROLLBACK /* added by mysqlbinlog */;
213
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
216
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
217
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
221
SET TIMESTAMP=1108844556/*!*/;
222
SET @@session.pseudo_thread_id=999999999/*!*/;
223
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
224
SET @@session.lc_time_names=0/*!*/;
225
SET @@session.collation_database=DEFAULT/*!*/;
228
SET TIMESTAMP=1108844555/*!*/;
233
ROLLBACK /* added by mysqlbinlog */;
234
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
235
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
236
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
239
SET TIMESTAMP=1108844556/*!*/;
240
SET @@session.pseudo_thread_id=999999999/*!*/;
241
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
242
SET @@session.lc_time_names=0/*!*/;
243
SET @@session.collation_database=DEFAULT/*!*/;
246
SET TIMESTAMP=1108844555/*!*/;
251
ROLLBACK /* added by mysqlbinlog */;
252
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
256
select * from t5 /* must be (1),(1) */;
262
create table t5 (c1 int, c2 varchar(128) character set latin1 not null);
263
insert into t5 values (1, date_format('2001-01-01','%W'));
264
set lc_time_names=de_DE;
265
insert into t5 values (2, date_format('2001-01-01','%W'));
266
set lc_time_names=en_US;
267
insert into t5 values (3, date_format('2001-01-01','%W'));
268
select * from t5 order by c1;
275
select * from t5 order by c1;
281
drop procedure if exists p1;
283
create procedure p1()
294
ERROR 42000: PROCEDURE test.p1 does not exist
295
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
296
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
299
SET TIMESTAMP=1000000000/*!*/;
300
SET @@session.pseudo_thread_id=999999999/*!*/;
301
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
302
SET @@session.sql_mode=0/*!*/;
303
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
304
/*!\C latin1 *//*!*/;
305
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
306
SET @@session.lc_time_names=0/*!*/;
307
SET @@session.collation_database=DEFAULT/*!*/;
308
CREATE DEFINER=`root`@`localhost` procedure p1()
315
ROLLBACK /* added by mysqlbinlog */;
316
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
322
create table t1 (a varchar(64) character set utf8);
323
load data infile '../std_data_ln/loaddata6.dat' into table t1;
324
set character_set_database=koi8r;
325
load data infile '../std_data_ln/loaddata6.dat' into table t1;
326
set character_set_database=latin1;
327
load data infile '../std_data_ln/loaddata6.dat' into table t1;
328
load data infile '../std_data_ln/loaddata6.dat' into table t1;
329
set character_set_database=koi8r;
330
load data infile '../std_data_ln/loaddata6.dat' into table t1;
331
set character_set_database=latin1;
332
load data infile '../std_data_ln/loaddata6.dat' into table t1;
333
load data infile '../std_data_ln/loaddata6.dat' into table t1 character set koi8r;
334
select hex(a) from t1;
345
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
346
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
349
SET TIMESTAMP=1000000000/*!*/;
350
SET @@session.pseudo_thread_id=999999999/*!*/;
351
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
352
SET @@session.sql_mode=0/*!*/;
353
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
354
/*!\C latin1 *//*!*/;
355
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
356
SET @@session.lc_time_names=0/*!*/;
357
SET @@session.collation_database=DEFAULT/*!*/;
358
create table t1 (a varchar(64) character set utf8)
360
SET TIMESTAMP=1000000000/*!*/;
361
load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO table t1
363
SET TIMESTAMP=1000000000/*!*/;
364
SET @@session.collation_database=7/*!*/;
365
load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO table t1
367
SET TIMESTAMP=1000000000/*!*/;
368
SET @@session.collation_database=DEFAULT/*!*/;
369
load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO table t1
371
SET TIMESTAMP=1000000000/*!*/;
372
load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO table t1
374
SET TIMESTAMP=1000000000/*!*/;
375
SET @@session.collation_database=7/*!*/;
376
load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-a-0' INTO table t1
378
SET TIMESTAMP=1000000000/*!*/;
379
SET @@session.collation_database=DEFAULT/*!*/;
380
load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-b-0' INTO table t1
382
SET TIMESTAMP=1000000000/*!*/;
383
load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-c-0' INTO table t1 character set koi8r
385
SET TIMESTAMP=1000000000/*!*/;
390
ROLLBACK /* added by mysqlbinlog */;
391
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
392
CREATE TABLE t1 (c1 CHAR(10));
394
INSERT INTO t1 VALUES ('0123456789');
397
# Query thread_id=REMOVED exec_time=REMOVED error_code=REMOVED
399
create table t1(a int);
400
insert into t1 values(connection_id());
405
shell> mysqlbinlog std_data/corrupt-relay-bin.000624 > var/tmp/bug31793.sql
408
BUG#31611: Security risk with BINLOG statement
409
SET BINLOG_FORMAT=ROW;
410
CREATE DATABASE mysqltest1;
411
CREATE USER untrusted@localhost;
412
GRANT SELECT ON mysqltest1.* TO untrusted@localhost;
413
SHOW GRANTS FOR untrusted@localhost;
414
Grants for untrusted@localhost
415
GRANT USAGE ON *.* TO 'untrusted'@'localhost'
416
GRANT SELECT ON `mysqltest1`.* TO 'untrusted'@'localhost'
418
CREATE TABLE t1 (a INT, b CHAR(64));
420
INSERT INTO t1 VALUES (1,USER());
422
mysqlbinlog var/log/master-bin.000017 > var/tmp/bug31611.sql
423
mysql mysqltest1 -uuntrusted < var/tmp/bug31611.sql
424
INSERT INTO t1 VALUES (1,USER());
425
ERROR 42000: INSERT command denied to user 'untrusted'@'localhost' for table 't1'
429
DROP DATABASE mysqltest1;
430
DROP USER untrusted@localhost;
431
BUG#32580: mysqlbinlog cannot read binlog event with user variables
433
SET BINLOG_FORMAT = STATEMENT;
435
CREATE TABLE t1 (a_real FLOAT, an_int INT, a_decimal DECIMAL(5,2), a_string CHAR(32));
436
SET @a_real = rand(20) * 1000;
438
SET @a_decimal = CAST(rand(19) * 999 AS DECIMAL(5,2));
439
SET @a_string = 'Just a test';
440
INSERT INTO t1 VALUES (@a_real, @an_int, @a_decimal, @a_string);
448
>> mysqlbinlog var/log/master-bin.000019 > var/tmp/bug32580.sql
449
>> mysql test < var/tmp/bug32580.sql