Bug Report
Summary
In mysqlGetForeignRelSize() (mysql_fdw.c), a local variable attrs_used
is declared and populated via pull_varattnos(), but its result is never
read or used anywhere afterward. The same expression tree is collected again
a few lines later into fpinfo->attrs_used, which is the variable actually
consumed by the rest of the planning logic.
Redundant code
/* Line ~991 */
Bitmapset *attrs_used = NULL;
/* Lines ~1026-1027: result written to attrs_used but never read */
pull_varattnos((Node *) baserel->reltarget->exprs, baserel->relid,
&attrs_used);
Bug Report
Summary
In
mysqlGetForeignRelSize()(mysql_fdw.c), a local variableattrs_usedis declared and populated via
pull_varattnos(), but its result is neverread or used anywhere afterward. The same expression tree is collected again
a few lines later into
fpinfo->attrs_used, which is the variable actuallyconsumed by the rest of the planning logic.
Redundant code