Re: [sqlite] "Responsive" website revamp at www.sqlite.org

2016-09-06 Thread Stephan Beal
annot be done anywhere near reliably. They are free-form strings, often intentionally obfuscated (MSIE does this now, we recently discovered, presumably to try to keep people from implementing IE-specific workarounds). -- - stephan beal http://wanderinghorse.net/home/stephan/ "Freedom is s

Re: [sqlite] "Responsive" website revamp at www.sqlite.org

2016-09-06 Thread Stephan Beal
o business assuming they do. It's likely that assumption about my preferences/limits which annoys me more than the limitation itself does. -- - stephan beal http://wanderinghorse.net/home/stephan/ "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those who insist on a

Re: [sqlite] "Responsive" website revamp at www.sqlite.org

2016-09-06 Thread Stephan Beal
creen the lines > of text stretch to the whole browser width, which is not very readable. > A counter-opinion, though apparently in the small minority: i _absolutely despise_ fixed-width web site layouts. -- - stephan beal http://wanderinghorse.net/home/stephan/ "Freedom is s

Re: [sqlite] Why MMAP return ENOMEM in SQLite?

2016-08-31 Thread Stephan Beal
akes 10ms or 800ms should, for such platforms, be irrelevant. i _suspect_ that you are overestimating the impact of your perceived performance problem on the end users. But that's all just my opinion based on experience - i have no facts or statistics to back it up. Maybe it will work well for you. --

Re: [sqlite] Why MMAP return ENOMEM in SQLite?

2016-08-31 Thread Stephan Beal
r more, bigger problems than the perceived performance problems you have right now. The chances that something breaks with that approach is, i suspect, very high. You will eventually corrupt a database and then write back to the list to ask why that approach corrupted it. -- - stephan beal ht

Re: [sqlite] Why MMAP return ENOMEM in SQLite?

2016-08-31 Thread Stephan Beal
On Wed, Aug 31, 2016 at 10:43 AM, Stephan Beal <sgb...@googlemail.com> wrote: > On Wed, Aug 31, 2016 at 10:39 AM, sanhua.zh <sanhua...@foxmail.com> wrote: > >> In my testcase, I can only [mmap] a db file at most 1.4GB size. But in >> this new way, I can map a file

Re: [sqlite] Why MMAP return ENOMEM in SQLite?

2016-08-31 Thread Stephan Beal
M, so you can't memmap 3.2G. In any case, as Simone said, _other apps_ require memory of their own as well. Your app does not have that whole 2G to itself. -- ----- stephan beal http://wanderinghorse.net/home/stephan/ "Freedom is sloppy. But since tyranny's the only guaranteed byproduct

Re: [sqlite] SQLite in VS2015 Server Explorer (Bugs)

2016-08-24 Thread Stephan Beal
gram (neither of which include a schema design tool). Server Explorer is a 3rd-party product. -- - stephan beal http://wanderinghorse.net/home/stephan/ "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those who insist on a perfect wo

Re: [sqlite] Exec vs Prepare, step, finalize.

2016-08-11 Thread Stephan Beal
ry much preferred in most cases, but > wondered if those cases where SQL is application provided were an > exception. I'm leaning towards a no on that now. Thanks for your input and > in advance or any additional insight. > FWIW, internally, exec() is just a proxy for prepare/step/finalize

Re: [sqlite] [Spellfix] Inexplicable discrepancy concerning query results

2016-07-21 Thread Stephan Beal
nges the result, so it is not the > case, that SQLite does not process the scope operation via the > Python-SQLite interface. > > Any idea? > It sounds to me like your python and local sqlite shell are using different sqlite versions. -- - stephan beal http://wanderingho

Re: [sqlite] ":memory:" path does not seem to work on Windows anymore

2016-05-30 Thread Stephan Beal
f it cannot be reproduced in the cli client then the wrapper is the most likely culprit. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those who insist on a perfect world, freedom wi

[sqlite] sqlite3_prepare*() statement argument detailed

