Bug 426166 - Search results change their order after pressing space or further typing. r=dietrich
authorKyle Huey <me@kylehuey.com>
Thu, 15 Oct 2009 08:53:15 -0400
changeset 26293 e6af6fa42b0d3501e6568bc6b6c761029ac40345
parent 26292 5bf658a297b341fceff50b7521cdbe33a3a3f1e6
child 26294 66d8e92512b9ffaae65dce40002957cee3ba922d
push id1834
push userclokep@gmail.com
push dateMon, 23 Jan 2017 21:48:40 +0000
treeherdercomm-beta@293cffe83e59 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdietrich
bugs426166
Bug 426166 - Search results change their order after pressing space or further typing. r=dietrich
suite/common/places/src/nsPlacesAutoComplete.js
--- a/suite/common/places/src/nsPlacesAutoComplete.js
+++ b/suite/common/places/src/nsPlacesAutoComplete.js
@@ -226,17 +226,17 @@ function nsPlacesAutoComplete()
                                   "h.visit_count, h.typed, parent, " +
                                   ":matchBehavior, :searchBehavior) " +
           "{ADDITIONAL_CONDITIONS} ";
   }
   const SQL_BASE = sql_base_fragment("moz_places_temp") +
                    "UNION ALL " +
                    sql_base_fragment("moz_places") +
                    "AND +h.id NOT IN (SELECT id FROM moz_places_temp) " +
-                   "ORDER BY h.frecency DESC " +
+                   "ORDER BY h.frecency DESC, h.id DESC " +
                    "LIMIT :maxResults";
 
   //////////////////////////////////////////////////////////////////////////////
   //// Smart Getters
 
   XPCOMUtils.defineLazyGetter(this, "_db", function() {
     return Cc["@mozilla.org/browser/nav-history-service;1"].
            getService(Ci.nsPIPlacesDatabase).