#2829: I can't clear what looks like a Model-level DB cache
-------------------------------+--------------------------------------------
   Reporter:  [EMAIL PROTECTED]  |                Owner:  adrian          
     Status:  closed           |            Component:  Database wrapper
    Version:  SVN              |           Resolution:  invalid         
   Keywords:  windows mysql    |                Stage:  Unreviewed      
  Has_patch:  0                |           Needs_docs:  0               
Needs_tests:  0                |   Needs_better_patch:  0               
-------------------------------+--------------------------------------------
Changes (by Simon G. <[EMAIL PROTECTED]>):

  * status:  reopened => closed
  * resolution:  => invalid

Comment:

 Hmm... I can't replicate this. I'm running OSX, MySQL 5.0.45. Here's what
 I've done:
 
 {{{
 In [1]: from t2829.models import *
 
 In [2]: all = two829.objects.all()
 
 In [3]: all
 Out[3]: [<1:hello>, <2:fudge>]
 
 
 # Ok - right here, I open another terminal to a MySQL command prompt, and
 execute this:
 # INSERT INTO t2829_two829 (var1) VALUES ('spork');
 # there are now 3 records.
 
 In [4]: all = two829.objects.all()
 
 In [5]: all
 Out[5]: [<1:hello>, <2:fudge>, <3:spork>]
 
 }}}
 
 I'm getting the correct answer, and the same happens if I update/delete
 from within the MySQL client. Are you using MyISAM tables (I am) or InnoDB
 tables? This may be an outcome of some mysql-level query cache, but I know
 that if anything changes in a MyISAM table, then the qcache goes, but this
 might not be the same for InnoDB.
 
 Please - try this out, and see if you can recreate it. Here's the model
 I've used:
 
 {{{
 from django.db import models
 
 # Create your models here.
 class two829(models.Model):
     var1 = models.CharField(maxlength=20)
 
     def __repr__(self):
         return '<%d:%s>' % (self.id, self.var1)
 
 
     class Admin:
         pass
 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/2829#comment:6>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to