2016-05-16 Thread Stephan Beal
ough this argument? Compound statements, > transactions? What syntax? > The first _SQL statement_ is processed. Anything after that is ignored. e.g. select 1 from foo; -- first statement ends here select 2 from foo; -- this is ignored. -- - stephan beal http://wanderinghorse.net/home/stepha

[sqlite] Podcast with Dr Hipp: SQLite history, success and funding

2016-05-15 Thread Stephan Beal
On Sun, May 15, 2016 at 2:29 PM, Tim Streater wrote: > What's all this about licences. AIUI, SQLite is explicitly in the public > domain. Meaning the question of licence doesn't arise. > it does, actually, because PD is not recognized in all jurisdictions. -- - stephan

[sqlite] Why the back-up database file does not shrink as the source database shrink?

2016-05-13 Thread Stephan Beal
size of the target database > should be kept consistent with the source database. Otherwise, quite lots > of disk space will be wasted in case source database shrinks Not a bug: sqlite saves removed "pages" for later use. Use the VACUUM command to tell it to get rid of them and shrink y

[sqlite] determining is-leap-year in sqlite

2016-05-09 Thread Stephan Beal
On Mon, May 9, 2016 at 7:00 PM, jungle Boogie wrote: > On 8 May 2016 at 23:13, Stephan Beal wrote: > > On Mon, May 9, 2016 at 5:40 AM, Stephan Beal > wrote: > > > >> That suggests that the script is not consistently telling sqlite which > TZ > >> to use

[sqlite] Good way for CEIL, or is there a better way

2016-05-09 Thread Stephan Beal
in sqlite by default. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those who insist on a perfect world, freedom will have to do." -- Bigby Wolf

[sqlite] determining is-leap-year in sqlite

2016-05-09 Thread Stephan Beal
On Mon, May 9, 2016 at 5:40 AM, Stephan Beal wrote: > That suggests that the script is not consistently telling sqlite which TZ > to use in all calculations. i will take a look at it as time > just fyi: i can now reproduce the problem on my x64, where my days are shifted 1 to the left.

[sqlite] determining is-leap-year in sqlite

