﻿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
11209	connection.queries reports different SQL query than MySQL log	creecode	Karen Tracey	"I'm using MySQL 5.0.x and Django v1.0.2.

The QuerySet...

{{{ Entry.objects.filter ( content__search = 'heat pipes' ) }}}

...is producing this SQL...

SELECT `my_app_entry`.`id`, `my_app_entry`.`title`, `my_app_entry`.`content`, `my_app_entry`.`url`, `my_app_entry`.`created`, `my_app_entry`.`modified`, `my_app_entry`.`website_id` FROM `my_app_entry` WHERE MATCH (`my_app_entry`.`content`) AGAINST (heat pipes IN BOOLEAN MODE) LIMIT 21

...as reported from connection.queries.  I seem to be getting results back with no reports of errors but if you look closely at the above SQL you'll see there is a syntax error.  I verified this by putting the above SQL into a client app that tried to run the above SQL and received an error.

At this point I was a bit confused and took a look at the MySQL log and it reported...

SELECT `my_app_entry`.`id`, `my_app_entry`.`title`, `my_app_entry`.`content`, `my_app_entry`.`url`, `my_app_entry`.`created`, `my_app_entry`.`modified`, `my_app_entry`.`website_id` FROM `my_app_entry` WHERE MATCH (`my_app_entry`.`content`) AGAINST ('heat pipes' IN BOOLEAN MODE) LIMIT 21

You'll notice that the query string in the SQL here is properly single quoted."		closed	Documentation	1.0		fixed			Accepted	0	0	0	0	0	0
