Commit 18e0214
Bryan Thompson
fix: scan_from backtrack across sibling subtrees (#850)
Remove incorrect pop() before backtrack loop in seek(). When
gte_key_byte() or lte_key_byte() returns nothing, the current node
was never pushed onto the stack, so the stack top is already the
first ancestor to check for a sibling. The spurious pop() discarded
that ancestor, causing seek to return end instead of finding the
next subtree.
Fixes both FWD and REV paths in art.hpp and olc_art.hpp.
Adds regression test: scanFromBacktrackAcrossSiblingSubtrees.1 parent 9f22403 commit 18e0214
3 files changed
Lines changed: 58 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2339 | 2339 | | |
2340 | 2340 | | |
2341 | 2341 | | |
2342 | | - | |
| 2342 | + | |
| 2343 | + | |
| 2344 | + | |
| 2345 | + | |
2343 | 2346 | | |
2344 | 2347 | | |
2345 | 2348 | | |
| |||
2368 | 2371 | | |
2369 | 2372 | | |
2370 | 2373 | | |
2371 | | - | |
2372 | | - | |
2373 | | - | |
2374 | | - | |
2375 | | - | |
| 2374 | + | |
| 2375 | + | |
| 2376 | + | |
| 2377 | + | |
| 2378 | + | |
| 2379 | + | |
| 2380 | + | |
| 2381 | + | |
2376 | 2382 | | |
2377 | 2383 | | |
2378 | 2384 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3423 | 3423 | | |
3424 | 3424 | | |
3425 | 3425 | | |
3426 | | - | |
| 3426 | + | |
| 3427 | + | |
| 3428 | + | |
3427 | 3429 | | |
3428 | 3430 | | |
3429 | 3431 | | |
| |||
3500 | 3502 | | |
3501 | 3503 | | |
3502 | 3504 | | |
3503 | | - | |
| 3505 | + | |
| 3506 | + | |
| 3507 | + | |
3504 | 3508 | | |
3505 | 3509 | | |
3506 | 3510 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1083 | 1083 | | |
1084 | 1084 | | |
1085 | 1085 | | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
1086 | 1126 | | |
0 commit comments