Re: [sqlite] Bug: float granularity breaking unique contraint?

2018-11-01 Thread David Empson
> On 2/11/2018, at 8:23 AM, James K. Lowden wrote: > > On Wed, 31 Oct 2018 23:05:19 -0300 > Bernardo Sulzbach wrote: > >> So if you are inserting integers >> into a real column, you are going to store integers. However, when you >> select from it they are presented as reals and mix up (looking

Re: [sqlite] Check if the new table has been created

2018-06-20 Thread David Empson
Apart from the SQLITE_OK vs SQLITE_ROW/DONE check on the sqlite3_step() call mentioned already, you also have the third parameter to sqlite_prepare_v2() wrong: nByte = NULL will translate to nByte = 0 which is documented as “no prepared statement is generated”. Therefore stmt is not valid and

Re: [sqlite] JSON1 extension / json_patch / no such function

2017-06-25 Thread David Empson
json_patch() was added to the json1 extension in SQLite 3.18.0, but the other functions were there in earlier versions as far back as SQLite 3.9.0. Looking at https://sqlitestudio.pl/index.rvt?act=changelog it appears the latest version of SQLiteStudio (3.1.1) is using SQLite 3.15.0, so that is

Re: [sqlite] Problem compiling 3.17.0 in MSVS 12

2017-02-14 Thread David Empson
I expect WinZip defaults to converting text files from Unix to DOS line endings, or you opened and saved the file with something which does the same conversion. I don’t have WinZip handy, but using other tools… My copy of sqlite3.c extracted from sqlite-autoconf-317.tar.gz using Take

Re: [sqlite] Problem compiling 3.17.0 in MSVS 12

2017-02-14 Thread David Empson
l changed other than moving from version 3.16.2 > to 3.17.0. > There is no serious problem as I can compile on the other PC, but would > like to figure out what is going on here. > Will see if I can look at the pre-processor output. > > RBS > > > On Tue, Fe

Re: [sqlite] Problem compiling 3.17.0 in MSVS 12

2017-02-14 Thread David Empson
> On 15/02/2017, at 10:23 AM, Bart Smissaert wrote: > > -c sqlite3.c > sqlite3.c > sqlite3.c(16114) : error C2059: syntax error : 'if' > sqlite3.c(16117) : error C2059: syntax error : '}' > sqlite3.c(27461) : error C2143: syntax error : missing ';' before '{' >

Re: [sqlite] BUG: Illegal initialization in icu.c : sqlite3IcuInit

2017-01-27 Thread David Empson
> On 27/01/2017, at 9:09 PM, Kim Gräsman <kim.gras...@gmail.com> wrote: > > On Thu, Jan 26, 2017 at 10:08 PM, David Empson <demp...@emptech.co.nz > <mailto:demp...@emptech.co.nz>> wrote: >> >>> On 26/01/2017, at 8:46 P

Re: [sqlite] BUG: Illegal initialization in icu.c : sqlite3IcuInit

2017-01-26 Thread David Empson
only obvious reference I found in the SQLite documentation was http://www.sqlite.org/howtocompile.html which mentions “ANSI-C”. That is generally understood to mean the ANSI C 1989 standard, which was adopted internationally as ISO 9899:1990. -- David Empson demp...@emptech.co.nz ___

Re: [sqlite] problem with sqlite 4

2017-01-02 Thread David Empson
> On 3/01/2017, at 4:48 AM, claude.del-vi...@laposte.net wrote: > > Hi, > > The problem described here occurs both with the x32 and x64 versions of the > expert personal 4 (Windows 10). Hereafter, a little database to show the bug. > > The table "sample" is used to store words occurring in

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

2016-10-12 Thread David Empson
Works for me building the sqlite3 command line tool from the prerelease snapshot, on both Mac and Windows. SQLite version 3.15.0 2016-10-12 15:15:30 Enter ".help" for usage hints. Connected to a transient in-memory database. Use ".open FILENAME" to reopen on a persistent database. sqlite> .read

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

2016-10-11 Thread David Empson
1 2 3 > On 12/10/2016, at 1:23 PM, David Empson <demp...@emptech.co.nz> wrote: > > Keith - using your example, I get the same result as Tobias: the second > select produces 1,2,3. This is with the sqlite3.exe Windows command line tool > for SQLite 3.14.2 downloaded from sql

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

2016-10-11 Thread David Empson
Keith - using your example, I get the same result as Tobias: the second select produces 1,2,3. This is with the sqlite3.exe Windows command line tool for SQLite 3.14.2 downloaded from sqlite.org. Same sqlite_source_id() too. I’m not set up to build SQLite from source, so can’t easily test

Re: [sqlite] json1 as loadable extension

2016-09-27 Thread David Empson
> On 28/09/2016, at 4:22 AM, Mark Woodward wrote: > > I've built the JSON1 module as a loadable extension, and this loads fine if I > also compile sqlite myself. This is on windows as x86 (32 bit). > > I cannot get any pre built version of sqlite3.dll to load the

Re: [sqlite] schema_version and Vacuum or Backup API

2016-09-07 Thread David Empson
> On 8/09/2016, at 3:36 PM, David Empson <demp...@emptech.co.nz> wrote: > > >> On 8/09/2016, at 3:23 PM, Rowan Worth <row...@dug.com> wrote: >> >> We recently made sqlite's logging more visible in our application and we're >> seeing a lot more

Re: [sqlite] schema_version and Vacuum or Backup API

2016-09-07 Thread David Empson
ma except during DB creation. I know > the warnings are harmless, just curious where they are coming from :) I found the same thing, with an obvious cause: every ATTACH DATABASE or DETACH DATABASE triggers a schema change which requires recompiling every prepared statement. SQLite does this aut

