Re: [sqlite] bug in time() ?

2004-03-30 Thread Doug Currie
sqlite> select datetime(1080701286,'unixepoch'); 2004-03-31 02:48:06 sqlite> select datetime(1080701286,'localtime'); 2954147-07-10 07:00:00 sqlite> select datetime(1080701286,'unixepoch','localtime'); 2004-03-30 21:48:06 sqlite> select julianday('now'); 2453095.66955468 sqlite> select

Re: [sqlite] Concurrency Proposal

2004-04-05 Thread Doug Currie
ribute it. Perhaps his web page will come back on line soon. http://www.cs.hut.fi/~ylo e > Cheers, > Christian > On Mon, 5 Apr 2004, Doug Currie wrote: >>Monday, April 5, 2004, 6:13:18 AM, Christian Smith wrote: >> >>> On Wed, 31 Mar 2004, Joel Lucsy wrote: >

Re: [sqlite] Concurrency, MVCC

2004-04-14 Thread Doug Currie
> D. Richard Hipp wrote: >> >> My thoughts on BlueSky have been added to the wiki page: >>http://www.sqlite.org/cvstrac/wiki?p=BlueSky I added some responses; I do not agree with Richard's concerns about Shadow Paging, and I corrected some mistaken conclusions. I apologize if my paper was

Re: [sqlite] Concurrency, MVCC

2004-04-15 Thread Doug Currie
Thursday, April 15, 2004, 9:16:01 AM, Christian Smith wrote: > On Wed, 14 Apr 2004, Doug Currie wrote: >>One way to get table level locking without a great deal of pain is to >>integrate the shadow paging ideas with BTree management. Rather than >>using page tables for

Re: [sqlite] Re: SQLite version 3 design question: '500'=500?

2004-05-13 Thread Doug Currie
Firebird 1.5 SQL> CREATE TABLE test1(a VARCHAR(100)); SQL> INSERT INTO test1 VALUES('501'); SQL> INSERT INTO test1 VALUES(' 502 '); SQL> SELECT * FROM test1 WHERE a=501; A === 501 SQL> SELECT * FROM test1 WHERE a=502;

Re: [sqlite] SQLite version 3 design question: '500'=500?

2004-05-12 Thread Doug Currie
Results from Firebird 1.5 (thanks for the syntax, Andrew)... SQL> select '500' = 500; Statement failed, SQLCODE = -104 Dynamic SQL Error -SQL error code = -104 -Token unknown - line 1, char 14 -= SQL> select 500 = '500'; Statement failed, SQLCODE = -104 Dynamic SQL Error -SQL error code = -104

Re: [sqlite] Use of alloca() in SQLite sources

2004-04-26 Thread Doug Currie
> If I make use of alloca() in SQLite version 3, will this > cause any extreme hardships? Who is using a C compiler to > build SQLite that does not support alloca()? Warning: there are gcc bugs in the x86 optimizer related to alloca(). E.g.,

[sqlite] sqlite 3.0.0 build issues

2004-06-19 Thread Doug Currie
There are several build options in the configure/make of sqlite3 that are obsolete, and others that are missing. ENCODING is obsolete since it is specified in the open calls now. There are still several references to it, though, in the make and autoconf files, and these should all be removed.

Re: [sqlite] sqlite 3.0.0 build issues

2004-06-21 Thread Doug Currie
Replying to my own message... I bit the bullet and installed autoconf under msys/mingw. Using this tool I updated configure.ac and Makefile.in to address some of the build issues identified below -- everything but the OMIT macros. Of course, I have not modified the sqlite sources to implement the

Re: [sqlite] SQLite v3.0 - compiling under Windows

2004-06-22 Thread Doug Currie
> The '%lld' is used by SQLite in non debugging code. > For example: vdbemem.c function sqlite3VdbeMemStringify() This is a libc/runtime issue that is common to both VC and gcc running on windows (i.e., mingw, but perhaps not cygwin). Windows needs the printf format spec '%I64d' instead of

Re: [sqlite] Version 3.0.0 ALPHA now available

2004-06-25 Thread Doug Currie
Friday, June 18, 2004, 8:33:26 AM, DRH wrote: > A file format and API freeze is scheduled for July 1. Users > are encouraged to evaluate this release and make suggestions > on how to improve the interface prior to that date. I ported Tiago Dionizio's LuaSQLite to version 3.0.1. Here are a few

