Hi, I thought I'd ask on this list before I bother anyone on the
SQLite list in case this problem is NestedVM-specific.
At first I thought it as due to the lack of fsync(), but now
I am not so sure.
I'm building sqlite3 from the unmodified SQLite 3.3.9 source release
and compiling it to sqlite3.mips and then running it on Windows
with the NestedVM interpreter.
Given the file "stuff.sql" (at the bottom of this email) is piped
to a NestedVM-interpreted version of sqlite3 I see the following error:
nestedvm$ java -cp 'build;upstream/build/classgen/build'
org.ibex.nestedvm.Interpreter
sqlite3.mips -batch empty.db < stuff.sql
fsync(4) called, but not implemented
fsync(5) called, but not implemented
fsync(4) called, but not implemented
fsync(3) called, but not implemented
fsync(4) called, but not implemented
fsync(5) called, but not implemented
fsync(4) called, but not implemented
fsync(3) called, but not implemented
fsync(4) called, but not implemented
fsync(5) called, but not implemented
fsync(4) called, but not implemented
fsync(3) called, but not implemented
SQL error near line 47: database disk image is malformed
$ echo $?
1
You can see that it produces a corrupt sqlite3 database file.
However, there is no problem if the nested-interpreted sqlite3.mips binary
is fed to a :memory: database:
$ java -cp 'build;upstream/build/classgen/build' org.ibex.nestedvm.Interpreter
sqlite3.mips
-batch ':memory:' < stuff.sql
$ echo $?
0
Also, there is no problem if the native Windows sqlite3 commandline
shell is run:
sqlite3.exe -batch dummy.db < stuff.sql
I used the following flags to compile sqlite3 under NestedVM:
mips-unknown-elf-gcc \
-O2 -mmemcpy -ffunction-sections -fdata-sections \
-falign-functions=512 -fno-rename-registers \
-fno-schedule-insns -fno-delayed-branch -freduce-all-givs \
-march=mips1 -DOS_UNIX=1 -DNDEBUG=1 \
-DSQLITE_OMIT_VIRTUALTABLE=1 -DSQLITE_OMIT_SHARED_CACHE=1 \
-DSQLITE_OMIT_LOAD_EXTENSION=1 -DTHREADSAFE=0 -DHAVE_USLEEP=1
I'm trying to determine if this a NestedVM bug or a
NestedVM-under-Windows bug or an sqlite3 bug.
I don't have a UNIX box handy - I wonder what the sqlite 3.3.9
shell would do under UNIX/LINUX with the following command:
sqlite3 -batch zero_length_file.db < stuff.sql
Any thoughts?
stuff.sql:
CREATE TABLE SOMETHING_ABC (
ABC_DEF_GHIJ TEXT,
SURE TEXT,
BIRDFEEDER TEXT,
NOTHING TEXT,
SANDWICH TEXT,
TURKEY TEXT,
RESTING TEXT,
RULERS TEXT,
CUSTOM TEXT,
ANOTHER TEXT,
BLASTOFF TEXT,
OFCOURSE TEXT,
DESCRIPTION TEXT,
WHENEVER TEXT,
PRIMARY KEY (ABC_DEF_GHIJ, BIRDFEEDER, SANDWICH, SURE)
);
CREATE TABLE ANOTHER_TABLE (
ABC_DEF_GHIJ TEXT,
POSITION TEXT,
HOUSENUM TEXT,
LASTTIME TEXT,
PRIMARY KEY (ABC_DEF_GHIJ, POSITION, HOUSENUM)
);
CREATE TABLE ONE_MORE_TABLE (
ABC_DEF_GHIJ TEXT,
CATS TEXT,
BIRDFEEDER TEXT,
BONUS_POOLS TEXT,
PAINTER TEXT,
CAR TEXT,
NO_DOG TEXT,
ABC_CODE TEXT,
FRONTS TEXT,
NOTHING TEXT,
SANDWICH TEXT,
ITEMNUM TEXT,
SOLUTION TEXT,
HOMEDIR TEXT,
LIGHT_COL TEXT,
MODEM_NUMBER TEXT,
MODEM_PLACE TEXT,
DESCRIPTION TEXT,
LASTTIME TEXT,
PRIMARY KEY (ABC_DEF_GHIJ, BIRDFEEDER, CAR, ABC_CODE)
);
CREATE TABLE STILL_ANOTHER_TABLE (
PLACES TEXT,
FRONTS TEXT,
MAIN_SANDWICH TEXT,
ABC_CODE TEXT,
CAR TEXT,
BIRDFEEDER TEXT,
NOTHING TEXT,
SANDWICH TEXT,
ITEMNUM TEXT,
SOLUTION TEXT,
HOMEDIR TEXT,
LIGHT_COL TEXT,
DESCRIPTION TEXT,
PRIMARY KEY (PLACES, FRONTS, MAIN_SANDWICH, ABC_CODE, CAR)
);
__________________________________________________
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
-~----------~----~----~----~------~----~------~--~---