[freeside-commits] freeside/FS/bin freeside-upgrade, 1.5.2.3, 1.5.2.4
Ivan,,,
ivan at wavetail.420.am
Sun Oct 28 05:52:02 PDT 2007
- Previous message: [freeside-commits] freeside/FS/FS Schema.pm, 1.71, 1.72 Setup.pm, 1.10, 1.11 svc_acct.pm, 1.236, 1.237
- Next message: [freeside-commits] freeside/FS/FS Schema.pm, 1.44.2.14, 1.44.2.15 Setup.pm, 1.8.2.1, 1.8.2.2 svc_acct.pm, 1.217.2.13, 1.217.2.14
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/cvsroot/freeside/FS/bin
In directory wavetail:/tmp/cvs-serv19393/FS/bin
Modified Files:
Tag: FREESIDE_1_7_BRANCH
freeside-upgrade
Log Message:
finish mysql locking workaround
Index: freeside-upgrade
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/bin/freeside-upgrade,v
retrieving revision 1.5.2.3
retrieving revision 1.5.2.4
diff -u -d -r1.5.2.3 -r1.5.2.4
--- freeside-upgrade 21 Aug 2007 23:52:08 -0000 1.5.2.3
+++ freeside-upgrade 28 Oct 2007 12:52:00 -0000 1.5.2.4
@@ -47,7 +47,7 @@
if ( $DRY_RUN ) {
print
- join(";\n", @bugfix, dbdef->sql_update_schema( dbdef_dist, $dbh ) ). ";\n";
+ join(";\n", @bugfix, dbdef->sql_update_schema( dbdef_dist(datasrc), $dbh ) ). ";\n";
exit;
} else {
foreach my $statement ( @bugfix ) {
@@ -55,7 +55,7 @@
or die "Error: ". $dbh->errstr. "\n executing: $statement";
}
- dbdef->update_schema( dbdef_dist, $dbh );
+ dbdef->update_schema( dbdef_dist(datasrc), $dbh );
}
my $hashref = {};
@@ -64,6 +64,24 @@
print join "\n", prune_applications($hashref);
print "\n" if $DRY_RUN;
+if ( $dbh->{Driver}->{Name} =~ /^mysql/i ) {
+
+ my $sth = $dbh->prepare(
+ "SELECT COUNT(*) FROM duplicate_lock WHERE lockname = 'svc_acct'"
+ ) or die $dbh->errstr;
+
+ $sth->execute or die $sth->errstr;
+
+ unless ( $sth->fetchrow_arrayref->[0] ) {
+
+ $sth = $dbh->prepare(
+ "INSERT INTO duplicate_lock ( lockname ) VALUES ( 'svc_acct' )"
+ ) or die $dbh->errstr;
+
+ $sth->execute or die $sth->errstr;
+
+ }
+}
$dbh->commit or die $dbh->errstr;
- Previous message: [freeside-commits] freeside/FS/FS Schema.pm, 1.71, 1.72 Setup.pm, 1.10, 1.11 svc_acct.pm, 1.236, 1.237
- Next message: [freeside-commits] freeside/FS/FS Schema.pm, 1.44.2.14, 1.44.2.15 Setup.pm, 1.8.2.1, 1.8.2.2 svc_acct.pm, 1.217.2.13, 1.217.2.14
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the freeside-commits
mailing list