Re: [sqlite] How to check atomic write feature for 4KB page size on TCL test?

2012-08-22 Thread Yongil Jang
I found a reason of below failures. This test is failed in case of INSERT INTO abc VALUES(4, 5, randstr(1000,1000)) query is executed in crash scripts. When this query is executed, journal file is created because of record size exceeds current page and crashed by test scripts. However, if I

[sqlite] Typo in documentation for fts trigger

2012-08-22 Thread AJ ONeal
http://www.sqlite.org/fts3.html CREATE TRIGGER t2_bu AFTER UPDATE ON t2 BEGIN INSERT INTO t3(docid, b, c) VALUES(new.rowid, new.b, new.c); END; CREATE TRIGGER t2_bd AFTER INSERT ON t2 BEGIN INSERT INTO t3(docid, b, c) VALUES(new.rowid, new.b, new.c); END; should have the _bu and _bd

[sqlite] datetime question

2012-08-22 Thread YAN HONG YE
create table test( Date datetime); insert test now(); select date+2 as bbb,date-12 as cc from test; the result is 2014,2000 I wanna know how to add any day use sql command ___ sqlite-users mailing list sqlite-users@sqlite.org

[sqlite] How to use tornado2.2 build SQLite on VxWorks5.5

2012-08-22 Thread 张鹤
*I use tornado2.2 to build SQLite3.7.13 on **VxWorks5.5**.* There is a message as follows: I ported sqlite to Vxworks. It was a straight forward port. File locking is not \ possible in VxWorks. So I do not use it. So I define the macro __DJGPP__ which takes \ care of fcntl call used for file

Re: [sqlite] datetime question

2012-08-22 Thread Simon Slavin
On 23 Aug 2012, at 3:14am, YAN HONG YE yanhong...@mpsa.com wrote: create table test( Date datetime); insert test now(); select date+2 as bbb,date-12 as cc from test; the result is 2014,2000 I wanna know how to add any day use sql command There is no field type 'datetime'. Dates are

Re: [sqlite] datetime question

2012-08-22 Thread Keith Medcalf
create table test( Date datetime); Datetime is not a data type and therefore has numeric affinity. insert test now(); sqlite select now(); Error: no such function: now What is function now and what does it return? select date+2 as bbb,date-12 as cc from test; the result is 2014,2000

Re: [sqlite] How to use tornado2.2 build SQLite on VxWorks5.5

2012-08-22 Thread Udon Shaun
Hi. I'm attempting the same but for VxWorks 6.3 (so far no-one has got back to me). My problems are somewhat different but whilst playing around and attempting I did resolve the the fstat. In the 3.7.13 (line 25484) fstat is defined as #ifdef __DJGPP__   { fstat,    0, 0 

[sqlite] update moving avg value

2012-08-22 Thread YAN HONG YE
select round(((select avg(close) from test2 b where b.tkid between a.tkid-12 and a.tkid) - (select avg(close) from test2 b where b.tkid between a.tkid-26 and a.tkid)),2) from test2 a could be select the result,but when update use this sql script: update test2 set diff =(select round(((select

Re: [sqlite] update moving avg value

2012-08-22 Thread Igor Tandetnik
YAN HONG YE yanhong...@mpsa.com wrote: select round(((select avg(close) from test2 b where b.tkid between a.tkid-12 and a.tkid) - (select avg(close) from test2 b where b.tkid between a.tkid-26 and a.tkid)),2) from test2 a could be select the result,but when update use this sql script:

Re: [sqlite] update moving avg value

2012-08-22 Thread Keith Medcalf
select round(((select avg(close) from test2 b where b.tkid between a.tkid-12 and a.tkid) - (select avg(close) from test2 b where b.tkid between a.tkid-26 and a.tkid)),2) from test2 a could be select

Re: [sqlite] update moving avg value

2012-08-22 Thread Igor Tandetnik
Keith Medcalf kmedc...@dessus.com wrote: Of course, your select simplifies to: select -round((select avg(close) from test2 b where b.tkid between a.tkid-26 and a.tkid-13),2) from test2 a No it doesn't. You cannot just subtract numerators of the two fractions

Re: [sqlite] update moving avg value

2012-08-22 Thread Keith Medcalf
On Wednesday, 22 August, 2012 22:31, Igor Tandetnik wrote: Keith Medcalf kmedc...@dessus.com wrote: Of course, your select simplifies to: select -round((select avg(close) from test2 b where b.tkid between a.tkid-26 and a.tkid-13),2) from test2 a No it

[sqlite] SQLite - Database disk size difference when tables copied

2012-08-22 Thread Madhur Kashyap
Hello, I am using Tcl Extension (TEA) of SQLite inside an EDA tool which supports TCL User Shell. I have a strange problem that SQLite version 3.7.10 is downgraded to 3.5.9 when I load the necessary .so files. Due to this change the backup and restore commands are probably causing a core dump in

Re: [sqlite] SQLite - Database disk size difference when tables copied

2012-08-22 Thread Pavel Ivanov
When I implement the same mechanism for saving the memory database back to disk, the size of disk file is 4x of the original disk file size. What is original disk file size here? Is it an empty database, database with some data, database with exactly the same data you are restoring? If the