Re: [sqlite] '.timer on' in the shell tool

2014-12-15 Thread Donald Shepherd
Let's see if I remember my notes from work ok at home: - Units are seconds. - IIRC user time is time spent in SQLite code, sys time is time spent in system (OS) calls. Both can vary from run to run and (at least in my testing) sys time tends to vary based off system usage. If you want the best

[sqlite] Truncation of floating point numbers in SQLite?

2015-01-28 Thread Donald Shepherd
This is a bit of a speculative question related to a problem I'm having - are there legal values of a C++ double that would get truncated when written into and read from an SQLite database? The column is specified as having REAL affinity though I gather that shouldn't matter.

Re: [sqlite] Truncation of floating point numbers in SQLite?

2015-01-28 Thread Donald Shepherd
> On 1/28/2015 5:47 PM, Donald Shepherd wrote: > > This is a bit of a speculative question related to a problem I'm having - > > are there legal values of a C++ double that would get truncated when > > written into and read from an SQLite database? > > Written into and rea

Re: [sqlite] Truncation of floating point numbers in SQLite?

2015-01-28 Thread Donald Shepherd
to be aware of (other than the NaN one I'd already run into). :) On Thu Jan 29 2015 at 10:10:35 AM Simon Slavin <slav...@bigfraud.org> wrote: > > On 28 Jan 2015, at 10:47pm, Donald Shepherd <donald.sheph...@gmail.com> > wrote: > > > This is a bit of a speculative question r

Re: [sqlite] Truncation of floating point numbers in SQLite?

2015-01-29 Thread Donald Shepherd
.0 == 0.0). On Thu Jan 29 2015 at 10:13:55 AM Donald Shepherd <donald.sheph...@gmail.com> wrote: > Thanks for the reassurances. I have a case where differences in doubles > would explain what I'm seeing but I have no evidence that it is the case > (evidence compilation is still un

Re: [sqlite] Truncation of floating point numbers in SQLite?

2015-01-29 Thread Donald Shepherd
Trying to retrieve a stored qNaN or sNaN returns a column type of NULL and a value of 0. On Thu Jan 29 2015 at 8:56:35 PM RSmith wrote: > > On 2015/01/29 05:05, James K. Lowden wrote: > > There's no reason to think, if the data are provided in binary form, > that they won't

Re: [sqlite] Truncation of floating point numbers in SQLite?

2015-02-02 Thread Donald Shepherd
On Tue Feb 03 2015 at 12:23:29 PM James K. Lowden wrote: > On Sun, 1 Feb 2015 02:13:15 +0100 > Stephan Beal wrote: > > > On Sun, Feb 1, 2015 at 2:07 AM, Simon Slavin > > wrote: > > > > > So, having established that NaN and

Re: [sqlite] Fastest way to add many simple rows to a table?

