1
-- source include/have_log_bin.inc
3
# Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
7
let $oblf=`select @@SESSION.BINLOG_FORMAT`;
8
let $otfc=`select @@log_bin_trust_function_creators`;
10
set global log_bin_trust_function_creators=0;
14
# fail *on definition*
16
set binlog_format=STATEMENT;
19
--error ER_BINLOG_UNSAFE_ROUTINE
20
create function fn16456()
23
return unix_timestamp();
29
# force in definition, so we can see whether we fail on call
31
set global log_bin_trust_function_creators=1;
34
create function fn16456()
37
return unix_timestamp();
41
set global log_bin_trust_function_creators=0;
45
# allow funcall in RBR
47
set binlog_format=ROW;
49
--replace_column 1 timestamp
56
set binlog_format=STATEMENT;
58
--error ER_BINLOG_ROW_RBR_TO_SBR
65
drop function fn16456;
68
eval set binlog_format=$oblf;
69
eval set global log_bin_trust_function_creators=$otfc;