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

Issue 1671773003: [sqlite] Fix bug in how recover virtual table handles empty. (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

[sqlite] Fix bug in how recover virtual table handles empty. Previously the code assumed that the current cell was always less than the number of cells if it was a valid leaf page (see top of leafCursorCellDecode). Empty tables have a single root page with no cells. No bugs have been seen which trace to this. In testing what actually happens with a newly-created empty table, I found that leafCursorCellDecode exits with a ValidateError. By inspection, I believe the most likely falsely valid result would be a single previously-valid row which has been deleted from the table. BUG=none Committed: https://crrev.com/f4b7a92eaad7828cc0ba43c53cdebc6eb4788df6 Cr-Commit-Position: refs/heads/master@{#373853}

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+35 lines, -2 lines) Patch
M third_party/sqlite/amalgamation/sqlite3.c View 2 chunks +9 lines, -1 line 0 comments Download
M third_party/sqlite/src/src/recover.c View 2 chunks +9 lines, -1 line 4 comments Download
M third_party/sqlite/src/test/recover.test View 1 chunk +17 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 13 (5 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1671773003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1671773003/1
4 years, 10 months ago (2016-02-05 01:27:16 UTC) #2
Scott Hess - ex-Googler
You get off easy, today! I was preparing some code to start refactoring the SQLite ...
4 years, 10 months ago (2016-02-05 01:35:48 UTC) #4
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-02-05 02:32:02 UTC) #6
Ryan Hamilton
lgtm https://codereview.chromium.org/1671773003/diff/1/third_party/sqlite/src/src/recover.c File third_party/sqlite/src/src/recover.c (left): https://codereview.chromium.org/1671773003/diff/1/third_party/sqlite/src/src/recover.c#oldcode1175 third_party/sqlite/src/src/recover.c:1175: } This diff appears to be basically the ...
4 years, 10 months ago (2016-02-05 17:51:26 UTC) #7
Scott Hess - ex-Googler
thanks https://codereview.chromium.org/1671773003/diff/1/third_party/sqlite/src/src/recover.c File third_party/sqlite/src/src/recover.c (left): https://codereview.chromium.org/1671773003/diff/1/third_party/sqlite/src/src/recover.c#oldcode1175 third_party/sqlite/src/src/recover.c:1175: } On 2016/02/05 17:51:25, Ryan Hamilton wrote: > ...
4 years, 10 months ago (2016-02-05 18:18:05 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1671773003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1671773003/1
4 years, 10 months ago (2016-02-05 18:18:50 UTC) #10
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 10 months ago (2016-02-05 18:25:37 UTC) #11
commit-bot: I haz the power
4 years, 10 months ago (2016-02-05 18:26:48 UTC) #13
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/f4b7a92eaad7828cc0ba43c53cdebc6eb4788df6
Cr-Commit-Position: refs/heads/master@{#373853}

Powered by Google App Engine
This is Rietveld 408576698