[sqlite] Lightweight integrity_check?

2014-01-15 Thread Steven Fisher
After opening, I want to do some basic checking of my database. I’m finding integrity_check much too slow for some of my users (especially with large amounts of data) but I don’t want to just blindly trust the database either. A few options: - Rely on what sqlite does on its own when I start

Re: [sqlite] Re-try logic on SQLITE_BUSY/deadlocked?

2009-05-22 Thread Steven Fisher
On 22-May-2009, at 1:11 PM, Rosemary Alles wrote: > Does anyone have solid code examples (in C/C++) or pseudo code of how > to establish re-try code/logic successfully? Just use sqlite3_busy_timeout. http://www.sqlite.org/c3ref/busy_timeout.html ___

[sqlite] sqlite3_open_v2 and SQLITE_BUSY

2009-05-07 Thread Steven Fisher
I was looking over the requirements for sqlite3_open_v2(), and I'm not clear if this function can ever return SQLITE_BUSY. I initially wrote code to handle this case by sleeping and trying sqlite3_open_v2() again, but it is untested and I've spotted one bug in it already (I wasn't calling

Re: [sqlite] sqlite3StrICmp

2008-04-04 Thread Steven Fisher
On 04-Apr-2008, at 2:15 PM, Nicolas Williams wrote: > Right, except for the thing about multiple columns with the same name > being OK. "AS" >> 2. I need to use stricmp for comparing column names. I'd rather use >> the same comparison that sqlite3 uses for comparing column NAMES. > > Why can't

Re: [sqlite] 3.5.7 & TCL: "undefined symbol: sqlite3StrICmp"

2008-04-04 Thread Steven Fisher
On 04-Apr-2008, at 1:17 PM, Nicolas Williams wrote: > On Fri, Apr 04, 2008 at 01:06:58PM -0700, Steven Fisher wrote: >>> It's not necessarily the same as strcasecmp(). You can have per- >>> column collations. >> >> Column names, not column contents. :) I don

Re: [sqlite] 3.5.7 & TCL: "undefined symbol: sqlite3StrICmp"

2008-04-04 Thread Steven Fisher
On 04-Apr-2008, at 12:54 PM, Nicolas Williams wrote: > On Fri, Apr 04, 2008 at 12:48:05PM -0700, Steven Fisher wrote: >> On 03-Apr-2008, at 11:22 PM, Matthew L. Creech wrote: >>> We need to either rename it so >>> that it's part of the library's exported API, or

Re: [sqlite] 3.5.7 & TCL: "undefined symbol: sqlite3StrICmp"

2008-04-04 Thread Steven Fisher
On 03-Apr-2008, at 11:22 PM, Matthew L. Creech wrote: > We need to either rename it so > that it's part of the library's exported API, or do something > different in tclsqlite.c. I would really like to have a few of sqlite3's internal functions available to client applications in a

[sqlite] sqlite3_aggregate_context with C++ classes

2008-04-03 Thread Steven Fisher
Can Final be called without Step first being called? If Step is called, will Final always be called? I know the intention is to call sqlite3_aggregate_context with the size I really need and not allocate anything myself, but I want to store a pointer to a C++ class in the aggregate context.

Re: [sqlite] When I try to .read I get a "can't open" message

2008-03-31 Thread Steven Fisher
On 31-Mar-2008, at 2:11 PM, Douglas McCarroll wrote: > I'm sure I'm doing something simple and obvious wrong here. I'm a > complete > sqlite n00b. > > Help? > > C:\_source>sqlite3 test > SQLite version 3.5.7 > Enter ".help" for instructions > sqlite> .read test.sql; > can't open "test.sql;" You

Re: [sqlite] since when was fts3 included in binary?

2008-03-02 Thread Steven Fisher
On 2-Mar-2008, at 3:55 AM, Rael Bauer wrote: > It seems that fts3 is now (3.5.6) included in the windows > binary .dll. I'd like to know since when was fts3 included in the > binary? > > Also, since when did the amalgamation include the fts3 sources? According to the web page, 3.5.3.

Re: [sqlite] DATETIME data type

2008-02-28 Thread Steven Fisher
On 28-Feb-2008, at 1:29 PM, Yong Zhao wrote: > It seems that sqlite3 does not support DATETIME data type. > > If I have the following data in table t1, how do I select people who > is > older than certain date? Use -MM-DD instead of M/D/Y. Available formats described here under Time

Re: [sqlite] Prepare Statement

2008-02-28 Thread Steven Fisher
On 28-Feb-2008, at 6:22 AM, Mahalakshmi.m wrote: > if ( sqlite3_prepare(gpst_SqliteInstance,"SELECT id, Name FROM MUSIC > WHERE > Name >= '%d%c' LIMIT 1;",-1,_SearchPrepareStmt,0)!= SQLITE_OK) That's not what a bind point looks like. Take a look here:

[sqlite] Contrib down?

2008-02-22 Thread Steven Fisher
Clicking any of the download links is generating an error: ERROR: attempt to write a readonly database attempt to write a readonly database while executing "db eval {UPDATE file SET cnt=cnt+1 WHERE rowid=$Q(get)}" invoked from within "if {[info exists Q(get)]} { db eval {UPDATE file

Re: [sqlite] View update performance (was: Updatable views)

2008-02-14 Thread Steven Fisher
On 14-Feb-2008, at 12:27 PM, Stephen Oberholtzer wrote: > I'd love to know > what frame of mind I was in when I wrote it, because I'm pretty sure I > wouldn't have come up with the name 'MaterializeView' if I had tried > to write the patch today. Altered frames of mind are responsible for both

Re: [sqlite] SQLite Web Site

2008-02-06 Thread Steven Fisher
On 6-Feb-2008, at 8:41 PM, Dan wrote: > is not valid HTML. It is valid XHTML of course. All browsers > just ignore the "/" character, but I can't think of any document > where this is defined. Does anybody know? W3C's validator said this: The sequence can be interpreted in at least two

Re: [sqlite] SQLite Web Site

2008-02-06 Thread Steven Fisher
On 06-Feb-2008, at 12:33 PM, [EMAIL PROTECTED] wrote: > What do you mean "no longer found"? Do you mean that that > you cannot see anything at all, or that the new design is such > that it is not displayed correctly? Well, the page definitely doesn't validate:

Re: [sqlite] Is it possible to do this using only SQL?

2008-02-04 Thread Steven Fisher
On 04-Feb-2008, at 3:41 PM, Dennis Volodomanov wrote: > Is that possible? If not, I'll have to do it in the code, but that > will > probably be slower and I'm expecting to have tens of thousands of > rows. Sure: sqlite> create table x(a); sqlite> insert into x(a) values('ABC'); sqlite>

Re: [sqlite] .databases shell command

2008-01-10 Thread Steven Fisher
On 10-Jan-2008, at 1:45 PM, Samuel Gilbert wrote: I though that typing ".mode csv" in your SQLite shell would solve the problem. I though it might be a good idea to test it before suggesting a solution. However, it only works with the results of queries and not with the built-in commands.

[sqlite] .databases shell command

2008-01-10 Thread Steven Fisher
Just now I opened a bunch of shells, pasted the same query into all of them, and closed the ones I didn't want after seeing the result. So I ran .databases to see which databases I'm actually left with, and saw something like this (not exact): seq name file --- --

Re: [sqlite] Explain query plan

2007-12-21 Thread Steven Fisher
On 20-Dec-2007, at 3:02 PM, Kees Nuyt wrote: You will get much more detail with EXPLAIN SELECT ... It shows the VDBE code, which looks cryptic at first but will prove really informative. I'm still at the cryptic phase, but I'll figure it out. Thanks for confirming my suspicions about

[sqlite] Explain query plan

2007-12-20 Thread Steven Fisher
So I've been using EXPLAIN QUERY PLAN to try to optimize my queries, and I realized I'm missing something important. It shares what tables are used and what indexes, but as I understand it, it doesn't include whether I'm working entirely off indexes or not. For instance, if I have a line:

Re: [sqlite] DeviceSQL

2007-12-14 Thread Steven Fisher
On 14-Dec-2007, at 5:41 AM, Clay Dowling wrote: I have to say, this discussion has been very informative, although probably not in a way that would make mr Weick happy. I've certainly learned a lot about encirq that tells me what I need to know about doing business with them. Same thought

Re: [sqlite] Request for help with the SQLite Website

2007-11-14 Thread Steven Fisher
On 14-Nov-2007, at 3:37 PM, John Stanton wrote: I am looking at it on a wide screen and it does not render to the full screen width. I would guess that making the toolbar an image would stop the wrapping. The image would scale to 100%. I used to think it was a good thing when web sites

Re: [sqlite] Request for help with the SQLite Website

2007-11-14 Thread Steven Fisher
On 13-Nov-2007, at 5:40 PM, [EMAIL PROTECTED] wrote: * Suggestions for something better to put on the home page. Yeah. My first thought when I brought up that page was "There's no way I'm reading all that text!"... and I already use sqlite. I like the points it goes over, though.

[sqlite] [ot] Free formatter?

2007-10-23 Thread Steven Fisher
Does anyone know of a good sql formatter that's compatible with sqlite3's syntax? I'm looking for a command line-based tool with sources that can be cross-compiled to the usual suspects (Win32, Unix, Mac OS X). - To