Re: [sqlite] custom rank function with FTS3/FTS4: potential crash.

2017-10-06 Thread Dan Kennedy
A few corrections on this page about FTS (hopefully not too nit-picky): 1) === BEGIN QUOTE === -- ("driver" may also appear in the title, but this alone will not satisfy the. -- query criteria). === END QUOTE === There should not be a dot in "the." 2) === BEGIN QUOTE === putting the keyword

Re: [sqlite] custom rank function with FTS3/FTS4: potential crash.

2017-10-06 Thread Dan Kennedy
On 10/06/2017 11:58 PM, Richard Hipp wrote: On 10/6/17, Jens Alfke wrote: Thanks for posting this — my adaptation of that sample code in my project had the same bug. I’m not sure how the SQL in your application gets generated, but if you allow untrusted SQL, it’s still

Re: [sqlite] 'database disk image is malformed' only on the mac

2017-09-21 Thread Dan Kennedy
On 09/21/2017 04:20 AM, Fahad wrote: Thanks Jens, yes I didn't take the warnings from the Thread Sanitizer lightly. Although I'm very confident with the actual implementation (using thread local dictionaries) and have verified time and again using unit tests that my code is otherwise

Re: [sqlite] 'database disk image is malformed' only on the mac

2017-09-18 Thread Dan Kennedy
On 09/15/2017 10:38 AM, Fahad wrote: I tried it with sqlite3_shutdown(), didn't help. I was able to reproduce it again using the main app and the safari share plugin. You don't need to call sqlite3_shutdown(). All it does is release the resources allocated by sqlite3_initialize() - which are

Re: [sqlite] FW: PRAGMA journal_size_limit prevents -wal growth or only size outside a transaction?

2017-09-12 Thread Dan Kennedy
On 09/12/2017 09:24 AM, Joe Mistachkin wrote: -Original Message- From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Howard Kapustein Sent: Monday, September 11, 2017 2:53 PM To: sqlite-users@mailinglists.sqlite.org Subject: Re: [sqlite] PRAGMA

Re: [sqlite] compiling for android

2017-09-11 Thread Dan Kennedy
On 09/11/2017 05:20 AM, Mark Sibly wrote: Hi, I just encountered a problem trying to build the sqlite amalgamation package for android with the latest NDK (v15.2.4203891) on windows 10. The compiler couldn't find mmap, which was causing a ton of errors. I solved it by sticking this at the

Re: [sqlite] JOIN vs. INTERSECT vs. WHERE IN (...) - speed and efficiency differences

2017-09-11 Thread Dan Kennedy
On 09/10/2017 08:30 PM, R Smith wrote: Well yes but the documentation suggests that one could expect a slight degradation. The words "works best with" does not seem to imbue an idea of "give WITHOUT ROWID tables a wide berth when your tables are more than few columns wide", and I don't think

Re: [sqlite] PRAGMA journal_size_limit prevents -wal growth or only size outside a transaction?

2017-09-08 Thread Dan Kennedy
I use journal_mode=WAL and have periods of checkpoint starvation (complicated reasons) so I'm looking to prune the -wal file but in less blunt way than SQLITE_CHECKPOINT_TRUNCATE. Behaviorally I want SQLITE_CHECKPOINT_PASSIVE *and then* if required -wal content < journal_size_limit, to do the

[sqlite] PRAGMA journal_size_limit prevents -wal growth or only size outside a transaction?

2017-09-08 Thread Dan Kennedy
The docs are a little unclear => https://sqlite.org/pragma.html#pragma_journal_size_limit I need to disable autocheckpoint@close (for other reasons) so I'm looking for ways to fence the -wal file. If I want to bound a database's -wal file to <=1MB when I'm not in a transaction is it just PRAGMA

Re: [sqlite] FIX FOR:: Duplicate output with pragma_list, function_list, module_list

2017-08-25 Thread Dan Kennedy
On 08/25/2017 06:41 AM, Keith Medcalf wrote: If you search sqlite3.c for the SQLITE3_INTROSPECTION_PRAGMAS you will see in pragma.c (or in sqlite3.c) the following code: Thanks for looking into this. Now fixed here: http://www.sqlite.org/src/info/b79cc8dc88c8ae03 Dan.

Re: [sqlite] Order By gives different result

2017-08-21 Thread Dan Kennedy
On 08/21/2017 11:51 PM, Stephen Chrzanowski wrote: I think I may have found a query issue. I haven't checked the SQLite docs to see if this is something that is specified as an order of operations, or if this is a check that has been overlooked. I think using a column alias in a complex

Re: [sqlite] Including sqlite3ext.h instead of sqlite3.h

2017-08-20 Thread Dan Kennedy
On 08/20/2017 02:33 PM, x wrote: This morning I tried creating a new blank package on c++ builder and then added #include “sqlite3ext.h” Same error message : E245 Undefined symbol ‘sqlite3_api’. Is there some define I should have set? Add "SQLITE_EXTENSION_INIT1" on a line by itself after

Re: [sqlite] Possible SQLite bug using an uncollated index with a collated query

