SQLiteFullException: database or disk is full (code 13) GreenDao
Asked Answered
S

4

9

how to solving SQLiteFulException in greenDao when I delete record from table?

this is my stacktrace :

android.database.sqlite.SQLiteFullException: database or disk is full (code 13)
at android.database.sqlite.SQLiteConnection.nativeExecute(Native Method)
at android.database.sqlite.SQLiteConnection.execute(SQLiteConnection.java:555)
at android.database.sqlite.SQLiteSession.endTransactionUnchecked(SQLiteSession.java:437)
at android.database.sqlite.SQLiteSession.endTransaction(SQLiteSession.java:401)
at android.database.sqlite.SQLiteDatabase.endTransaction(SQLiteDatabase.java:522)
at de.greenrobot.dao.AbstractDao.deleteInTxInternal(AbstractDao.java:613)
at de.greenrobot.dao.AbstractDao.deleteInTx(AbstractDao.java:623)

this is my code for delete record from database :

QueryBuilder<TaskD> qb = getTaskDDao(context).queryBuilder();
qb.where(TaskDDao.Properties.Uuid_task_h.eq(keyTaskH));
qb.build();
getTaskDDao(context).deleteInTx(qb.list());
getDaoSession(context).clear();
Stalagmite answered 16/6, 2016 at 7:39 Comment(2)
Please post the code that you're using.Maneating
question was edited for code that i'am using @ManeatingStalagmite
S
5

This is unrelated to greenDAO. If your disk is full, it is full. You ran out of disk space. Depending on what you do, running VACUUM SQLite occasionally may defrag your DB.

Sixgun answered 16/6, 2016 at 8:22 Comment(2)
is there the ability from GreenDao for setting schema.auto_vacuum in the database, @greenrobot ?Stalagmite
No, greenDAO does not touch vacuum at allSixgun
M
2

From SQLite documentation

(13) SQLITE_FULL

The SQLITE_FULL result code indicates that a write could not complete because the disk is full. Note that this error can occur when trying to write information into the main database file, or it can also occur when writing into temporary disk files. Sometimes applications encounter this error even though there is an abundance of primary disk space because the error occurs when writing into temporary disk files on a system where temporary files are stored on a separate partition with much less space that the primary disk. https://www.sqlite.org/rescode.html#full

I guess application is installed on SDCARD or something.

Meddlesome answered 14/9, 2017 at 4:24 Comment(0)
P
1

Here is the list of error codes https://www.sqlite.org/rescode.html

(13) SQLITE_FULL
The SQLITE_FULL result code indicates that a write could not complete because the 
disk is full. Note that this error can occur when trying to write information into 
the main database file, or it can also occur when writing into temporary disk files.

Sometimes applications encounter this error even though there is an abundance of 
primary disk space because the error occurs when writing into temporary disk files on 
a system where temporary files are stored on a separate partition with much less 
space that the primary disk.`

And here is the temporary files used by sqlite https://www.sqlite.org/tempfiles.html
Are you receiving too much data from server maybe?

Puri answered 26/7, 2019 at 8:41 Comment(0)
A
0

Clean app data and clear storage in your Android or iOS app

Acetum answered 30/8 at 5:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.