Re: [sqlite] TCL Test failures on ARM

2013-03-12 Thread bkk
i tried putting break point at robust_ftruncate() but it was not successful (gdb) break robust_ftruncate Function "robust_ftruncate" not defined. the symbol table of testfixture was not having "robust_ftruncate" when i read the testfixture(attached)". does it have anything to do with

Re: [sqlite] TCL Test failures on ARM

2013-03-12 Thread Dan Kennedy
On 03/13/2013 11:52 AM, bkk wrote: i tried putting break point at robust_ftruncate() but it was not successful (gdb) break robust_ftruncate Function "robust_ftruncate" not defined. the symbol table of testfixture was not having this i believe. does it have anything to do with crosscompiling ?

Re: [sqlite] Efficient way to store counters

2013-03-12 Thread Pavel Ivanov
On Tue, Mar 12, 2013 at 8:29 PM, David King wrote: > I'm trying to find an efficient way to store simple incrementing integers but > I'm having trouble finding an efficient way to do it > > My database looks like: > > CREATE TABLE counters > k1, k2, > count, -- how many

Re: [sqlite] TCL Test failures on ARM

2013-03-12 Thread bkk
i tried putting break point at robust_ftruncate() but it was not successful (gdb) break robust_ftruncate Function "robust_ftruncate" not defined. the symbol table of testfixture was not having this i believe. does it have anything to do with crosscompiling ? below are the commands i used for

Re: [sqlite] TCL Test failures on ARM

