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

2017-09-12 Thread Clemens Ladisch
Howard Kapustein wrote: > /* Try to truncate the WAL file to zero bytes if the checkpoint > ** completed and fsynced (rc==SQLITE_OK) and we are in persistent > ** WAL mode (bPersist) and if the PRAGMA journal_size_limit is a > ** non-negative value

Re: [sqlite] Intel 17

2017-09-12 Thread Clemens Ladisch
Dominique Devienne wrote: > sqlite3.c(17654): error #265: floating-point operation result is out of range Could this error be reduced to a warning? > // around line 17644 > - result = 1e308*1e308*s; /* Infinity */ > + result = 1e308*(1e308*s); /* Infinity */ C99 7.12 () says: | 4 The macro

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] Common subexpression optimization of deterministic functions

2017-09-12 Thread raypoker79
Stop,,I'm not subscribed  Sent via the Samsung Galaxy S7, an AT 4G LTE smartphone Original message From: Warren Young Date: 9/12/17 6:19 PM (GMT-05:00) To: SQLite mailing list Subject: Re: [sqlite] Common

Re: [sqlite] SQLite list spam from raypoker79

2017-09-12 Thread Richard Hipp
Thanks for reporting this, Darren. I didn't see it because those emails went straight into my spam folder. I don't know how they got through, because raypoke...@yahoo.com is not a subscriber, and new subscription requests are moderated. If anybody else is seeing these emails, and/or has advice

Re: [sqlite] SQLite list spam from raypoker79

2017-09-12 Thread Simon Slavin
On 13 Sep 2017, at 12:55am, Richard Hipp wrote: > If anybody else is seeing these emails, and/or has advice on how I can > stop them, please send me private email. No messages from that address reached me. My spam/junk/trash system has full logging and that email address

Re: [sqlite] Seeking advice on improving batch sql update performance on zipvfs

2017-09-12 Thread Yue
Hello, Thanks for your advice! It works pretty well when I dropped the rowid and set the other field as primary key. I also enable wal mode at the cost of a little bit read performance. Overall, it works really well now. Really appreciate your help. -- Sent from:

Re: [sqlite] SQLite list spam from raypoker79

2017-09-12 Thread Darko Volaric
Is it possible that the spammer got a hold of the subscriber list? > On Sep 13, 2017, at 1:55 AM, Richard Hipp wrote: > > Thanks for reporting this, Darren. I didn't see it because those > emails went straight into my spam folder. > > I don't know how they got through,

Re: [sqlite] Seeking advice on improving batch sql update performance on zipvfs

2017-09-12 Thread Yue
Thanks for the advice! I could never thought about this. Really learnt a lot. It's a customized Android phone type device. -- Sent from: http://sqlite.1065341.n5.nabble.com/ ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] SQLite list spam from raypoker79

2017-09-12 Thread Darren Duncan
On 2017-09-12 6:56 PM, Darko Volaric wrote: Is it possible that the spammer got a hold of the subscriber list? My quick analysis of mail headers showed that the messages passed through the mailing list, or at least 3-4 mail relays in a row closest to my end were the same as for a legitimate

Re: [sqlite] Common subexpression optimization of deterministic functions

2017-09-12 Thread Warren Young
On Sep 12, 2017, at 2:36 PM, Jens Alfke wrote: > > On Sep 12, 2017, at 12:58 PM, Warren Young wrote: >> >> Could it be *extended* to mean what you want? Of course, but that means >> you’re asking for a feature, not reporting a bug. > > I never claimed

Re: [sqlite] SQLite list spam from raypoker79

2017-09-12 Thread Jim Borden
For what it is worth, those messages reached my inbox twice on two different threads at least. Jim Borden Software Engineer jim.bor...@couchbase.com On 2017/09/13 9:02, "sqlite-users on behalf of Simon Slavin"

Re: [sqlite] Intel 17

2017-09-12 Thread Clemens Ladisch
Richard Hipp wrote: > Please try the latest trunk version of SQLite and let me know if it > works for you. I don't have the Intel compiler, but the sign is missing: SELECT CAST('-1e359' AS NUMBER), CAST('-1e360' AS NUMBER); -Inf|Inf I take everything back and state the opposite: I guess an

Re: [sqlite] Intel 17

2017-09-12 Thread Richard Hipp
On 9/12/17, Clemens Ladisch wrote: > Richard Hipp wrote: >> Please try the latest trunk version of SQLite and let me know if it >> works for you. > > I don't have the Intel compiler, but the sign is missing: > > SELECT CAST('-1e359' AS NUMBER), CAST('-1e360' AS NUMBER); >

Re: [sqlite] SQLite 3.20, are you sure?

2017-09-12 Thread Richard Hipp
On 9/12/17, p...@arbolone.ca wrote: > I have a file named SQLite3.dll, but I don't know which sqlite version it > is. Any help on how to finding that out?TIA Right-click on the file. Select "Properties" -- D. Richard Hipp d...@sqlite.org

Re: [sqlite] Intel 17

