Skip to content

Commit

Permalink
Bug 1766912 - Avoid trying to insert NULLs into the sync bookmark ite…
Browse files Browse the repository at this point in the history
…msRemoved table. r=skhamis

Differential Revision: https://phabricator.services.mozilla.com/D145048
  • Loading branch information
mhammond committed Apr 29, 2022
1 parent acf1d4f commit 6314635
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion toolkit/components/places/bookmark_sync/src/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,7 @@ fn remove_local_items(
ops(guid, level) AS (VALUES {})
INSERT INTO itemsRemoved(itemId, parentId, position, type, title,
placeId, guid, parentGuid, level)
SELECT b.id, b.parent, b.position, b.type, b.title, b.fk,
SELECT b.id, b.parent, b.position, b.type, IFNULL(b.title, \"\"), b.fk,
b.guid, p.guid, n.level
FROM ops n
JOIN moz_bookmarks b ON b.guid = n.guid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ add_task(async function test_update_frecencies() {
id: "bookmarkDDDD",
parentid: "unfiled",
type: "bookmark",
title: "D",
title: null,
bmkUri: "http://example.com/d",
},
{
Expand Down Expand Up @@ -286,7 +286,7 @@ async function setupLocalTree(localTimeSeconds) {
},
{
guid: "bookmarkDDDD",
title: "D",
title: null,
url: "http://example.com/d",
dateAdded,
lastModified,
Expand Down Expand Up @@ -441,7 +441,7 @@ add_task(async function test_apply_then_revert() {
index: 1,
type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
urlHref: "http://example.com/d",
title: "D",
title: "", // null titles get turned into empty strings.
guid: "bookmarkDDDD",
parentGuid: PlacesUtils.bookmarks.menuGuid,
source: PlacesUtils.bookmarks.SOURCES.SYNC,
Expand Down

0 comments on commit 6314635

Please sign in to comment.