Closed Bug 390047 Opened 18 years ago Closed 17 years ago

nsNavHistory::RemoveDuplicateURIs() can leave duplicate uris in moz_places

Categories

(Firefox :: Bookmarks & History, defect, P2)

defect

Tracking

()

RESOLVED FIXED
Firefox 3 beta2

People

(Reporter: moco, Assigned: dietrich)

References

Details

as marco points out, the change to nsNavHistory::RemoveDuplicateURIs() for bug #386956 can leave duplicate uris. having duplicates in moz_places might cause problems. I think we should bump the schema and have some MigrateV7Up() code that looks for duplicates and removes them. this would be worth fixing after we fix bug #389789.
Flags: blocking-firefox3?
a modified version of Bug 389789 query (with subqueries) should remove all dupes, this version had to be used originary in bug 389789, but i didn't test enough, sorry for that. it deletes all the urls with duplicate entries (first subquery), leaving one entry for each url (second subquery) DELETE FROM moz_places WHERE url IN (SELECT url FROM moz_places GROUP BY url HAVING count(url)>1) AND id NOT IN (SELECT id FROM moz_places GROUP BY url HAVING count(url)>1)
oops sorry i was talking about bug 386956 and not 389789
Flags: blocking-firefox3? → blocking-firefox3+
Target Milestone: Firefox 3 M8 → Firefox 3 M9
(In reply to comment #0) > > I think we should bump the schema and have some MigrateV7Up() code that looks > for duplicates and removes them. that seems overkill. maybe we could add some code that does it at shutdown, and remove it in the betas.
Target Milestone: Firefox 3 M9 → Firefox 3 M10
Priority: -- → P1
Assignee: nobody → dietrich
Priority: P1 → P2
Fixed by bug 389789 and bug 381795.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Depends on: 381795
Bug 451915 - move Firefox/Places bugs to Firefox/Bookmarks and History. Remove all bugspam from this move by filtering for the string "places-to-b-and-h". In Thunderbird 3.0b, you do that as follows: Tools | Message Filters Make sure the correct account is selected. Click "New" Conditions: Body contains places-to-b-and-h Change the action to "Delete Message". Select "Manually Run" from the dropdown at the top. Click OK. Select the filter in the list, make sure "Inbox" is selected at the bottom, and click "Run Now". This should delete all the bugspam. You can then delete the filter. Gerv
Component: Places → Bookmarks & History
QA Contact: places → bookmarks
You need to log in before you can comment on or make changes to this bug.