2017-08-19 Thread Dan Kennedy
On 08/18/2017 05:39 AM, Jens Alfke wrote: I believe I may have found a bug in SQLite 3.18. I've got a query that returns a correct result set when there are no indexes in the database, but returns an incorrect result set if recompiled after an index has been added. The incorrect result set

Re: [sqlite] COLLATE doesn't work with parenthesized expressions (doc issue)

2017-08-17 Thread Dan Kennedy
On 08/17/2017 07:07 AM, Jens Alfke wrote: On Aug 16, 2017, at 4:55 PM, Richard Hipp wrote: Remember: COLLATE binds more tightly than ==. So 'xyz' = 'XYZ' COLLATE nocase gets parsed out as 'xyz' = ('XYZ' COLLATE nocase) And that expression has a different meaning

Re: [sqlite] group_concat() reverses order given where clause?

2017-08-15 Thread Dan Kennedy
On 08/15/2017 10:12 PM, Bob Friesenhahn wrote: select group_concat(name, ' ') AS 'names' from moca_config where enable == 1 order by name; Maybe this: select group_concat(name, ' ') AS 'names' from ( SELECT name FROM moca_config where enable == 1 order by name ); Dan.

Re: [sqlite] Checkin d8637bad produces bad amalgamation

2017-08-04 Thread Dan Kennedy
On 08/04/2017 03:50 AM, Keith Medcalf wrote: Check-in d8637bad produces a bad amalgamation output. Thanks for reporting this. Should be fixed now. Dan. Index: tool/mksqlite3c-noext.tcl == --- tool/mksqlite3c-noext.tcl +++

Re: [sqlite] Foreign key mismatch with ON DELETE clauses

2017-07-26 Thread Dan Kennedy
On 07/25/2017 08:42 PM, Bubu Bubu wrote: I'm having trouble with foreign key constraints et cascade clauses and I don't really know where could be the problem. I'm working on sqlite version 3.8.11.1 (I can't update it, work restriction), but I checked and such functionnalities are enabled

Re: [sqlite] High memory usage for in-memory db with nested transactions

2017-07-25 Thread Dan Kennedy
On 07/26/2017 12:58 AM, David Raymond wrote: Would you elaborate a bit more on that? To my untrained-in-C eyes it looks like there's the outer transaction, then a savepoint1, then a loop of (savepoint2, update the only record, release savepoint2). Is savepoint2 there not actually getting

Re: [sqlite] Return value of Tcl interface to wal_hook

2017-07-14 Thread Dan Kennedy
On 07/14/2017 08:55 PM, Peter da Silva wrote: In wal_hook we have: ** The callback function should normally return [SQLITE_OK]. ^If an error ** code is returned, that error will propagate back up through the ** SQLite code base to cause the statement that provoked the callback ** to report an

Re: [sqlite] Cannot delete a Database file?

2017-06-28 Thread Dan Kennedy
On 06/28/2017 09:07 PM, Simon Slavin wrote: On 28 Jun 2017, at 10:37am, Domonic Tom wrote: After calling sqlite3_close(handle) I try then to use the 'remove' method in C++ to delete my .db file. For some reason it just won't delete. Are you testing the result returned

Re: [sqlite] lsm1 extension

2017-06-20 Thread Dan Kennedy
On 06/20/2017 12:42 PM, Charles Leifer wrote: Hi, I'm not quite sure of the proper way to compile the lsm1 extension (in the lsm-vtab branch). I ended up hand-hacking the makefile to replace $(TCCX) and add the appropriate flags for gcc (-fPIC) to get it to build. I'd like to do it the "right

Re: [sqlite] Session Extension & ALTER TABLE handling

2017-06-17 Thread Dan Kennedy
On 06/17/2017 08:55 PM, Robert M. Münch wrote: On 17 Jun 2017, at 13:36, Dan Kennedy wrote: I think that changed for ALTER TABLE ADD COLUMN in 3.17.0. As of 3.17, if the changeset contains fewer columns than the database tables it is being applied to, trailing columns are populated

Re: [sqlite] Session Extension & ALTER TABLE handling

2017-06-17 Thread Dan Kennedy
On 06/17/2017 12:56 PM, Robert M. Münch wrote: Hi, if the DB scheme was changed with ATLER TABLE (like adding a column to a table) it's no longer possible to apply a changeset from before this ALTER TABLE change. I think that changed for ALTER TABLE ADD COLUMN in 3.17.0. As of 3.17, if the

Re: [sqlite] Two minor issues reported by with MSVC 2017

2017-05-26 Thread Dan Kennedy
On 05/26/2017 10:13 PM, Olivier Mascia wrote: This is on amalgamation code for version 3.19.2. Compiling for 64 bits. Those were not reported with 3.18 as far as I remember. Thanks for reporting these. Looks like Joe already fixed them yesterday:

Re: [sqlite] SQLDiff.exe and sqlite3changeset_apply

2017-05-22 Thread Dan Kennedy
On 05/22/2017 09:49 PM, Green wrote: Hello I have bug releated to SQLDiff and sqlite3changeset_apply: Thanks for reporting this. Now fixed here: http://www.sqlite.org/src/info/0bb23c48064cc641 Dan. Here is situation: - For testing I have simple database with two tables - I'm

