On Sun, Sep 14, 2014 at 08:15:20PM +0300, Niko Tyni wrote:
> tag 746125 patch
> thanks
> 
> On Thu, Sep 04, 2014 at 11:35:58PM +0100, Dominic Hargreaves wrote:
> 
> > Unhandled error: [DBD::SQLite::st execute failed: attempt to write a 
> > readonly database at /usr/share/perl5/Wiki/Toolkit/Store/Database.pm line 
> > 567.
> 
> This can be reduced to the attached script, which succeeds for me on
> wheezy but fails on sid. I think it's a bug in the tests, which first
> make a database connection and then remove the database file from
> underneath it.
> 
> Older combinations of SQLite / DBD::SQLite are apparently more
> tolerant. From the SQLite 3.8.3 changelog:
> 
>  Add SQLITE_READONLY_DBMOVED error code, returned at the beginning of
>  a transaction, to indicate that the underlying database file has been
>  renamed or moved out from under SQLite.
> 
> This is what shines through in the above message.

Well, maybe there is a faint glimmer rather than a shine, but yes,
that makes sense :) I was dazzled by the exact wording of the
error message about readonly databases that I couldn't think past that,
clearly.

> It's a bit surprising that this ever worked. It looks like the new
> DBI->connect for a different database handle somehow used to reset the
> behaviour for the first handle too. If I omit the second DBI->connect
> in the test script, I get 
>   DBD::SQLite::db do failed: disk I/O error
> on wheezy, which matches my expectations better.
> 
> Now, the fix for openguides is to call OpenGuides::Test::refresh_db()
> before OpenGuides->new(), which connects to the database and caches the
> connection handle. Patch attached, this makes the test suite pass for me.

Awesome, thanks for this!

Cheers,
Dominic.


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to