diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2005-11-01 01:08:13 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2005-11-01 01:08:13 +0000 |
| commit | 7136eb8f3a052afef29e343679e84e93d7e9e0a3 (patch) | |
| tree | 1b0e60b7b5d96b688499588c51059670f42f504b /django | |
| parent | 390666ac2bf8223bede4f78a97836051bc9f9526 (diff) | |
Fixed #507 -- Changed MySQL backend so that it uses 'LIKE BINARY' for case-sensitive comparisons -- contains, startswith and endswith. Thanks, Simon
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1036 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django')
| -rw-r--r-- | django/core/db/backends/mysql.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/django/core/db/backends/mysql.py b/django/core/db/backends/mysql.py index 4399b6a6a0..23815a80cb 100644 --- a/django/core/db/backends/mysql.py +++ b/django/core/db/backends/mysql.py @@ -125,15 +125,15 @@ def get_relations(cursor, table_name): OPERATOR_MAPPING = { 'exact': '=', 'iexact': 'LIKE', - 'contains': 'LIKE', + 'contains': 'LIKE BINARY', 'icontains': 'LIKE', 'ne': '!=', 'gt': '>', 'gte': '>=', 'lt': '<', 'lte': '<=', - 'startswith': 'LIKE', - 'endswith': 'LIKE', + 'startswith': 'LIKE BINARY', + 'endswith': 'LIKE BINARY', 'istartswith': 'LIKE', 'iendswith': 'LIKE', } |
