Re: [sqlite] Full text search: Regression on 3.8.7 (or using incorrectly?)

2014-10-07 Thread Dan Kennedy
On 10/08/2014 01:52 AM, Sohail Somani wrote: Figured it out: match terms should be "l0l* h4x*" NOT "*l0l* *h4x*", though it did work as expected with the older version. I'd suggest keeping the old behaviour unless there is a performance-based reason not to. On 2014-10-07, 2:49 PM, Sohail

Re: [sqlite] 50% faster than 3.7.17

2014-10-09 Thread Dan Kennedy
On 10/09/2014 04:38 PM, David Woodhouse wrote: On Thu, 2014-09-25 at 11:13 +0100, David Woodhouse wrote: I suggested a couple of specific optimisations which the query planner might be able to make, which should hopefully have benefits wider than just my own use case. Are those not viable? I'm

Re: [sqlite] Full text search: Regression on 3.8.7 (or using incorrectly?)

2014-10-09 Thread Dan Kennedy
On 10/09/2014 01:13 AM, Sohail Somani wrote: On 2014-10-07, 4:04 PM, Dan Kennedy wrote: On 10/08/2014 01:52 AM, Sohail Somani wrote: Figured it out: match terms should be "l0l* h4x*" NOT "*l0l* *h4x*", though it did work as expected with the older version. I'd suggest keepi

Re: [sqlite] Full text search: Regression on 3.8.7 (or using incorrectly?)

2014-10-09 Thread Dan Kennedy
On 10/09/2014 07:23 PM, Sohail Somani wrote: On 2014-10-09, 7:32 AM, Dan Kennedy wrote: Got it, thanks for the explanation. Just to make sure that I understand you correctly, is the clause MATCH '*l0l* *h4x*' getting translated to MATCH 'l0l* h4x*'? Yes, that's right. Dan. In that case

Re: [sqlite] Lets try this again. Sqlite Python libraries throwing exception on unique constraint.

2014-10-13 Thread Dan Kennedy
On 10/13/2014 11:44 PM, Jeffrey Parker wrote: Hello, I am working with sqlite3 in python 2.7.8 and I am running into a strange error where I get the below exception when running an insert into statement on an empty table. I know this is probably more to do with the python libraries but I

Re: [sqlite] Unable to prepare a statement

