[sqlite] extension_functions.c - node_iterate blows stack

2019-10-01 Thread Dave King
Hi all, I ran into an issue with the extension-functions.c file posted here, in that iterating through the binary tree representation for mode/median/quartile isn't done in a tail recursive way, which can cause a stack frame violation:

[sqlite] pointer-passing interface, and testing if pointer is correct 'type'....

2019-06-15 Thread dave
*); gets pointer as per usual, and if final parameter is non-null, provide a 'boolean' indicating that it was validly bound. Thanks! -dave ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman

Re: [sqlite] sqlite segfault on INNER JOIN ON (...) + WHERE fieldIN (list, of, items)

2019-02-19 Thread dave
s for the info. I wonder if it makes sense for me to include the SQLITE_DEBUG in all debug configurations of my product? Does it have any untoward effect other than maybe slowdowns etc? -dave ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite

Re: [sqlite] sqlite segfault on INNER JOIN ON (...) + WHERE fieldIN (list, of, items)

2019-02-19 Thread dave
ULL Lastly, if it helps, converting the query to: SELECT a.id FROM t AS a INNER JOIN t as b ON a.id = b.id WHERE a.id = 1 or a.id = 2 or a.id = 3; Does /not/ crash. (and nice work on the bisect! Lol) -dave ___ sqlite-users mailing list sqlit

Re: [sqlite] sqlite segfault on INNER JOIN ON (...) + WHERE field IN (list, of, items)

2019-02-19 Thread dave
State * p, char * zSql, _iobuf * in, int startline) Line 16106 sqlite3.exe!process_input(ShellState * p) Line 16206 sqlite3.exe!wmain(int argc, wchar_t * * wargv) Line 16959 Hth a little. Cheers, -dave ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] virtual table xBestIndex and SQLITE_CONSTRAINT andzErrMsg

2019-02-19 Thread dave
> On 2/19/19, dave wrote: > > addition, but I have lost a capability relative to the > prior scheme of using > > high query cost along with a special flag communicated in > pIdxInfo->idxNum, > > that being the ablilty to emit contextual info as to why

[sqlite] virtual table xBestIndex and SQLITE_CONSTRAINT and zErrMsg

2019-02-19 Thread dave
rom the previous rejected plan? I don't know if this would cause a problem or not. Cheers! -dave ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] Syntax clarification

2018-12-28 Thread Dave Delage
I've searched without success for this answer. I use SQLite3, Zeos and Delphi so maybe this isn't a perfectly sqlite3 question but here goes:  What are the pros/cons of query.sql.text := 'some string'; versus  query.sql.add('some string'); Dave --- This email has been checked

Re: [sqlite] Regarding CoC

2018-10-19 Thread Dave Waters
e staff, > and everybody approved. > > -- > D. Richard Hipp > d...@sqlite.org > ___ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users &

Re: [sqlite] [EXTERNAL] virtual tables, xBestIndex, pIdxInfo->aConstraint[].op, and 'NOT'...

2018-10-17 Thread dave
point I'll assume the 'NOT' variant of MATCH, LIKE, GLOB, REGEXP are currently /not/ supported in xBestIndex, and just hope that maybe someday they will be. Cheers, and thanks for all the feedback! -dave ___ sqlite-users mailing list sqlite-users@mailin

Re: [sqlite] [EXTERNAL] virtual tables, xBestIndex, pIdxInfo->aConstraint[].op, and 'NOT'...

2018-10-16 Thread dave
f the behaviour of 'is' in sqlite. And if anyone has comnments regarding the first two issues I mentioned, namely the absence of support of NOT MATCH, NOT LIKE, NOT GLOB, NOT REGEXP in xBestIndex() And also the meaning/use of SQLITE_INDEX_CONSTRAINT_FUNCTION, that would be super helpful. Che

Re: [sqlite] [EXTERNAL] virtual tables, xBestIndex, pIdxInfo->aConstraint[].op, and 'NOT'...

