On Fri, 03 Sep 2004 09:12:31 -0400, D. Richard Hipp <[EMAIL PROTECTED]> wrote:

Unable to reproduce.  I put a breakpoint on sqlite3pager_opentemp()
and did lots of UPDATEs in the style shown, but no temporary file
was ever opened.
I've attached the database files and more additional info.
If it will not help I'll try to make minimal test to reproduce this behaviour.
However current database is very small.


There is a log of SQL statements (I've obtained it from sqlite3_trace()):

PRAGMA synchronous = NORMAL
PRAGMA cache_size = 1000
PRAGMA temp_store = MEMORY
BEGIN;
select parent, child, number from TREE where parent is null order by number
COMMIT;
BEGIN;
select caption, encrypted, compressed, created, modified, type, children, refcount, origsize from ITEMS where ROWID=?
COMMIT;
BEGIN;
select blob_data from CFG where id = ?
COMMIT;
BEGIN;
select child from TREE where parent=? order by number
select caption, encrypted, compressed, created, modified, type, children, refcount, origsize from ITEMS where ROWID=?
COMMIT;
BEGIN;
select caption, encrypted, compressed, created, modified, type, children, refcount, origsize from ITEMS where ROWID=?
COMMIT;
BEGIN;
select caption, data, encrypted, compressed, created, modified, type, children, refcount, origsize from ITEMS where ROWID=?
COMMIT;
BEGIN;
select caption, data, encrypted, compressed, created, modified, type, children, refcount, origsize from ITEMS where ROWID=?
COMMIT;
BEGIN;
insert into ITEMS (caption, data, encrypted, compressed, created, modified, type, children) values (?, ?, ?, ?, ?, ?, ?, ?)
update TREE set number = number + 1 where child = ? and parent = ? and number > ?


Here I've got breakpoint on sqlite3pager_opentemp.

Call stack is:
vdbeapi.c, line 159, sqlite3_step:
  rc = sqlite3VdbeExec(p);

vdbe.c, line 2114, sqlite3VdbeExec:
  rc = sqlite3BtreeBeginStmt(pBt);

btree.c, line 1459, sqlite3BtreeBeginStmt:
  rc = pBt->readOnly ? SQLITE_OK : sqlite3pager_stmt_begin(pBt->pPager);

pager.c, line 2952, sqlite3pager_stmt_begin:
  rc = sqlite3pager_opentemp(zTemp, &pPager->stfd);

And breakpoint in sqlite3pager_opentemp was triggered.

In any case SQLite is great. Thank you!

--
With best regards,
Dmytro Bogovych
http://www.quickoutliner.com/

Reply via email to