Opened 18 months ago

Closed 14 months ago

Last modified 14 months ago

#19112 closed Cleanup/optimization (fixed)

regressiontests.queries.tests.ConditionalTests.test_ticket14244 breaks mssql due to arbitrary maximum parameters

Reported by: manfre Owned by: manfre
Component: Database layer (models, ORM) Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


supports_1000_query_parameters is a feature that was added (#14244) for the sake of sqlite3 to prevent running the test regressiontests.queries.tests.ConditionalTests.test_ticket14244. This test asserts that a progressively larger number of parameters (1000-2500)can be used.

Another purpose of the test appears to be a way of checking the behavior of max_in_list_size(), which was added with ticket #14244 to fix Oracle's limitation of at most 1000 values in an "IN" list.

Django-mssql, due to a driver limitation, supports a maximum of 2100 parameters for the entire query, not just the IN clause. I'd like to propose lowering the final assert of 2500 to 2001 to still test a third IN clause (for Oracle) while lowering the limit below what the mssql driver can handle.

Attachments (0)

Change History (4)

comment:1 Changed 18 months ago by manfre

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 18 months ago by akaariai

  • Triage Stage changed from Unreviewed to Accepted

Accepting in the sense that something needs to be done here...

comment:3 Changed 14 months ago by Anssi Kääriäinen <akaariai@…>

  • Resolution set to fixed
  • Status changed from new to closed

In 604d8763dc2c901a3557e15880895d88af5c4127:

Fixed #19112 -- Reduced the amount of query params in a test

comment:4 Changed 14 months ago by Anssi Kääriäinen <akaariai@…>

In 7b5ca126ee37cd386d9900b2ef29901debb28e9e:

[1.5.x] Fixed #19112 -- Reduced the amount of query params in a test

Backpatch of 604d8763dc2c901a3557e15880895d88af5c4127.

Add Comment

Modify Ticket

Change Properties
<Author field>
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.