summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChinmoy <chinmoy12c@gmail.com>2021-10-28 21:26:29 +0530
committerGitHub <noreply@github.com>2021-10-28 17:56:29 +0200
commit073b7b5915fdfb89a144e81173176ee13ff92a25 (patch)
tree5140e28ec67ab99aac9db8e3822bd5ade95d5fbf
parent8e3b1cf098018b4632de63c359ef6d761e92ec04 (diff)
Fixed #33228 -- Changed value of BaseDatabaseFeatures.has_case_insensitive_like to False.
-rw-r--r--django/db/backends/base/features.py2
-rw-r--r--django/db/backends/mysql/features.py1
-rw-r--r--django/db/backends/oracle/features.py1
-rw-r--r--django/db/backends/postgresql/features.py1
-rw-r--r--django/db/backends/sqlite3/features.py1
-rw-r--r--docs/releases/4.1.txt3
6 files changed, 4 insertions, 5 deletions
diff --git a/django/db/backends/base/features.py b/django/db/backends/base/features.py
index 9b11cf9948..def23ed187 100644
--- a/django/db/backends/base/features.py
+++ b/django/db/backends/base/features.py
@@ -201,7 +201,7 @@ class BaseDatabaseFeatures:
closed_cursor_error_class = ProgrammingError
# Does 'a' LIKE 'A' match?
- has_case_insensitive_like = True
+ has_case_insensitive_like = False
# Suffix for backends that don't support "SELECT xxx;" queries.
bare_select_suffix = ''
diff --git a/django/db/backends/mysql/features.py b/django/db/backends/mysql/features.py
index 3b1b23a585..bbb8f6d79b 100644
--- a/django/db/backends/mysql/features.py
+++ b/django/db/backends/mysql/features.py
@@ -24,7 +24,6 @@ class DatabaseFeatures(BaseDatabaseFeatures):
supports_select_difference = False
supports_slicing_ordering_in_compound = True
supports_index_on_text_field = False
- has_case_insensitive_like = False
create_test_procedure_without_params_sql = """
CREATE PROCEDURE test_procedure ()
BEGIN
diff --git a/django/db/backends/oracle/features.py b/django/db/backends/oracle/features.py
index a054a96be6..78f7cdc6fd 100644
--- a/django/db/backends/oracle/features.py
+++ b/django/db/backends/oracle/features.py
@@ -39,7 +39,6 @@ class DatabaseFeatures(BaseDatabaseFeatures):
# does by uppercasing all identifiers.
ignores_table_name_case = True
supports_index_on_text_field = False
- has_case_insensitive_like = False
create_test_procedure_without_params_sql = """
CREATE PROCEDURE "TEST_PROCEDURE" AS
V_I INTEGER;
diff --git a/django/db/backends/postgresql/features.py b/django/db/backends/postgresql/features.py
index 2917fc4f9a..097d41a45b 100644
--- a/django/db/backends/postgresql/features.py
+++ b/django/db/backends/postgresql/features.py
@@ -28,7 +28,6 @@ class DatabaseFeatures(BaseDatabaseFeatures):
supports_combined_alters = True
nulls_order_largest = True
closed_cursor_error_class = InterfaceError
- has_case_insensitive_like = False
greatest_least_ignores_nulls = True
can_clone_databases = True
supports_temporal_subtraction = True
diff --git a/django/db/backends/sqlite3/features.py b/django/db/backends/sqlite3/features.py
index ff3e3f47a9..ea65f72b33 100644
--- a/django/db/backends/sqlite3/features.py
+++ b/django/db/backends/sqlite3/features.py
@@ -30,6 +30,7 @@ class DatabaseFeatures(BaseDatabaseFeatures):
supports_cast_with_precision = False
time_cast_precision = 3
can_release_savepoints = True
+ has_case_insensitive_like = True
# Is "ALTER TABLE ... RENAME COLUMN" supported?
can_alter_table_rename_column = Database.sqlite_version_info >= (3, 25, 0)
supports_parentheses_in_compound = False
diff --git a/docs/releases/4.1.txt b/docs/releases/4.1.txt
index 1eba2b0539..a8223b7ef8 100644
--- a/docs/releases/4.1.txt
+++ b/docs/releases/4.1.txt
@@ -237,7 +237,8 @@ Database backend API
This section describes changes that may be needed in third-party database
backends.
-* ...
+* ``BaseDatabaseFeatures.has_case_insensitive_like`` is changed from ``True``
+ to ``False`` to reflect the behavior of most databases.
Dropped support for MariaDB 10.2
--------------------------------