I am trying to use sqlite3 in a Native Client application. There is a port available in the Chromium project, but I was unable to make it run properly.
My problem is that, for some reason, the application is unable to open a DB since a call like sqlite3_open("/filename.db", &db); fails with an I/O error.
I mounted / to a html5fs file system.
Has anybody managed to use SQLite with Native Client?
If so, I would really like to see a simple code that does something like opening a DB, CREATE a table, INSERT something and do a SELECT.
Struggled for almost a day, I found a workaround to skip the disk I/O error with specifying a VFS parameter.
sqlite3_open_v2(filename, &db, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_NOMUTEX, "unix-none");
For more information about VFS, please see http://www.sqlite.org/vfs.html My testing environment is on a chrome extension.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With