summaryrefslogtreecommitdiff
path: root/storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
diff options
context:
space:
mode:
authorunknown <jonas@perch.ndb.mysql.com>2006-04-18 15:21:39 +0200
committerunknown <jonas@perch.ndb.mysql.com>2006-04-18 15:21:39 +0200
commite9e8b0bcbb9e472783fac9920a1bc23f5bd5a7ec (patch)
tree3fb7aaefb39b636e5adc1a080670aa05c6a3c2f2 /storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
parent32b71c76fcbee2e9085a8c5db3525f5077eec8c7 (diff)
downloadmariadb-git-e9e8b0bcbb9e472783fac9920a1bc23f5bd5a7ec.tar.gz
ndb - replication
Make sure that SUB_GCP_COMPLETE_ACK is sent uncond, failure to do so can lead to problems... storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp: retry on O_DIRECT storage/ndb/src/ndbapi/TransporterFacade.cpp: Make sure that SUB_GCP_COMPLETE_ACK is sent uncond
Diffstat (limited to 'storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp')
-rw-r--r--storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp b/storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
index 528e70a7ff2..b0a4d6264fb 100644
--- a/storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
+++ b/storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
@@ -385,16 +385,23 @@ void AsyncFile::openReq(Request* request)
}
new_flags |= O_CREAT;
}
-
+
no_odirect:
if (-1 == (theFd = ::open(theFileName.c_str(), new_flags, mode)))
{
PRINT_ERRORANDFLAGS(new_flags);
- if ((errno == ENOENT ) && (new_flags & O_CREAT))
+ if ((errno == ENOENT) && (new_flags & O_CREAT))
{
createDirectories();
if (-1 == (theFd = ::open(theFileName.c_str(), new_flags, mode)))
{
+#ifdef O_DIRECT
+ if (new_flags & O_DIRECT)
+ {
+ new_flags &= ~O_DIRECT;
+ goto no_odirect;
+ }
+#endif
PRINT_ERRORANDFLAGS(new_flags);
request->error = errno;
return;