Re: [sqlite] iIs it possible to determine how many open connections are active for a sqlite database?

2011-02-18 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/18/2011 07:24 PM, Frank Chang wrote: > As a result, I periodically get a sqlite return code of 1 from sqlite3_step > after inserting one of the 5.4 million rows. That just means there was an error. You still need to sqlite3_reset to find out

Re: [sqlite] iIs it possible to determine how many open connections are active for a sqlite database?

2011-02-18 Thread Frank Chang
I did some research into this topic . I read the following sqlite-users posts http://www.mail-archive.com/sqlite-users@sqlite.org/msg25752.html and http://www.mail-archive.com/sqlite-users@sqlite.org/msg25762.html . From these posts, its says as of 2007, there is no sqlite public api for

Re: [sqlite] SQLite and SIGFPE

2011-02-18 Thread Nico Williams
On Fri, Feb 18, 2011 at 9:32 PM, Roger Binns wrote: > On 02/18/2011 07:03 PM, Nico Williams wrote: >> BUT, because SIGFPE is a synchronous >> signal so you are on much firmer ground: you can't block it, > > Incidentally you can block it sometimes but the mechanism is very

Re: [sqlite] SQLite and SIGFPE

2011-02-18 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/18/2011 07:03 PM, Nico Williams wrote: > BUT, because SIGFPE is a synchronous > signal so you are on much firmer ground: you can't block it, Incidentally you can block it sometimes but the mechanism is very operating system specific. For

[sqlite] iIs it possible to determine how many open connections are active for a sqlite database?

2011-02-18 Thread Frank Chang
Good evening, I am trying to insert 5.4 million rows to a sqlite database running in Windows or Unix/Linux. I am using a transaction to try to speed up the insertions. When the sqlite database is accessed by multiple connections, and one of the processes modifies the database, the

Re: [sqlite] SQLite and SIGFPE

2011-02-18 Thread Nico Williams
If you know what you are doing, threads are fine. As you know, async signal handling and threading don't mix well, BUT, because SIGFPE is a synchronous signal so you are on much firmer ground: you can't block it, but since it is synchronous you can lexically determine where it might be generated

Re: [sqlite] EXT :Re: Compiler warnings in R-Tree code under Visual StudioExpress

2011-02-18 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/18/2011 06:32 AM, Black, Michael (IS) wrote: > You can actually have both you know, working and no warnings...I do it all > the time. And what evidence do you have it actually works? This is what the SQLite team has:

Re: [sqlite] How to use sqlite and pthread together?

2011-02-18 Thread Nico Williams
On Feb 18, 2011 6:16 PM, "Samuel Adam" wrote: > FYI, Windows NT is documented to have light threads and heavy processes. Windows and Unix processes and threads have similar semantics, and thus roughly comparable performance envelopes. > To my knowledge, it just was not

Re: [sqlite] How to use sqlite and pthread together?

2011-02-18 Thread Samuel Adam
On Thu, 17 Feb 2011 07:30:47 -0500, Richard Hipp wrote: > Using threads is like running with scissors - You are likely to get hurt > and so the best approach is to not do it. > > If you want to run queries in parallel, I suggest putting each query in a > separate process. > >

[sqlite] SQLite and SIGFPE

2011-02-18 Thread Samuel Adam
I recently started writing some SQLite user functions which may generate SIGFPE. I’m a strong advocate of multi-threading—thank you Dr. Hipp, I like running with scissors!—so in case my little functions ever get called in multi-threaded code, I must needs enter the dark and dangerous world

Re: [sqlite] EXT :Re: Compiler warnings in R-Tree code under Visual StudioExpress

2011-02-18 Thread Samuel Adam
On Fri, 18 Feb 2011 09:32:52 -0500, Black, Michael (IS) wrote: > I'll agree that excessive worry is counterproductive. But when I see > warnings about pointer size mismatch and integer truncation I get > worried. So, what would you do if you found this to be the

Re: [sqlite] Compiler warnings in R-Tree code under Visual StudioExpress

2011-02-18 Thread Jay A. Kreibich
On Fri, Feb 18, 2011 at 03:25:46PM +0100, Jean-Denis Muys scratched on the wall: > > On 18 f?vr. 2011, at 15:12, Philip Graham Willoughby wrote: > > > Adding casts to get rid of warnings is usually the wrong answer in my > > experience. Certainly you should never cast the return value of a > >

Re: [sqlite] Compiler warnings in R-Tree code under Visual StudioExpress

2011-02-18 Thread Jean-Denis Muys
On 18 févr. 2011, at 16:51, Philip Graham Willoughby wrote: > >> malloc returns a 64 bit pointer of type void * > > No, from the caller's point of view it returns an int if you haven't included > . Indeed. I assumed the programmer had included the standard headers. On my system, any

Re: [sqlite] Compiler warnings in R-Tree code under Visual StudioExpress

