[sqlite] Draft Documentation small fixes

2018-09-12 Thread R Smith
In the paragraph explaining: SQLITE_FCNTL_DATA_VERSION found here: https://www.sqlite.org/draft/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntldataversion (Suggested edits indicated like *this*) ...// The sqlite3_total_changes()

Re: [sqlite] SQLITE touches unchanged expression indexes on update

2018-09-12 Thread Keith Medcalf
Interesting ... I get different output with explain comments enabled: addr opcode p1p2p3p4 p5 comment - - -- - 0 Init 0 41000 Start at 41 1 Null

Re: [sqlite] SQLITE touches unchanged expression indexes on update

2018-09-12 Thread David Raymond
A little weird and definitely differet, what version are you using and how are you compiling it? I checked with the precompiled Windows binary to make sure it wasn't something weird from my compilation, and it looks pretty close to my original, but different. So now I'm wondering where the

Re: [sqlite] SQLITE touches unchanged expression indexes on update

2018-09-12 Thread Deon Brewis
Sorry guys, I was using 3.17 for the output of the email (we're not actually using that in our product - I accidentally used an old sqlite3.exe to paste it in here). However, it still repros on 3.24 - it just looks different. See my latest mail to Richard with the updated opcodes and the

[sqlite] foreign_keys = 0N with Entity Framework 6.2.0

2018-09-12 Thread Urs Wagner
The following code is returning 0. Why? var objectContext = ((IObjectContextAdapter) this).ObjectContext; objectContext.ExecuteStoreCommand("PRAGMA foreign_keys = ON;"); var foreignKeys = objectContext.ExecuteStoreQuery("PRAGMA foreign_keys;").First(); I explicitely

Re: [sqlite] SQLITE touches unchanged expression indexes on update

2018-09-12 Thread Deon Brewis
Thanks a lot! I've just noticed it also has the same behavior for partial indexes. Here is an explain with a partial index (and using a later build this time for my output...). CREATE TABLE Foo(x, y, z); CREATE INDEX FooX on Foo(x); CREATE INDEX FooZ on Foo(z); CREATE INDEX FooLenZ on

[sqlite] sqlite3_get_autocommit() changes value when sqlite3_step() returns SQLITE_BUSY

2018-09-12 Thread Nic Ramage
Hi, I think I have found a regression/bug in Sqlite with respect to the sqlite3_get_autocommit() function. Sometimes, when multiple connections are used in multiple threads, sqlite3_get_autocommit() reports that the connection has a transaction open (i.e. not in auto commit mode), even though

Re: [sqlite] foreign_keys = 0N with Entity Framework 6.2.0

2018-09-12 Thread Simon Slavin
On 12 Sep 2018, at 2:04pm, Urs Wagner wrote: > The following code is returning 0. Why? Which version of SQLite ? You coerce the result of the call into an integer. Can you make the call and display (or use a debugger to see) exactly what it's returning ? If you do "PRAGMA compile_options"

Re: [sqlite] SQLITE touches unchanged expression indexes on update

2018-09-12 Thread Keith Medcalf
The version is the current tip of trunk, compiler is MinGW GCC 8.1.0 (on Windows 10) ... with the following options defined: #define _WIN32_WINNT 0x0600 #define WINVER _WIN32_WINNT #define SQLITE_DEFAULT_CACHE_SIZE 262144 // 1 GB #define SQLITE_DEFAULT_TEMP_CACHE_SIZE

Re: [sqlite] SQLITE touches unchanged expression indexes on update

2018-09-12 Thread David Raymond
Whoa, all sorts of undocumented stuff. Where did you find all these and what they do? Not seen on https://www.sqlite.org/compile.html (But are seen in 3.24 amalgamation): SQLITE_DEFAULT_PROXYDIR_PERMISSIONS SQLITE_DEFAULT_RECURSIVE_TRIGGERS SQLITE_ENABLE_COSTMULT SQLITE_ENABLE_CURSOR_HINTS

Re: [sqlite] SQLITE touches unchanged expression indexes on update

2018-09-12 Thread Keith Medcalf
>SQLITE_DEFAULT_PROXYDIR_PERMISSIONS Applicable to Unix only. Sets the >permissions that will be used when certain kinds of directories are created. >SQLITE_DEFAULT_RECURSIVE_TRIGGERS Sets the default for the recursive_triggers >pragma (the default is 0 or off). >SQLITE_ENABLE_COSTMULT

Re: [sqlite] SQLITE touches unchanged expression indexes on update

2018-09-12 Thread Keith Medcalf
For more information than you could ever want about how Windows does time and timers, see http://www.windowstimestamp.com/description --- The fact that there's a Highway to Hell but only a Stairway to Heaven says a lot about anticipated traffic volume. >-Original Message- >From:

[sqlite] Draft Geopoly docs

2018-09-12 Thread Jake Thaw
The following typos exist in the draft Geopoly docs: 3.9 "new polygon that is a affine transformation" -> "new polygon that is an affine transformation" 4.1 "each dimension of each coordinate is of 32-byte floating point number" -> "each dimension of each coordinate is a 32-bit floating point

Re: [sqlite] SQLITE touches unchanged expression indexes on update

2018-09-12 Thread David Raymond
Just showing with "explain comments" enabled. sqlite> explain update foo set x = 1 where rowid = 1; addr opcode p1p2p3p4 p5 comment - - -- - 0 Init 0 33000

Re: [sqlite] SQLITE touches unchanged expression indexes on update

2018-09-12 Thread Richard Hipp
On 9/11/18, Deon Brewis wrote: > It seems like there is an opportunity for improvement on updates if an index > contains expressions. Thanks for bringing this to our attention. We're on lockdown for the 3.25.0 release (bug fixes only) but I did start looking at this to see how feasible it would

Re: [sqlite] Draft: Window Functions

2018-09-12 Thread Richard Hipp
Tnx for the report. Fixed now. On 9/12/18, no...@null.net wrote: > In https://www.sqlite.org/draft/windowfunctions.html: > > "Window functions may only appears in the result set and..." > > s/appears/appear/ > > > "If default is also provided, then it is returned instead of NULL >

Re: [sqlite] Draft Documentation small fixes

2018-09-12 Thread Richard Hipp
Tnx for the report. Fixed now. On 9/12/18, R Smith wrote: > In the paragraph explaining: SQLITE_FCNTL_DATA_VERSION found here: > https://www.sqlite.org/draft/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntldataversion > > (Suggested edits indicated like *this*) > > ...// The

[sqlite] Draft: Window Functions

2018-09-12 Thread nomad
In https://www.sqlite.org/draft/windowfunctions.html: "Window functions may only appears in the result set and..." s/appears/appear/ "If default is also provided, then it is returned instead of NULL if row identified by offset does not exist." s/if row/if the row/# 2 places -