summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorLuis Soares <luis.soares@oracle.com>2010-12-07 16:55:25 +0000
committerLuis Soares <luis.soares@oracle.com>2010-12-07 16:55:25 +0000
commit1b94ba5407d125b03550ce7231714fab8c634cc9 (patch)
treec847aecc4bf0c752aa3e818af14c46c93f1cf48a /sql
parent5d6e142b2b9a5973fc9b9a638e01e5b92223e4c8 (diff)
downloadmariadb-git-1b94ba5407d125b03550ce7231714fab8c634cc9.tar.gz
BUG#46166
Post merge fixes for mysql-5.5-bugteam.
Diffstat (limited to 'sql')
-rw-r--r--sql/log.cc2
-rw-r--r--sql/slave.cc3
-rw-r--r--sql/sql_repl.cc2
3 files changed, 4 insertions, 3 deletions
diff --git a/sql/log.cc b/sql/log.cc
index 234fbae6961..b20feb31d5f 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -5111,7 +5111,7 @@ int MYSQL_BIN_LOG::rotate_and_purge(uint flags)
to the current log.
*/
if (!write_incident(current_thd, FALSE))
- flush_and_sync();
+ flush_and_sync(0);
#ifdef HAVE_REPLICATION
check_purge= true;
diff --git a/sql/slave.cc b/sql/slave.cc
index 8568a119fe8..e081d2406be 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -523,7 +523,8 @@ int terminate_slave_threads(Master_info* mi,int thread_mask,bool skip_lock)
if (flush_master_info(mi, TRUE, FALSE))
DBUG_RETURN(ER_ERROR_DURING_FLUSH_LOGS);
- if (my_sync(mi->rli.relay_log.get_log_file()->file, MYF(MY_WME)))
+ if (mi->rli.relay_log.is_open() &&
+ my_sync(mi->rli.relay_log.get_log_file()->file, MYF(MY_WME)))
DBUG_RETURN(ER_ERROR_DURING_FLUSH_LOGS);
if (my_sync(mi->fd, MYF(MY_WME)))
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc
index 7bca41f1265..4e8b70c58f6 100644
--- a/sql/sql_repl.cc
+++ b/sql/sql_repl.cc
@@ -1925,7 +1925,7 @@ bool show_binlogs(THD* thd)
if (!mysql_bin_log.is_open())
{
- my_message(ER_NO_BINARY_LOGGING, ER(ER_NO_BINARY_LOGGING), MYF(0));
+ my_error(ER_NO_BINARY_LOGGING, MYF(0));
DBUG_RETURN(TRUE);
}