Commit d7e28178 authored by Alexander Nozdrin's avatar Alexander Nozdrin

Manual merge from mysql-trunk-merge.

Conflicts:
  - mysql-test/suite/binlog/t/binlog_write_error.test
  - sql/log.cc
  - sql/log_event.cc
  - sql/log_event_old.cc
  - sql/mysql_priv.h
  - sql/sp.cc
  - sql/sql_acl.cc
  - sql/sql_base.cc
  - sql/sql_delete.cc
  - sql/sql_insert.cc
  - sql/sql_load.cc
  - sql/sql_table.cc
  - sql/sql_udf.cc
  - sql/sql_update.cc
  - sql/sql_view.cc
parents 2d4914c5 54980ce1
...@@ -1753,7 +1753,7 @@ static int binlog_rollback(handlerton *hton, THD *thd, bool all) ...@@ -1753,7 +1753,7 @@ static int binlog_rollback(handlerton *hton, THD *thd, bool all)
*/ */
if (cache_mngr->stmt_cache.has_incident()) if (cache_mngr->stmt_cache.has_incident())
{ {
mysql_bin_log.write_incident(thd, TRUE); error= mysql_bin_log.write_incident(thd, TRUE);
cache_mngr->reset_cache(&cache_mngr->stmt_cache); cache_mngr->reset_cache(&cache_mngr->stmt_cache);
} }
else if (!cache_mngr->stmt_cache.empty()) else if (!cache_mngr->stmt_cache.empty())
......
...@@ -531,8 +531,11 @@ int mysql_create_function(THD *thd,udf_func *udf) ...@@ -531,8 +531,11 @@ int mysql_create_function(THD *thd,udf_func *udf)
/* Binlog the create function. */ /* Binlog the create function. */
if (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); DBUG_RETURN(1);
}
/* Restore the state of binlog format */ /* Restore the state of binlog format */
thd->current_stmt_binlog_row_based= save_binlog_row_based; thd->current_stmt_binlog_row_based= save_binlog_row_based;
DBUG_RETURN(0); DBUG_RETURN(0);
...@@ -612,8 +615,11 @@ int mysql_drop_function(THD *thd,const LEX_STRING *udf_name) ...@@ -612,8 +615,11 @@ int mysql_drop_function(THD *thd,const LEX_STRING *udf_name)
/* Binlog the drop function. */ /* Binlog the drop function. */
if (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); DBUG_RETURN(1);
}
/* Restore the state of binlog format */ /* Restore the state of binlog format */
thd->current_stmt_binlog_row_based= save_binlog_row_based; thd->current_stmt_binlog_row_based= save_binlog_row_based;
DBUG_RETURN(0); DBUG_RETURN(0);
......
...@@ -1868,6 +1868,7 @@ void multi_update::abort() ...@@ -1868,6 +1868,7 @@ void multi_update::abort()
into repl event. into repl event.
*/ */
int errcode= query_error_code(thd, thd->killed == THD::NOT_KILLED); int errcode= query_error_code(thd, thd->killed == THD::NOT_KILLED);
/* the error of binary logging is ignored */
(void)thd->binlog_query(THD::ROW_QUERY_TYPE, (void)thd->binlog_query(THD::ROW_QUERY_TYPE,
thd->query(), thd->query_length(), thd->query(), thd->query_length(),
transactional_tables, FALSE, FALSE, errcode); transactional_tables, FALSE, FALSE, errcode);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment