[Rt-commit] rt branch, 4.2/sqlite-case-sensitivity, repushed
Ruslan Zakirov
ruz at bestpractical.com
Fri Jul 12 09:04:53 EDT 2013
The branch 4.2/sqlite-case-sensitivity was deleted and repushed:
was e4fd1e3bb6d5522f110ab028edf9f3c7afb075f7
now faef7974a743e22df7c2bd5d377a33afe518250f
1: e4fd1e3 ! 1: faef797 make SQLite case insensitive
@@ -3,8 +3,9 @@
make SQLite case insensitive
SQLite is marked as CaseSensitive in DBIx-SB, so LOWER()
- function is used to achive case insensitivity, but SQLite
- has no functional indexes.
+ function is used to achive case insensitivity. SQLite
+ has no functional indexes, so searches with LOWER() are
+ not using indexes.
SQLite can be case insensitive using collations. At least
to a point where developers are happy. Making it case
@@ -312,7 +313,7 @@
- ContentEncoding varchar(80) NULL , # New -- for binary Content
+ Content varchar(255) collate NOCASE NULL ,
+ LargeContent LONGTEXT collate NOCASE NULL, # New -- to hold 255+ strings
-+ ContentType varchar(80) collate NOCASE NULL, # New -- only text collate NOCASE/* gets searched
++ ContentType varchar(80) collate NOCASE NULL, # New -- only text/* gets searched
+ ContentEncoding varchar(80) collate NOCASE NULL , # New -- for binary Content
Creator integer NOT NULL DEFAULT 0 ,
@@ -445,6 +446,9 @@
$@;
}
+
++ # We use COLLATE NOCASE to enforce case insensitivity on the normally
++ # case-sensitive SQLite, LOWER() approach works, but lucks performance
++ # due to absence of functional indexes
+ if ($db_type eq 'SQLite') {
+ no strict 'refs'; no warnings 'redefine';
+ *DBIx::SearchBuilder::Handle::SQLite::CaseSensitive = sub {0};
More information about the Rt-commit
mailing list