| Index: third_party/sqlite/patches/0004-Virtual-table-supporting-recovery-of-corrupted-datab.patch
|
| diff --git a/third_party/sqlite/patches/0005-Virtual-table-supporting-recovery-of-corrupted-datab.patch b/third_party/sqlite/patches/0004-Virtual-table-supporting-recovery-of-corrupted-datab.patch
|
| similarity index 99%
|
| rename from third_party/sqlite/patches/0005-Virtual-table-supporting-recovery-of-corrupted-datab.patch
|
| rename to third_party/sqlite/patches/0004-Virtual-table-supporting-recovery-of-corrupted-datab.patch
|
| index 6a937f96724329416bd8bf5916d0d47b2f0d7e94..a6e191c49eb7b310d3f427aee927b145b6758200 100644
|
| --- a/third_party/sqlite/patches/0005-Virtual-table-supporting-recovery-of-corrupted-datab.patch
|
| +++ b/third_party/sqlite/patches/0004-Virtual-table-supporting-recovery-of-corrupted-datab.patch
|
| @@ -1,7 +1,7 @@
|
| -From d176c774ba1a8b431400f38ca71459bf148f0c3a Mon Sep 17 00:00:00 2001
|
| +From b246b60be3e9e241892d772a324aced44865d7f9 Mon Sep 17 00:00:00 2001
|
| From: Scott Hess <shess@chromium.org>
|
| Date: Sat, 20 Jul 2013 11:42:21 -0700
|
| -Subject: [PATCH 05/13] Virtual table supporting recovery of corrupted
|
| +Subject: [PATCH 04/10] Virtual table supporting recovery of corrupted
|
| databases.
|
|
|
| "recover" implements a virtual table which uses the SQLite pager layer
|
| @@ -15,7 +15,7 @@ listed. This patch and the top of recover.c should be considered
|
| authoritative. The history is mostly under
|
| third_party/sqlite/src/src/{recover,recover-alt}.c .
|
| ---
|
| - third_party/sqlite/src/main.mk | 6 +-
|
| + third_party/sqlite/src/main.mk | 5 +
|
| third_party/sqlite/src/src/main.c | 8 +
|
| third_party/sqlite/src/src/recover.c | 2270 +++++++++++++++++++++++++++
|
| third_party/sqlite/src/src/recover.h | 23 +
|
| @@ -24,7 +24,7 @@ third_party/sqlite/src/src/{recover,recover-alt}.c .
|
| third_party/sqlite/src/test/recover0.test | 532 +++++++
|
| third_party/sqlite/src/test/recover1.test | 429 +++++
|
| third_party/sqlite/src/test/recover2.test | 157 ++
|
| - 9 files changed, 3789 insertions(+), 1 deletion(-)
|
| + 9 files changed, 3789 insertions(+)
|
| create mode 100644 third_party/sqlite/src/src/recover.c
|
| create mode 100644 third_party/sqlite/src/src/recover.h
|
| create mode 100644 third_party/sqlite/src/src/recover_varint.c
|
| @@ -34,20 +34,19 @@ third_party/sqlite/src/src/{recover,recover-alt}.c .
|
| create mode 100644 third_party/sqlite/src/test/recover2.test
|
|
|
| diff --git a/third_party/sqlite/src/main.mk b/third_party/sqlite/src/main.mk
|
| -index 6ff3bd4..26f9f15 100644
|
| +index 6feb638b9280..b46c5bbc9ced 100644
|
| --- a/third_party/sqlite/src/main.mk
|
| +++ b/third_party/sqlite/src/main.mk
|
| -@@ -67,7 +67,8 @@ LIBOBJ+= vdbe.o parse.o \
|
| - mutex.o mutex_noop.o mutex_unix.o mutex_w32.o \
|
| - notify.o opcodes.o os.o os_unix.o os_win.o \
|
| - pager.o pcache.o pcache1.o pragma.o prepare.o printf.o \
|
| -- random.o resolve.o rowset.o rtree.o select.o sqlite3rbu.o status.o \
|
| -+ random.o recover.o recover_varint.o resolve.o rowset.o rtree.o \
|
| -+ select.o sqlite3rbu.o status.o \
|
| - table.o threads.o tokenize.o treeview.o trigger.o \
|
| - update.o userauth.o util.o vacuum.o \
|
| - vdbeapi.o vdbeaux.o vdbeblob.o vdbemem.o vdbesort.o \
|
| -@@ -360,6 +361,8 @@ TESTSRC2 = \
|
| +@@ -75,6 +75,8 @@ LIBOBJ+= vdbe.o parse.o \
|
| + vdbetrace.o wal.o walker.o where.o wherecode.o whereexpr.o \
|
| + utf.o vtab.o
|
| +
|
| ++LIBOBJ += recover.o recover_varint.o resolve.o
|
| ++
|
| + LIBOBJ += sqlite3session.o
|
| +
|
| + # All of the source code files.
|
| +@@ -370,6 +372,8 @@ TESTSRC2 = \
|
| $(TOP)/src/prepare.c \
|
| $(TOP)/src/printf.c \
|
| $(TOP)/src/random.c \
|
| @@ -56,19 +55,19 @@ index 6ff3bd4..26f9f15 100644
|
| $(TOP)/src/pcache.c \
|
| $(TOP)/src/pcache1.c \
|
| $(TOP)/src/select.c \
|
| -@@ -720,6 +723,7 @@ sqlite3_analyzer$(EXE): sqlite3_analyzer.c
|
| - #
|
| - TESTFIXTURE_FLAGS = -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1
|
| - TESTFIXTURE_FLAGS += -DSQLITE_SERVER=1 -DSQLITE_PRIVATE="" -DSQLITE_CORE
|
| +@@ -768,6 +772,7 @@ TESTFIXTURE_FLAGS = -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1
|
| + TESTFIXTURE_FLAGS += -DSQLITE_SERVER=1 -DSQLITE_PRIVATE="" -DSQLITE_CORE
|
| + TESTFIXTURE_FLAGS += -DSQLITE_SERIES_CONSTRAINT_VERIFY=1
|
| + TESTFIXTURE_FLAGS += -DSQLITE_DEFAULT_PAGE_SIZE=1024
|
| +TESTFIXTURE_FLAGS += -DDEFAULT_ENABLE_RECOVER=1
|
|
|
| testfixture$(EXE): $(TESTSRC2) libsqlite3.a $(TESTSRC) $(TOP)/src/tclsqlite.c
|
| $(TCCX) $(TCL_FLAGS) -DTCLSH=1 $(TESTFIXTURE_FLAGS) \
|
| diff --git a/third_party/sqlite/src/src/main.c b/third_party/sqlite/src/src/main.c
|
| -index 3be7c77..301808c 100644
|
| +index 9aad8fdd4cf8..03e4f1b92845 100644
|
| --- a/third_party/sqlite/src/src/main.c
|
| +++ b/third_party/sqlite/src/src/main.c
|
| -@@ -2927,6 +2927,14 @@ static int openDatabase(
|
| +@@ -3014,6 +3014,14 @@ static int openDatabase(
|
| }
|
| #endif
|
|
|
| @@ -85,7 +84,7 @@ index 3be7c77..301808c 100644
|
| rc = sqlite3IcuInit(db);
|
| diff --git a/third_party/sqlite/src/src/recover.c b/third_party/sqlite/src/src/recover.c
|
| new file mode 100644
|
| -index 0000000..c22fd4d
|
| +index 000000000000..c22fd4d43166
|
| --- /dev/null
|
| +++ b/third_party/sqlite/src/src/recover.c
|
| @@ -0,0 +1,2270 @@
|
| @@ -2361,7 +2360,7 @@ index 0000000..c22fd4d
|
| +}
|
| diff --git a/third_party/sqlite/src/src/recover.h b/third_party/sqlite/src/src/recover.h
|
| new file mode 100644
|
| -index 0000000..691f2fd
|
| +index 000000000000..691f2fdbab22
|
| --- /dev/null
|
| +++ b/third_party/sqlite/src/src/recover.h
|
| @@ -0,0 +1,23 @@
|
| @@ -2390,7 +2389,7 @@ index 0000000..691f2fd
|
| +#endif
|
| diff --git a/third_party/sqlite/src/src/recover_varint.c b/third_party/sqlite/src/src/recover_varint.c
|
| new file mode 100644
|
| -index 0000000..c111e2c
|
| +index 000000000000..c111e2cedc44
|
| --- /dev/null
|
| +++ b/third_party/sqlite/src/src/recover_varint.c
|
| @@ -0,0 +1,201 @@
|
| @@ -2597,7 +2596,7 @@ index 0000000..c111e2c
|
| +
|
| diff --git a/third_party/sqlite/src/test/recover.test b/third_party/sqlite/src/test/recover.test
|
| new file mode 100644
|
| -index 0000000..bfb7888
|
| +index 000000000000..bfb788814866
|
| --- /dev/null
|
| +++ b/third_party/sqlite/src/test/recover.test
|
| @@ -0,0 +1,164 @@
|
| @@ -2767,7 +2766,7 @@ index 0000000..bfb7888
|
| +finish_test
|
| diff --git a/third_party/sqlite/src/test/recover0.test b/third_party/sqlite/src/test/recover0.test
|
| new file mode 100644
|
| -index 0000000..aac2ed9
|
| +index 000000000000..aac2ed9164ba
|
| --- /dev/null
|
| +++ b/third_party/sqlite/src/test/recover0.test
|
| @@ -0,0 +1,532 @@
|
| @@ -3305,7 +3304,7 @@ index 0000000..aac2ed9
|
| +finish_test
|
| diff --git a/third_party/sqlite/src/test/recover1.test b/third_party/sqlite/src/test/recover1.test
|
| new file mode 100644
|
| -index 0000000..1d90f09
|
| +index 000000000000..1d90f096b727
|
| --- /dev/null
|
| +++ b/third_party/sqlite/src/test/recover1.test
|
| @@ -0,0 +1,429 @@
|
| @@ -3740,7 +3739,7 @@ index 0000000..1d90f09
|
| +finish_test
|
| diff --git a/third_party/sqlite/src/test/recover2.test b/third_party/sqlite/src/test/recover2.test
|
| new file mode 100644
|
| -index 0000000..8aa4e04
|
| +index 000000000000..8aa4e049a010
|
| --- /dev/null
|
| +++ b/third_party/sqlite/src/test/recover2.test
|
| @@ -0,0 +1,157 @@
|
| @@ -3902,5 +3901,5 @@ index 0000000..8aa4e04
|
| +
|
| +finish_test
|
| --
|
| -2.5.0
|
| +2.11.0
|
|
|
|
|