Re: [sqlite] Abnormal memory usage when removing rows within nested transaction from a table, referenced by another table via FK,

2014-12-18 Thread Paul
> > Just out of curiosity, I want to ask one more question. > > How can FK constraint fail if I am removing (replacing) row from the > > 'child' table? > > The FK constraint can fail because a new row is being inserted into the > child table. The reason statement rollback may be required is

Re: [sqlite] Abnormal memory usage when removing rows within nested transaction from a table, referenced by another table via FK,

2014-12-18 Thread RSmith
On 2014/12/18 12:03, Dan Kennedy wrote: On 12/18/2014 04:16 PM, Paul wrote: I understand. I guess, I'll have to stick to UPDATE <-> INSERT. Thank you for taking your time. Just out of curiosity, I want to ask one more question. How can FK constraint fail if I am removing (replacing) row from

Re: [sqlite] Abnormal memory usage when removing rows within nested transaction from a table, referenced by another table via FK,

2014-12-18 Thread Dan Kennedy
On 12/18/2014 04:16 PM, Paul wrote: Hi, Dan. On 12/18/2014 02:41 PM, Paul wrote: I want to confirm that issue is fixed for me. Thanks again, Dan! Please ignore this update, patch fixes this problem as well. I want to add even more input for this issue. I understand why there is implicit

Re: [sqlite] Abnormal memory usage when removing rows within nested transaction from a table, referenced by another table via FK,

2014-12-18 Thread Paul
Hi, Dan. > On 12/18/2014 02:41 PM, Paul wrote: > >> I want to confirm that issue is fixed for me. > >> Thanks again, Dan! > >> > >> > >> Please ignore this update, patch fixes this problem as well. > >> > >>> I want to add even more input for this issue. > >>> I understand why there is implicit

Re: [sqlite] Abnormal memory usage when removing rows within nested transaction from a table, referenced by another table via FK,

2014-12-18 Thread Dan Kennedy
On 12/18/2014 02:41 PM, Paul wrote: I want to confirm that issue is fixed for me. Thanks again, Dan! Please ignore this update, patch fixes this problem as well. I want to add even more input for this issue. I understand why there is implicit savepoint, when I remove row from 'parent'

Re: [sqlite] Abnormal memory usage when removing rows within nested transaction from a table, referenced by another table via FK,

2014-12-17 Thread Paul
> > I want to confirm that issue is fixed for me. > Thanks again, Dan! > > > Please ignore this update, patch fixes this problem as well. > > > I want to add even more input for this issue. > > I understand why there is implicit savepoint, when I remove row from > > 'parent' table. > > But

Re: [sqlite] Abnormal memory usage when removing rows within nested transaction from a table, referenced by another table via FK,

2014-12-17 Thread Paul
I want to confirm that issue is fixed for me. Thanks again, Dan! Please ignore this update, patch fixes this problem as well. > I want to add even more input for this issue. > I understand why there is implicit savepoint, when I remove row from 'parent' > table. > But why is this also true

Re: [sqlite] Abnormal memory usage when removing rows within nested transaction from a table, referenced by another table via FK,

2014-12-17 Thread Paul
> On 12/16/2014 03:08 PM, Paul wrote: > > The memory is being used by the statement journal, which you have in > > memory. If the app did not set "journal_mode=memory" and > > "temp_store=memory", SQLite would create a really large temp file > > instead of using memory. Which

Re: [sqlite] Abnormal memory usage when removing rows within nested transaction from a table, referenced by another table via FK,

2014-12-17 Thread Paul
I want to add even more input for this issue. I understand why there is implicit savepoint, when I remove row from 'parent' table. But why is this also true for a 'child' table when I perform 'INSERT OR REPLACE'? Removing FK reference disables journal growth. I don't understand... I have a new

Re: [sqlite] Abnormal memory usage when removing rows within nested transaction from a table, referenced by another table via FK,

