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

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

Issue 2751253002: [sql] Import SQLite 3.17.0. (Closed)
Patch Set: also clang on Linux i386 Created 3 years, 9 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/incrblob.test ('k') | third_party/sqlite/src/test/incrblob_err.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/test/incrblob4.test
diff --git a/third_party/sqlite/src/test/incrblob4.test b/third_party/sqlite/src/test/incrblob4.test
index a92e373536b9d4f43efb76a7cd7443c2fd45a300..dbff8eb7d58c74eed3dfb3543affae11e2330983 100644
--- a/third_party/sqlite/src/test/incrblob4.test
+++ b/third_party/sqlite/src/test/incrblob4.test
@@ -86,4 +86,24 @@ do_test 3.3 {
execsql { INSERT INTO t1(v) VALUES($new) }
} {}
+#-------------------------------------------------------------------------
+# Test that it is not possible to DROP a table with an incremental blob
+# cursor open on it.
+#
+do_execsql_test 4.1 {
+ CREATE TABLE t2(a INTEGER PRIMARY KEY, b);
+ INSERT INTO t2 VALUES(456, '0123456789');
+}
+do_test 4.2 {
+ set blob [db incrblob -readonly t2 b 456]
+ read $blob 5
+} {01234}
+do_catchsql_test 4.3 {
+ DROP TABLE t2
+} {1 {database table is locked}}
+do_test 4.4 {
+ sqlite3_extended_errcode db
+} {SQLITE_LOCKED}
+close $blob
+
finish_test
« no previous file with comments | « third_party/sqlite/src/test/incrblob.test ('k') | third_party/sqlite/src/test/incrblob_err.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698