[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [OSSTEST PATCH 7/9] Executive DB retry: Avoid an undefined warning
On Thu, 2015-12-17 at 17:06 +0000, Ian Jackson wrote: > If something other than the DB statements inside need_retry throws an > exception, ->err will normally be undef (because > $dbh_tests->begin_work will clear it, if nothing else). > > Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> > --- > ÂOsstest/JobDB/Executive.pm |ÂÂÂÂ2 +- > Â1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/Osstest/JobDB/Executive.pm b/Osstest/JobDB/Executive.pm > index 6fb77a4..c0af21c 100644 > --- a/Osstest/JobDB/Executive.pm > +++ b/Osstest/JobDB/Executive.pm > @@ -50,7 +50,7 @@ sub begin_work ($$$) { #method > Âsub need_retry ($$$) { > ÂÂÂÂÂmy ($jd, $dbh,$committing) = @_; > ÂÂÂÂÂreturn > - $dbh_tests->err()==7 && > + ($dbh_tests->err() // 0)==7 && > Â ($dbh_tests->state =~ m/^40P01/); # DEADLOCK DETECTED > Â} > Â _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |