Fixed #31271 -- Preserved ordering when unifying query parameters on Oracle.

This caused misplacing parameters in logged SQL queries.

Regression in 79065b55a7.

Thanks Hans Aarne Liblik for the report.
This commit is contained in:
Mariusz Felisiak 2020-02-18 11:45:12 +01:00 committed by GitHub
parent cbb6531e5b
commit 2a038521c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 1 deletions

View file

@ -79,6 +79,10 @@ class LastExecutedQueryTest(TestCase):
for qs in (
Article.objects.filter(pk=1),
Article.objects.filter(pk__in=(1, 2), reporter__pk=3),
Article.objects.filter(
pk=1,
reporter__pk=9,
).exclude(reporter__pk__in=[2, 1]),
):
sql, params = qs.query.sql_with_params()
with qs.query.get_compiler(DEFAULT_DB_ALIAS).execute_sql(CURSOR) as cursor: