Commit 3154e167 authored by Tom Lane's avatar Tom Lane

Dodge compiler bug in Visual Studio 2013.

VS2013 apparently has a problem with taking the address of a formal
parameter in some cases.  We do that elsewhere without trouble, but
in this case the address is being passed to a subroutine that will
probably get inlined, so maybe the combination of those things is
what tickles the bug.  Anyway, introducing an extra copy of the
parameter value is enough to work around it.  Per trouble report
from Umair Shahid.

Report: <CAM184AcjqKYZSdQqBHDrnENXHhW=mXbUC46QYPJ=nAh0gUHCGA@mail.gmail.com>
parent 8ebb69f8
...@@ -3914,8 +3914,10 @@ calc_joinrel_size_estimate(PlannerInfo *root, ...@@ -3914,8 +3914,10 @@ calc_joinrel_size_estimate(PlannerInfo *root,
double outer_rows, double outer_rows,
double inner_rows, double inner_rows,
SpecialJoinInfo *sjinfo, SpecialJoinInfo *sjinfo,
List *restrictlist) List *restrictlist_in)
{ {
/* This apparently-useless variable dodges a compiler bug in VS2013: */
List *restrictlist = restrictlist_in;
JoinType jointype = sjinfo->jointype; JoinType jointype = sjinfo->jointype;
Selectivity fkselec; Selectivity fkselec;
Selectivity jselec; Selectivity jselec;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment