Closed Bug 933864 Opened 7 years ago Closed 4 years ago

13 huge SQL warnings spammed at the end of every reftest run ("WARNING: SQL statement 'UPDATE moz_places SET title = :page_title WHERE id = :page_id ' (a6c8e8e0) should have been finalized before closing the connection")

Categories

(Toolkit :: Places, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

VERIFIED WORKSFORME

People

(Reporter: dholbert, Unassigned)

Details

STR:
In a debug build, run ./mach reftest on any folder of reftests, e.g:
  ./mach reftest layout/reftests/css-calc

ACTUAL RESULTS: After the reftest output, this fills up my terminal and pushes all of the useful information offscreen:
{
 0:04.79 WARNING: SQL statement 'UPDATE moz_places SET title = :page_title WHERE id = :page_id ' (a6c8e8e0) should have been finalized before closing the connection: file /scratch/work/builds/mozilla-inbound/mozilla/storage/src/mozStorageConnection.cpp, line 855
 0:04.79 WARNING: SQL statement 'UPDATE moz_places SET hidden = 0 WHERE id = :page_id AND frecency <> 0' (a6c8e550) should have been finalized before closing the connection: file /scratch/work/builds/mozilla-inbound/mozilla/storage/src/mozStorageConnection.cpp, line 855
 0:04.79 WARNING: SQL statement 'UPDATE moz_places SET frecency = CALCULATE_FRECENCY(:page_id) WHERE id = :page_id' (a6c8e420) should have been finalized before closing the connection: file /scratch/work/builds/mozilla-inbound/mozilla/storage/src/mozStorageConnection.cpp, line 855
 0:04.79 WARNING: SQL statement 'SELECT id, visit_date FROM moz_historyvisits WHERE place_id = (SELECT id FROM moz_places WHERE url = :page_url) AND visit_date = :visit_date ' (a6c8e2f0) should have been finalized before closing the connection: file /scratch/work/builds/mozilla-inbound/mozilla/storage/src/mozStorageConnection.cpp, line 855
 0:04.79 WARNING: SQL statement 'INSERT INTO moz_historyvisits (from_visit, place_id, visit_date, visit_type, session) VALUES (:from_visit, :page_id, :visit_date, :visit_type, 0) ' (a6c8e1c0) should have been finalized before closing the connection: file /scratch/work/builds/mozilla-inbound/mozilla/storage/src/mozStorageConnection.cpp, line 855
 0:04.79 WARNING: SQL statement 'INSERT INTO moz_places (url, title, rev_host, hidden, typed, frecency, guid) VALUES (:url, :title, :rev_host, :hidden, :typed, :frecency, :guid) ' (a6c8e090) should have been finalized before closing the connection: file /scratch/work/builds/mozilla-inbound/mozilla/storage/src/mozStorageConnection.cpp, line 855
 0:04.79 WARNING: SQL statement 'SELECT guid, id, title, hidden, typed, frecency FROM moz_places WHERE url = :page_url ' (a6c8df60) should have been finalized before closing the connection: file /scratch/work/builds/mozilla-inbound/mozilla/storage/src/mozStorageConnection.cpp, line 855
 0:04.79 WARNING: SQL statement 'UPDATE moz_places SET favicon_id = :icon_id WHERE id = :page_id' (a6c8bbc0) should have been finalized before closing the connection: file /scratch/work/builds/mozilla-inbound/mozilla/storage/src/mozStorageConnection.cpp, line 855
 0:04.79 WARNING: SQL statement 'INSERT OR REPLACE INTO moz_favicons (id, url, data, mime_type, expiration, guid) VALUES ((SELECT id FROM moz_favicons WHERE url = :icon_url), :icon_url, :data, :mime_type, :expiration, COALESCE(:guid, (SELECT guid FROM moz_favicons WHERE url = :icon_url), GENERATE_GUID()))' (a6c8ba90) should have been finalized before closing the connection: file /scratch/work/builds/mozilla-inbound/mozilla/storage/src/mozStorageConnection.cpp, line 855
 0:04.79 WARNING: SQL statement 'SELECT h.id, h.favicon_id, h.guid, ( SELECT h.url FROM moz_bookmarks b WHERE b.fk = h.id UNION ALL SELECT url FROM moz_places WHERE id = ( SELECT COALESCE(grandparent.place_id, parent.place_id) as r_place_id FROM moz_historyvisits dest LEFT JOIN moz_historyvisits parent ON parent.id = dest.from_visit AND dest.visit_type IN (5, 6) LEFT JOIN moz_historyvisits grandparent ON parent.from_visit = grandparent.id AND parent.visit_type IN (5, 6) WHERE dest.place_id = h.id AND EXISTS(SELECT 1 FROM moz_bookmarks b WHERE b.fk = r_place_id) LIMIT 1 ) ) FROM moz_places h WHERE h.url = :page_url' (a6c8b960) should have been finalized before closing the connection: file /scratch/work/builds/mozilla-inbound/mozilla/storage/src/mozStorageConnection.cpp, line 855
 0:04.79 WARNING: SQL statement 'SELECT id, expiration, data, mime_type FROM moz_favicons WHERE url = :icon_url' (a6c8b830) should have been finalized before closing the connection: file /scratch/work/builds/mozilla-inbound/mozilla/storage/src/mozStorageConnection.cpp, line 855
 0:04.79 WARNING: SQL statement '/* do not warn (bug 659740 - SQLite may ignore index if few visits exist) */SELECT ROUND((strftime('%s','now','localtime','utc') - v.visit_date/1000000)/86400), IFNULL(r.visit_type, v.visit_type), v.visit_date FROM moz_historyvisits v LEFT JOIN moz_historyvisits r ON r.id = v.from_visit AND v.visit_type BETWEEN 5 AND 6 WHERE v.place_id = :page_id ORDER BY v.visit_date DESC ' (a6c8b5d0) should have been finalized before closing the connection: file /scratch/work/builds/mozilla-inbound/mozilla/storage/src/mozStorageConnection.cpp, line 855
 0:04.79 WARNING: SQL statement 'SELECT typed, hidden, visit_count, (SELECT count(*) FROM moz_historyvisits WHERE place_id = :page_id), EXISTS (SELECT 1 FROM moz_bookmarks WHERE fk = :page_id), (url > 'place:' AND url < 'place;') FROM moz_places WHERE id = :page_id ' (a6c8b4a0) should have been finalized before closing the connection: file /scratch/work/builds/mozilla-inbound/mozilla/storage/src/mozStorageConnection.cpp, line 855
}

Please make it stop. :)
CC'ing mak and Yoric, who were involved with similar bug 914005.

(That bug mentions bug 914005, which this bug here might be a dupe of...?  If so, perhaps this bug here can cover just silencing the output (e.g. putting it behind a flag), and bug 914005 can cover actually fixing the finalization issues)
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WORKSFORME
Verified WFM. Just retried  ./mach reftest layout/reftests/css-calc in a debug build of current m-c; no SQL spam.

Thanks for noticing & resolving.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.