Re: [sqlite] SQLite3 file format

2008-06-02 Thread Jerry Krinock
Well, is there any way to determine, from an sqlite database file, the  
exact dot dot version of sqlite3 which produced the file?  A quick  
hack is OK since I don't need to do this in production, just  
troubleshoot a possible forward-compatibility issue with a remote user.

I see that the first few bytes in the file are always "SQLite format  
3" but the following bytes don't seem to add up to the dot dots.

Thanks,

Jerry Krinock
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Sqlite on RAM

2008-06-02 Thread P Kishor
On 6/2/08, Hildemaro Carrasquel <[EMAIL PROTECTED]> wrote:
> Hello.-
>
>  How many db's can i have on RAM?
>

as many as you want.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Sqlite on RAM

2008-06-02 Thread Hildemaro Carrasquel
Hello.-

How many db's can i have on RAM?

Thanks

-- 
Ing. Hildemaro Carrasquel
Ingeniero de Proyectos
Cel.: 04164388917/04121832139
___
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-02 Thread Igor Tandetnik
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
> SIGKILL or segfault.  The scenario involves multiple processes having
> the database open.
>
> * process A opens the database
> * process B opens the database
> * process A starts a transaction
> * process A terminates abnormally BEFORE completing the
> transaction
> * process B starts a transaction
>
> the database is now in an indeterminate state.  what happens in
> process B?

http://sqlite.org/atomiccommit.html

When B starts a transaction, it notices a "hot" rollback journal left 
behind by process A. It then uses this journal to undo (roll back) any 
changes process A may have made in the database file but haven't 
committed. The database is restored to the state it was in before 
process A started its transaction.

Igor Tandetnik 



___
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-02 Thread Ken
Simple enough to test... just open two sqlite sessions and try it...

Process B will recover the database when the transaction begins. 

Are you having an issue with sqlite doing something different?

HTH

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
SIGKILL or segfault.  The scenario involves multiple processes having
the database open.

 * process A opens the database
 * process B opens the database
 * process A starts a transaction
 * process A terminates abnormally BEFORE completing the
transaction
 * process B starts a transaction

the database is now in an indeterminate state.  what happens in process
B?
 
-rlehr

Robert Lehr
Cadence Design Systems, Inc
 
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] reading a row that has been deleted

2008-06-02 Thread Alex Katebi
Keith,

   For normal operations the writer will wait until the reading is done. But
I have a client that is remote and is very slow and could sit on a select
statement indefinitly.  In this case I would need to create a temp table.
Thanks,
-Alex


On Mon, Jun 2, 2008 at 11:53 AM, Keith Goodman <[EMAIL PROTECTED]> wrote:

> On Mon, Jun 2, 2008 at 8:12 AM, Alex Katebi <[EMAIL PROTECTED]> wrote:
> > Hi Keith,
> >
> >   Your observation is correct. I did not know that when selecting a table
> a
> > shared lock is aquired by the reader and writes are locked out until the
> > last row is read or stmt is finialized. This is true even for in-memory
> > database.
> >
> >   One cure for this problem is to create a temorary table based on the
> > result set of the select statement. Then this temp table can be read
> without
> > locking out writers from the original table.
> >
> > CREATE TABLE t1select AS SELECT * FROM t1;
>
> How about keep trying to write until the database is not busy? Would
> that work? Then you only have one copy of the data.
>
> Creating the temp table may be faster than a fancy select statement
> but the problem, while less frequent, still remains (reading while the
> db is locked for writing).
>  ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Corrupted sqlite_sequence table

2008-06-02 Thread Samuel Neff
great, thanks!

On Mon, Jun 2, 2008 at 11:55 AM, Dennis Cote <[EMAIL PROTECTED]> wrote:

> Samuel Neff wrote:
> > Were you able to successfully reproduce the corruption using the scripts
> and
> > databases I sent?  We're having a lot more trouble with this problem and
> our
> > earlier workaround is proving troublesome in some situations.
> >
>
> I think it has been fixed. See
> http://www.sqlite.org/cvstrac/tktview?tn=3148 for details.
>
> HTH
> Dennis Cote




-- 
-
We're Hiring! Seeking passionate Flex, C#, or C++ (RTSP, H264) developer.
Position is in the Washington D.C. metro area. Contact
[EMAIL PROTECTED]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Corrupted sqlite_sequence table

2008-06-02 Thread Dennis Cote
Samuel Neff wrote:
> Were you able to successfully reproduce the corruption using the scripts and
> databases I sent?  We're having a lot more trouble with this problem and our
> earlier workaround is proving troublesome in some situations.
> 

I think it has been fixed. See 
http://www.sqlite.org/cvstrac/tktview?tn=3148 for details.

HTH
Dennis Cote
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] reading a row that has been deleted

2008-06-02 Thread Keith Goodman
On Mon, Jun 2, 2008 at 8:12 AM, Alex Katebi <[EMAIL PROTECTED]> wrote:
> Hi Keith,
>
>   Your observation is correct. I did not know that when selecting a table a
> shared lock is aquired by the reader and writes are locked out until the
> last row is read or stmt is finialized. This is true even for in-memory
> database.
>
>   One cure for this problem is to create a temorary table based on the
> result set of the select statement. Then this temp table can be read without
> locking out writers from the original table.
>
> CREATE TABLE t1select AS SELECT * FROM t1;

