Re: [sqlite] Race condition -- fixed?

2007-10-25 Thread Dan Kennedy
On Wed, 2007-10-24 at 21:38 -0700, Richard Klein wrote: > As I was thinking about the locking mechanism in SQLite 3, > it occurred to me that the following race condition could > occur. > > Imagine a joint bank account with a balance of $10,000. > The wife makes a withdrawal of $1,000 at ATM 'A'

Re: [sqlite] Lemon not reducing

2007-10-25 Thread Gaspard Bucher
> I do not understand why lemon waits for one more token when it has > enough information to reduce ... > > >>> I don't think you can. Why do you want to? Why not just go > >>> ahead and send it the next token? > >>> > >> Most people find a way around this problem using

[sqlite] RE : [sqlite] primary key constraint

2007-10-25 Thread David Nguyen
What is the difference between : 1/ userid UNSIGNED INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL 2/ userid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL CHECK (userid>0) --- David Nguyen <[EMAIL PROTECTED]> a écrit : > Hello, > > With php, I want to create 2 tables, userid is a > primary key

[sqlite] Re: Race condition -- fixed?

2007-10-25 Thread Igor Tandetnik
Richard Klein <[EMAIL PROTECTED]> wrote: Process A - BEGIN TRANSACTION; SELECT balance FROM accounts WHERE accountId = '123-45-6789'; UPDATE accounts SET balance = WHERE accountId = '123-45-6789'; COMMIT; Process B - BEGIN TRANSACTION; SELECT balance FROM

RE: [sqlite] Impact of no.of tables and records on Startup time

2007-10-25 Thread Samuel R. Neff
Complexity of the schema affects time required to open a connection since the schema has to be read and processed. With about 70 tables each with lots of indexes and triggers, it takes us 17ms to open the connection. HTH, Sam --- We're Hiring! Seeking

Re: [sqlite] Re: Some Questions Regarding Access To a SQLite Database By More Than One Process

2007-10-25 Thread Mark Spiegel
Here's a bit more locking info that I found useful to help understand it all out of the archives: http://www.mail-archive.com/sqlite-users@sqlite.org/msg02845.html If you are writing a Windows app, you can use a named mutex which can be shared across processes. I have need for a blocking

Re: RE: [sqlite] Impact of no.of tables and records on Startup time

2007-10-25 Thread RaghavendraK 70574
Can cache and page size configuration improve or worsen the situation? regards ragha ** This email and its attachments contain confidential information from HUAWEI, which is intended only for the person or

RE: [sqlite] Race condition -- fixed?

2007-10-25 Thread Lee Crain
Guys, I read this forum regularly and I've given a lot of thought to all of these conversations about low level logic and trying to squeeze the last ounce of performance out of SQLite. That's not for me. Simplicity equates to robustness and my company needs robustness. And my time is really

Re: [sqlite] Race condition -- fixed?

2007-10-25 Thread John Stanton
A classic solution to that problem is not to perform updates but to insert transactions, The concept of log file systems to give concurrency is worth scrutiny. Richard Klein wrote: As I was thinking about the locking mechanism in SQLite 3, it occurred to me that the following race condition

Re: [sqlite] Race condition -- fixed?

2007-10-25 Thread John Stanton
You make a sound point. From my perspective the Sqlite synchronization mechanisms are a flawed part of an otherwise elegantly simple design, as reading this forum indicates. Synchronization problems are the major item of confusion among users. A more robust and less intricate interface

[sqlite] Aggregation of data

2007-10-25 Thread Roland Rau
Dear all, my aim is to aggregate some data. To be more specific: I have a table 'mytable' with variables a, b, c, and ctr. The values for variable ctr are all 1 (individual level data in the raw format). If I want to know how many people with the same covariate setting there are, I used the

Re: [sqlite] Race condition -- fixed?

2007-10-25 Thread Trevor Talbot
The thing is, SQLite's synchronization mechanism is simpler than most full-featured SQL databases. In all cases, the point is that if you are attempting to do simultaneous writes from two connections, each connection must be prepared to receive an error, rollback the transaction, and try again.

Re: [sqlite] Race condition -- fixed?

2007-10-25 Thread Richard Klein
Lee Crain wrote: I've wrapped all of my company's SQLite database accesses in my own API layer that encapsulates all of our applications' business rules and forces ALL transactions, no matter how lengthy or trivial, to be atomic by using a MUTEX to avoid the types of scenarios described below.

Re: [sqlite] Race condition -- fixed?

2007-10-25 Thread Richard Klein
Trevor Talbot wrote: The thing is, SQLite's synchronization mechanism is simpler than most full-featured SQL databases. In all cases, the point is that if you are attempting to do simultaneous writes from two connections, each connection must be prepared to receive an error, rollback the

Re: [sqlite] it seems sqlite3_prepare_v2 disappeared for me

2007-10-25 Thread Dennis Cote
Rafi Cohen wrote: Hi, I've written an application in C that integrates sqlite-3.3.12. Up to now for months everything was running fast and smooth. Now, I installed sqlite3 and compiled my application on a different computer. The installations were ok, but upon activating my application, it quits

Re: [sqlite] Race condition -- fixed?

2007-10-25 Thread Richard Klein
Dan Kennedy wrote: On Wed, 2007-10-24 at 21:38 -0700, Richard Klein wrote: As I was thinking about the locking mechanism in SQLite 3, it occurred to me that the following race condition could occur. Imagine a joint bank account with a balance of $10,000. The wife makes a withdrawal of $1,000

Re: [sqlite] Race condition -- fixed?

2007-10-25 Thread John Stanton
I am sure that you are correct, that Sqlite's sync mechanism is not terribly complicated for you and for anyone else who understands the principles, however it does confuse many users as you see from the posts to this forum. Simple to use could become simpler to use. Synchronizing

Re: [sqlite] Race condition -- fixed?

2007-10-25 Thread Trevor Talbot
On 10/25/07, Richard Klein <[EMAIL PROTECTED]> wrote: > Trevor Talbot wrote: > > The thing is, SQLite's synchronization mechanism is simpler than most > > full-featured SQL databases. In all cases, the point is that if you > > are attempting to do simultaneous writes from two connections, each >

RE: [sqlite] Re: Some Questions Regarding Access To a SQLite Database By More Than One Process

2007-10-25 Thread James Dennett
> -Original Message- > From: Ken [mailto:[EMAIL PROTECTED] > Sent: Wednesday, October 24, 2007 1:22 PM > To: sqlite-users@sqlite.org > Subject: RE: [sqlite] Re: Some Questions Regarding Access To a SQLite > Database By More Than One Process > > If you are using seperate processes then a

Re: [sqlite] Race condition -- fixed?

2007-10-25 Thread Richard Klein
Trevor Talbot wrote: On 10/25/07, Richard Klein <[EMAIL PROTECTED]> wrote: Trevor Talbot wrote: The thing is, SQLite's synchronization mechanism is simpler than most full-featured SQL databases. In all cases, the point is that if you are attempting to do simultaneous writes from two

[sqlite] Re[sqlite] garding software of SQlite2.1

2007-10-25 Thread Vijaya Lakshmi
Hi all, I need small help regarding software .Acutually my application was developed in SQLite2.1 by some body now i need SQLite2.1 version.Actually I found SQLite3 version but by using this software i am unable to run my application.please let me know from which site i can get SQLite2.1