Re: [Django] #7074: MySQL error/warning when 'gt' field lookup with a datetime field and fulltext search.

13 views
Skip to first unread message

Django

unread,
Mar 14, 2013, 5:58:25 PM3/14/13
to django-...@googlegroups.com
#7074: MySQL error/warning when 'gt' field lookup with a datetime field and
fulltext search.
-------------------------------------+-------------------------------------
Reporter: anonymous | Owner:
Type: Bug | Status: new
Component: Database layer | Version: master
(models, ORM) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: qsrf-cleanup mysql, | Needs documentation: 0
fulltext search, gt | Patch needs improvement: 0
Has patch: 0 | UI/UX: 0
Needs tests: 0 |
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by aaugustin):

* component: Core (Other) => Database layer (models, ORM)


--
Ticket URL: <https://code.djangoproject.com/ticket/7074#comment:19>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
May 18, 2014, 2:09:39 AM5/18/14
to django-...@googlegroups.com
#7074: MySQL error/warning when 'gt' field lookup with a datetime field and
fulltext search.
-------------------------------------+-------------------------------------
Reporter: anonymous | Owner:
Type: Bug | anubhav9042
Component: Database layer | Status: assigned
(models, ORM) | Version: master
Severity: Normal | Resolution:
Keywords: qsrf-cleanup mysql, | Triage Stage: Accepted
fulltext search, gt | Needs documentation: 0
Has patch: 0 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by anubhav9042):

* owner: => anubhav9042
* status: new => assigned


Comment:

Working on this in my GSoC project.

--
Ticket URL: <https://code.djangoproject.com/ticket/7074#comment:20>

Django

unread,
Jun 12, 2014, 2:43:26 AM6/12/14
to django-...@googlegroups.com
#7074: MySQL error/warning when 'gt' field lookup with a datetime field and
fulltext search.
-------------------------------------+-------------------------------------
Reporter: anonymous | Owner:
Type: Bug | anubhav9042
Component: Database layer | Status: assigned
(models, ORM) | Version: master
Severity: Normal | Resolution:
Keywords: qsrf-cleanup mysql, | Triage Stage: Accepted
fulltext search, gt | Needs documentation: 0
Has patch: 0 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------

Comment (by anubhav9042):

Can someone help me in reproducing this now. Because `__gt, __gte` works
for both `DateTimeField` as well as `DateField`. If that's not the only
issue here, kindly point me to what I have been missing.

--
Ticket URL: <https://code.djangoproject.com/ticket/7074#comment:21>

Django

unread,
Aug 1, 2014, 12:30:10 PM8/1/14
to django-...@googlegroups.com
#7074: MySQL error/warning when 'gt' field lookup with a datetime field and
fulltext search.
-------------------------------------+-------------------------------------
Reporter: anonymous | Owner:
Type: Bug | anubhav9042
Component: Database layer | Status: assigned
(models, ORM) | Version: master
Severity: Normal | Resolution:
Keywords: qsrf-cleanup mysql, | Triage Stage: Accepted
fulltext search, gt | Needs documentation: 0
Has patch: 0 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------

Comment (by anubhav9042):

models.py
{{{
from django.db import models

class Test(models.Model):
name = models.CharField(max_length=40)
created = models.DateField()
created2 = models.DateTimeField()
}}}

shell:
{{{
In [1]: from t19508.models import *

In [2]: import datetime

In [3]: d = datetime.datetime.now()

In [4]: d2 = d.date()

In [5]: t=Test.objects.using('mysql').create(name='anubhav',
created=d.date(), created2=d)

In [6]: t=Test.objects.using('mysql').filter(created2__gte="2008-04-23
14:39:36.133203")

In [7]: t[0].created
Out[7]: datetime.date(2014, 7, 28)

In [8]: t[0].created2
Out[8]: datetime.datetime(2014, 7, 28, 23, 36, 13, tzinfo=<UTC>)

In [9]:
t=Test.objects.using('mysql').filter(name__search="anubhav").filter(created2__gte="2008-04-23
14:39:36.133203")

In [10]: t[0].created
Out[10]: datetime.date(2014, 7, 28)

In [11]: t[0].created2
Out[11]: datetime.datetime(2014, 7, 28, 23, 36, 13, tzinfo=<UTC>)

}}}

I think that the problem now doesn't exists.

--
Ticket URL: <https://code.djangoproject.com/ticket/7074#comment:22>

Django

unread,
Aug 1, 2014, 12:37:33 PM8/1/14
to django-...@googlegroups.com
#7074: MySQL error/warning when 'gt' field lookup with a datetime field and
fulltext search.
-------------------------------------+-------------------------------------
Reporter: anonymous | Owner:
Type: Bug | anubhav9042
Component: Database layer | Status: closed

(models, ORM) | Version: master
Severity: Normal | Resolution:
Keywords: qsrf-cleanup mysql, | worksforme
fulltext search, gt | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by anubhav9042):

* status: assigned => closed
* cc: anubhav9042@… (added)
* resolution: => worksforme


--
Ticket URL: <https://code.djangoproject.com/ticket/7074#comment:23>

Reply all
Reply to author
Forward
0 new messages