Re: [sqlite] SQLite type question

2010-10-22 Thread Richard Hipp
On Fri, Oct 22, 2010 at 8:23 PM, flow a. crash wrote: > Mr. Hipp, > > First, I want to thank you for creating such valuable software as SQLite. > > After reading through the sources, I see the type for rowid/integer > primary key is int64_t. May I ask why you didn't go with uint64_t? It > would al

Re: [sqlite] WAL file growth concern

2010-10-22 Thread Richard Hipp
On Fri, Oct 22, 2010 at 2:54 PM, Bob Smith wrote: > What I have determined (via using sqlite3_wal_hook, catching some > statistics > in the callback as well as calling sqlite3_wal_checkpoint from the callback > myself) is that each time I am writing during a read operation (so a > checkpoint can'

Re: [sqlite] SQLite3.7.3_for_Pocket_PC_2003_can't_compile

2010-10-22 Thread Shane Harrelson
You need to compile with SQLITE_OMIT_WAL for now. On Thu, Oct 21, 2010 at 10:09 PM, 祝久文 wrote: > Hello, > When compiling for Pocket PC 2003(VS2005),it gives out two errors as follows: > .\os_win.c(1350) : error C2065: 'LOCKFILE_EXCLUSIVE_LOCK' : undeclared > identifier > .\os_win.c(1357) : warni

Re: [sqlite] reading from the "without anothertransaction"point-of-view

2010-10-22 Thread Igor Tandetnik
Charles Samuels wrote: > On Friday, October 22, 2010 4:44:11 pm Igor Tandetnik wrote: >> This sort of works, if a) you change the order of "commit transaction" >> statements (the reader clears off before the writer tries to commit), and >> b) you don't insert too much, so SQLite keeps your changes

Re: [sqlite] reading from the "without another transaction"point-of-view

2010-10-22 Thread Igor Tandetnik
Charles Samuels wrote: > I have a single thread that wants to access an SQLite database, one of them > makes changes to them, the other one wants to look at an old version of the > same db. > > So, I have two handles to a db, say "H1" and "H2": > H1: begin transaction > H2: begin transaction > H1

Re: [sqlite] programmatic way of determining fragmentation?

2010-10-22 Thread Max Vlasov
On Sat, Oct 23, 2010 at 2:28 AM, Dustin Sallings wrote: > > On Oct 22, 2010, at 15:12, Max Vlasov wrote: > > > As for your initial question, I think fragmentation evaluation is > possible > > with the help of VFS. I'd keep a total sum of of absolute difference > between > > consequent read offset

Re: [sqlite] programmatic way of determining fragmentation?

2010-10-22 Thread Nicolas Williams
On Sat, Oct 23, 2010 at 02:12:19AM +0400, Max Vlasov wrote: > As for your initial question, I think fragmentation evaluation is possible > with the help of VFS. I'd keep a total sum of of absolute difference between > consequent read offsets for xRead operation. In this case if some xRead > request

Re: [sqlite] programmatic way of determining fragmentation?

2010-10-22 Thread Dustin Sallings
On Oct 22, 2010, at 15:12, Max Vlasov wrote: > As for your initial question, I think fragmentation evaluation is possible > with the help of VFS. I'd keep a total sum of of absolute difference between > consequent read offsets for xRead operation. In this case if some xRead > request reads 1024 b

Re: [sqlite] When does "begin transaction" fail?

2010-10-22 Thread Dustin Sallings
On Oct 22, 2010, at 14:56, Simon Slavin wrote: > Are you asking for circumstances where a 'BEGIN' could issue an error message > ? This one. When might "begin" return an error code and fail to begin a transaction? -- Dustin Sallings _

Re: [sqlite] programmatic way of determining fragmentation?

2010-10-22 Thread Max Vlasov
On Thu, Oct 21, 2010 at 11:32 AM, Dustin Sallings wrote: > >Mostly, I want to have an idea how fragmented I am. My app can > tremendously wreck a sqlite table right now to the point where a > reconstruction (vacuum, etc...) is the difference between three hours and > one minute. I'd lik

Re: [sqlite] When does "begin transaction" fail?

2010-10-22 Thread Simon Slavin
On 22 Oct 2010, at 10:33pm, Dustin Sallings wrote: > Assuming I'm not in a transaction already, what could possibly cause me to > fail to start a transaction? Sorry, I find your question unclear. Are you asking for circumstances where a 'BEGIN' could issue an error message ? Or for circumstan

[sqlite] When does "begin transaction" fail?

2010-10-22 Thread Dustin Sallings
Assuming I'm not in a transaction already, what could possibly cause me to fail to start a transaction? I have reason to believe I have at some point a commit was attempted to start but failed. I do not currently have any data around this failure (it happened a couple of times

Re: [sqlite] WAL file growth concern

2010-10-22 Thread Andrey Cherezov
From: Bob Smith Date: 2010-10-21 22:55:05 GMT > I might possibly have found an issue/concern with the way sqlite handles > doing new writes to the WAL file during a time that checkpoints are unable > to checkpoint data from the WAL file back into the database due to a reader > being in the proces

[sqlite] WAL file growth concern

2010-10-22 Thread Bob Smith
I have been able to do some more investigation here. What I was seeing originally made me suspicious that a writer was skipping over parts of the WAL file during the time that a checkpoint is unable to proceed due to a reader. After further investigation, however, I have determined that this is NOT

[sqlite] SQLite3.7.3_for_Pocket_PC_2003_can't_compile

2010-10-22 Thread 祝久文
Hello, When compiling for Pocket PC 2003(VS2005),it gives out two errors as follows: .\os_win.c(1350) : error C2065: 'LOCKFILE_EXCLUSIVE_LOCK' : undeclared identifier .\os_win.c(1357) : warning C4013: 'UnlockFileEx' undefined; assuming extern returning int Would you give me some solutions,please?