Bug 496471 - Silence satchel warning about ORDER BY without an index since an index can't be used. r=dolske
authorMatthew Noorenberghe <mozilla@noorenberghe.ca>
Wed, 16 Jan 2013 18:39:42 -0800
changeset 119125 7d49dd8c58dd
parent 119124 99a5aeaf36ea
child 119126 4a1b771880d8
push id24192
push usermozilla@noorenberghe.ca
push date2013-01-18 00:18 +0000
treeherdermozilla-central@b52c02f77cf5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdolske
bugs496471
milestone21.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 496471 - Silence satchel warning about ORDER BY without an index since an index can't be used. r=dolske
toolkit/components/satchel/nsFormAutoComplete.js
--- a/toolkit/components/satchel/nsFormAutoComplete.js
+++ b/toolkit/components/satchel/nsFormAutoComplete.js
@@ -237,17 +237,18 @@ FormAutoComplete.prototype = {
          * 2) how recently it was last used - items used recently are ranked higher
          * 3) additional weight for aged entries surviving expiry - these entries are relevant
          *    since they have been used multiple times over a large time span so rank them higher
          * The score is then divided by the bucket size and we round the result so that entries
          * with a very similar frecency are bucketed together with an alphabetical sort. This is
          * to reduce the amount of moving around by entries while typing.
          */
 
-        let query = "SELECT value, " +
+        let query = "/* do not warn (bug 496471): can't use an index */ " +
+                    "SELECT value, " +
                     "ROUND( " +
                         "timesUsed / MAX(1.0, (lastUsed - firstUsed) / :timeGroupingSize) * " +
                         "MAX(1.0, :maxTimeGroupings - (:now - lastUsed) / :timeGroupingSize) * "+
                         "MAX(1.0, :agedWeight * (firstUsed < :expiryDate)) / " +
                         ":bucketSize "+
                     ", 3) AS frecency, " +
                     boundaryCalc + " AS boundaryBonuses " +
                     "FROM moz_formhistory " +