~stewart/drizzle/embedded-innodb-create-select-transaction-arrgh

« back to all changes in this revision

Viewing changes to mysql-test/r/mysqlbinlog.result

  • Committer: brian
  • Date: 2008-06-25 05:29:13 UTC
  • Revision ID: brian@localhost.localdomain-20080625052913-6upwo0jsrl4lnapl
clean slate

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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");
 
13
flush logs;
 
14
 
 
15
--- Local --
 
16
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
 
17
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
 
18
DELIMITER /*!*/;
 
19
ROLLBACK/*!*/;
 
20
use test/*!*/;
 
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/*!*/;
 
26
/*!\C latin1 *//*!*/;
 
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
 
31
/*!*/;
 
32
SET TIMESTAMP=1000000000/*!*/;
 
33
create table t1 (word varchar(20))
 
34
/*!*/;
 
35
SET TIMESTAMP=1000000000/*!*/;
 
36
create table t2 (id int auto_increment not null primary key)
 
37
/*!*/;
 
38
SET TIMESTAMP=1000000000/*!*/;
 
39
insert into t1 values ("abirvalg")
 
40
/*!*/;
 
41
SET INSERT_ID=1/*!*/;
 
42
SET TIMESTAMP=1000000000/*!*/;
 
43
insert into t2 values ()
 
44
/*!*/;
 
45
SET TIMESTAMP=1000000000/*!*/;
 
46
load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO table t1
 
47
/*!*/;
 
48
SET TIMESTAMP=1000000000/*!*/;
 
49
load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO table t1
 
50
/*!*/;
 
51
SET TIMESTAMP=1000000000/*!*/;
 
52
load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO table t1
 
53
/*!*/;
 
54
SET TIMESTAMP=1000000000/*!*/;
 
55
load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO table t1
 
56
/*!*/;
 
57
DELIMITER ;
 
58
# End of log file
 
59
ROLLBACK /* added by mysqlbinlog */;
 
60
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
 
61
 
 
62
--- Broken LOAD DATA --
 
63
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
 
64
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
 
65
DELIMITER /*!*/;
 
66
use test/*!*/;
 
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/*!*/;
 
72
/*!\C latin1 *//*!*/;
 
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")
 
77
/*!*/;
 
78
DELIMITER ;
 
79
# End of log file
 
80
ROLLBACK /* added by mysqlbinlog */;
 
81
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
 
82
 
 
83
--- --database --
 
84
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
 
85
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
 
86
DELIMITER /*!*/;
 
87
ROLLBACK/*!*/;
 
88
SET INSERT_ID=1/*!*/;
 
89
DELIMITER ;
 
90
# End of log file
 
91
ROLLBACK /* added by mysqlbinlog */;
 
92
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
 
93
 
 
94
--- --position --
 
95
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
 
96
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
 
97
DELIMITER /*!*/;
 
98
use test/*!*/;
 
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")
 
109
/*!*/;
 
110
DELIMITER ;
 
111
# End of log file
 
112
ROLLBACK /* added by mysqlbinlog */;
 
113
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
 
114
 
 
115
--- Remote --
 
116
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
 
117
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
 
118
DELIMITER /*!*/;
 
119
ROLLBACK/*!*/;
 
120
use test/*!*/;
 
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
 
131
/*!*/;
 
132
SET TIMESTAMP=1000000000/*!*/;
 
133
create table t1 (word varchar(20))
 
134
/*!*/;
 
135
SET TIMESTAMP=1000000000/*!*/;
 
136
create table t2 (id int auto_increment not null primary key)
 
137
/*!*/;
 
138
SET TIMESTAMP=1000000000/*!*/;
 
139
insert into t1 values ("abirvalg")
 
140
/*!*/;
 
141
SET INSERT_ID=1/*!*/;
 
142
SET TIMESTAMP=1000000000/*!*/;
 
143
insert into t2 values ()
 
144
/*!*/;
 
145
SET TIMESTAMP=1000000000/*!*/;
 
146
load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO table t1
 
147
/*!*/;
 
148
SET TIMESTAMP=1000000000/*!*/;
 
149
load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO table t1
 
150
/*!*/;
 
151
SET TIMESTAMP=1000000000/*!*/;
 
152
load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO table t1
 
153
/*!*/;
 
154
SET TIMESTAMP=1000000000/*!*/;
 
155
load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO table t1
 
156
/*!*/;
 
157
DELIMITER ;
 
158
# End of log file
 
159
ROLLBACK /* added by mysqlbinlog */;
 
160
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
 
161
 
 
162
--- Broken LOAD DATA --
 
163
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
 
164
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
 
165
DELIMITER /*!*/;
 
166
use test/*!*/;
 
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")
 
177
/*!*/;
 
178
DELIMITER ;
 
179
# End of log file
 
180
ROLLBACK /* added by mysqlbinlog */;
 
181
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
 
182
 
 
183
--- --database --
 
184
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
 
185
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
 
186
DELIMITER /*!*/;
 
187
ROLLBACK/*!*/;
 
188
SET INSERT_ID=1/*!*/;
 
189
DELIMITER ;
 
190
# End of log file
 
191
ROLLBACK /* added by mysqlbinlog */;
 
192
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
 
193
 
 
194
--- --position --
 
195
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
 
196
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
 
197
DELIMITER /*!*/;
 
198
use test/*!*/;
 
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")
 
209
/*!*/;
 
210
DELIMITER ;
 
211
# End of log file
 
212
ROLLBACK /* added by mysqlbinlog */;
 
213
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
 
214
 
 
215
--- reading stdin --
 
216
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
 
217
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
 
