Re: [sqlite] Getting an advance list of RowIDs for a query result set

2017-11-27 Thread x
>Thanks to you, this topic has inspired a useful change or changes. Wow. Glad I could help. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] Assert failure line 72132, function: valueFromExpr

2017-11-27 Thread nomad
[version sqlite-snapshot-201711181730] I am seeing an error when attempting to insert a row with SQLITE_DEBUG enabled: assertion "0" failed: file "sqlite3.c", line 72132, function: valueFromExpr Running "PRAGMA vdbe_addoptrace=ON" immediately before the insert produces the following 1

Re: [sqlite] Assert failure line 72132, function: valueFromExpr

2017-11-27 Thread Richard Hipp
On 11/27/17, no...@null.net wrote: > [version sqlite-snapshot-201711181730] > > I am seeing an error when attempting to insert a row with > SQLITE_DEBUG enabled: > > assertion "0" failed: file "sqlite3.c", line 72132, function: > valueFromExpr > I am unable to reproduce the

Re: [sqlite] Assert failure line 72132, function: valueFromExpr

2017-11-27 Thread Richard Hipp
Please send a test case. You can send it directly to me at d...@sqlite.org if you like. On 11/27/17, no...@null.net wrote: > [version sqlite-snapshot-201711181730] > > I am seeing an error when attempting to insert a row with > SQLITE_DEBUG enabled: > > assertion "0" failed:

Re: [sqlite] Getting an advance list of RowIDs for a query result set

2017-11-27 Thread E.Pasma
So if I build a view that includes look-ups in other tables, the optimizer may skip these at places where not selected. However only if the look-ups are written as outer joins. Then it may be good practice allways doing that. For instance: create view vtrack as select trackname,

Re: [sqlite] Need SQLite datafiles to be locked on OS level (Windows)

2017-11-27 Thread Jiří Matějka
Thanks for your responses. Actually we have two problems: a) "database is locked" which in majority comes from sqlite3_step doing BEGIN IMMEDIATE which indeed is obtaining a write lock Basically we have just one connection per one datafile except one case when we have two connections for one

Re: [sqlite] Need SQLite datafiles to be locked on OS level (Windows)

2017-11-27 Thread Simon Slavin
On 27 Nov 2017, at 12:41pm, Jiří Matějka wrote: > We have no busy timeout set because we use System.Data.SQlite library which > has its own waiting mechanism (repeating the sqlite3_reset/sqlite3_step > within 30 secons). I’m hoping that Joe Mistachkin, or someone else

Re: [sqlite] Need SQLite datafiles to be locked on OS level(Windows)

2017-11-27 Thread Joe Mistachkin
Simon Slavin wrote: > > I'm hoping that Joe Mistachkin, or someone else who understands > that library sees this, just to check that it works the way > you're expecting it to. > Judging from the description so far, I think that both SQLite and System.Data.SQLite are working correctly. It is

Re: [sqlite] Assert failure line 72132, function: valueFromExpr

2017-11-27 Thread Richard Hipp
On 11/27/17, no...@null.net wrote: > > assertion "0" failed: file "sqlite3.c", line 72132, function: > valueFromExpr > This should be fixed in the latest Pre-release Snapshot, uploaded moments ago. -- D. Richard Hipp d...@sqlite.org

Re: [sqlite] Assert failure line 72132, function: valueFromExpr

2017-11-27 Thread Richard Hipp
On 11/27/17, Richard Hipp wrote: > I am unable to reproduce the problem. Dan suggested that I needed to enable foreign keys, and that did indeed enable me to repro the problem. -- D. Richard Hipp d...@sqlite.org ___ sqlite-users

Re: [sqlite] Need SQLite datafiles to be locked on OS level(Windows)

2017-11-27 Thread Simon Slavin
On 27 Nov 2017, at 4:51pm, Joe Mistachkin wrote: > Judging from the description so far, I think that both SQLite and > System.Data.SQLite are working correctly. > > It is true that System.Data.SQLite has an internal retry mechanism > that will wait 150ms between retries.

