InnoDB の sync (Mac OS X)

configure 時に CFLAGS=-DHAVE_DARWIN_THREADS -CXXFLAGS=-DHAVE_DARWIN_THREADS してやらないと fcntl(F_FULLFSYNC) を呼び出さないらしい。ちなみに Mac OS X の fsync および F_FULLFSYNC の動作については、man 2 fsync に以下のとおり書いてある。

For applications that require tighter guarantess about the integrity of their data, MacOS X provides the F_FULLFSYNC fcntl. The F_FULLFSYNC fcntl asks the drive to flush all buffered data to permanent storage. Applications such as databases that require a strict ordering of writes should use F_FULLFSYNC to ensure their data is written in the order they expect. Please see fcntl(2) for more detail.