218
DELIMITER /*!*/;
 
219
ROLLBACK/*!*/;
 
220
use test/*!*/;
 
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/*!*/;
 
226
BEGIN
 
227
/*!*/;
 
228
SET TIMESTAMP=1108844555/*!*/;
 
229
insert t1 values (1)
 
230
/*!*/;
 
231
DELIMITER ;
 
232
# End of log file
 
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*/;
 
237
DELIMITER /*!*/;
 
238
use test/*!*/;
 
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/*!*/;
 
244
BEGIN
 
245
/*!*/;
 
246
SET TIMESTAMP=1108844555/*!*/;
 
247
insert t1 values (1)
 
248
/*!*/;
 
249
DELIMITER ;
 
250
# End of log file
 
251
ROLLBACK /* added by mysqlbinlog */;
 
252
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
 
253
drop table t1,t2;
 
254
flush logs;
 
255
flush logs;
 
256
select * from t5  /* must be (1),(1) */;
 
257
a
 
258
1
 
259
1
 
260
drop table t5;
 
261
flush logs;
 
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;
 
269
c1      c2
 
270
1       Monday
 
271
2       Montag
 
272
3       Monday
 
273
flush logs;
 
274
drop table t5;
 
275
select * from t5 order by c1;
 
276
c1      c2
 
277
1       Monday
 
278
2       Montag
 
279
3       Monday
 
280
drop table t5;
 
281
drop procedure if exists p1;
 
282
flush logs;
 
283
create procedure p1()
 
284
begin
 
285
select 1;
 
286
end;
 
287
//
 
288
flush logs;
 
289
call p1();
 
290
1
 
291
1
 
292
drop procedure p1;
 
293
call 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*/;
 
297
DELIMITER /*!*/;
 
298
use test/*!*/;
 
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()
 
309
begin
 
310
select 1;
 
311
end
 
312
/*!*/;
 
313
DELIMITER ;
 
314
# End of log file
 
315
ROLLBACK /* added by mysqlbinlog */;
 
316
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
 
317
call p1();
 
318
1
 
319
1
 
320
drop procedure p1;
 
321
flush logs;
 
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;
 
335
hex(a)
 
336
C3BF
 
337
D0AA
 
338
C3BF
 
339
C3BF
 
340
D0AA
 
341
C3BF
 
342
D0AA
 
343
drop table t1;
 
344
flush logs;
 
345
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
 
346
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
 
347
DELIMITER /*!*/;
 
348
use test/*!*/;
 
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)
 
359
/*!*/;
 
360
SET TIMESTAMP=1000000000/*!*/;
 
361
load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO table t1
 
362
/*!*/;
 
363
SET TIMESTAMP=1000000000/*!*/;
 
364
SET @@session.collation_database=7/*!*/;
 
365
load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO table t1
 
366
/*!*/;
 
367
SET TIMESTAMP=1000000000/*!*/;
 
368
SET @@session.collation_database=DEFAULT/*!*/;
 
369
load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO table t1
 
370
/*!*/;
 
371
SET TIMESTAMP=1000000000/*!*/;
 
372
load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO table t1
 
373
/*!*/;
 
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
 
377
/*!*/;
 
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
 
381
/*!*/;
 
382
SET TIMESTAMP=1000000000/*!*/;
 
383
load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-c-0' INTO table t1 character set koi8r
 
384
/*!*/;
 
385
SET TIMESTAMP=1000000000/*!*/;
 
386
drop table t1
 
387
/*!*/;
 
388
DELIMITER ;
 
389
# End of log file
 
390
ROLLBACK /* added by mysqlbinlog */;
 
391
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
 
392
CREATE TABLE t1 (c1 CHAR(10));
 
393
flush logs;
 
394
INSERT INTO t1 VALUES ('0123456789');
 
395
flush logs;
 
396
DROP TABLE t1;
 
397
#       Query   thread_id=REMOVED       exec_time=REMOVED       error_code=REMOVED
 
398
flush logs;
 
399
create table t1(a int);
 
400
insert into t1 values(connection_id());
 
401
flush logs;
 
402
drop table t1;
 
403
1
 
404
drop table t1;
 
405
shell> mysqlbinlog std_data/corrupt-relay-bin.000624 > var/tmp/bug31793.sql
 
406
End of 5.0 tests
 
407
flush logs;
 
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'
 
417
USE mysqltest1;
 
418
CREATE TABLE t1 (a INT, b CHAR(64));
 
419
flush logs;
 
420
INSERT INTO t1 VALUES (1,USER());
 
421
flush logs;
 
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'
 
426
SELECT * FROM t1;
 
427
a       b
 
428
1       root@localhost
 
429
DROP DATABASE mysqltest1;
 
430
DROP USER untrusted@localhost;
 
431
BUG#32580: mysqlbinlog cannot read binlog event with user variables
 
432
USE test;
 
433
SET BINLOG_FORMAT = STATEMENT;
 
434
FLUSH LOGS;
 
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;
 
437
SET @an_int = 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);
 
441
FLUSH LOGS;
 
442
SELECT * FROM t1;
 
443
a_real  158.883
 
444
an_int  1000
 
445
a_decimal       907.79
 
446
a_string        Just a test
 
447
DROP TABLE t1;
 
448
>> mysqlbinlog var/log/master-bin.000019 > var/tmp/bug32580.sql
 
449
>> mysql test < var/tmp/bug32580.sql
 
450
SELECT * FROM t1;
 
451
a_real  158.883
 
452
an_int  1000
 
453
a_decimal       907.79
 
454
a_string        Just a test
 
455
DROP TABLE t1;
 
456
End of 5.1 tests