diff options
author | Alexander Nozdrin <alik@sun.com> | 2010-01-30 21:47:11 +0300 |
---|---|---|
committer | Alexander Nozdrin <alik@sun.com> | 2010-01-30 21:47:11 +0300 |
commit | 5aa4c33e3233e2c1cac9f3bb0b17379a56503666 (patch) | |
tree | 5bb7d787b7b4c25140afb74590153f8109510d61 /sql/sql_udf.cc | |
parent | b436e0ae20da93f6ebf3231ac28f397966187175 (diff) | |
parent | dad4291b781495cfdc8abac9dc2902621bfb3b56 (diff) | |
download | mariadb-git-5aa4c33e3233e2c1cac9f3bb0b17379a56503666.tar.gz |
Manual merge from mysql-5.1-bugteam.
Conflicts:
- sql/mysql_priv.h
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 5dd67fea3a2..b2e35c84854 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); |