﻿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
15659	Contains lookups give wrong results on SQLite3 backend	Malcolm Box	nobody	"Queryset filters using contains for a case-sensitive match give the wrong results on SQLite3 backend, as a case-insensitive compare is done.

Example:


{{{
class Test(models.Model):
  string = models.TextField()

test = Test.objects.create(string=""CASE sensitive"")

Test.objects.filter(string__contains=""case"")
[<Test>]
}}}

But this should not have found the object as contains is supposed to be case sensitive.

Seen using SQLite3 2.4.1

According to the SQLite documentation here: http://www.sqlite.org/pragma.html#pragma_case_sensitive_like the fix is to issue a PRAGMA case_sensitive_like = yes; command on the session to get it to do things properly.

"	Bug	closed	Documentation	1.3	Normal	fixed	sqlite	Malcolm Box	Accepted	0	0	0	0	0	0