Re: [sqlite] vtable and usable constraint

2017-05-20 Thread Dan Kennedy
On 05/20/2017 06:17 PM, graf0 post.pl wrote: Hello, I'm trying to implement vtable, and I don't understand what is meaning of usable field in sqlite3_index_constraint struct? Can I assume it will be false when my vtable is joined by that field with some other table? Basically just that. Say

Re: [sqlite] Version 3.19.0 about to enter testing

2017-05-11 Thread Dan Kennedy
On 05/12/2017 02:47 AM, David Raymond wrote: My brain might just not be working right today. Would you be so kind as to give an example for: "Transfer any terms of the HAVING clause that use only columns mentioned in the GROUP BY clause over to the WHERE clause for faster processing." Say:

Re: [sqlite] SQLiteDiskIOException: disk I/O error (code 1034)

2017-05-06 Thread Dan Kennedy
(dodgy phone/SD card, have you seen this on more than one device?), or perhaps the fd is actually a socket (hardly seems likely if you got all the way to fsync() without some other error). Dan. On 7 May 2017 2:13:28 am AEST, Dan Kennedy <danielk1...@gmail.com> wrote: On 05/06/2017 02

Re: [sqlite] SQLiteDiskIOException: disk I/O error (code 1034)

2017-05-06 Thread Dan Kennedy
On 05/06/2017 02:13 PM, Philip Warner wrote: I have an Android app that does work in the database every five minutes (at least). Every few days I am seeing: org.sqlite.database.sqlite.SQLiteDiskIOException: disk I/O error (code 1034) Code 1034 is SQLITE_IOERR_FSYNC. This is using a

Re: [sqlite] FTS5 query results different before/after MERGE command.

2017-04-21 Thread Dan Kennedy
On 04/21/2017 02:36 AM, Jonathan Gaillard wrote: Here is the db https://ufile.io/q0314 Thanks for reporting this. It was a bug in the fts5 prefix query code. Now fixed here: http://www.sqlite.org/src/info/840042cb2bed2924 Dan. If you do: select rowid, name from filesfts where

Re: [sqlite] How difficult for bindings to support API 14 or below?

2017-04-20 Thread Dan Kennedy
2.0 license from Android. Are you fossil-literate? Dan. On 20/04/2017 3:38 AM, Dan Kennedy wrote: On 04/19/2017 06:28 PM, Philip Warner wrote: FWIW, it compiles and builds with API set to 14...I'm just worried I'll get some esoteric breakage. Any insights from someone who understands

Re: [sqlite] FTS5 query results different before/after MERGE command.

2017-04-20 Thread Dan Kennedy
On 04/20/2017 07:11 AM, Jonathan Gaillard wrote: If you do: select rowid, name from filesfts where filesfts match '"upload file漢_5"*'; This certainly seems like a bug. Are you able to share the database that exhibits the problem? Thanks, Dan. you get back: 141| upload file漢_5

Re: [sqlite] How difficult for bindings to support API 14 or below?

2017-04-19 Thread Dan Kennedy
On 04/19/2017 06:28 PM, Philip Warner wrote: FWIW, it compiles and builds with API set to 14...I'm just worried I'll get some esoteric breakage. Any insights from someone who understands NDK/API level interactions? Looking at old chat logs, I don't think we have tried to use that code with

Re: [sqlite] gnu gcc address sanitizer finds stack-use-after-scope in sqlite3VdbeExec

2017-04-19 Thread Dan Kennedy
On 04/18/2017 07:12 PM, Vitti wrote: Hi there, I just downloaded version 3.18 and after compiling it with the following command gcc shell.c sqlite3.c -g -fsanitize=address -DSQLITE_DEBUG -o sqlite -ldl -pthread Hi, Thanks for reporting this. I haven't been able to reproduce it with any of

Re: [sqlite] Database corruption, and PRAGMA fullfsync on macOS

2017-04-19 Thread Dan Kennedy
On 04/19/2017 02:42 AM, Jens Alfke wrote: On Apr 18, 2017, at 2:20 AM, Deon Brewis wrote: It's not like it was subtle - it's a dead on repro. I was able to repro this by doing a power cycle 2 hours after shutting the app down. OSX didn't seem to have any interest in

Re: [sqlite] FTS5 query results different before/after MERGE command.

2017-04-17 Thread Dan Kennedy
On 04/18/2017 02:00 AM, Jonathan Gaillard wrote: I have a db where I have a query returning results from something I believe is deleted already from a FTS5 table. This is a normal FTS5 table, not a contentless one so I used the normal DELETE. Only after I run: INSERT INTO

Re: [sqlite] potential bug

2017-04-17 Thread Dan Kennedy
On 04/17/2017 10:42 PM, Bernard Schurdevin wrote: Hi, I get weird results (false positive) to PRAGMA foreign_key_check on WITHOUT ROWID table depending on foreign key field position. Thanks for reporting this. Should be fixed here: http://www.sqlite.org/src/info/690870bd7b2e607b Dan.

Re: [sqlite] Is this a foreign key bug ?

