Closed Bug 1240756 Opened 4 years ago Closed 4 years ago

Cannot edit keyword search / moz_keywords referential integrity

Categories

(Toolkit :: Places, defect)

43 Branch
defect
Not set

Tracking

()

RESOLVED DUPLICATE of bug 1150678

People

(Reporter: dw, Unassigned)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:43.0) Gecko/20100101 Firefox/43.0
Build ID: 20160105164030

Steps to reproduce:

(From very shady memory - this problem started over a week ago)

1. Delete "startpage.com" bookmark, which previously had a keyword search of "g".
2. Update a "google.com" bookmark from a keyword search of "gg" to a keyword search of "g".
3. Notice "g foo bar" does not work in address bar.
4. Edit "google.com" bookmark, observe the keyword is still set to "gg"

(Foggy memory of what happens next, mostly deleting / editing / recreating bookmarks randomly, problem eventually goes way).

A week later, do the same thing, only this time for a "reader" keyword. Problem reappears.

This time I took a bookmarks backup to JSON, deleted every bookmark, and attempted reloading. Still could not set a "reader" keyword on my desired bookmark.

Deleted places.sqlite and bookmarks.html, restored the backup, problem disappeared.

Investigate old places.sqlite, find this:

sqlite> select k.id, k.keyword from moz_keywords k left join moz_places p on k.place_id = p.id WHERE p.url IS NULL;
id          keyword
----------  ----------
38          reader
67          p

It seems somehow possible that keywords table integrity can be violated when adding/updating moz_places table.

A simple fix would be DELETE FROM moz_keywords WHERE place_id = ... while deleting a place, but obviously this is not the root cause.

I can provide a copy of my places.sqlite as desired, not sure if it would be helpful though.


Actual results:

Could not edit keyword without recreating places.sqlite


Expected results:

Could edit keyword without recreating places.sqlite
Component: Untriaged → Places
Product: Firefox → Toolkit
yep, known problem unfortunately.
Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1150678
You need to log in before you can comment on or make changes to this bug.