[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

[sqlite] Enhanced command-line shells for SQLite. Was: Stored Procedures

2018-05-08 Thread Richard Hipp
On 5/8/18, David Burgess wrote: >> The usual way of handling that in SQLite is to store a script in a text >> column someplace, then execute them as needed. > Is there a simple way to do this from SQLite shell? Not at this time, as the CLI does not link against libtcl. But

Re: [sqlite] Database locking with online backup API

2018-05-08 Thread Donald Shepherd
On Wed, 9 May 2018 at 11:13 Simon Slavin wrote: > On 8 May 2018, at 1:12pm, Simon Slavin wrote: > > > You can lock the database yourself, using BEGIN EXCLUSIVE or BEGIN > IMMEDIATE depending on which you want. Then do all the backup stuff, then >

Re: [sqlite] Database locking with online backup API

2018-05-08 Thread Simon Slavin
On 8 May 2018, at 1:12pm, Simon Slavin wrote: > You can lock the database yourself, using BEGIN EXCLUSIVE or BEGIN IMMEDIATE > depending on which you want. Then do all the backup stuff, then COMMIT or > ROLLBACK without having changed anything. On 9 May 2018, at 1:50am,

Re: [sqlite] Stored Procedures

2018-05-08 Thread David Burgess
> The usual way of handling that in SQLite is to store a script in a text > column someplace, then execute them as needed. Is there a simple way to do this from SQLite shell? ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] Stored Procedures

2018-05-08 Thread Richard Hipp
On 5/8/18, Jens Alfke wrote: > > >> On May 8, 2018, at 1:02 PM, Mike Clark wrote: >> >> Has there been any thought of implementing some kind of stored procedure >> feature for SQLite? > > That's more of a server thing. In an embedded database, a

Re: [sqlite] Database locking with online backup API

2018-05-08 Thread Donald Shepherd
On Tue, 8 May 2018 at 22:12 Simon Slavin wrote: > On 8 May 2018, at 10:56am, R Smith wrote: > > > Thank you for clarifying - but it is still my understanding that the DB > is not locked (if only in WAL mode), so the backup API, even with -1, > either

Re: [sqlite] SQLite3 Error: Unable to open database file when file path has accents (e.g. é or è)

2018-05-08 Thread J Decker
On Tue, May 8, 2018 at 2:11 PM, Richard Hipp wrote: > On 5/8/18, Francis Kus wrote: > > I am able to open my database file if the path contains no accents. > However, > > if I change even one letter to an accented letter (e.g. replace 'e' with > > 'é'),

Re: [sqlite] About storage of large amounts of image data

2018-05-08 Thread Simon Slavin
On 8 May 2018, at 2:08pm, Mike Clark wrote: > Since the prospective users will probably be > dealing with hundreds of gigabytes in their use of the project, I am > wondering if this is an effective or efficient use of SQLite -- or safe, > because of the risk of data

Re: [sqlite] Stored Procedures

2018-05-08 Thread Jens Alfke
> On May 8, 2018, at 1:02 PM, Mike Clark wrote: > > Has there been any thought of implementing some kind of stored procedure > feature for SQLite? That's more of a server thing. In an embedded database, a stored procedure is literally a function in your programming

Re: [sqlite] Question about sqlite3_prepare vs sqlite3_prepare_v2

2018-05-08 Thread Richard Hipp
Can you post, or send by private email, the output from ".fullschema --indent" from the sqlite3 command-line shell on your database file? On 5/8/18, Charles Leifer wrote: > Hi, > > I was debugging some discrepancies in execution times of some queries using > the Python 3.6

[sqlite] Question about sqlite3_prepare vs sqlite3_prepare_v2

2018-05-08 Thread Charles Leifer
Hi, I was debugging some discrepancies in execution times of some queries using the Python 3.6 standard library sqlite3 driver. I was wondering if these discrepancies could be explained by the fact that the Python sqlite3 driver is using the legacy sqlite3_prepare interface? Just to be clear: I

Re: [sqlite] Stored Procedures

2018-05-08 Thread J Decker
maybe Virtual tables? can register functions of various types... mostly since the typical usage of sqlite is as a tightly coupled library, a function in your application is a 'stored procedure'. http://www.sqlite.org/c3ref/update_hook.html There are hooks which would trigger callbacks like