2017-04-15 Thread Dan Kennedy
On 04/15/2017 07:16 PM, Domingo Alvarez Duarte wrote: Hello ! I'm getting an error that seems to be a bug in sqlite3 or a change of behavior. === CREATE TABLE a( keyval varchar(25) NOT NULL, testid integer NOT NULL, PRIMARY KEY ("keyval","testid") ); CREATE TABLE b(

Re: [sqlite] Another Inconsistency in .lint fkeys-index

2017-04-06 Thread Dan Kennedy
On 04/06/2017 08:26 PM, Keith Medcalf wrote: Note the report first line. Interval is the primary key of both tables so there is an internal index. Thanks for this. Should be fixed here: http://www.sqlite.org/src/info/48826b222c110a90 Dan. Table Forecast does the same but is not

Re: [sqlite] CLI .lint question

2017-04-06 Thread Dan Kennedy
On 04/06/2017 02:58 AM, David Raymond wrote: Looks like the .lint command has been in since 3.16.0, but this is my first time noticing it and trying it out. I ran the .lint fkey-indexes on one of my larger databases where I had thought I had indexed all the foreign keys ok, and it spat out a

Re: [sqlite] Questions on big blobs and blob I/O

2017-03-29 Thread Dan Kennedy
On 03/30/2017 12:52 AM, Olivier Mascia wrote: Le 29 mars 2017 à 19:40, Simon Slavin a écrit : Since I’m using WAL, will this db handle keep a snapshot of the time before the blob’s row was deleted, allowing the blob handle to keep working? As Simon said wisely, a word

Re: [sqlite] Is FTS5 still experimental?

2017-03-29 Thread Dan Kennedy
On 03/30/2017 12:26 AM, Jen Pollock wrote: The release notes for 3.13.0 say that FTS5 will be "experimental" for at least one more release cycle, and more recent release notes don't say anything about that having changed, but the FTS5 documentation doesn't mention anything about it being

Re: [sqlite] VT table behavior change between 3.10 and 3.17

2017-03-29 Thread Dan Kennedy
On 03/29/2017 08:41 PM, Hick Gunter wrote: Can you support this notion with the byte code program of the affected statement? In the sqlite shell type .explain explain and post the output or send it to me off list. NOTE: I am not an SQLite developer, but will need to upgrade sometime later,

Re: [sqlite] VT table behavior change between 3.10 and 3.17

2017-03-29 Thread Dan Kennedy
On 03/29/2017 02:48 AM, Bob Friesenhahn wrote: We are trying to update from sqlite3 3.10 to 3.17. Our virtual table modules are encountering problems with 3.17 since the 'xOpen' callback is now being called for value change and row deletion operations. Previously it was only being called for

Re: [sqlite] Second beta for SQLite 3.18.0.

2017-03-24 Thread Dan Kennedy
On 03/24/2017 02:43 PM, no...@null.net wrote: On Fri Mar 24, 2017 at 08:31:13AM +0100, no...@null.net wrote: On Thu Mar 23, 2017 at 07:50:34PM -0400, Richard Hipp wrote: The second beta release for SQLite 3.18.0 is now available on the website: I see the following issue: Program

Re: [sqlite] Possibly pointless assert

2017-03-23 Thread Dan Kennedy
On 03/23/2017 11:46 PM, Scott Robison wrote: On Thu, Mar 23, 2017 at 10:17 AM, Scott Robison <sc...@casaderobison.com> wrote: On Thu, Mar 23, 2017 at 9:21 AM, Dan Kennedy <danielk1...@gmail.com> wrote: How did you trip the assert()? i.e. what is the database schema and quer

Re: [sqlite] QUERY: Usage of malloc and free in SQLite

2017-03-23 Thread Dan Kennedy
On 03/23/2017 10:00 PM, Subramaniyan, Ganesan (G.) wrote: Hi, We are facing dynamic memory pool corruption issue while using SQLite. Based on our investigation we suspect SQLite freeing memory bypassing the memory management API'S registered as below. We have registered the memory allocation

Re: [sqlite] Possibly pointless assert

2017-03-23 Thread Dan Kennedy
On 03/23/2017 04:45 AM, Scott Robison wrote: Take a look at http://www.sqlite.org/cgi/src/artifact/3ed64afc49c0a222?ln=2214,2233 (especially the assert within). I may not be understanding something, but that assert seems pointless to me. The assert() says that if the buffer pointed to by

Re: [sqlite] Help with establishing a connection on NS3 and sqlite DB

2017-03-22 Thread Dan Kennedy
On 03/22/2017 05:58 AM, Ausama Majeed wrote: Hello guys, I am trying to do a connection between a database created with Sqlite and my application in ns3. the sqlite engine is installed on ubuntu 16.04 machine and the output is enabled with ns3.26. I cann't do a simple select query from ns3,

Re: [sqlite] configure --enable-shared doesn't build shared libraries

2017-03-21 Thread Dan Kennedy
On 03/21/2017 07:11 AM, Yuri wrote: Configure file says: > --enable-shared[=PKGS] build shared libraries [default=yes] However, shared library isn't built by default. This command: $ ./configure --enable-shared && gmake doesn't build it either. Are you using the amalgamation tarball or

Re: [sqlite] Is it possible to change "synchronous" flag of ZIPVFS pager?

