[sqlite] How to make sqlite3_release_memory produce a result?

2016-01-07 Thread Bart Smissaert
OK, will try that. sqlite3_release_memory doesn't have the DB connection as an argument, but found sqlite3_db_release_memory and that has that as an argument and that may work better. RBS On Thu, Jan 7, 2016 at 6:05 AM, Scott Hess wrote: > On Wed, Jan 6, 2016 at 3:03 PM, Bart Smissaert >

[sqlite] How to make sqlite3_release_memory produce a result?

2016-01-07 Thread Scott Hess
In that case - oops. I definitely was experimenting with the db-centric version. It looks to me like the lowest-level mechanism is similar between the two, but sqlite3_db_release_memory() isn't optionally compiled. -scott On Thu, Jan 7, 2016 at 12:32 AM, Bart Smissaert wrote: > OK, will try

[sqlite] SQLite remote access over WAN

2016-01-07 Thread a...@zator.com
> Mensaje original > De: Eduardo Morras > Para: sqlite-users at mailinglists.sqlite.org > Fecha: Mon, 4 Jan 2016 23:27:35 +0100 > Asunto: Re: [sqlite] SQLite remote access over WAN > >On Mon, 04 Jan 2016 22:52:56 +0100 >ajm at zator.com wrote: > >> Hi list: >> >> I've built a

[sqlite] How to make sqlite3_release_memory produce a result?

2016-01-07 Thread Bart Smissaert
> So you should see results if you start a transaction, do a few update statements, commit the transaction, the call sqlite3_release_memory(db). I tried this with a large table, first with no transaction then with a transaction and tried the sqlite3_release_memory directly after the

[sqlite] How to make sqlite3_release_memory produce a result?

2016-01-07 Thread Bart Smissaert
These are the compile flags of my sqlite3.dll: compile_option DEBUG ENABLE_COLUMN_METADATA ENABLE_MEMORY_MANAGEMENT MEMDEBUG OMIT_LOOKASIDE THREADSAFE=0 And these are the set pragma's: PRAGMA cache_size 32768 PRAGMA default_cache_size 32768

[sqlite] The database disk image is malformed

2016-01-07 Thread Andrew Stewart
I have run the Quick Check. The results are below. This database is written to once a minute. One minute it was working and the next it was not. What would cause it to suddenly have errors? This is what I don't understand. check_callback argc 1 argv <*** in database main *** On tree page

[sqlite] Use of DELETE LIMIT OFFSET with ENABLE_UPDATE_DELETE_LIMIT

2016-01-07 Thread Jeremy Boy
Hi list, sorry for the late reply, Christmas holidays :-) > Am 21.12.2015 um 09:15 schrieb Jan Nijtmans : > > 2015-12-19 21:57 GMT+01:00 Jeremy Boy : >> I would like to use the optional LIMIT and ORDER BY clause for DELETE >> statements in SQLite. I can verify that SQLite was built with >>

[sqlite] The database disk image is malformed

2016-01-07 Thread Richard Hipp
On 1/7/16, Andrew Stewart wrote: > I have run the Quick Check. The results are below. This database is > written to once a minute. One minute it was working and the next it was > not. What would cause it to suddenly have errors? This is what I don't > understand. > > check_callback argc 1

[sqlite] Use of DELETE LIMIT OFFSET with ENABLE_UPDATE_DELETE_LIMIT

2016-01-07 Thread Richard Hipp
On 1/7/16, Jeremy Boy wrote: > How can I verify where SQLite was built > from? (1) Get the canonical sources from https://www.sqlite.org/download.html or https://www.sqlite.org/src (2) CFLAGS=-DSQLITE_ENABLE_UPDATE_DELETE_LIMIT ./configure (3) make sqlite3.c -- D. Richard Hipp drh at

[sqlite] The database disk image is malformed

2016-01-07 Thread Simon Slavin
On 7 Jan 2016, at 3:09pm, Andrew Stewart wrote: > I have run the Quick Check. The results are below. This database is written > to once a minute. One minute it was working and the next it was not. What > would cause it to suddenly have errors? Hardware fault. Loss of power. Another

[sqlite] Question regarding use of REPLACE

2016-01-07 Thread audio muze
I'm trying to get some consistency in the contents of a field in a table. To do so involves multiple updates using REPLACE. Is it acceptable to make multiple calls to replace involving the same field in a single update operation, like so: UPDATE audio SET composer = REPLACE( composer, " / ",

[sqlite] Question regarding use of REPLACE

2016-01-07 Thread Simon Slavin
On 7 Jan 2016, at 4:49pm, audio muze wrote: > Is it acceptable to make multiple calls to replace involving the same > field in a single update operation, like so: > > UPDATE audio SET >composer = REPLACE( composer, " / ", "\\" ), >composer = REPLACE( composer, " , ", "\\" ), >

[sqlite] The database disk image is malformed

2016-01-07 Thread Andrew Stewart
Has anybody had a large file (78gb) on a compressed folder on Windows? I believe that this is where the problem is coming from and want to find out if anybody else has any experience with this. I am looking at this file being 1.6TB and was hoping to be able to compress to save some space.

[sqlite] Some FTS5 guidance

