3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-27 06:19:25 +01:00

Use AutoInactiveDestroy attribute to fix SQLite I/O error due to DBH handle being destroyed when forked process exits

This commit is contained in:
Pragmatic Software 2014-05-13 20:14:38 +00:00
parent ae6f3a6b3d
commit dad69fb0c8
2 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ sub begin {
$self->{pbot}->logger->log("Opening message history SQLite database: $self->{filename}\n"); $self->{pbot}->logger->log("Opening message history SQLite database: $self->{filename}\n");
$self->{dbh} = DBI->connect("dbi:SQLite:dbname=$self->{filename}", "", "", { RaiseError => 1, PrintError => 0 }) or die $DBI::errstr; $self->{dbh} = DBI->connect("dbi:SQLite:dbname=$self->{filename}", "", "", { RaiseError => 1, PrintError => 0, AutoInactiveDestroy => 1 }) or die $DBI::errstr;
eval { eval {
#$self->{dbh}->trace($self->{dbh}->parse_trace_flags('SQL|1|test')); #$self->{dbh}->trace($self->{dbh}->parse_trace_flags('SQL|1|test'));

View File

@ -13,7 +13,7 @@ use warnings;
# These are set automatically by the build/commit script # These are set automatically by the build/commit script
use constant { use constant {
BUILD_NAME => "PBot", BUILD_NAME => "PBot",
BUILD_REVISION => 571, BUILD_REVISION => 572,
BUILD_DATE => "2014-05-13", BUILD_DATE => "2014-05-13",
}; };