2017-03-16 Thread Dan Kennedy
iling list Subject: Re: [sqlite] Is it possible to change "synchronous" flag of ZIPVFS pager? 2017-03-16 9:51 GMT+01:00 Dan Kennedy <danielk1...@gmail.com>: On 03/16/2017 01:40 PM, Tomasz Maj wrote: Hi, According to my observations, "PRAGMA synchronous=...;" query affect

Re: [sqlite] Is it possible to change "synchronous" flag of ZIPVFS pager?

2017-03-16 Thread Dan Kennedy
On 03/16/2017 01:40 PM, Tomasz Maj wrote: Hi, According to my observations, "PRAGMA synchronous=...;" query affects only the standard sqlite pager. But for zipped databases sqlite uses additional ZIPVFS pager layer which actually decide whether and when to sync content of files associated

Re: [sqlite] FTS5 not working

2017-03-15 Thread Dan Kennedy
On 03/15/2017 06:00 AM, Domingo Alvarez Duarte wrote: Hello ! I just downloaded the http://www.sqlite.org/snapshot/sqlite-snapshot-201703062044.tar.gz compiled it with fts5 enabled and then tested it with this: === CREATE VIRTUAL TABLE email USING fts5(body); insert into email(body)

Re: [sqlite] sqlite3 feature or regression

2017-03-09 Thread Dan Kennedy
On 03/09/2017 10:46 PM, James K. Lowden wrote: On Tue, 7 Mar 2017 19:04:47 +0100 Vermes Mátyás wrote: It is also unnecessarily complex and slow. The script demonstrates a regression (a bug). It is written in Ruby so that everybody can run it, and see its _results_. It is

Re: [sqlite] Producing SQLITE_MISMATCH

2017-03-09 Thread Dan Kennedy
On 03/09/2017 09:39 PM, J. King wrote: On 2017-03-09 09:35:00, "Dan Kennedy" <danielk1...@gmail.com> wrote: On 03/09/2017 09:23 PM, J. King wrote: I'm trying to write a minimal test case to produce an SQLITE_MISMATCH response. The documentation suggests the following shou

Re: [sqlite] Producing SQLITE_MISMATCH

2017-03-09 Thread Dan Kennedy
On 03/09/2017 09:23 PM, J. King wrote: I'm trying to write a minimal test case to produce an SQLITE_MISMATCH response. The documentation suggests the following should be sufficient: CREATE TABLE test(id integer primary key) WITHOUT ROWID; INSERT INTO test(id) VALUES('ook'); However, SQLite

Re: [sqlite] sqlite3 feature or regression

2017-03-09 Thread Dan Kennedy
On 03/09/2017 06:28 AM, Vermes Mátyás wrote: Why are you wanting me to work so hard at this? Under no circumstances work hard, I rewrote the program for you to C. The results are attached also, so you do not have to compile it, if you do not want. You can download it from

Re: [sqlite] Error using multiline command line argument with dot-command

2017-03-07 Thread Dan Kennedy
On 03/08/2017 12:03 AM, Rob Golsteijn wrote: Hi List, I want to report a minor issue for the Sqlite shell. It does not handle multiline command line arguments in which the second line contains a dot-command correctly. If the same statements are passed via stdin they are handled fine. Tested

Re: [sqlite] Performance difference in running SQLite embed or in a TCL script

2017-03-01 Thread Dan Kennedy
On 03/01/2017 09:53 PM, Simone Mosciatti wrote: Hi all, tl;dr: What are the difference between running SQLite inside TCL and running it embed in a shared object module? Why I am seeing such big difference in performance?

Re: [sqlite] last_insert_rowid() returns wrong value after insert in a fts5 virtual table.

2017-02-27 Thread Dan Kennedy
On 02/28/2017 12:15 AM, Cezary H. Noweta wrote: Hello, On 2017-02-27 11:41, Dan Kennedy wrote: CREATE VIRTUAL TABLE f USING fts3(x); BEGIN; INSERT INTO f VALUES('one'); INSERT INTO f VALUES('two'); INSERT INTO f VALUES('three'); INSERT INTO f VALUES('four'); COMMIT

Re: [sqlite] last_insert_rowid() returns wrong value after insert in a fts5 virtual table.

2017-02-27 Thread Dan Kennedy
On 02/27/2017 05:03 AM, Cezary H. Noweta wrote: Hello, While working on the Perl DBD:SQLite driver, I found the following bug in sqlite : the last_insert_rowid() method (or SQL function) returns the constant value 10 after any insert into a fts5 virtual table. This bug is new in fts5 :

Re: [sqlite] error 6410 after upgrade to 3.17.0 on android

2017-02-21 Thread Dan Kennedy
On 02/22/2017 12:11 AM, Alexandre Mainville wrote: Hi, I just upgraded from sqlite 3.8.8.3 to 3.17.0. (I use zipvfs 3.17.0) On android, I get error SQLITE_IOERR_GETTEMPPATH (6410) when I try to create a new DB. I checked that SQLITE_TEMP_STORE is properly set to 3 in Android.mk Is there

Re: [sqlite] Unresolved External sqlite3_user_add