Re: [sqlite] Need SQLite datafiles to be locked on OS level(Windows)

2017-11-27 Thread Nelson, Erik - 2
Simon Slavin wrote on Monday, November 27, 2017 12:39 PM > Subject: Re: [sqlite] Need SQLite datafiles to be locked on OS level(Windows) > > On 27 Nov 2017, at 4:51pm, Joe Mistachkin wrote: > > > Judging from the description so far, I think that both SQLite and > >

Re: [sqlite] Need SQLite datafiles to be locked on OS level(Windows)

2017-11-27 Thread David Raymond
You sir win the quote award for today. -Original Message- From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Nelson, Erik - 2 Sent: Monday, November 27, 2017 12:50 PM To: SQLite mailing list Subject: Re: [sqlite] Need SQLite datafiles to be locked on OS

Re: [sqlite] Getting an advance list of RowIDs for a query result set

2017-11-27 Thread x
>So if I build a view that includes look-ups in other tables, the >optimizer may skip these at places where not selected. However only if >the look-ups are written as outer joins. Then it may be good practice >allways doing that. For instance: >create view vtrack as >select trackname, artistname

Re: [sqlite] sqlite3_get_auxdata() defect

2017-11-27 Thread petern
>The auxdata is intended as a cache, so it must depend only on the >argument value, not on any other state. I'm not following. Where is the argument different in my example. The zeroth argument is always 'x'. Are you saying the argument has to be the same memory location as well as the same

Re: [sqlite] Assert failure line 72132, function: valueFromExpr

2017-11-27 Thread nomad
On Mon Nov 27, 2017 at 10:53:50AM -0500, Richard Hipp wrote: > On 11/27/17, Richard Hipp wrote: > > > I am unable to reproduce the problem. > > Dan suggested that I needed to enable foreign keys, and that did > indeed enable me to repro the problem. Glad to hear that. I was

Re: [sqlite] sqlite3_get_auxdata() defect

2017-11-27 Thread petern
Clemens. Here it that example again, but with the argument factored out so there is no question about value or memory location of the cache argument target. Remarkably, caching doesn't work at all when one does this! sqlite> WITH arg(x) AS (SELECT 'x'), t(id) AS (VALUES(1),(2)) SELECT

Re: [sqlite] Getting an advance list of RowIDs for a query result set

2017-11-27 Thread E.Pasma
Op 27 nov 2017, om 20:51 heeft x het volgende geschreven: So if I build a view that includes look-ups in other tables, the optimizer may skip these at places where not selected. However only if the look-ups are written as outer joins. Then it may be good practice allways doing that. For

Re: [sqlite] sqlite3_get_auxdata() defect

2017-11-27 Thread Stadin, Benjamin
Hi Clemens, Even though the documentation makes no guaranty about the lifetime, it is was also for me rather useless. I need to do some spatial calculations in my custom SQL function, and use the proj4 projection library within it. This SQL function is called very often, and having to

[sqlite] Any chance of exposing INTEGER PRIMARY KEY metadata? Needed by many tools

2017-11-27 Thread Peter Halasz
Disclaimer: I am not a developer on linq2db. Nor am I a developer on "DB Browser for SQLite", nor am I a developer of any of the other tools which help developers create SQLite databases and integrate them with their projects through UIs and APIs built on SQLite and its metadata. However, it's

Re: [sqlite] sqlite3_get_auxdata() defect

2017-11-27 Thread Clemens Ladisch
petern wrote: > Evidently the sqlite3_get_auxdata() API is very buggy. The documentation says that | under some circumstances the associated metadata may be preserved. You have found circumstances where the metadata is not preserved. This is not a bug. I can see that you are unhappy, but that

Re: [sqlite] sqlite3_get_auxdata() defect