2018-10-13 Thread dave
but I'm guessing that SQLite extends it's meaning. Interestingly a search condition "where name is true" parses and runs, but does /not/ cause invocation of xBestIndex at all. Cheers! -dave > -Original Message- > From: sqlite-users > [mailto:sqlite-users-boun...@ma

Re: [sqlite] [EXTERNAL] virtual tables, xBestIndex, pIdxInfo->aConstraint[].op, and 'NOT'...

2018-09-24 Thread dave
with those embedded extensions relative to the implementation in 3.20, but this may compell me to do so. (I use shell.c in a special debug build of my product). Thanks! -dave > -Original Message- > From: sqlite-users > [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On > Be

[sqlite] virtual tables, xBestIndex, pIdxInfo->aConstraint[].op, and 'NOT'...

2018-09-23 Thread dave
the operator set in some way to present the negative clauses at some release in the future? Thanks for any info! -dave ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Configuring csv extension to use '; ' as column delimiter instead of ',' ?

2018-05-01 Thread dave
AL TABLE CSV (...) So maybe one would just need to modify the csvtabCreate to process some additional parameters and propagate those settings to the implementation. -dave ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://maili

Re: [sqlite] copmile SQLite with extension?

2018-04-26 Thread dave
on * you can make that registration more transparent by using the sqlite3_auto_extension() mechanism HTH -dave ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Are you getting spam when you post to sqlite-users ?

2018-04-18 Thread dave
Wouldn't it be as simple as subscribing to the mailing list and harvesting the emails directly from the inbound content? Because as it is, everyone's real email already comes to me in the list messages I receive (as 'sqlite-users on behalf of x...@yyy.com') The spam message I just received used

Re: [sqlite] [EXTERNAL] kooky thought: a vm-only build (for embedded). feasible?

2018-04-18 Thread dave
gt; able to create a valid sqlite3_stmt pointer from bytecode > stored somewhere. > > -Ursprüngliche Nachricht- > Von: sqlite-users > [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im > Auftrag von dave > Gesendet: Sonntag, 15. April 2018 20:55 > An: sqlite-use

Re: [sqlite] kooky thought: a vm-only build (for embedded).feasible?

2018-04-18 Thread dave
gt; -- > D. Richard Hipp > d...@sqlite.org Ah, groovy. Well, at least that is validation of the concept. So it sounds like I have a side project for my copious free time! -dave ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] kooky thought: a vm-only build (for embedded).feasible?

2018-04-15 Thread dave
to approach the surgery. -dave > -Original Message- > From: sqlite-users > [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On > Behalf Of Simon Slavin > Sent: Sunday, April 15, 2018 2:06 PM > To: SQLite mailing list > Subject: Re: [sqlite] kooky tho

[sqlite] kooky thought: a vm-only build (for embedded). feasible?

2018-04-15 Thread dave
for the whole system). Anway, has this been discussed before? Or is it a fool's errand? Cheers! -dave ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] [EXTERNAL] bind blob lifetime

2018-01-10 Thread Dave Milter
On Tue, Jan 9, 2018 at 7:28 PM, Hick Gunter wrote: > A bound blob or string is destroyed "after SQLite has finished with it". This > should be the case when sqlite3_clear_bindings() is called. Are you sure it > is not deleted then? Code reading suggests it should be. > > Other

[sqlite] bind blob lifetime

2018-01-09 Thread Dave Milter
I have cycle like this: ```c const char sql[] = "INSERT INTO test (pk, geom) VALUES (?, ?)"; sqlite3_stmt *stmt; sqlite3_prepare_v2 (handle, sql, strlen (sql), , NULL); for (...) { sqlite3_reset (stmt); sqlite3_clear_bindings (stmt); int blob_size = ..; unsigned

Re: [sqlite] API, sqlite3_value_bytes and sqlite3_value_blob...

2017-12-13 Thread dave
> -Original Message- > Behalf Of J Decker ... > <peter.nichvolo...@gmail.com> wrote: > > > Dave. The documentation contains many such catch-all > statements which do ... > > The current decision tree of the particular catch-all > documentation c

[sqlite] API, sqlite3_value_bytes and sqlite3_value_blob...

2017-12-13 Thread dave
, 613; 616, 617 (I stopped grepping at this point; this list is not comprehensive). Anyway, just wondered if the api documentation's advice is maybe out-of-date with current reality. Thoughts/comments? Cheers! -dave ___ sqlite-users mailing list sq

Re: [sqlite] readfile/writefile extensioln, and UTF8 on Windows....

2017-12-11 Thread dave
to the ones I used * etc. Cheers, -dave //fileio.patch start === 18a19,21 > #if defined(WIN32) || defined(WIN64) || defined(WINDOWS) > #include > #endif 29a33,73 > #if defined(WIN32) || defined(WIN64) || defined(WINDOWS) > const char* zName; > int

Re: [sqlite] readfile/writefile extensioln, and UTF8 on Windows....

2017-12-11 Thread dave
recently had some trouble using the readfile() ... > > Attached herewith. > > Cheers! > > -dave ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] readfile/writefile extensioln, and UTF8 on Windows....

2017-12-11 Thread dave
builds. Attached herewith. Cheers! -dave ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] very sqlite3 noobie error

2017-10-23 Thread dave
er host language you are going to build the product in, because all the various language bindings (except for C) are separate projects and they differ. Just a thought; cheers -dave ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://m

Re: [sqlite] [EXTERNAL] xRowid and read only virtual tables....

2017-10-20 Thread dave
it has it's reasons. I should study the query planner implementation one day when I have some time Cheers! -dave ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] [EXTERNAL] virtual tables, and theTrue meaning of pIdxInfo->estimatedCost, pIdxInfo->estimatedRows, and pIdxInfo->idxFlags...

2017-10-20 Thread dave
guides the query planner more strongly in some direction. It also sounds like what I was doing (described in my first message, here elided), was fine. Thanks, and cheers! -dave ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] virtual tables, and theTrue meaning of pIdxInfo->estimatedCost, pIdxInfo->estimatedRows, and pIdxInfo->idxFlags...

2017-10-19 Thread dave
inking? Thanks in advance; cheers! -dave ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] [EXTERNAL] xRowid and read only virtual tables....

2017-10-17 Thread dave
les. > Thanks for your input as well; I somehow missed it until just now. Cheers! -dave ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] [EXTERNAL] xRowid and read only virtual tables....

2017-10-17 Thread dave
jects I've definitely used the counter trick before, caching the underlying data (to support updates and transactions) but those were known to be small datasets. This stuff coming from APIs could be big, so I wanted to avoid caching it all. But one does what one must Thanks for all the feedb

Re: [sqlite] xRowid and read only virtual tables....

2017-10-17 Thread dave
> On 10/16/17, dave <d...@ziggurat29.com> wrote: > > Hi, I am building a system which involves a number of virtual table > > implementations. They are all read-only, but will be > involved in a bunch of > > joins amongst themselves. My question is this: > &

[sqlite] xRowid and read only virtual tables....

2017-10-16 Thread dave
in particular because implementing it will be quite awkward for the underlying implementation in my case, and I'd very much prefer to skip it. Even a 'without rowid' table would imply specifying some primary key, which in a few cases would also be awkward. Thanks in advance, -dave

Re: [sqlite] eponymous vtables, xBestIndex, and required parameters...

2017-10-05 Thread dave
l > table are in reasonable proportion, everything should work fine. Thanks! I like the idxNum tweak for the error message; I'll add that stuff in. And the info about relative costs _on_the_same_virtual_table_ is very enlightening because I suppose the converse is true, that the e

[sqlite] eponymous vtables, xBestIndex, and required parameters...

2017-10-04 Thread dave
is far! And thanks even more if anyone can advise on how to deal with xBestIndex and required constraints on an eponymous vtable acting as a table-valued function! Cheers; -dave ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] GROUP_CONCAT separator and DISTINCT

2017-08-25 Thread Dave Blake
It seems that it is not possible to specify the concatenation separator when using GROUP_CONCAT with DISTINCT. For example while this works SELECT pub_id, GROUP_CONCAT(cate_id, " - ") FROM book_mast GROUP BY pub_id; and this works SELECT pub_id, GROUP_CONCAT(DISTINCT cate_id) FROM book_mast

Re: [sqlite] Testing sqlite db to see if exists & ready

2017-04-06 Thread dave boland
I assume this will work in a similar fashion for Python? On Thu, Apr 6, 2017, at 03:24 PM, Simon Slavin wrote: > > On 6 Apr 2017, at 7:38pm, dave boland <dbola...@fastmail.fm> wrote: > > > "unconfigured means no tables, no fields, no nothing. With SQLite, it > &

Re: [sqlite] Testing sqlite db to see if exists & ready

2017-04-06 Thread dave boland
to do that. So, what (and why) are the steps to test the database file to see what state it is in? Thanks, Dave > > I’m not sure what you mean by "unconfigured" so I’ll let other people > write about that, or you can pos

[sqlite] Testing sqlite db to see if exists & ready

2017-04-06 Thread dave boland
to documentation that I may have missed. Thanks, Dave -- dave boland dbola...@fastmail.fm -- http://www.fastmail.com - A fast, anti-spam email service. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin

Re: [sqlite] Deleting records from a large table

2017-03-03 Thread Dave Blake
Thanks all for your input, it has really helped. In my real world application tmp_keep is a temporary table populated by examinining a number of other tables etc., and I suddenly realsied that it could even contain duplicate ids. Sloppy thinking on my part. I get the best results by creating

Re: [sqlite] Deleting records from a large table

2017-03-03 Thread Dave Blake
Could be keep almost all the records so ~50, but it varies greatly so sometimes will be just keep 10. I can adjust approach depending on size if necessary. Yes the id1 are integer primary keys. Table1 has a number of indexes and views, so the create new table approach is less attractive ​

[sqlite] Deleting records from a large table

2017-03-03 Thread Dave Blake
Say table1 has more then 50 records, and there is a second table tmp_keep with the ids of the records in table1 to be kept, the rest need to be deleted. The number of records in tmp_keep can vary from 0 to all the records in table1, with any values in between. What is the best strategy for

Re: [sqlite] under the christmas tree

2016-10-30 Thread Dave Wellman
"+lots" for OVER and PARTITION BY! Very useful in my line of work as well. Cheers, Dave Ward Analytics Ltd - information in motion Tel: +44 (0) 118 9740191 Fax: +44 (0) 118 9740192 www: http://www.ward-analytics.com Registered office address: The Oriel, Sydenham Road, Guildfo

[sqlite] IN verses EXISTS Query Speed

2016-10-16 Thread Dave Blake
Some simple testing is showing using an EXISTS statement is generally quicker then using an IN e.g. SELECT * FROM tablea WHERE EXISTS (SELECT 1 FROM tableb WHERE tablea.id = tableb.id AND ...) is quicker than SELECT * FROM tablea WHERE tablea.id IN (SELECT tableb.id FROM tableb WHERE ...) Is

[sqlite] Using Bitwise Logic In Query

2016-09-08 Thread Dave Blake
Looking for the best way to query a table with an integer column by value of the lower 16 bits of the data in that column. Does SQLite support bitwise logic? ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

[sqlite] VARCHAR or TEXT to save sapce

2016-09-02 Thread Dave Blake
Can I confirm that defining feilds as VARCHAR(20) rather than TEXT, if I know I only want 20 chars or less, will result in a smaller database? ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

[sqlite] The Session Extension (future SQLite extension)

2016-05-07 Thread Dave Wellman
environment up to date. However, the documentation includes the following: "They work all day, in parallel, each making their own customizations and tweaks to the design. " Does the "to the design" imply that this feature would also cater for DDL changes to tables, indexes

[sqlite] SELECT 0 gives TEXT instead of INTEGER

2016-04-21 Thread Dave Wellman
How about something like: WITH RECURSIVE expansion(byte) AS ( SELECT 0 UNION ALL SELECT byte + 1 FROM expansion LIMIT 10 ) SELECT PRINTF('%02d',byte) FROM expansion ; Cheers, Dave Ward Analytics Ltd - information in motion Tel: +44 (0) 118 9740191 Fax: +44 (0) 118 9740192

[sqlite] Encrypt the SQL query

2016-02-27 Thread Dave Baggett
fit within the HSM's on-board storage. These devices usually only have a small amount of storage -- enough to store 4096 keys, for example. But if there were an HSM that shipped with a "real" amount of memory and storage -- and was generically programmable -- there's no reason it couldn't b

[sqlite] SQLite I/O tuning redux

2016-02-20 Thread Dave Baggett
and extension functions, so I have at least some idea what I'm getting into. Dave Sent with inky<http://inky.com?kme=signature>

[sqlite] SQLite tuning advice for caching scenario

2016-02-17 Thread Dave Baggett
g the .dat file on SELECTs. (BTW, I'm using WAL mode and have found it performs better than standard journal mode on pretty much every target device.) Dave Sent with inky<http://inky.com?kme=signature> "Dave Baggett" wrote: OK, that helps -- thank you. One cla

[sqlite] SQLite tuning advice for caching scenario

2016-02-17 Thread Dave Baggett
? Here I am talking about the meta level above the transaction level -- I have atomic transactions and I want to defer physically writing them until I have enough of them (say, 16MB worth of altered pages). Dave Sent with inky<http://inky.com?kme=signature> "Simon Slavin" wrote:

[sqlite] SQLite tuning advice for caching scenario

2016-02-17 Thread Dave Baggett
using SQLite via apsw -- thanks for that too!) Dave Sent with inky<http://inky.com?kme=signature> "Roger Binns" wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 17/02/16 06:37, Dave Baggett wrote: > I'd welcome any suggestions How about two databases?

[sqlite] SQLite tuning advice for caching scenario

2016-02-17 Thread Dave Baggett
the transition from memory (page cache, etc.) to disk occurs, that would probably get me above n00b level of understanding, which would help. Dave Sent with inky<http://inky.com?kme=signature> "Simon Slavin" wrote: On 17 Feb 2016, at 2:37pm, Dave Baggett wrote: > I

[sqlite] SQLite tuning advice for caching scenario

2016-02-17 Thread Dave Baggett
rge groups of transactions at once, minimizing the number of write calls. I'd welcome any suggestions from SQLite experts on this. Dave Sent with inky<http://inky.com?kme=signature>

[sqlite] Bug: LEFT JOIN on view confusing the query optimiser

2016-02-14 Thread Dave Blake
is to avoid the left join by ensuring that all songs have at least one artist. This is a better data design in the end. On 14 February 2016 at 18:00, Clemens Ladisch wrote: > Dave Blake wrote: > > Is there anything I can do to get the optimiser to perform 1) with the > same > > efficie

[sqlite] Bug: LEFT JOIN on view confusing the query optimiser

2016-02-14 Thread Dave Blake
5:15, Clemens Ladisch wrote: > Dave Blake wrote: > > What I see as wrong is that in 1) (and 4) ) we have a query of the form > > A LEFT JOIN B WHERE clause involving index fields on A > > > > yet the optimiser does not search A, the outer table, first using the >

[sqlite] Bug: LEFT JOIN on view confusing the query optimiser

2016-02-14 Thread Dave Blake
table first. This is > necessary for the join to work correctly. But it is not scanning song, the outer table, first. It is not optimising correctly. Is there a way with 1) to get it to scan song first? Can you see why that would be the optimal plan? On 14 February 2016 at 10:49, Cleme

[sqlite] Bug: LEFT JOIN on view confusing the query optimiser

2016-02-13 Thread Dave Blake
urrent behaviour is making views unusable in my application. On 12 February 2016 at 20:47, Clemens Ladisch wrote: > Dave Blake wrote: > >> It chooses a _correct_ plan. > > > > Really? With query 1) to select a song it first scans the song_artist > table > &

[sqlite] Bug: LEFT JOIN on view confusing the query optimiser

2016-02-12 Thread Dave Blake
:34, Clemens Ladisch wrote: > Dave Blake wrote: > > I noticed my queries going very slowly after changing a join to a left > > join, examination of the query plan showed that the optimiser was > choosing > > a poor plan. > > It chooses a _correct_ plan. > > &

[sqlite] Bug: LEFT JOIN on view confusing the query optimiser

2016-02-12 Thread Dave Blake
I noticed my queries going very slowly after changing a join to a left join, examination of the query plan showed that the optimiser was choosing a poor plan. It only occurs when the left join is on a views, if explicit tables are used instead then the problem does not occur. To repeat the issue

[sqlite] Recent regression caused by WAL checkin

2016-01-22 Thread Dave Baggett
frame."* Is this an optimization? If I revert this single commit in my local copy, my codec works fine. If I leave it in, I get a corrupt database error very soon after startup. Any pointers appreciated! Dave Sent with [inky](http://inky.com?kme=signature)

[sqlite] Bug report for MAX()

2015-11-25 Thread Dave McKee
I can replicate this behaviour if I insert a zero-length string into the column. sqlite> create table foo(a); sqlite> insert into foo values(5); sqlite> insert into foo values(""); sqlite> select max(a) from foo; sqlite> select min(a) from foo; 5 sqlite> select avg(a) from foo; 2.5 Is this a

[sqlite] Fwd: Outdated section of docs?

2015-09-24 Thread Dave McKee
time'); 2006-03-12 05:00:00 1985: Sunday, 28 April sqlite> select datetime("1985-03-09T12:00", 'localtime'); 1985-03-09 04:00:00 sqlite> select datetime("1985-03-10T12:00", 'localtime'); 1985-03-10 05:00:00 On 22 September 2015 at 17:32, Dave McKee wrote: > &g

[sqlite] When to disambiguate column names in queries?

2015-03-16 Thread Dave Wellman
for column names that are not unique), but I've found that this makes large pieces of sql much easier to read - particularly when you have to come back to them after a few months in order to change something. Cheers, Dave Ward Analytics Ltd - information in motion Tel: +44 (0) 118 9740191 Fax: +44

[sqlite] Corrupted database

2015-03-16 Thread Dave Dyer
> >Do you still have a copy of the originally damaged Database? I believe a >closer look to it will reveal more corruption than the assumed. I have the original database. What other tests could I do to look for evidence? It appears (so far) that the database I reconstructed from the dump

[sqlite] Corrupted database

2015-03-16 Thread Dave Dyer
> >Do you still have a copy of the originally damaged Database? I believe a >closer look to it will reveal more corruption than the assumed. I have the original database. What other tests could I do to look for evidence? It appears (so far) that the database I reconstructed from the dump

[sqlite] Corrupted database

2015-03-16 Thread Dave Dyer
> >Do you still have a copy of the originally damaged Database? I believe a >closer look to it will reveal more corruption than the assumed. I have the original database. What other tests could I do to look for evidence? It appears (so far) that the database I reconstructed from the dump

[sqlite] Corrupted database

2015-03-16 Thread Dave Dyer
> >Do you still have a copy of the originally damaged Database? I believe a >closer look to it will reveal more corruption than the assumed. I have the original database. What other tests could I do to look for evidence? It appears (so far) that the database I reconstructed from the dump

[sqlite] Corrupted database

2015-03-16 Thread Dave Dyer
> >The only safe thing to do is to drop the index and remake it. Or do to >something which does that (e.g. VACUUM). As I said, the first step in my repair was to drop the offending index.

[sqlite] Corrupted database

2015-03-16 Thread Dave Dyer
> >The only safe thing to do is to drop the index and remake it. Or do to >something which does that (e.g. VACUUM). As I said, the first step in my repair was to drop the offending index.

[sqlite] Corrupted database

2015-03-16 Thread Dave Dyer
I have some addition evidence that there is an underlying problem, exacerbated by some failure in SMB file sharing. In this instance, there is a set of duplicated records that did not directly cause an indexing error, but which could have been created if a transaction failed (presumably due to a

[sqlite] Can I copy one column of data to another table?

2015-03-09 Thread Dave
Thanks for the help Igor. :-) Dave On 3/7/2015 1:37 PM, Igor Tandetnik wrote: > > > On 3/7/2015 11:42 AM, Dave wrote: >> Now when trying to use the database I see that I should have made 1 >> table with all the related data (I think) and am trying to copy one >&g

[sqlite] restructuring databases (was Re: Can I copy one column of data to another table?)

2015-03-08 Thread Dave
t; too. So that makes its use more like hard coded data which I want and need. When I learned VB years ago I got stumped often but over time things started to "click". I am waiting to hear those clicks with SQLite soon. :) Thanks, Dave (also in Florida) On 3/7/2015 8:03 PM, Jim Callahan wrot

[sqlite] restructuring databases (was Re: Can I copy one column of data to another table?)

2015-03-08 Thread Dave
On 3/7/2015 7:18 PM, Darren Duncan wrote: > On 2015-03-07 9:59 AM, Simon Slavin wrote: >> On 7 Mar 2015, at 4:42pm, Dave wrote: >> >>> I am fairly new at this although I have wanted to learn and tried >>> again and again...But I have a problem. I created a database an

[sqlite] Can I copy one column of data to another table?

2015-03-07 Thread Dave
. Thanks again, Dave On 3/7/2015 3:06 PM, R.Smith wrote: > > > On 2015-03-07 10:55 PM, Dave wrote: >> Ryan, >> I have been to the link below but was under the impression that SQL >> and SQLite are two different things so I usually just look up SQLite >> help. I can do

[sqlite] Can I copy one column of data to another table?

2015-03-07 Thread Dave
. Thanks for understanding and having been where I am now. It make me feel better already. :-) Dave On 3/7/2015 2:44 PM, R.Smith wrote: > > > On 2015-03-07 10:32 PM, Dave wrote: >> Ryan, >> Thanks for your reply. As I mention in my last post: >> >> I got it sort

[sqlite] Can I copy one column of data to another table?

2015-03-07 Thread Dave
On 3/7/2015 1:42 PM, R.Smith wrote: > > Hi Dave, you did not give us the schemata so I'm going to guess you > have tables like this: > > CEATE TABLE T1("ID" INT PRIMARY KEY, "val1" TEXT); > CEATE TABLE T2("ID" INT PRIMARY KEY, "val2"

[sqlite] Can I copy one column of data to another table?

2015-03-07 Thread Dave
progress, but have a long way to go. Good thing for me is I plan to use my database (for now) as basically a "flat file" where my app will just use the related data in click events to further process. Thanks again, schemer On 3/7/2015 1:42 PM, R.Smith wrote: > > > On 2015-0

[sqlite] Can I copy one column of data to another table?

2015-03-07 Thread Dave
and got an answer within 30 minutes. :-) Thanks, schemer On 3/7/2015 1:35 PM, Paul Sanderson wrote: > Dave > > I'm not sure exactly what you are trying to do from your description - > the schema of the tables you have and those that you want may help. > > But as a general idea

[sqlite] Can I copy one column of data to another table?

2015-03-07 Thread Dave
well, I had my app data "hard coded" in the past and decided to use a database to make it easier. I am sure it will be, once I get more experience. schemer On 3/7/2015 11:59 AM, Simon Slavin wrote: > On 7 Mar 2015, at 4:42pm, Dave wrote: > >> I am fairly new at this although

[sqlite] Can I copy one column of data to another table?

2015-03-07 Thread Dave
I am fairly new at this although I have wanted to learn and tried again and again...But I have a problem. I created a database and probably did it wrong and I am trying to fix it. I made a database with 7 tables in it all with a primary key and a record ID that matches the primary key. Now

[sqlite] Corrupted database

2015-03-05 Thread Dave Dyer
If you can .dump it, can you also use .read to restore it? And if so, how damaged does it appear to be? My databases, with a corrupt index, couldn't be restored directly, but the duplicate entries could be seen, cleaned up, and then the restore succeeded. Or (more conveniently) remove the index

[sqlite] Corrupted database

2015-03-04 Thread Dave Dyer
I'd be interested if you could characterize the corruption. For example, can use still use .dump to dump the database, and if so what kind of damage is there? The cases I've encountered recently, the "corruption" was only a few duplicated records, which broke the uniqueness constraint on an

[sqlite] Corrupted database

2015-03-04 Thread Dave Dyer
I'd be interested if you could characterize the corruption. For example, can use still use .dump to dump the database, and if so what kind of damage is there? The cases I've encountered recently, the "corruption" was only a few duplicated records, which broke the uniqueness constraint on an

[sqlite] recurrent failure mode

2015-02-26 Thread Dave Dyer
> >You might want to read my message on the topic from the list archives, >dated Sat, 31 Jan 2015. In this case, no concurrent or multiple users are involved. It's just one client and the database. There's still plenty of scope for the networked file system to do things that make sqlite

[sqlite] recurrent failure mode

2015-02-25 Thread Dave Dyer
> >Can you provide the schema (the CREATE TABLE and any CREATE INDEX commands) >for that table ? CREATE TABLE preference_table ( preferenceSet text,/* name of this preference group */ preferenceName text, /* a preference in this group */ preferenceValue text /* sort order of this

[sqlite] recurrent failure mode

2015-02-25 Thread Dave Dyer
We're experiencing a new, recurrent failure mode in an old (ie; not recently changed) sqlite application. This may be associated with buggy networked file system implementations (thanks to apple and/or microsoft) The apparent problem is that indexes on a small table become corrupted by not

[sqlite] recurrent failure mode

2015-02-25 Thread Dave Dyer
We're experiencing a new, recurrent failure mode in an old (ie; not recently changed) sqlite application. This may be associated with buggy networked file system implementations (thanks to apple and/or microsoft) The apparent problem is that indexes on a small table become corrupted by not

Re: [sqlite] sqlite3 tool bug

2015-01-17 Thread Dave Dyer
> >The has been in shell.c since 3.8.6. We are on 3.8.8. Why >not upgrade? >-- Here in the real world, when everything is working, we ask "why upgrade". ___ sqlite-users mailing list sqlite-users@sqlite.org

[sqlite] sqlite3 tool bug

2015-01-17 Thread Dave Dyer
> >The has been in shell.c since 3.8.6. We are on 3.8.8. Why >not upgrade? >-- Here in the real world, when everything is working, we ask "why upgrade".

Re: [sqlite] sqlite3 tool bug

2015-01-17 Thread Dave Dyer
> > >OK. Dave, please try this patch at let us know if it works better for >you: https://www.sqlite.org/src/info/80541e8b94b7 > It needs #include to compile in my sources. With that, it seems to fix the problem. ___ sqlite-users mail

[sqlite] sqlite3 tool bug

2015-01-17 Thread Dave Dyer
> > >OK. Dave, please try this patch at let us know if it works better for >you: https://www.sqlite.org/src/info/80541e8b94b7 > It needs #include to compile in my sources. With that, it seems to fix the problem.

Re: [sqlite] sqlite3 tool bug summary

2015-01-17 Thread Dave Dyer
> > .once '| sqlite3 new.db' > .dump .Once is not a command in the version of sqlite3 I use. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] sqlite3 tool bug summary

2015-01-17 Thread Dave Dyer
> > .once '| sqlite3 new.db' > .dump .Once is not a command in the version of sqlite3 I use.

Re: [sqlite] sqlite3 tool bug summary

2015-01-17 Thread Dave Dyer
> >> But that doesn't explain the difference between redirecting to a file >> and redirecting to a pipe. using .output file works using > to direct stdout to a file works and produces the same file as .output using .read file works using < file does not work. using | to shortcut > and < doesn't

[sqlite] sqlite3 tool bug summary

2015-01-17 Thread Dave Dyer
> >> But that doesn't explain the difference between redirecting to a file >> and redirecting to a pipe. using .output file works using > to direct stdout to a file works and produces the same file as .output using .read file works using < file does not work. using | to shortcut > and < doesn't

  1   2   3   4   5   >