[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[6532] trunk/LedgerSMB/Scripts/setup.pm
- Subject: SF.net SVN: ledger-smb:[6532] trunk/LedgerSMB/Scripts/setup.pm
- From: ..hidden..
- Date: Sat, 18 Jan 2014 23:22:16 +0000
Revision: 6532
http://sourceforge.net/p/ledger-smb/code/6532
Author: ehuelsmann
Date: 2014-01-18 23:22:16 +0000 (Sat, 18 Jan 2014)
Log Message:
-----------
After commit or rollback, start a new transaction.
Modified Paths:
--------------
trunk/LedgerSMB/Scripts/setup.pm
Modified: trunk/LedgerSMB/Scripts/setup.pm
===================================================================
--- trunk/LedgerSMB/Scripts/setup.pm 2014-01-18 21:56:39 UTC (rev 6531)
+++ trunk/LedgerSMB/Scripts/setup.pm 2014-01-18 23:22:16 UTC (rev 6532)
@@ -346,10 +346,12 @@
$sth->execute();
my ($src_schema) = $sth->fetchrow_array();
$dbh->rollback();
+ $dbh->begin_work();
$dbh->do("DROP SCHEMA public CASCADE");
$dbh->do("ALTER SCHEMA $src_schema RENAME TO public");
$dbh->commit();
-
+ #$dbh->begin_work; # no need to begin work; there's no further work
+
my $template = LedgerSMB::Template->new(
path => 'UI/setup',
template => 'complete_migration_revert',
@@ -558,6 +560,7 @@
$template->render($request);
} else {
$request->{dbh}->rollback();
+ $request->{dbh}->begin_work();
__PACKAGE__->can($upgrade_run_step{$upgrade_type})->($request);
}
@@ -644,6 +647,7 @@
}
$sth->finish();
$request->{dbh}->commit;
+ $request->{dbh}->begin_work;
upgrade($request);
}
@@ -866,6 +870,7 @@
$request->error($request->{_locale}->text('No Permissions Assigned'));
}
$request->{dbh}->commit;
+ $request->{dbh}->begin_work;
rebuild_modules($request);
}
@@ -884,6 +889,7 @@
$dbh->do('CREATE SCHEMA PUBLIC')
or die "Failed to create schema PUBLIC (" . $dbh->errstr . ")";
$dbh->commit;
+ $dbh->begin_work;
$database->load_base_schema({
log => $temp . "_stdout",
@@ -903,6 +909,7 @@
VALUES ('migration_src_schema', '$src_schema')
));
$dbh->commit;
+ $dbh->begin_work;
my $dbtemplate = LedgerSMB::Template->new(
user => {},
@@ -934,7 +941,7 @@
$dbh->do("delete from defaults where setting_key like 'migration_%'");
$dbh->commit;
-
+ $dbh->begin_work;
}
@@ -1048,6 +1055,7 @@
$sth->execute($request->{dbversion}, 'version');
$sth->finish;
$dbh->commit;
+ #$dbh->begin_work; no need to start a new transaction; no further work
#$dbh->disconnect;#upper stack will disconnect
complete($request);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits