Re: [sqlite] multi threats parallel reading db

2006-08-18 Thread Max
Hi,

> > > Please double-check your code.  The error message "library routine
> > > called out of sequence" is what you get when you try to use the
> > > the same database connection from more than one thread at one time.
> > 
> > If I remember correctly, there are two other cases where  "library  
> > routine called out of sequence" would happen:
> > 
> > - the database connection has already been closed
> > - you're trying to use a prepared statement that has already been  
> > finalized
> > 
> > Is this still true?
> > 
> 
> Yes it is.
Thanks a lot - i will check my code again. I am pretty sure the db
connection has not been closed at that time and i dont use a prepared
but finalized statement.


Will report back if i found my bug.
 Max


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] multi threats parallel reading db

2006-08-18 Thread drh
Tito Ciuro <[EMAIL PROTECTED]> wrote:
> On Aug 18, 2006, at 6:45 AM, [EMAIL PROTECTED] wrote:
> 
> > Please double-check your code.  The error message "library routine
> > called out of sequence" is what you get when you try to use the
> > the same database connection from more than one thread at one time.
> 
> If I remember correctly, there are two other cases where  "library  
> routine called out of sequence" would happen:
> 
> - the database connection has already been closed
> - you're trying to use a prepared statement that has already been  
> finalized
> 
> Is this still true?
> 

Yes it is.

--
D. Richard Hipp   <[EMAIL PROTECTED]>


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] multi threats parallel reading db

2006-08-18 Thread Tito Ciuro

On Aug 18, 2006, at 6:45 AM, [EMAIL PROTECTED] wrote:


Please double-check your code.  The error message "library routine
called out of sequence" is what you get when you try to use the
the same database connection from more than one thread at one time.


If I remember correctly, there are two other cases where  "library  
routine called out of sequence" would happen:


- the database connection has already been closed
- you're trying to use a prepared statement that has already been  
finalized


Is this still true?

Regards,

-- Tito

Re: [sqlite] multi threats parallel reading db

2006-08-18 Thread drh
Max <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I am running into problems with sqlite 3.3.6 when trying to read from a
> database with multiple threats in parallel. Each threat has it's own
> connection and i compiled sqlite with --enable-threadsafe. Still it will
> throw exceptions if i don't keep the threats from accessing it in
> parellel. Here's what i get:
> 
> Warn: Caught exception calling DoQuery on 'GaimLog'
> Mono.Data.SqliteClient.SqliteSyntaxException: library routine called out
> of sequence

Please double-check your code.  The error message "library routine
called out of sequence" is what you get when you try to use the
the same database connection from more than one thread at one time.

--
D. Richard Hipp   <[EMAIL PROTECTED]>


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] multi threats parallel reading db

2006-08-18 Thread Max
Hi,

I am running into problems with sqlite 3.3.6 when trying to read from a
database with multiple threats in parallel. Each threat has it's own
connection and i compiled sqlite with --enable-threadsafe. Still it will
throw exceptions if i don't keep the threats from accessing it in
parellel. Here's what i get:

Warn: Caught exception calling DoQuery on 'GaimLog'
Mono.Data.SqliteClient.SqliteSyntaxException: library routine called out
of sequence
in [0x0007f] Mono.Data.SqliteClient.SqliteCommand:GetNextStatement
(IntPtr pzStart, System.IntPtr pzTail, System.IntPtr pStmt)
in [0x0005f]
(at 
/opt/src/beagle/cur_sql/beagled/Mono.Data.SqliteClient/SqliteCommand.cs:481) 
Mono.Data.SqliteClient.SqliteCommand:ExecuteReader (CommandBehavior behavior, 
Boolean want_results, System.Int32 rows_affected)
in [0x5]
(at 
/opt/src/beagle/cur_sql/beagled/Mono.Data.SqliteClient/SqliteCommand.cs:435) 
Mono.Data.SqliteClient.SqliteCommand:ExecuteReader (CommandBehavior behavior)
in [0x2]
(at 
/opt/src/beagle/cur_sql/beagled/Mono.Data.SqliteClient/SqliteCommand.cs:429) 
Mono.Data.SqliteClient.SqliteCommand:ExecuteReader ()
in [0x8] (at /opt/src/beagle/cur_sql/beagled/SqliteUtils.cs:80)
Beagle.Util.SqliteUtils:ExecuteReaderOrWait
(Mono.Data.SqliteClient.SqliteCommand command)
in [0x00047] (at /opt/src/beagle/cur_sql/beagled/SqlMetadata.cs:478)
Beagle.Daemon.SqlMetadata:GetProperties (System.String uri)
in [0x00010] (at /opt/src/beagle/cur_sql/beagled/LuceneCommon.cs:748)
Beagle.Daemon.LuceneCommon:AddPropertiesToHit (Beagle.Hit hit,
Lucene.Net.Documents.Document doc, Boolean from_primary_index)
in [0x00049] (at /opt/src/beagle/cur_sql/beagled/LuceneCommon.cs:738)
Beagle.Daemon.LuceneCommon:DocumentToHit (Lucene.Net.Documents.Document
doc)
in [0x00227]
(at /opt/src/beagle/cur_sql/beagled/LuceneQueryingDriver.cs:635)
Beagle.Daemon.LuceneQueryingDriver:GenerateQueryResults
(Lucene.Net.Index.IndexReader primary_reader,
Lucene.Net.Search.IndexSearcher primary_searcher,
Lucene.Net.Search.IndexSearcher secondary_searcher,
Beagle.Util.BetterBitArray primary_matches, IQueryResult result,
ICollection query_term_list, Int32 max_results, Beagle.Daemon.UriFilter
uri_filter, Beagle.Daemon.HitFilter hit_filter)
in [0x003a3]
(at /opt/src/beagle/cur_sql/beagled/LuceneQueryingDriver.cs:322)
Beagle.Daemon.LuceneQueryingDriver:DoQuery (Beagle.Query query,
IQueryResult result, ICollection search_subset_uris,
Beagle.Daemon.UriFilter uri_filter, Beagle.Daemon.HitFilter hit_filter)
in [0x0018d] (at /opt/src/beagle/cur_sql/beagled/LuceneQueryable.cs:341)
Beagle.Daemon.LuceneQueryable:DoQuery (Beagle.Query query, IQueryResult
query_result, IQueryableChangeData i_change_data)
in [0x9] (at /opt/src/beagle/cur_sql/beagled/Queryable.cs:74)
Beagle.Daemon.Queryable:DoQuery (Beagle.Query query, IQueryResult
result, IQueryableChangeData change_data)
Warn: Caught exception calling DoQuery on 'EvolutionDataServer'
...

I get these warnings for all the threats running. 

Any idea?

Thanks a lot, 
 Max


-
To unsubscribe, send email to [EMAIL PROTECTED]
-