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

Unified Diff: third_party/sqlite/src/test/fts3corrupt.test

Issue 949043002: Add //third_party/sqlite to dirs_to_snapshot, remove net_sql.patch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/sqlite/src/test/fts3conf.test ('k') | third_party/sqlite/src/test/fts3d.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/test/fts3corrupt.test
diff --git a/third_party/sqlite/src/test/fts3corrupt.test b/third_party/sqlite/src/test/fts3corrupt.test
index b8b45c39518d03d9fd5f8721fd572118578701c3..cb50e3e46ae527183de775bbc34189fcdf5169f8 100644
--- a/third_party/sqlite/src/test/fts3corrupt.test
+++ b/third_party/sqlite/src/test/fts3corrupt.test
@@ -40,6 +40,7 @@ do_test fts3corrupt-1.2 {
do_catchsql_test 1.3 {
INSERT INTO t1 VALUES('world');
} {1 {database disk image is malformed}}
+do_test 1.3.1 { sqlite3_extended_errcode db } SQLITE_CORRUPT_VTAB
do_execsql_test 1.4 {
DROP TABLE t1;
}
@@ -69,6 +70,7 @@ do_test fts3corrupt-2.1 {
do_catchsql_test 2.2 {
SELECT rowid FROM t1 WHERE t1 MATCH 'hello'
} {1 {database disk image is malformed}}
+do_test 2.2.1 { sqlite3_extended_errcode db } SQLITE_CORRUPT_VTAB
do_execsql_test 3.0 {
DROP TABLE t1;
@@ -86,6 +88,7 @@ do_test fts3corrupt-3.1 {
do_catchsql_test 3.2 {
SELECT rowid FROM t1 WHERE t1 MATCH 'world'
} {1 {database disk image is malformed}}
+do_test 3.2.1 { sqlite3_extended_errcode db } SQLITE_CORRUPT_VTAB
do_execsql_test 4.0 {
@@ -111,6 +114,7 @@ do_catchsql_test 4.2 {
UPDATE t1_segdir SET root = X'FFFFFFFFFFFFFFFF';
SELECT rowid FROM t1 WHERE t1 MATCH 'world';
} {1 {database disk image is malformed}}
+do_test 4.2.1 { sqlite3_extended_errcode db } SQLITE_CORRUPT_VTAB
set blob [binary format cca*cca*cca*cca*cca*cca*cca*cca*cca*cca*a* \
22 120 [string repeat a 120] \
@@ -130,6 +134,7 @@ do_catchsql_test 4.3 {
UPDATE t1_segdir SET root = $blob;
SELECT rowid FROM t1 WHERE t1 MATCH 'world';
} {1 {database disk image is malformed}}
+do_test 4.3.1 { sqlite3_extended_errcode db } SQLITE_CORRUPT_VTAB
# Test a special kind of corruption, where the %_stat table contains
# an invalid entry. At one point this could lead to a division-by-zero
@@ -152,11 +157,12 @@ do_catchsql_test 5.2 {
UPDATE t1_stat SET value = X'0000';
SELECT matchinfo(t1, 'nxa') FROM t1 WHERE t1 MATCH 't*';
} {1 {database disk image is malformed}}
+do_test 5.2.1 { sqlite3_extended_errcode db } SQLITE_CORRUPT_VTAB
do_catchsql_test 5.3 {
UPDATE t1_stat SET value = NULL;
SELECT matchinfo(t1, 'nxa') FROM t1 WHERE t1 MATCH 't*';
} {1 {database disk image is malformed}}
+do_test 5.3.1 { sqlite3_extended_errcode db } SQLITE_CORRUPT_VTAB
finish_test
-
« no previous file with comments | « third_party/sqlite/src/test/fts3conf.test ('k') | third_party/sqlite/src/test/fts3d.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698