[sqlite] whish list for 2016

2016-01-12 Thread Christian Schmitz
> Am 20.12.2015 um 19:12 schrieb Big Stone : > > Hi All, > > To prepare for 2016 greetings moment, here is my personnal whish list Unless I missed something, I may suggest * moveprev * movefirst * movelast * move to record in cursor with given index Looping over a recordset twice is often

[sqlite] whish list for 2016

2016-01-12 Thread Domingo Alvarez Duarte
I think this is a very good feature to have, thumbs up ! ? > Tue Jan 12 2016 9:50:33 pm CET CET from "James K. Lowden" > Subject: Re: [sqlite] whish list for 2016 > > On Fri, 8 Jan 2016 08:28:29 +0100 > Dominique Devienne wrote: > > >> >>>One way to do that would be to honor a

[sqlite] whish list for 2016

2016-01-12 Thread Keith Medcalf
On Tuesday, 12 January, 2016 13:58, Christian Schmitz said: > Unless I missed something, I may suggest > * moveprev > * movefirst > * movelast > * move to record in cursor with given index There are no relational database engines on the market that can do this. Those that *appear* to be

[sqlite] whish list for 2016

2016-01-12 Thread Keith Medcalf
On Tuesday, 12 January, 2016 13:51, James K. Lowden said: > On Fri, 8 Jan 2016 08:28:29 +0100 > Dominique Devienne wrote: > > > One way to do that would be to honor a special user-created table, > > > say "PRAGMAS", with name-value pairs that are automatically applied > > > when the database

[sqlite] whish list for 2016

2016-01-12 Thread Richard Hipp
On 1/12/16, Christian Schmitz wrote: > > Unless I missed something, I may suggest > > * moveprev > * movefirst > * movelast > * move to record in cursor with given index Not possible, at least not in general. Something like this could be done for the simpliest queries against a single real

[sqlite] whish list for 2016

2016-01-12 Thread Scott Hess
On Tue, Jan 12, 2016 at 3:43 PM, Keith Medcalf wrote: > On Tuesday, 12 January, 2016 13:51, James K. Lowden < > jklowden at schemamania.org> said: > > On Fri, 8 Jan 2016 08:28:29 +0100 > > Dominique Devienne wrote: > > > > One way to do that would be to honor a special user-created table, > > >

[sqlite] whish list for 2016

2016-01-12 Thread James K. Lowden
On Fri, 8 Jan 2016 08:28:29 +0100 Dominique Devienne wrote: > > One way to do that would be to honor a special user-created table, > > say "PRAGMAS", with name-value pairs that are automatically applied > > when the database is opened. > > > > Interesting idea. A "special"-to-SQLite

[sqlite] analysis of a corrupt db

2016-01-12 Thread Simon Slavin
On 12 Jan 2016, at 2:52pm, Adam Devita wrote: > Under normal operation all access is controlled by 1 program that > serializes requests from the rest of the system, and executes batches > of statements in a transaction. Under normal operation only SELECT and > UPDATE queries are run. Does your

[sqlite] hard links and SQLite

2016-01-12 Thread Rowan Worth
On 12 January 2016 at 13:12, Felipe Gasper wrote: > Same code, just different processes. > > We?ve just noted over the years with race conditions that that ?if it can > fail, it will?, so we try to be as bulletproof as we can. > Good policy :) After you unlink the temp file, I presume the

[sqlite] Performance of newer versions

2016-01-12 Thread Sergej Jurečko
Something I've recently noticed when using SQLite over multiple threads (with SQLITE_THREADSAFE=2). You must disable memstatus (with -DSQLITE_DEFAULT_MEMSTATUS=0) otherwise that mutex will cause a lot of contention. Sergej

[sqlite] hard links and SQLite

2016-01-12 Thread Rowan Worth
On 12 January 2016 at 13:26, Scott Hess wrote: > On Mon, Jan 11, 2016 at 9:12 PM, Felipe Gasper > wrote: > > > On 11 Jan 2016 9:06 PM, Rowan Worth wrote: > > > >> * if it returns SQLITE_OK and zero rows, the schema hasn't been created > >> yet > >> > > > > Sure; however, by the time you do the

