I just noticed today that NestedVM does not implement fsync() - it's a no-op.
Without fsync, the pure-java NestedVM SQLiteJDBC driver is not ACID compliant
and you risk database corruption if you lose power or crash during a
database transaction.
Below is a version of fsync() that prints a warning to stderr.
A correct implementation of fsync() would have to call
java.io.FileDescriptor.sync().
diff -rN -u old-nestedvm/src/org/ibex/nestedvm/support_aux.c new-nestedvm/src/or
g/ibex/nestedvm/support_aux.c
--- old-nestedvm/src/org/ibex/nestedvm/support_aux.c 2006-10-08 23:16:14.0000
00000 -0400
+++ new-nestedvm/src/org/ibex/nestedvm/support_aux.c 2007-01-06 16:04:18.0000
00000 -0500
@@ -172,6 +172,7 @@
int fsync(int fd) {
/* do nothing */
+ fprintf(stderr, "fsync(%d) called, but not implemented\n", fd);
return 0;
}
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"SQLiteJDBC" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups-beta.google.com/group/sqlitejdbc?hl=en
-~----------~----~----~----~------~----~------~--~---