2016-05-09 Thread Stephan Beal
That suggests that the script is not consistently telling sqlite which TZ to use in all calculations. i will take a look at it as time allows. Probably just need to be sure to consistently pass the final argument to strftime(). - stephan (Sent from a mobile device, possibly from bed. Please

[sqlite] determining is-leap-year in sqlite

2016-05-08 Thread Stephan Beal
On Sun, May 8, 2016 at 10:53 AM, Stephan Beal wrote: > The system clock is correct on your x64 machine, i assume? (Even if it's > wrong, that doesn't explain the days being shifted left by 1.) > One idea comes to mind: perhaps it doesn't consistently deal with timezones everywhere, a

[sqlite] determining is-leap-year in sqlite

2016-05-08 Thread Stephan Beal
. The system clock is correct on your x64 machine, i assume? (Even if it's wrong, that doesn't explain the days being shifted left by 1.) -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sloppy. But since tyranny's the only guaranteed byproduct

[sqlite] strftime accepts an illegal time string

2016-05-05 Thread Stephan Beal
t again, etc i think this is easier: check if the year as 365 or 366 days: sqlite> select strftime('%j', '2016-12-31'); 366 sqlite> select strftime('%j', '2015-12-31'); 365 with the usual caveats for dates in the far past. -- - stephan beal http://wanderinghorse.net/home/stephan/ http

[sqlite] BUG?

2016-04-22 Thread Stephan Beal
On Fri, Apr 22, 2016 at 9:18 AM, Rowan Worth wrote: > On 22 April 2016 at 14:54, Stephan Beal wrote: > > but i beg to differ that that works in 100% of cases. > > > > Lets see, for a 64-bit float we have 53 bits of significand. The number > ...of ambiguity. Pretty sur

[sqlite] BUG?

2016-04-22 Thread Stephan Beal
On Fri, Apr 22, 2016 at 8:43 AM, Clemens Ladisch wrote: > Stephan Beal wrote: > > On Thu, Apr 21, 2016 at 4:12 PM, jrhgame wrote: > >> SELECT julianday('2016-04-15 12:10:10') ==>2457494.00706 > >> SELECT datetime(2457494.00706) ==>2016-04-15 12:1

[sqlite] BUG?

2016-04-22 Thread Stephan Beal
compared to i64. -- ----- stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those who insist on a perfect world, freedom will have to do." -- Bigby Wolf

[sqlite] Expecting syntax error on delete

2016-04-10 Thread Stephan Beal
; > $stat = $p->exec($sql); > ('abc' & 'def') does not produce a syntax error: sqlite> select 'abc' & 'def'; 0 so your SQL was well-formed, just not what you wanted. Your IN(...) effectively resolved to IN(0). -- - stephan beal http://wanderinghorse.net/home/stephan/

[sqlite] You may add sha256 checksum for files in the download page?

2016-04-02 Thread Stephan Beal
Does anyone have a good reason why SHA1 is still > needed ? > FWIW: https://en.wikipedia.org/wiki/SHA-2 "Although (as of 2015) no example of a SHA-1 collision has been published yet..." -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Fr

[sqlite] SQLite with wall enabled what's wrong C demo

2016-03-24 Thread Stephan Beal
de there. If you'll check those codes, you may be able to find out immediately what the problem is. A Golden Rule of C APIs is: if you ignore the result codes, the API may ignore you. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sloppy. Bu

[sqlite] dump only data, change schema, reload

2016-03-23 Thread Stephan Beal
original table create table original_table (...); -- w/ new schema insert into original_table (a,b,c) select a,b,c from foo; -- assuming no transformation needs to take place drop table foo; -- though you'll probably want to keep the old copy "just in case" -- - stephan beal http://

[sqlite] CAST STRING => INTEGER

2016-03-14 Thread Stephan Beal
to use integers above 9223372036854775807 is something that is better > not to be done. > Also beware that some scripting languages only support 48 bits of integer precision, so 64 bits may or may not be usable in any given scripting language environment. -- - stephan beal http://wanderingh

[sqlite] compile switches: SQLITE_OMIT_ATTACH & SQLITE_OMIT_VIRTUALTABLE

2016-03-09 Thread Stephan Beal
of SQLITE_OMIT_* options. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those who insist on a perfect world, freedom will have to do." -- Bigby Wolf

[sqlite] How does your sqlite script binding handle aggregate UDFs?

2016-03-06 Thread Stephan Beal
On Sat, Mar 5, 2016 at 9:22 PM, Stephan Beal wrote: > Aggregates are _currently_ modeled as a single function which gets called > just like normal function, but in the aggregate's "final" call the engine > calls the aggregate function with no arguments (this is how th

[sqlite] How does your sqlite script binding handle aggregate UDFs?

2016-03-06 Thread Stephan Beal
On Sat, Mar 5, 2016 at 11:58 PM, Richard Hipp wrote: > On 3/5/16, Stephan Beal wrote: > > On Sat, Mar 5, 2016 at 10:43 PM, Domingo Alvarez Duarte < > > > > The scenario i'm concerned about is that sqlite calls my aggregate N > times, > > then an error is trigg

[sqlite] How does your sqlite script binding handle aggregate UDFs?

2016-03-05 Thread Stephan Beal
On Sat, Mar 5, 2016 at 11:21 PM, Stephan Beal wrote: > On Sat, Mar 5, 2016 at 10:43 PM, Domingo Alvarez Duarte < > sqlite-mail at dev.dadbiz.es> wrote: > >> Hello ! >> >> There is an user pointer that you pass and you can get it back using >> http

[sqlite] How does your sqlite script binding handle aggregate UDFs?

2016-03-05 Thread Stephan Beal
re which keeps sqlite from making the final() aggregate call. Currently i reset my accumulation state in the final() bits, but if final() is never called, then the _next_ time someone calls the aggregate, it will still have accumulated state from the previous attempt which failed partway through. -

[sqlite] How does your sqlite script binding handle aggregate UDFs?

2016-03-05 Thread Stephan Beal
ls. How are script bindings handling such situations? Where are they initializing and resetting any "accumulator data" in their aggregates? Any insights and suggestions would be appreciated. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sl

[sqlite] Random-access sequences

2016-03-01 Thread Stephan Beal
51616 or about 1.8e+19). This limit is unreachable since the maximum database size of 140 terabytes will be reached first. A 140 terabytes database can hold no more than approximately 1e+13 rows, and then only if there are no indices and if each row contains very little data. -- - stephan beal http://w

