summaryrefslogtreecommitdiff
path: root/sql/log.cc
diff options
context:
space:
mode:
authorLuis Soares <luis.soares@sun.com>2009-10-23 01:03:41 +0100
committerLuis Soares <luis.soares@sun.com>2009-10-23 01:03:41 +0100
commit8a60aa18b6b21dbce3e0773469c3e183fc99765a (patch)
tree58d46ccb0a766af02892eb8ddf80c386a1876ab4 /sql/log.cc
parent9eb7374c57eba7679cd6b0882fee73272a871012 (diff)
parent454a0c0d209de06709ddcbf083a9839214512927 (diff)
downloadmariadb-git-8a60aa18b6b21dbce3e0773469c3e183fc99765a.tar.gz
BUG#34582: mysql-5.1-bugteam-bug-branch --> mysql-5.1-bugteam-latest
(automerge)
Diffstat (limited to 'sql/log.cc')
-rw-r--r--sql/log.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/sql/log.cc b/sql/log.cc
index c087ac41a66..057f5e8cd7d 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -3602,7 +3602,7 @@ void MYSQL_BIN_LOG::new_file_impl(bool need_lock)
}
old_name=name;
name=0; // Don't free name
- close(LOG_CLOSE_TO_BE_OPENED);
+ close(LOG_CLOSE_TO_BE_OPENED | LOG_CLOSE_INDEX);
/*
Note that at this point, log_state != LOG_CLOSED (important for is_open()).
@@ -3617,8 +3617,10 @@ void MYSQL_BIN_LOG::new_file_impl(bool need_lock)
trigger temp tables deletion on slaves.
*/
- open(old_name, log_type, new_name_ptr,
- io_cache_type, no_auto_events, max_size, 1);
+ /* reopen index binlog file, BUG#34582 */
+ if (!open_index_file(index_file_name, 0))
+ open(old_name, log_type, new_name_ptr,
+ io_cache_type, no_auto_events, max_size, 1);
my_free(old_name,MYF(0));
end: