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

Issue 1665913003: [sql] Use IGNORE conflict resolution in recovery. (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@zzsql_recover_autorecover_review
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[sql] Use IGNORE conflict resolution in recovery. One way databases get corrupted is when pages cross transaction boundaries. Both pages can be valid, but they could contain overlapping data, resulting in UNIQUE constraint violations. AutoRecoverTable() handled this by using INSERT OR REPLACE to cause later items to overwrite earlier items. Change to INSERT OR IGNORE. This drops later items for UNIQUE violations, but also handles other constraint violations. BUG=none Committed: https://crrev.com/806f499866733d4561aac73f9129d5f5ab727ddd Cr-Commit-Position: refs/heads/master@{#373617}

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -16 lines) Patch
M sql/recovery.h View 1 chunk +2 lines, -2 lines 0 comments Download
M sql/recovery.cc View 3 chunks +3 lines, -12 lines 1 comment Download
M sql/recovery_unittest.cc View 1 chunk +3 lines, -2 lines 1 comment Download

Depends on Patchset:

Messages

Total messages: 9 (3 generated)
Scott Hess - ex-Googler
4 years, 10 months ago (2016-02-03 22:35:00 UTC) #2
Scott Hess - ex-Googler
https://codereview.chromium.org/1665913003/diff/1/sql/recovery_unittest.cc File sql/recovery_unittest.cc (right): https://codereview.chromium.org/1665913003/diff/1/sql/recovery_unittest.cc#newcode377 sql/recovery_unittest.cc:377: EXPECT_TRUE(results=="100" || results=="0") << "Actual results: " << results; ...
4 years, 10 months ago (2016-02-03 22:37:20 UTC) #3
Ryan Hamilton
lgtm https://codereview.chromium.org/1665913003/diff/1/sql/recovery.cc File sql/recovery.cc (left): https://codereview.chromium.org/1665913003/diff/1/sql/recovery.cc#oldcode431 sql/recovery.cc:431: // http://www.sqlite.org/lang_conflict.html Looks like you planned ahead! Nice ...
4 years, 10 months ago (2016-02-04 01:38:17 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1665913003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1665913003/1
4 years, 10 months ago (2016-02-04 21:04:08 UTC) #6
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 10 months ago (2016-02-04 21:12:15 UTC) #7
commit-bot: I haz the power
4 years, 10 months ago (2016-02-04 21:13:03 UTC) #9
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/806f499866733d4561aac73f9129d5f5ab727ddd
Cr-Commit-Position: refs/heads/master@{#373617}

Powered by Google App Engine
This is Rietveld 408576698