[sqlite] In memory database and locking.

2010-09-08 Thread Hemant Shah
that in-memory database always uses EXCLUSIVE lock. How do I solve this problem? Thanks. Hemant Shah E-mail: hj...@yahoo.com ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] In memory database and locking.

2010-09-08 Thread Hemant Shah
I forgot to mention, that I have set pragma journal_mode to off and for every insert I doprepare -> step -> finalize -> COMMIT. Hemant Shah E-mail: hj...@yahoo.com --- On Wed, 9/8/10, Hemant Shah <hj...@yahoo.com> wrote: From: Hemant Shah <hj...@yahoo.com> Subject: [sqlit

Re: [sqlite] In memory database and locking.

2010-09-08 Thread Hemant Shah
vacuum is a no-op for in memory database. Hemant Shah E-mail: hj...@yahoo.com --- On Wed, 9/8/10, Woody & Yuni Ho <hwoody2w...@yahoo.com> wrote: From: Woody & Yuni Ho <hwoody2w...@yahoo.com> Subject: Re: [sqlite] In memory database and locking. To: "General Disc

Re: [sqlite] EXTERNAL: In memory database and locking.

2010-09-09 Thread Hemant Shah
How do I setup trigger to run every minute? I thought about writing hash code, but thought sqlite or other in memory database would work. The in memory database seems to keep up with the in coming traffic. Hemant Shah E-mail: hj...@yahoo.com --- On Thu, 9/9/10, Black, Michael

Re: [sqlite] In memory database and locking.

2010-09-09 Thread Hemant Shah
:24 AM On 9 Sep 2010, at 4:55am, Hemant Shah wrote: > The other process wakes up every 60 seconds and deletes all row whose > timestamp columns is less then (current timestamp - 60). The timestamp is > number of seconds since epoch. Do you do this using a single DELETE FROM command ?  D

Re: [sqlite] In memory database and locking.

2010-09-09 Thread Hemant Shah
ent times and see where I get best performance. Right now I have one process doing insert and every 5000 rows do a delete. > > -Original Message- > From: sqlite-users-boun...@sqlite.org > [mailto:sqlite-users-boun...@sqlite.org] > On Behalf Of Hemant Shah > Sent: Thursday, S

Re: [sqlite] In memory database and locking.

2010-09-09 Thread Hemant Shah
--- On Thu, 9/9/10, Kees Nuyt <k.n...@zonnet.nl> wrote: > From: Kees Nuyt <k.n...@zonnet.nl> > Subject: Re: [sqlite] In memory database and locking. > To: sqlite-users@sqlite.org > Date: Thursday, September 9, 2010, 11:48 AM > On Wed, 8 Sep 2010 21:03:05 -0700

[sqlite] SQL Logic error for in-memory database

2010-09-14 Thread Hemant Shah
. Hemant Shah E-mail: hj...@yahoo.com ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] SQL Logic error for in-memory database

2010-09-15 Thread Hemant Shah
te: Tuesday, September 14, 2010, 9:51 PM > > On 15 Sep 2010, at 3:41am, Hemant Shah wrote: > > > I have written a C program that creates in-memory > database. It reads packets from the network and insert some > info in the database. > > > > Sometimes I get following error

Re: [sqlite] SQL Logic error for in-memory database

2010-09-15 Thread Hemant Shah
The error occurs while calling sqlite3_step(). Hemant Shah E-mail: hj...@yahoo.com --- On Wed, 9/15/10, Roger Binns <rog...@rogerbinns.com> wrote: > From: Roger Binns <rog...@rogerbinns.com> > Subject: Re: [sqlite] SQL Logic error for in-memory database > To: "Ge

Re: [sqlite] SQL Logic error for in-memory database

2010-09-15 Thread Hemant Shah
After executing sqlite3_step(), I check to see if the return code is SQLITE_OK if (rc != SQLITE_OK) { printf("%s\n", sqlite3_errmsg(dbhandle); } I will add sqlite3_reset() before calling sqlite3_errmsg(). Hemant Shah E-mail: hj...@yahoo.com --- On Wed, 9/15/10, Roger

[sqlite] sqlite cannot find the row

2010-09-25 Thread Hemant Shah
44376 239.56.112.112 8146 dd5b8911bf377682d8963a859b8c2055 2010-09-24 14.11.07.545855 Hemant Shah E-mail: hj...@yahoo.com ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] sqlite cannot find the row

2010-09-27 Thread Hemant Shah
t. Cannot insert into database. column MD5Sum is not unique error code = SQLITE_CONSTRAINT Row not found. ReturnCode: 101, Error Message:not an error, Error Code: 0 101 is SQLITE_DONE. So I get SQLITE_DONE instead of SQLITE_ROW. Hemant Shah E-mail: hj...@yahoo.com --- On Sun, 9/26/10, B

Re: [sqlite] sqlite cannot find the row

2010-09-27 Thread Hemant Shah
DstPort, SeqNum FROM find_retransmissions WHERE MD5Sum = ?"); I do not have quotes in both statemens, but insert statement works. Hemant Shah E-mail: hj...@yahoo.com --- On Mon, 9/27/10, Black, Michael (IS) <michael.bla...@ngc.com> wrote: > From: Black, Michael (IS) <micha

Re: [sqlite] sqlite cannot find the row

