Re: [sqlite] Sqlite 3.6.23 string functions do not follow case sensitivity in comparions

2010-06-17 Thread Jeff Webb
Thanks for your help. On 6/16/10 8:11 AM, "Pavel Ivanov" wrote: > Is this working as designed and the 3.0.8 behavior was incorrect? Or is this > a valid bug? I'm not developer of SQLite and don't know what did they intend to do. But applying common sense I'd say that

Re: [sqlite] HELP : sqlite execute low speed in ARM9+Linux embadded system.

2010-06-17 Thread Simon Slavin
On 17 Jun 2010, at 4:47pm, backup wrote: > sprintf(sqlstr,"update db set isSent=1 where ID in (select ID from > db where isSent=0 limit %d);",RECORD_NUM); Can you post the commands used to create the table and any indexes on it ? Simon. ___

Re: [sqlite] could be memory leak

2010-06-17 Thread Jay A. Kreibich
On Thu, Jun 17, 2010 at 02:07:50PM -0700, VIKRANT scratched on the wall: > I have following C program > It takes the DB path as argument > > For testing, I have placed the DB on a dir over the NFS > > Now after the open call, I unshare the NFS from the NFS > server to generate I/O errors > Once

[sqlite] Fw: could be memory leak

2010-06-17 Thread VIKRANT
Adding the right alias...   I have following C program It takes the DB path as argument For testing, I have placed the DB on a dir over the NFS Now after the open call, I unshare the NFS from the NFS server to generate I/O errors Once the exec starts receiving errors, it is leaking memory..

Re: [sqlite] could be memory leak

2010-06-17 Thread VIKRANT
Sent the earlier email half way.. I'm using version 3.3.9 and I see the same with version 3.6.23 Any help will be appreciated! thanks, -vikrant ---prstat for vmem---    PID USERNAME  SIZE   RSS STATE  PRI NICE  TIME  CPU PROCESS/NLWP   8548 root   15M   10M cpu0 0    0   0:00:44 

[sqlite] could be memory leak

2010-06-17 Thread VIKRANT
I have following C program It takes the DB path as argument For testing, I have placed the DB on a dir over the NFS Now after the open call, I unshare the NFS from the NFS server to generate I/O errors Once the exec starts receiving errors, it is leaking memory.. after 6 hours, its leaking

[sqlite] HELP : sqlite execute low speed in ARM9+Linux embadded system.

2010-06-17 Thread backup
hi, everyone, I program in an embaded system: ARM9 soc S3C2410 +Linux 2.4+sqlite 3.3. All data store in NAND FLASH , the file system is YAFFS . My question is the function "sqlite3_exec(.)" take too many seconds, the following is my source code, please see the "printf" 's

Re: [sqlite] PRAGMA integrity_check error recovery questions

2010-06-17 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/17/2010 01:50 PM, Simon Slavin wrote: > Sometimes it's best to use the command-line tool to dump the data to a file > of SQL commands, The command line tool needs its code fixing first: http://www.sqlite.org/src/tktview?name=2466653295 In

Re: [sqlite] PRAGMA integrity_check error recovery questions

2010-06-17 Thread Simon Slavin
On 17 Jun 2010, at 9:45pm, Jim Terman wrote: > Does the integrity_check PRAGMA fix any problems that it encounters or > does it just report them? Report. > Are there anyway of recovering from these errors or is the database > unfixable? Sometimes VACUUM fixes them. It can conceivably make

[sqlite] PRAGMA integrity_check error recovery questions

2010-06-17 Thread Jim Terman
Does the integrity_check PRAGMA fix any problems that it encounters or does it just report them? Are there anyway of recovering from these errors or is the database unfixable? ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] c compiler during install

2010-06-17 Thread Glen Scratchley
Thanks to all who (tried to) help me. I was unable to get a valid gcc on my machine, so I moved to a defend RHS machine, which is RHS3 ./configure and the commands that follow in the install file, seem to have worked correctly. Glen Scratchley DMS Solutions Architect Macro 4, Inc. (973)

Re: [sqlite] notify all processes of database modification

