diff options
Diffstat (limited to 'django/db/backends/mysql/operations.py')
-rw-r--r-- | django/db/backends/mysql/operations.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/db/backends/mysql/operations.py b/django/db/backends/mysql/operations.py index 47e179db41..31f92ac5cd 100644 --- a/django/db/backends/mysql/operations.py +++ b/django/db/backends/mysql/operations.py @@ -285,8 +285,8 @@ class DatabaseOperations(BaseDatabaseOperations): def regex_lookup(self, lookup_type): # REGEXP BINARY doesn't work correctly in MySQL 8+ and REGEXP_LIKE - # doesn't exist in MySQL 5.6. - if self.connection.mysql_version < (8, 0, 0): + # doesn't exist in MySQL 5.6 or in MariaDB. + if self.connection.mysql_version < (8, 0, 0) or self.connection.mysql_is_mariadb: if lookup_type == 'regex': return '%s REGEXP BINARY %s' return '%s REGEXP %s' |