mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-23 12:29:27 +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:
parent
ae6f3a6b3d
commit
dad69fb0c8
@ -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'));
|
||||||
|
@ -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",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user