summaryrefslogtreecommitdiff
path: root/django/db/backends/mysql/operations.py
diff options
context:
space:
mode:
authorMichal Čihař <michal@cihar.com>2018-07-05 18:11:49 +0200
committerTim Graham <timograham@gmail.com>2018-07-05 12:11:49 -0400
commit39e287d8bff50e9f91f3f4471088c1946aa6a76c (patch)
tree9d8ab85997e1d5a57de401a280fa5623a76978ff /django/db/backends/mysql/operations.py
parentf1fc7d6b78186171923a9351eb7af3b5b7565156 (diff)
downloaddjango-39e287d8bff50e9f91f3f4471088c1946aa6a76c.tar.gz
Fixed #29544 -- Fixed regex lookup on MariaDB.
Regression in 42490768441701bc02255b22df8e6894cbe487c7.
Diffstat (limited to 'django/db/backends/mysql/operations.py')
-rw-r--r--django/db/backends/mysql/operations.py4
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'