From 906fa4aa97401e50ac4021bcd125b6bf99733e77 Mon Sep 17 00:00:00 2001 From: Doug Bell Date: Mon, 21 Mar 2011 21:04:52 -0500 Subject: [PATCH] try to reconnect to the DB if rebuildLineage.pl takes a long time --- docs/changelog/7.x.x.txt | 1 + sbin/rebuildLineage.pl | 2 ++ 2 files changed, 3 insertions(+) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index c7debf764..280e43485 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -11,6 +11,7 @@ - Change Group INSERT to REPLACE to prevent merge problems in multi-master DB clusters - added #12078: Add alt tag to default Image template - fixed #12077: Carousel update not possible + - Try to reconnect to MySQL if sbin/rebuildLineage.pl takes too long 7.10.11 - fixed #12057: WebGUI::Search, assetIds search clause diff --git a/sbin/rebuildLineage.pl b/sbin/rebuildLineage.pl index aed1f0f90..4ea0b6c42 100755 --- a/sbin/rebuildLineage.pl +++ b/sbin/rebuildLineage.pl @@ -42,6 +42,8 @@ pod2usage() unless (defined($configFile) && $configFile ne ''); print "Starting..." unless ($quiet); my $session = WebGUI::Session->open($webguiRoot,$configFile); +# We might take a while, reconnect if we get disconnected for inactivity +$session->db->dbh->{mysql_auto_reconnect} = 1; print "OK\n" unless ($quiet); print "Looking for descendant replationships...\n" unless ($quiet);