Giter Site home page Giter Site logo

Comments (7)

az0 avatar az0 commented on May 24, 2024

This looks like an error I have heard reported once on either Windows or Linux, but I have not reproduced it.

The SQL code that cleans history from Firefox/Mozilla places.sqlite is slightly complicated. One option is you could privately email me your places.sqlite file, and I could try to troubleshoot it here.

from bleachbit.

az0 avatar az0 commented on May 24, 2024

If you prefer to work on this yourself, look at the function delete_mozilla_url_history, and try to isolate the error to a specific SQL command

from bleachbit.

brahmastra2016 avatar brahmastra2016 commented on May 24, 2024

thank for reply :) , let me spend sometime working on it and will let you know if hit stone wall.

it is exactly same as below bug on Linux and same workaround works too.

https://bugs.launchpad.net/bleachbit/+bug/1464299

Workaround :
Disable "Overwrite files to hide contents".

from bleachbit.

brahmastra2016 avatar brahmastra2016 commented on May 24, 2024

This is what i am observing based on some debug, query with randomblob work but the next query with zeroblob fails.

Need somebody with SQL experience and expertise to guide as how to fix it Or explain as why we see this behavior.

SQL Query with randomblob works :)
#1
update moz_places set url = randomblob(length(url)),rev_host = randomblob(length(rev_host)),title = randomblob(length(title)) where id in (select moz_places.id from moz_places left join moz_bookmarks on moz_bookmarks.fk = moz_places.id where moz_bookmarks.id is null)

But the next command with zeroblob fails.
#2
update moz_places set url = zeroblob(length(url)),rev_host = zeroblob(length(rev_host)),title = zeroblob(length(title)) where id in (select moz_places.id from moz_places left join moz_bookmarks on moz_bookmarks.fk = moz_places.id where moz_bookmarks.id is null)

from bleachbit.

az0 avatar az0 commented on May 24, 2024

Zeroblob sets the existing data to zeros, and it makes sense that this could violate a constraint that the values are unique. In Special.py on line 47 try changing update %s to update or ignore %s. Does it help?

from bleachbit.

brahmastra2016 avatar brahmastra2016 commented on May 24, 2024

i found that best solution so far is to completed disable (commented out) the zeroblob section under shred_sqlite_char_columns in special.py

this is required for both Mac OSx and Windows.

#######
Change :
#######

def __shred_sqlite_char_columns(table, cols=None, where=""):
"""Create an SQL command to shred character columns"""
cmd = ""
if cols and options.get('shred'):
# cmd += "update %s set %s %s;" %
# (table, ",".join(["%s = zeroblob(length(%s))" % (col, col)
# for col in cols if col != "url"]), where)
cmd += "update %s set %s %s;" %
(table, ",".join(["%s = zeroblob(length(%s))" % (col, col)
for col in cols if col != "url"]), where)

from bleachbit.

az0 avatar az0 commented on May 24, 2024

I think this was fixed by c43077d

If you see this with later code, please reopen

from bleachbit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.