2016-05-26 Thread Donald Shepherd
On Fri, 27 May 2016 at 00:16 Eric Grange wrote: > Hi, > > I am looking for the fastest way to insert many rows to a simple table. > > By "simple" I mean a relation table (with just a couple integer/key fields) > or even a single-column (temp table used for filtering as an

[sqlite] Getting the current value of busy_timeout

2015-02-19 Thread Donald Shepherd
Is there a way to get (not set) the current value of busy_timeout when using an SQLite version older than 3.7.15 and the addition of "PRAGMA busy_timeout;"? http://www.sqlite.org/releaselog/3_7_15.html

[sqlite] Backup API and WAL

2015-02-22 Thread Donald Shepherd
If I use the backup API to create a copy of an SQLite database that uses Write-Ahead Logging, will the resulting copy reflect the contents of both the base database file and the -wal file? Regards, Donald Shepherd.

[sqlite] Backup API and WAL

2015-02-23 Thread Donald Shepherd
On Mon Feb 23 2015 at 1:41:31 PM Simon Slavin wrote: > > On 22 Feb 2015, at 11:15pm, Donald Shepherd > wrote: > > > If I use the backup API to create a copy of an SQLite database that uses > > Write-Ahead Logging, will the resulting copy reflect the contents of both &g

[sqlite] Why bind indexes start from 1 and column indexes start from 0?

2015-03-02 Thread Donald Shepherd
iced any really untoward behaviour (beyond my code not working and requiring fixing). Regards, Donald Shepherd.

[sqlite] Using WHERE clauses with REAL data

2014-03-03 Thread Donald Shepherd
It appears that using equals on floating point (REAL) data in WHERE clauses doesn't necessarily work, presumably because of rounding errors - see below for an example. Is this the case? Do I need to use BETWEEN instead of = as I expect to be the case? Thanks, Donald. sqlite> select * from

Re: [sqlite] Using WHERE clauses with REAL data

2014-03-03 Thread Donald Shepherd
Thanks for the quick response. That was what I was expecting. Regards, Donald. On 4 March 2014 15:20, Richard Hipp <d...@sqlite.org> wrote: > On Mon, Mar 3, 2014 at 11:14 PM, Donald Shepherd > <donald.sheph...@gmail.com>wrote: > > > It appears that using equals on

Re: [sqlite] Using WHERE clauses with REAL data

2014-03-04 Thread Donald Shepherd
It's a nice idea but that's just some sample values generated by an emulator. I've compromised and am using round() to limit it to a few digits after the decimal when doing the comparison. On 4 March 2014 21:27, Simon Slavin <slav...@bigfraud.org> wrote: > > On 4 Mar 2014, at 4:

[sqlite] Variable number of parameters in a prepared statement's IN clause

2014-07-20 Thread Donald Shepherd
Is it possible to have a variable number of parameters in an IN clause in a prepared statement, i.e. "select * from Table where Col1 in (?,?,?,...);"? Or do I need a constant number of parameters in there to be able to re-use the prepared statement? Thanks for any help, Donal

Re: [sqlite] Variable number of parameters in a prepared statement's IN clause

2014-07-20 Thread Donald Shepherd
Thanks all for the suggestions. They're a great help. On 21 July 2014 11:06, Keith Medcalf wrote: > > > >Is it possible to have a variable number of parameters in an IN clause in > >a prepared statement, i.e. "select * from Table where Col1 in > >(?,?,?,...);"? > > >Or do

Re: [sqlite] Handling Timezones

2014-07-29 Thread Donald Shepherd
You can represent time zones as integers by using minutes. Examples: +600 for AEST, +330 for IST, -480 for PST. No string manipulation is needed, but depending on what or if you're using libraries, you may need extra steps in there for convert those values into a representation supported by the

Re: [sqlite] Handling Timezones

2014-07-31 Thread Donald Shepherd
Speaking as someone who's work routes their internet traffic through a gateway in Phoenix, AZ despite being based in Australia, guessing time zones based off IP location is a lot more prone to error than detecting it based off the client. On 31 July 2014 17:54, Stephen Chrzanowski

Re: [sqlite] Handling Timezones

2014-08-01 Thread Donald Shepherd
Actually what Rob and I were pointing out was that the chances of showing up in Taiwan when you're in Tennessee is actually quite high in a corporate environment - he gets moved from the UK to Germany, I get moved from Australia to Phoenix, AZ, my wife gets moved from Australia to Switzerland and

Re: [sqlite] 50% faster than 3.7.17

2014-09-23 Thread Donald Shepherd
Are any of these improvements specifically in the area of the online backup API, or are they more in the general running of SQLite? On 20 September 2014 11:14, Richard Hipp wrote: > The latest SQLite 3.8.7 alpha version (available on the download page >

[sqlite] Performance comparison between SQLite and SQL Server?

2016-02-15 Thread Donald Shepherd
They're intended for fundamentally different uses. It's like asking what's more energy efficient for cooking dinner - a wok or an oven. On Mon, 15 Feb 2016 at 14:21 wrote: > Hi, > > I am just curious whether there is a performance comparison between SQLite > and SQL Server? Surely SQL Server

[sqlite] Changing the default page_size in 3.12.0

2016-03-05 Thread Donald Shepherd
On Sat, 5 Mar 2016 at 09:19 Roger Binns wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 04/03/16 07:48, Richard Hipp wrote: > > The tip of trunk (3.12.0 alpha) changes the default page size for > > new database file from 1024 to 4096 bytes. ... This seems like a > > potentially

[sqlite] Article about pointer abuse in SQLite

2016-03-22 Thread Donald Shepherd
On Wed, 23 Mar 2016 12:59 am Adam Devita wrote: > > This discussion on the nature of undefined behaviour code is > interesting. I don't know the reasoning, but it seems that VS6 often > initialized things to 0xcd in debug mode and (usually) had memory > uninitialized to 0x00 when complied in

[sqlite] SQLite Is Not Support Uint64?

2016-05-16 Thread Donald Shepherd
It doesn't support unsigned integers natively, but most of the time it will effectively upconvert to a larger signed integer. In the case where it's greater than the maximum int8 it obviously cannot upconvert, so uses a floating point to approximate. https://www.sqlite.org/datatype3.html If you

Re: [sqlite] Locking semantics are broken?

2016-06-28 Thread Donald Shepherd
On Tue, 28 Jun 2016 at 19:17 Rowan Worth wrote: > On 28 June 2016 at 16:07, dandl wrote: > > > > Do not use SQLite for concurrent access over a network connection. > > Locking > > > semantics are broken for most network filesystems, so you will have > > >

Re: [sqlite] 64-bit SQLite3.exe

2016-08-09 Thread Donald Shepherd
Why don't you build it yourself as a 64 bit executable? On Wed, 10 Aug 2016 at 00:31 Rousselot, Richard A < richard.a.rousse...@centurylink.com> wrote: > I would like to request a SQLite official 64-bit SQLite3.exe CLI (not DLL) > be created. > > I have reviewed the prior discussions regarding

Re: [sqlite] Patch for consideration: auto_vacuum slack.

2017-02-13 Thread Donald Shepherd
I use auto-vacuum in my application storage for work. This was introduced in about 2013. The motivation was more political than anything though, as convincing some as to the introduction requiring jumping through some pretty arbitrary hoops. Enabling auto-vacuum was one of those, to mitigate

Re: [sqlite] Tutorials, books, video about SQLite

2017-08-10 Thread Donald Shepherd
I've used "The Definitive Guide to SQLite" and have been pretty happy with it. I've probably learned more from this list and StackOverflow though. On Thu, 10 Aug 2017 at 06:29 Lars Frederiksen wrote: > Thank you for all your advices concerning books about SQLite. I will

[sqlite] Does WAL mode's SQLITE_BUSY special circumstances invoke the busy handler?

2018-05-08 Thread Donald Shepherd
The documentation on WAL databases includes a section with caveats re: SQLITE_BUSY, included below. Do these invoke the busy handler (if configured) or just return SQLITE_BUSY immediately? Making a valiant attempt to read the code leads me to believe it returns immediately without involving the

Re: [sqlite] Database locking with online backup API

2018-05-08 Thread Donald Shepherd
T or ROLLBACK without having changed anything. > > Simon. > Having just tested that (for alternate purposes), it doesn't work. The sqlite3_backup_step calls following a "BEGIN IMMEDIATE" instruction returned SQLITE_LOCKED. Regards, Donald Shepherd. __

Re: [sqlite] Database locking with online backup API

2018-05-08 Thread Donald Shepherd
hen do all the backup stuff, then > COMMIT or ROLLBACK without having changed anything. > > On 9 May 2018, at 1:50am, Donald Shepherd <donald.sheph...@gmail.com> > wrote: > > > Having just tested that (for alternate purposes), it doesn't work. The > > sqlite3_backup_step

[sqlite] Database locking with online backup API

2018-05-08 Thread Donald Shepherd
. Instead writes are prevented for a very small subset of that time, if at all. Is that the expected behaviour, or is there a flaw in my testing somewhere? What defines the subset of time if it is correct? I'm testing a WAL database if that affects it. Thank you, Donald Shepherd

Re: [sqlite] Database locking with online backup API

2018-05-08 Thread Donald Shepherd
On Tue, 8 May 2018 at 19:23 R Smith <ryansmit...@gmail.com> wrote: > > On 2018/05/08 9:37 AM, Donald Shepherd wrote: > > I've long assumed that when using the online backup API on a SQLite > > database, other processes will not be able to write to the source > da

Re: [sqlite] CASE and NULL

2018-07-05 Thread Donald Shepherd
On Thu, 5 Jul 2018 at 16:45, Simon Slavin wrote: > On 5 Jul 2018, at 7:30am, Clemens Ladisch wrote: > > > The expression "x = x" will fail for NULL, but succeed for everything > > else. So you can use that to implement a "not-NULL ELSE" > > Wow. That has to be the most counter-intuitive

Re: [sqlite] How many AUTOINCREMENT tables are in your schema?

2018-03-16 Thread Donald Shepherd
100s - we use it as part of the definition of some dynamically created tables that are dependent on the shape of the data we are receiving so can end up with a large number of them. On Sat, 17 Mar 2018 at 5:57 am, Doug Currie wrote: > 0 >

Re: [sqlite] Regarding CoC

2018-10-22 Thread Donald Shepherd
It's disappointing that some are using discussion on a (perfectly acceptable) CoC to turn it into an excuse to post "jokes" about other people's beliefs, but whatever floats your boat. Regards, Donald Shepherd. On Tue, 23 Oct 2018 at 07:05, Charles Leifer wrote: > I di

Re: [sqlite] Need setup code for VC++ 2017 that will ACTUALLY COMPILE

2018-12-20 Thread Donald Shepherd
"CPPSqlite3.cpp" is and adding C++ headers is not likely to get you anywhere unless you follow up with whoever created those files for assistance. Regards, Donald Shepherd. On Fri, 21 Dec 2018 at 09:41, zydeholic wrote: > Hello folks, > I looked through the last few months of post

Re: [sqlite] Need setup code for VC++ 2017 that will ACTUALLY COMPILE

2018-12-20 Thread Donald Shepherd
PCH/precompiled headers are not related to SQLite. You can try disabling them or looking in how to fix them separately. Regards, Donald Shepherd. On Fri, 21 Dec 2018 at 12:34, zydeholic wrote: > Ok, sorry for my thrashing. I get frustrated when I don't know what's > happening, even

Re: [sqlite] Need setup code for VC++ 2017 that will ACTUALLY COMPILE

2018-12-20 Thread Donald Shepherd
https://stackoverflow.com/questions/7261707/how-to-avoid-precompiled-headers On Fri., 21 Dec. 2018, 1:02 pm zydeholic To Donald Shepard, > Sorry, I'm on digest and am having to just respond to my own messages for > now. Just told it to get me off of digest. > Regarding PCH, VC++ seems to be

Re: [sqlite] [SPAM?] Re: [EXTERNAL] Re: Should SQLite distinguish between +0.0 and -0.0 on output?

2019-06-13 Thread Donald Shepherd
te version with this improvement. Regards, Donald Shepherd. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] [SPAM?] Re: [EXTERNAL] Re: Should SQLite distinguish between +0.0 and -0.0 on output?

2019-06-13 Thread Donald Shepherd
On Fri, 14 Jun 2019 at 7:11 am, Richard Hipp wrote: > On 6/13/19, Donald Shepherd wrote: > > > > Given there's been numerous comments to the effect that SQLite now > supports > > -0.0 storing and retrieval other than printing, I'm curious which version > > this wa

Re: [sqlite] [SPAM?] Re: [EXTERNAL] Re: Should SQLite distinguish between +0.0 and -0.0 on output?

2019-06-13 Thread Donald Shepherd
On Fri, 14 Jun 2019 at 07:13, Simon Slavin wrote: > On 13 Jun 2019, at 10:01pm, Donald Shepherd > wrote: > > > Given there's been numerous comments to the effect that SQLite now > supports > > -0.0 storing and retrieval other than printing, I'm curious which version

Re: [sqlite] Should SQLite distinguish between +0.0 and -0.0 on output?

2019-06-12 Thread Donald Shepherd
On Thu, 13 Jun 2019 at 01:28, Richard Hipp wrote: > On 6/12/19, Jonathan Brandmeyer wrote: > > IMO, when acting as a storage engine, SQLite should be good to the last > > bit. > > That is already the case, and has been for 17 years. The question at > hand is what should SQLite do when the

Re: [sqlite] [SPAM?] Re: [EXTERNAL] Re: Should SQLite distinguish between +0.0 and -0.0 on output?

2019-06-13 Thread Donald Shepherd
On Fri., 14 Jun. 2019, 7:43 am Keith Medcalf, wrote: > On Thursday, 13 June, 2019 15:21, Donald Shepherd < > donald.sheph...@gmail.com> wrote: > > >On Fri, 14 Jun 2019 at 7:11 am, Richard Hipp wrote: > > >> On 6/13/19, Donald Shepherd wrote: > > &

[sqlite] Bug when creating a table via select?

2019-07-14 Thread Donald Shepherd
Somewhat bizarrely only "BLOB" affinity doesn't make it from the original table to the new table when using the "select" syntax to create the new table. Even items with aliased affinities (VARTEXT, or something that defaults to NUMERIC) comes across as the base affinity but at least have an

Re: [sqlite] DEF CON (wasL A license plate of NULL)

2019-08-12 Thread Donald Shepherd
is a lot lower (if any) as you detail. Regards, Donald Shepherd. On Tue, 13 Aug 2019 at 06:14, Keith Medcalf wrote: > > On Monday, 12 August, 2019 11:09, Simon Slavin > wrote: > > >Some interesting things are emerging from this year's DEF CON. This > >one is related to an iss

Re: [sqlite] Floating point literals

2019-07-31 Thread Donald Shepherd
Thanks, that's an interesting wrinkle that I don't remember being raised in previous discussions but if known it should be mentioned up front as many/most use affinities. Regards, Donald Shepherd. On Thu, 1 Aug 2019 at 08:58, Keith Medcalf wrote: > False, as it depends on the applicat

Re: [sqlite] Floating point literals

2019-07-31 Thread Donald Shepherd
it will be 0.0. The sign has been stripped. Regards, Donald Shepherd. On Thu, 1 Aug 2019 at 08:47, Keith Medcalf wrote: > > The -0.0 is only for conversion to text. Otherwise -0.0 is preserved both > on input and output (including input text conversions). It is only the > conversion of

Re: [sqlite] Floating point literals

2019-07-31 Thread Donald Shepherd
Plus (as Igor noted) -0.0 returns as 0.0. Regards, Donald Shepherd. On Thu, 1 Aug 2019 at 08:41, Keith Medcalf wrote: > > sqlite3_bind_double and sqlite3_column_double will round trip IEEE > floating point values EXCEPT for NaN. NaN will be stored as a NULL. > > -- > The

Re: [sqlite] Klocwork static analysis report

2019-11-06 Thread Donald Shepherd
. Having done a triage of Klocwork issues on an earlier amalgamation (to assuage organisational worry about open source), by far the majority were null pointer warnings on code paths that could never be null. It did not inspire confidence. Regards, Donald Shepherd. _

Re: [sqlite] Performance vs. memory trade-off question

2019-12-14 Thread Donald Shepherd
to that category? I'm obviously just speculating on that front having not used it there myself. Regards, Donald Shepherd. > ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] New word to replace "serverless"

2020-01-27 Thread Donald Shepherd
On Tue, 28 Jan 2020 at 10:19 am, Richard Hipp wrote: > daemon-less? > -- > D. Richard Hipp > d...@sqlite.org In-process? Same concept but defining it by what it is rather than what it isn't. Regards, Donald Shepherd. > ___ sqlit

Re: [sqlite] New word to replace "serverless"

2020-01-28 Thread Donald Shepherd
erver-Free" > > or "Localized". > > I agree with these, but localize is another buzz word for translation. Internationalisation/translation is my first thought when I hear localisation/localised, a buzzword that must be at least 15 years old given when I first

Re: [sqlite] Bug fixes only branch.

2020-01-13 Thread Donald Shepherd
ixes (true) but new features introduce bugs (in general true) therefore we don't want any new features". In other words it's a result of the environment rather than a reflection of SQLite. Regards, Donald Shepherd. > ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users