summaryrefslogtreecommitdiff
path: root/sql/log.cc
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2012-08-31 14:15:52 +0200
committerSergei Golubchik <sergii@pisem.net>2012-08-31 14:15:52 +0200
commit59408093d1add69dd4cd3d1674a73712528aed92 (patch)
tree85e7d74ddb7c0a74c6c434b9c3dacfe9b7ebe2a3 /sql/log.cc
parenta1fd37b1fd5803188d3f8b44914cca459f6e622f (diff)
parent51e14492e9410718056b0c6d9d4dabd4a96e8070 (diff)
downloadmariadb-git-59408093d1add69dd4cd3d1674a73712528aed92.tar.gz
5.3 merge
Diffstat (limited to 'sql/log.cc')
-rw-r--r--sql/log.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/log.cc b/sql/log.cc
index 56c07f81c9e..bcca0012a56 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -3182,7 +3182,7 @@ bool MYSQL_BIN_LOG::open(const char *log_name,
bytes_written+= description_event_for_queue->data_written;
}
if (flush_io_cache(&log_file) ||
- mysql_file_sync(log_file.file, MYF(MY_WME)))
+ mysql_file_sync(log_file.file, MYF(MY_WME|MY_SYNC_FILESIZE)))
goto err;
mysql_mutex_lock(&LOCK_commit_ordered);
strmake(last_commit_pos_file, log_file_name,
@@ -3212,7 +3212,7 @@ bool MYSQL_BIN_LOG::open(const char *log_name,
strlen(log_file_name)) ||
my_b_write(&index_file, (uchar*) "\n", 1) ||
flush_io_cache(&index_file) ||
- mysql_file_sync(index_file.file, MYF(MY_WME)))
+ mysql_file_sync(index_file.file, MYF(MY_WME|MY_SYNC_FILESIZE)))
goto err;
#ifdef HAVE_REPLICATION
@@ -3302,7 +3302,7 @@ static bool copy_up_file_and_fill(IO_CACHE *index_file, my_off_t offset)
}
/* The following will either truncate the file or fill the end with \n' */
if (mysql_file_chsize(file, offset - init_offset, '\n', MYF(MY_WME)) ||
- mysql_file_sync(file, MYF(MY_WME)))
+ mysql_file_sync(file, MYF(MY_WME|MY_SYNC_FILESIZE)))
goto err;
/* Reset data in old index cache */
@@ -3939,7 +3939,7 @@ int MYSQL_BIN_LOG::sync_purge_index_file()
DBUG_ENTER("MYSQL_BIN_LOG::sync_purge_index_file");
if ((error= flush_io_cache(&purge_index_file)) ||
- (error= my_sync(purge_index_file.file, MYF(MY_WME))))
+ (error= my_sync(purge_index_file.file, MYF(MY_WME|MY_SYNC_FILESIZE))))
DBUG_RETURN(error);
DBUG_RETURN(error);
@@ -4556,7 +4556,7 @@ bool MYSQL_BIN_LOG::flush_and_sync(bool *synced)
if (sync_period && ++sync_counter >= sync_period)
{
sync_counter= 0;
- err= mysql_file_sync(fd, MYF(MY_WME));
+ err= mysql_file_sync(fd, MYF(MY_WME|MY_SYNC_FILESIZE));
if (synced)
*synced= 1;
#ifndef DBUG_OFF