2014-12-17 Thread Dan Kennedy
On 12/16/2014 03:08 PM, Paul wrote: The memory is being used by the statement journal, which you have in memory. If the app did not set "journal_mode=memory" and "temp_store=memory", SQLite would create a really large temp file instead of using memory. Which would still be sub-optimal, but might

Re: [sqlite] Abnormal memory usage when removing rows within nested transaction from a table, referenced by another table via FK,

2014-12-16 Thread Paul
> > > > > > > > > The memory is being used by the statement journal, which you have in > > > > memory. If the app did not set "journal_mode=memory" and > > > > "temp_store=memory", SQLite would create a really large temp file > > > > instead of using memory. Which would still be sub-optimal,

Re: [sqlite] Abnormal memory usage when removing rows within nested transaction from a table, referenced by another table via FK,

2014-12-15 Thread Paul
> > > > > > The memory is being used by the statement journal, which you have in > > > memory. If the app did not set "journal_mode=memory" and > > > "temp_store=memory", SQLite would create a really large temp file > > > instead of using memory. Which would still be sub-optimal, but might >

Re: [sqlite] Abnormal memory usage when removing rows within nested transaction from a table, referenced by another table via FK,

2014-12-15 Thread Paul
Hi Dan. > On 12/15/2014 11:59 PM, Dan Kennedy wrote: > > On 12/15/2014 11:11 PM, Paul wrote: > >> Hello, dear developers > >> > >> Recently I've stumbled upon a very rare and strange bug. > >> The result of this is abnormal memory usage, that does not allow us > >> to remove > >> fair number of

Re: [sqlite] Abnormal memory usage when removing rows within nested transaction from a table, referenced by another table via FK,

2014-12-15 Thread Paul
Hello Richard. > On Mon, Dec 15, 2014 at 11:11 AM, Paul wrote: > > > > Hello, dear developers > > > > Recently I've stumbled upon a very rare and strange bug. > > The result of this is abnormal memory usage, that does not allow us to > > remove > > fair number of rows from a table

Re: [sqlite] Abnormal memory usage when removing rows within nested transaction from a table, referenced by another table via FK,

2014-12-15 Thread Dan Kennedy
On 12/15/2014 11:59 PM, Dan Kennedy wrote: On 12/15/2014 11:11 PM, Paul wrote: Hello, dear developers Recently I've stumbled upon a very rare and strange bug. The result of this is abnormal memory usage, that does not allow us to remove fair number of rows from a table due to the limit of

Re: [sqlite] Abnormal memory usage when removing rows within nested transaction from a table, referenced by another table via FK,

2014-12-15 Thread Dan Kennedy
On 12/15/2014 11:11 PM, Paul wrote: Hello, dear developers Recently I've stumbled upon a very rare and strange bug. The result of this is abnormal memory usage, that does not allow us to remove fair number of rows from a table due to the limit of memory, available for 32bit process. This is

Re: [sqlite] Abnormal memory usage when removing rows within nested transaction from a table, referenced by another table via FK,

2014-12-15 Thread Richard Hipp
On Mon, Dec 15, 2014 at 11:11 AM, Paul wrote: > > Hello, dear developers > > Recently I've stumbled upon a very rare and strange bug. > The result of this is abnormal memory usage, that does not allow us to > remove > fair number of rows from a table due to the limit of memory,

Re: [sqlite] Abnormal memory usage when removing rows within nested transaction from a table, referenced by another table via FK,

2014-12-15 Thread Paul
Sorry, I've forgot to mention my sqlite version, here it is: 3.8.7.1 2014-10-29 13:59:56 3b7b72c4685aa5cf5e675c2c47ebec10d9704221 ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] Abnormal memory usage when removing rows within nested transaction from a table, referenced by another table via FK,

2014-12-15 Thread Paul
Hello, dear developers Recently I've stumbled upon a very rare and strange bug. The result of this is abnormal memory usage, that does not allow us to remove fair number of rows from a table due to the limit of memory, available for 32bit process. This is strange, because database size is