Re: [sqlite] sqlite-devel-2.8.14/3.0.1 conflict

2004-07-18 Thread Doug Currie
> Uffe Jakobsen wrote: >> >> Found a conflict between the sqlite-devel-2.8.14-1.rpm and >> sqlite-devel-3.0.1-1.rpm >> >> The file /usr/lib/pkgconfig/sqlite.pc exists in both packages. >> >> Shouldn't it be named /usr/lib/pkgconfig/sqlite3.pc for the sqlite-3.0.1 >> package ??? >> > Who knows

Re: [sqlite] cross compile under cygwin for an ARM target

2004-07-19 Thread Doug Currie
Monday, July 19, 2004, 1:41:27 PM, Jeff Dever wrote: > I'm running cygwin on WindowsXP and need to compile a sqlite library for > use with our ARM embedded system which uses the eCOS. I have the 3.0.2 > sources to build from and am using the command: > configure --host=arm > After running

Re: [sqlite] sqluite3.dll

2004-07-26 Thread Doug Currie
> the following exports are missing from sqlite3.def (for windows): > sqlite3_version Since this is DATA there are some issues around how to add this. Various tools expect different things. I would prefer to see the sqlite3_libversion function added to the C API. > sqlite3_get_auxdata >

Re: [sqlite] Versions 2.8.15 and 3.0.3 available

