diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2017-04-06 09:52:25 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2017-04-06 09:52:25 +0300 |
commit | 1494147cf6f810dfd2a87c93be53e3c9da3a0958 (patch) | |
tree | f62d714617394660d75f804aa7850449733cc564 /sql/wsrep_binlog.cc | |
parent | d528fd72f281541e95cec803e9db63d620cccf5e (diff) | |
parent | 25d69ea0124941cca54dbf0c2ebb2aa20ab2d6a8 (diff) | |
download | mariadb-git-1494147cf6f810dfd2a87c93be53e3c9da3a0958.tar.gz |
Merge 10.1 into 10.2
Diffstat (limited to 'sql/wsrep_binlog.cc')
-rw-r--r-- | sql/wsrep_binlog.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/wsrep_binlog.cc b/sql/wsrep_binlog.cc index 08b7e3f1e3d..d538383ebc4 100644 --- a/sql/wsrep_binlog.cc +++ b/sql/wsrep_binlog.cc @@ -329,9 +329,13 @@ void wsrep_dump_rbr_buf(THD *thd, const void* rbr_buf, size_t buf_len) } FILE *of= fopen(filename, "wb"); + if (of) { - fwrite (rbr_buf, buf_len, 1, of); + if (fwrite(rbr_buf, buf_len, 1, of) == 0) + WSREP_ERROR("Failed to write buffer of length %llu to '%s'", + (unsigned long long)buf_len, filename); + fclose(of); } else |