﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
17435	document that QuerySet.update returns not the number of rows changed, but the number of rows matched	m17.admin@…	nobody	"It’s documented that QuerySet.update “returns the number of rows affected”.
Actual result — the number of rows matched.

I’m not sure, whether it’s a database layer bug, or just a documentation bug. 

{{{
>>> Bar.objects.filter(pk=1).update(state=2)
1L
>>> Bar.objects.filter(pk=1).update(state=2)
1L
}}}

{{{
mysql> UPDATE foo_bar SET state=2 WHERE id=1;
Query OK, 1 row affected (0.02 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql> UPDATE foo_bar SET state=2 WHERE id=1;
Query OK, 0 rows affected (0.01 sec)
Rows matched: 1  Changed: 0  Warnings: 0
}}}


Environment:
* MySQL 5.1.58-1ubuntu-1
* Django 1.3.1"	Bug	closed	Documentation	1.3	Normal	fixed		estebistec@… timograham@…	Ready for checkin	1	0	0	0	0	0