[sqlite] MIN/MAX of column loses decltype

2016-02-22 Thread Stephan Beal
ftime() uses them and the Fossil SCM (which hosts sqlite) uses them: https://www.sqlite.org/lang_datefunc.html -- ----- stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those who insist o

[sqlite] User-defined SQL functions

2016-02-21 Thread Stephan Beal
[SQLITE_DETERMINISTIC] flag is recommended where possible. Note that it says within a single statement, not a transaction. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those who

[sqlite] determining is-leap-year in sqlite

2016-02-19 Thread Stephan Beal
27 > 28 29 > LOL! i needed about 6 hours (and 6 times the code) to do that! Extremely impressive! -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those who insist on a

[sqlite] determining is-leap-year in sqlite

2016-02-19 Thread Stephan Beal
On Fri, Feb 19, 2016 at 1:53 AM, Stephan Beal wrote: > It can now optionally mark the current date (but this feature slowed it > down from 'instant' to 'just under a second or so', possibly due to SQL > inefficiencies on my part). > Trimming the list of years from 100 years to no

[sqlite] determining is-leap-year in sqlite

2016-02-19 Thread Stephan Beal
On Fri, Feb 19, 2016 at 12:36 AM, k wrote: > On 18/02/2016 21:55, Stephan Beal wrote: > >> >>> http://fossil.wanderinghorse.net/download/cal.sql >>> >>> >> Excellent CTE query, thanks, but one question: the query uses > group_concat() and the d

[sqlite] determining is-leap-year in sqlite

2016-02-18 Thread Stephan Beal
On Thu, Feb 18, 2016 at 10:42 PM, Stephan Beal wrote: > Here we go: > > http://fossil.wanderinghorse.net/download/cal.sql > sorry, one more: it was just updated with minor doc improvements and better syntax conformance (i had used a lot of double-quotes simply out of recent scr

[sqlite] determining is-leap-year in sqlite

2016-02-18 Thread Stephan Beal
On Thu, Feb 18, 2016 at 10:22 PM, Stephan Beal wrote: > On Thu, Feb 18, 2016 at 10:19 PM, Richard Hipp wrote: > >> On 2/18/16, Stephan Beal wrote: >> > >> > Thanks again to all for the feedback and suggestions! >> > >> >> After your talk,

[sqlite] determining is-leap-year in sqlite

2016-02-18 Thread Stephan Beal
On Thu, Feb 18, 2016 at 10:19 PM, Richard Hipp wrote: > On 2/18/16, Stephan Beal wrote: > > > > Thanks again to all for the feedback and suggestions! > > > > After your talk, can we publish your calendar CTE as another example > in the SQLite documentation?

[sqlite] determining is-leap-year in sqlite

2016-02-18 Thread Stephan Beal
On Thu, Feb 18, 2016 at 9:52 PM, Stephan Beal wrote: > -- >> Feb 2016 >> 1 2 3 4 5 6 7 >> 8 9 10 11 12 13 14 >> 15 16 17 18 19 20 21 >> 22 23 24 25 26 27 28 >> >> Thank you!!! >> >> Not half bad

[sqlite] determining is-leap-year in sqlite

2016-02-18 Thread Stephan Beal
On Thu, Feb 18, 2016 at 9:50 PM, Stephan Beal wrote: > i could do with the \r, but CHAR(10) does indeed do the trick: > withOUT the \r... > > -- > Feb 2016 > 1 2 3 4 5 6 7 > 8 9 10 11 12 13 14 > 15 16 17 18 19 20 21 > 22 23 2