Re: [sqlite] 64-bit SQLite3.exe

2016-08-10 Thread David Empson
> On 10/08/2016, at 5:50 PM, Rousselot, Richard A > wrote: > > I guess it is a matter of support. Can the people using unpatched, > unsupported 32-bit windows instances just live with SQLite 3.13 (or whatever > the cutover version)? Are these 32-bit

Re: [sqlite] 64-bit SQLite3.exe

2016-08-09 Thread David Empson
> On 10/08/2016, at 3:30 PM, Rousselot, Richard A > wrote: > > As I said, I am not a software engineer. I could spend a few hours figuring > this out and be fine but it will be painful for me. > > I see no downsides in a 64-bit CLI. The last 32-bit

Re: [sqlite] Downloading SQLite issue

2016-07-08 Thread David Empson
I think we need more details to understand what is going wrong for you. Exactly what did you download and where from? This is the main download page for SQLite: https://www.sqlite.org/download.html On that page is a section titled "Precompiled Binaries for Mac OS X (x86)”. Under that is a

Re: [sqlite] max_page_count wont round-trip between shell and program

2016-07-05 Thread David Empson
> On 6/07/2016, at 8:55 AM, Ward WIllats wrote: > >> I have noticed that when I set max_page_count programatically to 16384 and >> read it back with the shell I get 1073741823. >> If I set max_page_count with the shell to 16384 and read it back >> programmatically,

Re: [sqlite] Possibly missing feature in json1 extension

