Forgetting a site with more than 999 pages binds too many SQL variables
Categories
(Toolkit :: Places, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox71 | --- | fixed |
People
(Reporter: lina, Assigned: lina)
References
Details
Attachments
(4 files)
I have a looot of twitter.com/*
pages in my history (for users and individual tweets), and tried to use "Forget About This Site" to clean them all up. Unfortunately, it looks like this statement doesn't chunk bound params, so I got an Error: Error(s) encountered during statement execution: too many SQL variables
in the browser console.
I think this can happen anytime you try to remove more than 999 pages from history.
Assignee | ||
Comment 1•5 years ago
|
||
This is a wrapper around the sqlite3_limit
interface that returns the
binding parameter limit. Adding this getter lets us clean up the inline
SQLITE_MAX_VARIABLE_NUMBER
constants scattered around Places.
Assignee | ||
Comment 2•5 years ago
|
||
Depends on D49071
Assignee | ||
Comment 3•5 years ago
|
||
Depends on D49072
Assignee | ||
Comment 4•5 years ago
|
||
This commit builds on the last one to chunk all bound parameters.
In most cases, we just move the statements into a loop that
iterates over the chunks instead of the array. There are two
exceptions which need a bit more work: cleanupPages
and remove
.
In cleanupPages
, we chunk pagesToRemove
, and clean up
moz_updateoriginsdelete_temp
and orphan icons after the loop. This
doesn't change functionality, because none of the statements that
follow depend on moz_origins
, moz_icons
, or frecency stats.
In remove
, we now fetch page info for URLs and GUIDs in separate
statements. This makes chunking URL params easier.
Depends on D49073
Pushed by kcambridge@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/dcc1e4b3ac82 Introduce `mozIStorageAsyncConnection::variableLimit`. r=mak https://hg.mozilla.org/integration/autoland/rev/a286bae2c308 Centralize array chunking in `PlacesUtils.chunkArray`. r=mak https://hg.mozilla.org/integration/autoland/rev/9849e08517a6 Use the new `variableLimit` getter to chunk binding params in Places. r=mak https://hg.mozilla.org/integration/autoland/rev/f1b176cc0766 Chunk bound params in bookmarks and history. r=mak
Comment 6•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/dcc1e4b3ac82
https://hg.mozilla.org/mozilla-central/rev/a286bae2c308
https://hg.mozilla.org/mozilla-central/rev/9849e08517a6
https://hg.mozilla.org/mozilla-central/rev/f1b176cc0766
Description
•