Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Add the "eForce" parameter to the sqlite3_multiplex_shutdown() entry point in test_multiplex.c. Shutdown is forced if true. Shutdown is not done if there are pending database connections and eForce is false, but an error log entry is made instead. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
c7303d0139f7e7f4fa7060b52942e6c6 |
User & Date: | drh 2014-07-30 15:43:05.568 |
Context
2014-07-30
| ||
21:10 | Add three new static mutexes for use by the application. This is a partial import of changes from the threads branch. (check-in: 3aad01960f user: drh tags: trunk) | |
15:43 | Add the "eForce" parameter to the sqlite3_multiplex_shutdown() entry point in test_multiplex.c. Shutdown is forced if true. Shutdown is not done if there are pending database connections and eForce is false, but an error log entry is made instead. (check-in: c7303d0139 user: drh tags: trunk) | |
13:56 | Ensure that the correct number of columns in a UNIQUE index are checked for uniqueness, regardless of whether or not the original table has a ROWID or if the columns are NOT NULL, etc. Ticket [9a6daf340df99ba93c]. (check-in: 6b785e92f2 user: drh tags: trunk) | |
Changes
Changes to src/test_multiplex.c.
︙ | |||
1172 1173 1174 1175 1176 1177 1178 | 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 | - + + - + + + + + + - + | ** ** All SQLite database connections must be closed before calling this ** routine. ** ** THIS ROUTINE IS NOT THREADSAFE. Call this routine exactly once while ** shutting down in order to free all remaining multiplex groups. */ |
︙ | |||
1232 1233 1234 1235 1236 1237 1238 | 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 | + + + - - + + - + | int objc, Tcl_Obj *CONST objv[] ){ int rc; /* Value returned by multiplex_shutdown() */ UNUSED_PARAMETER(clientData); if( objc==2 && strcmp(Tcl_GetString(objv[1]),"-force")!=0 ){ objc = 3; } |
︙ |
Changes to src/test_multiplex.h.
︙ | |||
86 87 88 89 90 91 92 | 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | - + | ** ** All SQLite database connections must be closed before calling this ** routine. ** ** THIS ROUTINE IS NOT THREADSAFE. Call this routine exactly once while ** shutting down in order to free all remaining multiplex groups. */ |
Changes to test/multiplex.test.
︙ | |||
64 65 66 67 68 69 70 71 72 73 74 75 76 77 | 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | + + + + + + | forcedelete [multiplex_name $name $i] forcedelete [multiplex_name $name-journal $i] forcedelete [multiplex_name $name-wal $i] } } db close sqlite3_shutdown test_sqlite3_log xLog proc xLog {error_code msg} { lappend ::log $error_code $msg } unset -nocomplain log multiplex_delete test.db multiplex_delete test2.db #------------------------------------------------------------------------- # multiplex-1.1.*: Test initialize and shutdown. |
︙ | |||
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 | 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 | + + + + | do_test multiplex-2.3.1 { sqlite3 db2 test2.x db2 close } {} unset -nocomplain ::log do_test multiplex-2.4.1 { sqlite3_multiplex_shutdown } {SQLITE_MISUSE} do_test multiplex-2.4.2 { execsql { INSERT INTO t1 VALUES(3, randomblob(1100)) } } {} do_test multiplex-2.4.3 { set ::log } {SQLITE_MISUSE {sqlite3_multiplex_shutdown() called while database connections are still open}} do_test multiplex-2.4.4 { file size [multiplex_name test.x 0] } {7168} do_test multiplex-2.4.5 { db close sqlite3 db test.x db eval vacuum db close glob test.x* |
︙ |