d***@hacker.dk
2014-07-18 08:58:54 UTC
I've pushed the following patch to git:
Fiixes the scenario where, if db-cleanup runs while DB server is down,
sqlgrey will die.
--- a/sqlgrey
+++ b/sqlgrey
@@ -482,6 +482,7 @@ sub setconfig($$$) {
'WHERE parameter = ?');
if (!defined $sth or !$sth->execute($param)) {
$self->mylog('dbaccess', 0, "error: couldn't access $config
table: $DBI::errstr");
+ return undef if $param ne 'version'; # Only die for 'version'
problems, which happen at startup.
$self->mydie('setconfig error',
'Can\'t continue: config table unreadable');
}
You can download the patched version here:
https://sourceforge.net/p/sqlgrey/code/ci/master/tree/sqlgrey?format=raw
- Dan
Fiixes the scenario where, if db-cleanup runs while DB server is down,
sqlgrey will die.
--- a/sqlgrey
+++ b/sqlgrey
@@ -482,6 +482,7 @@ sub setconfig($$$) {
'WHERE parameter = ?');
if (!defined $sth or !$sth->execute($param)) {
$self->mylog('dbaccess', 0, "error: couldn't access $config
table: $DBI::errstr");
+ return undef if $param ne 'version'; # Only die for 'version'
problems, which happen at startup.
$self->mydie('setconfig error',
'Can\'t continue: config table unreadable');
}
You can download the patched version here:
https://sourceforge.net/p/sqlgrey/code/ci/master/tree/sqlgrey?format=raw
- Dan