Bug 867125 - Ignore deleted pinned sites in getTopSites query. r=wesj
authorMargaret Leibovic <margaret.leibovic@gmail.com>
Mon, 06 May 2013 16:14:03 -0400
changeset 131001 def13deac4930cfdacd880ad191ef3e66a9fb752
parent 131000 623728226a0de561bf5a36e064e7da1e082c0091
child 131002 7e4d9be02b8feffd0b8a1a368e884b50ff7a5621
push id27630
push usermleibovic@mozilla.com
push dateMon, 06 May 2013 20:14:19 +0000
treeherdermozilla-inbound@def13deac493 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswesj
bugs867125
milestone23.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 867125 - Ignore deleted pinned sites in getTopSites query. r=wesj
mobile/android/base/db/LocalBrowserDB.java
--- a/mobile/android/base/db/LocalBrowserDB.java
+++ b/mobile/android/base/db/LocalBrowserDB.java
@@ -232,18 +232,19 @@ public class LocalBrowserDB implements B
                               limit,
                               null);
     }
 
     @Override
     public Cursor getTopSites(ContentResolver cr, int limit) {
         // Filter out sites that are pinned
         String selection = DBUtils.concatenateWhere("", Combined.URL + " NOT IN (SELECT " +
-                                             Bookmarks.URL + " FROM bookmarks WHERE bookmarks." +
-                                             Bookmarks.PARENT + " == ?)");
+                                             Bookmarks.URL + " FROM bookmarks WHERE " +
+                                             DBUtils.qualifyColumn("bookmarks", Bookmarks.PARENT) + " == ? AND " +
+                                             DBUtils.qualifyColumn("bookmarks", Bookmarks.IS_DELETED) + " == 0)");
         String[] selectionArgs = DBUtils.appendSelectionArgs(new String[0], new String[] { String.valueOf(Bookmarks.FIXED_PINNED_LIST_ID) });
         return filterAllSites(cr,
                               new String[] { Combined._ID,
                                              Combined.URL,
                                              Combined.TITLE },
                               "",
                               limit,
                               BrowserDB.ABOUT_PAGES_URL_FILTER,