summaryrefslogtreecommitdiff
path: root/sql/item_func.cc
diff options
context:
space:
mode:
authorunknown <tnurnberg@salvation.intern.azundris.com>2006-11-15 01:58:11 +0100
committerunknown <tnurnberg@salvation.intern.azundris.com>2006-11-15 01:58:11 +0100
commitf3a877abbc98c3535dd9494dd4c990a34cd9ca34 (patch)
tree522abe3e314f3a08cbd8378de88ae77db565473c /sql/item_func.cc
parent266bf3390c80e72fecdcec3712dfad18c4bf6b5b (diff)
parentbeea1235469f3de2d703e5a413f06675d9a67c48 (diff)
downloadmariadb-git-f3a877abbc98c3535dd9494dd4c990a34cd9ca34.tar.gz
Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into salvation.intern.azundris.com:/home/tnurnberg/work/mysql-5.1-maint-16456 mysql-test/r/func_time.result: Auto merged mysql-test/t/disabled.def: Auto merged sql/item_func.cc: Auto merged sql/sql_parse.cc: Auto merged
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r--sql/item_func.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc
index 5712ad38fa4..54f679bcf4c 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -4996,6 +4996,18 @@ Item_func_sp::execute_impl(THD *thd, Field *return_value_fld)
goto error;
/*
+ Throw an error if a non-deterministic function is called while
+ statement-based replication (SBR) is active.
+ */
+ if (!m_sp->m_chistics->detistic &&
+ (mysql_bin_log.is_open() &&
+ thd->variables.binlog_format == BINLOG_FORMAT_STMT))
+ {
+ my_error(ER_BINLOG_ROW_RBR_TO_SBR, MYF(0));
+ goto error;
+ }
+
+ /*
Disable the binlogging if this is not a SELECT statement. If this is a
SELECT, leave binlogging on, so execute_function() code writes the
function call into binlog.