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 7d49dd8c58ddbcea8e2242c459c358f98ebfc79d
parent 119124 99a5aeaf36ea309c8a67fe543720100517f95109
child 119126 4a1b771880d830a75f83593b31493c0874166b13
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersdolske
bugs496471
milestone21.0a1
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 " +