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/mutex1.test

Issue 6990047: Import SQLite 3.7.6.3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « third_party/sqlite/src/test/multiplex.test ('k') | third_party/sqlite/src/test/nan.test » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # 2008 June 17 1 # 2008 June 17
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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 # can be selected using sqlite3_config: 94 # can be selected using sqlite3_config:
95 # 95 #
96 # * Serialized mode, 96 # * Serialized mode,
97 # * Multi-threaded mode, 97 # * Multi-threaded mode,
98 # * Single-threaded mode. 98 # * Single-threaded mode.
99 # 99 #
100 ifcapable threadsafe&&shared_cache { 100 ifcapable threadsafe&&shared_cache {
101 set enable_shared_cache [sqlite3_enable_shared_cache 1] 101 set enable_shared_cache [sqlite3_enable_shared_cache 1]
102 foreach {mode mutexes} { 102 foreach {mode mutexes} {
103 singlethread {} 103 singlethread {}
104 multithread {fast static_lru static_master static_mem static_open static_pr ng } 104 multithread {
105 serialized {fast recursive static_lru static_master static_mem static_open static_prng} 105 fast static_lru static_master static_mem static_open static_prng
106 static_pmem
107 }
108 serialized {
109 fast recursive static_lru static_master static_mem static_open
110 static_prng static_pmem
111 }
106 } { 112 } {
107 113
108 do_test mutex1.2.$mode.1 { 114 do_test mutex1.2.$mode.1 {
109 catch {db close} 115 catch {db close}
110 sqlite3_shutdown 116 sqlite3_shutdown
111 sqlite3_config $mode 117 sqlite3_config $mode
112 } SQLITE_OK 118 } SQLITE_OK
113 119
114 do_test mutex1.2.$mode.2 { 120 do_test mutex1.2.$mode.2 {
115 sqlite3_initialize 121 sqlite3_initialize
116 clear_mutex_counters 122 clear_mutex_counters
117 sqlite3 db test.db -nomutex 0 -fullmutex 0 123 sqlite3 db test.db -nomutex 0 -fullmutex 0
118 catchsql { CREATE TABLE abc(a, b, c) } 124 catchsql { CREATE TABLE abc(a, b, c) }
119 db eval { 125 db eval {
120 INSERT INTO abc VALUES(1, 2, 3); 126 INSERT INTO abc VALUES(1, 2, 3);
121 } 127 }
122 } {} 128 } {}
123 129 ifcapable !memorymanage {
130 regsub { static_lru} $mutexes {} mutexes
131 }
124 do_test mutex1.2.$mode.3 { 132 do_test mutex1.2.$mode.3 {
125 mutex_counters counters 133 mutex_counters counters
126 134
127 set res [list] 135 set res [list]
128 foreach {key value} [array get counters] { 136 foreach {key value} [array get counters] {
129 if {$key ne "total" && $value > 0} { 137 if {$key ne "total" && $value > 0} {
130 lappend res $key 138 lappend res $key
131 } 139 }
132 } 140 }
133 lsort $res 141 lsort $res
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 do_test mutex1-X { 183 do_test mutex1-X {
176 catch {db close} 184 catch {db close}
177 sqlite3_shutdown 185 sqlite3_shutdown
178 clear_mutex_counters 186 clear_mutex_counters
179 install_mutex_counters 0 187 install_mutex_counters 0
180 sqlite3_initialize 188 sqlite3_initialize
181 } {SQLITE_OK} 189 } {SQLITE_OK}
182 190
183 autoinstall_test_functions 191 autoinstall_test_functions
184 finish_test 192 finish_test
OLDNEW
« no previous file with comments | « third_party/sqlite/src/test/multiplex.test ('k') | third_party/sqlite/src/test/nan.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698