mysqlbinlog.result 15.7 KB
Newer Older
1
reset master;
dlenev@mysql.com's avatar
dlenev@mysql.com committed
2
set timestamp=1000000000;
3
drop table if exists t1,t2,t3,t4,t5,t03,t04;
dlenev@mysql.com's avatar
dlenev@mysql.com committed
4 5 6 7
create table t1 (word varchar(20));
create table t2 (id int auto_increment not null primary key);
insert into t1 values ("abirvalg");
insert into t2 values ();
msvensson@pilot.mysql.com's avatar
msvensson@pilot.mysql.com committed
8 9 10 11 12
load data infile '../../std_data/words.dat' into table t1;
load data infile '../../std_data/words.dat' into table t1;
load data infile '../../std_data/words.dat' into table t1;
load data infile '../../std_data/words.dat' into table t1;
load data infile '../../std_data/words.dat' into table t1;
dlenev@mysql.com's avatar
dlenev@mysql.com committed
13 14 15 16
insert into t1 values ("Alas");
flush logs;

--- Local --
17
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
18
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
19 20 21 22
DELIMITER /*!*/;
ROLLBACK/*!*/;
use test/*!*/;
SET TIMESTAMP=1000000000/*!*/;
23
SET @@session.pseudo_thread_id=999999999/*!*/;
24
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
25
SET @@session.sql_mode=0/*!*/;
26
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
27 28
/*!\C latin1 *//*!*/;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
29 30
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
31 32
drop table if exists t1,t2,t3,t4,t5,t03,t04
/*!*/;
33
SET TIMESTAMP=1000000000/*!*/;
34 35
create table t1 (word varchar(20))
/*!*/;
36
SET TIMESTAMP=1000000000/*!*/;
37 38
create table t2 (id int auto_increment not null primary key)
/*!*/;
39
SET TIMESTAMP=1000000000/*!*/;
40 41
insert into t1 values ("abirvalg")
/*!*/;
42 43
SET INSERT_ID=1/*!*/;
SET TIMESTAMP=1000000000/*!*/;
44 45
insert into t2 values ()
/*!*/;
46
SET TIMESTAMP=1000000000/*!*/;
47
load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO table t1
48
/*!*/;
49
SET TIMESTAMP=1000000000/*!*/;
50
load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO table t1
51
/*!*/;
52
SET TIMESTAMP=1000000000/*!*/;
53
load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO table t1
54
/*!*/;
55
SET TIMESTAMP=1000000000/*!*/;
56
load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO table t1
57
/*!*/;
58
DELIMITER ;
59
# End of log file
60
ROLLBACK /* added by mysqlbinlog */;
61
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
dlenev@mysql.com's avatar
dlenev@mysql.com committed
62 63

--- Broken LOAD DATA --
64
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
65
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
66 67 68
DELIMITER /*!*/;
use test/*!*/;
SET TIMESTAMP=1000000000/*!*/;
69
SET @@session.pseudo_thread_id=999999999/*!*/;
70
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
71
SET @@session.sql_mode=0/*!*/;
72
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
73 74
/*!\C latin1 *//*!*/;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
75 76
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
77 78
insert into t1 values ("Alas")
/*!*/;
79
DELIMITER ;
80
# End of log file
81
ROLLBACK /* added by mysqlbinlog */;
82
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
dlenev@mysql.com's avatar
dlenev@mysql.com committed
83 84

--- --database --
85
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
86
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
87 88 89 90
DELIMITER /*!*/;
ROLLBACK/*!*/;
SET INSERT_ID=1/*!*/;
DELIMITER ;
91
# End of log file
92
ROLLBACK /* added by mysqlbinlog */;
93
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
dlenev@mysql.com's avatar
dlenev@mysql.com committed
94 95

--- --position --
96
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
97
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
98 99 100
DELIMITER /*!*/;
use test/*!*/;
SET TIMESTAMP=1000000000/*!*/;
101
SET @@session.pseudo_thread_id=999999999/*!*/;
102
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
103
SET @@session.sql_mode=0/*!*/;
104
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
105 106
/*!\C latin1 *//*!*/;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
107 108
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
109 110
insert into t1 values ("Alas")
/*!*/;
111
DELIMITER ;
112
# End of log file
113
ROLLBACK /* added by mysqlbinlog */;
114
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
dlenev@mysql.com's avatar
dlenev@mysql.com committed
115 116