[sqlite] analysis of a corrupt db

2016-01-12 Thread Adam Devita
Some more information: A co-worker managed to get an copy of the db by as interpreted by jffs2dump of the file system, that was extracted by the jffs2dump python script (from git hub). It is interesting that it is also corrupt but in a different way. sqlite> select * from config where id

[sqlite] analysis of a corrupt db

2016-01-12 Thread Adam Devita
Good day, Thank you for some avenues of investigation. Q: Does your program examine the codes returned by SQLite3 calls and check to see that they are all returning SQLITE_OK ? A1: The upgrade process is done by a script. It isn't error checking & executes queries via the shell tool. I followed

[sqlite] analysis of a corrupt db

2016-01-12 Thread Richard Hipp
On 1/12/16, Adam Devita wrote: > > Shell Tool Observations: > SQLite version 3.8.4.3 2014-04-03 16:53:12 > Enter ?.help? for usage hints. If you first do: ".log stdout" before doing the "PRAGMA integrity_check", you might get some better diagnostics. Or maybe not. In any event, it doesn't

[sqlite] hard links and SQLite

2016-01-12 Thread Rowan Worth
On 12 January 2016 at 03:00, Felipe Gasper wrote: > On 11 Jan 2016 1:45 PM, Scott Hess wrote: > >> >> As far as preventing the other process from using it before the schema >> exists, do "SELECT count(*) FROM sqlite_master", and if the result is 0, >> the schema does not exist. If you create

[sqlite] analysis of a corrupt db

2016-01-12 Thread Adam Devita
Good day, I've got a case of a corrupt file on some hardware of our own design, a linux based IO controller in a harsh environment. It was lately discovered that 1 controller in a field test group had a corrupt db on it, so naturally we are attempting to figure out what happened. The hardware

[sqlite] Performance of newer versions

2016-01-12 Thread Clemens Ladisch
Simon Slavin wrote: > More recent versions introduced another mode (WAL) > in which any number of queries can take place without locking the database. That would be file locking, not a critical section. This appears to be a problem with using the SQLite C API. Regards, Clemens

[sqlite] Performance of newer versions

2016-01-12 Thread Clemens Ladisch
Gheorghe Marinca wrote: > the library seemed to held, be contended on an internal lock (critical > section). Which lock? This probably happens when you are using the same database connection from multiple threads, or multiple connections in shared-cache mode. Neither one is something that you

[sqlite] Performance of newer versions

2016-01-12 Thread Simon Slavin
On 12 Jan 2016, at 7:40am, Gheorghe Marinca wrote: > We have used in an older product a version of sqllite from 7-8-9 years ago. I > oserved that (this being used on a server) when doing sql queries the library > seemed to held, be contended on an internal lock (critical section). Do the >

[sqlite] Performance of newer versions

2016-01-12 Thread Gheorghe Marinca
Hi, We have used in an older product a version of sqllite from 7-8-9 years ago. I oserved that (this being used on a server) when doing sql queries the library seemed to held, be contended on an internal lock (critical section). Do the newer versions improve on this or for reading there are

[sqlite] hard links and SQLite

2016-01-12 Thread Zia Khatri
Please unsubscribe my id zia_khatri at yahoo.com On Tuesday, January 12, 2016 11:19 AM, Rowan Worth wrote: On 12 January 2016 at 13:12, Felipe Gasper wrote: > Same code, just different processes. > > We?ve just noted over the years with race conditions that that ?if it can > fail, it

[sqlite] hard links and SQLite

2016-01-12 Thread Felipe Gasper
On 11 Jan 2016 9:06 PM, Rowan Worth wrote: > On 12 January 2016 at 03:00, Felipe Gasper wrote: > >> On 11 Jan 2016 1:45 PM, Scott Hess wrote: >> >>> >>> As far as preventing the other process from using it before the schema >>> exists, do "SELECT count(*) FROM sqlite_master", and if the result is