From 5ee03110d71efbe6410ba9db2b740e1a28d2f0ad Mon Sep 17 00:00:00 2001 From: JT Smith Date: Wed, 2 May 2007 19:30:39 +0000 Subject: [PATCH] race condition causes upgrade.pl to fail (Martin Kamerbeek / Oqapi) --- docs/changelog/7.x.x.txt | 1 + sbin/upgrade.pl | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 598e07508..33eeeecc7 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -2,6 +2,7 @@ - fix: Wiki titles not automatically linked - fix: Email to forum not working from Mac - fix: Unable to set size in DynamicField (Diona Kidd / Knowmad) + - fix: race condition causes upgrade.pl to fail (Martin Kamerbeek / Oqapi) - fix: Calendar Events Disappearing http://www.plainblack.com/bugs/tracker/calendar-events-disappearing - fix: Modified SQLForm.pm to handle MySQL null dates. Undefs them. Undef dates default to time(), i.e. today's date diff --git a/sbin/upgrade.pl b/sbin/upgrade.pl index e12b860bd..f3ef264b2 100644 --- a/sbin/upgrade.pl +++ b/sbin/upgrade.pl @@ -194,7 +194,8 @@ foreach my $filename (keys %{$configs}) { $config{$filename}{mysqlDump} = $configs->{$filename}->get("mysqlDump"); $config{$filename}{backupPath} = $configs->{$filename}->get("backupPath"); my $session = WebGUI::Session->open($webguiRoot,$filename); - ($config{$filename}{version}) = $session->db->quickArray("select webguiVersion from webguiVersion order by dateApplied desc, webguiVersion desc limit 1"); + ($config{$filename}{version}) = $session->db->quickArray("select webguiVersion from webguiVersion order by + dateApplied desc, length(webguiVersion) desc, webguiVersion desc limit 1"); unless ($history) { print "\tPreparing site for upgrade.\n" unless ($quiet); unless ($skipMaintenance) { @@ -344,7 +345,7 @@ sub checkVersion { $_[0] =~ /(\d+)\.(\d+)\.(\d+)/; my $goal = 6; my $feature = 8; - my $fix = 5; + my $fix = 10; if ($1 > $goal) { return 1; } elsif ($1 == $goal) {