Ansonsten sind Deadlocks absolut möglich.
$dbh->begin_work;
# setup dbup_ export vars & run script
+ my $old_dbh = $::form->set_standard_dbh($dbh);
my %dbup_myconfig = map { ($_ => $::form->{$_}) } qw(dbname dbuser dbpasswd dbhost dbport dbconnect);
my $result = eval {
SL::DBUpgrade2::Base::execute_script(
my $error = $EVAL_ERROR;
+ $::form->set_standard_dbh($old_dbh);
+
$dbh->rollback if 1 != ($result // -1);
return $error if $self->{return_on_error} && (1 != ($result // -1));
return $standard_dbh;
}
+sub set_standard_dbh {
+ my ($self, $dbh) = @_;
+ my $old_dbh = $standard_dbh;
+ $standard_dbh = $dbh;
+
+ return $old_dbh;
+}
+
sub date_closed {
$main::lxdebug->enter_sub();