Changeset 8319
- Timestamp:
- 08/12/08 02:52:33 (4 months ago)
- Files:
-
- django/trunk/django/db/backends/mysql/base.py (modified) (1 diff)
- django/trunk/docs/db-api.txt (modified) (1 diff)
- django/trunk/tests/regressiontests/string_lookup/models.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/db/backends/mysql/base.py
r8318 r8319 154 154 155 155 class DatabaseWrapper(BaseDatabaseWrapper): 156 156 157 157 operators = { 158 'exact': '= BINARY%s',158 'exact': '= %s', 159 159 'iexact': 'LIKE %s', 160 160 'contains': 'LIKE BINARY %s', django/trunk/docs/db-api.txt
r8291 r8319 1328 1328 anything. It has now been changed to behave the same as ``id__isnull=True``. 1329 1329 1330 .. admonition:: MySQL comparisons 1331 1332 In MySQL, whether or not ``exact`` comparisons are case-sensitive depends 1333 upon the collation setting of the table involved. The default is usually 1334 ``latin1_swedish_ci`` or ``utf8_swedish_ci``, which results in 1335 case-insensitive comparisons. Change the collation to 1336 ``latin1_swedish_cs`` or ``utf8_bin`` for case sensitive comparisons. 1337 1338 For more details, refer to the MySQL manual section about `character sets 1339 and collations`_. 1340 1341 .. _character sets and collations: http://dev.mysql.com/doc/refman/5.0/en/charset.html 1342 1330 1343 iexact 1331 1344 ~~~~~~ django/trunk/tests/regressiontests/string_lookup/models.py
r7798 r8319 98 98 <Article: Article Test> 99 99 100 # Regression tests for #2170: test case sensitiveness101 >>> Article.objects.filter(text__exact='tHe qUick bRown fOx jUmps over tHe lazy dog.')102 []103 >>> Article.objects.filter(text__iexact='tHe qUick bRown fOx jUmps over tHe lazy dog.')104 [<Article: Article Test>]105 106 100 >>> Article.objects.get(text__contains='quick brown fox') 107 101 <Article: Article Test>
