-
Notifications
You must be signed in to change notification settings - Fork 74
SQLite 2.3.0 - DELETE FROM [tablename] with many records results in I/O Error #43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Did you manage to resolve this? I'm getting the same issue. My HEAP and SPIFFS size are all fine, not sure if it's an ESP32 issue or a library level issue? |
this is a SPIFFS error. Change your filesystem to LITTLEFS and you should be good to go. |
Could you solve the problem? I am testing the query DELETE FROM idHist WHERE id > 0 AND IsReady = 0 ORDER BY id DESC LIMIT 10; but it does not recognize the ORDER. |
Deleting 10 rows isn't done by using a limit this way so your syntax is incorrect. You should be able to execute the SELECT limit, put the ID's in an array and walk through the array to delete the records or pass them as a static string in the statement so something like It's best to check the SQL manual a bit and get a good understand of the statements. You could also use this method. |
i think the solution in this issue might fix this problem #81 |
@genotix @mprync @mr-wiggle Please check with today's commit. This seems working now after implementing the code changes from @winkelict and @savejeff |
I'm still getting a disk i/o error when I run |
Seems I/O error is prevalent with SPIFFS. Can you try on LittleFS? |
I didn't realize arduino esp32 shipped with LittleFS. It was easy to get it going and it seems to work now. Thanks! |
hi, a small problem that I also encountered which was causing me confusion |
@davi-domo It makes sense because Sqlite maintains auto increment values in a table and it occupies couple of additional b-tree pages depending on the page size. Tables with ROWID are ok unless you create an index which poses the same issue. So it is better to create a table without ROWID and therefore merge the table and index. |
I have been attempting to TRUNCATE a table in SQLite on an ESP32-WROVER-B using the SPIFFS library.
Since TRUNCATE doesn't exist (u
The execution fails with an I/O error on the filesystem.
I have tried to do this with:
PRAGMA journal_mode=
TRUNCATE / NONE / WALTo make sure the system is not overloaded with audit logs.
This didn't do the trick.
Am I running into a bug?
I have the ESP32 version of the SQLite3 stack.
The text was updated successfully, but these errors were encountered: