Commit 1b44ece
committed
Disable offsetnumber assertion in ginPostingListDecodeAllSegments()
Fix issue: #1222
As comments in itemptr_to_uint64:
Greenplum allow 16 bits for the offsetnumber, which turns the
below upstream assertion into an always-true comparison which
generates a compiler warning; thus we need to keep this commented out.
For sql in issue 1222, we will get assert failure as:
DETAIL: FailedAssertion("!(((_Bool) ((( ((void) ((_Bool) (! (!(((_Bool)
(((const void*)(&segment->first) != ((void *)0)) &&
((&segment->first)->ip_posid != 0))))) ||
(ExceptionalCondition("!(((_Bool) (((const void*)(&segment->first) !=
((void *)0)) && ((&segment->first)->ip_posid != 0))))",
("FailedAssertion"), "ginpostinglist.c", 338), 0)))), (
(&segment->first)->ip_posid ) ) != ((OffsetNumber) 0)) && (( ((void)
((_Bool) (! (!(((_Bool) (((const void*)(&segment->first) != ((void *)0))
&& ((&segment->first)->ip_posid != 0))))) ||
(ExceptionalCondition("!(((_Bool) (((const void*)(&segment->first) !=
((void *)0)) && ((&segment->first)->ip_posid != 0))))",
("FailedAssertion"), "ginpostinglist.c", 338), 0)))), (
(&segment->first)->ip_posid ) ) <= ((OffsetNumber) (32768 /
sizeof(ItemIdData)))))))", File: "ginpostinglist.c", Line: 338)
Reported-by: assam258-5892 [email protected]
Reproduced-by: Zhang Mingli [email protected]
Authored-by: Zhang Mingli [email protected]1 parent b8c6a63 commit 1b44ece
File tree
4 files changed
+34
-0
lines changed- src
- backend/access/gin
- test/regress
- expected
- sql
4 files changed
+34
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
338 | 343 | | |
| 344 | + | |
339 | 345 | | |
340 | 346 | | |
341 | 347 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
0 commit comments