[sqlite] backup memory database not working

2016-03-10 Thread R Smith
On 2016/03/10 10:41 PM, asdf asdf wrote: > Hello, > what do you mean, please ? What code is not shown:my own code (and what > could be the cause then) using the example or what i posted in > stackoverflow. > > > I would be happy to solve it. Any information appreciated- He means that there

[sqlite] "Circular" order by

2016-03-10 Thread Stephen Chrzanowski
On Thu, Mar 10, 2016 at 2:16 PM, R Smith wrote: > > I do this kind of thing so often when filling a selection box for instance: > SELECT 'None' > UNION ALL > SELECT City FROM Countrylist WHERE Country = :1 > UNION ALL > SELECT City FROM Countrylist WHERE Country <> :1 ORDER BY City > >

[sqlite] backup memory database not working

2016-03-10 Thread asdf asdf
Hello, what do you mean, please ? What code is not shown:my own code (and what could be the cause then) using the example or what i posted in stackoverflow. I would be happy to solve it. Any information appreciated- Am 10.03.2016 um 20:39 schrieb Clemens Ladisch: > asdf asdf wrote: >> Backing

[sqlite] "Circular" order by

2016-03-10 Thread Alberto Wu
On 03/10/16 20:16, R Smith wrote: >> Hmm, does this work any better? >> >> SELECT id FROM t >> ORDER BY id < 'pen' desc, id; > > It works, but not better. Indeed. Any operation in ORDER BY (even things like "ORDER BY id||''") result in scan + temp b-tree. Thanks again. -- Alberto

[sqlite] "Circular" order by