Re: [sqlite] About storage of large amounts of image data

2018-05-08 Thread Stephen Chrzanowski
In my experience, store the blob information in a table to itself and do a 1:1 or 1:Many relationship between your main data and the blob data. The reason for this is that SQLite will read the data of your request per row if the query is asking for information past the field to which your blob

Re: [sqlite] About storage of large amounts of image data

2018-05-08 Thread Richard Hipp
On 5/8/18, Rob Willett wrote: > However this is a compile time > option so you could move it from 1GB to 10GB and unless you are into > serious astronomy that *might* be enough for a while. The use of 32-bit integers to measure the size of object pervades the code.

Re: [sqlite] SQLite3 Error: Unable to open database file when file path has accents (e.g. é or è)

2018-05-08 Thread Richard Hipp
On 5/8/18, Francis Kus wrote: > I am able to open my database file if the path contains no accents. However, > if I change even one letter to an accented letter (e.g. replace 'e' with > 'é'), the database does not open and I get the error message "unable to open >

[sqlite] SQLite3 Error: Unable to open database file when file path has accents (e.g. é or è)

2018-05-08 Thread Francis Kus
Hi, I am experiencing the following issue using SQLite 3.22.0: I am able to open my database file if the path contains no accents. However, if I change even one letter to an accented letter (e.g. replace 'e' with 'é'), the database does not open and I get the error message "unable to open

Re: [sqlite] About storage of large amounts of image data

2018-05-08 Thread Eduardo Morras
On Tue, 8 May 2018 14:08:05 +0100 Mike Clark wrote: > Hi List! > > I'm developing a project that deals with image files and am > considering storing all the images in the SQLite database itself, > rather than (or in addition to) the file system. Since the >

Re: [sqlite] Stored Procedures

2018-05-08 Thread Igor Tandetnik
On 5/8/2018 4:02 PM, Mike Clark wrote: Has there been any thought of implementing some kind of stored procedure feature for SQLite? Or does this feature exist in some other form, with another name? Triggers are kind of like stored procedures. You can create a dedicated view and put INSTEAD

Re: [sqlite] About storage of large amounts of image data

2018-05-08 Thread David Raymond
Data corruption shouldn't be an issue as far as SQLite goes, or at least not any more than another method of storing the data. The main downside from my point of view would be vacuuming. Delete a bunch of external image files and you get the space right back. As is normal with a DB, if you

Re: [sqlite] About storage of large amounts of image data

