[Dbix-class] DBIx::Safe. DBI wrapper.

Oleg Pronin syber.rus at gmail.com
Thu May 10 19:41:02 GMT 2007


When working with some databases
$dbh->prepare can talk to DB server.

When connection lost in this stage, code in RETRY block will just catch
exception and rethrow it.
Thus it needs to reconnect and re-prepare.

2007/5/10, Brandon Black blblack at gmail.com:

>> 6) $dbh->prepare is not protected (always cause exception in case of any
>> error). Some databases can store prepared statements at server-side.

>It is as far as I can see.  _execute calls $self->sth in an eval,
>which does the prepare.  Are you saying that some databases will cache
>the preparation when they throw an exception, and then not throw an
>exception again when you re-use the cached entry?  That sounds like a
>bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20070510/460=
d952a/attachment.htm


More information about the Dbix-class mailing list