2017-09-12 Thread Dominique Devienne
On Tue, Sep 12, 2017 at 8:47 AM, Clemens Ladisch wrote: > Dominique Devienne wrote: > > sqlite3.c(17654): error #265: floating-point operation result is out of > range > > Could this error be reduced to a warning? > Probably. We typically compile with a strict

[sqlite] SQLite 3.20, are you sure?

2017-09-12 Thread papa
I have a file named SQLite3.dll, but I don't know which sqlite version it is. Any help on how to finding that out?TIA ArbolOne.caUsing Fire Fox and Thunderbird.ArbolOne is composed of students and volunteers dedicated to providing free services to charitable organizations.ArbolOne on Java

Re: [sqlite] Common subexpression optimization of deterministic functions

2017-09-12 Thread Jens Alfke
> On Sep 12, 2017, at 11:09 AM, Warren Young wrote: > > From my reading of the docs, I don’t see that that is the purpose of > SQLITE_DETERMINISTIC: > >https://www.sqlite.org/deterministic.html > Actually it is. "A

Re: [sqlite] Table-valued function crashing in SQLite 3.20

2017-09-12 Thread Richard Hipp
On 9/12/17, Jens Alfke wrote: > > >> On Sep 11, 2017, at 4:20 PM, Richard Hipp wrote: >> >> Does it work on trunk? > > I downloaded "sqlite-snapshot-201708251543.tar.gz”, used the included > sqlite3.{c,h}, and got exactly the same crash. > The proposed fix

Re: [sqlite] Common subexpression optimization of deterministic functions

2017-09-12 Thread Jens Alfke
> On Sep 12, 2017, at 12:02 PM, Darren Duncan wrote: > > Practically speaking any optimization to reduce actual calls to the > deterministic function would have to be at compile time to rewrite the query > to explicitly keep the result of the function and use it

Re: [sqlite] Common subexpression optimization of deterministic functions

2017-09-12 Thread Jens Alfke
> On Sep 12, 2017, at 10:52 AM, Richard Hipp wrote: > > ... WHERE fl_value(body,'contact.address.state') IN ('CA','WA'); This was just a simple example query. In general it's possible to have arbitrary queries that use arbitrary properties. For example it might be

[sqlite] SQLITE_DETERMINISTIC sticky in sqlite3_create_function?

2017-09-12 Thread Nelson, Erik - 2
If I'm redefining a user-defined function as SQLITE_DETERMINISTIC before each query, will the function still get called for subsequent queries? For example, if I had void user_func(sqlite3_context *context, int argc, sqlite3_value **argv){ return random() } sqlite3_create_function(db,

Re: [sqlite] SQLite 3.20, are you sure?

