• R/O
  • HTTP
  • SSH
  • HTTPS

pg_hint_plan: Commit

firtst release


Commit MetaInfo

Revision5f0969f4977cf8b83db88c6f3c5502a8e89f65d2 (tree)
Time2020-10-29 20:31:47
AuthorKyotaro Horiguchi <horikyoga.ntt@gmai...>
CommiterKyotaro Horiguchi

Log Message

Follow the semantic change of pg_list part 2

Commit 7ed93ce forgot to fix another place where list_delete_cell() is
used. Fix it.

Change Summary

Incremental Difference

--- a/pg_hint_plan.c
+++ b/pg_hint_plan.c
@@ -3609,9 +3609,9 @@ restrict_indexes(PlannerInfo *root, ScanMethodHint *hint, RelOptInfo *rel,
36093609 rel->indexlist = list_delete_cell(rel->indexlist, cell);
36103610
36113611 /*
3612- * the elements after cell moved to the list head by 1 element.
3613- * the next iteration should visit the cell at the same address if
3614- * any.
3612+ * The cells after the deleted cell have been moved towards the
3613+ * list head by 1 element. the next iteration should visit the
3614+ * cell at the same address if any.
36153615 */
36163616 if (next)
36173617 next = cell;
@@ -4403,6 +4403,14 @@ transform_join_hints(HintState *hstate, PlannerInfo *root, int nbaserel,
44034403 {
44044404 hstate->join_hint_level[i] =
44054405 list_delete_cell(hstate->join_hint_level[i], l);
4406+ /*
4407+ * The cells after the deleted cell have been moved
4408+ * towards the list head by 1 element. the next
4409+ * iteration should visit the cell at the same address
4410+ * if any.
4411+ */
4412+ if (next)
4413+ next = l;
44064414 }
44074415 }
44084416 }
Show on old repository browser