2016-01-07 Thread Mario M. Westphal
Hello, I recently looked into FTS 5. The documentation is clear and I was able to get it running with a small test database quickly. And the response times are awesome :-) My question: At least as I understand it at this point, FTS can only do prefix queries. If my database contains

[sqlite] Some FTS5 guidance

2016-01-07 Thread Graham Holden
I've never used FTS, just throwing an off-the-wall idea out: instead of tokenising partial words, could you tokenise/store the reverse of each word (possibly in a separate place if that can be done): enihsnoom enihs enihsnus Then search for "enihs" as well as "shine". If you can't separate the

[sqlite] Some FTS5 guidance

2016-01-07 Thread Matthias-Christian Ott
On 2016-01-07 19:31, Mario M. Westphal wrote: > I hence wonder if this problem has been tackled already and if there is a > "standard" solution. If I understand you correctly, it seems that you are looking for a compound splitting or decompounding algorithm. Unfortunately there is not a

[sqlite] Some FTS5 guidance

2016-01-07 Thread Stadin, Benjamin
One such algorithm would be a (generalized) Ukkonnen suffix tree (https://en.m.wikipedia.org/wiki/Ukkonen%27s_algorithm). It allows you to search efficiently for substrings. It would be possible to do some match weigthing based on match distance within words. But a general solution for a

[sqlite] How to make sqlite3_release_memory produce a result?

2016-01-07 Thread Scott Hess
Hmm. I see that sqlite3PcacheReleaseMemory() is a no-op if sqlite3GlobalConfig.nPage is non-zero, and that happens when SQLITE_DEFAULT_PCACHE_INITSZ is not zero. If I compile with -DSQLITE_DEFAULT_PCACHE_INITSZ=0 , then I see the expected pages freed. AFAICT, it doesn't matter if you make use of

[sqlite] How to make sqlite3_release_memory produce a result?

2016-01-07 Thread Bart Smissaert
Thanks for that. Will look into this. Looks you might be onto something there. RBS On Thu, Jan 7, 2016 at 11:04 PM, Scott Hess wrote: > Hmm. I see that sqlite3PcacheReleaseMemory() is a no-op > if sqlite3GlobalConfig.nPage is non-zero, and that happens > when SQLITE_DEFAULT_PCACHE_INITSZ is

[sqlite] whish list for 2016

2016-01-07 Thread James K. Lowden
On Sun, 20 Dec 2015 19:12:39 +0100 Big Stone wrote: > Best whishes for 2016! If it's not too late to join the party... 1. create table T (t primary key); update T set t = t+1; for consecutive values of t. 2. Specific constraint references in error messages. 3. Correct

[sqlite] Wish List for 2016: High Level API for Object Oriented Interactive Languages

2016-01-07 Thread Jim Callahan
At the command line interface (CLI) in SQLite (and most SQL implementations) is an interpreted set at a time language with implicit loops. Efficient low level languages (such as C) process data a record at a time and the existing API is appropriate for them. Object Oriented Interactive Languages

[sqlite] Wish List for 2016: High Level API for Object Oriented Interactive Languages

2016-01-07 Thread Warren Young
On Jan 7, 2016, at 5:22 PM, Jim Callahan wrote: > > I believe R has remarkably good interface packages for SQLite That?s the appropriate level: the high-level language's DB access layer should map the low-level C record-at-a-time API to an appropriate language-level abstraction. R almost

[sqlite] Wish List for 2016: High Level API for Object Oriented Interactive Languages

2016-01-07 Thread Darren Duncan
On 2016-01-07 4:55 PM, Warren Young wrote: > 2. There is no ?preview? mechanism. That is, you can?t bind some parameters > to a prepared query string and then get the resulting SQL because SQLite > substitutes the values into the query at a layer below the SQL parser. This > means that if you

[sqlite] Wish List for 2016: High Level API for Object Oriented Interactive Languages

2016-01-07 Thread Stephen Chrzanowski
I personally wish the reverse. I wish that these interpreted language engines would incorporate the SQLite code directly into their own existence to avoid having to write wrappers to begin with, except for those wrappers where their method name is "DatabaseOpen" and I prefer "OpenDatabase".

[sqlite] Wish List for 2016: High Level API for Object Oriented Interactive Languages

2016-01-07 Thread Warren Young
On Jan 7, 2016, at 6:04 PM, Darren Duncan wrote: > > On 2016-01-07 4:55 PM, Warren Young wrote: >> 2. There is no ?preview? mechanism. > > The current method of binding is correct. All we really need is that the > debug logging layer include both the SQL of the prepared statement AND a list

[sqlite] Wish List for 2016: High Level API for Object Oriented Interactive Languages

2016-01-07 Thread Darren Duncan
Perhaps we misunderstand each other here. I interpreted your request as if current systems' error outputs at execute time were printing out the problematic SQL statement with placeholder names as originally prepared, and you wanted the error outputs to have the placeholders substituted with

[sqlite] Wish List for 2016: High Level API for Object Oriented Interactive Languages

2016-01-07 Thread Darren Duncan
Stephen, What you are arguing for (no shared libraries) is bad old days where one had to recompile their programming language to add support for a DBMS, rather than the DBMS support being a separately installable library that one could choose to install or not or upgrade semi-independently or