Changes between Initial Version and Version 1 of Ticket #26539, comment 5
- Timestamp:
- Aug 29, 2016, 10:01:21 AM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #26539, comment 5
initial v1 3 3 SQLLite and Mysql both passes the test. The queries generated are different(sqllite has SUBSELECT) but the result of the subselect is same as MYSQL. 4 4 5 Here are the 2 queries thats generated. In MYSQL the select statement is generated first and then the results are applied to the update but in sqllite is select statement is applied directly as a subselect.5 Here are the 2 queries thats generated. In MYSQL the select statement is generated first and then the results are applied to the update but in sqllite the select statement is applied directly as a subselect. Not sure what is expected in this ticket? 6 6 7 7 MYSQL results:- 8 8 9 10 {{{ 9 11 >>> Foo.objects.annotate(bname=F('related_bar__name')).update(bar_name=F('bar_name')) 10 12 SELECT `polls_foo`.`id` … … 15 17 WHERE `polls_foo`.`id` IN (6,7) 16 18 19 }}} 20 17 21 SQLLite:- 18 22 19 23 24 25 {{{ 20 26 >>> Foo.objects.annotate(bname=F('related_bar__name')) 21 27 SELECT "polls_foo"."id", … … 35 41 INNER JOIN "polls_bar" U1 ON (U0."related_bar_id" = U1."id")) [0.29ms] 36 42 # 7) [0.22ms] 43 }}}