2016-06-19 Thread David Empson
> > New json_quote() function added on a branch > (https://www.sqlite.org/src/info/2c3714aebf5e40e3). If there is no > pushback, and if this fixes David's problem, then this will get merged > to trunk and appear in the next release. > > On 6/16/16, David Empson <demp...@emp

[sqlite] Possibly missing feature in json1 extension

2016-06-16 Thread David Empson
I'm working with SQLite 3.13.0, and am the process of adding a new table to a database: CREATE TABLE settings(key TEXT PRIMARY KEY NOT NULL, value TEXT) This table will hold arbitrarily named application defined settings. For the value column I’d like to use JSON for every row, as some of the

Re: [sqlite] Write-Ahead Logging -- documentation error

2016-05-29 Thread David Empson
of the WAL (no read locks, or no data written during the last read locks) then the WAL can reset to writing new data near the beginning. > On 27/05/2016, at 7:06 PM, David Empson <demp...@emptech.co.nz> wrote: > >> On 26/05/2016, at 3:17 AM, Jeffrey Mattox <j...@mac.com>

Re: [sqlite] Write-Ahead Logging -- documentation error

2016-05-27 Thread David Empson
> On 26/05/2016, at 3:17 AM, Jeffrey Mattox wrote: > > This page: > https://www.sqlite.org/wal.html > Contains the phrase, "... the checkpoint must stop when it reaches a page in > the WAL that is past the read mark of any current reader." > > The term, "read mark" is not

Re: [sqlite] Feature Request - RowCount

2014-12-13 Thread David Empson
> On 14/12/2014, at 4:17 am, Simon Slavin wrote: > > > On 13 Dec 2014, at 12:38pm, Richard Hipp wrote: > >> Also, if there are indices available, SQLite attempts to count the smallest >> index (it has to guess at which is the smallest by looking at the

Re: [sqlite] 2 joins on one table

2014-09-29 Thread David Empson
On 30/09/2014, at 12:04 pm, Paul Sanderson wrote: > I two tables of the form > > create table1 (person1 text, person2 text) > create table2 (person text, picture blob) > > Is it possible to create a join so I can get a resultant dataset of the form > > person1,

Re: [sqlite] Problems uploading CSV into sqlite3 DB

2014-09-04 Thread David Empson
I get similar results on OS X 10.9.4 if I try to use the version of SQLite supplied with the operating system (3.7.13) to import a CSV. The simple ".mode csv" and ".import tab1" method works if I run the copy of SQLite 3.8.5 I built myself from the source code, or if I use the Mac OS X

Re: [sqlite] Producing RFC4180-compliant CSV output

2014-07-24 Thread David Empson
On 24/07/2014, at 10:15 pm, Peter Waller wrote: > I too am sad that CRLF is mandated in the specification and still in wide use > because of Windows. It may be nothing to do with Windows. CRLF is the Internet standard for the end of a line, as mentioned in RFC2234 and

Re: [sqlite] A Potential Bug

2014-07-16 Thread David Empson
In this case, sqlite3VdbeAllocUnpackedRecord is called with pSpace = 0 and szSpace = 0. The calculated value of nOff will also be 0, since pSpace is 0. nByte must be greater than zero, as it is the sum of two positive terms. Therefore the test "if( nByte>szSpace+nOff )" will be true, and the

Re: [sqlite] Adding WHERE to query --> database disk image is malformed

2014-06-24 Thread David Empson
ll trying to figure out how that happened. Thank you > guys for all of the clues. -- David Empson demp...@emptech.co.nz Snail mail: P.O. Box 27-103, Wellington 6141, New Zealand ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Performance regression with multiple lower bound tests

2014-06-18 Thread David Empson
On 16/06/2014, at 11:36 pm, Richard Hipp <d...@sqlite.org> wrote: > On Mon, Jun 16, 2014 at 5:07 AM, David Empson <demp...@emptech.co.nz> wrote: > >> It appears SQLite 3.8.1 removed an optimisation where earlier versions of >> the query planner were checkin

Re: [sqlite] Help forming query

2014-06-18 Thread David Empson
On 18/06/2014, at 5:54 pm, David M. Cotter wrote: > i have a table with a numeric column (not the key column) > i want to obtain from this table a list of unique numbers appearing in that > one column > > some cells in the column may have nothing, some may have duplicate

Re: [sqlite] Performance regression with multiple lower bound tests

2014-06-16 Thread David Empson
On 16/06/2014, at 11:36 pm, Richard Hipp <d...@sqlite.org> wrote: > On Mon, Jun 16, 2014 at 5:07 AM, David Empson <demp...@emptech.co.nz> wrote: > >> It appears SQLite 3.8.1 removed an optimisation where earlier versions of >> the query planner were checkin

[sqlite] Performance regression with multiple lower bound tests

2014-06-16 Thread David Empson
I've recently noticed a major drop in performance in one part of our main application at work, and have managed to track it down to a change in recent versions of SQLite. We are storing a log in a simple SQLite table, and have a viewing screen which allows the user to browse through the log.

Re: [sqlite] Corrupted database files

2014-06-05 Thread David Empson
sions and read incomplete data, due to your reader not being blocked while a CoreData write is in progress. -- David Empson demp...@emptech.co.nz Snail mail: P.O. Box 27-103, Wellington 6141, New Zealand ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] 64bit compatibility warnings

2013-04-09 Thread David Empson
On 10/04/2013, at 11:06 AM, Nico Williams wrote: > On Mon, Apr 8, 2013 at 8:52 AM, Alexandr Němec wrote: >>> The first warning is harmless and results from a prior datatype change. >>> Dan has already fixed that one. The other four appear to be due to