[sqlite] determining is-leap-year in sqlite

2016-02-18 Thread Stephan Beal
26 27 28 Thank you!!! Not half bad, if i may say so :). i will post the complete solution (for a given definition of "solution") once i've cleaned it up notably... and figure out how the last part of it actually works. :/ Look for it over the weekend. Thanks again! --

[sqlite] determining is-leap-year in sqlite

2016-02-18 Thread Stephan Beal
On Thu, Feb 18, 2016 at 9:16 PM, Stephan Beal wrote: > Okay, i've hit a small stump and i'm looking for a hint without giving it > away: > > January and February 2016: > > [stephan at host:~/tmp]$ sqlite3 < cal.sql > 1 2 3 > 4 5 6 7 8 9 10 >

[sqlite] determining is-leap-year in sqlite

2016-02-18 Thread Stephan Beal
sn't half as problematic as i expected. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those who insist on a perfect world, freedom will have to do." -- Bigby Wolf

[sqlite] determining is-leap-year in sqlite

2016-02-18 Thread Stephan Beal
the first 3 fields used to draw > the graph - play with those parameters for fun. > i wouldn't even know what to do with them :/. > (I hope the mail system don't mess up the format too much...) > Nope - came across loud and clear. -- - stephan beal http://wanderinghorse.net/hom

[sqlite] determining is-leap-year in sqlite

2016-02-18 Thread Stephan Beal
Sunday=7 (instead of 0) because that's just how we roll in Germany.) -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those who insist on a perfect world, freedom will have to do." -- Bigby Wolf

[sqlite] determining is-leap-year in sqlite

2016-02-18 Thread Stephan Beal
o! > > Look at the year 1752 -- you may notice something odd happened that > September. :-) > Yeah, i should have mentioned that i'm simplifying to the range of dates "sometime within my lifetime." Anything else is irrelevant for my presentation ;). -- - stephan beal htt

[sqlite] determining is-leap-year in sqlite