2013-03-12 Thread bkk
Below is the code path just before the error below is given out / getting printed " Expected: [0 ok] Got: [1 {nfail=1 rc=1 result=disk I/O error}] " Breakpoint 1, ts_ftruncate (fd=5, n=206456) at ./src/test_syscall.c:272 272 static int ts_ftruncate(int fd, off_t n){ (gdb) step 273

Re: [sqlite] TCL Test failures on ARM

2013-03-12 Thread bkk
below is the stack trace at the begining of second hit at the break point Breakpoint 1, ts_ftruncate (fd=6, n=206456) at ./src/test_syscall.c:272 272 static int ts_ftruncate(int fd, off_t n){ (gdb) backtrace #0 ts_ftruncate (fd=6, n=206456) at ./src/test_syscall.c:272 #1 0x000627f0 in

Re: [sqlite] Efficient way to store counters

2013-03-12 Thread David King
> > At first I was just doing something like this pseducode: > > update_counter(k1, k2, count=count+1, expires=now+count*1day) > > if rows_updated != 1: insert_counter(k1, k2, count=1, expires=now+1day) > > Might I suggest that instead of trying to store an ever-changing value, you > simply

Re: [sqlite] TCL Test failures on ARM

2013-03-12 Thread bkk
Below are the code path which is getting executed from the first hit of breakpoint at "ts_ftruncate" to the next i was wondering it was working fine with my ubuntu PC and now giving issue in linux target. Breakpoint 1, ts_ftruncate (fd=5, n=206456) at ./src/test_syscall.c:272 272 static int

Re: [sqlite] Efficient way to store counters

2013-03-12 Thread Simon Slavin
On 13 Mar 2013, at 3:29am, David King wrote: > At first I was just doing something like this pseducode: > > update_counter(k1, k2, count=count+1, expires=now+count*1day) > if rows_updated != 1: insert_counter(k1, k2, count=1, expires=now+1day) Might I suggest that instead

[sqlite] Efficient way to store counters

2013-03-12 Thread David King
I'm trying to find an efficient way to store simple incrementing integers but I'm having trouble finding an efficient way to do it My database looks like: CREATE TABLE counters k1, k2, count, -- how many we've seen expires, PRIMARY KEY (k1, k2) ); CREATE INDEX counters_expires_idx ON

Re: [sqlite] SQLite 3.7.16 beta

2013-03-12 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/03/13 17:28, Richard Hipp wrote: > The next release is currently scheduled for Monday, 2013-03-18. > > Please let us know as soon as possible if you see or suspect any issues > in the current beta. Thanks. I can provide the opposite data. My

Re: [sqlite] SQLite 3.7.16 beta

2013-03-12 Thread Richard Hipp
A logic bug was found today in the 3.7.16 beta. The DESC operator was not working on ORDER BY clauses under some obscure circumstances. The bug has now been fixed and new snapshots have have been uploaded. New snapshots: http://www.sqlite.org/draft/download.html Bug details:

Re: [sqlite] create view doesn't work

2013-03-12 Thread James K. Lowden
On Tue, 12 Mar 2013 19:57:26 + Simon Slavin wrote: > > Is my rewrite the same as the original? > > No. You can't use this construction: > > > INNER JOIN (Categories INNER JOIN Object_Categories ON > > "Categories"."Category_ID"="Object_Categories"."Category_ID") > >

Re: [sqlite] create view doesn't work

2013-03-12 Thread Simon Slavin
On 12 Mar 2013, at 9:12pm, ven...@intouchmi.com wrote: > The first select was the one that I retrieved from the MS Access DB. That > one does NOT work in SQLite. Thanks for explaining why it wasn't acceptable > by SQLite. You're welcome. > It was the second select, which I rewrote, that I

Re: [sqlite] create view doesn't work

2013-03-12 Thread veneff
Simon, The first select was the one that I retrieved from the MS Access DB. That one does NOT work in SQLite. Thanks for explaining why it wasn't acceptable by SQLite. It was the second select, which I rewrote, that I was asking about. That one is acceptable by SQLite. My question was if

Re: [sqlite] create view doesn't work

2013-03-12 Thread Simon Slavin
On 12 Mar 2013, at 7:24pm, ven...@intouchmi.com wrote: > Is my rewrite the same as the original? No. You can't use this construction: > INNER JOIN (Categories INNER JOIN Object_Categories ON > "Categories"."Category_ID"="Object_Categories"."Category_ID") The parser expects a table name

Re: [sqlite] create view doesn't work

2013-03-12 Thread veneff
As a follow up, what I meant to ask is why it doesn't work. I rewrote the original select: SELECT "Categories"."Category_Name", "Strings"."Long_Text", "Units"."Long_Units", "Limits"."Lower_Limit", "Limits"."Upper_Limit" FROM Objects INNER JOIN (Categories INNER JOIN Object_Categories ON

Re: [sqlite] create view doesn't work

2013-03-12 Thread veneff
Dominique, Thanks for your response and for breaking down the select into manageable pieces! According to the limits info, there should be no problem with the # of terms in that select statement (< 500). There are hundreds of these predefined queries that I am extracting out of the MS access

[sqlite] sqlite3_close() documentation inconsistency

2013-03-12 Thread Shane Harrelson
Documentation for sqlite3_close() on http://www.sqlite.org/c3ref/close.html has two conflicting statements: "If the database connection is associated with unfinalized prepared statements or unfinished sqlite3_backup objects then sqlite3_close() will leave the database connection open and return

Re: [sqlite] SQLite4 questions

2013-03-12 Thread Richard Hipp
On Tue, Mar 12, 2013 at 1:57 PM, Warren Young wrote: > On 3/7/2013 16:14, Richard Hipp wrote: > >> On Thu, Mar 7, 2013 at 6:10 PM, Jeff Archer > **com >> >>> wrote: >>> >> >> Will SQLite4 be capable of reading

Re: [sqlite] SQLite4 questions

2013-03-12 Thread Warren Young
On 3/7/2013 16:14, Richard Hipp wrote: On Thu, Mar 7, 2013 at 6:10 PM, Jeff Archer

Re: [sqlite] TCL Test failures on ARM

2013-03-12 Thread Dan Kennedy
On 03/12/2013 06:45 PM, bkk wrote: Below is the backtrace from the gdb when the failure happened. Seems odd to me. Assuming this is happening within the sysfault-2.1 test case, then the first stack should be setting errno to EINTR. Causing the robust_ftruncate() function to retry

Re: [sqlite] create view doesn't work

2013-03-12 Thread Dominique Devienne
I'm no expert, but I think your problem comes from the excessive parentheses you are using. Below's a little experiment that reproduces your syntax, with its error, and provides an alternative simpler syntax that works. --DD C:\Users\DDevienne>sqlite3 SQLite version 3.7.15.2 2013-01-09 11:53:05

[sqlite] create view doesn't work

2013-03-12 Thread veneff
Hello, Using sqlite3, I entered this create view statement: CREATE VIEW IF NOT EXISTS "Annies Form" AS SELECT Categories.Category_Name, Strings.Long_Text, Units.Long_Units, Limits.Lower_Limit, Limits.Upper_Limit FROM Objects INNER JOIN (Categories INNER JOIN Object_Categories ON

Re: [sqlite] Windows-Specific 2-c-files Amalgamation?

2013-03-12 Thread Bert Huijben
> -Original Message- > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- > boun...@sqlite.org] On Behalf Of Dominique Devienne > Sent: maandag 11 maart 2013 17:17 > To: General Discussion of SQLite Database > Subject: [sqlite] Windows-Specific 2-c-files Amalgamation? > > I

Re: [sqlite] TCL Test failures on ARM

2013-03-12 Thread bkk
Below is the backtrace from the gdb when the failure happened. #0 tsIsFail () at ./src/test_syscall.c:163 #1 0x000324b4 in tsIsFailErrno (zFunc=0xc8920 "ftruncate") at ./src/test_syscall.c:196 #2 0x0003268c in ts_ftruncate (fd=5, n=206456) at ./src/test_syscall.c:273 #3 0x000627f0 in

Re: [sqlite] extra added special character

2013-03-12 Thread Simon Slavin
On 12 Mar 2013, at 9:08am, jigyanshu.raj wrote: > we have using sqlite framework in c#.net. When we are going to insert new > row value "» InBox «" into table. They had added some extra character "» > InBox «" with value. This is a Windows problem. The double-arrow

[sqlite] extra added special character

2013-03-12 Thread jigyanshu.raj
hello, we have using sqlite framework in c#.net. When we are going to insert new row value "» InBox «" into table. They had added some extra character "» InBox «" with value. Please give me the solutions how to insert value into table with any special character. No any extra character.