2014-10-15 Thread Dan Kennedy
On 10/15/2014 07:19 AM, Sam Carleton wrote: When I use the SQLite Manager, I am able to run this query just fine: UPDATE EventNode SET IsActive = 1 WHERE EventNodeId IN (SELECT w.EventNodeId FROM EventNode as w, EventNode as m on m.objectId =

Re: [sqlite] INSERT OR REPLACE in a virtual table implementation....

2014-10-17 Thread Dan Kennedy
On 10/18/2014 01:07 AM, dave wrote: I have a virtual table implementation, and I would like to use the INSERT OR REPLACE syntax to simplify actions for the user. In my xUpdate method, for the case where insertion is occuring, else if ( argc > 1 && SQLITE_NULL == sqlite3_value_type ( argv[0] )

Re: [sqlite] Bug 993556 - SQLite crash in walIndexTryHdr due to Windows EXCEPTION_IN_PAGE_ERROR exception

2014-10-20 Thread Dan Kennedy
On 10/18/2014 05:45 AM, Deon Brewis wrote: I'm trying to follow Richard's advise to work around this issue, which is: "Is that database ever used by more than a single process. (Use by multiple threads using separate connections does not count - I mean really used by multiple processes with

Re: [sqlite] Installing 3.8.7 gives 3.8.6

2014-10-25 Thread Dan Kennedy
On 10/25/2014 09:36 PM, Arnaud Meuret wrote: Hi everyone, On a fresh CentOS 5, compiling SQLite using the [current tarball][1] for 3.8.7, the version being installed ends up in `/usr/local/lib` as **3.8.6**: bash-3.2# make install make[1]: Entering directory

Re: [sqlite] [RFE bug] Improve error reporting for foreign keys

2014-10-27 Thread Dan Kennedy
On 10/27/2014 01:49 PM, Tristan Van Berkom wrote: This is just a request-for-enhancement bug report, I've went to the trouble or reproducing this problem in a simple test case and while I probably wont be able to immediately benefit from an upstream fix for this, I hope that this bug report will

Re: [sqlite] Using sqlite3_backup* while the destination connection has "busy" read-only statements.

2014-11-13 Thread Dan Kennedy
On 11/13/2014 05:26 AM, Shaun Seckman (Firaxis) wrote: Greetings all, I'm running into a situation in where our application is crashing during a call to sqlite_backup_finish inside of btreeParseCellPtr because some of the structure is corrupted. Both the source and destination database are

Re: [sqlite] sliteonline or sqlite in js

2014-11-14 Thread Dan Kennedy
On 11/14/2014 03:37 PM, Noel Frankinet wrote: Impressive ! It is that. Perhaps not as functional as a native app (so far), but looking really good! And you can't beat the deployment. Dan. On 12 November 2014 12:08, Kirill wrote: Good day, Full line manager to

Re: [sqlite] Null rowid when using CTEs

2014-11-14 Thread Dan Kennedy
On 11/14/2014 08:33 AM, RP McMurphy wrote: When using CTEs the rowid is null. The following returns "--NULL--" .null --NULL-- with c(x) as (select 1) select rowid from c; I guess that's expected. The same behaviour as for reading the rowid of a view or sub-select. It

Re: [sqlite] Infinite loop in sqlite3VdbeSorterWrite when sorting big data

2014-11-25 Thread Dan Kennedy
On 11/25/2014 02:53 AM, Marcin Sobieszczanski wrote: Hi I work with sqlite files that have a few gigabytes of simple data. Almost all of the data sits in one table that has 9 non-null integer columns (including row_id, and one int64 column) plus 3 additional string or int columns (additional

Re: [sqlite] Infinite loop in sqlite3VdbeSorterWrite when sorting big data

2014-11-25 Thread Dan Kennedy
On 11/26/2014 12:41 AM, Marcin Sobieszczanski wrote: Do you have a large cache-size configured? Yes: PRAGMA cache_size = 10 PRAGMA page_size = 16384 Thanks for reporting this. I think it should be fixed here: http://www.sqlite.org/src/info/623827192532f08b Dan.

Re: [sqlite] Corrupting pointers to the lookaside smallacator

2014-11-25 Thread Dan Kennedy
On 11/26/2014 06:47 AM, Ward Willats wrote: We are compiling the 3.8.7.1 using clang arm64 for iOS. Following set: #define SQLITE_ENABLE_COLUMN_METADATA 1 #define HAVE_INTTYPES_H 1 #define HAVE_STDINT_H 1 #define HAVE_USLEEP 1 #define SQLITE_DEBUG 1 #define SQLITE_MEMDEBUG 1 WAL mode. In

Re: [sqlite] Corrupting pointers to the lookaside smallacator

2014-11-27 Thread Dan Kennedy
On 11/27/2014 03:20 PM, Paul wrote: Here is how it looks with debug symbols are on: #0 0x28c4113e in memcpy () from /lib/libc.so.7 #1 0x08854c20 in sqlite3StrAccumAppend (p=0xfffe8548, z=0x2c3fffda "vtb_enyqkyxs USING vtable_module_343", N=41) at sqlite3.c:21563 #2 0x087edf30 in

Re: [sqlite] Read overflow in CREATE VIRTUAL TABLE query (formerly Corrupting pointers to the lookaside smallacator)

2014-11-27 Thread Dan Kennedy
On 11/27/2014 05:56 PM, Paul wrote: Currently we use various versions of SQLite: SQLite version 3.8.0.1 2013-08-29 17:35:01 SQLite version 3.8.2 2013-12-06 14:53:30 SQLite version 3.8.6 2014-08-15 11:46:33 SQLite version 3.8.7 2014-10-17 11:24:17 All of them are affected so I never considered

Re: [sqlite] sqlite bugreport : unique index causes valid updates to fail

2014-12-08 Thread Dan Kennedy
On 12/08/2014 09:55 PM, Nico Williams wrote: Ideally there would be something like DEFERRED foreign key checking for uniqueness constraints... You could hack SQLite to do enforce unique constraints the same way as FKs. When adding an entry to a UNIQUE index b-tree, you check for a duplicate.

Re: [sqlite] Online/Hot backup of WAL journalling mode database

2014-12-09 Thread Dan Kennedy
On 12/10/2014 05:06 AM, Simon Slavin wrote: On 9 Dec 2014, at 8:57pm, Nick wrote: Environment is Linux with multiple (c. 4-6) processes accessing a single sqlite database named "test.db". Backup: - New process started using cronjob to initiate application checkpoint

Re: [sqlite] Online/Hot backup of WAL journalling mode database

2014-12-11 Thread Dan Kennedy
On 12/11/2014 05:49 AM, Nick wrote: On 10 Dec 2014, at 07:35, Dan Kennedy wrote: Strictly speaking the database file may not be well-formed even if there is no ongoing checkpoint. If: a) process A opens a read transaction, b) process B opens and commits a write transaction

Re: [sqlite] Online/Hot backup of WAL journalling mode database

2014-12-12 Thread Dan Kennedy
On 12/12/2014 03:31 AM, Nick wrote: On 11 Dec 2014, at 10:08, Dan Kennedy wrote: On 12/11/2014 05:49 AM, Nick wrote: On 10 Dec 2014, at 07:35, Dan Kennedy wrote: Strictly speaking the database file may not be well-formed even if there is no ongoing checkpoint. If: a) process A opens

Re: [sqlite] Query Planner for Virtual Tables: link table evaluation & transitive property of constraints not used

2014-12-15 Thread Dan Kennedy
On 12/12/2014 09:22 PM, Josef Kučera wrote: Hello, I am trying to use SQLite's marvellous Virtual Table mechanism as a SQL layer for querying an in memory storage. This works good, but I have a problem with more complex queries. When querying a real SQLite database it correctly moves the

Re: [sqlite] Abnormal memory usage when removing rows within nested transaction from a table, referenced by another table via FK,

2014-12-15 Thread Dan Kennedy
On 12/15/2014 11:11 PM, Paul wrote: Hello, dear developers Recently I've stumbled upon a very rare and strange bug. The result of this is abnormal memory usage, that does not allow us to remove fair number of rows from a table due to the limit of memory, available for 32bit process. This is

