On Tue, 26 Apr 2016 22:31:11 Scott Robison <scott at casaderobison.com> wrote:

> Is there a hot journal file with the database? If so it may need to roll
> back a transaction which will require write access anyway.

I don't know that answer.  Would the journal file be an actual file in the same
folder as the database file? Certaily the database had changed in the 20 minutes
between 14:32 and 14:52. 

So ... if the database needs to roll back (or commit) even if the user's access
is read-only, then it would always fail in this case, even if the DB owner on
the Windows box wasn't actually updating the database, right?

Can sqlite handle contention among multiple accessors with read/write if the
accessors are not on the same host? I.e. is locking intrinsic in sqlite and any
accessor from any host is able to determine and set a row/table lock?

--Mark

-----Original Message-----
> Date: Tue, 26 Apr 2016 22:31:11 -0600
> From: Scott Robison <scott at casaderobison.com>
> To: SQLite mailing list <sqlite-users at mailinglists.sqlite.org>
> Subject: Re: [sqlite] sqlite3 command line, read-only
>
> On Apr 26, 2016 8:16 PM, "Mark Foley" <mfoley at novatec-inc.com> wrote:
> >
> > I'm back with more read-only issues.
> >
> > Thanks to postings on this list, I've made progress, but still more
> issues.
> >
> > Using the sqlite3 command-line, I'm attempted to open,
> > read-only, a database located on a Windows 7 workstations, from a Linux
> server.
> > I am mounting the Windows volume r/o:
> >
> > mount //${workstation}/C /mnt/iCal -o ro
> >
> > I am opening the database read-only, with timeout:
> >
> > $ sqlite3 -separator '~' -cmd ".timeout 20000"
> "file:/mnt/tmp/Users.../calendar-date/local.sqlite?mode=ro"
> >
> > So, why do I occasionally get these Error messages in my logfile?
> >
> > 2016-04-26 14:32 HPRS_Office_Calendar_Calendar.ics updated
> > Error: attempt to write a readonly database
> > Error: attempt to write a readonly database
> > Error: attempt to write a readonly database
> > Error: attempt to write a readonly database
> > Error: attempt to write a readonly database
> > 2016-04-26 14:52 HPRS_Office_Calendar_Calendar.ics updated
> >
> > First of all, why is it attempting to write anything if it's opened
> read-only?
> >
> > Secondly, how could it ever succeed if the entire volume is read-only?
> Note that
> > there were no errors on the 1st and last examples. And, the "updated"
> message
> > refers to the output of the cron script, not an update to the database.
>
> Is there a hot journal file with the database? If so it may need to roll
> back a transaction which will require write access anyway.
> _______________________________________________
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>

Reply via email to