[sqlite] crash4 test fails (3.5.9)

2008-06-03 Thread kgs
Hi all, I've compiled sqlite3 for arm-linux(armv5t) as well as the tcl environment. sqlite3 3.5.9 tcl 8.4 I've run testfixture all.test on the hardware it's compiled for. Everything runs great until we come to the crash4-1.1.1 up to crash4-1.1000.1. the messages are : Expected: [1 {child process

[sqlite] Forming a query with BLOB with null characters

2008-06-03 Thread Shailesh Birari
Hello, I have a simple question here. I want to generate a insert query (char*) which will insert a blob in a table. This blob is nothing but a C structure in my program. So the query would be something like this INSERT INTO table1 VALUES ('12323232\0\0\0\023232323\0\0\023232323\0\03445\0')

[sqlite] Corrupted sqlite_sequence table

2008-06-03 Thread James P
I would remove the leading/trailing quotes external to the import of the file, using something like sed or gawk. I couldn't work out how to do this purely using sqlite, however. _ It's simple! Sell your car for just $30 at

[sqlite] Sqlite on RAM

2008-06-03 Thread Hildemaro Carrasquel
Hello.- but how can i make a different between all db on RAM if you define as :memory: ? -- Ing. Hildemaro Carrasquel Ingeniero de Proyectos Cel.: 04164388917/04121832139 ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Sqlite on RAM

2008-06-03 Thread Alex Katebi
All your dbs will have different values. It is a C pointer value not an enumeration value. On Tue, Jun 3, 2008 at 8:28 AM, Hildemaro Carrasquel [EMAIL PROTECTED] wrote: Hello.- but how can i make a different between all db on RAM if you define as :memory: ? -- Ing. Hildemaro Carrasquel

Re: [sqlite] crash4 test fails (3.5.9)

2008-06-03 Thread kgs
kgs wrote: Hi all, I've compiled sqlite3 for arm-linux(armv5t) as well as the tcl environment. sqlite3 3.5.9 tcl 8.4 I've run testfixture all.test on the hardware it's compiled for. Everything runs great until we come to the crash4-1.1.1 up to crash4-1.1000.1. the messages are :

Re: [sqlite] Forming a query with BLOB with null characters

2008-06-03 Thread Shailesh Birari
Thank you for the input. THis is what I tried, char*data = THIS \\\IS 'BLAH This is a blob data of 40 bytes that I wanted to store, so all bytes after BLAH are all '\0'. So I created a insert query like this, by converting the blob in hexadecimal format, Insert into table values

Re: [sqlite] Forming a query with BLOB with null characters

2008-06-03 Thread Dennis Cote
Shailesh Birari wrote: Thank you for the input. THis is what I tried, char*data = THIS \\\IS 'BLAH This is a blob data of 40 bytes that I wanted to store, so all bytes after BLAH are all '\0'. No, data is a pointer to a literal character string of length 15. So I created a insert query

Re: [sqlite] transaction recovery question

2008-06-03 Thread Igor Tandetnik
Darko Filipovic [EMAIL PROTECTED] wrote: I've tried...(not with UFO :D ). Nothing happens, database is not corrupted and that is what confuses me...I thought it should not be readable (malformed) ?! Not necessarily. Suppose you issued an update statement that was supposed to update 100

Re: [sqlite] transaction recovery question

2008-06-03 Thread P Kishor
__ NOD32 3154 (20080603) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite

Re: [sqlite] transaction recovery question

2008-06-03 Thread Darko Filipovic
://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users __ NOD32 3154 (20080603) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com ___ sqlite-users mailing list sqlite-users@sqlite.org http

Re: [sqlite] transaction recovery question

2008-06-03 Thread Darko Filipovic
__ NOD32 3154 (20080603) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] transaction recovery question

2008-06-03 Thread Federico Granata
2008/6/3 Darko Filipovic [EMAIL PROTECTED]: But, what happen if journal file is deleted before starting B process? what if a UFO stole your pc ? :-D try to delete journal file and see what happens ... ___ sqlite-users mailing list

Re: [sqlite] crash4 test fails (3.5.9)

