Changes between Initial Version and Version 1 of Ticket #28590, comment 2


Ignore:
Timestamp:
Sep 28, 2017, 9:47:19 AM (7 years ago)
Author:
Tim Graham

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #28590, comment 2

    initial v1  
    1 Replying to [ticket:28590 Aur Saraf]:
    2 > Very low severity, and probably easy pickings:
    3 >
    4 > In various versions of Django, up to 1.11.5, with sqlite, on Windows:
    5 >
    6 > {{{
    7 > class M(models.Model):
    8 >     field = models.CharField(max_length=10)
    9 > }}}
    10 >
    11 > {{{
    12 > >>> from bug import models
    13 > >>> print models.M.objects.filter(field='I am a string, look at me').query.__str__()
    14 > SELECT "bug_m"."id", "bug_m"."field" FROM "bug_m" WHERE "bug_m"."field" = I am a string, look at me
    15 > >>> models.M.objects.filter(field='I am a string, look at me')
    16 > <QuerySet []>
    17 > >>> from django.db import connection
    18 > >>> print connection.queries[-1]['sql']
    19 > SELECT "bug_m"."id", "bug_m"."field" FROM "bug_m" WHERE "bug_m"."field" = 'I am a string, look at me' LIMIT 21
    20 > }}}
    21 >
    22 > {{{
    23 > SELECT "bug_m"."id", "bug_m"."field" FROM "bug_m" WHERE "bug_m"."field" = I am a string, look at me
    24 > SELECT "bug_m"."id", "bug_m"."field" FROM "bug_m" WHERE "bug_m"."field" = 'I am a string, look at me' LIMIT 21
    25 > }}}
    26 >
    27 > {{{
    28 > WHERE "bug_m"."field" = I am a string, look at me
    29 > WHERE "bug_m"."field" = 'I am a string, look at me'
    30 > }}}
    31 
    321Hi, this issue also occurs in my OSX and I'm using Django 1.9.6 with MariaDB.
    332I'm trying to patch this, should I start from 1.11.x branch or master? Also, I don't know where is the file located regarding this issue.
Back to Top