2017-02-21 Thread Dan Kennedy
On 02/22/2017 12:47 AM, Andrew Stewart wrote: Hi, I am trying to add the authentication extension in and I am getting this message. I have included the 'userauth.c' at the bottom of the amalgamation. I have included 'sqlite3userauth.h' at the bottom of sqlite3.h. It finds

Re: [sqlite] BUG: UPDATE with correlated sub-query

2017-02-13 Thread Dan Kennedy
On 02/13/2017 01:44 PM, Dudu Markovitz wrote: Good morning While answering question on stackoverflow I have noticed a bug related to UPDATE using correlated sub-query. The demonstration code can be found in the attached file bug_report.sql and the

Re: [sqlite] New pre-release snapshot with performance enhancements

2017-02-07 Thread Dan Kennedy
On 02/07/2017 09:38 PM, Dan Kennedy wrote: On 02/07/2017 05:14 PM, Jake Thaw wrote: Hello Richard, Is the following enhancement included as part of this pre-release snapshot? - Enhance the session extension to support WITHOUT ROWID tables. The draft documentation still says

Re: [sqlite] New pre-release snapshot with performance enhancements

2017-02-07 Thread Dan Kennedy
On 02/07/2017 05:14 PM, Jake Thaw wrote: Hello Richard, Is the following enhancement included as part of this pre-release snapshot? - Enhance the session extension to support WITHOUT ROWID tables. The draft documentation still says that this support does not yet exist, and my test below also

Re: [sqlite] Help with custom collation

2017-02-02 Thread Dan Kennedy
On 02/02/2017 02:08 AM, x wrote: Thanks Clemens. You’re right about changing the UTF8String* to char* as it now works but when trying it with a column containing Unicode characters it didn’t. I’d have liked to have tried it with windows wchar_t* type but If I try using if

Re: [sqlite] can't open db when path length extends 512 characters (on linux)

2017-01-30 Thread Dan Kennedy
On 01/31/2017 12:48 AM, Nir Paz wrote: Hi All, I get the next error: SQLITE_CANTOPEN when calling sqlite3_open_v2 with filename exceeding 512 characters. Linux doesn't have that limit, my thought is to change the define of MAX_PATHNAME, is there a better option? I don't think there is a

Re: [sqlite] Slight incompatibility of v. 3.16.2 from previous releases (compiler error)

2017-01-30 Thread Dan Kennedy
On 01/30/2017 05:39 PM, a...@zator.com wrote: Hi list: Building with SQLite v. 3.16.2 and MS VC++ 2015 (v 14.0) there appeared a linker error: Error LNK2019 external simbol _sqlite3FkReferences unresolved in function _sqlite3Insert Who belong (I suppose) to a compiler warning: line 109039:

Re: [sqlite] Bug report: Incorrect error information if db fails to open due to bad flags

2017-01-12 Thread Dan Kennedy
On 01/13/2017 06:25 AM, Jens Alfke wrote: I’ve found a case where incorrect error information gets reported to client C code trying to open a SQLite database. (This is with SQLite 3.14 on mac OS 10.12.) After the following C code runs (the path here is irrelevant): sqlite3 *db;

Re: [sqlite] Performance degradation of in-memory database with high row count and overall design discussion of my project

2017-01-05 Thread Dan Kennedy
On 01/06/2017 12:56 AM, Simone Mosciatti wrote: Hi all, I am writing a small Redis module that embeds SQLite [1] I am facing some performance issues and I wonder if the behaviour I am seeing is expected or if I am doing something completely wrong. However I am finding some issues on the

Re: [sqlite] Unregister UDF, created with sqlite3_create_function_v2

2016-12-18 Thread Dan Kennedy
On 12/19/2016 03:32 AM, Bart Smissaert wrote: Using the latest SQLite from VB6 and trying to unregister a UDF, created with sqlite3_create_function_v2. This registration works fine and the UDF's work fine. Now I am trying to unregister this UDF and the only hint how to do this that I could find

Re: [sqlite] How do I check if the DB is open?