2016-02-18 Thread Stephan Beal
< cal.sql 2016|1|31 2016|2|29 2016|3|31 2016|4|30 2016|5|31 2016|6|30 2016|7|31 2016|8|31 2016|9|30 2016|10|31 2016|11|30 2016|12|31 Obviously still lots to do here. (Again, _please_ don't post spoilers for calendar CTE solutions (in this thread)!) Have fun! -- - stephan beal http://wa

[sqlite] Possible error using length on UTF-8 characters

2016-02-17 Thread Stephan Beal
you've stored the data as a BLOB, not TEXT. You need to confirm that you haven't stored the field as a blob. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those who insist on a perfect worl

[sqlite] Possible error using length on UTF-8 characters

2016-02-17 Thread Stephan Beal
at, but someone on this list does and will likely answer very soon. (Yes, i'm looking at you, Simon!) -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those who insist on a perfect world, freedom will have to do." -- Bigby Wolf

[sqlite] Possible error using length on UTF-8 characters

2016-02-17 Thread Stephan Beal
ings do not normally contain NUL characters, the length(X) function will usually return the total number of characters in the string X. For a blob value X, length(X) returns the number of bytes in the blob. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Free

[sqlite] Unicode issue on windows consoles. Was: Version 3.11.0 beta

2016-02-11 Thread Stephan Beal
utf8.c It also takes care of some weird Appleness cases. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those who insist on a perfect world, freedom will have to do." -- Bigby Wolf

[sqlite] Fossil sqlite clone problem

2016-02-09 Thread Stephan Beal
n that was the newest. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those who insist on a perfect world, freedom will have to do." -- Bigby Wolf

[sqlite] Fossil sqlite clone problem

2016-02-09 Thread Stephan Beal
On Tue, Feb 9, 2016 at 5:38 PM, Stephan Beal wrote: > fossil pull --verily > > in the past that's helped people reporting problems about a repo silently > failing to pull past a certain version. > OTOH, if that tag is checked out, which your output indicates is the cas

[sqlite] Fossil sqlite clone problem

2016-02-09 Thread Stephan Beal
e: fossil pull --verily in the past that's helped people reporting problems about a repo silently failing to pull past a certain version. -- ----- stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sloppy. But since tyranny's the only guaranteed by

[sqlite] How to enter Unicode character?

2016-02-08 Thread Stephan Beal
; > right? > That's what Unix would do. So... on Windows, probably not ;). -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those who insist on a perfect world, freedom will have to do." -- Bigby Wolf

[sqlite] How to enter Unicode character?

2016-02-08 Thread Stephan Beal
ogle for "utf8 character tables" and copy/paste them. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those who insist on a perfect world, freedom will have to do." -- Bigby Wolf

[sqlite] json_group_array

2016-02-05 Thread Stephan Beal
ckoverflow.com/questions/30585552/how-to-represent-an-array-with-empty-elements-in-json tl;dr: "jsonlint" also says empty array elements aren't allowed. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sloppy. But since tyranny's the only g

[sqlite] json1 not escaping CRLF characters

2016-02-04 Thread Stephan Beal
-- From: Douglas Crockford To: Stephan Beal Subject: Re: Is escaping of forward slashes required? It is allowed, not required. It is allowed so that JSON can be safely embedded in HTML, which can freak out when seeing strings containing "

[sqlite] sqldiff.c : 2 benign warnings in 64 bits builds

2016-01-26 Thread Stephan Beal
On Tue, Jan 26, 2016 at 6:40 PM, Scott Robison wrote: > On Tue, Jan 26, 2016 at 8:21 AM, Stephan Beal > wrote: > > fwiw, in case this matters: size_t has an unspecified size and it's not > in > > C89. It's defined by C99 in stddef.h > > > > size_t (and ptrdiff_t

[sqlite] sqldiff.c : 2 benign warnings in 64 bits builds

2016-01-26 Thread Stephan Beal
way. > fwiw, in case this matters: size_t has an unspecified size and it's not in C89. It's defined by C99 in stddef.h -- ----- stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those who insis

[sqlite] Bug: Successfully committed transaction rolled back after power failure

2016-01-25 Thread Stephan Beal
s. The bookmark database is still completely intact - it > just went backwards in time a little. > Or, alternately, it _never went forward_ in time. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sloppy. But since tyranny's the only gua

[sqlite] Get X number of random integer numbers between A and B

2016-01-22 Thread Stephan Beal
On Fri, Jan 22, 2016 at 12:22 PM, Stephan Beal wrote: > > > On Fri, Jan 22, 2016 at 12:11 PM, Bart Smissaert > wrote: > >> Say I want 1 random numbers between 100 and 1000 how can I do that >> without >> selecting from a table? >> I know I can do: >

[sqlite] Get X number of random integer numbers between A and B

2016-01-22 Thread Stephan Beal
619|3 380|4 412|5 263|6 563|7 877|8 573|9 468|10 just swap out the 'conf' part with 1000. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those who insist on a perfect world, freedom will have to do." -- Bigby Wolf

[sqlite] .read bug

2016-01-21 Thread Stephan Beal
The problem is that you are using unusual quotes. Use only standard double-quotes for identifiers and single-quotes for strings. Your example uses "fancy" quotes commonly seen in word processors. - stephan Sent from a mobile device, possibly from bed. Please excuse brevity, typos, and

[sqlite] Database Corrupt While Disk Full

2016-01-14 Thread Stephan Beal
On Thu, Jan 14, 2016 at 2:09 PM, Stephan Beal wrote: > FULL means the drive is full. Most apps can't do much about that. It > generally needs to be resolved by user action - freeing up space. > Alternately, FULL can mean that the current VFS cannot allocate space, even though it's u

[sqlite] Database Corrupt While Disk Full

2016-01-14 Thread Stephan Beal
neric recovery strategy aside from throwing the DB away and building it anew. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those who insist on a perfect world, freedom will have to do." -- Bigby Wolf

[sqlite] Database Corrupt While Disk Full

2016-01-14 Thread Stephan Beal
g 3 different error codes (all of them serious). That misuse is what corrupted it. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those who insist on a perfect world, freedom will have to do." -- Bigby Wolf

[sqlite] hard links and SQLite

2016-01-11 Thread Stephan Beal
On Mon, Jan 11, 2016 at 7:57 PM, Stephan Beal wrote: > On Mon, Jan 11, 2016 at 7:55 PM, Warren Young wrote: > >> On POSIX systems, you can securely create a temp file that only your user >> can see via the mkstemp(3) C library call. SQLite will happily open the >&g

[sqlite] hard links and SQLite

2016-01-11 Thread Stephan Beal
ng. :) > sqlite exposes the functionality of fetching a temp file name using its mechanism, but i don't recall at the moment how it's done. A quick google isn't revealing it but i recall using it but finding out that it doesn't work with the :memory: VFS. -- - stephan beal http://wanderinghorse.net/ho

[sqlite] Can SQLite know from the statement string if it is row producing or not?

2016-01-09 Thread Stephan Beal
gt; > I need to know before stepping, but it can do that. > > For a SELECT which returns no rows I presume it returns the number of > columns asked for. It does. i use this in a db abstraction layer to fetch column names without needing to fetch data. -- - stephan beal http://wanderi

[sqlite] batch or one by one?

2015-12-17 Thread Stephan Beal
a legacy interface that is preserved for backwards compatibility. Use of this interface is not recommended. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those who insist on a perfect w

[sqlite] Very Strange and Interesting Problem

2015-12-14 Thread Stephan Beal
On Mon, Dec 14, 2015 at 11:47 AM, Stephan Beal wrote: > On Mon, Dec 14, 2015 at 11:21 AM, ??? <2004wqg2008 at 163.com> wrote: > >> hi, every one. >> Here is a very strange and interesting problem. >> I used the following SQL to create the table teache

[sqlite] Very Strange and Interesting Problem

2015-12-14 Thread Stephan Beal
guessing that you are using an abstraction layer which is changing the returned name of your rowid. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those who insist on a perfect world, freedom will have to do." -- Bigby Wolf

[sqlite] Why Corrupted DB File Cause No Error?

2015-12-02 Thread Stephan Beal
error. > It's a hypothetical problem. It doesn't happen with correct usage, and sqlite cannot protect users from all possible misuse. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sloppy. But since tyranny's the only guaranteed byprod

[sqlite] Why Corrupted DB File Cause No Error?

2015-12-02 Thread Stephan Beal
when you open the db. It would have to read the whole db to figure that out, slowing sqlite to a crawl. Since most dbs are not corrupt, it would be slowest for the average case and faster for the error case (since it must stop reading on the first error). -- - stephan beal http://wandering

[sqlite] attempt at output with thousands separator via extension

2015-11-23 Thread Stephan Beal
> If I figure out some clever I will share for the benefit of other shell > junkies that like neat easily readable numeric output - all 6 of us :) > i think you mean all 6,0 of you ;). -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freed

