bug: vulnerable broken postgresql search with range partition table using inner join ordinary non-structure table
- Dominant language
- C++
- Stars
- 406
- Forks
- 134
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 24
Description
**Summary**
vulnerable broken postgresql search with range partition table using inner join ordinary non-structure table
**Steps to Reproduce**
1. Bingo cartridge:
2. SQL: select teststruct.regId from teststruct inner join substancename on teststruct.regId = substancename .chemid
where teststruct.molfile @('000-502-36.mol
ChemDraw08272111072D
11 11 0 0 0 0 0 0 0 0999 V2000
0.3572 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
0.3572 -0.8250 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
1.0717 -1.2375 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
1.7862 -0.8250 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
1.7862 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
1.0717 0.4125 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-0.3572 0.4125 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-1.0717 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-0.3572 1.2375 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0
-1.7862 0.4125 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
-1.0717 -0.8250 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
1 2 2 0
2 3 1 0
3 4 2 0
4 5 1 0
5 6 2 0
6 1 1 0
1 7 1 0
7 8 1 0
7 9 1 6
8 10 1 0
8 11 2 0
M END
','')::bingo.exact;
**Expected behavior**
regId result
**Actual behavior**
vulnerable broken:
sometimes can obtained correct result, and the others got error message: "server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request."
**Environment details:**
- CentOS 64 2009:
[vulnerable_broken_range_partition_table_postgresql.txt](https://github.com/user-attachments/files/16884813/vulnerable_broken_range_partition_table_postgresql.txt)
**Attachments**
the attachment is the text file which contains sql clauses for create substancename table and range partition table teststruct.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the SQL reproduction and the attached vulnerable_broken_range_partition_table_postgresql.txt, focusing on the join between the range-partitioned teststruct table and ordinary substancename table. Confirm the intermittent PostgreSQL backend termination and determine what is needed for the query to consistently return regId without closing the connection.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, postgresql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100