summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSarah Boyce <42296566+sarahboyce@users.noreply.github.com>2024-08-02 14:49:36 +0200
committerSarah Boyce <42296566+sarahboyce@users.noreply.github.com>2024-08-03 09:07:17 +0200
commit03051db758f237443ed4fe95416ce6505e60fe58 (patch)
tree5c14012c60acc7feb4de1c205aca70622da79ed3
parent55f529270125e17bf428585734dbcb33332a46de (diff)
[5.1.x] Fixed #35655 -- Reverted "Fixed #35295 -- Used INSERT with multiple rows on Oracle 23c."
This reverts commit 175b04942afaff978013db61495f3b39ea12989b due to a crash when Oracle > 23.3. Backport of 5424151f96252e1289e9a6f7eb842cd1dc87850a from main.
-rw-r--r--django/db/backends/oracle/features.py4
-rw-r--r--django/db/backends/oracle/operations.py18
2 files changed, 0 insertions, 22 deletions
diff --git a/django/db/backends/oracle/features.py b/django/db/backends/oracle/features.py
index aa657b3ba4..a83560b892 100644
--- a/django/db/backends/oracle/features.py
+++ b/django/db/backends/oracle/features.py
@@ -205,9 +205,5 @@ class DatabaseFeatures(BaseDatabaseFeatures):
return self.connection.oracle_version >= (23,)
@cached_property
- def supports_bulk_insert_with_multiple_rows(self):
- return self.connection.oracle_version >= (23,)
-
- @cached_property
def bare_select_suffix(self):
return "" if self.connection.oracle_version >= (23,) else " FROM DUAL"
diff --git a/django/db/backends/oracle/operations.py b/django/db/backends/oracle/operations.py
index 507c5fb369..86340bbf4a 100644
--- a/django/db/backends/oracle/operations.py
+++ b/django/db/backends/oracle/operations.py
@@ -678,24 +678,6 @@ END;
for field in fields
if field
]
- if (
- self.connection.features.supports_bulk_insert_with_multiple_rows
- # A workaround with UNION of SELECTs is required for models without
- # any fields.
- and field_placeholders
- ):
- placeholder_rows_sql = []
- for row in placeholder_rows:
- placeholders_row = (
- field_placeholder % placeholder
- for field_placeholder, placeholder in zip(
- field_placeholders, row, strict=True
- )
- )
- placeholder_rows_sql.append(placeholders_row)
- return super().bulk_insert_sql(fields, placeholder_rows_sql)
- # Oracle < 23c doesn't support inserting multiple rows in a single
- # statement, use UNION of SELECTs as a workaround.
query = []
for row in placeholder_rows:
select = []