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

Side by Side Diff: third_party/sqlite/src/test/rdonly.test

Issue 1610963002: Import SQLite 3.10.2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « third_party/sqlite/src/test/rbu.test ('k') | third_party/sqlite/src/test/releasetest.mk » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # 2007 April 24 1 # 2007 April 24
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 14 matching lines...) Expand all
25 25
26 # Create a database. 26 # Create a database.
27 # 27 #
28 do_test rdonly-1.1 { 28 do_test rdonly-1.1 {
29 execsql { 29 execsql {
30 CREATE TABLE t1(x); 30 CREATE TABLE t1(x);
31 INSERT INTO t1 VALUES(1); 31 INSERT INTO t1 VALUES(1);
32 SELECT * FROM t1; 32 SELECT * FROM t1;
33 } 33 }
34 } {1} 34 } {1}
35
36 # EVIDENCE-OF: R-29639-16887 The sqlite3_db_readonly(D,N) interface
37 # returns 1 if the database N of connection D is read-only, 0 if it is
38 # read/write, or -1 if N is not the name of a database on connection D.
39 #
35 do_test rdonly-1.1.1 { 40 do_test rdonly-1.1.1 {
36 sqlite3_db_readonly db main 41 sqlite3_db_readonly db main
37 } {0} 42 } {0}
38 43
39 # Changes the write version from 1 to 3. Verify that the database 44 # Changes the write version from 1 to 3. Verify that the database
40 # can be read but not written. 45 # can be read but not written.
41 # 46 #
42 do_test rdonly-1.2 { 47 do_test rdonly-1.2 {
43 db close 48 db close
44 hexio_get_int [hexio_read test.db 18 1] 49 hexio_get_int [hexio_read test.db 18 1]
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 ifcapable wal { set ro_version 03 } 86 ifcapable wal { set ro_version 03 }
82 do_test rdonly-1.6 { 87 do_test rdonly-1.6 {
83 hexio_write test.db 18 $ro_version ; # write-version 88 hexio_write test.db 18 $ro_version ; # write-version
84 hexio_write test.db 24 11223344 ; # change-counter 89 hexio_write test.db 24 11223344 ; # change-counter
85 catchsql { 90 catchsql {
86 INSERT INTO t1 VALUES(2); 91 INSERT INTO t1 VALUES(2);
87 } 92 }
88 } {1 {attempt to write a readonly database}} 93 } {1 {attempt to write a readonly database}}
89 94
90 finish_test 95 finish_test
OLDNEW
« no previous file with comments | « third_party/sqlite/src/test/rbu.test ('k') | third_party/sqlite/src/test/releasetest.mk » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698