How about keep trying to write until the database is not busy? Would
that work? Then you only have one copy of the data.

Creating the temp table may be faster than a fancy select statement
but the problem, while less frequent, still remains (reading while the
db is locked for writing).
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] transaction recovery question

2008-06-02 Thread Robert Lehr
I have a question about recovering from a transaction that was not
completed by a process b/c it terminated abnormally, e.g., careless
SIGKILL or segfault.  The scenario involves multiple processes having
the database open.

* process A opens the database
* process B opens the database
* process A starts a transaction
* process A terminates abnormally BEFORE completing the
transaction
* process B starts a transaction

the database is now in an indeterminate state.  what happens in process
B?
 
-rlehr

Robert Lehr
Cadence Design Systems, Inc
 
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Client/Srever SQLite

2008-06-02 Thread Alex Katebi
Hi All,

  I am using remote procedure calls (RPC) for SQLite in my application. I
have implemented a few SQLite RPC functions that I needed successfully.
I am wondering if there are other people like me who need this.
If there are enough people who could benefit from this I can make it
available as an open source public domain software.
Then people can add more functions as needed.

Thanks,
-Alex
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Corrupted sqlite_sequence table

2008-06-02 Thread Samuel Neff
Were you able to successfully reproduce the corruption using the scripts and
databases I sent?  We're having a lot more trouble with this problem and our
earlier workaround is proving troublesome in some situations.

Thanks,

Sam



On Wed, May 28, 2008 at 7:25 PM, D. Richard Hipp <[EMAIL PROTECTED]> wrote:

>
> On May 28, 2008, at 7:21 PM, Samuel Neff wrote:
>
> > It happens every time.  I can send you a db and the update scripts,
> > but I'll
> > need you to keep it confidential (not signed affidavit or anything
> > like
> > that, just understanding that it's confidential).
> >
> > Please confirm this is ok and also which address I should send it to
> > (if
> > other than the one you're using for this list).
> >
>
> No one will see the database besides me.  I will delete it once the
> bug is fixed.
> Send to the address below.
>
> D. Richard Hipp
> [EMAIL PROTECTED]
>
>
>
-- 
-
We're Hiring! Seeking passionate Flex, C#, or C++ (RTSP, H264) developer.
Position is in the Washington D.C. metro area. Contact
[EMAIL PROTECTED]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] reading a row that has been deleted

2008-06-02 Thread Alex Katebi
Hi Keith,

   Your observation is correct. I did not know that when selecting a table a
shared lock is aquired by the reader and writes are locked out until the
last row is read or stmt is finialized. This is true even for in-memory
database.

   One cure for this problem is to create a temorary table based on the
result set of the select statement. Then this temp table can be read without
locking out writers from the original table.

CREATE TABLE t1select AS SELECT * FROM t1;

Thanks,
-Alex



On Sun, Jun 1, 2008 at 5:37 PM, Keith Goodman <[EMAIL PROTECTED]> wrote:

>  On Sun, Jun 1, 2008 at 2:19 PM, Alex Katebi <[EMAIL PROTECTED]>
> wrote:
> > Hi All,
> >
> >   I have a in-memory database with some tables. Each table has a single
> > record writer and multiple readers.
> > Readers and writes prepare their own sqlite3_stmt for the db. Everyone
> > operates within a single thread.
> > What happens if a reader wants to read a record that has been deleted by
> the
> > writer?
>
> I must be too new to understand the question. But if the record is
> deleted then you can't select it. Are you worried about a race
> condition? I think sqlite takes care of those with locks.
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite Analyzer OSX

2008-06-02 Thread Jens Miltner

Am 02.06.2008 um 07:17 schrieb Bruce Robertson:

> I see that SQLite3 Analyzer for OSX is listed on the download page  
> but no
> instructions are provided and when unzipped it does nothing.
>
> What are we supposed to do with this?

Hmmh - I downloaded and unzipped the archive and launched the  
sqlite3_analyzer_3.5.4.bin executable and it said:

Usage:  database-name

So I launched it with our database file as the single argument and it  
created some statistics about the database. Guess that's what it's  
supposed to do...

HTH,


P.S.: You may have to make the .bin file executable in order to launch  
it
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] quoted .import

2008-06-02 Thread morten bjoernsvik
Hi
Is there a way to get .import   to process quoted 
columns?

aka if .separator "," then any quoted column with "hello, world" will break it.

I do not control the exports which are daily derived dumps from
mysql and db2 databases.

I did a test with unquoted export with separator '_#_' which worked excellent, 
but
this will mess up other programs working on the export files.

Thank You all
--
Morten Bjoernsvik, Oslo, Norway








  _
Alt i ett. Få Yahoo! Mail med adressekartotek, kalender og
notisblokk. http://no.mail.yahoo.com
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users