--- Remote --
117
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
118
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
119 120 121 122
DELIMITER /*!*/;
ROLLBACK/*!*/;
use test/*!*/;
SET TIMESTAMP=1000000000/*!*/;
123
SET @@session.pseudo_thread_id=999999999/*!*/;
124
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
125
SET @@session.sql_mode=0/*!*/;
126
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
127 128
/*!\C latin1 *//*!*/;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
129 130
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
131 132
drop table if exists t1,t2,t3,t4,t5,t03,t04
/*!*/;
133
SET TIMESTAMP=1000000000/*!*/;
134 135
create table t1 (word varchar(20))
/*!*/;
136
SET TIMESTAMP=1000000000/*!*/;
137 138
create table t2 (id int auto_increment not null primary key)
/*!*/;
139
SET TIMESTAMP=1000000000/*!*/;
140 141
insert into t1 values ("abirvalg")
/*!*/;
142 143
SET INSERT_ID=1/*!*/;
SET TIMESTAMP=1000000000/*!*/;
144 145
insert into t2 values ()
/*!*/;
146
SET TIMESTAMP=1000000000/*!*/;
147
load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO table t1
148
/*!*/;
149
SET TIMESTAMP=1000000000/*!*/;
150
load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO table t1
151
/*!*/;
152
SET TIMESTAMP=1000000000/*!*/;
153
load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO table t1
154
/*!*/;
155
SET TIMESTAMP=1000000000/*!*/;
156
load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO table t1
157
/*!*/;
158
DELIMITER ;
159
# End of log file
160
ROLLBACK /* added by mysqlbinlog */;
161
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
dlenev@mysql.com's avatar
dlenev@mysql.com committed
162 163

--- Broken LOAD DATA --
164
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
165
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
166 167 168
DELIMITER /*!*/;
use test/*!*/;
SET TIMESTAMP=1000000000/*!*/;
169
SET @@session.pseudo_thread_id=999999999/*!*/;
170
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
171
SET @@session.sql_mode=0/*!*/;
172
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
173 174
/*!\C latin1 *//*!*/;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
175 176
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
177 178
insert into t1 values ("Alas")
/*!*/;
179
DELIMITER ;
180
# End of log file
181
ROLLBACK /* added by mysqlbinlog */;
182
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
dlenev@mysql.com's avatar
dlenev@mysql.com committed
183 184

--- --database --
185
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
186
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
187 188 189 190
DELIMITER /*!*/;
ROLLBACK/*!*/;
SET INSERT_ID=1/*!*/;
DELIMITER ;
191
# End of log file
192
ROLLBACK /* added by mysqlbinlog */;
193
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
dlenev@mysql.com's avatar
dlenev@mysql.com committed
194 195

--- --position --
196
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
197
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
198 199 200
DELIMITER /*!*/;
use test/*!*/;
SET TIMESTAMP=1000000000/*!*/;
201
SET @@session.pseudo_thread_id=999999999/*!*/;
202
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
203
SET @@session.sql_mode=0/*!*/;
204
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
205 206
/*!\C latin1 *//*!*/;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
207 208
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
209 210
insert into t1 values ("Alas")
/*!*/;
211
DELIMITER ;
212
# End of log file
213
ROLLBACK /* added by mysqlbinlog */;
214
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
215 216 217

