Closed Gary-Hobson closed 5 months ago
@Gary-Hobson let's fix the style warning.
I am getting:
/home/jernej/work/nuttx/apps/database/sqlite/build/sqlite3.c:180495:16: error: conflicting types for 'sqlite3_autovacuum_pages'
180495 | SQLITE_API int sqlite3_autovacuum_pages(
| ^~~~~~~~
/home/jernej/work/nuttx/apps/database/sqlite/build/sqlite3.c:7144:16: note: previous declaration of 'sqlite3_autovacuum_pages' was here
7144 | SQLITE_API int sqlite3_autovacuum_pages(
| ^~~~~~~~
make[2]: *** [/home/jernej/work/nuttx/apps/Application.mk:200: /home/jernej/work/nuttx/apps/database/sqlite/build/sqlite3.c.home.jernej.work.nuttx.apps.database.sqlite.o] Error 1
Any ideas?
If I change u32 types to unsigned int, it compiles ok.
Have you tried to use Sqlite on FAT filesystem (i.e. SDCARD). I am getting disk IO errors, because Sqlite opens test.db empty file and then tries to read header from it. Because file is empty fat_read function returns with negative value instead of 0. This is not the case when littlefs is used instead of FAT.
I recommend also SQLITE_HOMEGROWN_RECURSIVE_MUTEX option to be enabled.
NuttX FAT filesystem is returning EINVAL when empty file is opened and seek is performed on it. Sqlite expects 0 to be returned. This why we get disk I/O error when opening database file. Also FAT should be configured with long names support, otherwise xxx.db-journal file is not opened and Sqlite fails.
@Gary-Hobson please fix the coding style issues
Summary
enable UTILS_SQLITE configuration, use the sqlite3 command line tool
Impact
Testing
sim