2004-07-26 Thread Doug Currie
Monday, July 26, 2004, 12:33:41 PM, Roger Reghin wrote: > I also use EMPTY_RESULT_CALLBACKS for the same reason Nuno does. And my > software also needs FULL_COLUMN_NAMES as well. So, no 3.x for me... =( In 3.x column names are available as soon as the query is prepared. See the C API reference

Re: [sqlite] Versions 2.8.15 and 3.0.3 available

2004-07-26 Thread Doug Currie
Monday, July 26, 2004, 5:46:48 PM, Nuno Lucas wrote: > Doug Currie, dando pulos de alegria, escreveu : >> In 3.x column names are available as soon as the query is prepared. >> See the C API reference at >> http://www.sqlite.org/capi3ref.html#sqlite3_column_name > This was

Re: [sqlite] LEMON Examples

2004-08-02 Thread Doug Currie
Monday, August 2, 2004, 12:49:50 AM, John Cohen wrote: > My problem is the fact I cannot use the start token on the right hand of the > rule. [...] > How can I get this to accept things such as: > 5 + 5 + 5 > 5 + 6 > ? [I have never used lemon, but perhaps something like...] expr := term |

Re: [sqlite] New SQL Function.

2004-08-18 Thread Doug Currie
Wednesday, August 18, 2004, 1:45:43 PM, Federico wrote: > [...] > gcc -g -O2 -DTHREADSAFE=1 -DOS_UNIX=1 -DOS_WIN=0 -DHAVE_USLEEP=1 -I. > -I../sqlite/src -DHAVE_READLINE=0 > -o .libs/sqlite ../sqlite/src/shell.c ./.libs/libsqlite.so > ./.libs/libsqlite.so: undefined reference to `sqrt' >

Re: [sqlite] host parameters / bind variables - further workouts

2004-08-27 Thread Doug Currie
Earlier I said (to Dennis and the list): > I still have trouble running the tests (error 128 from msys at odd > times that may be tcl subst related) but at least you can build > testfixture and run some tests. I have also reported privately to DRH a problem running tests bigrow-2.2 & bigrow-2.3

Re: [sqlite] trying to compile SQLite

2004-08-31 Thread Doug Currie
Tuesday, August 31, 2004, 5:40:15 PM, Dennis Cote wrote: > I have also filed a ticket with attached patches to have the SQLite > makefiles (both sqlite 2 and 3) produce GCC compatible import libraries for > sqlite.dll in addition to the Borland and MSVC import libraries. > So now you can build

Re: [sqlite] Shadow Pager

2004-09-16 Thread Doug Currie
Wednesday, September 15, 2004, 9:36:00 PM, sankarshana rao wrote: > Has anyone implemented the shadow pager for sqlite??? > Any info regarding this will be very helpful.. I began an implementation last winter, and set it aside once the sqlite3 effort was announced. Presently I am busy with

Re: [sqlite] sqlite3 DEF file

2004-09-20 Thread Doug Currie
Monday, September 20, 2004, 5:11:48 AM, Mike wrote: > this file is incomplete, and has been for some time. here is the correct > version. would somebody check it in, since I dont have CVS access handy: The only additional symbol I see is sqlite3_version which is not a function. The

Re: [sqlite] Problems compiling SQLite 3.0.7 with MinGW

2004-09-21 Thread Doug Currie
Tuesday, September 21, 2004, 6:04:53 AM, Peter wrote: > Hello all, I've been using MinGW to compile SQLite for > over a year already and encountered a problem I've never > seen before when trying to compile SQLite 3.0.7. There is a problem in the Makefile in 3.0.7, fixed in CVS yesterday.

Re: [sqlite] cross-compile sqlite

2004-09-23 Thread Doug Currie
Thursday, September 23, 2004, 6:01:40 PM, Daniel wrote: > [...] I want to use the > configure-script. Can you give me a hint? > I tried --prefix=($PREFIX) --host=cris-axis-linux-gnu > --target=cris-axis-linux-gnu --build=cris-axis-linux-gnu. --host=cris-axis-linux-gnu ??? > [...] > The last

Re: [sqlite] minor problems with 3.08 source package

2004-10-15 Thread Doug Currie
Friday, October 15, 2004, 11:31:42 AM, Eli wrote: > I may be in a minority here, but I needed to build sqlite3: threadsafe, > no tcl, and as a static lib. > With both 3.06 and 3.08, this required fiddling as the configure script > does not create libsqlite3.a. The configure script makes

Re: [sqlite] Ticket #924 - bug in mingw

2004-09-30 Thread Doug Currie
Thursday, September 30, 2004, 10:34:50 AM, DRH wrote: > The problem reported by ticket #924 appears to be mingw brain damage, > not a bug in SQLite. Can somebody who uses a recent version of > mingw (I'm still using a version from 3 or 4 years ago - a version > that works) please suggest a

Re: [sqlite] Ticket #924 - bug in mingw

2004-09-30 Thread Doug Currie
Thursday, September 30, 2004, 10:34:50 AM, DRH wrote: > The problem reported by ticket #924 appears to be mingw brain damage, > not a bug in SQLite. Can somebody who uses a recent version of > mingw (I'm still using a version from 3 or 4 years ago - a version > that works) please suggest a

Re: [sqlite] version-info same for sqlite2 and sqlite3

2004-10-06 Thread Doug Currie
> Both sqlite2 and sqlite3 use --version-info "8:6:8" when creating > libsqlite.la & libsqlite3.la. I would think the version # needs to be > changed? Is "9:0:0" the right value? http://sources.redhat.com/autobook/autobook/autobook_91.html e

Re: [sqlite] sqlite3_temp_directory

2004-10-07 Thread Doug Currie
Thursday, October 7, 2004, 9:17:28 AM, Kenneth wrote: > Changing a process wide variable like that seems a bit drastic. I'd be > concerned about what effect that might have on all the other things running > under iis. For example, some of them might be running as different users > who might not

Re: [sqlite] $ in table and column names

2005-01-10 Thread Doug Currie
On Jan 10, 2005, at 6:00 PM, D. Richard Hipp wrote: > A user has reported a bug saying that SQLite does > not allow the '$' in the middle of indentifiers > (without quoting). The bug reports says that > statements like this: > >CREATE TABLE ex$1( col$abc INTEGER ); > > are legal and work

Re: [sqlite] Version 3.1.0

2005-01-21 Thread Doug Currie
Friday, January 21, 2005, 1:33:35 PM, DRH wrote: > Version 3.1.0 (alpha) of SQLite is now available on the website. Compiling with MinGW MSYS on WinXP... 1. I had to modify my lib/tclConfig.sh to have TCL_LIB_SPEC='-L/mingw/lib -ltcl84' instead of TCL_LIB_SPEC='' or else testfixture

Re: [sqlite] Version 3.1.0

2005-01-21 Thread Doug Currie
Friday, January 21, 2005, 5:41:00 PM, Dan wrote: >> autovacuum-ioerr2.4.0... >> Error: error copying "test.db" to "backup.db": no such file or >> directory autovacuum-ioerr2-4.1.1... >> Error: error copying "backup.db" to "test.db": no such file or >> directory autovacuum-ioerr2-4.1.2... Ok >>

Re: [sqlite] bogus output for strftime('%s', 'now')

2005-02-01 Thread Doug Currie
> create table each_transaction(datetime int); > insert into each_transaction values( datetime('%s', 'now')); Perhaps you should say insert into each_transaction values( strftime('%s', 'now')); ? http://www.sqlite.org/cvstrac/wiki?p=DateAndTimeFunctions e > this is how I create table

Re: [sqlite] SQLite 3.0.8 dates

2005-02-04 Thread Doug Currie
Friday, February 4, 2005, 3:09:59 PM, Clark Christensen wrote: > So, my question is, true or false:, if I want to use > SQLite's date/time functions against field values, my only > real option is to store -MM-DD HH:MM:SS time strings. > Any other value, whether MMDD, julian day number,

Re: [sqlite] Storing 64-Bit Addresses

2005-03-31 Thread Doug Currie
> Before binding an address to a statement using sqlite3_bind_int64() I apply an > offset to the address to translate it to a signed value. And when reading out > an address using sqlite3_column_int64() I reverse the process. I.e. > dbase_value = addr_value - offset > addr_value =

Re: [sqlite] Storing 64-Bit Addresses

2005-03-31 Thread Doug Currie
> The actual test I'm doing is something like: > WHERE ?1 >= (base + begin) AND ?1 < (base + end) > where ?1, base, begin, and end are all 64-bit addresses. This is a test with a well known optimization for unsigned values: WHERE (?1 - base - begin) < end To make the < test unsigned

Re: [sqlite] Storing 64-Bit Addresses

2005-03-31 Thread Doug Currie
Thursday, March 31, 2005, 5:53:12 PM, you wrote: >> The actual test I'm doing is something like: >> WHERE ?1 >= (base + begin) AND ?1 < (base + end) >> where ?1, base, begin, and end are all 64-bit addresses. > This is a test with a well known optimization for unsigned values: >

Re: [sqlite] Using SQL or C for data analysis?

2012-03-27 Thread Doug Currie
On Mar 27, 2012, at 3:46 PM, Larry Brasfield wrote: > A DBMS is a good way to keep your raw data. But I highly doubt that a > majority of your analysis algorithms are going to be expressible in SQL > without going way beyond the intended purpose of the language. You will > either find

Re: [sqlite] VERY weird rounding error

2012-06-17 Thread Doug Currie
On Jun 17, 2012, at 12:23 PM, Keith Medcalf wrote: > SQLITE_SIGNIFICANT_DIGITS defaults to 14, but you can override it. No matter > what is requested, the maximum number of significant digits is limited to the > specification, and rounding is applied to the remaining bits of the >

Re: [sqlite] how to build sqlite4 (four)?

2012-06-28 Thread Doug Currie
On Jun 28, 2012, at 4:05 PM, Nico Williams wrote: > It's also possibly a good idea to just not have autoincrement. Let > the application implement it, no? After all, it can, including via > triggers. Or with PostgreSQL-style sequences

[sqlite] leap seconds

2012-07-13 Thread Doug Currie
The SQLite3 date & time functions are designed assuming > […] that every day is exactly 86400 seconds in duration. Before I start implementing TAI (or GPS time) to/from UTC translator plugin, has anyone already done this? Why? In a device that logs data with sub-second resolution, in my case a

Re: [sqlite] sqlite3 database unreadable on Mountain Lion

2012-08-03 Thread Doug Currie
On Aug 3, 2012, at 2:33 PM, Dan Kennedy wrote: > There was a problem similar to your description at one point, but > it should have been fixed before the 3.7.12 release. What do you > get from the shell command "SELECT sqlite_source_id();" on > Mountain Lion? e$

Re: [sqlite] sqlite3 database unreadable on Mountain Lion

2012-08-03 Thread Doug Currie
On Aug 3, 2012, at 3:32 PM, Tobias Giesen wrote: > Apparently Apple prevents starting other versions of it and redirects > everything to > their current version in /usr/bin. On ML here I can launch my version in /user/local/bin just fine. e$ which sqlite3

Re: [sqlite] sqlite3 database unreadable on Mountain Lion

2012-08-06 Thread Doug Currie
On Aug 6, 2012, at 8:26 AM, Simon Slavin wrote: > So either Apple has made a change between versions, or we have different > paths. I use fully qualified pathnames here: ~ e$ /usr/bin/sqlite3 :memory: 'SELECT sqlite_source_id()' 2012-04-03 19:43:07

Re: [sqlite] sqlite3 database unreadable on Mountain Lion

2012-08-06 Thread Doug Currie
On Aug 6, 2012, at 4:51 PM, Simon Slavin <slav...@bigfraud.org> wrote: > On 6 Aug 2012, at 7:48pm, Doug Currie <doug.cur...@gmail.com> wrote: > >> ~ e$ /usr/local/bin/sqlite3 :memory: 'SELECT sqlite_source_id()' >> 2012-05-14 01:41:23 8654aa9540fe9fd210899d8

Re: [sqlite] Bug: SQLite's include guards are reserved identifiers

2016-07-09 Thread Doug Currie
On Sat, Jul 9, 2016 at 12:05 PM, Keith Medcalf wrote: > > [...] Most API headers do the same thing. Even the standard library does > it, in most compilers. [...] Sure, that's why they're reserved! So user code and the C compiler's library implementation don't clash. The

Re: [sqlite] Simple web query tool

2017-02-01 Thread Doug Currie
On Wed, Feb 1, 2017 at 11:10 AM, Jay Kreibich wrote: > I'm looking for an *extremely* simple web tool that will allow me to > configure a dozen or so stored queries, which people can then select and > run on an internal server. While I wouldn't call it extremely simple, the

Re: [sqlite] Datatype for prices (1,500)

2016-11-30 Thread Doug Currie
On Wed, Nov 30, 2016 at 5:25 PM, Nico Williams wrote: > On Wed, Nov 30, 2016 at 02:22:42PM -0600, John McKown wrote: > > > > [...] every RDMS "should" implement Decimal Floating Point. > > You could argue that every programming language needs that. What makes > SQL more

Re: [sqlite] Simplify multiple use of value in a trigger

2017-01-07 Thread Doug Currie
On Sat, Jan 7, 2017 at 9:27 AM, Gan Uesli Starling wrote: > So I'm trying to accumulate data for state/prov inside of USA, Canada and > Mexico, and country for the rest of the world. > > Since country and state from the same update are factors in incrementing > each of four

Re: [sqlite] difference between 'ID IS NULL' and 'ID = NULL'

2018-01-05 Thread Doug Currie
Cezary is correct, NULL is not equal to NULL, though NULL is NULL. sqlite> select NULL IS NULL; 1 sqlite> select NULL = NULL; sqlite> e ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

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

2018-03-16 Thread Doug Currie
0 ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Question about Practicality of Embedding SQLite on Cortex-M4 Processor

2018-03-02 Thread Doug Currie
On Fri, Mar 2, 2018 at 2:46 PM, Obrien, John J wrote: > [...] > > To summarize, my question is regarding what direction I should ask the > hardware vendor to take. Does it make sense for them to spend time > optimizing the SAM4S for SQLite or should we consider another

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

2019-06-14 Thread Doug Currie
On Fri, Jun 14, 2019 at 7:16 AM R Smith wrote: > > What I was objecting to, is claiming (in service of suggesting the > use-case for -0.0), [...] > > I'll be happy to eat my words if someone can produce a mathematical > paper that argued for the inclusion of -0.0 in IEEE754 to serve a >

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

2019-06-13 Thread Doug Currie
> > > Except by the rules of IEEE (as I understand them) > > -0.0 < 0.0 is FALSE, so -0.0 is NOT "definitely left of true zero" > Except that 0.0 is also an approximation to zero, not "true zero." Consider that 1/-0.0 is -inf whereas 1/0.0 is +int e

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

2019-06-13 Thread Doug Currie
> > I do not know if this is the result case in any of the programming > languages, but in Mathematical terms that is just not true. > The related IEEE 754 rules are described here: https://en.wikipedia.org/wiki/Signed_zero e ___ sqlite-users mailing

Re: [sqlite] Deterministic random sampling via SELECT

2019-11-07 Thread Doug Currie
On Thu, Nov 7, 2019 at 4:23 PM Richard Damon wrote: > > One thought would be to generate a ‘hash’ from part of the record, maybe > the record ID, and select records based on that value. The simplest would > be something like id%100 == 0 would get you 1% of the records. That > admittedly isn’t

<    1   2