~linuxjedi/drizzle/trunk-bug-667053

« back to all changes in this revision

Viewing changes to mysql-test/suite/rpl/t/rpl_sf.test

  • 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
-- source include/have_log_bin.inc
 
2
 
 
3
# Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
 
4
 
 
5
# save status
 
6
 
 
7
let $oblf=`select @@SESSION.BINLOG_FORMAT`;
 
8
let $otfc=`select @@log_bin_trust_function_creators`;
 
9
 
 
10
set global log_bin_trust_function_creators=0;
 
11
 
 
12
 
 
13
 
 
14
# fail *on definition*
 
15
 
 
16
set binlog_format=STATEMENT;
 
17
 
 
18
delimiter |;
 
19
--error ER_BINLOG_UNSAFE_ROUTINE
 
20
create function fn16456()
 
21
       returns int
 
22
begin
 
23
       return unix_timestamp();
 
24
end|
 
25
delimiter ;|
 
26
 
 
27
 
 
28
 
 
29
# force in definition, so we can see whether we fail on call
 
30
 
 
31
set global log_bin_trust_function_creators=1;
 
32
 
 
33
delimiter |;
 
34
create function fn16456()
 
35
       returns int
 
36
begin
 
37
       return unix_timestamp();
 
38
end|
 
39
delimiter ;|
 
40
 
 
41
set global log_bin_trust_function_creators=0;
 
42
 
 
43
 
 
44
 
 
45
# allow funcall in RBR
 
46
 
 
47
set binlog_format=ROW;
 
48
 
 
49
--replace_column 1 timestamp
 
50
select fn16456();
 
51
 
 
52
 
 
53
 
 
54
# fail funcall in SBR
 
55
 
 
56
set binlog_format=STATEMENT;
 
57
 
 
58
--error ER_BINLOG_ROW_RBR_TO_SBR
 
59
select fn16456();
 
60
 
 
61
 
 
62
 
 
63
# restore status
 
64
 
 
65
drop function fn16456;
 
66
 
 
67
--disable_query_log
 
68
eval set binlog_format=$oblf;
 
69
eval set global log_bin_trust_function_creators=$otfc;
 
70
--enable_query_log