#13533: queries test fails under MySQL InnoDB
---------------------------------------------------+------------------------
          Reporter:  russellm                      |         Owner:  nobody     
 
            Status:  new                           |     Milestone:  1.3        
 
         Component:  Database layer (models, ORM)  |       Version:  1.2-beta   
 
        Resolution:                                |      Keywords:  innodb 
mysql
             Stage:  Accepted                      |     Has_patch:  0          
 
        Needs_docs:  0                             |   Needs_tests:  0          
 
Needs_better_patch:  0                             |  
---------------------------------------------------+------------------------
Changes (by erikr):

  * owner:  erikr => nobody
  * status:  assigned => new

Comment:

 This would appear to be a MySQL bug, triggered by the testcases.

 This problem is triggered by the creation of the !ExtraInfo in
 test_evaluated_queryset_as_argument(), introduced in r12970. Somehow,
 after that has been done, the same MySQL query yields different results on
 it's first run, then on subsequent runs.

 The query run for the test is:
 {{{
 SELECT `queries_tag`.`id`, `queries_tag`.`name`,
 `queries_tag`.`parent_id`, `queries_tag`.`category_id` FROM `queries_tag`
 WHERE NOT
  ((`queries_tag`.`id` IN (SELECT U0.`id` FROM `queries_tag` U0 LEFT OUTER
 JOIN `queries_tag` U1 ON (U0.`id` = U1.`parent_id`)
 WHERE U1.`id` IS NULL) AND NOT (`queries_tag`.`id` IS NULL))) ORDER BY
 `queries_tag`.`name` ASC LIMIT 21
 }}}

 I have verified this with tcpdump, and MySQL indeed sends back t1, t3 and
 t4 on the first run, and only t1 and t3 on the second run.
 I will attach a log of this.

 The insert query for the !ExtraInfo looks completely normal:
 {{{
 INSERT INTO `queries_extrainfo` (`info`, `note_id`) VALUES ('good', 1)
 }}}

 Unfortunately a run of the queries suite does over 2000 queries, so it is
 rather difficult to isolate the problem.
 Perhaps someone more experienced can get more out of this.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/13533#comment:5>
Django <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 django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to