2010-06-17 Thread Ed Scherer
(Arggg!!! Second try sending this; first attempt seems to have been truncated. If you don't see my signature at the end of this one, it got truncated again.) > Hi, > I have two processes connecting to a database. Both can modify database. When > some process modify database, I want the other

Re: [sqlite] notify all processes of database modification

2010-06-17 Thread Ed Scherer
> Hi, > I have two processes connecting to a database. Both can modify database. When > some process modify database, I want the other to be notified (so, it can > reload data). > Currently, I use unix sockets, so a process can notify all listener process > that something has changed. But I wonder

Re: [sqlite] c compiler during install

2010-06-17 Thread Glen Scratchley
Thanks. Another poster suggested (and I confirmed) that I don't have a valid connection to the Internet. Once I fix that, I will confirm that I am an RHN subscriber. Glen Scratchley DMS Solutions Architect Macro 4, Inc. (973) 526-3900 Direct: (973) 526-3832 Fax: (973) 526-3899 A

Re: [sqlite] c compiler during install

2010-06-17 Thread Black, Michael (IS)
You must not be a RHN subscriber. So you'll have to install from the CD. You should be able to find gcc on the cd and do "rpm -i gcc*" It might complain about needing some other things too which you will also need to install. Or...if you have an X window running your Add/Remove Software

Re: [sqlite] c compiler during install

2010-06-17 Thread Glen Scratchley
It would appear that you are correct: [r...@selkirk ~]# ping npr.org PING npr.org (216.35.221.76) 56(84) bytes of data. --- npr.org ping statistics --- 8 packets transmitted, 0 received, 100% packet loss, time 7002ms [r...@selkirk ~]# I will fix this before I continue, Thanks, Glen

Re: [sqlite] c compiler during install

2010-06-17 Thread Teg
Hello Glen, I'm not a Linux guy (though I've installed it and run a DB on it before) but, GS> There was an error parsing the RHN proxy settings. GS> RHN support will be disabled. Suggests your install can't get out on to the 'net to find the files you're looking for. If YUM can't get to the

Re: [sqlite] SELECT behaviour with INDEX

2010-06-17 Thread Jay A. Kreibich
On Thu, Jun 17, 2010 at 09:07:56AM -0500, Black, Michael (IS) scratched on the wall: > I sense the beginning of a "How to use indexes" page. > > Things you need know: > Only one index is used per query (or insert??). It isn't that bad. In general, it is "one index PER TABLE, per

Re: [sqlite] SELECT behaviour with INDEX

2010-06-17 Thread Jay A. Kreibich
On Thu, Jun 17, 2010 at 08:44:25AM -0500, Black, Michael (IS) scratched on the wall: > Is there any advantage/disadvantage to having seperate indexes in a > case like this? In a case like this, no. If each column was indexed individually one one of them would be used in this query. There

Re: [sqlite] c compiler during install

2010-06-17 Thread Glen Scratchley
I think that this means I'm missing something, and the ./configure still doesn't like it: [r...@selkirk sqlite-3.6.23.1]# whoami root [r...@selkirk sqlite-3.6.23.1]# yum install gcc Loading "installonlyn" plugin Loading "rhnplugin" plugin There was an error parsing the RHN proxy settings. RHN

Re: [sqlite] SELECT behaviour with INDEX

2010-06-17 Thread Simon Slavin
On 17 Jun 2010, at 2:03pm, Gregoire de Turckheim wrote: > This might not be the scope of sqlite.org documentation area, but it > could be a good idea to have a paper about how indexes work. Yeah, I really have to write that sometime, don't I ? On 17 Jun 2010, at 2:44pm, Black, Michael (IS)

Re: [sqlite] c compiler during install

2010-06-17 Thread Black, Michael (IS)
You missed this step: After you "su" you are "root". Then: yum install gcc Then do your configure and install. Should work fine. Michael D. Black Senior Scientist Northrop Grumman Mission Systems From: sqlite-users-boun...@sqlite.org on behalf of Glen

Re: [sqlite] c compiler during install

2010-06-17 Thread Glen Scratchley
Thanks for the reply. I'm not sure what your "as root? Really?" meant, so I tried to install as a regular user; no joy.: [colad...@selkirk sqlite-3.6.23.1]$ PATH=$PATH:/usr/libexec/gcc/i386-redhat-linux/4.1.1/ export PATH [colad...@selkirk sqlite-3.6.23.1]$ which cc1

Re: [sqlite] c compiler during install

2010-06-17 Thread Glen Scratchley
Thanks. It doesn't appear that I have the necessary files to install gcc: [r...@selkirk 4.1.1]# gcc -v bash: gcc: command not found [r...@selkirk 4.1.1]# yum install gcc Loading "installonlyn" plugin Loading "rhnplugin" plugin There was an error parsing the RHN proxy settings. RHN support will

Re: [sqlite] SELECT behaviour with INDEX

2010-06-17 Thread Black, Michael (IS)
I sense the beginning of a "How to use indexes" page. Things you need know: Only one index is used per query (or insert??). So multiple indexes will not do you any good for a single select (you might still need them for each different WHERE or ORDER you do though). Recommendations

Re: [sqlite] c compiler during install

2010-06-17 Thread Black, Michael (IS)
You probably don't have the gcc package installed. You're seeing an i386 compiler which may not produce what you want plus you won't necessarily have all the header files you need. And did you add that directory path to cc1 yourself to your PATH? It's quite non-standard and should be removed

Re: [sqlite] c compiler during install

2010-06-17 Thread Glen Scratchley
thanks for the reply. There is nothing in that directory other than that executable: [colad...@selkirk 4.1.1]$ ls -la total 5156 drwxr-xr-x 2 root root4096 Aug 8 2008 . drwxr-xr-x 3 root root4096 Aug 8 2008 .. -rwxr-xr-x 1 root root 5246768 Jan 17 2007 cc1 As I said, I'm not a c

