Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Issue 2710823005: [sql] RecoverDatabase() deletes SQLITE_NOTADB databases. (Closed)

Created:
3 years, 10 months ago by Scott Hess - ex-Googler
Modified:
3 years, 9 months ago
Reviewers:
jwd, pwnall
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[sql] RecoverDatabase() deletes SQLITE_NOTADB databases. SQLITE_NOTADB happens when the SQLite header data is broken. That data includes meta-information about the file's structure, so any corruption in the header would require manual intervention to recover - assuming that the entire file is not broken. SQLITE_NOTADB files are not even partially readable through SQLite, so deletion unsticks the file going forward. BUG=597785 Review-Url: https://codereview.chromium.org/2710823005 Cr-Commit-Position: refs/heads/master@{#454374} Committed: https://chromium.googlesource.com/chromium/src/+/00d65d49ff8e35b2658d0798fac66b1da040836a

Patch Set 1 #

Patch Set 2 : Histograms #

Total comments: 9

Patch Set 3 : wordsmithing #

Total comments: 1

Patch Set 4 : ref Windows delete in probe-after-delete comment. #

Total comments: 2

Patch Set 5 : Comment on enum required to match histogram enumeration. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+108 lines, -3 lines) Patch
M sql/recovery.h View 1 chunk +2 lines, -0 lines 0 comments Download
M sql/recovery.cc View 1 2 3 4 3 chunks +62 lines, -3 lines 0 comments Download
M sql/recovery_unittest.cc View 1 chunk +29 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 1 chunk +15 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 30 (14 generated)
Scott Hess - ex-Googler
Histograms
3 years, 10 months ago (2017-02-22 22:39:58 UTC) #3
pwnall
https://codereview.chromium.org/2710823005/diff/20001/sql/recovery.cc File sql/recovery.cc (right): https://codereview.chromium.org/2710823005/diff/20001/sql/recovery.cc#newcode119 sql/recovery.cc:119: // succeeded, then querying the database failed. Based on ...
3 years, 9 months ago (2017-02-27 22:28:33 UTC) #9
Scott Hess - ex-Googler
wordsmithing
3 years, 9 months ago (2017-02-27 23:36:36 UTC) #10
Scott Hess - ex-Googler
OK, tried to tweak the comments up a bit. ptal. https://codereview.chromium.org/2710823005/diff/20001/sql/recovery.cc File sql/recovery.cc (right): https://codereview.chromium.org/2710823005/diff/20001/sql/recovery.cc#newcode119 ...
3 years, 9 months ago (2017-02-27 23:39:39 UTC) #11
pwnall
LGTM w/ one nit. https://codereview.chromium.org/2710823005/diff/20001/sql/recovery.cc File sql/recovery.cc (right): https://codereview.chromium.org/2710823005/diff/20001/sql/recovery.cc#newcode606 sql/recovery.cc:606: // |db| was poisoned by ...
3 years, 9 months ago (2017-02-27 23:54:52 UTC) #12
Scott Hess - ex-Googler
+ericwilligers@chromium.org for histograms.xml review. Eric, my goal with these histogram items is to log the ...
3 years, 9 months ago (2017-02-28 01:14:51 UTC) #14
Eric Willigers
+jwd for histogram OWNERS. (I only review UseCounter histogram changes.)
3 years, 9 months ago (2017-02-28 01:43:18 UTC) #16
Scott Hess - ex-Googler
On 2017/02/28 01:43:18, Eric Willigers wrote: > +jwd for histogram OWNERS. > (I only review ...
3 years, 9 months ago (2017-02-28 01:55:43 UTC) #17
Scott Hess - ex-Googler
ref Windows delete in probe-after-delete comment.
3 years, 9 months ago (2017-03-01 22:29:09 UTC) #18
Scott Hess - ex-Googler
jwd, ping histograms.xml? The change should be close to a rubber-stamp, it's just adding additional ...
3 years, 9 months ago (2017-03-01 22:30:25 UTC) #20
jwd
https://codereview.chromium.org/2710823005/diff/60001/sql/recovery.cc File sql/recovery.cc (right): https://codereview.chromium.org/2710823005/diff/60001/sql/recovery.cc#newcode25 sql/recovery.cc:25: enum RecoveryEventType { Can you add a comment saying ...
3 years, 9 months ago (2017-03-02 18:45:29 UTC) #21
Scott Hess - ex-Googler
Comment on enum required to match histogram enumeration.
3 years, 9 months ago (2017-03-02 18:54:31 UTC) #22
Scott Hess - ex-Googler
jwd, Done, PTAL? https://codereview.chromium.org/2710823005/diff/60001/sql/recovery.cc File sql/recovery.cc (right): https://codereview.chromium.org/2710823005/diff/60001/sql/recovery.cc#newcode25 sql/recovery.cc:25: enum RecoveryEventType { On 2017/03/02 18:45:29, ...
3 years, 9 months ago (2017-03-02 18:55:52 UTC) #23
jwd
Thanks! LGTM
3 years, 9 months ago (2017-03-02 20:00:32 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2710823005/80001
3 years, 9 months ago (2017-03-02 20:10:02 UTC) #27
commit-bot: I haz the power
3 years, 9 months ago (2017-03-02 21:13:04 UTC) #30
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/00d65d49ff8e35b2658d0798fac6...

Powered by Google App Engine
This is Rietveld 408576698