2016-12-13 Thread Dan Kennedy
On 12/14/2016 10:56 AM, Igor Korot wrote: Keith, On Tue, Dec 13, 2016 at 8:34 PM, Keith Medcalf wrote: int res = sqlite3_close( m_db ); if( res == SQLITE_OK ) m_db = NULL; else { // error handling } #ifdef DEBUG sqlite3_stmt

Re: [sqlite] Foreign key child index question

2016-12-13 Thread Dan Kennedy
On 12/13/2016 11:02 PM, Paul Egli wrote: On Tue, Dec 13, 2016 at 9:56 AM, Simon Slavin wrote: On 13 Dec 2016, at 3:53pm, Paul Egli wrote: Well if i am missing something, i still cannot see it. Based on these quotes in the docs, i assume that a

Re: [sqlite] Error code for VT xColumn()/xRowid() if row does not exist?

2016-12-12 Thread Dan Kennedy
On 12/13/2016 01:47 AM, Bob Friesenhahn wrote: I am reworking code for a virtual table module and need to provide proper error codes from the xColumn() and xRowid() callbacks for the case where the row id does not exist, or the current row goes away. This problem occurs because the current

Re: [sqlite] performance issue through Dll upgrade

2016-12-01 Thread Dan Kennedy
On 12/01/2016 02:24 PM, Stephan Stauber wrote: Hello, we have following performance Issue since we upgraded from SQLite 3.8.5 to SQLite 3.10.0: SQLite 3.8.5: to INSERT 380.000 records into a in inMemory Database it takes 10 seconds SQLite 3.10.0 to

Re: [sqlite] Uninitialized memory reads (not likely false positives)

2016-11-16 Thread Dan Kennedy
On 11/16/2016 05:53 AM, Nico Williams wrote: I don't normally pay attention to warnings when compiling SQLite3, nor to Coverity or other static analysis tools' output either, as I'm quite aware that most of these are false positives and thus unwelcome noise here. However, I do sample them

Re: [sqlite] BUG: crash in fts5MultiIterNext()

2016-11-14 Thread Dan Kennedy
On 11/13/2016 07:04 PM, Jan Berkel wrote: Got a crash in the FTS5 code which only happens on a specific search query (int the form of: "ab cd" OR "ab cd" *) The crash occurs In fts5MultiIterNext(), on the following line: pSeg->xNext(p, pSeg, ); Debugger shows that pSeg is set, but xNext is

Re: [sqlite] BUG: crash in fts5MultiIterNext()

2016-11-12 Thread Dan Kennedy
On 11/13/2016 01:58 AM, Jan Berkel wrote: Got a crash in the FTS5 code which only happens on a specific search query (int the form of: "ab cd" OR "ab cd" *) The crash occurs In fts5MultiIterNext(), on the following line: pSeg->xNext(p, pSeg, ); Debugger shows that pSeg is set, but xNext is

Re: [sqlite] sqlite ext3 settings

2016-11-10 Thread Dan Kennedy
On 11/10/2016 06:25 AM, Andrii Motsok wrote: Hi, I have sqlite database on top of ext3 (on ssd). Does 1) ext3 parameters (data=writeback|ordered,barrier=0|1, etc) 2) drive write-caching setting (hdparm -W) value 3) ??? There's a thread here:

Re: [sqlite] Merging FTS indexes

2016-11-08 Thread Dan Kennedy
On 11/08/2016 07:32 PM, Jan Berkel wrote: I use sqlite as an application specific format to distribute data to mobile clients. The data is generated and full-text indexed (FTS5) on the server, the clients then simply download one or more compressed db files. Now I'd like to generate a

Re: [sqlite] Is msync necessary for SQLite?

2016-11-03 Thread Dan Kennedy
On 11/03/2016 04:53 PM, sanhua.zh wrote: Here is a part of code in [unixWrite]. (os_unix.h) Is not it written by mmap ? It changed to avoid writing via mmap for version 3.10.0. http://www.sqlite.org/src/info/67c5d3c646 And I don't think mmap() was used on IOS until 3.11.0.

Re: [sqlite] Is msync necessary for SQLite?

2016-11-03 Thread Dan Kennedy
On 11/03/2016 02:13 PM, sanhua.zh wrote: I notice that SQLite may not call msync for mmap. Instead, it calls the fsync. As my search, fsync does not imply the msync. See this,https://groups.google.com/forum/#!topic/comp.unix.programmer/pIiaQ6CUKjU So, is it necessary call a msync for SQLite?

Re: [sqlite] VACUUM causes Out of memory error

2016-11-02 Thread Dan Kennedy
On 11/02/2016 09:36 PM, Ralf Junker wrote: I am the author of the DISQLite3 Delphi wrapper. Assurance to all DISQLite3 users: The leak is not DISQLite3 specific. DISQLite3 5.15.0 behaves exactly like the official SQLite 3.15.0 release. The problem can reliably be reproduced using the official

Re: [sqlite] sites inaccessible

2016-10-29 Thread Dan Kennedy
On 10/29/2016 12:28 PM, jungle Boogie wrote: Hi Dr. Hipp, Probably a low concern for you at 1:30am your time but I can't connect to fossil-scm.org or sqlite.org over port 80. $ curl http://sqlite.org/ curl: (7) Failed to connect to sqlite.org port 80: Connection refused $ curl

Re: [sqlite] Adding comments to a ticket