[sqlite] Retrieving the table info fails

2015-11-16 Thread Stephan Beal
On Mon, Nov 16, 2015 at 6:42 PM, Stephan Beal wrote: > On Mon, Nov 16, 2015 at 6:11 PM, Igor Korot wrote: > >> The variables referenced are defined as "std::string" and the code is in >> C++. >> > > the std::string(char const *) constructor does not, la

[sqlite] Retrieving the table info fails

2015-11-16 Thread Stephan Beal
struct null not valid Aborted -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those who insist on a perfect world, freedom will have to do." -- Bigby Wolf

[sqlite] [AGAIN] SQLite on network share

2015-11-13 Thread Stephan Beal
all MySQL on it and completely bypass the file-sharing problems and corruption which _will_ happen if you try to use sqlite3 on a shared network filesystem. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sloppy. But since tyranny's the only guaranteed bypr

[sqlite] Array or set type or some other indexable data?

2015-11-12 Thread Stephan Beal
ame on > option4_map.name_id=option4_name.name_id \ > ... -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those who insist on a perfect world, freedom will have to do." -- Bigby Wolf

[sqlite] A little light reading

2015-11-08 Thread Stephan Beal
paying attention in the design and/or implementation. That poor guy. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those who insist on a perfect world, freedom will have to do." -- Bigby Wolf