2017-11-27 Thread petern
Clemens, Indeed. It doesn't work as a basis for reliable performance improvement of user code. Basically, that API is practically useless except for the narrow in-house use case for which it was created. And yes, I already make heavy use of the natural aggregate cache functionality but for the

Re: [sqlite] sqlite3_get_auxdata() defect

2017-11-27 Thread Clemens Ladisch
petern wrote: > So, at the very least, the documentation at > https://sqlite.org/c3ref/get_auxdata.html is woefully incomplete because: > > 1. The identical function in a different column of the same SELECT has a > separate meta-data cache. This is an implementation detail of the current version.

Re: [sqlite] "BIGINT" doesn't act like INTEGER on table creation [Bug]

2017-11-27 Thread Eduardo
On Thu, 23 Nov 2017 17:35:08 -0700 "Keith Medcalf" escribió: > > That is correct. You cannot spell "INTEGER PRIMARY KEY", which is an > explicit alias for the rowid, as anything other than that one particular > correct spelling. > > Personally, I have never found a use

Re: [sqlite] How to use sqlite3_table_column_metadata?

2017-11-27 Thread Bart Smissaert
> My advise to the VB guy would be to load the extension instead of trying to get VB to marshal pointers from the C API. ?? I do load the extension although it is compiled std_call, so VB6 can talk to it. RBS On Mon, Nov 27, 2017 at 12:59 AM, petern wrote: > I

Re: [sqlite] [EXTERNAL] Re: "BIGINT" doesn't act like INTEGER on table creation [Bug]

2017-11-27 Thread Hick Gunter
Sorry to rain on your parade, but " The sqlite_sequence table does not track ROWID changes associated with UPDATE statement, only INSERT statements.", so if you change the (auto-generated) rowid, your "row age to row id" relation no longer holds. Same goes for updating the sqlite_sequence entry

Re: [sqlite] Getting an advance list of RowIDs for a query result set

2017-11-27 Thread x
From: E.Pasma Sent: 26 November 2017 17:30 To: SQLite mailing list Subject: Re: [sqlite] Getting an advance list of RowIDs for a query result set >If step 3 is xxx-ed and only left-joins remain to be considered then >the

Re: [sqlite] Getting an advance list of RowIDs for a query result set

2017-11-27 Thread E.Pasma
x wrote: From: E.Pasma Sent: 26 November 2017 17:30 To: SQLite mailing list Subject: Re: [sqlite] Getting an advance list of RowIDs for a query result set If step 3 is xxx-ed and only left-joins remain to be

Re: [sqlite] How to use sqlite3_table_column_metadata?

2017-11-27 Thread Bart Smissaert
One strange thing I noticed with this: If I pass a valid connection and valid table name but null for all other input parameters I get: return value: 0 data type: INTEGER collation: BINARY not null: 0 part of primary key: 1

Re: [sqlite] Any chance of exposing INTEGER PRIMARY KEY metadata? Needed by many tools

2017-11-27 Thread Simon Slavin
On 28 Nov 2017, at 12:38am, Peter Halasz wrote: > Please can SQLite developers make the ROW ID status of a field visible in > future versions? If it’s cone, the obvious place would be to add a column to Can you not

Re: [sqlite] Any chance of exposing INTEGER PRIMARY KEY metadata? Needed by many tools

2017-11-27 Thread Keith Medcalf
>Can you not deduce what you want using sqlite_sequence, as described >in section 2.6.1 of > >? This allows you to distinguish a primary key which happens to be >an integer from an |NTEGER PRIMARY KEY. No it does not. It only

Re: [sqlite] How to use sqlite3_table_column_metadata?

2017-11-27 Thread petern
Hi Bart. Questions like that can be answered by looking at the body of the function in your copy of the source code. In this case, the call will accept null column name and then later set default values for fields like so: if( pCol ){ zDataType = sqlite3ColumnType(pCol,0); zCollSeq =