Discussion:
[sqlite] delete record fail when disk full
Kei
2004-05-27 03:59:35 UTC
Permalink
Hi all,

I want to delete a record when database is full but I get the error message "../../src/sqlite/pager.c:559: pager_playback_one_page: Assertion `pPg->nRef==0 || pPg->pgno==1' failed." or "SQL error:databse is full"
The sequence of doing the test:
1. create the db file and insert records until the sqlite outputs SQLITE_FULL (disk full).
2. delete one record
3. the error message "../../src/sqlite/pager.c:559: pager_playback_one_page: Assertion `pPg->nRef==0 || pPg->pgno==1' failed." or "SQL error:databse is full" is shown

Is it a normal condition if no space to do the delete operation?or is it a bug?how to solve it if it has solution? Thx a lot!
I am running it in arm_linux and I use sqlite version 2.8.12. temp_store is 3 in sqliteInt.h (use memory).

Best regards,
Kei
Darren Duncan
2004-05-27 05:10:08 UTC
Permalink
Post by Kei
Is it a normal condition if no space to do the delete operation?or
is it a bug?how to solve it if it has solution? Thx a lot!
I am running it in arm_linux and I use sqlite version 2.8.12.
temp_store is 3 in sqliteInt.h (use memory).
While performing any change operation, SQLite will first back-up the
original portions to a second rollback file, usually in multiples of
1K. This file disappears or resets when you commit the current
transaction. If the disk is full, then this file creation fails, so
no changes will work. -- Darren Duncan

---------------------------------------------------------------------
To unsubscribe, e-mail: sqlite-users-unsubscribe-CzDROfG0BjIdnm+***@public.gmane.org
For additional commands, e-mail: sqlite-users-help-CzDROfG0BjIdnm+***@public.gmane.org
Kei
2004-05-27 13:06:48 UTC
Permalink
Hi all,

Thank you. Does the size of the second rollback file depend on the size of
database file or another issue?
If the size of database file is 2MB, will the rollabck file also consume
2MB?

Best regards,
Kei

----- Original Message -----
From: "Darren Duncan" <darren-***@public.gmane.org>
To: <sqlite-users-CzDROfG0BjIdnm+***@public.gmane.org>
Sent: Thursday, May 27, 2004 1:10 PM
Subject: Re: [sqlite] delete record fail when disk full
Post by Darren Duncan
Post by Kei
Is it a normal condition if no space to do the delete operation?or
is it a bug?how to solve it if it has solution? Thx a lot!
I am running it in arm_linux and I use sqlite version 2.8.12.
temp_store is 3 in sqliteInt.h (use memory).
While performing any change operation, SQLite will first back-up the
original portions to a second rollback file, usually in multiples of
1K. This file disappears or resets when you commit the current
transaction. If the disk is full, then this file creation fails, so
no changes will work. -- Darren Duncan
---------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: sqlite-users-unsubscribe-CzDROfG0BjIdnm+***@public.gmane.org
For additional commands, e-mail: sqlite-users-help-CzDROfG0BjIdnm+***@public.gmane.org
Christian Smith
2004-05-27 18:41:10 UTC
Permalink
Post by Kei
Hi all,
Thank you. Does the size of the second rollback file depend on the size of
database file or another issue?
If the size of database file is 2MB, will the rollabck file also consume
2MB?
No, pages are appended to the rollback file as and when they are updated
in the main file.
Post by Kei
Best regards,
Kei
----- Original Message -----
Sent: Thursday, May 27, 2004 1:10 PM
Subject: Re: [sqlite] delete record fail when disk full
Post by Darren Duncan
Post by Kei
Is it a normal condition if no space to do the delete operation?or
is it a bug?how to solve it if it has solution? Thx a lot!
I am running it in arm_linux and I use sqlite version 2.8.12.
temp_store is 3 in sqliteInt.h (use memory).
While performing any change operation, SQLite will first back-up the
original portions to a second rollback file, usually in multiples of
1K. This file disappears or resets when you commit the current
transaction. If the disk is full, then this file creation fails, so
no changes will work. -- Darren Duncan
---------------------------------------------------------------------
---------------------------------------------------------------------
--
/"\
\ / ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
X - AGAINST MS ATTACHMENTS
/ \

---------------------------------------------------------------------
To unsubscribe, e-mail: sqlite-users-unsubscribe-CzDROfG0BjIdnm+***@public.gmane.org
For additional commands, e-mail: sqlite-users-help-CzDROfG0BjIdnm+***@public.gmane.org
Darren Duncan
2004-05-27 20:12:26 UTC
Permalink
Post by Kei
Hi all,
Thank you. Does the size of the second rollback file depend on the size of
database file or another issue?
If the size of database file is 2MB, will the rollabck file also consume
2MB?
Best regards,
Kei
The size of the rollback file is equivalent to the number of 1K pages
in the database file that you change within a transaction. Things
that affect this include both data insert/update/delete, changing
schema definitions, and any indexes that exist on data or schema that
you change. If anything, the size of the rollback file has a
*maximum* possible size that is the same as the database file (if you
change every page in the file), but usually it is only a small
fraction of the size. For example, if you are deleting one record,
then the rollback file may take about 5K (wild guess). -- Darren
Duncan

---------------------------------------------------------------------
To unsubscribe, e-mail: sqlite-users-unsubscribe-CzDROfG0BjIdnm+***@public.gmane.org
For additional commands, e-mail: sqlite-users-help-CzDROfG0BjIdnm+***@public.gmane.org
Loading...