Re: [sqlite] Abnormal memory usage when removing rows within nested transaction from a table, referenced by another table via FK,

2014-12-15 Thread Dan Kennedy
On 12/15/2014 11:59 PM, Dan Kennedy wrote: On 12/15/2014 11:11 PM, Paul wrote: Hello, dear developers Recently I've stumbled upon a very rare and strange bug. The result of this is abnormal memory usage, that does not allow us to remove fair number of rows from a table due to the limit

Re: [sqlite] SQLITE_FTS3_MAX_EXPR_DEPTH and upgrading sqlite

2014-12-17 Thread Dan Kennedy
On 12/16/2014 10:57 PM, Ed Willis wrote: Hello all, Apologies in advance if this question has been asked and answered elsewhere – a (brief, admittedly) search did not turn up anything and so I’m posting this. We’re in the process of upgrading sqlite in our service. We were on a version

Re: [sqlite] Abnormal memory usage when removing rows within nested transaction from a table, referenced by another table via FK,

2014-12-17 Thread Dan Kennedy
On 12/16/2014 03:08 PM, Paul wrote: The memory is being used by the statement journal, which you have in memory. If the app did not set "journal_mode=memory" and "temp_store=memory", SQLite would create a really large temp file instead of using memory. Which would still be sub-optimal, but might

Re: [sqlite] Abnormal memory usage when removing rows within nested transaction from a table, referenced by another table via FK,

2014-12-18 Thread Dan Kennedy
On 12/18/2014 02:41 PM, Paul wrote: I want to confirm that issue is fixed for me. Thanks again, Dan! Please ignore this update, patch fixes this problem as well. I want to add even more input for this issue. I understand why there is implicit savepoint, when I remove row from 'parent'

Re: [sqlite] Abnormal memory usage when removing rows within nested transaction from a table, referenced by another table via FK,

2014-12-18 Thread Dan Kennedy
On 12/18/2014 04:16 PM, Paul wrote: Hi, Dan. On 12/18/2014 02:41 PM, Paul wrote: I want to confirm that issue is fixed for me. Thanks again, Dan! Please ignore this update, patch fixes this problem as well. I want to add even more input for this issue. I understand why there is implicit

Re: [sqlite] SQLITE wal file size keeps growing

2014-12-18 Thread Dan Kennedy
On 12/19/2014 11:22 AM, Kushagradhi Bhowmik wrote: I am writing continuously into a db file which has PRAGMA journal_mode=WAL, PRAGMA journal_size_limit=0. My C++ program has two threads, one reader(queries at 15 sec intervals) and one writer(inserts at 5 sec intervals). Every 3 min I am

Re: [sqlite] FTS4 Problem

2014-12-24 Thread Dan Kennedy
On 12/25/2014 08:04 AM, Peter Truskier wrote: As I mentioned, I seem to have solved the problem by doing a "rebuild" command on the FTS4 table. But, as I thought about it further, I'm still confused as to why dropping, and then re-creating the virtual table didn't solve the problem as well.

Re: [sqlite] journal file is not removed when ATOMIC WRITE is enabled

2014-12-29 Thread Dan Kennedy
On 12/29/2014 07:57 AM, Yongil Jang wrote: For more information, In pager_end_transaction() function, int bDelete = (!pPager->tempFile && sqlite3JournalExists(pPager->jfd)); <-- sqlite3JournalExists() returns 0 I think both of pager_end_transaction() and sqlite3JournalExists() functions work

Re: [sqlite] Suggestion for syntax enhancement for virtual tables

2015-01-01 Thread Dan Kennedy
On 01/02/2015 01:58 PM, Hick Gunter wrote: Temporary virtual tables sounds like an interesting concept. Does the xDestroy() function get called on such a beast (as opposed to xDisconnect() when the connection is closed)? Just xDisconnect(). Dan. Should that function delete the backing

Re: [sqlite] Getting SQLITE_IOERR_WRITE when running sqlite

2015-01-02 Thread Dan Kennedy
On 01/02/2015 04:44 PM, Waiba, Aswin wrote: Hi, I am currently using sqlite version 3.7.14 in our application. We are using it via a single thread, however we are getting SQLITE_IOERR (10) when running the application. After enabling the extended result code, we found out that we were

Re: [sqlite] New column in select will not mask column of the same name in having clause and sqlite won't warn

2015-01-04 Thread Dan Kennedy
On 01/05/2015 01:39 PM, Hick Gunter wrote: This is completely legal and well defined. HAVING is applied to the RESULT set of a SELECT. The select asks to count the "distinct kontrola" in each group of kvadrat and datum, the HAVING clause specifies returning only those records with pocet > 1.

Re: [sqlite] New column in select will not mask column of the same name in having clause and sqlite won't warn

2015-01-04 Thread Dan Kennedy
On 01/05/2015 02:52 PM, Dan Kennedy wrote: On 01/05/2015 01:39 PM, Hick Gunter wrote: This is completely legal and well defined. HAVING is applied to the RESULT set of a SELECT. The select asks to count the "distinct kontrola" in each group of kvadrat and datum, the HAVING clause

Re: [sqlite] VACUUM requires 6.7 times space ?