2017-09-12 Thread Papa
Outch, that was not a very smart question, sorry folks for the maluse (this is my own word, mal-use) of the bandwidth. :-[ On 2017-09-12 9:11 AM, Richard Hipp wrote: On 9/12/17, p...@arbolone.ca wrote: I have a file named SQLite3.dll, but I don't know which sqlite version

Re: [sqlite] Common subexpression optimization of deterministic functions

2017-09-12 Thread Richard Hipp
On 9/12/17, Jens Alfke wrote: > SQLite 3.19 doesn’t seem to coalesce identical calls to a deterministic > function. For example, in this query, where `fl_value` is a function I’ve > registered as SQLITE_DETERMINISTIC: > > SELECT key FROM kv_default > WHERE fl_value(body,

Re: [sqlite] Common subexpression optimization of deterministic functions

2017-09-12 Thread Warren Young
On Sep 12, 2017, at 11:25 AM, Jens Alfke wrote: > > SQLite 3.19 doesn’t seem to coalesce identical calls to a deterministic > function. For example, in this query, where `fl_value` is a function I’ve > registered as SQLITE_DETERMINISTIC: From my reading of the docs, I

Re: [sqlite] Common subexpression optimization of deterministic functions

2017-09-12 Thread Darren Duncan
On 2017-09-12 11:41 AM, Jens Alfke wrote: On Sep 12, 2017, at 11:09 AM, Warren Young wrote: From my reading of the docs, I don’t see that that is the purpose of SQLITE_DETERMINISTIC: https://www.sqlite.org/deterministic.html

Re: [sqlite] Common subexpression optimization of deterministic functions

2017-09-12 Thread Jens Alfke
> On Sep 12, 2017, at 1:41 PM, Darko Volaric wrote: > > You can implement this by using user defined functions to implement row > "local variables" or "registers". They're single assignment storage that > keeps intermediate results, namely the common subexpressions. Thanks!

Re: [sqlite] Common subexpression optimization of deterministic functions

2017-09-12 Thread Jens Alfke
> On Sep 12, 2017, at 12:55 PM, Richard Hipp wrote: > > But we deliberately omit common subexpression elimination (CSE). This > is because our research shows that out of the millions of queries that > SQLite compiles every second, only a very tiny fraction would actually >

Re: [sqlite] Common subexpression optimization of deterministic functions

2017-09-12 Thread Jens Alfke
> On Sep 12, 2017, at 12:58 PM, Warren Young wrote: > > Could it be *extended* to mean what you want? Of course, but that means > you’re asking for a feature, not reporting a bug. I never claimed to be reporting a bug! The subject line refers to this as an

Re: [sqlite] Common subexpression optimization of deterministic functions

2017-09-12 Thread Darko Volaric
You can implement this by using user defined functions to implement row "local variables" or "registers". They're single assignment storage that keeps intermediate results, namely the common subexpressions. You'd define two functions, something like Get(rowid, name) and Set(rowid, name,

Re: [sqlite] Common subexpression optimization of deterministic functions

2017-09-12 Thread Richard Hipp
On 9/12/17, Jens Alfke wrote: > > I realize SQLite doesn't have the kind of industrial-strength query > optimizers that other SQL databases have, but (from an outside perspective) > this seems like a fairly straightforward optimization. SQLite is already > doing some similar

Re: [sqlite] Common subexpression optimization of deterministic functions

2017-09-12 Thread Warren Young
On Sep 12, 2017, at 12:41 PM, Jens Alfke wrote: > >> On Sep 12, 2017, at 11:09 AM, Warren Young wrote: >> >> From my reading of the docs, I don’t see that that is the purpose of >> SQLITE_DETERMINISTIC: >> >> https://www.sqlite.org/deterministic.html

Re: [sqlite] Table-valued function crashing in SQLite 3.20

2017-09-12 Thread Jens Alfke
> On Sep 12, 2017, at 10:50 AM, Richard Hipp wrote: > > The proposed fix for your problem is from 20170904 - > https://www.sqlite.org/src/info/c7f9f47b239fdd99 > > > I have uploaded a new snapshot for you. Thanks, this does

Re: [sqlite] SQLITE_DETERMINISTIC sticky in sqlite3_create_function?

2017-09-12 Thread Jens Alfke
> On Sep 12, 2017, at 12:23 PM, Nelson, Erik - 2 > wrote: > >> select user() > .54 <-- should this result be the same as the previous call to user()? Or > would it get evaluated once after each sqlite3_create_function() call? It gets evaluated whenever the

Re: [sqlite] Table-valued function crashing in SQLite 3.20

2017-09-12 Thread Jens Alfke
> On Sep 12, 2017, at 1:00 PM, Jens Alfke wrote: > > Thanks, this does look like exactly the same bug. > But the latest snapshot at http://www.sqlite.org/download.html >

Re: [sqlite] Common subexpression optimization of deterministic functions

2017-09-12 Thread raypoker79
This is a scam please take me off this email the card has been reported stolen  Sent via the Samsung Galaxy S7, an AT 4G LTE smartphone Original message From: Darko Volaric Date: 9/12/17 4:41 PM (GMT-05:00) To: SQLite mailing list

Re: [sqlite] Table-valued function crashing in SQLite 3.20

2017-09-12 Thread raypoker79
This is a scam and has been reported to attorney General and will be filing complaint with bbb,,I did not request this and habe cancelled all cards  Sent via the Samsung Galaxy S7, an AT 4G LTE smartphone Original message From: Jens Alfke Date: 9/12/17

Re: [sqlite] Common subexpression optimization of deterministic functions

2017-09-12 Thread Darko Volaric
Yeah that is a tricky bit, especially since the query optimizer might evaluate join expressions in an arbitrary order. A possible approach to this is to work out how to always get a particular expression evaluated first (that may well just be the left-most expression in the WHERE clause) then

Re: [sqlite] Intel 17

2017-09-12 Thread Richard Hipp
On 9/11/17, Dominique Devienne wrote: > FYI, here are the modifications we did to a 3.19.3 amalgamation to build > with the Intel 17 compiler. Note that we have a few modifs of our own, so > line numbers might be off. --DD Please try the latest trunk version of SQLite and

Re: [sqlite] SQLite 3.20, are you sure?

2017-09-12 Thread David Raymond
Not a waste of time. It being in the properties tab is nice with the pre-compiled versions. I checked, and my self-compiled version does not have that nifty metadata. I guess I should look up on how to add that in the compiler. (And remember to update it) So if that's missing is the other way

Re: [sqlite] Table-valued function crashing in SQLite 3.20

2017-09-12 Thread Jens Alfke
> On Sep 11, 2017, at 4:20 PM, Richard Hipp wrote: > > Does it work on trunk? I downloaded "sqlite-snapshot-201708251543.tar.gz”, used the included sqlite3.{c,h}, and got exactly the same crash. —Jens ___ sqlite-users mailing list

[sqlite] Common subexpression optimization of deterministic functions

2017-09-12 Thread Jens Alfke
SQLite 3.19 doesn’t seem to coalesce identical calls to a deterministic function. For example, in this query, where `fl_value` is a function I’ve registered as SQLITE_DETERMINISTIC: SELECT key FROM kv_default WHERE fl_value(body, 'contact.address.state') = 'CA' OR fl_value(body,