Re: [sqlite] shared cache and 'no such table' issue

2007-12-26 Thread Darío Mariani
I found that the sqlite3_open call is not thread safe even if you open
different files in separate connections. Cannot tell you about
sqlite3_close but may be the same problem.
Darío

On Dec 26, 2007 6:40 AM, Pathompong Puengrostham <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have a multi-threaded program. Each thread opens a connection to the same
> database file. It runs fine most of the time but sometime I get a 'no such
> table' error from a SQL select statement. It appears that if one thread
> close the database connection, it closes all the schema without checking
> nRef in BtShared. This make other threads receive a 'no such table' error.
>
> Do I get it right that schema is also shared together with Btree? When
> shared cache mode is enabled, does SQLite really share cache within one
> thread and not between other threads? I don't know much about internal of
> SQLite. But from looking at the source code, there is only one
> sqlite3SharedCacheList variable that is shared with every threads.
>
> Jay
>

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



[sqlite] Problems compiling 3.5.4 without TCL

2007-12-20 Thread Darío Mariani
Hello,
  I'm trying to compile SQLite 3.5.4 and I'm having the following problem:
first, it does not detect anymore if TCL is present or not, so I added
the --disable-tcl option to the configure, but even with this option
I'm getting the following:

$ configure CC=xlc_r CXX=xlC_r --prefix=/workspace/usr
--enable-threadsafe --enable-cross-thread-connections --disable-tcl
...
$ gmake
...
tclsh ./tool/mksqlite3c.tcl
gmake: tclsh: Command not found
gmake: *** [sqlite3.c] Error 127

(Installing TCL is not an option)
Thanks,
  Darío

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



Re: [sqlite] sqlite in a daemon

2007-12-19 Thread Darío Mariani
My application is running 24x7 with huge data loads and around 10 open
connections all the time.

On Dec 19, 2007 4:50 AM, Renaud HUILLET <[EMAIL PROTECTED]> wrote:
>
> I have that for my soft and it works fine.
>
> I also have a swap mecanism to update the sqlite file : the daemon gets the 
> sqlite file's name from a filemapped into memory.
> When a new file has been generated, another batch updates the filemap with 
> the new sqlite file's name.
> The daemon sees the file name has changed (with no I/O since it is mapped 
> into memory) , kills the SQLIte connection and opens a new one.
>
> Best Regards.
> Renaud> Date: Tue, 18 Dec 2007 14:27:28 -0800> From: [EMAIL PROTECTED]> To: 
> sqlite-users@sqlite.org> Subject: [sqlite] sqlite in a daemon> > Hello,> > I 
> am considering writing a daemon that would keep the sqlite connection opened 
> forever (at least in the "daemon" sense of forever). Is it a good idea? Any 
> experience you could share about that kind of design?> Thanks> > > > > 
> >
>  Looking for last minute shopping deals? > Find them fast with Yahoo! Search. 
> http://tools.search.yahoo.com/newsearch/category.php?category=shopping
> _
> Express yourself instantly with MSN Messenger! Download today it's FREE!
> http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

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



Re: [sqlite] SQLite for NAS storage - DVR like application

2007-12-19 Thread Darío Mariani
Current implementations of NFS on Linux have a decent lock mechanism
(as far as I know). You'll have to check your NAS device how does it
handle NFS locking.
But, if your NFS device is a complete box and not just a disk array
with an ethernet card, you will be better creating a small
client-server protocol over TCP.
  Darío

On Dec 19, 2007 6:04 AM, Trilok Soni <[EMAIL PROTECTED]> wrote:
> Hi John,
>
> On Dec 18, 2007 11:53 PM, John Stanton <[EMAIL PROTECTED]> wrote:
> > Sqlite depends upon POSIX file locks.  It is no better or no worse than
> > the POSIX lock implementation on your platform.
>
> Thanx for the reply. My platform is based on Linux running on ARM9, with
> having 128MB of the flash on it. The captured video from analog/IP camera
> will be stored on the NAS storage device connected to it through network, 
> which
> gets mounted to the filesystem using NFS. So, the database file containing 
> these
> videos meta information will be stored on NAS device, not on the flash
> partition,
> as flash is used to keep programs binaries and the size constraint.
>
> >
> > We use Sqlite in a multi-user environment without dependency oin the
> > POSIX locks by embedding it in a server using HTTP when it is on a
> > remote machine.  We get the small footprint and simoplicity of Sqlite
> > and get no multi-user glitches regardless of platform.
>
> I am not able to understand, what you mean here by "embedding sqlite in a
> server using HTTP when it is on a remote machine". In our project scenario,
> we do have remote interface of this platform using embedded webserver running
> on the device (e.g. boa/lighthttpd/webapp) and we want to show various
> information
> about these videos on the webpage by searching this file database
> residing on the NAS.
>
> Only confusion for selecting SQLite came here is, because we are not storing
> this database on the local flash on the device, but on the NFS mounted
> NAS device,
> which gets accessed/configured through web-interface provided by the
> device through
> some embedded webserver as explained in the earlier paragraph. And
> SQLite FAQs I have
> pointed mentions that there could be problem in accessing the database
> over the NFS,
> this is where I got confused and unable to decide to go for SQLite or not.
>
> --
> --Trilok Soni
>
>
>
> >
> >
> > Trilok Soni wrote:
> > > Hi,
> > >
> > > I am evaluating SQLite for the design of the surveillance camera/DVR
> > > product based on Linux, which stores its captured
> > > analog/IP camera streams to the NAS storage device(s). To facilitate
> > > faster search/scanning of those media files
> > > containing many days of videos spread over multiple files, we plan to
> > > keep the metadata of those videos
> > > in some file format/database stored on NAS itself, so that
> > > search/analysis mechanism just go through this
> > > database to locate exact file with some search criteria like
> > > time/data/camera/alarms/events etc.
> > >
> > > While reading the SQLite documentation I came to following FAQ, where
> > > it lists that SQLite as application file format,
> > > may not scale well to the NFS/Neworked attached drives due to the
> > > locking problems.
> > >
> > > http://www.sqlite.org/faq.html
> > > Refer 5th question.
> > > (5) Can multiple applications or multiple instances of the same
> > > application access a single database file at the same time?
> > >
> > > Is there any other way to work around this problem and use SQLite as
> > > application file format in the above scenario. See that Linux
> > > will run on the ARM9 having video processing done on specialized DSP.
> > >
> >
> >
> > -
> > To unsubscribe, send email to [EMAIL PROTECTED]
> > -
> >
> >
>
> -
> To unsubscribe, send email to [EMAIL PROTECTED]
> -
>
>

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



[sqlite] Unable to open database: out of memory

2007-12-11 Thread Darío Mariani
Hello:
  I'm using SQLite 3.4.1 on an AIX 5.3.
  I have a file that grew up to 2 GB, now when I try to open it with the
sqlite3 command I cannot, the message is the following:

$ sqlite3 my_file.db
Unable to open database "my_file.db": out of memory

File permissions are ok, user limits are to the maximum, there is enough
physical memory, I also tried with version 3.5.3 with the same results.
Any hints on how can I fix this so that I can enter the file and erase some
rows to make space?
Thanks,
  Darío