2008-06-03 Thread kgs
kgs wrote: kgs wrote: Hi all, I've compiled sqlite3 for arm-linux(armv5t) as well as the tcl environment. sqlite3 3.5.9 tcl 8.4 I've run testfixture all.test on the hardware it's compiled for. Everything runs great until we come to the crash4-1.1.1 up to crash4-1.1000.1. the

Re: [sqlite] transaction recovery question

2008-06-03 Thread P Kishor
On 6/3/08, Federico Granata [EMAIL PROTECTED] wrote: 2008/6/3 Darko Filipovic [EMAIL PROTECTED]: But, what happen if journal file is deleted before starting B process? what if a UFO stole your pc ? :-D try to delete journal file and see what happens ... my vote for the funniest

Re: [sqlite] transaction recovery question

2008-06-03 Thread Igor Tandetnik
Darko Filipovic [EMAIL PROTECTED] wrote: The thing is that my system sometimes produces malformed database, but I don't know what cause that. I'm trying to collect possible cases when database gets malformed. I'm going in this direction because it is not possible to debug system to reproduce

Re: [sqlite] transaction recovery question

2008-06-03 Thread Darko Filipovic
But, what happen if journal file is deleted before starting B process? Pozdrav, Darko F. Igor Tandetnik wrote: Robert Lehr [EMAIL PROTECTED] wrote: I have a question about recovering from a transaction that was not completed by a process b/c it terminated abnormally, e.g., careless

[sqlite] SQLite Authorizer Feature Suggestion

2008-06-03 Thread Alex Katebi
Hi All, For those of us that use SQLite mostly in-memory. Our context is mostly not {sqlite3*} database pointer, it is {sqlite3_stmt*}. Current API? int sqlite3_set_authorizer( sqlite3*, int (*xAuth)(void*,int,const char*,const char*,const char*,const char*), void *pUserData ); Can we

Re: [sqlite] transaction recovery question

2008-06-03 Thread P Kishor
On 6/3/08, Christophe Leske [EMAIL PROTECTED] wrote: Hi, i am new to this list, Welcome. But you have hijacked an existing thread. That will decrease your chances of getting folks to reply to you positively. Tip: Start a new thread for a different query. can anyone point me to a good FAQ

Re: [sqlite] transaction recovery question

2008-06-03 Thread Fred Williams
That's why I continue to monitor SQLite messages even when I'm not actively developing with SQLite. There is an inherent entertainment value that appears built in. Over time I'm certain I have been guilty of posting some shall we say entertaining messages myself. Sometimes I think SQLite is so

Re: [sqlite] transaction recovery question

2008-06-03 Thread Christophe Leske
Hi, i am new to this list, can anyone point me to a good FAQ document on how to improve the speed of a SQLite database? I got a city database (a geographical database) that I need to query for lat/long values, and importance of the city (class value). For my smallest query, i am waiting

Re: [sqlite] transaction recovery question