2015-01-05 Thread Dan Kennedy
On 01/05/2015 06:22 PM, Simon Slavin wrote: I have a database file which is 120GB in size. It consists of two huge tables and an index. Its journal_mode is DELETE. It is on a partition with 803GB of free space. By my calculations I have 6.7 times the amount of free space as the database is

Re: [sqlite] How often is xDisconnect called? (Was: Suggestion for syntax enhancement for virtual tables)

2015-01-05 Thread Dan Kennedy
a Virtual Table Module to note that it is being created in the temp database, and do any required cleanup in xDisconnect instead of xDestroy for that instance. But if xDisconnect can be called at other times, cleanup could be premature. Best, Peter On Friday, January 2, 2015 12:56 AM, D

Re: [sqlite] SQLite Android Bindings: how difficult to add LOCALIZED back?

2015-01-08 Thread Dan Kennedy
On 01/08/2015 07:48 AM, Philip Warner wrote: I just saw the SQLite Android Bindings page at http://www.sqlite.org/android/doc/trunk/www/index.wiki but was a little disappointed to read in the details that UNICODE and LOCALIZED are not supported. I'd really like the latest SQLite, and

Re: [sqlite] Huge WAL log

2015-01-15 Thread Dan Kennedy
On 01/15/2015 12:28 AM, Jan Slodicka wrote: Richard Hipp-3 wrote No other active readers or writers. Are you sure? Writers for sure. As far readers are concerned, the things are too complex to make an absolute statement. (I shall check once more.) Some APIs that might be helpful: *

Re: [sqlite] Huge WAL log

2015-01-16 Thread Dan Kennedy
On 01/17/2015 12:04 AM, Jan Slodicka wrote: Simon Slavin-3 wrote Thanks to your post I discovered multiple-row inserts so that I now understand what you asked. Just a note that multiple-row inserts were added to SQLite relatively recently (2012-03-20 (3.7.11)) and, because SQLite does only

Re: [sqlite] regarding sqlite3_prepare_v2() func

2015-01-21 Thread Dan Kennedy
On 01/22/2015 11:53 AM, Sairam Gaddam wrote: I have one doubt regarding sqlite code. I have 2 programs-one with sqlite3_exec() included in the code and in other it is not included.I included those files which are zmain.c and zmain1.c respectively. First i created a database and added a table

Re: [sqlite] database locked in PHP

2015-01-25 Thread Dan Kennedy
On 01/25/2015 07:35 AM, Lev wrote: On Sat, 24 Jan 2015 20:59:22 + Simon Slavin wrote: and set it to 6 (60 seconds) or so. Okay, I try that, but I still don't understand how can a single threaded application get a locked error. Was

Re: [sqlite] small sqlite fts snippet function or Fts Bug!

