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

Side by Side 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 unified diff | Download patch
OLDNEW
1 # 2012 March 23 1 # 2012 March 23
2 # 2 #
3 # The author disclaims copyright to this source code. In place of 3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing: 4 # a legal notice, here is a blessing:
5 # 5 #
6 # May you do good and not evil. 6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others. 7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give. 8 # May you share freely, never taking more than you give.
9 # 9 #
10 #*********************************************************************** 10 #***********************************************************************
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 read $blob 10 79 read $blob 10
80 } {tttttttttt} 80 } {tttttttttt}
81 81
82 do_test 3.3 { 82 do_test 3.3 {
83 set new [string repeat % 900] 83 set new [string repeat % 900]
84 execsql { UPDATE t1 SET v = $new WHERE k = 20 } 84 execsql { UPDATE t1 SET v = $new WHERE k = 20 }
85 execsql { DELETE FROM t1 WHERE k=19 } 85 execsql { DELETE FROM t1 WHERE k=19 }
86 execsql { INSERT INTO t1(v) VALUES($new) } 86 execsql { INSERT INTO t1(v) VALUES($new) }
87 } {} 87 } {}
88 88
89 #-------------------------------------------------------------------------
90 # Test that it is not possible to DROP a table with an incremental blob
91 # cursor open on it.
92 #
93 do_execsql_test 4.1 {
94 CREATE TABLE t2(a INTEGER PRIMARY KEY, b);
95 INSERT INTO t2 VALUES(456, '0123456789');
96 }
97 do_test 4.2 {
98 set blob [db incrblob -readonly t2 b 456]
99 read $blob 5
100 } {01234}
101 do_catchsql_test 4.3 {
102 DROP TABLE t2
103 } {1 {database table is locked}}
104 do_test 4.4 {
105 sqlite3_extended_errcode db
106 } {SQLITE_LOCKED}
107 close $blob
108
89 finish_test 109 finish_test
OLDNEW
« 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