2016-10-28 Thread Dan Kennedy
On 10/28/2016 11:44 PM, John Reynolds wrote: I've submitted a ticket, https://system.data.sqlite.org/index.html/tktview?name=d4728aecb7, and want to add a comment to it. I can't find any obvious way to do it in the ticket page (I'm logged on as anonymous). Is it possible? Click the "Edit"

Re: [sqlite] WAL pragma question

2016-10-28 Thread Dan Kennedy
m: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Dan Kennedy Sent: Friday, October 28, 2016 5:21 AM To: sqlite-users@mailinglists.sqlite.org Subject: Re: [sqlite] WAL pragma question On 10/28/2016 03:16 AM, David Raymond wrote: I'm playing around with WAL mode

Re: [sqlite] Bus Error on OpenBSD

2016-10-28 Thread Dan Kennedy
On 10/28/2016 05:39 PM, no...@null.net wrote: Hi Rowan, On Fri Oct 28, 2016 at 06:19:59PM +0800, Rowan Worth wrote: Every sqlite_stmt you use *must* be finalized via sqlite3_finalize. I'm not exactly sure what that looks like from the other side of DBD, but I would be checking your perl code

Re: [sqlite] WAL pragma question

2016-10-28 Thread Dan Kennedy
On 10/28/2016 03:16 AM, David Raymond wrote: I'm playing around with WAL mode here for the first time, along with some of the pragmas, and I'm getting some weird results. I was hoping someone could let me know if I'm missing something, or if yes, it is indeed weird. For starters, I'm looking

Re: [sqlite] Bug in latest sqlite Release vacuum crashes?

2016-10-26 Thread Dan Kennedy
On 10/25/2016 01:25 AM, Christian Czech wrote: We have a problem with the latest stable release of SQLite. When compiled for 32 bit under windows and vacuum a database file larger than 2GB, memory storage usage gets up to 2GB and than vacuum crashes with not enough memory. It seems that a temp

Re: [sqlite] How does the pager know whether its memory cache is still valid?

2016-10-24 Thread Dan Kennedy
On 10/25/2016 01:12 AM, Jens Alfke wrote: On Oct 24, 2016, at 1:31 AM, Rowan Worth wrote: OK, so the entire cache is invalidated when another process updates the DB, which is what I feared. In this case I'm looking at too many concurrent updates for caching to add much value.

Re: [sqlite] Possible Bug in VTable handling in SQLite 3.14.2

2016-10-14 Thread Dan Kennedy
On 10/14/2016 04:59 PM, Hick Gunter wrote: In the vdbeaux.c source, the function resolveP2Values(...) is not resetting p->readOnly when it encounters an OP_VUpdate opcode is not setting p->bIsReader when it encounters an OP_VFilter opcode Additionally, the frunction sqlite3VdbeHalt(...)

Re: [sqlite] LIMIT doesn't return expected rows

2016-10-11 Thread Dan Kennedy
On 10/11/2016 07:57 PM, Simon Slavin wrote: On 11 Oct 2016, at 1:44pm, Eric Minbiole wrote: Your problem is that although SQL accepts the clauses written in the order you wrote them in, the LIMIT clause is processed before the ORDER BY clause. Is that really true? I had

Re: [sqlite] Strange problem (pehaps bug) with sqlite + json

2016-09-23 Thread Dan Kennedy
On 09/23/2016 03:09 PM, Gilles Vollant wrote: With sqlite.exe from tools zipfile, I reproduce the bug with this script: If I add, just after the create table the line create index if not exists idxtype on records(activitytype); I have a correct result If I don't add the index, I've

Re: [sqlite] A problem with 'pragma table_info(...)'

2016-09-21 Thread Dan Kennedy
On 09/21/2016 02:57 PM, Stepan Zakharov wrote: Nothing & Nothing. Just returns SQLITE_OK, doesn't enter into Callback. To avoid any doubts, when I change query to "select sql from sqlite_master where (type='table' AND name='TABLE_NAME');" I do enter into Callback and have a result. Perhaps,

Re: [sqlite] A problem with 'pragma table_info(...)'

2016-09-21 Thread Dan Kennedy
On 09/21/2016 01:44 PM, Stepan Zakharov wrote: Yes, of course it looks different.pragma table_info(TABLENAME);Where TABLENAME is my table name.I've tried it with single-quotes as well: pragma table_info('TABLENAME');No results in any case.And no errors. Returns SQLITE_OK.A very strange

Re: [sqlite] [BUG REPORT] Transaction that has the key violation is very slow

2016-09-21 Thread Dan Kennedy
On 09/21/2016 04:34 AM, Yuri wrote: I import bulk data into SQLite DB. I run 50k records per transaction. When some bug or data inconsistency occurs and causes the key violation, this violation is reported only in the end of the transaction (this is okay and has been discussed before). But

Re: [sqlite] Random IOERR_SHORT_READ in sqlite3_prepare_v2

2016-09-14 Thread Dan Kennedy
On 09/14/2016 06:05 PM, Martin Raiber wrote: Hi, there have been three reports by users using my software of SQLite 3.12.0 returning SQLITE_IOERR and logging a SQLITE_IOERR_SHORT_READ (522). Specifically: 2016-09-12 04:37:04: WARNING: SQLite: disk I/O error errorcode: 522 2016-09-12 04:37:04:

Re: [sqlite] schema_version and Vacuum or Backup API

2016-09-09 Thread Dan Kennedy
On 09/09/2016 12:06 PM, Keith Medcalf wrote: Richard, Can a single sqlite3_create_function call define a function which is both a scalar function and an aggregate function, or are two calls to create_function required, one defining the scalar and the other the aggregate version? (using the

Re: [sqlite] Best way to "split" a large DB into two DBs

2016-09-07 Thread Dan Kennedy
On 09/08/2016 12:57 AM, Clay Gerrard wrote: On Wed, Sep 7, 2016 at 10:08 AM, Dan Kennedy <danielk1...@gmail.com> wrote: [...] then attach it and your main db to the same handle so that you can use an "INSERT INTO ... SELECT ..." statement Can you elaborate or provide any ref

<    1   2   3   4   5   6   7   8   9   10   >