2011-02-18 Thread Philip Graham Willoughby
On 18 Feb 2011, at 14:25, Jean-Denis Muys wrote: > On 18 févr. 2011, at 15:12, Philip Graham Willoughby wrote: > >> Adding casts to get rid of warnings is usually the wrong answer in my >> experience. Certainly you should never cast the return value of a function >> call because that hides the

Re: [sqlite] Help with join

2011-02-18 Thread Jim Morris
A correlated sub-query might work for you. SELECT [Analyzers].[AnalyzerID] , [Analyzers].[Name] AS [Analyzer] , [Analysis].[AnalysisID] , [Analysis].[ScanID] , [Analysis].[Timestamp] , [Analysis].[EndTime] , (SELECT COUNT(*) AS NumDefects

Re: [sqlite] will FTS speed up [LIKE '%foo%'] searches? or: how does iTunes do it?

2011-02-18 Thread Scott Hess
On Fri, Feb 18, 2011 at 12:08 AM, David M. Cotter wrote: > so i am still left wondering if searching substrings is really any faster > using FTS. You may want to search the archives, as this has come up before. I don't recall if anyone had an inspired solution. You could

Re: [sqlite] EXT :Re: Compiler warnings in R-Tree code under Visual StudioExpress

2011-02-18 Thread Black, Michael (IS)
I'll agree that excessive worry is counterproductive. But when I see warnings about pointer size mismatch and integer truncation I get worried. You can actually have both you know, working and no warnings...I do it all the time. I've got code with thousands of lines that can be compiled

Re: [sqlite] Compiler warnings in R-Tree code under Visual StudioExpress

2011-02-18 Thread Jean-Denis Muys
On 18 févr. 2011, at 15:12, Philip Graham Willoughby wrote: > Adding casts to get rid of warnings is usually the wrong answer in my > experience. Certainly you should never cast the return value of a function > call because that hides the problems you get when it's implicitly returning > int

Re: [sqlite] Compiler warnings in R-Tree code under Visual Studio Express

2011-02-18 Thread Marian Cascaval
I'm suspecting there's something wrong with Studio Express C++. I use both 2008 and 2010 and I notice on 2008 that the IDE loses track of code in case of large source files. Sometimes comments that should have a certain colour have a different one and so on. For example, the first warning at

Re: [sqlite] Compiler warnings in R-Tree code under Visual StudioExpress

2011-02-18 Thread Philip Graham Willoughby
On 18 Feb 2011, at 13:12, Black, Michael (IS) wrote: > I'm of the opinion that all such warnings should be permanently fixed. Such > warnings do point to potential problems. > And not by disabling the warning but by fixing the code (explicit casts for > example). It's been a while since I

Re: [sqlite] Compiler warnings in R-Tree code under Visual StudioExpress

2011-02-18 Thread Richard Hipp
On Fri, Feb 18, 2011 at 8:12 AM, Black, Michael (IS) wrote: > I'm of the opinion that all such warnings should be permanently fixed. > Such warnings do point to potential problems. > And not by disabling the warning but by fixing the code (explicit casts for > example).

Re: [sqlite] Compiler warnings in R-Tree code under Visual StudioExpress

2011-02-18 Thread Black, Michael (IS)
I'm of the opinion that all such warnings should be permanently fixed. Such warnings do point to potential problems. And not by disabling the warning but by fixing the code (explicit casts for example). How many people try this and get worried about possible problems? If you simply fix the

Re: [sqlite] Mozilla Sunbird

2011-02-18 Thread Luuk
On 18-02-11 05:04, Andrew Fox wrote: > I would be extremely grateful if someone could tell me how to copy my Mozilla > Sunbird calendar data into a new Mozilla Sunbird calendar. My laptop hard > drive failed and so went my very imporant calendar. I have a complete backup > of my laptop's

[sqlite] Mozilla Sunbird

2011-02-18 Thread Andrew Fox
I would be extremely grateful if someone could tell me how to copy my Mozilla Sunbird calendar data into a new Mozilla Sunbird calendar. My laptop hard drive failed and so went my very imporant calendar. I have a complete backup of my laptop's failed c drive before it crashed and I think my

Re: [sqlite] Compiler warnings in R-Tree code under Visual StudioExpress

2011-02-18 Thread Nick Shaw
Afriza N. Arief wrote: > I tried to compile SQLite 3.7.5 with SQLITE_ENABLE_RTREE=1 and got the following warnings: > > sqlite3.c(120736): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data > sqlite3.c(120749): warning C4244: '+=' : conversion from 'double' to 'float',

Re: [sqlite] will FTS speed up [LIKE '%foo%'] searches? or: how does iTunes do it?

2011-02-18 Thread David M. Cotter
> Did you read the page at the URL I gave ? It answers the question. yes the page shows an extremely unhelpful comparison: > SELECT count(*) FROM enrondata1 WHERE content MATCH 'linux'; /* 0.03 seconds > */ > SELECT count(*) FROM enrondata2 WHERE content LIKE '%linux%'; /* 22.5 seconds > */