2008-06-03 Thread Christophe Leske
First - some sample code or queries would be helpful. Second - start a new topic (http://en.wikipedia.org/wiki/Thread_hijacking). Yes, sorry, my fault, i am a lazy bum these days. My apologies. This was also an indirect test if this list is still alive.. Will start a new thread right

Re: [sqlite] How to speed up my queries?

2008-06-03 Thread Wilson, Ron P
Hi Christophe, 1. Please give us an example query. SELECT * FROM Cities where LONGITUDE_DDS=? AND LATITUDE_DDS=? 2. Paste in the EXPLAIN results from the command line tool. 3. Is the database file local or are you accessing it over a network? RW Ron Wilson, S/W Systems Engineer III, Tyco

Re: [sqlite] transaction recovery question

2008-06-03 Thread Wilson, Ron P
Welcome to the list! First - some sample code or queries would be helpful. Second - start a new topic (http://en.wikipedia.org/wiki/Thread_hijacking). RW Ron Wilson, S/W Systems Engineer III, Tyco Electronics, 434.455.6453 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL

[sqlite] How to speed up my queries?

2008-06-03 Thread Christophe Leske
Hi, i am a new member of this list and interested in speeding up my sqlite queries. I am using SQlite in a 3d environment which is close to Google Earth or Nasa WorldWind. We have a city database that is being queried regurlarly depending on the lat/long position of the viewport in order to

Re: [sqlite] How to speed up my queries?

2008-06-03 Thread Christophe Leske
Wilson, Ron P schrieb: Hi Christophe, 1. Please give us an example query. SELECT * FROM Cities where LONGITUDE_DDS=? AND LATITUDE_DDS=? 2. Paste in the EXPLAIN results from the command line tool. 3. Is the database file local or are you accessing it over a network? Hi, the database

Re: [sqlite] How to speed up my queries?

2008-06-03 Thread Petite Abeille
On Jun 3, 2008, at 7:27 PM, Christophe Leske wrote: i am a new member of this list and interested in speeding up my sqlite queries. There are no magic bullets, but The SQLite Query Optimizer Overview is a good read: http://www.sqlite.org/optoverview.html As well as Query Plans:

Re: [sqlite] How to speed up my queries?

2008-06-03 Thread Jay A. Kreibich
On Tue, Jun 03, 2008 at 07:56:11PM +0200, Christophe Leske scratched on the wall: A typical query that causes problems would be: SELECT * FROM Cities WHERE class_dds11 and (longitude_DDS BETWEEN 6.765103 and 7.089129) AND (latitude_DDS BETWEEN 44.261771 and 44.424779) ORDER BY class_dds

Re: [sqlite] SQLite Authorizer Feature Suggestion

2008-06-03 Thread Mihai Limbasan
Alex Katebi wrote: Hi All, For those of us that use SQLite mostly in-memory. Our context is mostly not {sqlite3*} database pointer, it is {sqlite3_stmt*}. Current API? int sqlite3_set_authorizer( sqlite3*, int (*xAuth)(void*,int,const char*,const char*,const char*,const char*), void

Re: [sqlite] How to speed up my queries?

2008-06-03 Thread Wilson, Ron P
I'm not a guru yet, but I think you are not using the latlon index in your query. Perhaps if you index on lat and lon separately your query will use those indices. I think the lines below indicate using the indices on class_dds and rowid. 19IdxGE 2 408 1 00

Re: [sqlite] How to speed up my queries?

2008-06-03 Thread Wilson, Ron P
PS. Also, I am not sure about the BETWEEN command - does it use indices? If not you could write the query without BETWEEN. RW Ron Wilson, S/W Systems Engineer III, Tyco Electronics, 434.455.6453 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Christophe

Re: [sqlite] sqlite-users Digest, Vol 6, Issue 6

2008-06-03 Thread Robert Lehr
Gentlemen, Thank you for your replies. The definitive answers are helpful. However, there seems to be some confusion around the question. RE: simple enough to test and ...see what happens... empirical analysis of basic reliability issues is insufficient when one is building an

Re: [sqlite] sqlite-users Digest, Vol 6, Issue 6

2008-06-03 Thread Igor Tandetnik
Robert Lehr [EMAIL PROTECTED] wrote: RE: Doctor, it hurts... this seems to imply that the question does not warrant analysis. that is incorrect. such scenarios can occur. if I were to ask the question, I would have been seeking to understand how SQLite copes with it You don't quote any

[sqlite] transaction locks w/ multiple DBs open/ATTACHed

2008-06-03 Thread Robert Lehr
This mailing list is amazingly responsive. That, among SQLite's features, makes it very easy use SQLite in our application. Thank you. My current question focuses on SQLite's locking policy for transactions on connections which have multiple DBs are open/ATTACHed. Specifically, does SQLite

Re: [sqlite] Bind arguments for insert and not null columns with default values

2008-06-03 Thread Jeff Hamilton
On Tue, May 20, 2008 at 2:56 PM, D. Richard Hipp [EMAIL PROTECTED] wrote: OK. How about: INSERT INTO foo(bar) VALUES(coalesce(?,'default-value')); This approach is working well for us, but as Dennis pointed out it won't work for all situations. I wonder if it's worth adding something like

Re: [sqlite] SQLite Authorizer Feature Suggestion

2008-06-03 Thread Alex Katebi
Hi Mihia, Since I am using in-memory database I only have one connection. I don't want the limiting factors to limit all stmt, only some. Regarding pointers used in a remote process. There is no harm if one is aware of the pointer belonging to a remote process. A handle can be anything as long

Re: [sqlite] Bind arguments for insert and not null columns with default values

2008-06-03 Thread Jay A. Kreibich
On Tue, Jun 03, 2008 at 02:51:57PM -0500, Jeff Hamilton scratched on the wall: On Tue, May 20, 2008 at 2:56 PM, D. Richard Hipp [EMAIL PROTECTED] wrote: OK. How about: INSERT INTO foo(bar) VALUES(coalesce(?,'default-value')); This approach is working well for us, but as Dennis

Re: [sqlite] Bind arguments for insert and not null columns with default values

2008-06-03 Thread Dennis Cote
Jay A. Kreibich wrote: That, or something like sqlite3_clear_bindings() that actually *clears* the bindings (e.g. whatever state they are in just after a prepare), and not just sets them to an explicit NULL, as the current function does. Jay, That wouldn't help. The default value

Re: [sqlite] How to speed up my queries?

2008-06-03 Thread Stephen Oberholtzer
On Tue, Jun 3, 2008 at 1:27 PM, Christophe Leske [EMAIL PROTECTED] wrote: Hi, i am a new member of this list and interested in speeding up my sqlite queries. I am using SQlite in a 3d environment which is close to Google Earth or Nasa WorldWind. We have a city database that is being

Re: [sqlite] Bind arguments for insert and not null columns with default values

2008-06-03 Thread Alex Katebi
It would be nice to be able to revert back to the default value for a column. I don't think SQLite support this right now. The closest thing I found is pragma table_info(foo). If you prepare this and then grab the dflt_value for your column. On Tue, May 20, 2008 at 2:33 PM, Jeff Hamilton [EMAIL

Re: [sqlite] Bind arguments for insert and not null columns with default values

2008-06-03 Thread Stephen Oberholtzer
On Tue, Jun 3, 2008 at 5:09 PM, Alex Katebi [EMAIL PROTECTED] wrote: It would be nice to be able to revert back to the default value for a column. I don't think SQLite support this right now. The closest thing I found is pragma table_info(foo). If you prepare this and then grab the dflt_value

Re: [sqlite] Bind arguments for insert and not null columns with default values

2008-06-03 Thread Jay A. Kreibich
On Tue, Jun 03, 2008 at 02:27:01PM -0600, Dennis Cote scratched on the wall: Jay A. Kreibich wrote: That, or something like sqlite3_clear_bindings() that actually *clears* the bindings (e.g. whatever state they are in just after a prepare), and not just sets them to an explicit NULL,

Re: [sqlite] How to speed up my queries?

2008-06-03 Thread Eric Minbiole
-- Even if you only go down to 1'-by-1' granularity, you've divided the world into 64,800 blocks. Assuming that your 840K cities are all over the globe, and that about 70% of Earth is covered by water, that means that only about 20,000 blocks would actually have cities in them. But with 840K

Re: [sqlite] Multitable query question

2008-06-03 Thread david rutkowski
I read the replies in this thread on the sqlite mailing list. It's true that the data in the two tables are not really related in the relational sense, where one table contains a foreign key, which is a key in another table. This implies a one to many relationship -- for example, many calls

Re: [sqlite] How to speed up my queries?

2008-06-03 Thread D. Richard Hipp
On Jun 3, 2008, at 10:27 AM, Christophe Leske wrote: We have a city database that is being queried regurlarly depending on the lat/long position of the viewport in order to show city names and labels. SQLite has an optional R-Tree engine. The R-Tree is a new addition and has not appeared

Re: [sqlite] How to speed up my queries?

2008-06-03 Thread P Kishor
On 6/3/08, D. Richard Hipp [EMAIL PROTECTED] wrote: On Jun 3, 2008, at 10:27 AM, Christophe Leske wrote: We have a city database that is being queried regurlarly depending on the lat/long position of the viewport in order to show city names and labels. SQLite has an optional

Re: [sqlite] transaction recovery question

2008-06-03 Thread Dan
mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users __ NOD32 3154 (20080603) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com ___ sqlite-users