X
Tap here to go to the mobile version of the site.

منتدى الدعم

My places.sqlite file fails selftest -- how do I fix it?

Posted

My places.sqlite file keeps getting marked as corrupt and replaced with a fresh one.

So, I took a look at it with sqlite3.

I need help with this error:

sqlite> .selftest Missing SELFTEST table - default checks only 1: Expected: [ok] 1: Got: [*** in database main *** On tree page 2 cell 53: Rowid 102326 out of order Page 98 is never used|row 10332 missing from index moz_places_visitcount|row 10333 missing from index moz_places_visitcount|row 10334 missing from index moz_places_visitcount|row 10335 missing from index moz_places_visitcount|row 10336 missing from index moz_places_visitcount|row 10337 missing from index moz_places_visitcount|row 10338 missing from index moz_places_visitcount|row 10339 missing from index moz_places_visitcount|row 10340 missing from index moz_places_visitcount|row 10341 missing from index moz_places_visitcount|row 10885 missing from index moz_places_visitcount|row 11001 missing from index moz_places_lastvisitdateindex|row 11001 missing from index moz_places_frecencyindex|row 11001 missing from index moz_places_visitcount|row 11055 missing from index moz_places_guid_uniqueindex|row 11057 missing from index moz_places_guid_uniqueindex|row 11060 missing from index moz_places_guid_uniqueindex|row 11061 missing from index moz_places_guid_uniqueindex|row 11063 missing from index moz_places_guid_uniqueindex|row 11064 missing from index moz_places_guid_uniqueindex|row 11065 missing from index moz_places_guid_uniqueindex|row 11067 missing from index moz_places_url_hashindex|row 11068 missing from index moz_places_guid_uniqueindex|row 11070 missing from index moz_places_url_hashindex|row 11070 missing from index moz_places_guid_uniqueindex|row 11071 missing from index moz_places_guid_uniqueindex|row 11074 missing from index moz_places_guid_uniqueindex|row 11076 missing from index moz_places_guid_uniqueindex|row 11077 missing from index moz_places_guid_uniqueindex|wrong # of entries in index moz_places_url_hashindex|wrong # of entries in index moz_places_guid_uniqueindex|wrong # of entries in index moz_places_lastvisitdateindex|wrong # of entries in index moz_places_frecencyindex|wrong # of entries in index moz_places_visitcount|wrong # of entries in index moz_places_hostindex|wrong # of entries in index moz_places_faviconindex|row 46 missing from index moz_historyvisits_placedateindex|row 47 missing from index moz_historyvisits_placedateindex|row 48 missing from index moz_historyvisits_placedateindex|row 49 missing from index moz_historyvisits_placedateindex|row 50 missing from index moz_historyvisits_placedateindex|row 51 missing from index moz_historyvisits_placedateindex|row 52 missing from index moz_historyvisits_placedateindex|row 53 missing from index moz_historyvisits_placedateindex|row 54 missing from index moz_historyvisits_placedateindex|row 55 missing from index moz_historyvisits_placedateindex|row 56 missing from index moz_historyvisits_placedateindex|row 57 missing from index moz_historyvisits_placedateindex|row 58 missing from index moz_historyvisits_placedateindex|row 59 missing from index moz_historyvisits_placedateindex|row 60 missing from index moz_historyvisits_placedateindex|wrong # of entries in index moz_historyvisits_placedateindex] 1 errors out of 1 tests sqlite>
My places.sqlite file keeps getting marked as corrupt and replaced with a fresh one. So, I took a look at it with sqlite3. I need help with this error: <blockquote> sqlite> .selftest Missing SELFTEST table - default checks only 1: Expected: [ok] 1: Got: [*** in database main *** On tree page 2 cell 53: Rowid 102326 out of order Page 98 is never used|row 10332 missing from index moz_places_visitcount|row 10333 missing from index moz_places_visitcount|row 10334 missing from index moz_places_visitcount|row 10335 missing from index moz_places_visitcount|row 10336 missing from index moz_places_visitcount|row 10337 missing from index moz_places_visitcount|row 10338 missing from index moz_places_visitcount|row 10339 missing from index moz_places_visitcount|row 10340 missing from index moz_places_visitcount|row 10341 missing from index moz_places_visitcount|row 10885 missing from index moz_places_visitcount|row 11001 missing from index moz_places_lastvisitdateindex|row 11001 missing from index moz_places_frecencyindex|row 11001 missing from index moz_places_visitcount|row 11055 missing from index moz_places_guid_uniqueindex|row 11057 missing from index moz_places_guid_uniqueindex|row 11060 missing from index moz_places_guid_uniqueindex|row 11061 missing from index moz_places_guid_uniqueindex|row 11063 missing from index moz_places_guid_uniqueindex|row 11064 missing from index moz_places_guid_uniqueindex|row 11065 missing from index moz_places_guid_uniqueindex|row 11067 missing from index moz_places_url_hashindex|row 11068 missing from index moz_places_guid_uniqueindex|row 11070 missing from index moz_places_url_hashindex|row 11070 missing from index moz_places_guid_uniqueindex|row 11071 missing from index moz_places_guid_uniqueindex|row 11074 missing from index moz_places_guid_uniqueindex|row 11076 missing from index moz_places_guid_uniqueindex|row 11077 missing from index moz_places_guid_uniqueindex|wrong # of entries in index moz_places_url_hashindex|wrong # of entries in index moz_places_guid_uniqueindex|wrong # of entries in index moz_places_lastvisitdateindex|wrong # of entries in index moz_places_frecencyindex|wrong # of entries in index moz_places_visitcount|wrong # of entries in index moz_places_hostindex|wrong # of entries in index moz_places_faviconindex|row 46 missing from index moz_historyvisits_placedateindex|row 47 missing from index moz_historyvisits_placedateindex|row 48 missing from index moz_historyvisits_placedateindex|row 49 missing from index moz_historyvisits_placedateindex|row 50 missing from index moz_historyvisits_placedateindex|row 51 missing from index moz_historyvisits_placedateindex|row 52 missing from index moz_historyvisits_placedateindex|row 53 missing from index moz_historyvisits_placedateindex|row 54 missing from index moz_historyvisits_placedateindex|row 55 missing from index moz_historyvisits_placedateindex|row 56 missing from index moz_historyvisits_placedateindex|row 57 missing from index moz_historyvisits_placedateindex|row 58 missing from index moz_historyvisits_placedateindex|row 59 missing from index moz_historyvisits_placedateindex|row 60 missing from index moz_historyvisits_placedateindex|wrong # of entries in index moz_historyvisits_placedateindex] 1 errors out of 1 tests sqlite> </blockquote>

Additional System Details

Installed Plug-ins

  • DISH Anywhere Player 2.29.3
  • Provides information about the default web browser
  • Web Application support for Dragon Dictate
  • Displays Java applet content, or a placeholder if Java is not installed.
  • Shockwave Flash 30.0 r0
  • SlingHealth plugin v1.1.0.21, Copyright 2010, SlingMedia Inc.
  • Unity Web Player version 5.0.3f2. (c) 2015 Unity Technologies ApS. All rights reserved.
  • Web based SlingPlayer for streaming from Slingbox
  • Enables the interaction of Mathematica content with the latest installed version of Mathematica.
  • iPhoto6

Application

  • Firefox 52.9.0
  • User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:52.0) Gecko/20100101 Firefox/52.0
  • Support URL: https://support.mozilla.org/1/firefox/52.9.0/Darwin/en-US/

Extensions

  • Active Stop Button 1.5.7 ({9e96e0c4-9bde-49b7-989f-a4ca4bdc90bb})
  • Anti-Paywall 0.9.2 ({e5322648-dfe4-4c45-b02d-44c61d545f2b})
  • Application Update Service Helper 2.0 (aushelper@mozilla.org)
  • BetterPrivacy 1.77 ({d40f5e7b-d2cf-4856-b441-cc613eeffbe3})
  • Cookies Export/import 1.0.1-signed.1-signed (CookiesIE@yahoo.com)
  • Disconnect 5.18.21 (2.0@disconnect.me)
  • Download YouTube Videos as MP4 1.8.10 ({b9bfaf1c-a63f-47cd-8b9a-29526ced9060})
  • Firebug 2.0.19 (firebug@software.joehewitt.com)
  • Force-TLS 4.0.0.1-signed.1-signed (forcetls@sid.stamm)
  • FoxyProxy Standard 4.6.5 (foxyproxy@eric.h.jung)
  • Google Analytics Opt-out Add-on (by Google) 1.0.7 ({6d96bb5e-1175-4ebf-8ab5-5f56f1c79f65})
  • MAFIAAFire Redirector 0.9d.1-signed.1-signed (MafiaaFire@mafiaafire.com)
  • Memory Restart 1.18.1-signed.1-signed (memoryrestart@teamextension.com)
  • Multi-process staged rollout 1.10 (e10srollout@mozilla.org)
  • NoScript 5.1.8.4 ({73a6fe31-595d-460b-a920-fcc0f8843232})
  • Pocket 1.0.5 (firefox@getpocket.com)
  • ProfileSwitcher 1.7.7 ({fa8476cf-a98c-4e08-99b4-65a69cb4b7d4})
  • Restartless Restart 9.1-signed.1-signed (restartless.restart@erikvold.com)
  • Resurrect Pages 3 ({0c8fbd76-bdeb-4c52-9b24-d587ce7b9dc3})
  • Self-Destructing Cookies 0.4.12 (jid0-9XfBwUWnvPx4wWsfBWMCm4Jj69E@jetpack)
  • Session Manager 0.8.1.13 ({1280606b-2510-4fe0-97ef-9b5a22eafe30})
  • SkipScreen 0.7.2.1-signed.1-signed (SkipScreen@SkipScreen)
  • Snagit Autoscroll Helper 1.9.7.1-signed.1-signed (autoscrollhelper@techsmith.com)
  • SSL Version Control 0.4.1-signed (jid1-ZM3BerwS6FsQAg@jetpack)
  • Stylish 2.1.1 ({46551EC9-40F0-4e47-8E18-8E5CF550CFB8})
  • Stylish Sync 0.1.7.1-signed.1-signed ({0e3fc079-afbb-4a00-87e5-9486062d0f9c})
  • Tampermonkey 4.7.5788 (firefox@tampermonkey.net)
  • Unhide Passwords 1.2.7.0.1-signed.1-signed ({2e17e2b2-b8d4-4a67-8d7b-fafa6cc9d1d0})
  • Web Compat 1.0 (webcompat@mozilla.org)
  • Ad-blocker for Gmail 2.8.3.1-signed.1-signed (jid0-AocRXUCRsLTCYvn6bgJERnwfuqw@jetpack) (Inactive)
  • Add-on Compatibility Reporter 2.2.4 (compatibility@addons.mozilla.org) (Inactive)
  • AniDisableHacked 1.2.1-signed.1-signed (AniDisable@HackedFor36.org) (Inactive)
  • Ant Video Downloader 2.4.7.50 (anttoolbar@ant.com) (Inactive)
  • AutoProxy 0.4b2.2013051811.1-signed.1-let-fixed.1-signed (autoproxy@autoproxy.org) (Inactive)
  • Color Management 0.5.3.1-signed.1-signed (color_management@seanhayes.name) (Inactive)
  • CookieCuller 1.4.1-signed.1-signed ({99B98C2C-7274-45a3-A640-D9DF1A1C8460}) (Inactive)
  • Fast Video Download 5.0.1.48.1-signed.1-signed ({c50ca3c4-5656-43c2-a061-13e717f73fc8}) (Inactive)
  • Flash and Video Download 3.2.1 ({bee6eb20-01e0-ebd1-da83-080329fb9a3a}) (Inactive)
  • Flash Video Downloader 16.1.1 (artur.dubovoy@gmail.com) (Inactive)
  • Ghostery – Privacy Ad Blocker 8.2.4 (firefox@ghostery.com) (Inactive)
  • GoogleSharing 0.22.1-signed.1-signed (googlesharing@extension.thoughtcrime.org) (Inactive)
  • Greasemonkey 4.1 ({e4a8a97b-f2ed-450b-b12d-ee082ba24781}) (Inactive)
  • MAFIAAFIRE: Gee! No evil! 1.0.0.0.1-signed.1-signed (CustomGoogle@mafiaafire.com) (Inactive)
  • MEGA 3.40.2 (firefox@mega.co.nz) (Inactive)
  • Privacy Badger 2018.8.22 (jid1-MnnxcxisBPnSXQ@jetpack) (Inactive)
  • Sothink Web Video Downloader for Firefox 6.9.1-signed.1-signed ({FCAB6FDD-5585-425b-95C1-5ED856F3FD08}) (Inactive)
  • Toggle Proxy 1.9.1-signed.1-signed (toggleproxy@quirkyquipu.co.uk) (Inactive)
  • TooManyTabs 1.4.8 (TooManyTabs@visibotech.com) (Inactive)
  • Troubleshooter 1.1a.1-signed.1-signed (troubleshooter@mozilla.org) (Inactive)
  • Webmail Ad Blocker 5.0.7 (gmailnoads@mywebber.com) (Inactive)
  • YouTube Plus 1.9.6 (particle@particlecore.github.io) (Inactive)

Javascript

  • incrementalGCEnabled: True

Graphics

  • adapterDescription:
  • adapterDeviceID: 0x0fe9
  • adapterDrivers:
  • adapterRAM:
  • adapterVendorID: 0x10de
  • crashGuards: []
  • currentAudioBackend: audiounit
  • driverDate:
  • driverVersion:
  • featureLog: {u'fallbacks': [], u'features': [{u'status': u'disabled', u'description': u'Compositing', u'log': [{u'status': u'available', u'type': u'default'}, {u'status': u'disabled', u'message': u'Disabled by pref', u'type': u'user'}], u'name': u'HW_COMPOSITING'}, {u'status': u'unavailable', u'description': u'OpenGL Compositing', u'log': [{u'status': u'unavailable', u'message': u'Hardware compositing is disabled', u'type': u'default'}], u'name': u'OPENGL_COMPOSITING'}]}
  • info: {u'TileHeight': 512, u'TileWidth': 512, u'AzureFallbackCanvasBackend': u'none', u'AzureCanvasAccelerated': 0, u'AzureCanvasBackend': u'skia', u'AzureContentBackend': u'skia'}
  • numAcceleratedWindows: 0
  • numAcceleratedWindowsMessage: [u'']
  • numTotalWindows: 3
  • supportsHardwareH264: Yes
  • webgl2Renderer: NVIDIA Corporation -- NVIDIA GeForce GT 750M OpenGL Engine
  • webglRenderer: NVIDIA Corporation -- NVIDIA GeForce GT 750M OpenGL Engine
  • windowLayerManagerRemote: True
  • windowLayerManagerType: Basic

Modified Preferences

Misc

  • User JS: No
  • Accessibility: No

Question owner

Argh. Is there no "Edit" button? No "preview"? No way to see if it gets messed up before posting?

I see "preview" for this reply. Maybe I can fix that formatting here? ... Yea, this is a whole lot better.

sqlite> .selftest Missing SELFTEST table - default checks only 1: Expected: [ok] 1: Got: [*** in database main *** On tree page 2 cell 53: Rowid 102326 out of order Page 98 is never used|row 10332 missing from index moz_places_visitcount|row 10333 missing from index moz_places_visitcount|row 10334 missing from index moz_places_visitcount|row 10335 missing from index moz_places_visitcount|row 10336 missing from index moz_places_visitcount|row 10337 missing from index moz_places_visitcount|row 10338 missing from index moz_places_visitcount|row 10339 missing from index moz_places_visitcount|row 10340 missing from index moz_places_visitcount|row 10341 missing from index moz_places_visitcount|row 10885 missing from index moz_places_visitcount|row 11001 missing from index moz_places_lastvisitdateindex|row 11001 missing from index moz_places_frecencyindex|row 11001 missing from index moz_places_visitcount|row 11055 missing from index moz_places_guid_uniqueindex|row 11057 missing from index moz_places_guid_uniqueindex|row 11060 missing from index moz_places_guid_uniqueindex|row 11061 missing from index moz_places_guid_uniqueindex|row 11063 missing from index moz_places_guid_uniqueindex|row 11064 missing from index moz_places_guid_uniqueindex|row 11065 missing from index moz_places_guid_uniqueindex|row 11067 missing from index moz_places_url_hashindex|row 11068 missing from index moz_places_guid_uniqueindex|row 11070 missing from index moz_places_url_hashindex|row 11070 missing from index moz_places_guid_uniqueindex|row 11071 missing from index moz_places_guid_uniqueindex|row 11074 missing from index moz_places_guid_uniqueindex|row 11076 missing from index moz_places_guid_uniqueindex|row 11077 missing from index moz_places_guid_uniqueindex|wrong # of entries in index moz_places_url_hashindex|wrong # of entries in index moz_places_guid_uniqueindex|wrong # of entries in index moz_places_lastvisitdateindex|wrong # of entries in index moz_places_frecencyindex|wrong # of entries in index moz_places_visitcount|wrong # of entries in index moz_places_hostindex|wrong # of entries in index moz_places_faviconindex|row 46 missing from index moz_historyvisits_placedateindex|row 47 missing from index moz_historyvisits_placedateindex|row 48 missing from index moz_historyvisits_placedateindex|row 49 missing from index moz_historyvisits_placedateindex|row 50 missing from index moz_historyvisits_placedateindex|row 51 missing from index moz_historyvisits_placedateindex|row 52 missing from index moz_historyvisits_placedateindex|row 53 missing from index moz_historyvisits_placedateindex|row 54 missing from index moz_historyvisits_placedateindex|row 55 missing from index moz_historyvisits_placedateindex|row 56 missing from index moz_historyvisits_placedateindex|row 57 missing from index moz_historyvisits_placedateindex|row 58 missing from index moz_historyvisits_placedateindex|row 59 missing from index moz_historyvisits_placedateindex|row 60 missing from index moz_historyvisits_placedateindex|wrong # of entries in index moz_historyvisits_placedateindex] 1 errors out of 1 tests sqlite>

Argh. Is there no "Edit" button? No "preview"? No way to see if it gets messed up before posting? I see "preview" for this reply. Maybe I can fix that formatting here? ... Yea, this is a whole lot better. <code> sqlite> .selftest Missing SELFTEST table - default checks only 1: Expected: [ok] 1: Got: [*** in database main *** On tree page 2 cell 53: Rowid 102326 out of order Page 98 is never used|row 10332 missing from index moz_places_visitcount|row 10333 missing from index moz_places_visitcount|row 10334 missing from index moz_places_visitcount|row 10335 missing from index moz_places_visitcount|row 10336 missing from index moz_places_visitcount|row 10337 missing from index moz_places_visitcount|row 10338 missing from index moz_places_visitcount|row 10339 missing from index moz_places_visitcount|row 10340 missing from index moz_places_visitcount|row 10341 missing from index moz_places_visitcount|row 10885 missing from index moz_places_visitcount|row 11001 missing from index moz_places_lastvisitdateindex|row 11001 missing from index moz_places_frecencyindex|row 11001 missing from index moz_places_visitcount|row 11055 missing from index moz_places_guid_uniqueindex|row 11057 missing from index moz_places_guid_uniqueindex|row 11060 missing from index moz_places_guid_uniqueindex|row 11061 missing from index moz_places_guid_uniqueindex|row 11063 missing from index moz_places_guid_uniqueindex|row 11064 missing from index moz_places_guid_uniqueindex|row 11065 missing from index moz_places_guid_uniqueindex|row 11067 missing from index moz_places_url_hashindex|row 11068 missing from index moz_places_guid_uniqueindex|row 11070 missing from index moz_places_url_hashindex|row 11070 missing from index moz_places_guid_uniqueindex|row 11071 missing from index moz_places_guid_uniqueindex|row 11074 missing from index moz_places_guid_uniqueindex|row 11076 missing from index moz_places_guid_uniqueindex|row 11077 missing from index moz_places_guid_uniqueindex|wrong # of entries in index moz_places_url_hashindex|wrong # of entries in index moz_places_guid_uniqueindex|wrong # of entries in index moz_places_lastvisitdateindex|wrong # of entries in index moz_places_frecencyindex|wrong # of entries in index moz_places_visitcount|wrong # of entries in index moz_places_hostindex|wrong # of entries in index moz_places_faviconindex|row 46 missing from index moz_historyvisits_placedateindex|row 47 missing from index moz_historyvisits_placedateindex|row 48 missing from index moz_historyvisits_placedateindex|row 49 missing from index moz_historyvisits_placedateindex|row 50 missing from index moz_historyvisits_placedateindex|row 51 missing from index moz_historyvisits_placedateindex|row 52 missing from index moz_historyvisits_placedateindex|row 53 missing from index moz_historyvisits_placedateindex|row 54 missing from index moz_historyvisits_placedateindex|row 55 missing from index moz_historyvisits_placedateindex|row 56 missing from index moz_historyvisits_placedateindex|row 57 missing from index moz_historyvisits_placedateindex|row 58 missing from index moz_historyvisits_placedateindex|row 59 missing from index moz_historyvisits_placedateindex|row 60 missing from index moz_historyvisits_placedateindex|wrong # of entries in index moz_historyvisits_placedateindex] 1 errors out of 1 tests sqlite> </code>
Seburo
  • Top 10 Contributor
  • Moderator
819 solutions 6056 answers

Hi

As a first step, I recomend that you update your copy of Firefox so that you have the latest security and stability fixes that may help resolve this issue.

If this doe snot resolve this problem, please come back here and we can look into it again for you.

Hi As a first step, I recomend that you update your copy of Firefox so that you have the latest security and stability fixes that may help resolve this issue. If this doe snot resolve this problem, please come back here and we can look into it again for you.
cor-el
  • Top 10 Contributor
  • Moderator
17578 solutions 159013 answers

Helpful Reply

If you use Sync then best is to disconnect Sync temporarily during troubleshooting.

You can check for problems with the places.sqlite database (bookmarks and history) in the Firefox profile folder.

  • use "Verify Integrity" on the "Help -> Troubleshooting Information" (about:support) page
    in case errors are reported close and restart Firefox and retry

See also:

If "Verify Integrity" on the "Help -> Troubleshooting Information" (about:support) page cannot repair places.sqlite then remove all places.sqlite files in the Firefox profile folder. Firefox will rebuild places.sqlite and restore the bookmarks from a recent JSON backup in the bookmarkbackups folder.

You can use the button on the "Help -> Troubleshooting Information" (about:support) page to go to the current Firefox profile folder or use the about:profiles page.

See also:

If you use Sync then best is to disconnect Sync temporarily during troubleshooting. You can check for problems with the <b>places.sqlite</b> database (bookmarks and history) in the Firefox profile folder. *use "Verify Integrity" on the "Help -> Troubleshooting Information" (about:support) page<br>in case errors are reported close and restart Firefox and retry See also: *http://kb.mozillazine.org/Locked_or_damaged_places.sqlite *https://support.mozilla.org/en-US/kb/Bookmarks+not+saved#w_fix-the-bookmarks-file If "Verify Integrity" on the "Help -> Troubleshooting Information" (about:support) page cannot repair places.sqlite then remove all places.sqlite files in the Firefox profile folder. Firefox will rebuild places.sqlite and restore the bookmarks from a recent JSON backup in the bookmarkbackups folder. *keep a backup copy of places.sqlite in case a new places.sqlite database has to be created *http://kb.mozillazine.org/Unable_to_process_the_backup_file_-_Firefox You can use the button on the "Help -> Troubleshooting Information" (about:support) page to go to the current Firefox profile folder or use the <b>about:profiles</b> page. *Help -> Troubleshooting Information -> Profile Directory:<br>Windows: Show Folder; Linux: Open Directory; Mac: Show in Finder *http://kb.mozillazine.org/Profile_folder_-_Firefox See also: *https://developer.mozilla.org/en-US/Mozilla/Tech/Places/places.sqlite_Database_Troubleshooting

Question owner

Lovely.

Places Database Integrity

> Integrity check - The database is corrupt > Reindex - Unable to reindex database > Integrity check - The database is corrupt - Unable to fix corruption, database will be replaced on next startup

So I found advice on stack overflow for a generic database rebuilt, involving a .dump to a text file, and then a full rebuild of a new copy.

Said text file comes out pretty large :-) Oddly, it is smaller than the database, even with all that SQL instruction text in there.

But the "PRAGMA" instructions on that mozilla specific page? They return nothing. No errors, no messages, nothing.

Lovely. <code> Places Database Integrity > Integrity check - The database is corrupt > Reindex - Unable to reindex database > Integrity check - The database is corrupt - Unable to fix corruption, database will be replaced on next startup </code> So I found advice on stack overflow for a generic database rebuilt, involving a .dump to a text file, and then a full rebuild of a new copy. Said text file comes out pretty large :-) Oddly, it is smaller than the database, even with all that SQL instruction text in there. But the "PRAGMA" instructions on that mozilla specific page? They return nothing. No errors, no messages, nothing.

Question owner

Hmm, this might be something to do with it:

michael$ sqlite3 new.sqlite < dump_places.sql Error: near line 10998: UNIQUE constraint failed: moz_places.id Error: near line 10999: UNIQUE constraint failed: moz_places.id Error: near line 11000: UNIQUE constraint failed: moz_places.id Error: near line 11001: UNIQUE constraint failed: moz_places.id Error: near line 11002: UNIQUE constraint failed: moz_places.id Error: near line 11003: UNIQUE constraint failed: moz_places.id Error: near line 11004: UNIQUE constraint failed: moz_places.id Error: near line 11005: UNIQUE constraint failed: moz_places.id Error: near line 11006: UNIQUE constraint failed: moz_places.id Error: near line 11007: UNIQUE constraint failed: moz_places.id Error: near line 11008: UNIQUE constraint failed: moz_places.id Error: near line 11009: UNIQUE constraint failed: moz_places.id Error: near line 404421: near "*": syntax error michael$

Hmm, this might be something to do with it: <code> michael$ sqlite3 new.sqlite < dump_places.sql Error: near line 10998: UNIQUE constraint failed: moz_places.id Error: near line 10999: UNIQUE constraint failed: moz_places.id Error: near line 11000: UNIQUE constraint failed: moz_places.id Error: near line 11001: UNIQUE constraint failed: moz_places.id Error: near line 11002: UNIQUE constraint failed: moz_places.id Error: near line 11003: UNIQUE constraint failed: moz_places.id Error: near line 11004: UNIQUE constraint failed: moz_places.id Error: near line 11005: UNIQUE constraint failed: moz_places.id Error: near line 11006: UNIQUE constraint failed: moz_places.id Error: near line 11007: UNIQUE constraint failed: moz_places.id Error: near line 11008: UNIQUE constraint failed: moz_places.id Error: near line 11009: UNIQUE constraint failed: moz_places.id Error: near line 404421: near "*": syntax error michael$ </code>

Modified by Keybounce

Question owner

Alright, something is wrong here.

After removing the 10 or so URL's that had duplicate ID's, and removing the extra output at the end of the file (geez, remember how I said those PRAGMA commands made no output? :-), the database seems to pass validation, but Firefox calls it corrupt on every launch.

sqlite> .indexes moz_annos_placeattributeindex moz_places_frecencyindex moz_bookmarks_guid_uniqueindex moz_places_guid_uniqueindex moz_bookmarks_itemindex moz_places_hostindex moz_bookmarks_itemlastmodifiedindex moz_places_lastvisitdateindex moz_bookmarks_parentindex moz_places_url_hashindex moz_historyvisits_dateindex moz_places_visitcount moz_historyvisits_fromindex sqlite_autoindex_moz_anno_attributes_1 moz_historyvisits_placedateindex sqlite_autoindex_moz_favicons_1 moz_items_annos_itemattributeindex sqlite_autoindex_moz_hosts_1 moz_keywords_placepostdata_uniqueindex sqlite_autoindex_moz_inputhistory_1 moz_places_faviconindex sqlite_autoindex_moz_keywords_1 sqlite> .selftest Missing SELFTEST table - default checks only 0 errors out of 1 tests sqlite> ^D

The indexes are there. It passes the database checks.

But Firefox wants to call it corrupt 100% of the time now. I can't even use the rebuild tool on the about:support page, because that requires me to be able to start up with that old database in place.

Alright, something is wrong here. After removing the 10 or so URL's that had duplicate ID's, and removing the extra output at the end of the file (geez, remember how I said those PRAGMA commands made no output? :-), the database seems to pass validation, but Firefox calls it corrupt on every launch. <code> sqlite> .indexes moz_annos_placeattributeindex moz_places_frecencyindex moz_bookmarks_guid_uniqueindex moz_places_guid_uniqueindex moz_bookmarks_itemindex moz_places_hostindex moz_bookmarks_itemlastmodifiedindex moz_places_lastvisitdateindex moz_bookmarks_parentindex moz_places_url_hashindex moz_historyvisits_dateindex moz_places_visitcount moz_historyvisits_fromindex sqlite_autoindex_moz_anno_attributes_1 moz_historyvisits_placedateindex sqlite_autoindex_moz_favicons_1 moz_items_annos_itemattributeindex sqlite_autoindex_moz_hosts_1 moz_keywords_placepostdata_uniqueindex sqlite_autoindex_moz_inputhistory_1 moz_places_faviconindex sqlite_autoindex_moz_keywords_1 sqlite> .selftest Missing SELFTEST table - default checks only 0 errors out of 1 tests sqlite> ^D </code> The indexes are there. It passes the database checks. But Firefox wants to call it corrupt 100% of the time now. I can't even use the rebuild tool on the about:support page, because that requires me to be able to start up with that old database in place.
cor-el
  • Top 10 Contributor
  • Moderator
17578 solutions 159013 answers
Any luck with this article> *https://developer.mozilla.org/en-US/Mozilla/Tech/Places/places.sqlite_Database_Troubleshooting

Question owner

After the rebuild? I got:

michael$ sqlite3 places.sqlite.corrupt 

SQLite version 3.24.0 2018-06-04 19:24:41 Enter ".help" for usage hints. sqlite> PRAGMA integrity_check; ok sqlite>

Let me go through the steps on the original (the one with the duplicated primary keys ... how did those get into the database in the first place?)

After the rebuild? I got: <code> michael$ sqlite3 places.sqlite.corrupt SQLite version 3.24.0 2018-06-04 19:24:41 Enter ".help" for usage hints. sqlite> PRAGMA integrity_check; ok sqlite> </code> Let me go through the steps on the original (the one with the duplicated primary keys ... how did those get into the database in the first place?)

Question owner

So, notes as I do this.

First, why do ".backup" and ".clone" give such different outputs? And why does .clone actually complain about table names like this?

sqlite> .backup new-back.sqlite sqlite> .clone new-clone.sqlite moz_places... done moz_historyvisits... done moz_inputhistory... done moz_hosts... done moz_bookmarks... done moz_keywords... done sqlite_sequence... Error: object name reserved for internal use: sqlite_sequence SQL: [CREATE TABLE sqlite_sequence(name,seq)] done moz_favicons... done moz_anno_attributes... done moz_annos... done moz_items_annos... done sqlite_stat1... Error: object name reserved for internal use: sqlite_stat1 SQL: [CREATE TABLE sqlite_stat1(tbl,idx,stat)] Error 1: no such table: sqlite_stat1 on [SELECT * FROM "sqlite_stat1"] done sqlite_autoindex_moz_inputhistory_1... done sqlite_autoindex_moz_hosts_1... done sqlite_autoindex_moz_keywords_1... done sqlite_autoindex_moz_favicons_1... done sqlite_autoindex_moz_anno_attributes_1... done moz_places_faviconindex... done moz_places_hostindex... done moz_places_visitcount... done moz_places_frecencyindex... done moz_places_lastvisitdateindex... done moz_historyvisits_placedateindex... done moz_historyvisits_fromindex... done moz_historyvisits_dateindex... done moz_bookmarks_itemindex... done moz_bookmarks_parentindex... done moz_bookmarks_itemlastmodifiedindex... done moz_places_guid_uniqueindex... done moz_bookmarks_guid_uniqueindex... done moz_annos_placeattributeindex... done moz_items_annos_itemattributeindex... done moz_keywords_placepostdata_uniqueindex... done moz_places_url_hashindex... done sqlite>

The output from .backup is smaller than the original, but bigger than the .clone; the .clone is the same size as .dump followed by a new database. (Another stack overflow answer indicated that .backup can succeed where .dump fails -- something about custom collations and other oddballs).

... have to close firefox before putting this new one in place, so posting this now, and ...

So, notes as I do this. First, why do ".backup" and ".clone" give such different outputs? And why does .clone actually complain about table names like this? <code> sqlite> .backup new-back.sqlite sqlite> .clone new-clone.sqlite moz_places... done moz_historyvisits... done moz_inputhistory... done moz_hosts... done moz_bookmarks... done moz_keywords... done sqlite_sequence... Error: object name reserved for internal use: sqlite_sequence SQL: [CREATE TABLE sqlite_sequence(name,seq)] done moz_favicons... done moz_anno_attributes... done moz_annos... done moz_items_annos... done sqlite_stat1... Error: object name reserved for internal use: sqlite_stat1 SQL: [CREATE TABLE sqlite_stat1(tbl,idx,stat)] Error 1: no such table: sqlite_stat1 on [SELECT * FROM "sqlite_stat1"] done sqlite_autoindex_moz_inputhistory_1... done sqlite_autoindex_moz_hosts_1... done sqlite_autoindex_moz_keywords_1... done sqlite_autoindex_moz_favicons_1... done sqlite_autoindex_moz_anno_attributes_1... done moz_places_faviconindex... done moz_places_hostindex... done moz_places_visitcount... done moz_places_frecencyindex... done moz_places_lastvisitdateindex... done moz_historyvisits_placedateindex... done moz_historyvisits_fromindex... done moz_historyvisits_dateindex... done moz_bookmarks_itemindex... done moz_bookmarks_parentindex... done moz_bookmarks_itemlastmodifiedindex... done moz_places_guid_uniqueindex... done moz_bookmarks_guid_uniqueindex... done moz_annos_placeattributeindex... done moz_items_annos_itemattributeindex... done moz_keywords_placepostdata_uniqueindex... done moz_places_url_hashindex... done sqlite> </code> The output from .backup is smaller than the original, but bigger than the .clone; the .clone is the same size as .dump followed by a new database. (Another stack overflow answer indicated that .backup can succeed where .dump fails -- something about custom collations and other oddballs). ... have to close firefox before putting this new one in place, so posting this now, and ...

Question owner

Well, it isn't immediately complaining.

Integrity check says:

> Integrity check + The database is sane > Coherence check + The database is coherent > Orphans expiration + Database cleaned up > Vacuum Initial database size is 71680 KiB + The database has been vacuumed Final database size is 71680 KiB > Statistics Database size is 71680 KiB user_version is 35 page_size is 32768 cache_size is -2048 journal_mode is wal synchronous is 1 History can store a maximum of 146801 unique pages Table moz_places has 138033 records Table moz_historyvisits has 238517 records Table moz_inputhistory has 318 records Table moz_hosts has 5245 records Table moz_bookmarks has 14628 records Table moz_keywords has 6 records Table sqlite_sequence has 2 records Table moz_favicons has 4258 records Table moz_anno_attributes has 14 records Table moz_annos has 302 records Table moz_items_annos has 2240 records Table sqlite_stat1 has 15 records Index sqlite_autoindex_moz_inputhistory_1 Index sqlite_autoindex_moz_hosts_1 Index sqlite_autoindex_moz_keywords_1 Index sqlite_autoindex_moz_favicons_1 Index sqlite_autoindex_moz_anno_attributes_1 Index moz_places_faviconindex Index moz_places_hostindex Index moz_places_visitcount Index moz_places_frecencyindex Index moz_places_lastvisitdateindex Index moz_historyvisits_placedateindex Index moz_historyvisits_fromindex Index moz_historyvisits_dateindex Index moz_bookmarks_itemindex Index moz_bookmarks_parentindex Index moz_bookmarks_itemlastmodifiedindex Index moz_places_guid_uniqueindex Index moz_bookmarks_guid_uniqueindex Index moz_annos_placeattributeindex Index moz_items_annos_itemattributeindex Index moz_keywords_placepostdata_uniqueindex Index moz_places_url_hashindex

So, I think this, at least, is good.

Now, to rebuild this profile to solve that other problem with local storage.

Well, it isn't immediately complaining. Integrity check says: <code> > Integrity check + The database is sane > Coherence check + The database is coherent > Orphans expiration + Database cleaned up > Vacuum Initial database size is 71680 KiB + The database has been vacuumed Final database size is 71680 KiB > Statistics Database size is 71680 KiB user_version is 35 page_size is 32768 cache_size is -2048 journal_mode is wal synchronous is 1 History can store a maximum of 146801 unique pages Table moz_places has 138033 records Table moz_historyvisits has 238517 records Table moz_inputhistory has 318 records Table moz_hosts has 5245 records Table moz_bookmarks has 14628 records Table moz_keywords has 6 records Table sqlite_sequence has 2 records Table moz_favicons has 4258 records Table moz_anno_attributes has 14 records Table moz_annos has 302 records Table moz_items_annos has 2240 records Table sqlite_stat1 has 15 records Index sqlite_autoindex_moz_inputhistory_1 Index sqlite_autoindex_moz_hosts_1 Index sqlite_autoindex_moz_keywords_1 Index sqlite_autoindex_moz_favicons_1 Index sqlite_autoindex_moz_anno_attributes_1 Index moz_places_faviconindex Index moz_places_hostindex Index moz_places_visitcount Index moz_places_frecencyindex Index moz_places_lastvisitdateindex Index moz_historyvisits_placedateindex Index moz_historyvisits_fromindex Index moz_historyvisits_dateindex Index moz_bookmarks_itemindex Index moz_bookmarks_parentindex Index moz_bookmarks_itemlastmodifiedindex Index moz_places_guid_uniqueindex Index moz_bookmarks_guid_uniqueindex Index moz_annos_placeattributeindex Index moz_items_annos_itemattributeindex Index moz_keywords_placepostdata_uniqueindex Index moz_places_url_hashindex </code> So, I think this, at least, is good. Now, to rebuild this profile to solve that other problem with local storage.

Question owner

Hold on -- cache size is negative???

Hold on -- cache size is negative???