#14244 closed (fixed)
In clause with 1000 or more items fails in Oracle
Reported by: | rlynch | Owned by: | |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 1.2 |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description
Oracle (not sure about other RDBMSs) fails with IN clauses that have more than 1000 parameters. An easy workaround is to create separate clauses with an OR between them. For example...
WHERE...
AND (my_column in (1, 2, ....999) OR my_column in (1000, 1001, ....1999) OR my_column in (....))
....
Attachments (1)
Change History (9)
by , 14 years ago
comment:1 by , 14 years ago
Patch needs improvement: | set |
---|---|
Resolution: | → fixed |
Status: | new → closed |
The fix has been tested manually but the unit test will be difficult to do because SQLite3 has a built in limitation of only allowing 1000 or less parameters in a query. SQLite3 does expose a setting to increase this but it is only exposed in the C or Python APSW libraries.
comment:2 by , 14 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:3 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
comment:4 by , 14 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:5 by , 14 years ago
Owner: | removed |
---|---|
Status: | reopened → new |
comment:6 by , 14 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:7 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Patch of proposed fix