--- reading stdin --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
218
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
219 220 221 222
DELIMITER /*!*/;
ROLLBACK/*!*/;
use test/*!*/;
SET TIMESTAMP=1108844556/*!*/;
223 224 225 226
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
227 228
BEGIN
/*!*/;
229
SET TIMESTAMP=1108844555/*!*/;
230 231
insert t1 values (1)
/*!*/;
232
DELIMITER ;
233
# End of log file
234
ROLLBACK /* added by mysqlbinlog */;
235
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
236
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
237
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
238 239 240
DELIMITER /*!*/;
use test/*!*/;
SET TIMESTAMP=1108844556/*!*/;
241 242 243 244
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
245 246
BEGIN
/*!*/;
247
SET TIMESTAMP=1108844555/*!*/;
248 249
insert t1 values (1)
/*!*/;
250
DELIMITER ;
251
# End of log file
252
ROLLBACK /* added by mysqlbinlog */;
253
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
254
drop table t1,t2;
255
flush logs;
256
flush logs;
257 258 259 260
select * from t5  /* must be (1),(1) */;
a
1
1
261
drop table t5;
262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280
flush logs;
create table t5 (c1 int, c2 varchar(128) character set latin1 not null);
insert into t5 values (1, date_format('2001-01-01','%W'));
set lc_time_names=de_DE;
insert into t5 values (2, date_format('2001-01-01','%W'));
set lc_time_names=en_US;
insert into t5 values (3, date_format('2001-01-01','%W'));
select * from t5 order by c1;
c1	c2
1	Monday
2	Montag
3	Monday
flush logs;
drop table t5;
select * from t5 order by c1;
c1	c2
1	Monday
2	Montag
3	Monday
281
drop table t5;
282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300
drop procedure if exists p1;
flush logs;
create procedure p1()
begin
select 1;
end;
//
flush logs;
call p1();
1
1
drop procedure p1;
call p1();
ERROR 42000: PROCEDURE test.p1 does not exist
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
use test/*!*/;
SET TIMESTAMP=1000000000/*!*/;
301
SET @@session.pseudo_thread_id=999999999/*!*/;
302
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
303
SET @@session.sql_mode=0/*!*/;
304
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
305 306
/*!\C latin1 *//*!*/;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
307 308
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
309
CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`()
310 311
begin
select 1;
312 313
end
/*!*/;
314 315 316 317 318 319 320 321
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
call p1();
1
1
drop procedure p1;
322
flush logs;
323
create table t1 (a varchar(64) character set utf8);
msvensson@pilot.mysql.com's avatar
msvensson@pilot.mysql.com committed
324
load data infile '../../std_data/loaddata6.dat' into table t1;
325
set character_set_database=koi8r;
msvensson@pilot.mysql.com's avatar
msvensson@pilot.mysql.com committed
326
load data infile '../../std_data/loaddata6.dat' into table t1;
327
set character_set_database=latin1;
msvensson@pilot.mysql.com's avatar
msvensson@pilot.mysql.com committed
328 329
load data infile '../../std_data/loaddata6.dat' into table t1;
load data infile '../../std_data/loaddata6.dat' into table t1;
330
set character_set_database=koi8r;
msvensson@pilot.mysql.com's avatar
msvensson@pilot.mysql.com committed
331
load data infile '../../std_data/loaddata6.dat' into table t1;
332
set character_set_database=latin1;
msvensson@pilot.mysql.com's avatar
msvensson@pilot.mysql.com committed
333 334
load data infile '../../std_data/loaddata6.dat' into table t1;
load data infile '../../std_data/loaddata6.dat' into table t1 character set koi8r;
335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350
select hex(a) from t1;
hex(a)
C3BF
D0AA
C3BF
C3BF
D0AA
C3BF
D0AA
drop table t1;
flush logs;
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
use test/*!*/;
SET TIMESTAMP=1000000000/*!*/;
351
SET @@session.pseudo_thread_id=999999999/*!*/;
352
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
353
SET @@session.sql_mode=0/*!*/;
354
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
355 356
/*!\C latin1 *//*!*/;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
357 358
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
359 360
create table t1 (a varchar(64) character set utf8)
/*!*/;
361
SET TIMESTAMP=1000000000/*!*/;
362
load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO table t1
363
/*!*/;
364 365
SET TIMESTAMP=1000000000/*!*/;
SET @@session.collation_database=7/*!*/;
366
load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO table t1
367
/*!*/;
368 369
SET TIMESTAMP=1000000000/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
370
load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO table t1
371
/*!*/;
372
SET TIMESTAMP=1000000000/*!*/;
373
load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO table t1
374
/*!*/;
375 376
SET TIMESTAMP=1000000000/*!*/;
SET @@session.collation_database=7/*!*/;
377 378
load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-a-0' INTO table t1
/*!*/;
379 380
SET TIMESTAMP=1000000000/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
381 382
load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-b-0' INTO table t1
/*!*/;
383
SET TIMESTAMP=1000000000/*!*/;
384 385
load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-c-0' INTO table t1 character set koi8r
/*!*/;
386
SET TIMESTAMP=1000000000/*!*/;
387 388
drop table t1
/*!*/;
389 390 391 392
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
gshchepa/uchum@gleb.loc's avatar
gshchepa/uchum@gleb.loc committed
393 394 395 396 397
CREATE TABLE t1 (c1 CHAR(10));
flush logs;
INSERT INTO t1 VALUES ('0123456789');
flush logs;
DROP TABLE t1;
398 399 400 401 402 403 404 405
We expect this value to be 1
The bug being tested was that 'Query' lines were not preceded by '#'
If the line is in the table, it had to have been preceded by a '#'

SELECT COUNT(*) AS `BUG#28293_expect_1` FROM patch WHERE a LIKE '%Query%';
BUG#28293_expect_1
1
DROP TABLE patch;
406 407 408 409 410 411 412
flush logs;
create table t1(a int);
insert into t1 values(connection_id());
flush logs;
drop table t1;
1
drop table t1;
413
shell> mysqlbinlog std_data/corrupt-relay-bin.000624 > var/tmp/bug31793.sql
414 415 416 417 418 419 420 421 422 423
set @@global.server_id= 4294967295;
reset master;
select
(@a:=load_file("MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug37313.binlog"))
is not null;
(@a:=load_file("MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug37313.binlog"))
is not null
1
*** Unsigned server_id 4294967295 is found: 1 ***
set @@global.server_id= 1;
424
End of 5.0 tests
425
flush logs;
426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447
BUG#31611: Security risk with BINLOG statement
SET BINLOG_FORMAT=ROW;
CREATE DATABASE mysqltest1;
CREATE USER untrusted@localhost;
GRANT SELECT ON mysqltest1.* TO untrusted@localhost;
SHOW GRANTS FOR untrusted@localhost;
Grants for untrusted@localhost
GRANT USAGE ON *.* TO 'untrusted'@'localhost'
GRANT SELECT ON `mysqltest1`.* TO 'untrusted'@'localhost'
USE mysqltest1;
CREATE TABLE t1 (a INT, b CHAR(64));
flush logs;
INSERT INTO t1 VALUES (1,USER());
flush logs;
mysqlbinlog var/log/master-bin.000017 > var/tmp/bug31611.sql
mysql mysqltest1 -uuntrusted < var/tmp/bug31611.sql
INSERT INTO t1 VALUES (1,USER());
ERROR 42000: INSERT command denied to user 'untrusted'@'localhost' for table 't1'
SELECT * FROM t1;
a	b
1	root@localhost
DROP DATABASE mysqltest1;
448
DROP USER untrusted@localhost;
449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473
BUG#32580: mysqlbinlog cannot read binlog event with user variables
USE test;
SET BINLOG_FORMAT = STATEMENT;
FLUSH LOGS;
CREATE TABLE t1 (a_real FLOAT, an_int INT, a_decimal DECIMAL(5,2), a_string CHAR(32));
SET @a_real = rand(20) * 1000;
SET @an_int = 1000;
SET @a_decimal = CAST(rand(19) * 999 AS DECIMAL(5,2));
SET @a_string = 'Just a test';
INSERT INTO t1 VALUES (@a_real, @an_int, @a_decimal, @a_string);
FLUSH LOGS;
SELECT * FROM t1;
a_real	158.883
an_int	1000
a_decimal	907.79
a_string	Just a test
DROP TABLE t1;
>> mysqlbinlog var/log/master-bin.000019 > var/tmp/bug32580.sql
>> mysql test < var/tmp/bug32580.sql
SELECT * FROM t1;
a_real	158.883
an_int	1000
a_decimal	907.79
a_string	Just a test
DROP TABLE t1;
474
End of 5.1 tests