2018-05-08 Thread Rob Willett
Mike, We use SQLite to store BLOB data to do with polygons and R-tree's for mapping traffic data. We're running 70-90GB (not looked recently) and the size has never been an issue for us (which is why we've not looked). However binary images might start to get towards the field size limit

Re: [sqlite] About storage of large amounts of image data

2018-05-08 Thread Richard Hipp
On 5/8/18, Mike Clark wrote: > > I'm developing a project that deals with image files and am considering > storing all the images in the SQLite database itself, rather than (or in > addition to) the file system. Since the prospective users will probably be > dealing

[sqlite] Stored Procedures

2018-05-08 Thread Mike Clark
Has there been any thought of implementing some kind of stored procedure feature for SQLite? Or does this feature exist in some other form, with another name? -- Mike Clark Twitter: @Cyberherbalist Blog: Cyberherbalist's Blog - "Free will, though it makes

[sqlite] About storage of large amounts of image data

2018-05-08 Thread Mike Clark
Hi List! I'm developing a project that deals with image files and am considering storing all the images in the SQLite database itself, rather than (or in addition to) the file system. Since the prospective users will probably be dealing with hundreds of gigabytes in their use of the project, I

Re: [sqlite] Lots of enhancements coming to version 3.24.0 - please test

2018-05-08 Thread David Raymond
Nifty. I tried out the explain query plan on the sample queries in the recursive doc (http://www.sqlite.org/lang_with.html), the output is below as a nice example. The one comment I have is that the co-routine/sub-query numbers are non-deterministic, so any of your tests that check the output

Re: [sqlite] Getting statement column data types on Android

2018-05-08 Thread Bart Smissaert
Yes, I think the only solution might be to clean up the tables So if for example there is text in a real column, update it to 0.0 etc. RBS On Tue, May 8, 2018 at 5:46 PM, Simon Slavin wrote: > On 8 May 2018, at 5:37pm, Bart Smissaert wrote: >

Re: [sqlite] This list is getting spammed again 172

2018-05-08 Thread Dan Kennedy
Thanks for reporting this. Perhaps we can find the culprit. Dan.

Re: [sqlite] Getting statement column data types on Android

2018-05-08 Thread Simon Slavin
On 8 May 2018, at 5:37pm, Bart Smissaert wrote: >> SQLite does not have column types. It has column affinities instead. > > OK, so I would like to see that declared column affinity as that will > determine how to process the data. Ah. You don't care about the data,

Re: [sqlite] Getting statement column data types on Android

2018-05-08 Thread Bart Smissaert
> SQLite does not have column types. It has column affinities instead. OK, so I would like to see that declared column affinity as that will determine how to process the data. I have no problem doing this on the Windows PC. More difficult though to do this on Android. RBS On Tue, May 8, 2018

Re: [sqlite] Getting statement column data types on Android

2018-05-08 Thread Simon Slavin
On 8 May 2018, at 4:19pm, Bart Smissaert wrote: > Just tested that (TypeOf) on the Android phone and it doesn't do what I > wanted. > I tested on a column declared Real but with text values in it as well. > It will give both real and text and what I wanted was to

Re: [sqlite] Lots of enhancements coming to version 3.24.0 - please test

2018-05-08 Thread Don V Nielsen
Two thumbs up, Dan. Thanks for the clarification. On Tue, May 8, 2018 at 11:11 AM, Dan Kennedy wrote: > On 05/08/2018 11:04 PM, Don V Nielsen wrote: > >> " UPDATE avoids writing >>> >> database pages that do not actually

Re: [sqlite] Lots of enhancements coming to version 3.24.0 - please test

2018-05-08 Thread Dan Kennedy
On 05/08/2018 11:04 PM, Don V Nielsen wrote: " UPDATE avoids writing database pages that do not actually change. For example, "UPDATE t1 SET x=25 WHERE y=?" becomes a no-op if the value in column x is already 25." I have a ridiculous assertion

Re: [sqlite] Lots of enhancements coming to version 3.24.0 - please test

2018-05-08 Thread Don V Nielsen
> " UPDATE avoids writing database pages that do not actually change. For example, "UPDATE t1 SET x=25 WHERE y=?" becomes a no-op if the value in column x is already 25." I have a ridiculous assertion concerning this, but please here me out. Given

Re: [sqlite] Getting statement column data types on Android

2018-05-08 Thread Bart Smissaert
> int sqlite3_column_type(sqlite3_stmt*, int iCol); Android and certainly B4A doesn't have that as far as I can see. RBS On Tue, May 8, 2018 at 3:21 AM, J Decker wrote: > https://www.sqlite.org/c3ref/column_blob.html > > int sqlite3_column_type(sqlite3_stmt*, int iCol); > >

Re: [sqlite] Getting statement column data types on Android

2018-05-08 Thread Bart Smissaert
Just tested that (TypeOf) on the Android phone and it doesn't do what I wanted. I tested on a column declared Real but with text values in it as well. It will give both real and text and what I wanted was to produce only real as that is what the column is declared as. RBS On Tue, May 8, 2018 at

[sqlite] Lots of enhancements coming to version 3.24.0 - please test

2018-05-08 Thread Richard Hipp
There are a lot of important changes in the SQLite code base since the previous release. See https://www.sqlite.org/draft/releaselog/current.html for the latest summary. All of our legacy tests pass and many new test cases have been added. Nevertheless, your testing of SQLite in real-world

Re: [sqlite] Always call a value-quoting routine

2018-05-08 Thread Peter Da Silva
Nicely retro-feel website too: https://droptablecompanies.co.uk/ ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Fossil Delta Compression in SqLite

2018-05-08 Thread Bob Friesenhahn
On Mon, 7 May 2018, Warren Young wrote: On May 7, 2018, at 9:53 AM, Philip Bennefall wrote: It was merely an idea to possibly avoid some potential ambiguity regarding public domain, which is a bit of a gray area in many places. So take the code under the explicit

Re: [sqlite] Database locking with online backup API

2018-05-08 Thread Simon Slavin
On 8 May 2018, at 10:56am, R Smith wrote: > Thank you for clarifying - but it is still my understanding that the DB is > not locked (if only in WAL mode), so the backup API, even with -1, either > must ignore changes, or restart. My proposed flag is to lock rather than

Re: [sqlite] SQLite3 fossil repository problem solved

2018-05-08 Thread Richard Hipp
On 5/8/18, Domingo Alvarez Duarte wrote: > > Still it seems that there is more than one fossil server and they seem > to lag from the main one. > There are three. They sync with each other hourly, via cron job. -- D. Richard Hipp d...@sqlite.org

Re: [sqlite] This list is getting spammed again

2018-05-08 Thread Richard Hipp
On 5/8/18, John Long wrote: > > So I guess it is up to all the list owners to obfuscate posters' email > addresses appropriately? We tried that once before. People hated it. The consensus at that time was that people would rather just deal with the spam. -- D. Richard Hipp

Re: [sqlite] This list is getting spammed again

2018-05-08 Thread Olivier Mascia
> Le 8 mai 2018 à 11:45, John Long a écrit : > > So I guess it is up to all the list owners to obfuscate posters' email > addresses appropriately? Why aren't people doing a better job of this? That is not very practical : it would cut people from the comfort to be able to

Re: [sqlite] Database locking with online backup API

2018-05-08 Thread R Smith
On 2018/05/08 11:32 AM, Rowan Worth wrote: On 8 May 2018 at 17:22, R Smith wrote: On 2018/05/08 9:37 AM, Donald Shepherd wrote: It would actually be real nice if the backup API had a parameter or flag like "sqlite3_lockduringbackup". Not quite right.

Re: [sqlite] This list is getting spammed again

2018-05-08 Thread John Long
On Tue, 2018-05-08 at 11:40 +0200, Olivier Mascia wrote: > > Le 8 mai 2018 à 09:37, Domingo Alvarez Duarte > > a écrit : > > > > Hello Richard ! > > > > Again this list is getting spammed, I just received spam after > > publish. > > > > Cheers ! > > Technically, it is not

Re: [sqlite] This list is getting spammed again

2018-05-08 Thread Olivier Mascia
> Le 8 mai 2018 à 09:37, Domingo Alvarez Duarte a écrit : > > Hello Richard ! > > Again this list is getting spammed, I just received spam after publish. > > Cheers ! Technically, it is not the list which gets spammed. It is someone or some process which reads the messages

Re: [sqlite] [External] Re: Always call a value-quoting routine

2018-05-08 Thread Andy Ling
> On Sun, May 6, 2018 at 11:34 PM, Rowan Worth wrote: > > Its omission is interesting though. Does it indicate an incompetent > > attacker, or is companieshouse.gov.uk using some bespoke approach like > > "delete all single quotes" instead of actually quoting strings? > > It could

Re: [sqlite] Database locking with online backup API

2018-05-08 Thread Rowan Worth
On 8 May 2018 at 17:22, R Smith 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 database >> for the duration of the

Re: [sqlite] Database locking with online backup API

2018-05-08 Thread Donald Shepherd
On Tue, 8 May 2018 at 19:23 R Smith 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 > database > > for the duration of the

Re: [sqlite] Database locking with online backup API

2018-05-08 Thread R Smith
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 database for the duration of the sqlite3_backup_step call. However under some testing I've been performing, I've

[sqlite] Database locking with online backup API

2018-05-08 Thread Donald Shepherd
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 database for the duration of the sqlite3_backup_step call. However under some testing I've been performing, I've found that this doesn't appear to be the case.

[sqlite] This list is getting spammed again

2018-05-08 Thread Domingo Alvarez Duarte
Hello Richard ! Again this list is getting spammed, I just received spam after publish. Cheers ! ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] SQLite3 fossil repository problem solved

2018-05-08 Thread Domingo Alvarez Duarte
Hello ! I just retried again and now it got updated to the same content I can see on the web. Still it seems that there is more than one fossil server and they seem to lag from the main one. Cheers ! ___ sqlite-users mailing list

[sqlite] SQLite3 fossil repository not working ?

2018-05-08 Thread Domingo Alvarez Duarte
Hello ! Today I tried to update my sqlite3 repository but somehow it seems not working properly, I execute "fossil update" as usually and it contacts the server and exchange info with it but it only see till this commit http://www.sqlite.org/src/info/c381f0ea57002a264fd958b28e . There is