Commit 1cd3840
committed
Fix overly-strict assertions in spgtextproc.c.
spg_text_inner_consistent is capable of reconstructing an empty string
to pass down to the next index level; this happens if we have an empty
string coming in, no prefix, and a dummy node label. (In practice, what
is needed to trigger that is insertion of a whole bunch of empty-string
values.) Then, we will arrive at the next level with in->level == 0
and a non-NULL (but zero length) in->reconstructedValue, which is valid
but the Assert tests weren't expecting it.
Per report from Andreas Seltenreich. This has no impact in non-Assert
builds, so should not be a problem in production, but back-patch to
all affected branches anyway.
In passing, remove a couple of useless variable initializations and
shorten the code by not duplicating DatumGetPointer() calls.1 parent 88ee256 commit 1cd3840
1 file changed
+8
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
403 | 403 | | |
404 | 404 | | |
405 | 405 | | |
406 | | - | |
407 | | - | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
408 | 409 | | |
409 | 410 | | |
410 | 411 | | |
| |||
420 | 421 | | |
421 | 422 | | |
422 | 423 | | |
423 | | - | |
424 | | - | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
425 | 427 | | |
426 | 428 | | |
427 | 429 | | |
| |||
436 | 438 | | |
437 | 439 | | |
438 | 440 | | |
439 | | - | |
| 441 | + | |
440 | 442 | | |
441 | 443 | | |
442 | 444 | | |
| |||
560 | 562 | | |
561 | 563 | | |
562 | 564 | | |
563 | | - | |
| 565 | + | |
564 | 566 | | |
565 | 567 | | |
566 | 568 | | |
| |||
0 commit comments