8000 Fixed #35655 -- Reverted "Fixed #35295 -- Used INSERT with multiple r… · django/django@5424151 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5424151

Browse files
committed
Fixed #35655 -- Reverted "Fixed #35295 -- Used INSERT with multiple rows on Oracle 23c."
This reverts commit 175b049 due to a crash when Oracle > 23.3.
1 parent 6d3464c commit 5424151

File tree

2 files changed

+0
-22
lines changed

2 files changed

+0
-22
lines changed

django/db/backends/oracle/features.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,6 @@ def supports_comparing_boolean_expr(self):
204204
def supports_aggregation_over_interval_types(self):
205205
return self.connection.oracle_version >= (23,)
206206

207-
@cached_property
208-
def supports_bulk_insert_with_multiple_rows(self):
209-
return self.connection.oracle_version >= (23,)
210-
211207
@cached_property
212208
def bare_select_suffix(self):
213209
return "" if self.connection.oracle_version >= (23,) else " FROM DUAL"

django/db/backends/oracle/operations.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -678,24 +678,6 @@ def bulk_insert_sql(self, fields, placeholder_rows):
678678
for field in fields
679679
if field
680680
]
681-
if (
682-
self.connection.features.supports_bulk_insert_with_multiple_rows
683-
# A workaround with UNION of SELECTs is required for models without
684-
# any fields.
685-
and field_placeholders
686-
):
687-
placeholder_rows_sql = []
688-
for row in placeholder_rows:
689-
placeholders_row = (
690-
field_placeholder % placeholder
691-
for field_placeholder, placeholder in zip(
692-
field_placeholders, row, strict=True
693-
)
694-
)
695-
placeholder_rows_sql.append(placeholders_row)
696-
return super().bulk_insert_sql(fields, placeholder_rows_sql)
697-
# Oracle < 23c doesn't support inserting multiple rows in a single
698-
# statement, use UNION of SELECTs as a workaround.
699681
query = []
700682
for row in placeholder_rows:
701683
select = []

0 commit comments

Comments
 (0)
0