Hello Eduardo,
thank you for the hints given. Please can you tell me how to disable
journaling? In our project it is not important to have the database
persistent. We create the database, work with it, and destroy it within one
batch run. So we dont have to save it to disk ;-).
thank you so far
roland
You must tweak sqlite code, perhaps it can be a very bad tweak and
can damage your data or simple don't work. It can be done 2 ways,
a) Go to file main.c search for "sqlite3BtreeFactory" and modify the
second time you find it. The original line says
rc = sqlite3BtreeFactory(db, zFilename, 0, MAX_PAGES,
&db->aDb[0].pBt); and change it to
rc = sqlite3BtreeFactory(db, zFilename,BTREE_OMIT_JOURNAL,
MAX_PAGES, &db->aDb[0].pBt);
b) On main.c change sqlite3BtreeFactory function lines
if( omitJournal ){
btree_flags |= BTREE_OMIT_JOURNAL;
}
to (just add comments)
//if( omitJournal ){
btree_flags |= BTREE_OMIT_JOURNAL;
// }
This way you always open databases and virtual databases without
jounaling. You can't use temporal files or databases or tables, you
must use memory for temporal work.
Again, if you don't know what are you doing or what does it do, don't do.
It will be better if pragma or compiler or open_file options can be
added to OpenDatabase function to manage this.
HTH
P.S. Perhaps we did other changes or have compile options that allow
this tweak to work.
P.P.S. If you can, share any other tricks/tweaks for memory databases you find.
P.P.P.S. And last, this changes are for embedded hardware and o.s.
and shouldn't be used for regular computers.
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------