#At file:///home/jonas/src/telco-6.2/
2701 Jonas Oreland 2008-10-21
ndb - bug#40205
O_DIRECT disabled for backups
modified:
storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
=== modified file 'storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp'
--- a/storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp 2007-08-27 18:58:49 +0000
+++ b/storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp 2008-10-21 12:31:21 +0000
@@ -270,7 +270,10 @@ AsyncFile::check_odirect_write(Uint32 fl
}
close(theFd);
- theFd = ::open(theFileName.c_str(), new_flags, mode);
+ /**
+ * We need to (O_TRUNC) truncate the file since we've written a page to it...
+ */
+ theFd = ::open(theFileName.c_str(), new_flags | O_TRUNC, mode);
if (theFd == -1)
return errno;
#endif
@@ -468,6 +471,7 @@ void AsyncFile::openReq(Request* request
return;
}
new_flags |= O_CREAT;
+ flags |= FsOpenReq::OM_CREATE;
}
no_odirect:
| Thread |
|---|
| • bzr commit into mysql-5.1 branch (jonas:2701) Bug#40205 | Jonas Oreland | 21 Oct |