summaryrefslogtreecommitdiff
path: root/django/db/backends/mysql/operations.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/db/backends/mysql/operations.py')
-rw-r--r--django/db/backends/mysql/operations.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/django/db/backends/mysql/operations.py b/django/db/backends/mysql/operations.py
index 34cdfc0292..6c0c6ebd2b 100644
--- a/django/db/backends/mysql/operations.py
+++ b/django/db/backends/mysql/operations.py
@@ -389,12 +389,8 @@ class DatabaseOperations(BaseDatabaseOperations):
return prefix
def regex_lookup(self, lookup_type):
- # REGEXP BINARY doesn't work correctly in MySQL 8+ and REGEXP_LIKE
- # doesn't exist in MySQL 5.x or in MariaDB.
- if (
- self.connection.mysql_version < (8, 0, 0)
- or self.connection.mysql_is_mariadb
- ):
+ # REGEXP_LIKE doesn't exist in MariaDB.
+ if self.connection.mysql_is_mariadb:
if lookup_type == "regex":
return "%s REGEXP BINARY %s"
return "%s REGEXP %s"