Stop
On Fri, Apr 5, 2019, 11:31 AM James K. Lowden
wrote:
> On Fri, 5 Apr 2019 15:45:10 +0300
> Arthur Blondel wrote:
>
> > The data is always the same. That's why removing one row should be
> > enough to insert a new one.
> > My problem is that some times I need to remove many rows to add one
On Apr 5, 2019, at 12:31 PM, James K. Lowden wrote:
>
> On Fri, 5 Apr 2019 15:45:10 +0300
> Arthur Blondel wrote:
>
>> The data is always the same. That's why removing one row should be
>> enough to insert a new one.
>> My problem is that some times I need to remove many rows to add one
>> new
On Fri, 5 Apr 2019 15:45:10 +0300
Arthur Blondel wrote:
> The data is always the same. That's why removing one row should be
> enough to insert a new one.
> My problem is that some times I need to remove many rows to add one
> new one.
SQLite *could* avoid that problem by pre-allocating space
> On 4/5/19 11:14 AM, Arthur Blondel wrote:
> > I have enough disk space. I just limit the database file size artificially
> > for testing purpose as you can see.
> > There is no problem of privilege and there is nothing else than the code I
> > sent. No other access to the DB.
> > I'm using
On 4/5/19 11:14 AM, Arthur Blondel wrote:
> I have enough disk space. I just limit the database file size artificially
> for testing purpose as you can see.
> There is no problem of privilege and there is nothing else than the code I
> sent. No other access to the DB.
> I'm using sqlite 3.16.2
As
I have enough disk space. I just limit the database file size artificially
for testing purpose as you can see.
There is no problem of privilege and there is nothing else than the code I
sent. No other access to the DB.
I'm using sqlite 3.16.2
On Fri, Apr 5, 2019 at 3:59 PM Chris Locke wrote:
>
On 5 Apr 2019, at 1:45pm, Arthur Blondel wrote:
> I'm limited in space so when the DB is full (when sqlite3_exec() returns
> SQLITE_FULL when I try to insert a new row), I remove the oldest row
If SQLite returns SQLITE_FULL you cannot reliably do anything else to the
database. Because even
uot;B" names.
-Original Message-
From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On
Behalf Of Arthur Blondel
Sent: Friday, April 05, 2019 8:45 AM
To: sqlite-users@mailinglists.sqlite.org
Subject: Re: [sqlite] Remove row to insert new one on a full database
OK,
Arthur - are you running SQLite in parallel runs?
If you access the database file using the sqlite3 command-line tool, and
try to execute the same SQL commands, do you get the same error ?
SQLite makes a temporary 'journal' file while it's working. I think that,
on your platform, by default it
OK, I wasn't clear.
I'm limited in space so when the DB is full (when sqlite3_exec() returns
SQLITE_FULL when I try to insert a new row), I remove the oldest row and
retry to insert the new one.
The data is always the same. That's why removing one row should be enough
to insert a new one.
My
On 4/4/19 11:35 PM, Simon Slavin wrote:
> On 5 Apr 2019, at 4:14am, Richard Damon wrote:
>
>> I think is logic is to attempt to insert a row, and if rather than
>> inserting it, the call returns the error condition, 'Database Full'
> Okay. So now we understand what OP meant by the database being
On 5 Apr 2019, at 4:14am, Richard Damon wrote:
> I think is logic is to attempt to insert a row, and if rather than
> inserting it, the call returns the error condition, 'Database Full'
Okay. So now we understand what OP meant by the database being full.
SQLITE_FULL does not mean 'Database
I think is logic is to attempt to insert a row, and if rather than
inserting it, the call returns the error condition, 'Database Full', you
remove a record and then try again (a form of error recovery), if it
succeeds, then you go on and get more data.
If full was X records, then they would
This almost sounds like "Full" is a software limitation, in that your
application is specifying that "Full" means you can only have "X" number of
rows.
If you're looking to remove data, I'd suggest that you find some way to
isolate the oldest record, either by a row identifier (Like an ID field
On 4/4/19 2:07 AM, Arthur Blondel wrote:
> Hello
>
> When I try to insert new data to a full SQLite database, I need to remove
> much more than really needed. I'm doing the following:
>
> while(1) {
> do {
> status = insert_1_row_to_db();
> if (status == full) {
>
This looks to be an example of the classic XY Problem. You are asking
how to solve Problem X when what you're trying to do is solve Problem
Y. In this case, "X" is a full database, which is almost certainly an
oxymoron since SQLIte can store millions of rows of data. It is not
clear what
> When the database is full
What do you mean by a full database? Do you mean when the operating system
has run out of disk space?
A SQLite database can hold millions of rows, so technically, a database
cannot be 'full'.
It would be easier explaining the full issue and what you consider the
Hello
When I try to insert new data to a full SQLite database, I need to remove
much more than really needed. I'm doing the following:
while(1) {
do {
status = insert_1_row_to_db();
if (status == full) {
remove_one_row_from_db();
}
} while (status ==
18 matches
Mail list logo