[sqlite] field name in UDF

2015-11-07 Thread Stephan Beal
nd users): UDFs are variadic, so you could pass an optional 2nd parameter with any information as a string to the final parameter, e.g.: select quarter(t.a, 't.a'), quarter(4,'four') from t; -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedo

[sqlite] field name in UDF

2015-11-06 Thread Stephan Beal
he values resolved by the surrounding evaluation engine. By the same token (no pun intended), in JavaScript: var x = 3; quarter(x); gets only the number 3, not any information about where that 3 comes from or how it was derived. -- - stephan beal http://wanderinghorse.net/home/stephan/ http

[sqlite] field name in UDF

2015-11-06 Thread Stephan Beal
d in, it would sometimes be helpful to > have the associated field (if any) that the value is associated with. > > Is there any way to retrieve that? > UDFs receive expanded/evaluated values, not fields: select quarter(t1.a+t2.a+t3.a+3.0) from t1, t2, t3...; what field would you expect t

[sqlite] Non-transitive numeric equality

2015-11-05 Thread Stephan Beal
an you could possible want on the reason: http://www.mail-archive.com/sqlite-users at mailinglists.sqlite.org/msg04466.html -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those

[sqlite] Simple Math Question

2015-10-22 Thread Stephan Beal
esults at a specific precision. See: http://floating-point-gui.de/ the first example of which demonstrates the problem you are seeing. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those who insist on a perfect world, freedom will have to do." -- Bigby Wolf

[sqlite] sqlite 3.8.11 - binary size

2015-10-22 Thread Stephan Beal
> We carefully monitor the size of the compiled SQLite binary. A graph > of that size is shown at > > https://www.sqlite.org/binary-size.jpg > > The 627.4KB for 3.8.11 is within reason, depending on what compiler > you are using. But SQLite has *never* been as small as 44.8 KB. Is > that a

[sqlite] SQLite list user phishing Alexa

2015-10-18 Thread Stephan Beal
On Sun, Oct 18, 2015 at 12:30 PM, Richard Hipp wrote: > On 10/18/15, Stephan Beal wrote: > > It didn't appear to come directly from the list - i suspect someone is > > scraping the ML archives. > > > > Are the messages you are receiving passing through the sqlit

[sqlite] SQLite list user phishing Alexa

2015-10-18 Thread Stephan Beal
aping the ML archives. -- ----- stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those who insist on a perfect world, freedom will have to do." -- Bigby Wolf

[sqlite] SQLite list user phishing Alexa

2015-10-18 Thread Stephan Beal
ut very very slow on Windows Seven", a > post I replied to today. > -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those who insist on a perfect world, freedom will have to do." -- Bigby Wolf

[sqlite] Sqlite good on Windows XP but very very slow on Windows Seven

2015-10-17 Thread Stephan Beal
r hypotheses: if you are on the same hardware which was running XP, the hardware might simply be too old to perform well (for anything) on Win7. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sloppy. But since tyranny's the only guaranteed b

[sqlite] Odd download file names

2015-09-30 Thread Stephan Beal
ce that option works with any fossil CLI commands. -- ----- stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those who insist on a perfect world, freedom will have to do." -- Bigby Wolf

[sqlite] Any database unique ID across multiple connections ?

2015-09-24 Thread Stephan Beal
have multiple connections to a single :memory: db. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those who insist on a perfect world, freedom will have to do." -- Bigby Wolf

[sqlite] I don't understand why I get "cannot start a transaction within a transaction"

2015-08-31 Thread Stephan Beal
I still see the row/entry for 'loki' > Nope - you have only run the BEGIN part of the transaction. prepare() prepares only one single statement, not multiples (you have 4 statements in your SQL). Thus when you try to run another transaction, that BEGIN is still open. -- - stephan beal http:

  1   2   3   4   5   6   7   >