2010-09-27 Thread Hemant Shah
; select * from find_retransmissions where MD5Sum='f236a2ecf56f038ff132b91ba94287f4'; sqlite> select * displays whole table. If I do select using another column I get appropriate rows, but if I do select on MD5Sum column it returns nothing. Hemant Shah E-mail: hj...@yahoo.com --- On Mon, 9/27/1

Re: [sqlite] sqlite cannot find the row

2010-09-27 Thread Hemant Shah
what could be wrong? Hemant Shah E-mail: hj...@yahoo.com --- On Mon, 9/27/10, Hemant Shah <hj...@yahoo.com> wrote: > From: Hemant Shah <hj...@yahoo.com> > Subject: Re: [sqlite] sqlite cannot find the row > To: "General Discussion of SQLite Database" <sqlit

Re: [sqlite] sqlite cannot find the row

2010-09-27 Thread Hemant Shah
Here is the schema: create table find_retransmissions(InsTimeStamp int NOT NULL, SrcIp char[16] NOT NULL, DstIp char[16] NOT NULL, TimeStamp char[50] NOT NULL, SrcPort int NOT NULL, DstPort int NOT NULL, SeqNum int NOT NULL, MD5Sum char[33] NOT NULL) Hemant Shah E-mail: hj...@yahoo.com

Re: [sqlite] sqlite cannot find the row

2010-09-27 Thread Hemant Shah
bigger than timestamp text, but I can select based upon timestamp column. Hemant Shah E-mail: hj...@yahoo.com --- On Mon, 9/27/10, Igor Tandetnik <itandet...@mvps.org> wrote: > From: Igor Tandetnik <itandet...@mvps.org> > Subject: Re: [sqlite] sqlite cannot find the row

Re: [sqlite] sqlite cannot find the row

2010-09-27 Thread Hemant Shah
I will try it tomorrow morning. I do not have access right now. Hemant Shah E-mail: hj...@yahoo.com --- On Mon, 9/27/10, Igor Tandetnik <itandet...@mvps.org> wrote: > From: Igor Tandetnik <itandet...@mvps.org> > Subject: Re: [sqlite] sqlite cannot find the row > To: sq

Re: [sqlite] sqlite cannot find the row

2010-09-28 Thread Hemant Shah
If I use "length(MD5Sum) != 32" I get nothing. If I use "length(MD5Sum) == 32" I gat all rows. The length of the column should be 32. Hemant Shah E-mail: hj...@yahoo.com --- On Mon, 9/27/10, Hemant Shah <hj...@yahoo.com> wrote: > From: Hemant Shah <hj...@y

[sqlite] Select fails even though data is in the table.

2010-12-01 Thread Hemant Shah
rate (about every 50 microseconds) and only keep one minute worth of data in the table. How do I debug/fix this problem? Thanks. Hemant Shah E-mail: hj...@yahoo.com ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:

Re: [sqlite] Select fails even though data is in the table.

2010-12-01 Thread Hemant Shah
The unique key is col3 and col4 (SeqNum and MD5Sum). If the insert fails for this unique key then col4 should be the same. It should find the row for the even if I select for col4 only. Hemant Shah E-mail: hj...@yahoo.com --- On Wed, 12/1/10, Jim Morris <jmor...@bearriver.com> wrote:

Re: [sqlite] Select fails even though data is in the table.

2010-12-01 Thread Hemant Shah
I check for the return code after each bind call and if it is not SQLITE_OK then I return with error. So I do not think it is a bind problem. Hemant Shah E-mail: hj...@yahoo.com --- On Wed, 12/1/10, Black, Michael (IS) <michael.bla...@ngc.com> wrote: > From: Black, Michael (IS) <

Re: [sqlite] Select fails even though data is in the table.

2010-12-01 Thread Hemant Shah
This is a single thread/process. No other thread or process is accessing the data. This is a single process that reads data from message queue and dumps into database to look for duplicate rows. The problem occurs for some rows only (about 3 to 5 an hour). Hemant Shah E-mail: hj...@yahoo.com

Re: [sqlite] Select fails even though data is in the table.

2010-12-01 Thread Hemant Shah
ntoDatabase(TimeStamp, Source, SeqNum, MD5Sum) == 1) { if (GetMessageFromDB(MD5Sum, ) == 1) { /* print message */ } else { /* print error message */ } } Hemant Shah E-mail: hj...@yahoo.com --- On Wed, 12/1/10, Black, Michael (IS) <michael.bla...@ngc.com> wrote: >

Re: [sqlite] Select fails even though data is in the table.

2010-12-01 Thread Hemant Shah
Duplicate row is because of uniqueness of col3 and col4. I will try to change the code to select for col3 and col4, but I am not sure it would make any difference. Hemant Shah E-mail: hj...@yahoo.com --- On Wed, 12/1/10, Jim Morris <jmor...@bearriver.com> wrote: > From: Jim Mor

Re: [sqlite] Select fails even though data is in the table.

2010-12-01 Thread Hemant Shah
to create database on the disk but the I/O to disk cannot keep up with the input. Hemant Shah E-mail: hj...@yahoo.com --- On Wed, 12/1/10, Black, Michael (IS) <michael.bla...@ngc.com> wrote: > From: Black, Michael (IS) <michael.bla...@ngc.com> > Subject: Re: [sqlite] Select