Skip to content

Temporary sort file, Watch dog #41

Open
@vvvait

Description

@vvvait

Hi.
Thanks for adapting sqlite3 for esp32.
I researched the work of the library for several months.
On some requests, I began to receive the "disk I / O error" error. I got into the source and found that there is no way to create temporary files.
in esp32.cpp: ESP32Open

const char *zName,              /* File to open, or 0 for a temp file */
...
if( zName==0 ){
  return SQLITE_IOERR;
}

i replaced return SQLITE_IOERR; to zName = "/sd/temp";
and selection of 1000 records with sorting began to work.

It is also worth adding feeding the WatchDog on requests longer than 3 seconds if execute worked in main loop task, otherwise it will fire, may by in ESP32Read and ESP32Write, or add some callbacks.

max performance i have with
#define SQLITE_DEFAULT_PAGE_SIZE 512 //4096
#define SQLITE_DEFAULT_CACHE_SIZE -8 // -1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions