From 6a7925a262bbe4ab37a90a952330b3b411bc2df5 Mon Sep 17 00:00:00 2001 From: "mats@romeo.kindahl.net" <> Date: Mon, 14 May 2007 14:45:38 +0200 Subject: WL#3339 (Issue warnings when statement-based replication may fail): Replacing binlog_row_based_if_mixed with variable binlog_stmt_flags holding several flags and adding member functions to manipulate the flags. Added code to generate a warning when an attempt to log an unsafe statement to the binary log was made. The warning is both pushed to the SHOW WARNINGS table and written to the error log. The prevent flooding the error log, the warning is just written to the error log once per open session. --- sql/item_create.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sql/item_create.cc') diff --git a/sql/item_create.cc b/sql/item_create.cc index 8ff78ef1b48..67ffbaba1ad 100644 --- a/sql/item_create.cc +++ b/sql/item_create.cc @@ -2341,7 +2341,7 @@ Create_udf_func::create(THD *thd, udf_func *udf, List *item_list) if (item_list != NULL) arg_count= item_list->elements; - thd->lex->binlog_row_based_if_mixed= TRUE; + thd->lex->set_stmt_unsafe(); DBUG_ASSERT( (udf->type == UDFTYPE_FUNCTION) || (udf->type == UDFTYPE_AGGREGATE)); @@ -4527,7 +4527,7 @@ Create_func_uuid Create_func_uuid::s_singleton; Item* Create_func_uuid::create(THD *thd) { - thd->lex->binlog_row_based_if_mixed= TRUE; + thd->lex->set_stmt_unsafe(); return new (thd->mem_root) Item_func_uuid(); } -- cgit v1.2.1