forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit614167c
committed
Fix bugs in GIN "fast scan" with partial match.
There were a couple of bugs here. First, if the fuzzy limit was exceeded,the loop in entryGetItem might drop out too soon if a whole block needs tobe skipped because it's < advancePast ("continue" in a while-loop checks theloop condition too). Secondly, the loop checked when stepping to a new pagethat there is at least one offset on the page < advancePast, but we cannotrely on that on subsequent calls of entryGetItem, because advancePast mightchange in between. That caused the skipping loop to read bogus items in theTbmIterateResult's offset array.First item and fix by Alexander Korotkov, second bug pointed out by Fabríziode Royes Mello, by a small variation of Alexander's test query.1 parentef29a88 commit614167c
1 file changed
+32
-23
lines changedLines changed: 32 additions & 23 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
729 | 729 |
| |
730 | 730 |
| |
731 | 731 |
| |
| 732 | + | |
732 | 733 |
| |
733 | 734 |
| |
734 | 735 |
| |
735 |
| - | |
736 |
| - | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
737 | 744 |
| |
738 | 745 |
| |
739 | 746 |
| |
| |||
746 | 753 |
| |
747 | 754 |
| |
748 | 755 |
| |
749 |
| - | |
750 |
| - | |
751 |
| - | |
752 |
| - | |
753 |
| - | |
754 |
| - | |
755 |
| - | |
756 |
| - | |
757 |
| - | |
758 |
| - | |
759 |
| - | |
760 |
| - | |
761 | 756 |
| |
762 | 757 |
| |
763 | 758 |
| |
| |||
766 | 761 |
| |
767 | 762 |
| |
768 | 763 |
| |
| 764 | + | |
| 765 | + | |
769 | 766 |
| |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
770 | 771 |
| |
771 | 772 |
| |
772 |
| - | |
773 |
| - | |
774 |
| - | |
775 | 773 |
| |
776 | 774 |
| |
777 | 775 |
| |
778 | 776 |
| |
779 | 777 |
| |
780 | 778 |
| |
781 |
| - | |
| 779 | + | |
782 | 780 |
| |
| 781 | + | |
783 | 782 |
| |
784 | 783 |
| |
785 |
| - | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
786 | 788 |
| |
787 | 789 |
| |
788 | 790 |
| |
789 |
| - | |
790 |
| - | |
791 |
| - | |
| 791 | + | |
| 792 | + | |
792 | 793 |
| |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
793 | 801 |
| |
794 | 802 |
| |
795 | 803 |
| |
| |||
798 | 806 |
| |
799 | 807 |
| |
800 | 808 |
| |
801 |
| - | |
| 809 | + | |
| 810 | + | |
802 | 811 |
| |
803 | 812 |
| |
804 | 813 |
| |
|
0 commit comments
Comments
(0)