8000 Fix order of parameters in a cost_sort call · postgrespro/postgres@87b6c3c · GitHub
[go: up one dir, main page]

Skip to content
  • Commit 87b6c3c

    Browse files
    author
    Richard Guo
    committed
    Fix order of parameters in a cost_sort call
    In label_sort_with_costsize, the cost_sort function is called with the parameters 'input_disabled_nodes' and 'input_cost' in the wrong order. This does not cause any plan diffs in the regression tests, because label_sort_with_costsize is only used to label the Sort node nicely for EXPLAIN, and cost numbers are not displayed in regression tests. Oversight in e222534. Fixed by passing arguments in the right order. Per report from Alexander Lakhin running UBSan. Author: Alexander Lakhin Discussion: https://postgr.es/m/a9b7231d-68bc-f117-a07c-96688f3e6aef@gmail.com
    1 parent fc415ed commit 87b6c3c

    File tree

    1 file changed

    +1
    -1
    lines changed

    1 file changed

    +1
    -1
    lines changed

    src/backend/optimizer/plan/createplan.c

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -5454,8 +5454,8 @@ label_sort_with_costsize(PlannerInfo *root, Sort *plan, double limit_tuples)
    54545454
    Assert(IsA(plan, Sort));
    54555455

    54565456
    cost_sort(&sort_path, root, NIL,
    5457-
    lefttree->total_cost,
    54585457
    plan->plan.disabled_nodes,
    5458+
    lefttree->total_cost,
    54595459
    lefttree->plan_rows,
    54605460
    lefttree->plan_width,
    54615461
    0.0,

    0 commit comments

    Comments
     (0)
    0