diff options
author | unknown <Dao-Gang.Qu@sun.com> | 2010-01-25 10:55:05 +0800 |
---|---|---|
committer | unknown <Dao-Gang.Qu@sun.com> | 2010-01-25 10:55:05 +0800 |
commit | dad4291b781495cfdc8abac9dc2902621bfb3b56 (patch) | |
tree | 79b80f370265c5019547a5ef30b218665a358d84 /sql/sql_udf.cc | |
parent | 3cae7d1187795a8089b6f54ac60cf2a0e579cf89 (diff) | |
parent | 2b16517522afad76bc94b07bdaa8af64091e713b (diff) | |
download | mariadb-git-dad4291b781495cfdc8abac9dc2902621bfb3b56.tar.gz |
Manual merge with Conflicts:
sql_udf.cc
Diffstat (limited to 'sql/sql_udf.cc')
-rw-r--r-- | sql/sql_udf.cc | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/sql/sql_udf.cc b/sql/sql_udf.cc index 76cadc79c6f..d455a66c4f2 100644 --- a/sql/sql_udf.cc +++ b/sql/sql_udf.cc @@ -507,8 +507,12 @@ int mysql_create_function(THD *thd,udf_func *udf) rw_unlock(&THR_LOCK_udf); /* Binlog the create function. */ - write_bin_log(thd, TRUE, thd->query(), thd->query_length()); - + if (write_bin_log(thd, TRUE, thd->query(), thd->query_length())) + { + /* Restore the state of binlog format */ + thd->current_stmt_binlog_row_based= save_binlog_row_based; + DBUG_RETURN(1); + } /* Restore the state of binlog format */ thd->current_stmt_binlog_row_based= save_binlog_row_based; DBUG_RETURN(0); @@ -587,8 +591,12 @@ int mysql_drop_function(THD *thd,const LEX_STRING *udf_name) rw_unlock(&THR_LOCK_udf); /* Binlog the drop function. */ - write_bin_log(thd, TRUE, thd->query(), thd->query_length()); - + if (write_bin_log(thd, TRUE, thd->query(), thd->query_length())) + { + /* Restore the state of binlog format */ + thd->current_stmt_binlog_row_based= save_binlog_row_based; + DBUG_RETURN(1); + } /* Restore the state of binlog format */ thd->current_stmt_binlog_row_based= save_binlog_row_based; DBUG_RETURN(0); |