2016-03-10 Thread R Smith
On 2016/03/10 8:37 PM, James K. Lowden wrote: > On Thu, 10 Mar 2016 10:17:57 +0100 > Alberto Wu wrote: > >> On 03/09/16 23:30, James K. Lowden wrote: SELECT P.id FROM ( SELECT 0 AS sect, id FROM t WHERE id >= 'pen' UNION ALL SELECT 1, id FROM t WHERE id < 'pen'

[sqlite] backup memory database not working

2016-03-10 Thread Clemens Ladisch
asdf asdf wrote: > Backing up a file database works well;not so memory. > > I described the issue here: > http://stackoverflow.com/questions/35834529/sqlite-backup-memory-database-c There is an error in your code. Which you have not shown. Regards, Clemens

[sqlite] Why are there no Authenticode signatures on prebuilt DLLs or tools?

2016-03-10 Thread Kyle Hamilton
Is there a way to request that the build pipeline for prebuilt DLLs and tools for Windows be modified to include Authenticode signatures? There is no means provided to verify the integrity of these executables, which means that anyone can download from the official URLs but have their connections

[sqlite] backup memory database not working

2016-03-10 Thread asdf asdf
Hello, the examples for the back API as exposed here: https://www.sqlite.org/backup.html work not for memory database. Tested with latest amalgamation VC++ VS 2013. Backing up a file database works well;not so memory. I described the issue here:

[sqlite] Changes to VFS starting 3.8.3

2016-03-10 Thread Max Vlasov
Thanks, I suspect there's indeed some special behavior not obvious at the moment. I'll try to gather some additional information if it's possible or detect this specific behavior On Thu, Mar 10, 2016 at 5:26 PM, Richard Hipp wrote: > On 3/10/16, Max Vlasov wrote: > > I have a

[sqlite] "Circular" order by

2016-03-10 Thread James K. Lowden
On Thu, 10 Mar 2016 21:16:28 +0200 R Smith wrote: > > Hmm, does this work any better? > > > > SELECT id FROM t > > ORDER BY id < 'pen' desc, id; > > It works, but not better. I think it was Igor who proposed similar > (if not, apologies) which of course produces the correct result, but

[sqlite] jude a record is exist or not

2016-03-10 Thread Jim Wang
sql one : select * from table_name where id = **; sql two : select count() from table_name where id = **; I test the two sql statement. It almost the same speed. At 2016-03-10 16:29:16, "Hick Gunter" wrote: >Assuming the "id" is the primary key of your table "table_name", your >statement

[sqlite] jude a record is exist or not

2016-03-10 Thread Jim Wang
Adding : the "id" is the primary key. At 2016-03-10 16:29:1 6, "Hick Gunter" wrote: >Assuming the "id" is the primary key of your table "table_name", your >statement will list the id of all the records present (full scan, reading >every entry of the implicit primary key index). > >To find

[sqlite] Changes to VFS starting 3.8.3

2016-03-10 Thread Max Vlasov
Hi, I have a compatibility problem with my vfs implementation of memory databases. I once implemented it successfully probably with a version 3.6.something. Today I tried to create a new database using the same code with the latest (3.11.1) version (the procedure is when no prior db data exists,

[sqlite] jude a record is exist or not

2016-03-10 Thread Jim Wang
hi,all As usual, we judge a record is exist or not in a data base is :select id from table_name. Except the above method, Is there any method which could judge a record is exist or not much faster than the above method. I am looking forward to hearing from you. Jim Wang.

[sqlite] Possible bug

2016-03-10 Thread Simon Slavin
On 10 Mar 2016, at 4:43am, Marv Anderson wrote: > SQL Logic error or missing database near "SELECT": syntax error > >SELECT CONVERT(Int,SCOPE_IDENTITY()) AS [value] This involves two things which are not built into SQLite: CONVERT() SCOPE_IDENTITY() Assuming that they're provided by

[sqlite] "Circular" order by

2016-03-10 Thread James K. Lowden
On Thu, 10 Mar 2016 10:17:57 +0100 Alberto Wu wrote: > On 03/09/16 23:30, James K. Lowden wrote: > >> SELECT P.id FROM ( > >> SELECT 0 AS sect, id FROM t WHERE id >= 'pen' > >> UNION ALL > >> SELECT 1, id FROM t WHERE id < 'pen' > >> ) AS P > >> ORDER BY P.sect, P.id > >> ; > > > >

[sqlite] jude a record is exist or not

2016-03-10 Thread Simon Slavin
On 10 Mar 2016, at 9:54am, Jim Wang <2004wqg2008 at 163.com> wrote: > sql one : select * from table_name where id = **; > sql two : select count() from table_name where id = **; > > > I test the two sql statement. It almost the same speed. Another possibility to test for speed is select 1

[sqlite] ICU and FTS5

2016-03-10 Thread Dan Kennedy
On 03/10/2016 02:56 AM, Tim Uy wrote: > Will the ICU tokenizer work with FTS5, or does some work need to be done to > port it over (slight pun intended). It doesn't work with FTS5. Both FTS3/4 and FTS5 allow for user-defined tokenizers, but the interface is not the same. So the ICU tokenizer

[sqlite] regression: --disable-static-shell no longer works

2016-03-10 Thread Lonnie Abelbeck
Hi, Cross-compiling SQLite from source on Linux using sqlite-autoconf-3110100, the --disable-static-shell option no longer works, a static-linked-sqlite3 binary is created. The regression appears to have occurred here: http://www.sqlite.org/src/fdiff?v1=1c16576507759608=29e2a6e8d0c5e327=0

[sqlite] "Circular" order by

2016-03-10 Thread Alberto Wu
On 03/09/16 23:30, James K. Lowden wrote: >> SELECT P.id FROM ( >> SELECT 0 AS sect, id FROM t WHERE id >= 'pen' >> UNION ALL >> SELECT 1, id FROM t WHERE id < 'pen' >> ) AS P >> ORDER BY P.sect, P.id >> ; > > This is the correct answer. Hi, unfortunately the correct answer comes

[sqlite] Changes to VFS starting 3.8.3

2016-03-10 Thread Richard Hipp
On 3/10/16, Max Vlasov wrote: > I have a compatibility problem with my vfs implementation of memory > databases. > > As I see from the version history page that no specific vfs-related changes > for 3.8.3 were reported, only a major change that can affect structure and > vfs is initial common

[sqlite] jude a record is exist or not

2016-03-10 Thread Hick Gunter
Assuming the "id" is the primary key of your table "table_name", your statement will list the id of all the records present (full scan, reading every entry of the implicit primary key index). To find out if a specific record exists, use "select count() from table_name where id = " to return a

[sqlite] sqlite3.exe as 64bit stand-alone pre-compiled binary version for Windows available?

2016-03-10 Thread Ben Stover
When I go to page http://www.sqlite.org/download.html then there are a 32bit and a 64bit DLL library version of SQLite. Unfortunately there is only the 32bit version of the stand-alone engine. Ok, I know, I can run the 32bit version as well under 64bit Windows but I prefer a 64bit version

[sqlite] sqlite3.exe as 64bit stand-alone pre-compiled binary version for Windows available?

2016-03-10 Thread Richard Hipp
On 3/10/16, Ben Stover wrote: > When I go to page > > http://www.sqlite.org/download.html > > then there are a 32bit and a 64bit DLL library version of SQLite. > > Unfortunately there is only the 32bit version of the stand-alone engine. > > Ok, I know, I can run the 32bit version as well under

[sqlite] Multithreaded SQLite

2016-03-10 Thread Kees Nuyt
On Wed, 9 Mar 2016 17:18:15 -0500, Philippe Riand wrote: > Yes, I?m using prepare(), step and finalize(). The 2 threads should > actually have no interaction between them, but isolated. > I mean the 2 threads should be able to do very different > things (read data, write data?), within separated

[sqlite] Multiple connections to in-memory db via .net

2016-03-10 Thread Jarred Ford
How can I create multiple connections to a shared SQLite in-memory database via .net? Thanks in advance.

[sqlite] [BUG] 3.11.0: FTS3/4 index emptied by 'optimize' inside transaction

2016-03-10 Thread Dan Kennedy
On 03/09/2016 11:35 PM, Tomash Brechko wrote: > Hello, > > With 3.11.0 if you run the following SQL you will get no result (which is > wrong): > > -- cut -- > BEGIN; > CREATE VIRTUAL TABLE fts USING fts4 (t); > INSERT INTO fts (rowid, t) VALUES (1, 'test'); > INSERT INTO fts (fts) VALUES

[sqlite] compiling 3.11.1

2016-03-10 Thread Tim Uy
found it - old copy of cerod slipped into my sqlite3.c! On Wed, Mar 9, 2016 at 10:44 PM, Tim Uy wrote: > yup must be just me, it works fine on a clean fossil clone > > On Wed, Mar 9, 2016 at 10:15 PM, Tim Uy wrote: > >> It is probably just something I mangled - but oddly my tsrc/fts5.c has no