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

Issue 1657593005: [sql] Prevent recovery against a closed database. (Closed)

Created:
4 years, 10 months ago by Scott Hess - ex-Googler
Modified:
4 years, 10 months ago
Reviewers:
Ryan Hamilton
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[sql] Prevent recovery against a closed database. The referenced bug is a crash which appears to happen when recovery is attempted against a poisoned (or closed) database. Modify sql::Recovery::Begin() to explicitly short-circuit recovery if the passed connection handle is not open. Otherwise the recovery code will work until the recovered data is restored over the original, and then fail. Also modify the sql::Connection::ReportDiagnosticInfo() to clear the error callback while doing any integrity check. This is a bit of a hack in the interests of not rooting out the crazy error-callback assumptions at this time. BUG=583106 Committed: https://crrev.com/874ea1bd6ec404bc536c45098910694dea5adb34 Cr-Commit-Position: refs/heads/master@{#372896}

Patch Set 1 #

Patch Set 2 : Detect API mis-use. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+29 lines, -0 lines) Patch
M sql/connection.cc View 1 chunk +8 lines, -0 lines 0 comments Download
M sql/recovery.cc View 1 1 chunk +10 lines, -0 lines 0 comments Download
M sql/recovery_unittest.cc View 1 chunk +11 lines, -0 lines 1 comment Download

Messages

Total messages: 9 (3 generated)
Scott Hess - ex-Googler
Awhile back you offered to be in sql/OWNERS. Still up for that? I have some ...
4 years, 10 months ago (2016-02-02 01:00:48 UTC) #2
Ryan Hamilton
LGTM Well, this change looks simple enough. If the other dozen CLs are like this, ...
4 years, 10 months ago (2016-02-02 05:00:07 UTC) #3
Scott Hess - ex-Googler
On 2016/02/02 05:00:07, Ryan Hamilton wrote: > LGTM > > Well, this change looks simple ...
4 years, 10 months ago (2016-02-02 05:06:48 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1657593005/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1657593005/20001
4 years, 10 months ago (2016-02-02 05:08:32 UTC) #6
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 10 months ago (2016-02-02 05:15:18 UTC) #7
commit-bot: I haz the power
4 years, 10 months ago (2016-02-02 05:16:30 UTC) #9
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/874ea1bd6ec404bc536c45098910694dea5adb34
Cr-Commit-Position: refs/heads/master@{#372896}

Powered by Google App Engine
This is Rietveld 408576698