﻿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
8877	Very strange bug in MySQL backend for exact query.	bear330	nobody	"I have a User object whose username is 'jumann'.

When I do this:


{{{
>>> User.objects.get(username__exact='Jumann')
}}}

I got a user object <User: jumann>. This is bug?

The SQL generated is:


{{{
>>>  connection.queries[-1]['sql']
u'SELECT `auth_user`.`id`, `auth_user`.`username`, `auth_user`.`first_name`, `auth_user`.`last_name`, `auth_user`.`email`, `auth_user`.`password`, `auth_user`.`is_staff`, `auth_user`.`is_active`, `auth_user`.`is_superuser`, `auth_user`.`last_login`, `auth_user`.`date_joined` FROM `auth_user` WHERE `auth_user`.`username` = Jumann '
}}}

This is a invalid SQL statement, because the string Jumann is not quoted. 
But I don't know why it will pass and give me a wrong result.

This problem is very serious...
"		closed	Core (Other)	1.0		invalid	get exact SQL ORM MySQL		Unreviewed	0	0	0	0	0	0