2015-01-27 Thread Dan Kennedy
On 01/27/2015 06:48 PM, boscowitch wrote: and the in an sqlite shell (SQLite version 3.8.8.1 2015-01-20 16:51:25) I get following for a select with snippet: EXAMPLE OUTPUT: sqlite> select docid,*,snippet(test) from test where german match "a"; 1|[1] a b c|1] a b c 2|[{[_.,:;[1] a b c|1] a b c

Re: [sqlite] ROWID-based queries slow in FTS db

2015-01-30 Thread Dan Kennedy
On 01/29/2015 02:29 AM, farkas andras wrote: Hi all, Im using FTS through DBD::SQLite (perl) to query large text databases (~10GB, ~10 million records). The regular FTS MATCH searches work fine (they usually run under a second), but searches based on ROWID are atrociously slow and hog massive

Re: [sqlite] ROWID-based queries slow in FTS db

2015-01-30 Thread Dan Kennedy
On 01/30/2015 10:49 PM, Dominique Devienne wrote: On Fri, Jan 30, 2015 at 4:38 PM, Dan Kennedy <danielk1...@gmail.com> wrote: On 01/29/2015 02:29 AM, farkas andras wrote: [...] but searches based on ROWID are atrociously slow and hog massive amounts of memory [...] Looks like

Re: [sqlite] Multi-thread mode question

2015-02-08 Thread Dan Kennedy
On 02/08/2015 04:30 PM, Neo Anderson wrote: The doc says: Multi-thread. In this mode, SQLite can be safely used by multiple threads provided that no single database connection is used simultaneously in two or more threads. I have a scenario that every sqlite3_calls around a single database

Re: [sqlite] Multi-thread mode question

2015-02-09 Thread Dan Kennedy
n't lock the context of the statement being used... it will lead to bizarre crashes in the database; similar to double-releasing memory or delayed reference of memory that has been released. On Sun, Feb 8, 2015 at 3:00 AM, Dan Kennedy <danielk1...@gmail.com> wrote: On 02/08/2015 04:30 PM, Neo Ande

Re: [sqlite] Porting SQLite to another operating system (not supported out of the box)

2015-02-10 Thread Dan Kennedy
On 02/11/2015 12:31 AM, Simon Slavin wrote: On 10 Feb 2015, at 5:01pm, Clemens Ladisch wrote: Janke, Julian wrote: In my opinion, this means, we must ""only"" write a VFS implementation for our target platform. What file API is there? It looks like a standard POXIS

Re: [sqlite] unreached code in sqlite3.c?

2015-02-12 Thread Dan Kennedy
On 02/12/2015 09:02 PM, Jens Miltner wrote: Hi, I'm getting the following two warnings when compiling sqlite3.c with the latest clang tools: sqlite3.c:116769:39: warning: code will never be executed [-Wunreachable-code] if( pTerm->wtFlags & TERM_VNULL ) continue;

Re: [sqlite] Sync journal's directory per transaction? or until database closed? in PERSIST mode

2016-05-26 Thread Dan Kennedy
On 05/25/2016 10:54 PM, 박병언 wrote: First of all, my English skill is not good. So please forgive me if my sentences are rude. I saw this is for anonymous user to report bug. I'm not sure If I need to write down my personal information. So I didn't write my name. If I need to, I'll send this

[sqlite] Segfault during FTS index creation from huge data

2015-04-04 Thread Dan Kennedy
On 04/03/2015 10:16 PM, Artem wrote: > Hi! > > The situation is like that. There?s a SQLite database with around 3 billion > records. Each record consists of a certain CHAR field and several other > additional fields with different types. The file size is approx. 340 gb. The > maximum content

[sqlite] Prevent database file from being overwritten by other processes

2015-04-08 Thread Dan Kennedy
On 04/08/2015 09:51 PM, R.Smith wrote: > > > On 2015-04-08 04:18 PM, Fabian Pr?bstl wrote: >> Hi there! >> >> Currently, we are using SQLite as our application file format for a >> Windows 7/C#/System.Data.SQLite based desktop application. We only >> allow one instance to open the file by

[sqlite] Prevent database file from being overwritten by other processes

2015-04-09 Thread Dan Kennedy
On 04/08/2015 10:52 PM, R.Smith wrote: > > > On 2015-04-08 05:38 PM, Dan Kennedy wrote: >> On 04/08/2015 09:51 PM, R.Smith wrote: >>> >>> >>> On 2015-04-08 04:18 PM, Fabian Pr?bstl wrote: >>>> Hi there! >>>> >>>> Current

[sqlite] fts5

2015-04-09 Thread Dan Kennedy
On 04/08/2015 04:49 AM, Scott Hess wrote: > On Thu, Sep 11, 2014 at 8:58 AM, Dan Kennedy wrote: >> Fts5 is still in the experimental stage at the moment. >> >> If anybody has any ideas for useful features, or knows of problems with FTS4 >> that could be fixed in FTS5,

[sqlite] Getting a crash on 32-bit Linux

2015-04-14 Thread Dan Kennedy
On 04/14/2015 10:00 PM, Ron Aaron wrote: > Just updated with the version from sqlite.org and have the same problem: The line numbers still don't match the 3.8.9 amalgamation on the website. Are you running [make sqlite3.c] yourself or downloading sqlite-amalgamation-3080900.zip or

[sqlite] Changing WAL mode for a transaction

2015-04-27 Thread Dan Kennedy
On 04/26/2015 07:01 PM, Navaneeth K N wrote: > Hello, > > My application runs the following right after opening the connection to the > database. > >pragma journal_mode=wal; >pragma page_size=4096 Did executing the "PRAGMA journal_mode=wal" statement succeed? Or did it return

[sqlite] Changing WAL mode for a transaction

2015-04-27 Thread Dan Kennedy
On 04/27/2015 12:55 PM, Navaneeth K N wrote: > Hi Dan, > > >> On 27-Apr-2015, at 10:52 am, Dan Kennedy wrote: >> >> On 04/26/2015 07:01 PM, Navaneeth K N wrote: >>> Hello, >>> >>> My application runs the following right after opening the

[sqlite] Segfault during FTS index creation from huge data

2015-04-29 Thread Dan Kennedy
On 04/29/2015 01:55 AM, Scott Robison wrote: > On Tue, Apr 28, 2015 at 7:08 AM, Hick Gunter wrote: > >> Getting "NoMem" sounds very much like a memory leak somewhere, with the >> most likely place being your own application, followed by the wrapper you >> are using, the FTS code and lastly the

[sqlite] Segfault during FTS index creation from huge data

2015-04-29 Thread Dan Kennedy
On 04/29/2015 02:03 AM, Dan Kennedy wrote: > On 04/29/2015 01:55 AM, Scott Robison wrote: >> On Tue, Apr 28, 2015 at 7:08 AM, Hick Gunter wrote: >> >>> Getting "NoMem" sounds very much like a memory leak somewhere, with the >>> most likely

[sqlite] Segfault during FTS index creation from huge data

2015-04-29 Thread Dan Kennedy
On 04/29/2015 05:27 AM, Artem wrote: > , Tim. > > ?? ?? 29 ?? 2015 ?., 1:21:00: > >> On 28 Apr 2015 at 23:14, Artem wrote: How about trying the sqlite3.exe command line utility. put your sql for that operation in a text file, launch the program, open the

[sqlite] Segfault during FTS index creation from huge data

2015-04-29 Thread Dan Kennedy
On 04/29/2015 03:39 PM, Scott Robison wrote: > On windows, malloc returns null if the allocation fails. Sqlite detects > this and returns an error. > > On linux, malloc may return a non null yet invalid pointer and only fail > when the memory is accessed because it wasn't really available. That

[sqlite] Changing WAL mode for a transaction

2015-04-29 Thread Dan Kennedy
On 04/29/2015 04:28 PM, Navaneeth K N wrote: > Hi Dan, > > >> On 27-Apr-2015, at 11:34 am, Dan Kennedy wrote: >> >> On 04/27/2015 12:55 PM, Navaneeth K N wrote: >>> Hi Dan, >>> >>> >>>> On 27-Apr-2015, at 10:52 am, Dan Ken

[sqlite] Segfault during FTS index creation from huge data

2015-04-30 Thread Dan Kennedy
On 04/30/2015 07:41 AM, Scott Robison wrote: > > I wrote up some test code today that definitely forces a SQLITE_NOMEM > condition, and there are no leaks (though there are a couple really large > outstanding allocations to force an error without needing to insert > gigabytes of data). > > In

[sqlite] Segfault during FTS index creation from huge data

2015-04-30 Thread Dan Kennedy
On 04/30/2015 02:08 PM, Dominique Pell? wrote: > Dan Kennedy wrote: > >> On 04/30/2015 07:41 AM, Scott Robison wrote: >>> >>> I wrote up some test code today that definitely forces a SQLITE_NOMEM >>> condition, and there are no leaks (though there ar

[sqlite] Bug in sqlite3_trace/trigger/delete

2015-08-03 Thread Dan Kennedy
On 07/31/2015 08:34 PM, sqlite-mail wrote: > Hello ! > > I'm using sqlite for a project and with this specific database > https://dev.dadbiz.es/tmp/odoo.db.zip (12MB compressed / 38MB uncompressed) > this is happening: > > -1 Registering an sqlite3_trace function when trying to delete a

[sqlite] Bug in sqlite3_trace/trigger/delete

2015-08-03 Thread Dan Kennedy
odoo.db and $ sqlite3 ./odoo.db "SELECT count(*) FROM res_users WHERE id = 7;" 0 Is this as expected? Dan. > Cheers ! > > Mon Aug 03 2015 13:08:08 CEST from "Dan Kennedy" > Subject: Re: [sqlite] Bug in > sqlite3_trace/trigger/delete >

[sqlite] MMAP performance with databases over 2GB

2015-08-07 Thread Dan Kennedy
On 08/06/2015 09:53 PM, Roger Binns wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > In my testing I am finding that using SQLite's mmap support with > larger databases (final db size is ~10GB) to create the database (WAL > mode) is considerably (about three times) slower than no mmap.

[sqlite] MMAP performance with databases over 2GB

2015-08-07 Thread Dan Kennedy
On 08/07/2015 12:35 AM, Roger Binns wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 08/06/2015 09:27 AM, Dan Kennedy wrote: >>> Is it using more CPU cycles in mmap mode or just taking longer? >>> If the former, does [time] attribute them to "user&

[sqlite] SQLite crash

2015-08-08 Thread Dan Kennedy
On 08/08/2015 04:11 AM, Robert Weiss wrote: > I observed the sqlite command shell version 3.8.11.1 to crash (exit to the > OSwithout an error message) while running in a Cygwin shell under Windows 7 > when I tried to create anindex. The source was compiled by gcc 4.9.2. The > same type of

[sqlite] SQLite crash

2015-08-11 Thread Dan Kennedy
On 08/11/2015 12:23 AM, Robert Weiss wrote: > Dan Kennedy-- > What address, precisely, should I use to send the database to you? When I > "reply" to your message I get the whole SQLite discussion group, which is > what I want to avoid (no offense intended, guys and gal

[sqlite] SQLite crash

2015-08-12 Thread Dan Kennedy
n > sysfer!FirstHookFunc () from /cygdrive/c/Windows/SysWOW64/SYSFER.DLL#1 > 0x in ?? () What does typing this command at the (gdb) prompt after the crash output? thread apply all where 15 Or, if that doesn't work, just "where 15". Thanks, Dan. > > >

[sqlite] Is it possible to have query planner use FTS Index for ORDER BY

2015-08-20 Thread Dan Kennedy
On 08/20/2015 12:38 PM, David Waters wrote: > I have a large FTS4 table (around 200 million rows and growing). A simple > query (SELECT * FROM main WHERE main MATCH 'data') returns in less than a > second. However, if an ORDER BY is added (SELECT * FROM main WHERE main > MATCH 'data' ORDER BY

[sqlite] When sqlite3_close() returns SQL_BUSY

2015-08-21 Thread Dan Kennedy
On 08/21/2015 12:30 PM, Jeff M wrote: > Sometimes my iOS app creates an unreasonable number of prepared statements > (perhaps 1,000, an app bug that I'm fixing). These prepared statements are > later finalized just prior to doing sqlite3_close(), which sometimes returns > SQL_BUSY. The docs

[sqlite] Potential for Segmentation Violation/Fault in sqlite 3.8.11.1

2015-08-26 Thread Dan Kennedy
On 08/25/2015 11:36 PM, Bill Parker wrote: > Hello All, > > In reviewing source code files in sqlite 3.8.11.1, I found some > instances of calls to Tcl_Alloc() which are not checked for a return > value of NULL, indicating failure in directory '/tea/generic', file > 'tclsqlite3.c'.

[sqlite] FTS5 Porter extra arguments not passed through

2015-08-01 Thread Dan Kennedy
On 07/31/2015 03:48 AM, Ralf Junker wrote: > As per the documentation, extra arguments to the Porter stemmer are > handed on to the underlying tokenizer: > > http://www.sqlite.org/docsrc/artifact/9eca0ea509ae3e4d?ln=544-546 > > Example syntax a few lines below: > >

[sqlite] Problem when upgrading from FTS3/4 to FTS5 modules (revisited)

2015-12-11 Thread Dan Kennedy
On 12/10/2015 05:15 AM, ajm at zator.com wrote: > Hi list: > > In a C++ Windows app that uses SQLite v. 3.9.1 and behaves well, I try change > the search engine from FTS3/4 modules to FTS5, by means off: > > 1. Define the directive > #define SQLITE_ENABLE_FTS5 1 > > 2.- Create the table: >

[sqlite] Problem when upgrading from FTS3/4 to FTS5 modules(revisited)

2015-12-11 Thread Dan Kennedy
> 1a.- Delete the previous table. > DROP TABLE IF EXIST ftsm > > This scheme work ok with the FST3/4 modules, but compiling with FTS5 gives an > erroro in 1a: "database disk image is malformed". > > Note that in previous attemps I believed that the problem was into try to > delete a ftsm table

[sqlite] Problem when upgrading from FTS3/4 to FTS5modules(revisited)

2015-12-11 Thread Dan Kennedy
On 12/11/2015 08:22 PM, ajm at zator.com wrote: >> Mensaje original >> De: Dan Kennedy >> Para: sqlite-users at mailinglists.sqlite.org >> Fecha: Fri, 11 Dec 2015 15:28:33 +0700 >> Asunto: Re: [sqlite] Problem when upgrading from FTS3/4 to >&

[sqlite] Problem when upgrading from FTS3/4 toFTS5modules(revisited)

2015-12-14 Thread Dan Kennedy
On 12/13/2015 08:05 PM, ajm at zator.com wrote: >> Mensaje original >> De: Dan Kennedy >> Para: sqlite-users at mailinglists.sqlite.org >> Fecha: Fri, 11 Dec 2015 22:54:45 +0700 >> Asunto: Re: [sqlite] Problem when upgrading from FTS3/4 >>

[sqlite] about attach database

2015-12-16 Thread Dan Kennedy
On 12/16/2015 12:51 PM, ??? wrote: > After testing the Sqlite3_open and ATTACH DATABASE, > I found that the attach database is slower than sqlite3_open. > there is attachment after the mail which includ the speed > information ( millisecond ). Hi, This mailing list

[sqlite] Index on computed value?

2015-12-16 Thread Dan Kennedy
On 12/16/2015 03:17 PM, Deon Brewis wrote: > Is it possible to have an index on a computer value? > > > E.g. I have a 40 byte value in one of my columns. I only want an index over > the first 4 bytes of it. > > > However, I don't really want to repeat those 4 bytes inside another column on > the

[sqlite] Malloc getting segmentation fault in sqlite

2015-12-24 Thread Dan Kennedy
On 12/24/2015 05:02 PM, santosh dasimanth wrote: > Hi All, > I am working on Sqlite in multi threaded environment on ARM v7 platform. > > I am facing problems with malloc() function returning segmentation fault. > The problem is not frequent but out of 100 times am getting this once. > > The

[sqlite] The Lock-Byte Page

2015-12-28 Thread Dan Kennedy
On 12/28/2015 05:08 AM, Olivier Mascia wrote: > Hello, > > I'm referring to paragraph 1.3 of https://www.sqlite.org/fileformat2.html > about the Lock-Byte page. > > From what I read, I understand those 2^9 bytes at offset 2^30, should they > exist, are set aside, untouched by SQLite nor the

[sqlite] Documentation Typo in FTS Example

2015-12-30 Thread Dan Kennedy
On 12/30/2015 03:57 PM, Casey Rodarmor wrote: > From https://sqlite.org/fts3.html: > > CREATE TABLE t2(id INTEGER PRIMARY KEY, a, b, c, d); > CREATE VIRTUAL TABLE t3 USING fts4(content="t2", b, c); > > INSERT INTO t2 VALUES(2, 'a b', 'c d', 'e f'); > INSERT INTO t2 VALUES(3, 'g h', 'i j', 'k l');

[sqlite] Waiting on RESERVED locks

2015-02-18 Thread Dan Kennedy
On 02/18/2015 06:53 AM, Tim Starling wrote: > We (Wikimedia) are observing SQLITE_BUSY errors in our integration > testing. The integration test consists of having a single browser > instance view a MediaWiki site which uses SQLite 3.8 for its backend. > The browser sends several parallel requests

[sqlite] sqlite vfs and wal mode

2015-02-23 Thread Dan Kennedy
On 02/23/2015 12:42 PM, J Decker wrote: > I see; the first part... > > " result of the pragma or the error message if the pragma fails" I missed > the or part... or rather missed the part before the or. > > On Sun, Feb 22, 2015 at 8:13 PM, J Decker wrote: > >> So now that I have the added

[sqlite] Is readline ubiquitous on 32-bit x86 Linux?

2015-02-25 Thread Dan Kennedy
The pre-built sqlite3 shell tool for x86 Linux available for download here: http://www.sqlite.org/download.html does not include readline support. Which makes it painful to use. Does anyone think that many systems would be affected if it dynamically linked against the system readline?

[sqlite] Weird FTS bugs (wrong, missing and false positive results)

2015-07-03 Thread Dan Kennedy
On 07/02/2015 09:24 PM, Kevin Benson wrote: > FTFY, you're welcome ;-) > Now *MAYBE* someone can read it and possibly reply. > > -- > -- >-- > --???-- > K e V i N > > On Thu, Jul 2, 2015 at 9:11 AM, wrote: > >> We use SQLite for indexing and searching the text

[sqlite] Weird FTS bugs (wrong, missing and false positive results)

2015-07-06 Thread Dan Kennedy
On 07/06/2015 07:23 PM, shuricksoft at ukr.net wrote: > > --- ? --- > ?? ????: "Dan Kennedy" > : 2 2015, 14:26:05 > > >> On 07/02/2015 09:24 PM, Kevin Benson wrote: >>> FTFY, you're welcome ;-) >> N

[sqlite] how to use fts5 ?

2015-07-16 Thread Dan Kennedy
On 07/16/2015 02:32 PM, Laurent Dami wrote: > Hi there, > > I'm interested in testing the fts5 extension, already documented > (https://www.sqlite.org/fts5.html) , but I didn't find any > instructions on how to compile it. I found the sources in ext/fts5, > but apparently there is a piece of

[sqlite] fts5 module does not build from the 3.8.11 release's source tarball

2015-07-28 Thread Dan Kennedy
On 07/28/2015 02:55 AM, Hinrichsen, John wrote: > Hi, > > I was not able to get the fts5 module to build from the versioned source > tarball for this release (http://www.sqlite.org/2015/sqlite-src-3081100.zip > ). Which step failed? > > I was able to 'make fts5.c' following the instructions

[sqlite] fts5 module does not build from the 3.8.11 release's source tarball

2015-08-01 Thread Dan Kennedy
was the error I got: >> >> fts5_main.c:30: error: redefinition of typedef 'Fts5Global' >> >> >> On Mon, Jul 27, 2015 at 4:00 PM, Dan Kennedy >> wrote: >> >>> On 07/28/2015 02:55 AM, Hinrichsen, John wrote: >>> >>>> Hi, >

[sqlite] Statistical SQLITE_BUSY_SNAPSHOT in WAL mode

2015-06-01 Thread Dan Kennedy
On 05/31/2015 04:11 AM, Simon Slavin wrote: > On 30 May 2015, at 9:59pm, Samuel Tebeka wrote: > >> I'm doing a BEGIN EXCLUSIVE before every write statement already, should I >> do it for read steatements as well? > It's worth a try. I'm not sure what's wrong here, I'm just hoping we find a >

[sqlite] FTS5

2015-06-03 Thread Dan Kennedy
On 05/15/2015 02:37 PM, Milan K??? wrote: > Hello, > I've found that SQLite is preparing new FTS5 extension, which could be > better than current FTS3/4. > If it is still in development, I would like to propose one more > change. In our project we would need possibility to specify which columns

[sqlite] Newbie issue - Linux error malloc.c:2372: sysmalloc: Assertion `(old_top == (((mbinptr) (((char *)

2015-06-06 Thread Dan Kennedy
On 06/06/2015 03:19 AM, George wrote: > Hello everyone, > > I am new to the list. I am working on an application in which I will be > embedding SQLite as the database engine. The application is written in > C. > > I am currently having an issue which I am not able to resolve at the > moment so I

[sqlite] DROP statement on Virtual Tables

2015-06-09 Thread Dan Kennedy
On 06/09/2015 04:46 PM, Samuel Debionne wrote: > Hello, > > AFAIU, when executing a drop statement on a virtual table, the XConnect > callback is executed first, then XDestroy. > > Now I have the following scenario where my virtual table is related to a > file (say a CSV file): > > 1. Create the

[sqlite] DROP statement on Virtual Tables

2015-06-10 Thread Dan Kennedy
On 06/10/2015 03:28 PM, Samuel Debionne wrote: > Thank you for your thoroughful answers ! > > Following your advices, I have split XCreate and xConnect > implementations, the first enforces the existence of the resource while > the later returns SQLITE_OK even if the resource is missing. > >> The

[sqlite] Virtual tables/xBestIndex: Is this a bug?

2015-06-11 Thread Dan Kennedy
On 06/11/2015 03:49 AM, Eric Hill wrote: > Is it a bug that SQLite changes the order of the constraints passed to > xBestIndex based merely on the order of the ON clause, when SQL (AFAIK) says > nothing about what the order of the ON clause should be? No. The order is undefined. However, it is

[sqlite] Contstant WHERE terms still require table scan?

2015-06-12 Thread Dan Kennedy
On 06/12/2015 05:45 PM, nomad at null.net wrote: > On Fri Jun 12, 2015 at 09:49:29AM +, Hick Gunter wrote: >> Seems the correct code is already generated... > Thanks Hick, that shows a bit more detail I didn't think to look for. > It seems that this only works for bind values, as the

  1   2   3   4   5   6   7   8   9   10   >