Re: [sqlite] c compiler during install

2010-06-17 Thread Jay A. Kreibich
On Thu, Jun 17, 2010 at 09:48:15AM -0400, Glen Scratchley scratched on the wall: > This is my first post; I have some SQL experience, but I am a complete > newbie with sqlite > > I didn't get any hits with a search of the faq, so if this has been > answered, I apologize; please point me to it. >

Re: [sqlite] c compiler during install

2010-06-17 Thread Pavel Ivanov
> I am not a programmer, but I assume that this a c compiler: > > [r...@selkirk sqlite-3.6.23.1]# which cc1 > /usr/libexec/gcc/i386-redhat-linux/4.1.1/cc1 > [r...@selkirk sqlite-3.6.23.1]# echo $PATH > /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbi >

Re: [sqlite] SELECT behaviour with INDEX

2010-06-17 Thread Pavel Ivanov
> Is there any advantage/disadvantage to having seperate indexes in a case like > this? SQLite uses at maximum one index per table per query. So there is a big disadvantage in having separate indexes especially if @IdClient is not selective enough. Pavel On Thu, Jun 17, 2010 at 9:44 AM,

[sqlite] c compiler during install

2010-06-17 Thread Glen Scratchley
This is my first post; I have some SQL experience, but I am a complete newbie with sqlite I didn't get any hits with a search of the faq, so if this has been answered, I apologize; please point me to it. I am trying to install on RHS 5. When I run .configure I get this: [r...@selkirk

Re: [sqlite] SELECT behaviour with INDEX

2010-06-17 Thread Black, Michael (IS)
Is there any advantage/disadvantage to having seperate indexes in a case like this? In other words, as a simple design goal to have a separate index that matches whatever you select on and order on? It seems to me that if you do "SELECT * FROM log WHERE id_clie...@idclient ORDER BY utc DESC

Re: [sqlite] Avoiding Database Is Locked Error

2010-06-17 Thread Pavel Ivanov
> In my last post I mentioned that I updated my programs so that I can > execute an arbitrary query or update, thus eliminating the need to use > the sqlite command line utility. There really is only one program > accessing the database now. Sorry, I've missed this detail. In this case you are

Re: [sqlite] SELECT behaviour with INDEX

2010-06-17 Thread Igor Tandetnik
Gregoire de Turckheim wrote: > This might not be the scope of sqlite.org documentation area, but it > could be a good idea to have a paper about how indexes work. It's simple, really. Imagine a phonebook, with names sorted alphabetically. Consider each letter of the name

Re: [sqlite] SELECT behaviour with INDEX

2010-06-17 Thread Gregoire de Turckheim
Pavel Ivanov a écrit : >> It seems to me the DB engine tries to perform an unindexed search if the >> requested value is not present in the index. >> Is this behaviour intended ? How can I get rid of it ? >> > > If your index is in that very order as you said, i.e. (utc, > id_client), then

Re: [sqlite] Avoiding Database Is Locked Error

2010-06-17 Thread Odekirk, Shawn
>> I am not using BEGIN IMMEDIATE, just BEGIN, but I don't think it is a >> problem in my case, since now there really is just one program accessing >> the database. > >Did you forget the message this thread was started from? The sqlite3 >command line utility is a second program, so this could be

Re: [sqlite] SELECT behaviour with INDEX

2010-06-17 Thread Pavel Ivanov
> It seems to me the DB engine tries to perform an unindexed search if the > requested value is not present in the index. > Is this behaviour intended ? How can I get rid of it ? If your index is in that very order as you said, i.e. (utc, id_client), then whatever @IdClient you put in the query

Re: [sqlite] SELECT behaviour with INDEX

2010-06-17 Thread Igor Tandetnik
Gregoire de Turckheim wrote: > I'm noticing a strange behaviour with SELECT statements. > > Let's consider this statement : > > SELECT * FROM log > WHERE id_clie...@idclient > ORDER BY utc DESC > LIMIT 1 > > The table has an index on the "utc" and "id_client" fields

[sqlite] SELECT behaviour with INDEX

2010-06-17 Thread Gregoire de Turckheim
Hi, I'm noticing a strange behaviour with SELECT statements. Let's consider this statement : SELECT * FROM log WHERE id_clie...@idclient ORDER BY utc DESC LIMIT 1 The table has an index on the "utc" and "id_client" fields pair. When running this query with an @IdClient value which exists in

Re: [sqlite] [sqlite-announce] HELP : sqlite execute low speed in ARM9+Linux embadded system.

2010-06-17 Thread D. Richard Hipp
Questions such as this belong on sqlite-users@sqlite.org, not on sqlite-annou...@sqlite.org . Thank you. On Jun 16, 2010, at 11:24 PM, backup wrote: > hi, everyone, > I program in an embaded system: ARM9 soc S3C2410 +Linux 2.4+sqlite > 3.3. > All data store in NAND FLASH , the file system