Re: [sqlite] light weight write barriers

2012-10-24 Thread Nico Williams
On Wed, Oct 24, 2012 at 8:04 PM, wrote: > On Wed, 24 Oct 2012, Nico Williams wrote: >> COW is "copy on write", which is actually a bit of a misnomer -- all >> COW means is that blocks aren't over-written, instead new blocks are >> written. In particular this means that inodes,

Re: [sqlite] light weight write barriers

2012-10-24 Thread Nico Williams
On Wed, Oct 24, 2012 at 7:17 PM, Simon Slavin wrote: > A) fsync() doesn't work the way it's meant to on the majority of user > platforms. It effectively does nothing. Here are typical notes for Windows > Server and FreeBSD: Many systems lie, that's true. For example:

Re: [sqlite] how to select " char in sqlite

2012-10-24 Thread YAN HONG YE
char bh1[320]; memset(bh1,0,320); strcpy(bh1,"sqlite3 -html -header t9_engine.db \"select id,partnumber,substr(\'\',1,180) as img,pcs from engine where id>7;\" >> n.html"); system(bh1); //here couldn't work ___ sqlite-users

Re: [sqlite] light weight write barriers

2012-10-24 Thread Nico Williams
On Wed, Oct 24, 2012 at 5:03 PM, wrote: > I'm doing some work with rsyslog and it's disk-baded queues and there is a > similar issue there. The good news is that we can have a version that is > linux specific (rsyslog is used on other OSs, but there is an existing queue >

Re: [sqlite] light weight write barriers

2012-10-24 Thread Simon Slavin
On 24 Oct 2012, at 10:17pm, Nico Williams wrote: > That [cache flushing] is not what's being asked for here. Just a > light-weight barrier. My proposal works without having to add new > system calls: a) use a COW format, b) have background threads doing > fsync()s, c)

Re: [sqlite] Permalink to latest amalgamation

2012-10-24 Thread Richard Hipp
On Wed, Oct 24, 2012 at 7:43 PM, Kees Nuyt wrote: > > > >I don't remember the exact path offhand, but fossil web ui has a URL that > >return the requested checkin as a tarball, no need for a fossil client. > > True, but the name of the tarball/zip is not fixed but derived from

Re: [sqlite] Permalink to latest amalgamation

2012-10-24 Thread Kees Nuyt
On Thu, 25 Oct 2012 00:52:56 +0200, Baruch Burstein wrote: >On Thu, Oct 25, 2012 at 12:42 AM, Darren Duncan wrote: > >> Kees Nuyt wrote: >> >>> On Thu, 25 Oct 2012 00:12:16 +0200, Baruch Burstein >>> wrote: >>> >>> Is there a

Re: [sqlite] Permalink to latest amalgamation

2012-10-24 Thread Richard Hipp
On Wed, Oct 24, 2012 at 6:12 PM, Baruch Burstein wrote: > Is there a permanent link I can use that will always point to the latest > amalgamation (or .zip containing it)? I would like to automate a make > script that will use the latest sqlite. > "Latest sqlite" is

Re: [sqlite] Permalink to latest amalgamation

2012-10-24 Thread Baruch Burstein
On Thu, Oct 25, 2012 at 12:42 AM, Darren Duncan wrote: > Kees Nuyt wrote: > >> On Thu, 25 Oct 2012 00:12:16 +0200, Baruch Burstein >> wrote: >> >> Is there a permanent link I can use that will always point to the latest >>> amalgamation (or .zip

Re: [sqlite] Permalink to latest amalgamation

2012-10-24 Thread Darren Duncan
Kees Nuyt wrote: On Thu, 25 Oct 2012 00:12:16 +0200, Baruch Burstein wrote: Is there a permanent link I can use that will always point to the latest amalgamation (or .zip containing it)? I would like to automate a make script that will use the latest sqlite. I know I can

Re: [sqlite] Permalink to latest amalgamation

2012-10-24 Thread Kees Nuyt
On Thu, 25 Oct 2012 00:12:16 +0200, Baruch Burstein wrote: > Is there a permanent link I can use that will always point to the latest > amalgamation (or .zip containing it)? I would like to automate a make > script that will use the latest sqlite. > I know I can use a link

[sqlite] Permalink to latest amalgamation

2012-10-24 Thread Baruch Burstein
Is there a permanent link I can use that will always point to the latest amalgamation (or .zip containing it)? I would like to automate a make script that will use the latest sqlite. I know I can use a link to the latest release in the repo, but that means I would need to build the amalgamation as

Re: [sqlite] light weight write barriers

2012-10-24 Thread Nico Williams
On Tue, Oct 23, 2012 at 2:53 PM, Vladislav Bolkhovitin <...@gmail.com> wrote: >> As most of the time the order we need do not involve too many blocks >> (certainly a lot less than all the cached blocks in the system or in >> the disk's cache), that topological order isn't likely to be very >>

Re: [sqlite] VTab & xRename

2012-10-24 Thread gwenn
Thanks for your suggestion Jay. static sqlite3_module csvModule = { 0,/* iVersion */ csvCreate,/* xCreate - create a table */ csvConnect, /* xConnect - connect to an existing table */ csvBestIndex, /* xBestIndex - Determine

Re: [sqlite] FTS returns out of memory when use NEAR and OR

2012-10-24 Thread Dan Kennedy
On 10/24/2012 11:07 PM, Vlad Seryakov wrote: Hello For some time already i noticed that when i use NEAR/1 and OR in one query like SELECT * FROM search WHERE search MATCH 'tom NEAR/1 hanks or tom hanks' Are you able to share the database file that you use to reproduce this? Thanks. Dan.

Re: [sqlite] SQL logic error or missing database

2012-10-24 Thread Gert Van Assche
Kees, thanks. I reopened the connection and all is OK now. thanks for your help, gert 2012/10/24 Kees Nuyt > On Wed, 24 Oct 2012 15:53:39 +0200, Gert Van Assche > wrote: > > >All, hoping you can help me. > > > >I bumped into an "SQL logic error or

[sqlite] FTS returns out of memory when use NEAR and OR

2012-10-24 Thread Vlad Seryakov
Hello For some time already i noticed that when i use NEAR/1 and OR in one query like SELECT * FROM search WHERE search MATCH 'tom NEAR/1 hanks or tom hanks' i get out of memory error. Running this on 16Gb laptop cannot be memory issue and the database only has several thousands of records.

Re: [sqlite] how to select " char in sqlite

2012-10-24 Thread Black, Michael (IS)
If Windows get FART (find and replace text) from here: http://blog.secaserver.com/2011/07/windows-find-and-replace-text-command-line-utility/ If Unix learn sed: http://www.thegeekstuff.com/2009/09/unix-sed-tutorial-replace-text-inside-a-file-using-substitute-command/ Then sqlite3 test.db create

Re: [sqlite] SQL logic error or missing database

2012-10-24 Thread Simon Slavin
On 24 Oct 2012, at 3:42pm, Gert Van Assche wrote: > I have permissions and I'm using the short string of the > full path. Just for testing, try specifying a full path and see what happens. Simon. ___ sqlite-users mailing list

Re: [sqlite] SQL logic error or missing database

2012-10-24 Thread Gert Van Assche
Simon, I'm using LUA. I have permissions and I'm using the short string of the full path. I'm now investigating something Kees mentioned: "Perhaps the path/filename in your _open() statement is not correct (does not point to the same file as the command line does), or the open flags/URI arguments

Re: [sqlite] how to select "

2012-10-24 Thread Jay A. Kreibich
On Wed, Oct 24, 2012 at 07:27:57AM +, YAN HONG YE scratched on the wall: > sqlite3 -html -header t9_engine.db "select id,partnumber,\"abc.jpg\" >as img,pcs from engine where id>7;" >> n.html > here \"abc.jpg\" couldn't work. SQL string literals use single quotes.

Re: [sqlite] SQL logic error or missing database

2012-10-24 Thread Kees Nuyt
On Wed, 24 Oct 2012 15:53:39 +0200, Gert Van Assche wrote: >All, hoping you can help me. > >I bumped into an "SQL logic error or missing database" error and I don't >have a clue why this happens. >It happens on the first action I take in a series of all the same actions

Re: [sqlite] SQLite could not open db in WinRT issue

2012-10-24 Thread Pavel Ivanov
SQLite expects all paths to be in UTF-8 (non-standard for Win but the same for all platforms). Is your path in UTF-8 or in some other system encoding? Pavel On Tue, Oct 23, 2012 at 6:28 AM, Václav Jirovský wrote: > Hello, > > I tried to use SQLite 3.7.14.1 with

Re: [sqlite] light weight write barriers

2012-10-24 Thread Vladislav Bolkhovitin
杨苏立 Yang Su Li, on 10/11/2012 12:32 PM wrote: I am not quite whether I should ask this question here, but in terms of light weight barrier/fsync, could anyone tell me why the device driver / OS provide the barrier interface other than some other abstractions anyway? I am sorry if this sounds

Re: [sqlite] FW: how to select " char in sqlite

2012-10-24 Thread Kees Nuyt
On Wed, 24 Oct 2012 09:00:31 +, YAN HONG YE wrote: > >sqlite3 -html -header t9_engine.db "select id,partnumber,\"abc.jpg\" as >img,pcs from engine where id>7;" >> n.html >here \"abc.jpg\" couldn't work. Please be more specific about "couldn't

Re: [sqlite] how to select " char in sqlite

2012-10-24 Thread Clemens Ladisch
Igor Tandetnik wrote: > YAN HONG YE wrote: >> sqlite3 -html -header t9_engine.db "select id,partnumber,\"abc.jpg\" as >> img,pcs from engine where id>7;" >> n.html >> here \"abc.jpg\" couldn't work. >> >> sqlite3 -html -header t9_engine.db "select

Re: [sqlite] how to select " char in sqlite

2012-10-24 Thread Igor Tandetnik
YAN HONG YE wrote: > sqlite3 -html -header t9_engine.db "select id,partnumber,\"abc.jpg\" as > img,pcs from engine where id>7;" >> n.html > here \"abc.jpg\" couldn't work. > > sqlite3 -html -header t9_engine.db "select id,partnumber,' '||pic||' \"

Re: [sqlite] Problem: Index not used with ORDER BY on view

2012-10-24 Thread Clemens Ladisch
(quoting fixed) Scholz Maik (CM-AI/PJ-CF42) wrote: > Richard Hipp wrote: > > Perhaps we could add a new optimization: > > > > IF: > >(1) both inner and outer queries have an ORDER BY clause, and > >(2) the inner query omits both LIMIT and OFFSET > > THEN: > >drop

Re: [sqlite] Problem: Index not used with ORDER BY on view

2012-10-24 Thread Scholz Maik (CM-AI/PJ-CF42)
Hi, My expectation was, that the actual used ORDER term is something like merge from outer to inner orders. But, this is wrong. >Perhaps we could add a new optimization: >IF: > (1) both inner and outer queries have an ORDER BY clause, and > (2) the inner query omits both LIMIT

Re: [sqlite] Problem: Index not used with ORDER BY on view

2012-10-24 Thread Richard Hipp
On Wed, Oct 24, 2012 at 4:59 AM, Scholz Maik (CM-AI/PJ-CF42) < maik.sch...@de.bosch.com> wrote: > Hi, > I have some strange behavior with the query optimizer. > > SQLite version 3.7.7.1 2011-06-28 17:39:05 > > sqlite> create table t1 (a,b); > sqlite> insert into t1 (a,b) values (1,2); > sqlite>

Re: [sqlite] Problem: Index not used with ORDER BY on view

2012-10-24 Thread Simon Slavin
On 24 Oct 2012, at 9:59am, "Scholz Maik (CM-AI/PJ-CF42)" wrote: > sqlite> explain query plan select a,b,f1 from v1 where a=3 order by (f1); > 0|0|0|SEARCH TABLE t1 USING INDEX i1 (a=?) (~10 rows) > 0|0|0|USE TEMP B-TREE FOR ORDER BY > => Why is index i1 not used?

Re: [sqlite] Mac development question

2012-10-24 Thread Simon Slavin
On 24 Oct 2012, at 5:29am, Igor Korot wrote: > It looks like you are "Apple person" that I got suggeted to talk to. ;-) > The situation is as follows: I am developing an application that will > utilize not just SQLite but some other library. > According to the "development

[sqlite] FW: how to select " char in sqlite

2012-10-24 Thread YAN HONG YE
sqlite3 -html -header t9_engine.db "select id,partnumber,\"abc.jpg\" as img,pcs from engine where id>7;" >> n.html here \"abc.jpg\" couldn't work. sqlite3 -html -header t9_engine.db "select id,partnumber,'' as img,pcs from engine where id>7; ">> n.html Same problem.

[sqlite] Problem: Index not used with ORDER BY on view

2012-10-24 Thread Scholz Maik (CM-AI/PJ-CF42)
Hi, I have some strange behavior with the query optimizer. SQLite version 3.7.7.1 2011-06-28 17:39:05 sqlite> create table t1 (a,b); sqlite> insert into t1 (a,b) values (1,2); sqlite> insert into t1 (a,b) values (3,4); sqlite> select * from t1; 1|2 3|4 sqlite> create index i1 on t1(a);

[sqlite] how to select "

2012-10-24 Thread YAN HONG YE
sqlite3 -html -header t9_engine.db "select id,partnumber,\"abc.jpg\" as img,pcs from engine where id>7;" >> n.html here \"abc.jpg\" couldn't work. ___ sqlite-users mailing list sqlite-users@sqlite.org